diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e03962 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +.DS_Store +dist/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/README.md b/README.md index 732499c..c8d366e 100644 --- a/README.md +++ b/README.md @@ -1 +1,40 @@ -# Javascript-2 \ No newline at end of file +# Javascript-2 +For our Javascript-2 assignment we had to create a social media website based on our schools API. The site is made with with the school in mind and its design mimics that of our school website. It fetches all the posts from the API with an auhor linked to the posts. + +You can view others posts, others profile, and you can view and edit your own posts and profile on the site. + + +## Built With + +- HTML +- CSS +- Javascript +- Boostrap +- SASS + +### Installing + + +1. Clone the repo: + +```bash +git clone https://github.com/OJOverby/Javascript-2.git +``` + +2. Install the dependencies: + +``` +npm i + +``` +### Running + +To run the app, run the following commands: + +```bash +npm run start +``` + +## Contact + +[Email](mailto:mail@olejorgen.no) diff --git a/dist/css/styles.css b/dist/css/styles.css new file mode 100644 index 0000000..37bd7fa --- /dev/null +++ b/dist/css/styles.css @@ -0,0 +1,10750 @@ +@charset "UTF-8"; +/*! + * Bootstrap v5.2.0 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Copyright 2011-2022 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +:root { + --bs-blue: #0d6efd; + --bs-indigo: #6610f2; + --bs-purple: #6f42c1; + --bs-pink: #d63384; + --bs-red: #dc3545; + --bs-orange: #fd7e14; + --bs-yellow: #ffc107; + --bs-green: #198754; + --bs-teal: #20c997; + --bs-cyan: #0dcaf0; + --bs-black: #000; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-color-rgb: 33, 37, 41; + --bs-body-bg-rgb: 255, 255, 255; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-bg: #fff; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-2xl: 2rem; + --bs-border-radius-pill: 50rem; + --bs-link-color: #0d6efd; + --bs-link-hover-color: rgb(10.4, 88, 202.4); + --bs-code-color: #d63384; + --bs-highlight-bg: rgb(255, 242.6, 205.4); +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} + +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +hr { + margin: 1rem 0; + color: inherit; + border: 0; + border-top: 1px solid; + opacity: 0.25; +} + +h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +h1, .h1 { + font-size: calc(1.375rem + 1.5vw); +} +@media (min-width: 1200px) { + h1, .h1 { + font-size: 2.5rem; + } +} + +h2, .h2 { + font-size: calc(1.325rem + 0.9vw); +} +@media (min-width: 1200px) { + h2, .h2 { + font-size: 2rem; + } +} + +h3, .h3 { + font-size: calc(1.3rem + 0.6vw); +} +@media (min-width: 1200px) { + h3, .h3 { + font-size: 1.75rem; + } +} + +h4, .h4 { + font-size: calc(1.275rem + 0.3vw); +} +@media (min-width: 1200px) { + h4, .h4 { + font-size: 1.5rem; + } +} + +h5, .h5 { + font-size: 1.25rem; +} + +h6, .h6 { + font-size: 1rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title] { + text-decoration: underline dotted; + cursor: help; + text-decoration-skip-ink: none; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul { + padding-left: 2rem; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 700; +} + +dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +b, +strong { + font-weight: bolder; +} + +small, .small { + font-size: 0.875em; +} + +mark, .mark { + padding: 0.1875em; + background-color: var(--bs-highlight-bg); +} + +sub, +sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +a { + color: var(--bs-link-color); + text-decoration: underline; +} +a:hover { + color: var(--bs-link-hover-color); +} + +a:not([href]):not([class]), a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +pre, +code, +kbd, +samp { + font-family: var(--bs-font-monospace); + font-size: 1em; +} + +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} +pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +code { + font-size: 0.875em; + color: var(--bs-code-color); + word-wrap: break-word; +} +a > code { + color: inherit; +} + +kbd { + padding: 0.1875rem 0.375rem; + font-size: 0.875em; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; +} +kbd kbd { + padding: 0; + font-size: 1em; +} + +figure { + margin: 0 0 1rem; +} + +img, +svg { + vertical-align: middle; +} + +table { + caption-side: bottom; + border-collapse: collapse; +} + +caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #6c757d; + text-align: left; +} + +th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +thead, +tbody, +tfoot, +tr, +td, +th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +label { + display: inline-block; +} + +button { + border-radius: 0; +} + +button:focus:not(:focus-visible) { + outline: 0; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +button, +select { + text-transform: none; +} + +[role=button] { + cursor: pointer; +} + +select { + word-wrap: normal; +} +select:disabled { + opacity: 1; +} + +[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator { + display: none !important; +} + +button, +[type=button], +[type=reset], +[type=submit] { + -webkit-appearance: button; +} +button:not(:disabled), +[type=button]:not(:disabled), +[type=reset]:not(:disabled), +[type=submit]:not(:disabled) { + cursor: pointer; +} + +::-moz-focus-inner { + padding: 0; + border-style: none; +} + +textarea { + resize: vertical; +} + +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} +@media (min-width: 1200px) { + legend { + font-size: 1.5rem; + } +} +legend + * { + clear: left; +} + +::-webkit-datetime-edit-fields-wrapper, +::-webkit-datetime-edit-text, +::-webkit-datetime-edit-minute, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-year-field { + padding: 0; +} + +::-webkit-inner-spin-button { + height: auto; +} + +[type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +/* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"] { + direction: ltr; +} +*/ +::-webkit-search-decoration { + -webkit-appearance: none; +} + +::-webkit-color-swatch-wrapper { + padding: 0; +} + +::file-selector-button { + font: inherit; + -webkit-appearance: button; +} + +output { + display: inline-block; +} + +iframe { + border: 0; +} + +summary { + display: list-item; + cursor: pointer; +} + +progress { + vertical-align: baseline; +} + +[hidden] { + display: none !important; +} + +.lead { + font-size: 1.25rem; + font-weight: 300; +} + +.display-1 { + font-size: calc(1.625rem + 4.5vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-1 { + font-size: 5rem; + } +} + +.display-2 { + font-size: calc(1.575rem + 3.9vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-2 { + font-size: 4.5rem; + } +} + +.display-3 { + font-size: calc(1.525rem + 3.3vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-3 { + font-size: 4rem; + } +} + +.display-4 { + font-size: calc(1.475rem + 2.7vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-4 { + font-size: 3.5rem; + } +} + +.display-5 { + font-size: calc(1.425rem + 2.1vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-5 { + font-size: 3rem; + } +} + +.display-6 { + font-size: calc(1.375rem + 1.5vw); + font-weight: 300; + line-height: 1.2; +} +@media (min-width: 1200px) { + .display-6 { + font-size: 2.5rem; + } +} + +.list-unstyled { + padding-left: 0; + list-style: none; +} + +.list-inline { + padding-left: 0; + list-style: none; +} + +.list-inline-item { + display: inline-block; +} +.list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} + +.initialism { + font-size: 0.875em; + text-transform: uppercase; +} + +.blockquote { + margin-bottom: 1rem; + font-size: 1.25rem; +} +.blockquote > :last-child { + margin-bottom: 0; +} + +.blockquote-footer { + margin-top: -1rem; + margin-bottom: 1rem; + font-size: 0.875em; + color: #6c757d; +} +.blockquote-footer::before { + content: "— "; +} + +.img-fluid { + max-width: 100%; + height: auto; +} + +.img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid var(--bs-border-color); + border-radius: 0.375rem; + max-width: 100%; + height: auto; +} + +.figure { + display: inline-block; +} + +.figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} + +.figure-caption { + font-size: 0.875em; + color: #6c757d; +} + +.container, +.container-fluid, +.container-xxl, +.container-xl, +.container-lg, +.container-md, +.container-sm { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .container-sm, .container { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container-md, .container-sm, .container { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container-lg, .container-md, .container-sm, .container { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1320px; + } +} +.row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(-1 * var(--bs-gutter-y)); + margin-right: calc(-0.5 * var(--bs-gutter-x)); + margin-left: calc(-0.5 * var(--bs-gutter-x)); +} +.row > * { + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); + margin-top: var(--bs-gutter-y); +} + +.col { + flex: 1 0 0%; +} + +.row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.col-auto { + flex: 0 0 auto; + width: auto; +} + +.col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-3 { + flex: 0 0 auto; + width: 25%; +} + +.col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.col-6 { + flex: 0 0 auto; + width: 50%; +} + +.col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.col-9 { + flex: 0 0 auto; + width: 75%; +} + +.col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.col-12 { + flex: 0 0 auto; + width: 100%; +} + +.offset-1 { + margin-left: 8.33333333%; +} + +.offset-2 { + margin-left: 16.66666667%; +} + +.offset-3 { + margin-left: 25%; +} + +.offset-4 { + margin-left: 33.33333333%; +} + +.offset-5 { + margin-left: 41.66666667%; +} + +.offset-6 { + margin-left: 50%; +} + +.offset-7 { + margin-left: 58.33333333%; +} + +.offset-8 { + margin-left: 66.66666667%; +} + +.offset-9 { + margin-left: 75%; +} + +.offset-10 { + margin-left: 83.33333333%; +} + +.offset-11 { + margin-left: 91.66666667%; +} + +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} + +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} + +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} + +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} + +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} + +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} + +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} + +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} + +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} + +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} + +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} + +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .col-sm { + flex: 1 0 0%; + } + .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-sm-0 { + margin-left: 0; + } + .offset-sm-1 { + margin-left: 8.33333333%; + } + .offset-sm-2 { + margin-left: 16.66666667%; + } + .offset-sm-3 { + margin-left: 25%; + } + .offset-sm-4 { + margin-left: 33.33333333%; + } + .offset-sm-5 { + margin-left: 41.66666667%; + } + .offset-sm-6 { + margin-left: 50%; + } + .offset-sm-7 { + margin-left: 58.33333333%; + } + .offset-sm-8 { + margin-left: 66.66666667%; + } + .offset-sm-9 { + margin-left: 75%; + } + .offset-sm-10 { + margin-left: 83.33333333%; + } + .offset-sm-11 { + margin-left: 91.66666667%; + } + .g-sm-0, + .gx-sm-0 { + --bs-gutter-x: 0; + } + .g-sm-0, + .gy-sm-0 { + --bs-gutter-y: 0; + } + .g-sm-1, + .gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + .g-sm-1, + .gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + .g-sm-2, + .gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + .g-sm-2, + .gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + .g-sm-3, + .gx-sm-3 { + --bs-gutter-x: 1rem; + } + .g-sm-3, + .gy-sm-3 { + --bs-gutter-y: 1rem; + } + .g-sm-4, + .gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + .g-sm-4, + .gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + .g-sm-5, + .gx-sm-5 { + --bs-gutter-x: 3rem; + } + .g-sm-5, + .gy-sm-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 768px) { + .col-md { + flex: 1 0 0%; + } + .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-md-auto { + flex: 0 0 auto; + width: auto; + } + .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.33333333%; + } + .offset-md-2 { + margin-left: 16.66666667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.33333333%; + } + .offset-md-5 { + margin-left: 41.66666667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.33333333%; + } + .offset-md-8 { + margin-left: 66.66666667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.33333333%; + } + .offset-md-11 { + margin-left: 91.66666667%; + } + .g-md-0, + .gx-md-0 { + --bs-gutter-x: 0; + } + .g-md-0, + .gy-md-0 { + --bs-gutter-y: 0; + } + .g-md-1, + .gx-md-1 { + --bs-gutter-x: 0.25rem; + } + .g-md-1, + .gy-md-1 { + --bs-gutter-y: 0.25rem; + } + .g-md-2, + .gx-md-2 { + --bs-gutter-x: 0.5rem; + } + .g-md-2, + .gy-md-2 { + --bs-gutter-y: 0.5rem; + } + .g-md-3, + .gx-md-3 { + --bs-gutter-x: 1rem; + } + .g-md-3, + .gy-md-3 { + --bs-gutter-y: 1rem; + } + .g-md-4, + .gx-md-4 { + --bs-gutter-x: 1.5rem; + } + .g-md-4, + .gy-md-4 { + --bs-gutter-y: 1.5rem; + } + .g-md-5, + .gx-md-5 { + --bs-gutter-x: 3rem; + } + .g-md-5, + .gy-md-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 992px) { + .col-lg { + flex: 1 0 0%; + } + .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-lg-0 { + margin-left: 0; + } + .offset-lg-1 { + margin-left: 8.33333333%; + } + .offset-lg-2 { + margin-left: 16.66666667%; + } + .offset-lg-3 { + margin-left: 25%; + } + .offset-lg-4 { + margin-left: 33.33333333%; + } + .offset-lg-5 { + margin-left: 41.66666667%; + } + .offset-lg-6 { + margin-left: 50%; + } + .offset-lg-7 { + margin-left: 58.33333333%; + } + .offset-lg-8 { + margin-left: 66.66666667%; + } + .offset-lg-9 { + margin-left: 75%; + } + .offset-lg-10 { + margin-left: 83.33333333%; + } + .offset-lg-11 { + margin-left: 91.66666667%; + } + .g-lg-0, + .gx-lg-0 { + --bs-gutter-x: 0; + } + .g-lg-0, + .gy-lg-0 { + --bs-gutter-y: 0; + } + .g-lg-1, + .gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + .g-lg-1, + .gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + .g-lg-2, + .gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + .g-lg-2, + .gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + .g-lg-3, + .gx-lg-3 { + --bs-gutter-x: 1rem; + } + .g-lg-3, + .gy-lg-3 { + --bs-gutter-y: 1rem; + } + .g-lg-4, + .gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + .g-lg-4, + .gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + .g-lg-5, + .gx-lg-5 { + --bs-gutter-x: 3rem; + } + .g-lg-5, + .gy-lg-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1200px) { + .col-xl { + flex: 1 0 0%; + } + .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.33333333%; + } + .offset-xl-2 { + margin-left: 16.66666667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.33333333%; + } + .offset-xl-5 { + margin-left: 41.66666667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.33333333%; + } + .offset-xl-8 { + margin-left: 66.66666667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.33333333%; + } + .offset-xl-11 { + margin-left: 91.66666667%; + } + .g-xl-0, + .gx-xl-0 { + --bs-gutter-x: 0; + } + .g-xl-0, + .gy-xl-0 { + --bs-gutter-y: 0; + } + .g-xl-1, + .gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xl-1, + .gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xl-2, + .gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xl-2, + .gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xl-3, + .gx-xl-3 { + --bs-gutter-x: 1rem; + } + .g-xl-3, + .gy-xl-3 { + --bs-gutter-y: 1rem; + } + .g-xl-4, + .gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xl-4, + .gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xl-5, + .gx-xl-5 { + --bs-gutter-x: 3rem; + } + .g-xl-5, + .gy-xl-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1400px) { + .col-xxl { + flex: 1 0 0%; + } + .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + .offset-xxl-0 { + margin-left: 0; + } + .offset-xxl-1 { + margin-left: 8.33333333%; + } + .offset-xxl-2 { + margin-left: 16.66666667%; + } + .offset-xxl-3 { + margin-left: 25%; + } + .offset-xxl-4 { + margin-left: 33.33333333%; + } + .offset-xxl-5 { + margin-left: 41.66666667%; + } + .offset-xxl-6 { + margin-left: 50%; + } + .offset-xxl-7 { + margin-left: 58.33333333%; + } + .offset-xxl-8 { + margin-left: 66.66666667%; + } + .offset-xxl-9 { + margin-left: 75%; + } + .offset-xxl-10 { + margin-left: 83.33333333%; + } + .offset-xxl-11 { + margin-left: 91.66666667%; + } + .g-xxl-0, + .gx-xxl-0 { + --bs-gutter-x: 0; + } + .g-xxl-0, + .gy-xxl-0 { + --bs-gutter-y: 0; + } + .g-xxl-1, + .gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + .g-xxl-1, + .gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + .g-xxl-2, + .gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + .g-xxl-2, + .gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + .g-xxl-3, + .gx-xxl-3 { + --bs-gutter-x: 1rem; + } + .g-xxl-3, + .gy-xxl-3 { + --bs-gutter-y: 1rem; + } + .g-xxl-4, + .gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + .g-xxl-4, + .gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + .g-xxl-5, + .gx-xxl-5 { + --bs-gutter-x: 3rem; + } + .g-xxl-5, + .gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} +.table { + --bs-table-color: var(--bs-body-color); + --bs-table-bg: transparent; + --bs-table-border-color: var(--bs-border-color); + --bs-table-accent-bg: transparent; + --bs-table-striped-color: var(--bs-body-color); + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: var(--bs-body-color); + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: var(--bs-body-color); + --bs-table-hover-bg: rgba(0, 0, 0, 0.075); + width: 100%; + margin-bottom: 1rem; + color: var(--bs-table-color); + vertical-align: top; + border-color: var(--bs-table-border-color); +} +.table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} +.table > tbody { + vertical-align: inherit; +} +.table > thead { + vertical-align: bottom; +} + +.table-group-divider { + border-top: 2px solid currentcolor; +} + +.caption-top { + caption-side: top; +} + +.table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} + +.table-bordered > :not(caption) > * { + border-width: 1px 0; +} +.table-bordered > :not(caption) > * > * { + border-width: 0 1px; +} + +.table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} +.table-borderless > :not(:first-child) { + border-top-width: 0; +} + +.table-striped > tbody > tr:nth-of-type(odd) > * { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} + +.table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} + +.table-hover > tbody > tr:hover > * { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} + +.table-primary { + --bs-table-color: #000; + --bs-table-bg: rgb(206.6, 226, 254.6); + --bs-table-border-color: rgb(185.94, 203.4, 229.14); + --bs-table-striped-bg: rgb(196.27, 214.7, 241.87); + --bs-table-striped-color: #000; + --bs-table-active-bg: rgb(185.94, 203.4, 229.14); + --bs-table-active-color: #000; + --bs-table-hover-bg: rgb(191.105, 209.05, 235.505); + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-secondary { + --bs-table-color: #000; + --bs-table-bg: rgb(225.6, 227.4, 229); + --bs-table-border-color: rgb(203.04, 204.66, 206.1); + --bs-table-striped-bg: rgb(214.32, 216.03, 217.55); + --bs-table-striped-color: #000; + --bs-table-active-bg: rgb(203.04, 204.66, 206.1); + --bs-table-active-color: #000; + --bs-table-hover-bg: rgb(208.68, 210.345, 211.825); + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-success { + --bs-table-color: #000; + --bs-table-bg: rgb(209, 231, 220.8); + --bs-table-border-color: rgb(188.1, 207.9, 198.72); + --bs-table-striped-bg: rgb(198.55, 219.45, 209.76); + --bs-table-striped-color: #000; + --bs-table-active-bg: rgb(188.1, 207.9, 198.72); + --bs-table-active-color: #000; + --bs-table-hover-bg: rgb(193.325, 213.675, 204.24); + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-info { + --bs-table-color: #000; + --bs-table-bg: rgb(206.6, 244.4, 252); + --bs-table-border-color: rgb(185.94, 219.96, 226.8); + --bs-table-striped-bg: rgb(196.27, 232.18, 239.4); + --bs-table-striped-color: #000; + --bs-table-active-bg: rgb(185.94, 219.96, 226.8); + --bs-table-active-color: #000; + --bs-table-hover-bg: rgb(191.105, 226.07, 233.1); + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-warning { + --bs-table-color: #000; + --bs-table-bg: rgb(255, 242.6, 205.4); + --bs-table-border-color: rgb(229.5, 218.34, 184.86); + --bs-table-striped-bg: rgb(242.25, 230.47, 195.13); + --bs-table-striped-color: #000; + --bs-table-active-bg: rgb(229.5, 218.34, 184.86); + --bs-table-active-color: #000; + --bs-table-hover-bg: rgb(235.875, 224.405, 189.995); + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-danger { + --bs-table-color: #000; + --bs-table-bg: rgb(248, 214.6, 217.8); + --bs-table-border-color: rgb(223.2, 193.14, 196.02); + --bs-table-striped-bg: rgb(235.6, 203.87, 206.91); + --bs-table-striped-color: #000; + --bs-table-active-bg: rgb(223.2, 193.14, 196.02); + --bs-table-active-color: #000; + --bs-table-hover-bg: rgb(229.4, 198.505, 201.465); + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-light { + --bs-table-color: #000; + --bs-table-bg: #f8f9fa; + --bs-table-border-color: rgb(223.2, 224.1, 225); + --bs-table-striped-bg: rgb(235.6, 236.55, 237.5); + --bs-table-striped-color: #000; + --bs-table-active-bg: rgb(223.2, 224.1, 225); + --bs-table-active-color: #000; + --bs-table-hover-bg: rgb(229.4, 230.325, 231.25); + --bs-table-hover-color: #000; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-dark { + --bs-table-color: #fff; + --bs-table-bg: #212529; + --bs-table-border-color: rgb(55.2, 58.8, 62.4); + --bs-table-striped-bg: rgb(44.1, 47.9, 51.7); + --bs-table-striped-color: #fff; + --bs-table-active-bg: rgb(55.2, 58.8, 62.4); + --bs-table-active-color: #fff; + --bs-table-hover-bg: rgb(49.65, 53.35, 57.05); + --bs-table-hover-color: #fff; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); +} + +.table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} + +@media (max-width: 575.98px) { + .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 767.98px) { + .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 991.98px) { + .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1199.98px) { + .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1399.98px) { + .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +.form-label { + margin-bottom: 0.5rem; +} + +.col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; +} + +.col-form-label-lg { + padding-top: calc(0.5rem + 1px); + padding-bottom: calc(0.5rem + 1px); + font-size: 1.25rem; +} + +.col-form-label-sm { + padding-top: calc(0.25rem + 1px); + padding-bottom: calc(0.25rem + 1px); + font-size: 0.875rem; +} + +.form-text { + margin-top: 0.25rem; + font-size: 0.875em; + color: #6c757d; +} + +.form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + appearance: none; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-control { + transition: none; + } +} +.form-control[type=file] { + overflow: hidden; +} +.form-control[type=file]:not(:disabled):not([readonly]) { + cursor: pointer; +} +.form-control:focus { + color: #212529; + background-color: #fff; + border-color: rgb(134, 182.5, 254); + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.form-control::-webkit-date-and-time-value { + height: 1.5em; +} +.form-control::placeholder { + color: #6c757d; + opacity: 1; +} +.form-control:disabled { + background-color: #e9ecef; + opacity: 1; +} +.form-control::file-selector-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + margin-inline-end: 0.75rem; + color: #212529; + background-color: #e9ecef; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-control::file-selector-button { + transition: none; + } +} +.form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: rgb(221.35, 224.2, 227.05); +} + +.form-control-plaintext { + display: block; + width: 100%; + padding: 0.375rem 0; + margin-bottom: 0; + line-height: 1.5; + color: #212529; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} +.form-control-plaintext:focus { + outline: 0; +} +.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg { + padding-right: 0; + padding-left: 0; +} + +.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} +.form-control-sm::file-selector-button { + padding: 0.25rem 0.5rem; + margin: -0.25rem -0.5rem; + margin-inline-end: 0.5rem; +} + +.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} +.form-control-lg::file-selector-button { + padding: 0.5rem 1rem; + margin: -0.5rem -1rem; + margin-inline-end: 1rem; +} + +textarea.form-control { + min-height: calc(1.5em + 0.75rem + 2px); +} +textarea.form-control-sm { + min-height: calc(1.5em + 0.5rem + 2px); +} +textarea.form-control-lg { + min-height: calc(1.5em + 1rem + 2px); +} + +.form-control-color { + width: 3rem; + height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem; +} +.form-control-color:not(:disabled):not([readonly]) { + cursor: pointer; +} +.form-control-color::-moz-color-swatch { + border: 0 !important; + border-radius: 0.375rem; +} +.form-control-color::-webkit-color-swatch { + border-radius: 0.375rem; +} +.form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); +} +.form-control-color.form-control-lg { + height: calc(1.5em + 1rem + 2px); +} + +.form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: 0.375rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-select { + transition: none; + } +} +.form-select:focus { + border-color: rgb(134, 182.5, 254); + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.form-select[multiple], .form-select[size]:not([size="1"]) { + padding-right: 0.75rem; + background-image: none; +} +.form-select:disabled { + background-color: #e9ecef; +} +.form-select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #212529; +} + +.form-select-sm { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + padding-left: 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.form-select-lg { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.form-check { + display: block; + min-height: 1.5rem; + padding-left: 1.5em; + margin-bottom: 0.125rem; +} +.form-check .form-check-input { + float: left; + margin-left: -1.5em; +} + +.form-check-reverse { + padding-right: 1.5em; + padding-left: 0; + text-align: right; +} +.form-check-reverse .form-check-input { + float: right; + margin-right: -1.5em; + margin-left: 0; +} + +.form-check-input { + width: 1em; + height: 1em; + margin-top: 0.25em; + vertical-align: top; + background-color: #fff; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: 1px solid rgba(0, 0, 0, 0.25); + appearance: none; + print-color-adjust: exact; +} +.form-check-input[type=checkbox] { + border-radius: 0.25em; +} +.form-check-input[type=radio] { + border-radius: 50%; +} +.form-check-input:active { + filter: brightness(90%); +} +.form-check-input:focus { + border-color: rgb(134, 182.5, 254); + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.form-check-input:checked { + background-color: #0d6efd; + border-color: #0d6efd; +} +.form-check-input:checked[type=checkbox] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); +} +.form-check-input:checked[type=radio] { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); +} +.form-check-input[type=checkbox]:indeterminate { + background-color: #0d6efd; + border-color: #0d6efd; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); +} +.form-check-input:disabled { + pointer-events: none; + filter: none; + opacity: 0.5; +} +.form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { + cursor: default; + opacity: 0.5; +} + +.form-switch { + padding-left: 2.5em; +} +.form-switch .form-check-input { + width: 2em; + margin-left: -2.5em; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + background-position: left center; + border-radius: 2em; + transition: background-position 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-switch .form-check-input { + transition: none; + } +} +.form-switch .form-check-input:focus { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgb%28134, 182.5, 254%29'/%3e%3c/svg%3e"); +} +.form-switch .form-check-input:checked { + background-position: right center; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} +.form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} +.form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} + +.form-check-inline { + display: inline-block; + margin-right: 1rem; +} + +.btn-check { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.btn-check[disabled] + .btn, .btn-check:disabled + .btn { + pointer-events: none; + filter: none; + opacity: 0.65; +} + +.form-range { + width: 100%; + height: 1.5rem; + padding: 0; + background-color: transparent; + appearance: none; +} +.form-range:focus { + outline: 0; +} +.form-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.form-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.form-range::-moz-focus-outer { + border: 0; +} +.form-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-range::-webkit-slider-thumb { + transition: none; + } +} +.form-range::-webkit-slider-thumb:active { + background-color: rgb(182.4, 211.5, 254.4); +} +.form-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} +.form-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #0d6efd; + border: 0; + border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .form-range::-moz-range-thumb { + transition: none; + } +} +.form-range::-moz-range-thumb:active { + background-color: rgb(182.4, 211.5, 254.4); +} +.form-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} +.form-range:disabled { + pointer-events: none; +} +.form-range:disabled::-webkit-slider-thumb { + background-color: #adb5bd; +} +.form-range:disabled::-moz-range-thumb { + background-color: #adb5bd; +} + +.form-floating { + position: relative; +} +.form-floating > .form-control, +.form-floating > .form-control-plaintext, +.form-floating > .form-select { + height: calc(3.5rem + 2px); + line-height: 1.25; +} +.form-floating > label { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 1rem 0.75rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + pointer-events: none; + border: 1px solid transparent; + transform-origin: 0 0; + transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .form-floating > label { + transition: none; + } +} +.form-floating > .form-control, +.form-floating > .form-control-plaintext { + padding: 1rem 0.75rem; +} +.form-floating > .form-control::placeholder, +.form-floating > .form-control-plaintext::placeholder { + color: transparent; +} +.form-floating > .form-control:focus, .form-floating > .form-control:not(:placeholder-shown), +.form-floating > .form-control-plaintext:focus, +.form-floating > .form-control-plaintext:not(:placeholder-shown) { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control:-webkit-autofill, +.form-floating > .form-control-plaintext:-webkit-autofill { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-select { + padding-top: 1.625rem; + padding-bottom: 0.625rem; +} +.form-floating > .form-control:focus ~ label, +.form-floating > .form-control:not(:placeholder-shown) ~ label, +.form-floating > .form-control-plaintext ~ label, +.form-floating > .form-select ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control:-webkit-autofill ~ label { + opacity: 0.65; + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); +} +.form-floating > .form-control-plaintext ~ label { + border-width: 1px 0; +} + +.input-group { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: stretch; + width: 100%; +} +.input-group > .form-control, +.input-group > .form-select, +.input-group > .form-floating { + position: relative; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} +.input-group > .form-control:focus, +.input-group > .form-select:focus, +.input-group > .form-floating:focus-within { + z-index: 3; +} +.input-group .btn { + position: relative; + z-index: 2; +} +.input-group .btn:focus { + z-index: 3; +} + +.input-group-text { + display: flex; + align-items: center; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: center; + white-space: nowrap; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0.375rem; +} + +.input-group-lg > .form-control, +.input-group-lg > .form-select, +.input-group-lg > .input-group-text, +.input-group-lg > .btn { + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.5rem; +} + +.input-group-sm > .form-control, +.input-group-sm > .form-select, +.input-group-sm > .input-group-text, +.input-group-sm > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.25rem; +} + +.input-group-lg > .form-select, +.input-group-sm > .form-select { + padding-right: 3rem; +} + +.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), +.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), +.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control, +.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), +.input-group.has-validation > .dropdown-toggle:nth-last-child(n+4), +.input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-control, +.input-group.has-validation > .form-floating:nth-last-child(n+3) > .form-select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group > :not(:first-child):not(.dropdown-menu):not(.form-floating):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback), +.input-group > .form-floating:not(:first-child) > .form-control, +.input-group > .form-floating:not(:first-child) > .form-select { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #198754; +} + +.valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(25, 135, 84, 0.9); + border-radius: 0.375rem; +} + +.was-validated :valid ~ .valid-feedback, +.was-validated :valid ~ .valid-tooltip, +.is-valid ~ .valid-feedback, +.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated .form-control:valid, .form-control.is-valid { + border-color: #198754; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.was-validated .form-control:valid:focus, .form-control.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.was-validated textarea.form-control:valid, textarea.form-control.is-valid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.was-validated .form-select:valid, .form-select.is-valid { + border-color: #198754; +} +.was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.was-validated .form-select:valid:focus, .form-select.is-valid:focus { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} + +.was-validated .form-control-color:valid, .form-control-color.is-valid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.was-validated .form-check-input:valid, .form-check-input.is-valid { + border-color: #198754; +} +.was-validated .form-check-input:valid:checked, .form-check-input.is-valid:checked { + background-color: #198754; +} +.was-validated .form-check-input:valid:focus, .form-check-input.is-valid:focus { + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} +.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label { + color: #198754; +} + +.form-check-inline .form-check-input ~ .valid-feedback { + margin-left: 0.5em; +} + +.was-validated .input-group .form-control:valid, .input-group .form-control.is-valid, +.was-validated .input-group .form-select:valid, +.input-group .form-select.is-valid { + z-index: 1; +} +.was-validated .input-group .form-control:valid:focus, .input-group .form-control.is-valid:focus, +.was-validated .input-group .form-select:valid:focus, +.input-group .form-select.is-valid:focus { + z-index: 3; +} + +.invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 0.875em; + color: #dc3545; +} + +.invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: 0.1rem; + font-size: 0.875rem; + color: #fff; + background-color: rgba(220, 53, 69, 0.9); + border-radius: 0.375rem; +} + +.was-validated :invalid ~ .invalid-feedback, +.was-validated :invalid ~ .invalid-tooltip, +.is-invalid ~ .invalid-feedback, +.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .form-control:invalid, .form-control.is-invalid { + border-color: #dc3545; + padding-right: calc(1.5em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { + padding-right: calc(1.5em + 0.75rem); + background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); +} + +.was-validated .form-select:invalid, .form-select.is-invalid { + border-color: #dc3545; +} +.was-validated .form-select:invalid:not([multiple]):not([size]), .was-validated .form-select:invalid:not([multiple])[size="1"], .form-select.is-invalid:not([multiple]):not([size]), .form-select.is-invalid:not([multiple])[size="1"] { + padding-right: 4.125rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); +} +.was-validated .form-select:invalid:focus, .form-select.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} + +.was-validated .form-control-color:invalid, .form-control-color.is-invalid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} + +.was-validated .form-check-input:invalid, .form-check-input.is-invalid { + border-color: #dc3545; +} +.was-validated .form-check-input:invalid:checked, .form-check-input.is-invalid:checked { + background-color: #dc3545; +} +.was-validated .form-check-input:invalid:focus, .form-check-input.is-invalid:focus { + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} +.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label { + color: #dc3545; +} + +.form-check-inline .form-check-input ~ .invalid-feedback { + margin-left: 0.5em; +} + +.was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid, +.was-validated .input-group .form-select:invalid, +.input-group .form-select.is-invalid { + z-index: 2; +} +.was-validated .input-group .form-control:invalid:focus, .input-group .form-control.is-invalid:focus, +.was-validated .input-group .form-select:invalid:focus, +.input-group .form-select.is-invalid:focus { + z-index: 3; +} + +.btn { + --bs-btn-padding-x: 0.75rem; + --bs-btn-padding-y: 0.375rem; + --bs-btn-font-family: ; + --bs-btn-font-size: 1rem; + --bs-btn-font-weight: 400; + --bs-btn-line-height: 1.5; + --bs-btn-color: #212529; + --bs-btn-bg: transparent; + --bs-btn-border-width: 1px; + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 0.375rem; + --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); + --bs-btn-disabled-opacity: 0.65; + --bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5); + display: inline-block; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + user-select: none; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .btn { + transition: none; + } +} +.btn:hover { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); +} +.btn-check:focus + .btn, .btn:focus { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} +.btn-check:checked + .btn, .btn-check:active + .btn, .btn:active, .btn.active, .btn.show { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); +} +.btn-check:checked + .btn:focus, .btn-check:active + .btn:focus, .btn:active:focus, .btn.active:focus, .btn.show:focus { + box-shadow: var(--bs-btn-focus-box-shadow); +} +.btn:disabled, .btn.disabled, fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); + pointer-events: none; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); +} + +.btn-primary { + --bs-btn-color: #fff; + --bs-btn-bg: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: rgb(11.05, 93.5, 215.05); + --bs-btn-hover-border-color: rgb(10.4, 88, 202.4); + --bs-btn-focus-shadow-rgb: 49, 132, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: rgb(10.4, 88, 202.4); + --bs-btn-active-border-color: rgb(9.75, 82.5, 189.75); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #0d6efd; + --bs-btn-disabled-border-color: #0d6efd; +} + +.btn-secondary { + --bs-btn-color: #fff; + --bs-btn-bg: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: rgb(91.8, 99.45, 106.25); + --bs-btn-hover-border-color: rgb(86.4, 93.6, 100); + --bs-btn-focus-shadow-rgb: 130, 138, 145; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: rgb(86.4, 93.6, 100); + --bs-btn-active-border-color: rgb(81, 87.75, 93.75); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #6c757d; + --bs-btn-disabled-border-color: #6c757d; +} + +.btn-success { + --bs-btn-color: #fff; + --bs-btn-bg: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: rgb(21.25, 114.75, 71.4); + --bs-btn-hover-border-color: rgb(20, 108, 67.2); + --bs-btn-focus-shadow-rgb: 60, 153, 110; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: rgb(20, 108, 67.2); + --bs-btn-active-border-color: rgb(18.75, 101.25, 63); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #198754; + --bs-btn-disabled-border-color: #198754; +} + +.btn-info { + --bs-btn-color: #000; + --bs-btn-bg: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: rgb(49.3, 209.95, 242.25); + --bs-btn-hover-border-color: rgb(37.2, 207.3, 241.5); + --bs-btn-focus-shadow-rgb: 11, 172, 204; + --bs-btn-active-color: #000; + --bs-btn-active-bg: rgb(61.4, 212.6, 243); + --bs-btn-active-border-color: rgb(37.2, 207.3, 241.5); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #0dcaf0; + --bs-btn-disabled-border-color: #0dcaf0; +} + +.btn-warning { + --bs-btn-color: #000; + --bs-btn-bg: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: rgb(255, 202.3, 44.2); + --bs-btn-hover-border-color: rgb(255, 199.2, 31.8); + --bs-btn-focus-shadow-rgb: 217, 164, 6; + --bs-btn-active-color: #000; + --bs-btn-active-bg: rgb(255, 205.4, 56.6); + --bs-btn-active-border-color: rgb(255, 199.2, 31.8); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #ffc107; + --bs-btn-disabled-border-color: #ffc107; +} + +.btn-danger { + --bs-btn-color: #fff; + --bs-btn-bg: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: rgb(187, 45.05, 58.65); + --bs-btn-hover-border-color: rgb(176, 42.4, 55.2); + --bs-btn-focus-shadow-rgb: 225, 83, 97; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: rgb(176, 42.4, 55.2); + --bs-btn-active-border-color: rgb(165, 39.75, 51.75); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #dc3545; + --bs-btn-disabled-border-color: #dc3545; +} + +.btn-light { + --bs-btn-color: #000; + --bs-btn-bg: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: rgb(210.8, 211.65, 212.5); + --bs-btn-hover-border-color: rgb(198.4, 199.2, 200); + --bs-btn-focus-shadow-rgb: 211, 212, 213; + --bs-btn-active-color: #000; + --bs-btn-active-bg: rgb(198.4, 199.2, 200); + --bs-btn-active-border-color: rgb(186, 186.75, 187.5); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #000; + --bs-btn-disabled-bg: #f8f9fa; + --bs-btn-disabled-border-color: #f8f9fa; +} + +.btn-dark { + --bs-btn-color: #fff; + --bs-btn-bg: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: rgb(66.3, 69.7, 73.1); + --bs-btn-hover-border-color: rgb(55.2, 58.8, 62.4); + --bs-btn-focus-shadow-rgb: 66, 70, 73; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: rgb(77.4, 80.6, 83.8); + --bs-btn-active-border-color: rgb(55.2, 58.8, 62.4); + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #212529; + --bs-btn-disabled-border-color: #212529; +} + +.btn-outline-primary { + --bs-btn-color: #0d6efd; + --bs-btn-border-color: #0d6efd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #0d6efd; + --bs-btn-hover-border-color: #0d6efd; + --bs-btn-focus-shadow-rgb: 13, 110, 253; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #0d6efd; + --bs-btn-active-border-color: #0d6efd; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0d6efd; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0d6efd; + --bs-gradient: none; +} + +.btn-outline-secondary { + --bs-btn-color: #6c757d; + --bs-btn-border-color: #6c757d; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #6c757d; + --bs-btn-hover-border-color: #6c757d; + --bs-btn-focus-shadow-rgb: 108, 117, 125; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #6c757d; + --bs-btn-active-border-color: #6c757d; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #6c757d; + --bs-gradient: none; +} + +.btn-outline-success { + --bs-btn-color: #198754; + --bs-btn-border-color: #198754; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #198754; + --bs-btn-hover-border-color: #198754; + --bs-btn-focus-shadow-rgb: 25, 135, 84; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #198754; + --bs-btn-active-border-color: #198754; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #198754; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #198754; + --bs-gradient: none; +} + +.btn-outline-info { + --bs-btn-color: #0dcaf0; + --bs-btn-border-color: #0dcaf0; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #0dcaf0; + --bs-btn-hover-border-color: #0dcaf0; + --bs-btn-focus-shadow-rgb: 13, 202, 240; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #0dcaf0; + --bs-btn-active-border-color: #0dcaf0; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #0dcaf0; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #0dcaf0; + --bs-gradient: none; +} + +.btn-outline-warning { + --bs-btn-color: #ffc107; + --bs-btn-border-color: #ffc107; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #ffc107; + --bs-btn-hover-border-color: #ffc107; + --bs-btn-focus-shadow-rgb: 255, 193, 7; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #ffc107; + --bs-btn-active-border-color: #ffc107; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #ffc107; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #ffc107; + --bs-gradient: none; +} + +.btn-outline-danger { + --bs-btn-color: #dc3545; + --bs-btn-border-color: #dc3545; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #dc3545; + --bs-btn-hover-border-color: #dc3545; + --bs-btn-focus-shadow-rgb: 220, 53, 69; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #dc3545; + --bs-btn-active-border-color: #dc3545; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #dc3545; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #dc3545; + --bs-gradient: none; +} + +.btn-outline-light { + --bs-btn-color: #f8f9fa; + --bs-btn-border-color: #f8f9fa; + --bs-btn-hover-color: #000; + --bs-btn-hover-bg: #f8f9fa; + --bs-btn-hover-border-color: #f8f9fa; + --bs-btn-focus-shadow-rgb: 248, 249, 250; + --bs-btn-active-color: #000; + --bs-btn-active-bg: #f8f9fa; + --bs-btn-active-border-color: #f8f9fa; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f8f9fa; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f8f9fa; + --bs-gradient: none; +} + +.btn-outline-dark { + --bs-btn-color: #212529; + --bs-btn-border-color: #212529; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #212529; + --bs-btn-hover-border-color: #212529; + --bs-btn-focus-shadow-rgb: 33, 37, 41; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #212529; + --bs-btn-active-border-color: #212529; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #212529; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #212529; + --bs-gradient: none; +} + +.btn-link { + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #6c757d; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: none; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + text-decoration: underline; +} +.btn-link:focus { + color: var(--bs-btn-color); +} +.btn-link:hover { + color: var(--bs-btn-hover-color); +} + +.btn-lg, .btn-group-lg > .btn { + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.25rem; + --bs-btn-border-radius: 0.5rem; +} + +.btn-sm, .btn-group-sm > .btn { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.875rem; + --bs-btn-border-radius: 0.25rem; +} + +.fade { + transition: opacity 0.15s linear; +} +@media (prefers-reduced-motion: reduce) { + .fade { + transition: none; + } +} +.fade:not(.show) { + opacity: 0; +} + +.collapse:not(.show) { + display: none; +} + +.collapsing { + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} +@media (prefers-reduced-motion: reduce) { + .collapsing { + transition: none; + } +} +.collapsing.collapse-horizontal { + width: 0; + height: auto; + transition: width 0.35s ease; +} +@media (prefers-reduced-motion: reduce) { + .collapsing.collapse-horizontal { + transition: none; + } +} + +.dropup, +.dropend, +.dropdown, +.dropstart, +.dropup-center, +.dropdown-center { + position: relative; +} + +.dropdown-toggle { + white-space: nowrap; +} +.dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} +.dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropdown-menu { + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 1rem; + --bs-dropdown-color: #212529; + --bs-dropdown-bg: #fff; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-border-radius: 0.375rem; + --bs-dropdown-border-width: 1px; + --bs-dropdown-inner-border-radius: calc(0.375rem - 1px); + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: #212529; + --bs-dropdown-link-hover-color: rgb(29.7, 33.3, 36.9); + --bs-dropdown-link-hover-bg: #e9ecef; + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 0.25rem; + --bs-dropdown-header-color: #6c757d; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; + position: absolute; + z-index: 1000; + display: none; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); + margin: 0; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); + text-align: left; + list-style: none; + background-color: var(--bs-dropdown-bg); + background-clip: padding-box; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); +} +.dropdown-menu[data-bs-popper] { + top: 100%; + left: 0; + margin-top: var(--bs-dropdown-spacer); +} + +.dropdown-menu-start { + --bs-position: start; +} +.dropdown-menu-start[data-bs-popper] { + right: auto; + left: 0; +} + +.dropdown-menu-end { + --bs-position: end; +} +.dropdown-menu-end[data-bs-popper] { + right: 0; + left: auto; +} + +@media (min-width: 576px) { + .dropdown-menu-sm-start { + --bs-position: start; + } + .dropdown-menu-sm-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-sm-end { + --bs-position: end; + } + .dropdown-menu-sm-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 768px) { + .dropdown-menu-md-start { + --bs-position: start; + } + .dropdown-menu-md-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-md-end { + --bs-position: end; + } + .dropdown-menu-md-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 992px) { + .dropdown-menu-lg-start { + --bs-position: start; + } + .dropdown-menu-lg-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-lg-end { + --bs-position: end; + } + .dropdown-menu-lg-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 1200px) { + .dropdown-menu-xl-start { + --bs-position: start; + } + .dropdown-menu-xl-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-xl-end { + --bs-position: end; + } + .dropdown-menu-xl-end[data-bs-popper] { + right: 0; + left: auto; + } +} +@media (min-width: 1400px) { + .dropdown-menu-xxl-start { + --bs-position: start; + } + .dropdown-menu-xxl-start[data-bs-popper] { + right: auto; + left: 0; + } + .dropdown-menu-xxl-end { + --bs-position: end; + } + .dropdown-menu-xxl-end[data-bs-popper] { + right: 0; + left: auto; + } +} +.dropup .dropdown-menu[data-bs-popper] { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: var(--bs-dropdown-spacer); +} +.dropup .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} +.dropup .dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropend .dropdown-menu[data-bs-popper] { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: var(--bs-dropdown-spacer); +} +.dropend .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} +.dropend .dropdown-toggle:empty::after { + margin-left: 0; +} +.dropend .dropdown-toggle::after { + vertical-align: 0; +} + +.dropstart .dropdown-menu[data-bs-popper] { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: var(--bs-dropdown-spacer); +} +.dropstart .dropdown-toggle::after { + display: inline-block; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; +} +.dropstart .dropdown-toggle::after { + display: none; +} +.dropstart .dropdown-toggle::before { + display: inline-block; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} +.dropstart .dropdown-toggle:empty::after { + margin-left: 0; +} +.dropstart .dropdown-toggle::before { + vertical-align: 0; +} + +.dropdown-divider { + height: 0; + margin: var(--bs-dropdown-divider-margin-y) 0; + overflow: hidden; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; +} + +.dropdown-item { + display: block; + width: 100%; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + clear: both; + font-weight: 400; + color: var(--bs-dropdown-link-color); + text-align: inherit; + text-decoration: none; + white-space: nowrap; + background-color: transparent; + border: 0; +} +.dropdown-item:hover, .dropdown-item:focus { + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); +} +.dropdown-item.active, .dropdown-item:active { + color: var(--bs-dropdown-link-active-color); + text-decoration: none; + background-color: var(--bs-dropdown-link-active-bg); +} +.dropdown-item.disabled, .dropdown-item:disabled { + color: var(--bs-dropdown-link-disabled-color); + pointer-events: none; + background-color: transparent; +} + +.dropdown-menu.show { + display: block; +} + +.dropdown-header { + display: block; + padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x); + margin-bottom: 0; + font-size: 0.875rem; + color: var(--bs-dropdown-header-color); + white-space: nowrap; +} + +.dropdown-item-text { + display: block; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); +} + +.dropdown-menu-dark { + --bs-dropdown-color: #dee2e6; + --bs-dropdown-bg: #343a40; + --bs-dropdown-border-color: var(--bs-border-color-translucent); + --bs-dropdown-box-shadow: ; + --bs-dropdown-link-color: #dee2e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: var(--bs-border-color-translucent); + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #0d6efd; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; +} + +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + flex: 1 1 auto; +} +.btn-group > .btn-check:checked + .btn, +.btn-group > .btn-check:focus + .btn, +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn-check:checked + .btn, +.btn-group-vertical > .btn-check:focus + .btn, +.btn-group-vertical > .btn:hover, +.btn-group-vertical > .btn:focus, +.btn-group-vertical > .btn:active, +.btn-group-vertical > .btn.active { + z-index: 1; +} + +.btn-toolbar { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; +} +.btn-toolbar .input-group { + width: auto; +} + +.btn-group { + border-radius: 0.375rem; +} +.btn-group > .btn:not(:first-child), +.btn-group > .btn-group:not(:first-child) { + margin-left: -1px; +} +.btn-group > .btn:not(:last-child):not(.dropdown-toggle), +.btn-group > .btn.dropdown-toggle-split:first-child, +.btn-group > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:nth-child(n+3), +.btn-group > :not(.btn-check) + .btn, +.btn-group > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.dropdown-toggle-split { + padding-right: 0.5625rem; + padding-left: 0.5625rem; +} +.dropdown-toggle-split::after, .dropup .dropdown-toggle-split::after, .dropend .dropdown-toggle-split::after { + margin-left: 0; +} +.dropstart .dropdown-toggle-split::before { + margin-right: 0; +} + +.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} + +.btn-group-vertical { + flex-direction: column; + align-items: flex-start; + justify-content: center; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group { + width: 100%; +} +.btn-group-vertical > .btn:not(:first-child), +.btn-group-vertical > .btn-group:not(:first-child) { + margin-top: -1px; +} +.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), +.btn-group-vertical > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn ~ .btn, +.btn-group-vertical > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.nav { + --bs-nav-link-padding-x: 1rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.nav-link { + display: block; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .nav-link { + transition: none; + } +} +.nav-link:hover, .nav-link:focus { + color: var(--bs-nav-link-hover-color); +} +.nav-link.disabled { + color: var(--bs-nav-link-disabled-color); + pointer-events: none; + cursor: default; +} + +.nav-tabs { + --bs-nav-tabs-border-width: 1px; + --bs-nav-tabs-border-color: #dee2e6; + --bs-nav-tabs-border-radius: 0.375rem; + --bs-nav-tabs-link-hover-border-color: #e9ecef #e9ecef #dee2e6; + --bs-nav-tabs-link-active-color: #495057; + --bs-nav-tabs-link-active-bg: #fff; + --bs-nav-tabs-link-active-border-color: #dee2e6 #dee2e6 #fff; + border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color); +} +.nav-tabs .nav-link { + margin-bottom: calc(var(--bs-nav-tabs-border-width) * -1); + background: none; + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); +} +.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { + isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); +} +.nav-tabs .nav-link.disabled, .nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} +.nav-tabs .nav-link.active, +.nav-tabs .nav-item.show .nav-link { + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); +} +.nav-tabs .dropdown-menu { + margin-top: calc(var(--bs-nav-tabs-border-width) * -1); + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.nav-pills { + --bs-nav-pills-border-radius: 0.375rem; + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #0d6efd; +} +.nav-pills .nav-link { + background: none; + border: 0; + border-radius: var(--bs-nav-pills-border-radius); +} +.nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; +} +.nav-pills .nav-link.active, +.nav-pills .show > .nav-link { + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); +} + +.nav-fill > .nav-link, +.nav-fill .nav-item { + flex: 1 1 auto; + text-align: center; +} + +.nav-justified > .nav-link, +.nav-justified .nav-item { + flex-basis: 0; + flex-grow: 1; + text-align: center; +} + +.nav-fill .nav-item .nav-link, +.nav-justified .nav-item .nav-link { + width: 100%; +} + +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} + +.navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 0.5rem; + --bs-navbar-color: rgba(0, 0, 0, 0.55); + --bs-navbar-hover-color: rgba(0, 0, 0, 0.7); + --bs-navbar-disabled-color: rgba(0, 0, 0, 0.3); + --bs-navbar-active-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-padding-y: 0.3125rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.25rem; + --bs-navbar-brand-color: rgba(0, 0, 0, 0.9); + --bs-navbar-brand-hover-color: rgba(0, 0, 0, 0.9); + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.25rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.1); + --bs-navbar-toggler-border-radius: 0.375rem; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); +} +.navbar > .container, +.navbar > .container-fluid, +.navbar > .container-sm, +.navbar > .container-md, +.navbar > .container-lg, +.navbar > .container-xl, +.navbar > .container-xxl { + display: flex; + flex-wrap: inherit; + align-items: center; + justify-content: space-between; +} +.navbar-brand { + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); + text-decoration: none; + white-space: nowrap; +} +.navbar-brand:hover, .navbar-brand:focus { + color: var(--bs-navbar-brand-hover-color); +} + +.navbar-nav { + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.navbar-nav .show > .nav-link, +.navbar-nav .nav-link.active { + color: var(--bs-navbar-active-color); +} +.navbar-nav .dropdown-menu { + position: static; +} + +.navbar-text { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} +.navbar-text a, +.navbar-text a:hover, +.navbar-text a:focus { + color: var(--bs-navbar-active-color); +} + +.navbar-collapse { + flex-basis: 100%; + flex-grow: 1; + align-items: center; +} + +.navbar-toggler { + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); + line-height: 1; + color: var(--bs-navbar-color); + background-color: transparent; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + transition: var(--bs-navbar-toggler-transition); +} +@media (prefers-reduced-motion: reduce) { + .navbar-toggler { + transition: none; + } +} +.navbar-toggler:hover { + text-decoration: none; +} +.navbar-toggler:focus { + text-decoration: none; + outline: 0; + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); +} + +.navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; +} + +.navbar-nav-scroll { + max-height: var(--bs-scroll-height, 75vh); + overflow-y: auto; +} + +@media (min-width: 576px) { + .navbar-expand-sm { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-sm .navbar-nav { + flex-direction: row; + } + .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-sm .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-sm .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-sm .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-sm .navbar-toggler { + display: none; + } + .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-sm .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-sm .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 768px) { + .navbar-expand-md { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-md .navbar-nav { + flex-direction: row; + } + .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-md .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-md .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-md .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-md .navbar-toggler { + display: none; + } + .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-md .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-md .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 992px) { + .navbar-expand-lg { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-lg .navbar-nav { + flex-direction: row; + } + .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-lg .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-lg .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-lg .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-lg .navbar-toggler { + display: none; + } + .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-lg .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-lg .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 1200px) { + .navbar-expand-xl { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-xl .navbar-nav { + flex-direction: row; + } + .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-xl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-xl .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-xl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-xl .navbar-toggler { + display: none; + } + .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-xl .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-xl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +@media (min-width: 1400px) { + .navbar-expand-xxl { + flex-wrap: nowrap; + justify-content: flex-start; + } + .navbar-expand-xxl .navbar-nav { + flex-direction: row; + } + .navbar-expand-xxl .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-xxl .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); + } + .navbar-expand-xxl .navbar-nav-scroll { + overflow: visible; + } + .navbar-expand-xxl .navbar-collapse { + display: flex !important; + flex-basis: auto; + } + .navbar-expand-xxl .navbar-toggler { + display: none; + } + .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-xxl .offcanvas .offcanvas-header { + display: none; + } + .navbar-expand-xxl .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + } +} +.navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} +.navbar-expand .navbar-nav { + flex-direction: row; +} +.navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} +.navbar-expand .navbar-nav .nav-link { + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); +} +.navbar-expand .navbar-nav-scroll { + overflow: visible; +} +.navbar-expand .navbar-collapse { + display: flex !important; + flex-basis: auto; +} +.navbar-expand .navbar-toggler { + display: none; +} +.navbar-expand .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; +} +.navbar-expand .offcanvas .offcanvas-header { + display: none; +} +.navbar-expand .offcanvas .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; +} + +.navbar-dark { + --bs-navbar-color: rgba(255, 255, 255, 0.55); + --bs-navbar-hover-color: rgba(255, 255, 255, 0.75); + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); +} + +.card { + --bs-card-spacer-y: 1rem; + --bs-card-spacer-x: 1rem; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-border-width: 1px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 0.375rem; + --bs-card-box-shadow: ; + --bs-card-inner-border-radius: calc(0.375rem - 1px); + --bs-card-cap-padding-y: 0.5rem; + --bs-card-cap-padding-x: 1rem; + --bs-card-cap-bg: rgba(0, 0, 0, 0.03); + --bs-card-cap-color: ; + --bs-card-height: ; + --bs-card-color: ; + --bs-card-bg: #fff; + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 0.75rem; + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + height: var(--bs-card-height); + word-wrap: break-word; + background-color: var(--bs-card-bg); + background-clip: border-box; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); +} +.card > hr { + margin-right: 0; + margin-left: 0; +} +.card > .list-group { + border-top: inherit; + border-bottom: inherit; +} +.card > .list-group:first-child { + border-top-width: 0; + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} +.card > .list-group:last-child { + border-bottom-width: 0; + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} +.card > .card-header + .list-group, +.card > .list-group + .card-footer { + border-top: 0; +} + +.card-body { + flex: 1 1 auto; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); +} + +.card-title { + margin-bottom: var(--bs-card-title-spacer-y); +} + +.card-subtitle { + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); + margin-bottom: 0; +} + +.card-text:last-child { + margin-bottom: 0; +} + +.card-link + .card-link { + margin-left: var(--bs-card-spacer-x); +} + +.card-header { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + margin-bottom: 0; + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); +} +.card-header:first-child { + border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; +} + +.card-footer { + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); +} +.card-footer:last-child { + border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); +} + +.card-header-tabs { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); + border-bottom: 0; +} +.card-header-tabs .nav-link.active { + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); +} + +.card-header-pills { + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); +} + +.card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); +} + +.card-img, +.card-img-top, +.card-img-bottom { + width: 100%; +} + +.card-img, +.card-img-top { + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); +} + +.card-img, +.card-img-bottom { + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); +} + +.card-group > .card { + margin-bottom: var(--bs-card-group-margin); +} +@media (min-width: 576px) { + .card-group { + display: flex; + flex-flow: row wrap; + } + .card-group > .card { + flex: 1 0 0%; + margin-bottom: 0; + } + .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + .card-group > .card:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .card-group > .card:not(:last-child) .card-img-top, + .card-group > .card:not(:last-child) .card-header { + border-top-right-radius: 0; + } + .card-group > .card:not(:last-child) .card-img-bottom, + .card-group > .card:not(:last-child) .card-footer { + border-bottom-right-radius: 0; + } + .card-group > .card:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .card-group > .card:not(:first-child) .card-img-top, + .card-group > .card:not(:first-child) .card-header { + border-top-left-radius: 0; + } + .card-group > .card:not(:first-child) .card-img-bottom, + .card-group > .card:not(:first-child) .card-footer { + border-bottom-left-radius: 0; + } +} + +.accordion { + --bs-accordion-color: #000; + --bs-accordion-bg: #fff; + --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: 1px; + --bs-accordion-border-radius: 0.375rem; + --bs-accordion-inner-border-radius: calc(0.375rem - 1px); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: var(--bs-body-color); + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='var%28--bs-body-color%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb%2811.7, 99, 227.7%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: rgb(134, 182.5, 254); + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: rgb(11.7, 99, 227.7); + --bs-accordion-active-bg: rgb(230.8, 240.5, 254.8); +} + +.accordion-button { + position: relative; + display: flex; + align-items: center; + width: 100%; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); + font-size: 1rem; + color: var(--bs-accordion-btn-color); + text-align: left; + background-color: var(--bs-accordion-btn-bg); + border: 0; + border-radius: 0; + overflow-anchor: none; + transition: var(--bs-accordion-transition); +} +@media (prefers-reduced-motion: reduce) { + .accordion-button { + transition: none; + } +} +.accordion-button:not(.collapsed) { + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + box-shadow: inset 0 calc(var(--bs-accordion-border-width) * -1) 0 var(--bs-accordion-border-color); +} +.accordion-button:not(.collapsed)::after { + background-image: var(--bs-accordion-btn-active-icon); + transform: var(--bs-accordion-btn-icon-transform); +} +.accordion-button::after { + flex-shrink: 0; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); + margin-left: auto; + content: ""; + background-image: var(--bs-accordion-btn-icon); + background-repeat: no-repeat; + background-size: var(--bs-accordion-btn-icon-width); + transition: var(--bs-accordion-btn-icon-transition); +} +@media (prefers-reduced-motion: reduce) { + .accordion-button::after { + transition: none; + } +} +.accordion-button:hover { + z-index: 2; +} +.accordion-button:focus { + z-index: 3; + border-color: var(--bs-accordion-btn-focus-border-color); + outline: 0; + box-shadow: var(--bs-accordion-btn-focus-box-shadow); +} + +.accordion-header { + margin-bottom: 0; +} + +.accordion-item { + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color); +} +.accordion-item:first-of-type { + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); +} +.accordion-item:first-of-type .accordion-button { + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); +} +.accordion-item:not(:first-of-type) { + border-top: 0; +} +.accordion-item:last-of-type { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} +.accordion-item:last-of-type .accordion-button.collapsed { + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); +} +.accordion-item:last-of-type .accordion-collapse { + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); +} + +.accordion-body { + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); +} + +.accordion-flush .accordion-collapse { + border-width: 0; +} +.accordion-flush .accordion-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} +.accordion-flush .accordion-item:first-child { + border-top: 0; +} +.accordion-flush .accordion-item:last-child { + border-bottom: 0; +} +.accordion-flush .accordion-item .accordion-button { + border-radius: 0; +} + +.breadcrumb { + --bs-breadcrumb-padding-x: 0; + --bs-breadcrumb-padding-y: 0; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-bg: ; + --bs-breadcrumb-border-radius: ; + --bs-breadcrumb-divider-color: #6c757d; + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: #6c757d; + display: flex; + flex-wrap: wrap; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); + list-style: none; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); +} + +.breadcrumb-item + .breadcrumb-item { + padding-left: var(--bs-breadcrumb-item-padding-x); +} +.breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); + content: var(--bs-breadcrumb-divider, "/") /* rtl: var(--bs-breadcrumb-divider, "/") */; +} +.breadcrumb-item.active { + color: var(--bs-breadcrumb-item-active-color); +} + +.pagination { + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 1rem; + --bs-pagination-color: var(--bs-link-color); + --bs-pagination-bg: #fff; + --bs-pagination-border-width: 1px; + --bs-pagination-border-color: #dee2e6; + --bs-pagination-border-radius: 0.375rem; + --bs-pagination-hover-color: var(--bs-link-hover-color); + --bs-pagination-hover-bg: #e9ecef; + --bs-pagination-hover-border-color: #dee2e6; + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: #e9ecef; + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #0d6efd; + --bs-pagination-active-border-color: #0d6efd; + --bs-pagination-disabled-color: #6c757d; + --bs-pagination-disabled-bg: #fff; + --bs-pagination-disabled-border-color: #dee2e6; + display: flex; + padding-left: 0; + list-style: none; +} + +.page-link { + position: relative; + display: block; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); + text-decoration: none; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .page-link { + transition: none; + } +} +.page-link:hover { + z-index: 2; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); +} +.page-link:focus { + z-index: 3; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); + outline: 0; + box-shadow: var(--bs-pagination-focus-box-shadow); +} +.page-link.active, .active > .page-link { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} +.page-link.disabled, .disabled > .page-link { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); +} + +.page-item:not(:first-child) .page-link { + margin-left: -1px; +} +.page-item:first-child .page-link { + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); +} +.page-item:last-child .page-link { + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); +} + +.pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.25rem; + --bs-pagination-border-radius: 0.5rem; +} + +.pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-border-radius: 0.25rem; +} + +.badge { + --bs-badge-padding-x: 0.65em; + --bs-badge-padding-y: 0.35em; + --bs-badge-font-size: 0.75em; + --bs-badge-font-weight: 700; + --bs-badge-color: #fff; + --bs-badge-border-radius: 0.375rem; + display: inline-block; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); + line-height: 1; + color: var(--bs-badge-color); + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: var(--bs-badge-border-radius); +} +.badge:empty { + display: none; +} + +.btn .badge { + position: relative; + top: -1px; +} + +.alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: 1px solid var(--bs-alert-border-color); + --bs-alert-border-radius: 0.375rem; + position: relative; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); +} + +.alert-heading { + color: inherit; +} + +.alert-link { + font-weight: 700; +} + +.alert-dismissible { + padding-right: 3rem; +} +.alert-dismissible .btn-close { + position: absolute; + top: 0; + right: 0; + z-index: 2; + padding: 1.25rem 1rem; +} + +.alert-primary { + --bs-alert-color: rgb(7.8, 66, 151.8); + --bs-alert-bg: rgb(206.6, 226, 254.6); + --bs-alert-border-color: rgb(182.4, 211.5, 254.4); +} +.alert-primary .alert-link { + color: rgb(6.24, 52.8, 121.44); +} + +.alert-secondary { + --bs-alert-color: rgb(64.8, 70.2, 75); + --bs-alert-bg: rgb(225.6, 227.4, 229); + --bs-alert-border-color: rgb(210.9, 213.6, 216); +} +.alert-secondary .alert-link { + color: rgb(51.84, 56.16, 60); +} + +.alert-success { + --bs-alert-color: rgb(15, 81, 50.4); + --bs-alert-bg: rgb(209, 231, 220.8); + --bs-alert-border-color: rgb(186, 219, 203.7); +} +.alert-success .alert-link { + color: rgb(12, 64.8, 40.32); +} + +.alert-info { + --bs-alert-color: rgb(5.2, 80.8, 96); + --bs-alert-bg: rgb(206.6, 244.4, 252); + --bs-alert-border-color: rgb(182.4, 239.1, 250.5); +} +.alert-info .alert-link { + color: rgb(4.16, 64.64, 76.8); +} + +.alert-warning { + --bs-alert-color: rgb(102, 77.2, 2.8); + --bs-alert-bg: rgb(255, 242.6, 205.4); + --bs-alert-border-color: rgb(255, 236.4, 180.6); +} +.alert-warning .alert-link { + color: rgb(81.6, 61.76, 2.24); +} + +.alert-danger { + --bs-alert-color: rgb(132, 31.8, 41.4); + --bs-alert-bg: rgb(248, 214.6, 217.8); + --bs-alert-border-color: rgb(244.5, 194.4, 199.2); +} +.alert-danger .alert-link { + color: rgb(105.6, 25.44, 33.12); +} + +.alert-light { + --bs-alert-color: rgb(99.2, 99.6, 100); + --bs-alert-bg: rgb(253.6, 253.8, 254); + --bs-alert-border-color: rgb(252.9, 253.2, 253.5); +} +.alert-light .alert-link { + color: rgb(79.36, 79.68, 80); +} + +.alert-dark { + --bs-alert-color: rgb(19.8, 22.2, 24.6); + --bs-alert-bg: rgb(210.6, 211.4, 212.2); + --bs-alert-border-color: rgb(188.4, 189.6, 190.8); +} +.alert-dark .alert-link { + color: rgb(15.84, 17.76, 19.68); +} + +@keyframes progress-bar-stripes { + 0% { + background-position-x: 1rem; + } +} +.progress { + --bs-progress-height: 1rem; + --bs-progress-font-size: 0.75rem; + --bs-progress-bg: #e9ecef; + --bs-progress-border-radius: 0.375rem; + --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #0d6efd; + --bs-progress-bar-transition: width 0.6s ease; + display: flex; + height: var(--bs-progress-height); + overflow: hidden; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); +} + +.progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: var(--bs-progress-bar-color); + text-align: center; + white-space: nowrap; + background-color: var(--bs-progress-bar-bg); + transition: var(--bs-progress-bar-transition); +} +@media (prefers-reduced-motion: reduce) { + .progress-bar { + transition: none; + } +} + +.progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: var(--bs-progress-height) var(--bs-progress-height); +} + +.progress-bar-animated { + animation: 1s linear infinite progress-bar-stripes; +} +@media (prefers-reduced-motion: reduce) { + .progress-bar-animated { + animation: none; + } +} + +.list-group { + --bs-list-group-color: #212529; + --bs-list-group-bg: #fff; + --bs-list-group-border-color: rgba(0, 0, 0, 0.125); + --bs-list-group-border-width: 1px; + --bs-list-group-border-radius: 0.375rem; + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: #495057; + --bs-list-group-action-hover-color: #495057; + --bs-list-group-action-hover-bg: #f8f9fa; + --bs-list-group-action-active-color: #212529; + --bs-list-group-action-active-bg: #e9ecef; + --bs-list-group-disabled-color: #6c757d; + --bs-list-group-disabled-bg: #fff; + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #0d6efd; + --bs-list-group-active-border-color: #0d6efd; + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + border-radius: var(--bs-list-group-border-radius); +} + +.list-group-numbered { + list-style-type: none; + counter-reset: section; +} +.list-group-numbered > .list-group-item::before { + content: counters(section, ".") ". "; + counter-increment: section; +} + +.list-group-item-action { + width: 100%; + color: var(--bs-list-group-action-color); + text-align: inherit; +} +.list-group-item-action:hover, .list-group-item-action:focus { + z-index: 1; + color: var(--bs-list-group-action-hover-color); + text-decoration: none; + background-color: var(--bs-list-group-action-hover-bg); +} +.list-group-item-action:active { + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); +} + +.list-group-item { + position: relative; + display: block; + padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); + text-decoration: none; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); +} +.list-group-item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} +.list-group-item:last-child { + border-bottom-right-radius: inherit; + border-bottom-left-radius: inherit; +} +.list-group-item.disabled, .list-group-item:disabled { + color: var(--bs-list-group-disabled-color); + pointer-events: none; + background-color: var(--bs-list-group-disabled-bg); +} +.list-group-item.active { + z-index: 2; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); +} +.list-group-item + .list-group-item { + border-top-width: 0; +} +.list-group-item + .list-group-item.active { + margin-top: calc(var(--bs-list-group-border-width) * -1); + border-top-width: var(--bs-list-group-border-width); +} + +.list-group-horizontal { + flex-direction: row; +} +.list-group-horizontal > .list-group-item:first-child { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; +} +.list-group-horizontal > .list-group-item:last-child { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; +} +.list-group-horizontal > .list-group-item.active { + margin-top: 0; +} +.list-group-horizontal > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; +} +.list-group-horizontal > .list-group-item + .list-group-item.active { + margin-left: calc(var(--bs-list-group-border-width) * -1); + border-left-width: var(--bs-list-group-border-width); +} + +@media (min-width: 576px) { + .list-group-horizontal-sm { + flex-direction: row; + } + .list-group-horizontal-sm > .list-group-item:first-child { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-sm > .list-group-item:last-child { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-sm > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-sm > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-sm > .list-group-item + .list-group-item.active { + margin-left: calc(var(--bs-list-group-border-width) * -1); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 768px) { + .list-group-horizontal-md { + flex-direction: row; + } + .list-group-horizontal-md > .list-group-item:first-child { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-md > .list-group-item:last-child { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-md > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-md > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-md > .list-group-item + .list-group-item.active { + margin-left: calc(var(--bs-list-group-border-width) * -1); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 992px) { + .list-group-horizontal-lg { + flex-direction: row; + } + .list-group-horizontal-lg > .list-group-item:first-child { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-lg > .list-group-item:last-child { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-lg > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-lg > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-lg > .list-group-item + .list-group-item.active { + margin-left: calc(var(--bs-list-group-border-width) * -1); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 1200px) { + .list-group-horizontal-xl { + flex-direction: row; + } + .list-group-horizontal-xl > .list-group-item:first-child { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-xl > .list-group-item:last-child { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-xl > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-xl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-xl > .list-group-item + .list-group-item.active { + margin-left: calc(var(--bs-list-group-border-width) * -1); + border-left-width: var(--bs-list-group-border-width); + } +} +@media (min-width: 1400px) { + .list-group-horizontal-xxl { + flex-direction: row; + } + .list-group-horizontal-xxl > .list-group-item:first-child { + border-bottom-left-radius: var(--bs-list-group-border-radius); + border-top-right-radius: 0; + } + .list-group-horizontal-xxl > .list-group-item:last-child { + border-top-right-radius: var(--bs-list-group-border-radius); + border-bottom-left-radius: 0; + } + .list-group-horizontal-xxl > .list-group-item.active { + margin-top: 0; + } + .list-group-horizontal-xxl > .list-group-item + .list-group-item { + border-top-width: var(--bs-list-group-border-width); + border-left-width: 0; + } + .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { + margin-left: calc(var(--bs-list-group-border-width) * -1); + border-left-width: var(--bs-list-group-border-width); + } +} +.list-group-flush { + border-radius: 0; +} +.list-group-flush > .list-group-item { + border-width: 0 0 var(--bs-list-group-border-width); +} +.list-group-flush > .list-group-item:last-child { + border-bottom-width: 0; +} + +.list-group-item-primary { + color: rgb(7.8, 66, 151.8); + background-color: rgb(206.6, 226, 254.6); +} +.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus { + color: rgb(7.8, 66, 151.8); + background-color: rgb(185.94, 203.4, 229.14); +} +.list-group-item-primary.list-group-item-action.active { + color: #fff; + background-color: rgb(7.8, 66, 151.8); + border-color: rgb(7.8, 66, 151.8); +} + +.list-group-item-secondary { + color: rgb(64.8, 70.2, 75); + background-color: rgb(225.6, 227.4, 229); +} +.list-group-item-secondary.list-group-item-action:hover, .list-group-item-secondary.list-group-item-action:focus { + color: rgb(64.8, 70.2, 75); + background-color: rgb(203.04, 204.66, 206.1); +} +.list-group-item-secondary.list-group-item-action.active { + color: #fff; + background-color: rgb(64.8, 70.2, 75); + border-color: rgb(64.8, 70.2, 75); +} + +.list-group-item-success { + color: rgb(15, 81, 50.4); + background-color: rgb(209, 231, 220.8); +} +.list-group-item-success.list-group-item-action:hover, .list-group-item-success.list-group-item-action:focus { + color: rgb(15, 81, 50.4); + background-color: rgb(188.1, 207.9, 198.72); +} +.list-group-item-success.list-group-item-action.active { + color: #fff; + background-color: rgb(15, 81, 50.4); + border-color: rgb(15, 81, 50.4); +} + +.list-group-item-info { + color: rgb(5.2, 80.8, 96); + background-color: rgb(206.6, 244.4, 252); +} +.list-group-item-info.list-group-item-action:hover, .list-group-item-info.list-group-item-action:focus { + color: rgb(5.2, 80.8, 96); + background-color: rgb(185.94, 219.96, 226.8); +} +.list-group-item-info.list-group-item-action.active { + color: #fff; + background-color: rgb(5.2, 80.8, 96); + border-color: rgb(5.2, 80.8, 96); +} + +.list-group-item-warning { + color: rgb(102, 77.2, 2.8); + background-color: rgb(255, 242.6, 205.4); +} +.list-group-item-warning.list-group-item-action:hover, .list-group-item-warning.list-group-item-action:focus { + color: rgb(102, 77.2, 2.8); + background-color: rgb(229.5, 218.34, 184.86); +} +.list-group-item-warning.list-group-item-action.active { + color: #fff; + background-color: rgb(102, 77.2, 2.8); + border-color: rgb(102, 77.2, 2.8); +} + +.list-group-item-danger { + color: rgb(132, 31.8, 41.4); + background-color: rgb(248, 214.6, 217.8); +} +.list-group-item-danger.list-group-item-action:hover, .list-group-item-danger.list-group-item-action:focus { + color: rgb(132, 31.8, 41.4); + background-color: rgb(223.2, 193.14, 196.02); +} +.list-group-item-danger.list-group-item-action.active { + color: #fff; + background-color: rgb(132, 31.8, 41.4); + border-color: rgb(132, 31.8, 41.4); +} + +.list-group-item-light { + color: rgb(99.2, 99.6, 100); + background-color: rgb(253.6, 253.8, 254); +} +.list-group-item-light.list-group-item-action:hover, .list-group-item-light.list-group-item-action:focus { + color: rgb(99.2, 99.6, 100); + background-color: rgb(228.24, 228.42, 228.6); +} +.list-group-item-light.list-group-item-action.active { + color: #fff; + background-color: rgb(99.2, 99.6, 100); + border-color: rgb(99.2, 99.6, 100); +} + +.list-group-item-dark { + color: rgb(19.8, 22.2, 24.6); + background-color: rgb(210.6, 211.4, 212.2); +} +.list-group-item-dark.list-group-item-action:hover, .list-group-item-dark.list-group-item-action:focus { + color: rgb(19.8, 22.2, 24.6); + background-color: rgb(189.54, 190.26, 190.98); +} +.list-group-item-dark.list-group-item-action.active { + color: #fff; + background-color: rgb(19.8, 22.2, 24.6); + border-color: rgb(19.8, 22.2, 24.6); +} + +.btn-close { + box-sizing: content-box; + width: 1em; + height: 1em; + padding: 0.25em 0.25em; + color: #000; + background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; + border: 0; + border-radius: 0.375rem; + opacity: 0.5; +} +.btn-close:hover { + color: #000; + text-decoration: none; + opacity: 0.75; +} +.btn-close:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + opacity: 1; +} +.btn-close:disabled, .btn-close.disabled { + pointer-events: none; + user-select: none; + opacity: 0.25; +} + +.btn-close-white { + filter: invert(1) grayscale(100%) brightness(200%); +} + +.toast { + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 1.5rem; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-color: ; + --bs-toast-bg: rgba(255, 255, 255, 0.85); + --bs-toast-border-width: 1px; + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: 0.375rem; + --bs-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-toast-header-color: #6c757d; + --bs-toast-header-bg: rgba(255, 255, 255, 0.85); + --bs-toast-header-border-color: rgba(0, 0, 0, 0.05); + width: var(--bs-toast-max-width); + max-width: 100%; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); + pointer-events: auto; + background-color: var(--bs-toast-bg); + background-clip: padding-box; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); +} +.toast.showing { + opacity: 0; +} +.toast:not(.show) { + display: none; +} + +.toast-container { + position: absolute; + z-index: 1090; + width: max-content; + max-width: 100%; + pointer-events: none; +} +.toast-container > :not(:last-child) { + margin-bottom: var(--bs-toast-spacing); +} + +.toast-header { + display: flex; + align-items: center; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); + background-clip: padding-box; + border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); + border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); + border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); +} +.toast-header .btn-close { + margin-right: calc(var(--bs-toast-padding-x) * -0.5); + margin-left: var(--bs-toast-padding-x); +} + +.toast-body { + padding: var(--bs-toast-padding-x); + word-wrap: break-word; +} + +.modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-color: ; + --bs-modal-bg: #fff; + --bs-modal-border-color: var(--bs-border-color-translucent); + --bs-modal-border-width: 1px; + --bs-modal-border-radius: 0.5rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: calc(0.5rem - 1px); + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: var(--bs-border-color); + --bs-modal-header-border-width: 1px; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-bg: ; + --bs-modal-footer-border-color: var(--bs-border-color); + --bs-modal-footer-border-width: 1px; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-modal-zindex); + display: none; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + outline: 0; +} + +.modal-dialog { + position: relative; + width: auto; + margin: var(--bs-modal-margin); + pointer-events: none; +} +.modal.fade .modal-dialog { + transition: transform 0.3s ease-out; + transform: translate(0, -50px); +} +@media (prefers-reduced-motion: reduce) { + .modal.fade .modal-dialog { + transition: none; + } +} +.modal.show .modal-dialog { + transform: none; +} +.modal.modal-static .modal-dialog { + transform: scale(1.02); +} + +.modal-dialog-scrollable { + height: calc(100% - var(--bs-modal-margin) * 2); +} +.modal-dialog-scrollable .modal-content { + max-height: 100%; + overflow: hidden; +} +.modal-dialog-scrollable .modal-body { + overflow-y: auto; +} + +.modal-dialog-centered { + display: flex; + align-items: center; + min-height: calc(100% - var(--bs-modal-margin) * 2); +} + +.modal-content { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + color: var(--bs-modal-color); + pointer-events: auto; + background-color: var(--bs-modal-bg); + background-clip: padding-box; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); + outline: 0; +} + +.modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; + position: fixed; + top: 0; + left: 0; + z-index: var(--bs-backdrop-zindex); + width: 100vw; + height: 100vh; + background-color: var(--bs-backdrop-bg); +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop.show { + opacity: var(--bs-backdrop-opacity); +} + +.modal-header { + display: flex; + flex-shrink: 0; + align-items: center; + justify-content: space-between; + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); +} +.modal-header .btn-close { + padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(var(--bs-modal-header-padding-y) * -0.5) calc(var(--bs-modal-header-padding-x) * -0.5) calc(var(--bs-modal-header-padding-y) * -0.5) auto; +} + +.modal-title { + margin-bottom: 0; + line-height: var(--bs-modal-title-line-height); +} + +.modal-body { + position: relative; + flex: 1 1 auto; + padding: var(--bs-modal-padding); +} + +.modal-footer { + display: flex; + flex-shrink: 0; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); +} +.modal-footer > * { + margin: calc(var(--bs-modal-footer-gap) * 0.5); +} + +@media (min-width: 576px) { + .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } + .modal-dialog { + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; + } + .modal-sm { + --bs-modal-width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg, + .modal-xl { + --bs-modal-width: 800px; + } +} +@media (min-width: 1200px) { + .modal-xl { + --bs-modal-width: 1140px; + } +} +.modal-fullscreen { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; +} +.modal-fullscreen .modal-content { + height: 100%; + border: 0; + border-radius: 0; +} +.modal-fullscreen .modal-header, +.modal-fullscreen .modal-footer { + border-radius: 0; +} +.modal-fullscreen .modal-body { + overflow-y: auto; +} + +@media (max-width: 575.98px) { + .modal-fullscreen-sm-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-sm-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-sm-down .modal-header, + .modal-fullscreen-sm-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-sm-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 767.98px) { + .modal-fullscreen-md-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-md-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-md-down .modal-header, + .modal-fullscreen-md-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-md-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 991.98px) { + .modal-fullscreen-lg-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-lg-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-lg-down .modal-header, + .modal-fullscreen-lg-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-lg-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 1199.98px) { + .modal-fullscreen-xl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-xl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-xl-down .modal-header, + .modal-fullscreen-xl-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-xl-down .modal-body { + overflow-y: auto; + } +} +@media (max-width: 1399.98px) { + .modal-fullscreen-xxl-down { + width: 100vw; + max-width: none; + height: 100%; + margin: 0; + } + .modal-fullscreen-xxl-down .modal-content { + height: 100%; + border: 0; + border-radius: 0; + } + .modal-fullscreen-xxl-down .modal-header, + .modal-fullscreen-xxl-down .modal-footer { + border-radius: 0; + } + .modal-fullscreen-xxl-down .modal-body { + overflow-y: auto; + } +} +.tooltip { + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-margin: ; + --bs-tooltip-font-size: 0.875rem; + --bs-tooltip-color: #fff; + --bs-tooltip-bg: #000; + --bs-tooltip-border-radius: 0.375rem; + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); + display: block; + padding: var(--bs-tooltip-arrow-height); + margin: var(--bs-tooltip-margin); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-tooltip-font-size); + word-wrap: break-word; + opacity: 0; +} +.tooltip.show { + opacity: var(--bs-tooltip-opacity); +} +.tooltip .tooltip-arrow { + display: block; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); +} +.tooltip .tooltip-arrow::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bs-tooltip-top .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow { + bottom: 0; +} +.bs-tooltip-top .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { + top: -1px; + border-width: var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); +} + +/* rtl:begin:ignore */ +.bs-tooltip-end .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow { + left: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} +.bs-tooltip-end .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before { + right: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); +} + +/* rtl:end:ignore */ +.bs-tooltip-bottom .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow { + top: 0; +} +.bs-tooltip-bottom .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before { + bottom: -1px; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); +} + +/* rtl:begin:ignore */ +.bs-tooltip-start .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow { + right: 0; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); +} +.bs-tooltip-start .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before { + left: -1px; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); +} + +/* rtl:end:ignore */ +.tooltip-inner { + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); + text-align: center; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); +} + +.popover { + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.875rem; + --bs-popover-bg: #fff; + --bs-popover-border-width: 1px; + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: 0.5rem; + --bs-popover-inner-border-radius: calc(0.5rem - 1px); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 1rem; + --bs-popover-header-color: var(--bs-heading-color); + --bs-popover-header-bg: rgb(239.7, 239.7, 239.7); + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: #212529; + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); + display: block; + max-width: var(--bs-popover-max-width); + font-family: var(--bs-font-sans-serif); + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + white-space: normal; + word-spacing: normal; + line-break: auto; + font-size: var(--bs-popover-font-size); + word-wrap: break-word; + background-color: var(--bs-popover-bg); + background-clip: padding-box; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); +} +.popover .popover-arrow { + display: block; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); +} +.popover .popover-arrow::before, .popover .popover-arrow::after { + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; + border-width: 0; +} + +.bs-popover-top > .popover-arrow, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow { + bottom: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width)); +} +.bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before, .bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} +.bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before { + bottom: 0; + border-top-color: var(--bs-popover-arrow-border); +} +.bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); +} + +/* rtl:begin:ignore */ +.bs-popover-end > .popover-arrow, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow { + left: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before, .bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; +} +.bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before { + left: 0; + border-right-color: var(--bs-popover-arrow-border); +} +.bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); +} + +/* rtl:end:ignore */ +.bs-popover-bottom > .popover-arrow, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow { + top: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width)); +} +.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before, .bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} +.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before { + top: 0; + border-bottom-color: var(--bs-popover-arrow-border); +} +.bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); +} +.bs-popover-bottom .popover-header::before, .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: var(--bs-popover-arrow-width); + margin-left: calc(var(--bs-popover-arrow-width) * -0.5); + content: ""; + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg); +} + +/* rtl:begin:ignore */ +.bs-popover-start > .popover-arrow, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow { + right: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width)); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before, .bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); +} +.bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before { + right: 0; + border-left-color: var(--bs-popover-arrow-border); +} +.bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); +} + +/* rtl:end:ignore */ +.popover-header { + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); + margin-bottom: 0; + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); +} +.popover-header:empty { + display: none; +} + +.popover-body { + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); +} + +.carousel { + position: relative; +} + +.carousel.pointer-event { + touch-action: pan-y; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner::after { + display: block; + clear: both; + content: ""; +} + +.carousel-item { + position: relative; + display: none; + float: left; + width: 100%; + margin-right: -100%; + backface-visibility: hidden; + transition: transform 0.6s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .carousel-item { + transition: none; + } +} + +.carousel-item.active, +.carousel-item-next, +.carousel-item-prev { + display: block; +} + +/* rtl:begin:ignore */ +.carousel-item-next:not(.carousel-item-start), +.active.carousel-item-end { + transform: translateX(100%); +} + +.carousel-item-prev:not(.carousel-item-end), +.active.carousel-item-start { + transform: translateX(-100%); +} + +/* rtl:end:ignore */ +.carousel-fade .carousel-item { + opacity: 0; + transition-property: opacity; + transform: none; +} +.carousel-fade .carousel-item.active, +.carousel-fade .carousel-item-next.carousel-item-start, +.carousel-fade .carousel-item-prev.carousel-item-end { + z-index: 1; + opacity: 1; +} +.carousel-fade .active.carousel-item-start, +.carousel-fade .active.carousel-item-end { + z-index: 0; + opacity: 0; + transition: opacity 0s 0.6s; +} +@media (prefers-reduced-motion: reduce) { + .carousel-fade .active.carousel-item-start, + .carousel-fade .active.carousel-item-end { + transition: none; + } +} + +.carousel-control-prev, +.carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: 15%; + padding: 0; + color: #fff; + text-align: center; + background: none; + border: 0; + opacity: 0.5; + transition: opacity 0.15s ease; +} +@media (prefers-reduced-motion: reduce) { + .carousel-control-prev, + .carousel-control-next { + transition: none; + } +} +.carousel-control-prev:hover, .carousel-control-prev:focus, +.carousel-control-next:hover, +.carousel-control-next:focus { + color: #fff; + text-decoration: none; + outline: 0; + opacity: 0.9; +} + +.carousel-control-prev { + left: 0; +} + +.carousel-control-next { + right: 0; +} + +.carousel-control-prev-icon, +.carousel-control-next-icon { + display: inline-block; + width: 2rem; + height: 2rem; + background-repeat: no-repeat; + background-position: 50%; + background-size: 100% 100%; +} + +/* rtl:options: { + "autoRename": true, + "stringMap":[ { + "name" : "prev-next", + "search" : "prev", + "replace" : "next" + } ] +} */ +.carousel-control-prev-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); +} + +.carousel-control-next-icon { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); +} + +.carousel-indicators { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + display: flex; + justify-content: center; + padding: 0; + margin-right: 15%; + margin-bottom: 1rem; + margin-left: 15%; + list-style: none; +} +.carousel-indicators [data-bs-target] { + box-sizing: content-box; + flex: 0 1 auto; + width: 30px; + height: 3px; + padding: 0; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: #fff; + background-clip: padding-box; + border: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + opacity: 0.5; + transition: opacity 0.6s ease; +} +@media (prefers-reduced-motion: reduce) { + .carousel-indicators [data-bs-target] { + transition: none; + } +} +.carousel-indicators .active { + opacity: 1; +} + +.carousel-caption { + position: absolute; + right: 15%; + bottom: 1.25rem; + left: 15%; + padding-top: 1.25rem; + padding-bottom: 1.25rem; + color: #fff; + text-align: center; +} + +.carousel-dark .carousel-control-prev-icon, +.carousel-dark .carousel-control-next-icon { + filter: invert(1) grayscale(100); +} +.carousel-dark .carousel-indicators [data-bs-target] { + background-color: #000; +} +.carousel-dark .carousel-caption { + color: #000; +} + +.spinner-grow, +.spinner-border { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); +} + +@keyframes spinner-border { + to { + transform: rotate(360deg) /* rtl:ignore */; + } +} +.spinner-border { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; + border-right-color: transparent; +} + +.spinner-border-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; +} + +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + 50% { + opacity: 1; + transform: none; + } +} +.spinner-grow { + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; + opacity: 0; +} + +.spinner-grow-sm { + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; +} + +@media (prefers-reduced-motion: reduce) { + .spinner-border, + .spinner-grow { + --bs-spinner-animation-speed: 1.5s; + } +} +.offcanvas, .offcanvas-xxl, .offcanvas-xl, .offcanvas-lg, .offcanvas-md, .offcanvas-sm { + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-color: ; + --bs-offcanvas-bg: #fff; + --bs-offcanvas-border-width: 1px; + --bs-offcanvas-border-color: var(--bs-border-color-translucent); + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} + +@media (max-width: 575.98px) { + .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: 1045; + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-sm { + transition: none; + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } + .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } + .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } + .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } + .offcanvas-sm.showing, .offcanvas-sm.show:not(.hiding) { + transform: none; + } + .offcanvas-sm.showing, .offcanvas-sm.hiding, .offcanvas-sm.show { + visibility: visible; + } +} +@media (min-width: 576px) { + .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-sm .offcanvas-header { + display: none; + } + .offcanvas-sm .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 767.98px) { + .offcanvas-md { + position: fixed; + bottom: 0; + z-index: 1045; + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-md { + transition: none; + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } + .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } + .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } + .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } + .offcanvas-md.showing, .offcanvas-md.show:not(.hiding) { + transform: none; + } + .offcanvas-md.showing, .offcanvas-md.hiding, .offcanvas-md.show { + visibility: visible; + } +} +@media (min-width: 768px) { + .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-md .offcanvas-header { + display: none; + } + .offcanvas-md .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 991.98px) { + .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: 1045; + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-lg { + transition: none; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } + .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } + .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } + .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } + .offcanvas-lg.showing, .offcanvas-lg.show:not(.hiding) { + transform: none; + } + .offcanvas-lg.showing, .offcanvas-lg.hiding, .offcanvas-lg.show { + visibility: visible; + } +} +@media (min-width: 992px) { + .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-lg .offcanvas-header { + display: none; + } + .offcanvas-lg .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1199.98px) { + .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: 1045; + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xl { + transition: none; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } + .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } + .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } + .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } + .offcanvas-xl.showing, .offcanvas-xl.show:not(.hiding) { + transform: none; + } + .offcanvas-xl.showing, .offcanvas-xl.hiding, .offcanvas-xl.show { + visibility: visible; + } +} +@media (min-width: 1200px) { + .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xl .offcanvas-header { + display: none; + } + .offcanvas-xl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +@media (max-width: 1399.98px) { + .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: 1045; + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xxl { + transition: none; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } + .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); + } + .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } + .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); + } + .offcanvas-xxl.showing, .offcanvas-xxl.show:not(.hiding) { + transform: none; + } + .offcanvas-xxl.showing, .offcanvas-xxl.hiding, .offcanvas-xxl.show { + visibility: visible; + } +} +@media (min-width: 1400px) { + .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xxl .offcanvas-header { + display: none; + } + .offcanvas-xxl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} + +.offcanvas { + position: fixed; + bottom: 0; + z-index: 1045; + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .offcanvas { + transition: none; + } +} +.offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(-100%); +} +.offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateX(100%); +} +.offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(-100%); +} +.offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); + transform: translateY(100%); +} +.offcanvas.showing, .offcanvas.show:not(.hiding) { + transform: none; +} +.offcanvas.showing, .offcanvas.hiding, .offcanvas.show { + visibility: visible; +} + +.offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + z-index: 1040; + width: 100vw; + height: 100vh; + background-color: #000; +} +.offcanvas-backdrop.fade { + opacity: 0; +} +.offcanvas-backdrop.show { + opacity: 0.5; +} + +.offcanvas-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} +.offcanvas-header .btn-close { + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(var(--bs-offcanvas-padding-y) * -0.5); + margin-right: calc(var(--bs-offcanvas-padding-x) * -0.5); + margin-bottom: calc(var(--bs-offcanvas-padding-y) * -0.5); +} + +.offcanvas-title { + margin-bottom: 0; + line-height: 1.5; +} + +.offcanvas-body { + flex-grow: 1; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); + overflow-y: auto; +} + +.placeholder { + display: inline-block; + min-height: 1em; + vertical-align: middle; + cursor: wait; + background-color: currentcolor; + opacity: 0.5; +} +.placeholder.btn::before { + display: inline-block; + content: ""; +} + +.placeholder-xs { + min-height: 0.6em; +} + +.placeholder-sm { + min-height: 0.8em; +} + +.placeholder-lg { + min-height: 1.2em; +} + +.placeholder-glow .placeholder { + animation: placeholder-glow 2s ease-in-out infinite; +} + +@keyframes placeholder-glow { + 50% { + opacity: 0.2; + } +} +.placeholder-wave { + mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); + mask-size: 200% 100%; + animation: placeholder-wave 2s linear infinite; +} + +@keyframes placeholder-wave { + 100% { + mask-position: -200% 0%; + } +} +.clearfix::after { + display: block; + clear: both; + content: ""; +} + +.text-bg-primary { + color: #fff !important; + background-color: RGBA(13, 110, 253, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-secondary { + color: #fff !important; + background-color: RGBA(108, 117, 125, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-success { + color: #fff !important; + background-color: RGBA(25, 135, 84, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-info { + color: #000 !important; + background-color: RGBA(13, 202, 240, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-warning { + color: #000 !important; + background-color: RGBA(255, 193, 7, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-danger { + color: #fff !important; + background-color: RGBA(220, 53, 69, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-light { + color: #000 !important; + background-color: RGBA(248, 249, 250, var(--bs-bg-opacity, 1)) !important; +} + +.text-bg-dark { + color: #fff !important; + background-color: RGBA(33, 37, 41, var(--bs-bg-opacity, 1)) !important; +} + +.link-primary { + color: #0d6efd !important; +} +.link-primary:hover, .link-primary:focus { + color: rgb(10.4, 88, 202.4) !important; +} + +.link-secondary { + color: #6c757d !important; +} +.link-secondary:hover, .link-secondary:focus { + color: rgb(86.4, 93.6, 100) !important; +} + +.link-success { + color: #198754 !important; +} +.link-success:hover, .link-success:focus { + color: rgb(20, 108, 67.2) !important; +} + +.link-info { + color: #0dcaf0 !important; +} +.link-info:hover, .link-info:focus { + color: rgb(61.4, 212.6, 243) !important; +} + +.link-warning { + color: #ffc107 !important; +} +.link-warning:hover, .link-warning:focus { + color: rgb(255, 205.4, 56.6) !important; +} + +.link-danger { + color: #dc3545 !important; +} +.link-danger:hover, .link-danger:focus { + color: rgb(176, 42.4, 55.2) !important; +} + +.link-light { + color: #f8f9fa !important; +} +.link-light:hover, .link-light:focus { + color: rgb(249.4, 250.2, 251) !important; +} + +.link-dark { + color: #212529 !important; +} +.link-dark:hover, .link-dark:focus { + color: rgb(26.4, 29.6, 32.8) !important; +} + +.ratio { + position: relative; + width: 100%; +} +.ratio::before { + display: block; + padding-top: var(--bs-aspect-ratio); + content: ""; +} +.ratio > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.ratio-1x1 { + --bs-aspect-ratio: 100%; +} + +.ratio-4x3 { + --bs-aspect-ratio: 75%; +} + +.ratio-16x9 { + --bs-aspect-ratio: 56.25%; +} + +.ratio-21x9 { + --bs-aspect-ratio: 42.8571428571%; +} + +.fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} + +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} + +.sticky-top { + position: sticky; + top: 0; + z-index: 1020; +} + +.sticky-bottom { + position: sticky; + bottom: 0; + z-index: 1020; +} + +@media (min-width: 576px) { + .sticky-sm-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-sm-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 768px) { + .sticky-md-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-md-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 992px) { + .sticky-lg-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-lg-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 1200px) { + .sticky-xl-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-xl-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +@media (min-width: 1400px) { + .sticky-xxl-top { + position: sticky; + top: 0; + z-index: 1020; + } + .sticky-xxl-bottom { + position: sticky; + bottom: 0; + z-index: 1020; + } +} +.hstack { + display: flex; + flex-direction: row; + align-items: center; + align-self: stretch; +} + +.vstack { + display: flex; + flex: 1 1 auto; + flex-direction: column; + align-self: stretch; +} + +.visually-hidden, +.visually-hidden-focusable:not(:focus):not(:focus-within) { + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; +} + +.stretched-link::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + content: ""; +} + +.text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.vr { + display: inline-block; + align-self: stretch; + width: 1px; + min-height: 1em; + background-color: currentcolor; + opacity: 0.25; +} + +.align-baseline { + vertical-align: baseline !important; +} + +.align-top { + vertical-align: top !important; +} + +.align-middle { + vertical-align: middle !important; +} + +.align-bottom { + vertical-align: bottom !important; +} + +.align-text-bottom { + vertical-align: text-bottom !important; +} + +.align-text-top { + vertical-align: text-top !important; +} + +.float-start { + float: left !important; +} + +.float-end { + float: right !important; +} + +.float-none { + float: none !important; +} + +.opacity-0 { + opacity: 0 !important; +} + +.opacity-25 { + opacity: 0.25 !important; +} + +.opacity-50 { + opacity: 0.5 !important; +} + +.opacity-75 { + opacity: 0.75 !important; +} + +.opacity-100 { + opacity: 1 !important; +} + +.overflow-auto { + overflow: auto !important; +} + +.overflow-hidden { + overflow: hidden !important; +} + +.overflow-visible { + overflow: visible !important; +} + +.overflow-scroll { + overflow: scroll !important; +} + +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-grid { + display: grid !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: flex !important; +} + +.d-inline-flex { + display: inline-flex !important; +} + +.d-none { + display: none !important; +} + +.shadow { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +.shadow-sm { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +.shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} + +.shadow-none { + box-shadow: none !important; +} + +.position-static { + position: static !important; +} + +.position-relative { + position: relative !important; +} + +.position-absolute { + position: absolute !important; +} + +.position-fixed { + position: fixed !important; +} + +.position-sticky { + position: sticky !important; +} + +.top-0 { + top: 0 !important; +} + +.top-50 { + top: 50% !important; +} + +.top-100 { + top: 100% !important; +} + +.bottom-0 { + bottom: 0 !important; +} + +.bottom-50 { + bottom: 50% !important; +} + +.bottom-100 { + bottom: 100% !important; +} + +.start-0 { + left: 0 !important; +} + +.start-50 { + left: 50% !important; +} + +.start-100 { + left: 100% !important; +} + +.end-0 { + right: 0 !important; +} + +.end-50 { + right: 50% !important; +} + +.end-100 { + right: 100% !important; +} + +.translate-middle { + transform: translate(-50%, -50%) !important; +} + +.translate-middle-x { + transform: translateX(-50%) !important; +} + +.translate-middle-y { + transform: translateY(-50%) !important; +} + +.border { + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-0 { + border: 0 !important; +} + +.border-top { + border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-top-0 { + border-top: 0 !important; +} + +.border-end { + border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-end-0 { + border-right: 0 !important; +} + +.border-bottom { + border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-bottom-0 { + border-bottom: 0 !important; +} + +.border-start { + border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; +} + +.border-start-0 { + border-left: 0 !important; +} + +.border-primary { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-primary-rgb), var(--bs-border-opacity)) !important; +} + +.border-secondary { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-secondary-rgb), var(--bs-border-opacity)) !important; +} + +.border-success { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-success-rgb), var(--bs-border-opacity)) !important; +} + +.border-info { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-info-rgb), var(--bs-border-opacity)) !important; +} + +.border-warning { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-warning-rgb), var(--bs-border-opacity)) !important; +} + +.border-danger { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-danger-rgb), var(--bs-border-opacity)) !important; +} + +.border-light { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-light-rgb), var(--bs-border-opacity)) !important; +} + +.border-dark { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-dark-rgb), var(--bs-border-opacity)) !important; +} + +.border-white { + --bs-border-opacity: 1; + border-color: rgba(var(--bs-white-rgb), var(--bs-border-opacity)) !important; +} + +.border-1 { + --bs-border-width: 1px; +} + +.border-2 { + --bs-border-width: 2px; +} + +.border-3 { + --bs-border-width: 3px; +} + +.border-4 { + --bs-border-width: 4px; +} + +.border-5 { + --bs-border-width: 5px; +} + +.border-opacity-10 { + --bs-border-opacity: 0.1; +} + +.border-opacity-25 { + --bs-border-opacity: 0.25; +} + +.border-opacity-50 { + --bs-border-opacity: 0.5; +} + +.border-opacity-75 { + --bs-border-opacity: 0.75; +} + +.border-opacity-100 { + --bs-border-opacity: 1; +} + +.w-25 { + width: 25% !important; +} + +.w-50 { + width: 50% !important; +} + +.w-75 { + width: 75% !important; +} + +.w-100 { + width: 100% !important; +} + +.w-auto { + width: auto !important; +} + +.mw-100 { + max-width: 100% !important; +} + +.vw-100 { + width: 100vw !important; +} + +.min-vw-100 { + min-width: 100vw !important; +} + +.h-25 { + height: 25% !important; +} + +.h-50 { + height: 50% !important; +} + +.h-75 { + height: 75% !important; +} + +.h-100 { + height: 100% !important; +} + +.h-auto { + height: auto !important; +} + +.mh-100 { + max-height: 100% !important; +} + +.vh-100 { + height: 100vh !important; +} + +.min-vh-100 { + min-height: 100vh !important; +} + +.flex-fill { + flex: 1 1 auto !important; +} + +.flex-row { + flex-direction: row !important; +} + +.flex-column { + flex-direction: column !important; +} + +.flex-row-reverse { + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + flex-direction: column-reverse !important; +} + +.flex-grow-0 { + flex-grow: 0 !important; +} + +.flex-grow-1 { + flex-grow: 1 !important; +} + +.flex-shrink-0 { + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + flex-shrink: 1 !important; +} + +.flex-wrap { + flex-wrap: wrap !important; +} + +.flex-nowrap { + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.justify-content-start { + justify-content: flex-start !important; +} + +.justify-content-end { + justify-content: flex-end !important; +} + +.justify-content-center { + justify-content: center !important; +} + +.justify-content-between { + justify-content: space-between !important; +} + +.justify-content-around { + justify-content: space-around !important; +} + +.justify-content-evenly { + justify-content: space-evenly !important; +} + +.align-items-start { + align-items: flex-start !important; +} + +.align-items-end { + align-items: flex-end !important; +} + +.align-items-center { + align-items: center !important; +} + +.align-items-baseline { + align-items: baseline !important; +} + +.align-items-stretch { + align-items: stretch !important; +} + +.align-content-start { + align-content: flex-start !important; +} + +.align-content-end { + align-content: flex-end !important; +} + +.align-content-center { + align-content: center !important; +} + +.align-content-between { + align-content: space-between !important; +} + +.align-content-around { + align-content: space-around !important; +} + +.align-content-stretch { + align-content: stretch !important; +} + +.align-self-auto { + align-self: auto !important; +} + +.align-self-start { + align-self: flex-start !important; +} + +.align-self-end { + align-self: flex-end !important; +} + +.align-self-center { + align-self: center !important; +} + +.align-self-baseline { + align-self: baseline !important; +} + +.align-self-stretch { + align-self: stretch !important; +} + +.order-first { + order: -1 !important; +} + +.order-0 { + order: 0 !important; +} + +.order-1 { + order: 1 !important; +} + +.order-2 { + order: 2 !important; +} + +.order-3 { + order: 3 !important; +} + +.order-4 { + order: 4 !important; +} + +.order-5 { + order: 5 !important; +} + +.order-last { + order: 6 !important; +} + +.m-0 { + margin: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.m-auto { + margin: auto !important; +} + +.mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.mt-0 { + margin-top: 0 !important; +} + +.mt-1 { + margin-top: 0.25rem !important; +} + +.mt-2 { + margin-top: 0.5rem !important; +} + +.mt-3 { + margin-top: 1rem !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} + +.mt-5 { + margin-top: 3rem !important; +} + +.mt-auto { + margin-top: auto !important; +} + +.me-0 { + margin-right: 0 !important; +} + +.me-1 { + margin-right: 0.25rem !important; +} + +.me-2 { + margin-right: 0.5rem !important; +} + +.me-3 { + margin-right: 1rem !important; +} + +.me-4 { + margin-right: 1.5rem !important; +} + +.me-5 { + margin-right: 3rem !important; +} + +.me-auto { + margin-right: auto !important; +} + +.mb-0 { + margin-bottom: 0 !important; +} + +.mb-1 { + margin-bottom: 0.25rem !important; +} + +.mb-2 { + margin-bottom: 0.5rem !important; +} + +.mb-3 { + margin-bottom: 1rem !important; +} + +.mb-4 { + margin-bottom: 1.5rem !important; +} + +.mb-5 { + margin-bottom: 3rem !important; +} + +.mb-auto { + margin-bottom: auto !important; +} + +.ms-0 { + margin-left: 0 !important; +} + +.ms-1 { + margin-left: 0.25rem !important; +} + +.ms-2 { + margin-left: 0.5rem !important; +} + +.ms-3 { + margin-left: 1rem !important; +} + +.ms-4 { + margin-left: 1.5rem !important; +} + +.ms-5 { + margin-left: 3rem !important; +} + +.ms-auto { + margin-left: auto !important; +} + +.p-0 { + padding: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.pt-0 { + padding-top: 0 !important; +} + +.pt-1 { + padding-top: 0.25rem !important; +} + +.pt-2 { + padding-top: 0.5rem !important; +} + +.pt-3 { + padding-top: 1rem !important; +} + +.pt-4 { + padding-top: 1.5rem !important; +} + +.pt-5 { + padding-top: 3rem !important; +} + +.pe-0 { + padding-right: 0 !important; +} + +.pe-1 { + padding-right: 0.25rem !important; +} + +.pe-2 { + padding-right: 0.5rem !important; +} + +.pe-3 { + padding-right: 1rem !important; +} + +.pe-4 { + padding-right: 1.5rem !important; +} + +.pe-5 { + padding-right: 3rem !important; +} + +.pb-0 { + padding-bottom: 0 !important; +} + +.pb-1 { + padding-bottom: 0.25rem !important; +} + +.pb-2 { + padding-bottom: 0.5rem !important; +} + +.pb-3 { + padding-bottom: 1rem !important; +} + +.pb-4 { + padding-bottom: 1.5rem !important; +} + +.pb-5 { + padding-bottom: 3rem !important; +} + +.ps-0 { + padding-left: 0 !important; +} + +.ps-1 { + padding-left: 0.25rem !important; +} + +.ps-2 { + padding-left: 0.5rem !important; +} + +.ps-3 { + padding-left: 1rem !important; +} + +.ps-4 { + padding-left: 1.5rem !important; +} + +.ps-5 { + padding-left: 3rem !important; +} + +.gap-0 { + gap: 0 !important; +} + +.gap-1 { + gap: 0.25rem !important; +} + +.gap-2 { + gap: 0.5rem !important; +} + +.gap-3 { + gap: 1rem !important; +} + +.gap-4 { + gap: 1.5rem !important; +} + +.gap-5 { + gap: 3rem !important; +} + +.font-monospace { + font-family: var(--bs-font-monospace) !important; +} + +.fs-1 { + font-size: calc(1.375rem + 1.5vw) !important; +} + +.fs-2 { + font-size: calc(1.325rem + 0.9vw) !important; +} + +.fs-3 { + font-size: calc(1.3rem + 0.6vw) !important; +} + +.fs-4 { + font-size: calc(1.275rem + 0.3vw) !important; +} + +.fs-5 { + font-size: 1.25rem !important; +} + +.fs-6 { + font-size: 1rem !important; +} + +.fst-italic { + font-style: italic !important; +} + +.fst-normal { + font-style: normal !important; +} + +.fw-light { + font-weight: 300 !important; +} + +.fw-lighter { + font-weight: lighter !important; +} + +.fw-normal { + font-weight: 400 !important; +} + +.fw-bold { + font-weight: 700 !important; +} + +.fw-semibold { + font-weight: 600 !important; +} + +.fw-bolder { + font-weight: bolder !important; +} + +.lh-1 { + line-height: 1 !important; +} + +.lh-sm { + line-height: 1.25 !important; +} + +.lh-base { + line-height: 1.5 !important; +} + +.lh-lg { + line-height: 2 !important; +} + +.text-start { + text-align: left !important; +} + +.text-end { + text-align: right !important; +} + +.text-center { + text-align: center !important; +} + +.text-decoration-none { + text-decoration: none !important; +} + +.text-decoration-underline { + text-decoration: underline !important; +} + +.text-decoration-line-through { + text-decoration: line-through !important; +} + +.text-lowercase { + text-transform: lowercase !important; +} + +.text-uppercase { + text-transform: uppercase !important; +} + +.text-capitalize { + text-transform: capitalize !important; +} + +.text-wrap { + white-space: normal !important; +} + +.text-nowrap { + white-space: nowrap !important; +} + +/* rtl:begin:remove */ +.text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} + +/* rtl:end:remove */ +.text-primary { + --bs-text-opacity: 1; + color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important; +} + +.text-secondary { + --bs-text-opacity: 1; + color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important; +} + +.text-success { + --bs-text-opacity: 1; + color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important; +} + +.text-info { + --bs-text-opacity: 1; + color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important; +} + +.text-warning { + --bs-text-opacity: 1; + color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important; +} + +.text-danger { + --bs-text-opacity: 1; + color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important; +} + +.text-light { + --bs-text-opacity: 1; + color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important; +} + +.text-dark { + --bs-text-opacity: 1; + color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important; +} + +.text-black { + --bs-text-opacity: 1; + color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important; +} + +.text-white { + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} + +.text-body { + --bs-text-opacity: 1; + color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important; +} + +.text-muted { + --bs-text-opacity: 1; + color: #6c757d !important; +} + +.text-black-50 { + --bs-text-opacity: 1; + color: rgba(0, 0, 0, 0.5) !important; +} + +.text-white-50 { + --bs-text-opacity: 1; + color: rgba(255, 255, 255, 0.5) !important; +} + +.text-reset { + --bs-text-opacity: 1; + color: inherit !important; +} + +.text-opacity-25 { + --bs-text-opacity: 0.25; +} + +.text-opacity-50 { + --bs-text-opacity: 0.5; +} + +.text-opacity-75 { + --bs-text-opacity: 0.75; +} + +.text-opacity-100 { + --bs-text-opacity: 1; +} + +.bg-primary { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-secondary { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-success { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-info { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-warning { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-danger { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-light { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-dark { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-black { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-white { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-body { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important; +} + +.bg-transparent { + --bs-bg-opacity: 1; + background-color: transparent !important; +} + +.bg-opacity-10 { + --bs-bg-opacity: 0.1; +} + +.bg-opacity-25 { + --bs-bg-opacity: 0.25; +} + +.bg-opacity-50 { + --bs-bg-opacity: 0.5; +} + +.bg-opacity-75 { + --bs-bg-opacity: 0.75; +} + +.bg-opacity-100 { + --bs-bg-opacity: 1; +} + +.bg-gradient { + background-image: var(--bs-gradient) !important; +} + +.user-select-all { + user-select: all !important; +} + +.user-select-auto { + user-select: auto !important; +} + +.user-select-none { + user-select: none !important; +} + +.pe-none { + pointer-events: none !important; +} + +.pe-auto { + pointer-events: auto !important; +} + +.rounded { + border-radius: var(--bs-border-radius) !important; +} + +.rounded-0 { + border-radius: 0 !important; +} + +.rounded-1 { + border-radius: var(--bs-border-radius-sm) !important; +} + +.rounded-2 { + border-radius: var(--bs-border-radius) !important; +} + +.rounded-3 { + border-radius: var(--bs-border-radius-lg) !important; +} + +.rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} + +.rounded-5 { + border-radius: var(--bs-border-radius-2xl) !important; +} + +.rounded-circle { + border-radius: 50% !important; +} + +.rounded-pill { + border-radius: var(--bs-border-radius-pill) !important; +} + +.rounded-top { + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; +} + +.rounded-end { + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; +} + +.rounded-bottom { + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; +} + +.rounded-start { + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; +} + +.visible { + visibility: visible !important; +} + +.invisible { + visibility: hidden !important; +} + +@media (min-width: 576px) { + .float-sm-start { + float: left !important; + } + .float-sm-end { + float: right !important; + } + .float-sm-none { + float: none !important; + } + .d-sm-inline { + display: inline !important; + } + .d-sm-inline-block { + display: inline-block !important; + } + .d-sm-block { + display: block !important; + } + .d-sm-grid { + display: grid !important; + } + .d-sm-table { + display: table !important; + } + .d-sm-table-row { + display: table-row !important; + } + .d-sm-table-cell { + display: table-cell !important; + } + .d-sm-flex { + display: flex !important; + } + .d-sm-inline-flex { + display: inline-flex !important; + } + .d-sm-none { + display: none !important; + } + .flex-sm-fill { + flex: 1 1 auto !important; + } + .flex-sm-row { + flex-direction: row !important; + } + .flex-sm-column { + flex-direction: column !important; + } + .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + .flex-sm-grow-0 { + flex-grow: 0 !important; + } + .flex-sm-grow-1 { + flex-grow: 1 !important; + } + .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + .flex-sm-wrap { + flex-wrap: wrap !important; + } + .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-sm-start { + justify-content: flex-start !important; + } + .justify-content-sm-end { + justify-content: flex-end !important; + } + .justify-content-sm-center { + justify-content: center !important; + } + .justify-content-sm-between { + justify-content: space-between !important; + } + .justify-content-sm-around { + justify-content: space-around !important; + } + .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + .align-items-sm-start { + align-items: flex-start !important; + } + .align-items-sm-end { + align-items: flex-end !important; + } + .align-items-sm-center { + align-items: center !important; + } + .align-items-sm-baseline { + align-items: baseline !important; + } + .align-items-sm-stretch { + align-items: stretch !important; + } + .align-content-sm-start { + align-content: flex-start !important; + } + .align-content-sm-end { + align-content: flex-end !important; + } + .align-content-sm-center { + align-content: center !important; + } + .align-content-sm-between { + align-content: space-between !important; + } + .align-content-sm-around { + align-content: space-around !important; + } + .align-content-sm-stretch { + align-content: stretch !important; + } + .align-self-sm-auto { + align-self: auto !important; + } + .align-self-sm-start { + align-self: flex-start !important; + } + .align-self-sm-end { + align-self: flex-end !important; + } + .align-self-sm-center { + align-self: center !important; + } + .align-self-sm-baseline { + align-self: baseline !important; + } + .align-self-sm-stretch { + align-self: stretch !important; + } + .order-sm-first { + order: -1 !important; + } + .order-sm-0 { + order: 0 !important; + } + .order-sm-1 { + order: 1 !important; + } + .order-sm-2 { + order: 2 !important; + } + .order-sm-3 { + order: 3 !important; + } + .order-sm-4 { + order: 4 !important; + } + .order-sm-5 { + order: 5 !important; + } + .order-sm-last { + order: 6 !important; + } + .m-sm-0 { + margin: 0 !important; + } + .m-sm-1 { + margin: 0.25rem !important; + } + .m-sm-2 { + margin: 0.5rem !important; + } + .m-sm-3 { + margin: 1rem !important; + } + .m-sm-4 { + margin: 1.5rem !important; + } + .m-sm-5 { + margin: 3rem !important; + } + .m-sm-auto { + margin: auto !important; + } + .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-sm-0 { + margin-top: 0 !important; + } + .mt-sm-1 { + margin-top: 0.25rem !important; + } + .mt-sm-2 { + margin-top: 0.5rem !important; + } + .mt-sm-3 { + margin-top: 1rem !important; + } + .mt-sm-4 { + margin-top: 1.5rem !important; + } + .mt-sm-5 { + margin-top: 3rem !important; + } + .mt-sm-auto { + margin-top: auto !important; + } + .me-sm-0 { + margin-right: 0 !important; + } + .me-sm-1 { + margin-right: 0.25rem !important; + } + .me-sm-2 { + margin-right: 0.5rem !important; + } + .me-sm-3 { + margin-right: 1rem !important; + } + .me-sm-4 { + margin-right: 1.5rem !important; + } + .me-sm-5 { + margin-right: 3rem !important; + } + .me-sm-auto { + margin-right: auto !important; + } + .mb-sm-0 { + margin-bottom: 0 !important; + } + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + .mb-sm-3 { + margin-bottom: 1rem !important; + } + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + .mb-sm-5 { + margin-bottom: 3rem !important; + } + .mb-sm-auto { + margin-bottom: auto !important; + } + .ms-sm-0 { + margin-left: 0 !important; + } + .ms-sm-1 { + margin-left: 0.25rem !important; + } + .ms-sm-2 { + margin-left: 0.5rem !important; + } + .ms-sm-3 { + margin-left: 1rem !important; + } + .ms-sm-4 { + margin-left: 1.5rem !important; + } + .ms-sm-5 { + margin-left: 3rem !important; + } + .ms-sm-auto { + margin-left: auto !important; + } + .p-sm-0 { + padding: 0 !important; + } + .p-sm-1 { + padding: 0.25rem !important; + } + .p-sm-2 { + padding: 0.5rem !important; + } + .p-sm-3 { + padding: 1rem !important; + } + .p-sm-4 { + padding: 1.5rem !important; + } + .p-sm-5 { + padding: 3rem !important; + } + .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-sm-0 { + padding-top: 0 !important; + } + .pt-sm-1 { + padding-top: 0.25rem !important; + } + .pt-sm-2 { + padding-top: 0.5rem !important; + } + .pt-sm-3 { + padding-top: 1rem !important; + } + .pt-sm-4 { + padding-top: 1.5rem !important; + } + .pt-sm-5 { + padding-top: 3rem !important; + } + .pe-sm-0 { + padding-right: 0 !important; + } + .pe-sm-1 { + padding-right: 0.25rem !important; + } + .pe-sm-2 { + padding-right: 0.5rem !important; + } + .pe-sm-3 { + padding-right: 1rem !important; + } + .pe-sm-4 { + padding-right: 1.5rem !important; + } + .pe-sm-5 { + padding-right: 3rem !important; + } + .pb-sm-0 { + padding-bottom: 0 !important; + } + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + .pb-sm-3 { + padding-bottom: 1rem !important; + } + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + .pb-sm-5 { + padding-bottom: 3rem !important; + } + .ps-sm-0 { + padding-left: 0 !important; + } + .ps-sm-1 { + padding-left: 0.25rem !important; + } + .ps-sm-2 { + padding-left: 0.5rem !important; + } + .ps-sm-3 { + padding-left: 1rem !important; + } + .ps-sm-4 { + padding-left: 1.5rem !important; + } + .ps-sm-5 { + padding-left: 3rem !important; + } + .gap-sm-0 { + gap: 0 !important; + } + .gap-sm-1 { + gap: 0.25rem !important; + } + .gap-sm-2 { + gap: 0.5rem !important; + } + .gap-sm-3 { + gap: 1rem !important; + } + .gap-sm-4 { + gap: 1.5rem !important; + } + .gap-sm-5 { + gap: 3rem !important; + } + .text-sm-start { + text-align: left !important; + } + .text-sm-end { + text-align: right !important; + } + .text-sm-center { + text-align: center !important; + } +} +@media (min-width: 768px) { + .float-md-start { + float: left !important; + } + .float-md-end { + float: right !important; + } + .float-md-none { + float: none !important; + } + .d-md-inline { + display: inline !important; + } + .d-md-inline-block { + display: inline-block !important; + } + .d-md-block { + display: block !important; + } + .d-md-grid { + display: grid !important; + } + .d-md-table { + display: table !important; + } + .d-md-table-row { + display: table-row !important; + } + .d-md-table-cell { + display: table-cell !important; + } + .d-md-flex { + display: flex !important; + } + .d-md-inline-flex { + display: inline-flex !important; + } + .d-md-none { + display: none !important; + } + .flex-md-fill { + flex: 1 1 auto !important; + } + .flex-md-row { + flex-direction: row !important; + } + .flex-md-column { + flex-direction: column !important; + } + .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + .flex-md-grow-0 { + flex-grow: 0 !important; + } + .flex-md-grow-1 { + flex-grow: 1 !important; + } + .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + .flex-md-wrap { + flex-wrap: wrap !important; + } + .flex-md-nowrap { + flex-wrap: nowrap !important; + } + .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-md-start { + justify-content: flex-start !important; + } + .justify-content-md-end { + justify-content: flex-end !important; + } + .justify-content-md-center { + justify-content: center !important; + } + .justify-content-md-between { + justify-content: space-between !important; + } + .justify-content-md-around { + justify-content: space-around !important; + } + .justify-content-md-evenly { + justify-content: space-evenly !important; + } + .align-items-md-start { + align-items: flex-start !important; + } + .align-items-md-end { + align-items: flex-end !important; + } + .align-items-md-center { + align-items: center !important; + } + .align-items-md-baseline { + align-items: baseline !important; + } + .align-items-md-stretch { + align-items: stretch !important; + } + .align-content-md-start { + align-content: flex-start !important; + } + .align-content-md-end { + align-content: flex-end !important; + } + .align-content-md-center { + align-content: center !important; + } + .align-content-md-between { + align-content: space-between !important; + } + .align-content-md-around { + align-content: space-around !important; + } + .align-content-md-stretch { + align-content: stretch !important; + } + .align-self-md-auto { + align-self: auto !important; + } + .align-self-md-start { + align-self: flex-start !important; + } + .align-self-md-end { + align-self: flex-end !important; + } + .align-self-md-center { + align-self: center !important; + } + .align-self-md-baseline { + align-self: baseline !important; + } + .align-self-md-stretch { + align-self: stretch !important; + } + .order-md-first { + order: -1 !important; + } + .order-md-0 { + order: 0 !important; + } + .order-md-1 { + order: 1 !important; + } + .order-md-2 { + order: 2 !important; + } + .order-md-3 { + order: 3 !important; + } + .order-md-4 { + order: 4 !important; + } + .order-md-5 { + order: 5 !important; + } + .order-md-last { + order: 6 !important; + } + .m-md-0 { + margin: 0 !important; + } + .m-md-1 { + margin: 0.25rem !important; + } + .m-md-2 { + margin: 0.5rem !important; + } + .m-md-3 { + margin: 1rem !important; + } + .m-md-4 { + margin: 1.5rem !important; + } + .m-md-5 { + margin: 3rem !important; + } + .m-md-auto { + margin: auto !important; + } + .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-md-0 { + margin-top: 0 !important; + } + .mt-md-1 { + margin-top: 0.25rem !important; + } + .mt-md-2 { + margin-top: 0.5rem !important; + } + .mt-md-3 { + margin-top: 1rem !important; + } + .mt-md-4 { + margin-top: 1.5rem !important; + } + .mt-md-5 { + margin-top: 3rem !important; + } + .mt-md-auto { + margin-top: auto !important; + } + .me-md-0 { + margin-right: 0 !important; + } + .me-md-1 { + margin-right: 0.25rem !important; + } + .me-md-2 { + margin-right: 0.5rem !important; + } + .me-md-3 { + margin-right: 1rem !important; + } + .me-md-4 { + margin-right: 1.5rem !important; + } + .me-md-5 { + margin-right: 3rem !important; + } + .me-md-auto { + margin-right: auto !important; + } + .mb-md-0 { + margin-bottom: 0 !important; + } + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + .mb-md-3 { + margin-bottom: 1rem !important; + } + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + .mb-md-5 { + margin-bottom: 3rem !important; + } + .mb-md-auto { + margin-bottom: auto !important; + } + .ms-md-0 { + margin-left: 0 !important; + } + .ms-md-1 { + margin-left: 0.25rem !important; + } + .ms-md-2 { + margin-left: 0.5rem !important; + } + .ms-md-3 { + margin-left: 1rem !important; + } + .ms-md-4 { + margin-left: 1.5rem !important; + } + .ms-md-5 { + margin-left: 3rem !important; + } + .ms-md-auto { + margin-left: auto !important; + } + .p-md-0 { + padding: 0 !important; + } + .p-md-1 { + padding: 0.25rem !important; + } + .p-md-2 { + padding: 0.5rem !important; + } + .p-md-3 { + padding: 1rem !important; + } + .p-md-4 { + padding: 1.5rem !important; + } + .p-md-5 { + padding: 3rem !important; + } + .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-md-0 { + padding-top: 0 !important; + } + .pt-md-1 { + padding-top: 0.25rem !important; + } + .pt-md-2 { + padding-top: 0.5rem !important; + } + .pt-md-3 { + padding-top: 1rem !important; + } + .pt-md-4 { + padding-top: 1.5rem !important; + } + .pt-md-5 { + padding-top: 3rem !important; + } + .pe-md-0 { + padding-right: 0 !important; + } + .pe-md-1 { + padding-right: 0.25rem !important; + } + .pe-md-2 { + padding-right: 0.5rem !important; + } + .pe-md-3 { + padding-right: 1rem !important; + } + .pe-md-4 { + padding-right: 1.5rem !important; + } + .pe-md-5 { + padding-right: 3rem !important; + } + .pb-md-0 { + padding-bottom: 0 !important; + } + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + .pb-md-3 { + padding-bottom: 1rem !important; + } + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + .pb-md-5 { + padding-bottom: 3rem !important; + } + .ps-md-0 { + padding-left: 0 !important; + } + .ps-md-1 { + padding-left: 0.25rem !important; + } + .ps-md-2 { + padding-left: 0.5rem !important; + } + .ps-md-3 { + padding-left: 1rem !important; + } + .ps-md-4 { + padding-left: 1.5rem !important; + } + .ps-md-5 { + padding-left: 3rem !important; + } + .gap-md-0 { + gap: 0 !important; + } + .gap-md-1 { + gap: 0.25rem !important; + } + .gap-md-2 { + gap: 0.5rem !important; + } + .gap-md-3 { + gap: 1rem !important; + } + .gap-md-4 { + gap: 1.5rem !important; + } + .gap-md-5 { + gap: 3rem !important; + } + .text-md-start { + text-align: left !important; + } + .text-md-end { + text-align: right !important; + } + .text-md-center { + text-align: center !important; + } +} +@media (min-width: 992px) { + .float-lg-start { + float: left !important; + } + .float-lg-end { + float: right !important; + } + .float-lg-none { + float: none !important; + } + .d-lg-inline { + display: inline !important; + } + .d-lg-inline-block { + display: inline-block !important; + } + .d-lg-block { + display: block !important; + } + .d-lg-grid { + display: grid !important; + } + .d-lg-table { + display: table !important; + } + .d-lg-table-row { + display: table-row !important; + } + .d-lg-table-cell { + display: table-cell !important; + } + .d-lg-flex { + display: flex !important; + } + .d-lg-inline-flex { + display: inline-flex !important; + } + .d-lg-none { + display: none !important; + } + .flex-lg-fill { + flex: 1 1 auto !important; + } + .flex-lg-row { + flex-direction: row !important; + } + .flex-lg-column { + flex-direction: column !important; + } + .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + .flex-lg-grow-0 { + flex-grow: 0 !important; + } + .flex-lg-grow-1 { + flex-grow: 1 !important; + } + .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + .flex-lg-wrap { + flex-wrap: wrap !important; + } + .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-lg-start { + justify-content: flex-start !important; + } + .justify-content-lg-end { + justify-content: flex-end !important; + } + .justify-content-lg-center { + justify-content: center !important; + } + .justify-content-lg-between { + justify-content: space-between !important; + } + .justify-content-lg-around { + justify-content: space-around !important; + } + .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + .align-items-lg-start { + align-items: flex-start !important; + } + .align-items-lg-end { + align-items: flex-end !important; + } + .align-items-lg-center { + align-items: center !important; + } + .align-items-lg-baseline { + align-items: baseline !important; + } + .align-items-lg-stretch { + align-items: stretch !important; + } + .align-content-lg-start { + align-content: flex-start !important; + } + .align-content-lg-end { + align-content: flex-end !important; + } + .align-content-lg-center { + align-content: center !important; + } + .align-content-lg-between { + align-content: space-between !important; + } + .align-content-lg-around { + align-content: space-around !important; + } + .align-content-lg-stretch { + align-content: stretch !important; + } + .align-self-lg-auto { + align-self: auto !important; + } + .align-self-lg-start { + align-self: flex-start !important; + } + .align-self-lg-end { + align-self: flex-end !important; + } + .align-self-lg-center { + align-self: center !important; + } + .align-self-lg-baseline { + align-self: baseline !important; + } + .align-self-lg-stretch { + align-self: stretch !important; + } + .order-lg-first { + order: -1 !important; + } + .order-lg-0 { + order: 0 !important; + } + .order-lg-1 { + order: 1 !important; + } + .order-lg-2 { + order: 2 !important; + } + .order-lg-3 { + order: 3 !important; + } + .order-lg-4 { + order: 4 !important; + } + .order-lg-5 { + order: 5 !important; + } + .order-lg-last { + order: 6 !important; + } + .m-lg-0 { + margin: 0 !important; + } + .m-lg-1 { + margin: 0.25rem !important; + } + .m-lg-2 { + margin: 0.5rem !important; + } + .m-lg-3 { + margin: 1rem !important; + } + .m-lg-4 { + margin: 1.5rem !important; + } + .m-lg-5 { + margin: 3rem !important; + } + .m-lg-auto { + margin: auto !important; + } + .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-lg-0 { + margin-top: 0 !important; + } + .mt-lg-1 { + margin-top: 0.25rem !important; + } + .mt-lg-2 { + margin-top: 0.5rem !important; + } + .mt-lg-3 { + margin-top: 1rem !important; + } + .mt-lg-4 { + margin-top: 1.5rem !important; + } + .mt-lg-5 { + margin-top: 3rem !important; + } + .mt-lg-auto { + margin-top: auto !important; + } + .me-lg-0 { + margin-right: 0 !important; + } + .me-lg-1 { + margin-right: 0.25rem !important; + } + .me-lg-2 { + margin-right: 0.5rem !important; + } + .me-lg-3 { + margin-right: 1rem !important; + } + .me-lg-4 { + margin-right: 1.5rem !important; + } + .me-lg-5 { + margin-right: 3rem !important; + } + .me-lg-auto { + margin-right: auto !important; + } + .mb-lg-0 { + margin-bottom: 0 !important; + } + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + .mb-lg-3 { + margin-bottom: 1rem !important; + } + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + .mb-lg-5 { + margin-bottom: 3rem !important; + } + .mb-lg-auto { + margin-bottom: auto !important; + } + .ms-lg-0 { + margin-left: 0 !important; + } + .ms-lg-1 { + margin-left: 0.25rem !important; + } + .ms-lg-2 { + margin-left: 0.5rem !important; + } + .ms-lg-3 { + margin-left: 1rem !important; + } + .ms-lg-4 { + margin-left: 1.5rem !important; + } + .ms-lg-5 { + margin-left: 3rem !important; + } + .ms-lg-auto { + margin-left: auto !important; + } + .p-lg-0 { + padding: 0 !important; + } + .p-lg-1 { + padding: 0.25rem !important; + } + .p-lg-2 { + padding: 0.5rem !important; + } + .p-lg-3 { + padding: 1rem !important; + } + .p-lg-4 { + padding: 1.5rem !important; + } + .p-lg-5 { + padding: 3rem !important; + } + .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-lg-0 { + padding-top: 0 !important; + } + .pt-lg-1 { + padding-top: 0.25rem !important; + } + .pt-lg-2 { + padding-top: 0.5rem !important; + } + .pt-lg-3 { + padding-top: 1rem !important; + } + .pt-lg-4 { + padding-top: 1.5rem !important; + } + .pt-lg-5 { + padding-top: 3rem !important; + } + .pe-lg-0 { + padding-right: 0 !important; + } + .pe-lg-1 { + padding-right: 0.25rem !important; + } + .pe-lg-2 { + padding-right: 0.5rem !important; + } + .pe-lg-3 { + padding-right: 1rem !important; + } + .pe-lg-4 { + padding-right: 1.5rem !important; + } + .pe-lg-5 { + padding-right: 3rem !important; + } + .pb-lg-0 { + padding-bottom: 0 !important; + } + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + .pb-lg-3 { + padding-bottom: 1rem !important; + } + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + .pb-lg-5 { + padding-bottom: 3rem !important; + } + .ps-lg-0 { + padding-left: 0 !important; + } + .ps-lg-1 { + padding-left: 0.25rem !important; + } + .ps-lg-2 { + padding-left: 0.5rem !important; + } + .ps-lg-3 { + padding-left: 1rem !important; + } + .ps-lg-4 { + padding-left: 1.5rem !important; + } + .ps-lg-5 { + padding-left: 3rem !important; + } + .gap-lg-0 { + gap: 0 !important; + } + .gap-lg-1 { + gap: 0.25rem !important; + } + .gap-lg-2 { + gap: 0.5rem !important; + } + .gap-lg-3 { + gap: 1rem !important; + } + .gap-lg-4 { + gap: 1.5rem !important; + } + .gap-lg-5 { + gap: 3rem !important; + } + .text-lg-start { + text-align: left !important; + } + .text-lg-end { + text-align: right !important; + } + .text-lg-center { + text-align: center !important; + } +} +@media (min-width: 1200px) { + .float-xl-start { + float: left !important; + } + .float-xl-end { + float: right !important; + } + .float-xl-none { + float: none !important; + } + .d-xl-inline { + display: inline !important; + } + .d-xl-inline-block { + display: inline-block !important; + } + .d-xl-block { + display: block !important; + } + .d-xl-grid { + display: grid !important; + } + .d-xl-table { + display: table !important; + } + .d-xl-table-row { + display: table-row !important; + } + .d-xl-table-cell { + display: table-cell !important; + } + .d-xl-flex { + display: flex !important; + } + .d-xl-inline-flex { + display: inline-flex !important; + } + .d-xl-none { + display: none !important; + } + .flex-xl-fill { + flex: 1 1 auto !important; + } + .flex-xl-row { + flex-direction: row !important; + } + .flex-xl-column { + flex-direction: column !important; + } + .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + .flex-xl-grow-0 { + flex-grow: 0 !important; + } + .flex-xl-grow-1 { + flex-grow: 1 !important; + } + .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + .flex-xl-wrap { + flex-wrap: wrap !important; + } + .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-xl-start { + justify-content: flex-start !important; + } + .justify-content-xl-end { + justify-content: flex-end !important; + } + .justify-content-xl-center { + justify-content: center !important; + } + .justify-content-xl-between { + justify-content: space-between !important; + } + .justify-content-xl-around { + justify-content: space-around !important; + } + .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + .align-items-xl-start { + align-items: flex-start !important; + } + .align-items-xl-end { + align-items: flex-end !important; + } + .align-items-xl-center { + align-items: center !important; + } + .align-items-xl-baseline { + align-items: baseline !important; + } + .align-items-xl-stretch { + align-items: stretch !important; + } + .align-content-xl-start { + align-content: flex-start !important; + } + .align-content-xl-end { + align-content: flex-end !important; + } + .align-content-xl-center { + align-content: center !important; + } + .align-content-xl-between { + align-content: space-between !important; + } + .align-content-xl-around { + align-content: space-around !important; + } + .align-content-xl-stretch { + align-content: stretch !important; + } + .align-self-xl-auto { + align-self: auto !important; + } + .align-self-xl-start { + align-self: flex-start !important; + } + .align-self-xl-end { + align-self: flex-end !important; + } + .align-self-xl-center { + align-self: center !important; + } + .align-self-xl-baseline { + align-self: baseline !important; + } + .align-self-xl-stretch { + align-self: stretch !important; + } + .order-xl-first { + order: -1 !important; + } + .order-xl-0 { + order: 0 !important; + } + .order-xl-1 { + order: 1 !important; + } + .order-xl-2 { + order: 2 !important; + } + .order-xl-3 { + order: 3 !important; + } + .order-xl-4 { + order: 4 !important; + } + .order-xl-5 { + order: 5 !important; + } + .order-xl-last { + order: 6 !important; + } + .m-xl-0 { + margin: 0 !important; + } + .m-xl-1 { + margin: 0.25rem !important; + } + .m-xl-2 { + margin: 0.5rem !important; + } + .m-xl-3 { + margin: 1rem !important; + } + .m-xl-4 { + margin: 1.5rem !important; + } + .m-xl-5 { + margin: 3rem !important; + } + .m-xl-auto { + margin: auto !important; + } + .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xl-0 { + margin-top: 0 !important; + } + .mt-xl-1 { + margin-top: 0.25rem !important; + } + .mt-xl-2 { + margin-top: 0.5rem !important; + } + .mt-xl-3 { + margin-top: 1rem !important; + } + .mt-xl-4 { + margin-top: 1.5rem !important; + } + .mt-xl-5 { + margin-top: 3rem !important; + } + .mt-xl-auto { + margin-top: auto !important; + } + .me-xl-0 { + margin-right: 0 !important; + } + .me-xl-1 { + margin-right: 0.25rem !important; + } + .me-xl-2 { + margin-right: 0.5rem !important; + } + .me-xl-3 { + margin-right: 1rem !important; + } + .me-xl-4 { + margin-right: 1.5rem !important; + } + .me-xl-5 { + margin-right: 3rem !important; + } + .me-xl-auto { + margin-right: auto !important; + } + .mb-xl-0 { + margin-bottom: 0 !important; + } + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xl-3 { + margin-bottom: 1rem !important; + } + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xl-5 { + margin-bottom: 3rem !important; + } + .mb-xl-auto { + margin-bottom: auto !important; + } + .ms-xl-0 { + margin-left: 0 !important; + } + .ms-xl-1 { + margin-left: 0.25rem !important; + } + .ms-xl-2 { + margin-left: 0.5rem !important; + } + .ms-xl-3 { + margin-left: 1rem !important; + } + .ms-xl-4 { + margin-left: 1.5rem !important; + } + .ms-xl-5 { + margin-left: 3rem !important; + } + .ms-xl-auto { + margin-left: auto !important; + } + .p-xl-0 { + padding: 0 !important; + } + .p-xl-1 { + padding: 0.25rem !important; + } + .p-xl-2 { + padding: 0.5rem !important; + } + .p-xl-3 { + padding: 1rem !important; + } + .p-xl-4 { + padding: 1.5rem !important; + } + .p-xl-5 { + padding: 3rem !important; + } + .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-xl-0 { + padding-top: 0 !important; + } + .pt-xl-1 { + padding-top: 0.25rem !important; + } + .pt-xl-2 { + padding-top: 0.5rem !important; + } + .pt-xl-3 { + padding-top: 1rem !important; + } + .pt-xl-4 { + padding-top: 1.5rem !important; + } + .pt-xl-5 { + padding-top: 3rem !important; + } + .pe-xl-0 { + padding-right: 0 !important; + } + .pe-xl-1 { + padding-right: 0.25rem !important; + } + .pe-xl-2 { + padding-right: 0.5rem !important; + } + .pe-xl-3 { + padding-right: 1rem !important; + } + .pe-xl-4 { + padding-right: 1.5rem !important; + } + .pe-xl-5 { + padding-right: 3rem !important; + } + .pb-xl-0 { + padding-bottom: 0 !important; + } + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xl-3 { + padding-bottom: 1rem !important; + } + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xl-5 { + padding-bottom: 3rem !important; + } + .ps-xl-0 { + padding-left: 0 !important; + } + .ps-xl-1 { + padding-left: 0.25rem !important; + } + .ps-xl-2 { + padding-left: 0.5rem !important; + } + .ps-xl-3 { + padding-left: 1rem !important; + } + .ps-xl-4 { + padding-left: 1.5rem !important; + } + .ps-xl-5 { + padding-left: 3rem !important; + } + .gap-xl-0 { + gap: 0 !important; + } + .gap-xl-1 { + gap: 0.25rem !important; + } + .gap-xl-2 { + gap: 0.5rem !important; + } + .gap-xl-3 { + gap: 1rem !important; + } + .gap-xl-4 { + gap: 1.5rem !important; + } + .gap-xl-5 { + gap: 3rem !important; + } + .text-xl-start { + text-align: left !important; + } + .text-xl-end { + text-align: right !important; + } + .text-xl-center { + text-align: center !important; + } +} +@media (min-width: 1400px) { + .float-xxl-start { + float: left !important; + } + .float-xxl-end { + float: right !important; + } + .float-xxl-none { + float: none !important; + } + .d-xxl-inline { + display: inline !important; + } + .d-xxl-inline-block { + display: inline-block !important; + } + .d-xxl-block { + display: block !important; + } + .d-xxl-grid { + display: grid !important; + } + .d-xxl-table { + display: table !important; + } + .d-xxl-table-row { + display: table-row !important; + } + .d-xxl-table-cell { + display: table-cell !important; + } + .d-xxl-flex { + display: flex !important; + } + .d-xxl-inline-flex { + display: inline-flex !important; + } + .d-xxl-none { + display: none !important; + } + .flex-xxl-fill { + flex: 1 1 auto !important; + } + .flex-xxl-row { + flex-direction: row !important; + } + .flex-xxl-column { + flex-direction: column !important; + } + .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + .flex-xxl-wrap { + flex-wrap: wrap !important; + } + .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + .justify-content-xxl-start { + justify-content: flex-start !important; + } + .justify-content-xxl-end { + justify-content: flex-end !important; + } + .justify-content-xxl-center { + justify-content: center !important; + } + .justify-content-xxl-between { + justify-content: space-between !important; + } + .justify-content-xxl-around { + justify-content: space-around !important; + } + .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + .align-items-xxl-start { + align-items: flex-start !important; + } + .align-items-xxl-end { + align-items: flex-end !important; + } + .align-items-xxl-center { + align-items: center !important; + } + .align-items-xxl-baseline { + align-items: baseline !important; + } + .align-items-xxl-stretch { + align-items: stretch !important; + } + .align-content-xxl-start { + align-content: flex-start !important; + } + .align-content-xxl-end { + align-content: flex-end !important; + } + .align-content-xxl-center { + align-content: center !important; + } + .align-content-xxl-between { + align-content: space-between !important; + } + .align-content-xxl-around { + align-content: space-around !important; + } + .align-content-xxl-stretch { + align-content: stretch !important; + } + .align-self-xxl-auto { + align-self: auto !important; + } + .align-self-xxl-start { + align-self: flex-start !important; + } + .align-self-xxl-end { + align-self: flex-end !important; + } + .align-self-xxl-center { + align-self: center !important; + } + .align-self-xxl-baseline { + align-self: baseline !important; + } + .align-self-xxl-stretch { + align-self: stretch !important; + } + .order-xxl-first { + order: -1 !important; + } + .order-xxl-0 { + order: 0 !important; + } + .order-xxl-1 { + order: 1 !important; + } + .order-xxl-2 { + order: 2 !important; + } + .order-xxl-3 { + order: 3 !important; + } + .order-xxl-4 { + order: 4 !important; + } + .order-xxl-5 { + order: 5 !important; + } + .order-xxl-last { + order: 6 !important; + } + .m-xxl-0 { + margin: 0 !important; + } + .m-xxl-1 { + margin: 0.25rem !important; + } + .m-xxl-2 { + margin: 0.5rem !important; + } + .m-xxl-3 { + margin: 1rem !important; + } + .m-xxl-4 { + margin: 1.5rem !important; + } + .m-xxl-5 { + margin: 3rem !important; + } + .m-xxl-auto { + margin: auto !important; + } + .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + .mt-xxl-0 { + margin-top: 0 !important; + } + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + .mt-xxl-3 { + margin-top: 1rem !important; + } + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + .mt-xxl-5 { + margin-top: 3rem !important; + } + .mt-xxl-auto { + margin-top: auto !important; + } + .me-xxl-0 { + margin-right: 0 !important; + } + .me-xxl-1 { + margin-right: 0.25rem !important; + } + .me-xxl-2 { + margin-right: 0.5rem !important; + } + .me-xxl-3 { + margin-right: 1rem !important; + } + .me-xxl-4 { + margin-right: 1.5rem !important; + } + .me-xxl-5 { + margin-right: 3rem !important; + } + .me-xxl-auto { + margin-right: auto !important; + } + .mb-xxl-0 { + margin-bottom: 0 !important; + } + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + .mb-xxl-auto { + margin-bottom: auto !important; + } + .ms-xxl-0 { + margin-left: 0 !important; + } + .ms-xxl-1 { + margin-left: 0.25rem !important; + } + .ms-xxl-2 { + margin-left: 0.5rem !important; + } + .ms-xxl-3 { + margin-left: 1rem !important; + } + .ms-xxl-4 { + margin-left: 1.5rem !important; + } + .ms-xxl-5 { + margin-left: 3rem !important; + } + .ms-xxl-auto { + margin-left: auto !important; + } + .p-xxl-0 { + padding: 0 !important; + } + .p-xxl-1 { + padding: 0.25rem !important; + } + .p-xxl-2 { + padding: 0.5rem !important; + } + .p-xxl-3 { + padding: 1rem !important; + } + .p-xxl-4 { + padding: 1.5rem !important; + } + .p-xxl-5 { + padding: 3rem !important; + } + .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + .pt-xxl-0 { + padding-top: 0 !important; + } + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + .pt-xxl-3 { + padding-top: 1rem !important; + } + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + .pt-xxl-5 { + padding-top: 3rem !important; + } + .pe-xxl-0 { + padding-right: 0 !important; + } + .pe-xxl-1 { + padding-right: 0.25rem !important; + } + .pe-xxl-2 { + padding-right: 0.5rem !important; + } + .pe-xxl-3 { + padding-right: 1rem !important; + } + .pe-xxl-4 { + padding-right: 1.5rem !important; + } + .pe-xxl-5 { + padding-right: 3rem !important; + } + .pb-xxl-0 { + padding-bottom: 0 !important; + } + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + .ps-xxl-0 { + padding-left: 0 !important; + } + .ps-xxl-1 { + padding-left: 0.25rem !important; + } + .ps-xxl-2 { + padding-left: 0.5rem !important; + } + .ps-xxl-3 { + padding-left: 1rem !important; + } + .ps-xxl-4 { + padding-left: 1.5rem !important; + } + .ps-xxl-5 { + padding-left: 3rem !important; + } + .gap-xxl-0 { + gap: 0 !important; + } + .gap-xxl-1 { + gap: 0.25rem !important; + } + .gap-xxl-2 { + gap: 0.5rem !important; + } + .gap-xxl-3 { + gap: 1rem !important; + } + .gap-xxl-4 { + gap: 1.5rem !important; + } + .gap-xxl-5 { + gap: 3rem !important; + } + .text-xxl-start { + text-align: left !important; + } + .text-xxl-end { + text-align: right !important; + } + .text-xxl-center { + text-align: center !important; + } +} +@media (min-width: 1200px) { + .fs-1 { + font-size: 2.5rem !important; + } + .fs-2 { + font-size: 2rem !important; + } + .fs-3 { + font-size: 1.75rem !important; + } + .fs-4 { + font-size: 1.5rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + .d-print-inline-block { + display: inline-block !important; + } + .d-print-block { + display: block !important; + } + .d-print-grid { + display: grid !important; + } + .d-print-table { + display: table !important; + } + .d-print-table-row { + display: table-row !important; + } + .d-print-table-cell { + display: table-cell !important; + } + .d-print-flex { + display: flex !important; + } + .d-print-inline-flex { + display: inline-flex !important; + } + .d-print-none { + display: none !important; + } +} +.bg-customcolor { + background-color: rgb(21, 21, 21); +} + +.profile-icon { + height: 35px; + width: 35px; +} + +.mt-6 { + margin-top: 6rem !important; +} + +.border-bottom-red { + border-bottom: 2px solid red; +} + +#nav-container a { + color: white; +} + + +.background-container { + background-image: url("../../images/loginbackground.jpg"); + height: 100vh; + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} + +.post-img { + width: 60%; + height: auto; +} + +.mt-6 { + margin-top: 6rem !important; +} + +/*# sourceMappingURL=styles.css.map */ diff --git a/dist/css/styles.css.map b/dist/css/styles.css.map new file mode 100644 index 0000000..83a249d --- /dev/null +++ b/dist/css/styles.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../node_modules/bootstrap/scss/mixins/_banner.scss","../../node_modules/bootstrap/scss/_root.scss","../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../node_modules/bootstrap/scss/_reboot.scss","../../node_modules/bootstrap/scss/_variables.scss","../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../node_modules/bootstrap/scss/_type.scss","../../node_modules/bootstrap/scss/mixins/_lists.scss","../../node_modules/bootstrap/scss/_images.scss","../../node_modules/bootstrap/scss/mixins/_image.scss","../../node_modules/bootstrap/scss/_containers.scss","../../node_modules/bootstrap/scss/mixins/_container.scss","../../node_modules/bootstrap/scss/mixins/_breakpoints.scss","../../node_modules/bootstrap/scss/_grid.scss","../../node_modules/bootstrap/scss/mixins/_grid.scss","../../node_modules/bootstrap/scss/_tables.scss","../../node_modules/bootstrap/scss/mixins/_table-variants.scss","../../node_modules/bootstrap/scss/forms/_labels.scss","../../node_modules/bootstrap/scss/forms/_form-text.scss","../../node_modules/bootstrap/scss/forms/_form-control.scss","../../node_modules/bootstrap/scss/mixins/_transition.scss","../../node_modules/bootstrap/scss/mixins/_gradients.scss","../../node_modules/bootstrap/scss/forms/_form-select.scss","../../node_modules/bootstrap/scss/forms/_form-check.scss","../../node_modules/bootstrap/scss/forms/_form-range.scss","../../node_modules/bootstrap/scss/forms/_floating-labels.scss","../../node_modules/bootstrap/scss/forms/_input-group.scss","../../node_modules/bootstrap/scss/mixins/_forms.scss","../../node_modules/bootstrap/scss/_buttons.scss","../../node_modules/bootstrap/scss/mixins/_buttons.scss","../../node_modules/bootstrap/scss/_transitions.scss","../../node_modules/bootstrap/scss/_dropdown.scss","../../node_modules/bootstrap/scss/mixins/_caret.scss","../../node_modules/bootstrap/scss/_button-group.scss","../../node_modules/bootstrap/scss/_nav.scss","../../node_modules/bootstrap/scss/_navbar.scss","../../node_modules/bootstrap/scss/_card.scss","../../node_modules/bootstrap/scss/_accordion.scss","../../node_modules/bootstrap/scss/_breadcrumb.scss","../../node_modules/bootstrap/scss/_pagination.scss","../../node_modules/bootstrap/scss/mixins/_pagination.scss","../../node_modules/bootstrap/scss/_badge.scss","../../node_modules/bootstrap/scss/_alert.scss","../../node_modules/bootstrap/scss/mixins/_alert.scss","../../node_modules/bootstrap/scss/_progress.scss","../../node_modules/bootstrap/scss/_list-group.scss","../../node_modules/bootstrap/scss/mixins/_list-group.scss","../../node_modules/bootstrap/scss/_close.scss","../../node_modules/bootstrap/scss/_toasts.scss","../../node_modules/bootstrap/scss/_modal.scss","../../node_modules/bootstrap/scss/mixins/_backdrop.scss","../../node_modules/bootstrap/scss/_tooltip.scss","../../node_modules/bootstrap/scss/mixins/_reset-text.scss","../../node_modules/bootstrap/scss/_popover.scss","../../node_modules/bootstrap/scss/_carousel.scss","../../node_modules/bootstrap/scss/mixins/_clearfix.scss","../../node_modules/bootstrap/scss/_spinners.scss","../../node_modules/bootstrap/scss/_offcanvas.scss","../../node_modules/bootstrap/scss/_placeholders.scss","../../node_modules/bootstrap/scss/helpers/_color-bg.scss","../../node_modules/bootstrap/scss/helpers/_colored-links.scss","../../node_modules/bootstrap/scss/helpers/_ratio.scss","../../node_modules/bootstrap/scss/helpers/_position.scss","../../node_modules/bootstrap/scss/helpers/_stacks.scss","../../node_modules/bootstrap/scss/helpers/_visually-hidden.scss","../../node_modules/bootstrap/scss/mixins/_visually-hidden.scss","../../node_modules/bootstrap/scss/helpers/_stretched-link.scss","../../node_modules/bootstrap/scss/helpers/_text-truncation.scss","../../node_modules/bootstrap/scss/mixins/_text-truncate.scss","../../node_modules/bootstrap/scss/helpers/_vr.scss","../../node_modules/bootstrap/scss/mixins/_utilities.scss","../../node_modules/bootstrap/scss/utilities/_api.scss","../../src/scss/_navbar.scss","../../src/scss/_index.scss"],"names":[],"mappings":";AACE;AAAA;AAAA;AAAA;AAAA;AAAA;ACDF;EAQI;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAIA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAIA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAIA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAGF;EACA;EACA;EACA;EAMA;EACA;EACA;EAOA;EC4PI,qBALI;EDrPR;EACA;EACA;EAIA;EAIA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EAEA;EAEA;;;AExDF;AAAA;AAAA;EAGE;;;AAeE;EANJ;IAOM;;;;AAcN;EACE;EACA;EDmPI,WALI;EC5OR;EACA;EACA;EACA;EACA;EACA;EACA;;;AASF;EACE;EACA,OCijB4B;EDhjB5B;EACA;EACA,SCujB4B;;;AD7iB9B;EACE;EACA,eCwf4B;EDrf5B,aCwf4B;EDvf5B,aCwf4B;;;ADpf9B;ED6MQ;;AAlKJ;EC3CJ;IDoNQ;;;;AC/MR;EDwMQ;;AAlKJ;ECtCJ;ID+MQ;;;;AC1MR;EDmMQ;;AAlKJ;ECjCJ;ID0MQ;;;;ACrMR;ED8LQ;;AAlKJ;EC5BJ;IDqMQ;;;;AChMR;EDqLM,WALI;;;AC3KV;EDgLM,WALI;;;AChKV;EACE;EACA,eCmS0B;;;ADzR5B;EACE;EACA;EACA;;;AAMF;EACE;EACA;EACA;;;AAMF;AAAA;EAEE;;;AAGF;AAAA;AAAA;EAGE;EACA;;;AAGF;AAAA;AAAA;AAAA;EAIE;;;AAGF;EACE,aC6X4B;;;ADxX9B;EACE;EACA;;;AAMF;EACE;;;AAQF;AAAA;EAEE,aCsW4B;;;AD9V9B;EDmFM,WALI;;;ACvEV;EACE,SC+a4B;ED9a5B;;;AASF;AAAA;EAEE;ED+DI,WALI;ECxDR;EACA;;;AAGF;EAAM;;;AACN;EAAM;;;AAKN;EACE;EACA,iBCqKwC;;ADnKxC;EACE;;;AAWF;EAEE;EACA;;;AAOJ;AAAA;AAAA;AAAA;EAIE,aCkR4B;EF7PxB,WALI;;;ACRV;EACE;EACA;EACA;EACA;EDSI,WALI;;ACCR;EDII,WALI;ECGN;EACA;;;AAIJ;EDHM,WALI;ECUR;EACA;;AAGA;EACE;;;AAIJ;EACE;EDfI,WALI;ECsBR,OCsyCkC;EDryClC,kBCsyCkC;EC1kDhC;;AFuSF;EACE;EDtBE,WALI;;;ACsCV;EACE;;;AAMF;AAAA;EAEE;;;AAQF;EACE;EACA;;;AAGF;EACE,aCsT4B;EDrT5B,gBCqT4B;EDpT5B,OCjVS;EDkVT;;;AAOF;EAEE;EACA;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;EACA;EACA;;;AAQF;EACE;;;AAMF;EAEE;;;AAQF;EACE;;;AAKF;AAAA;AAAA;AAAA;AAAA;EAKE;EACA;EDrHI,WALI;EC4HR;;;AAIF;AAAA;EAEE;;;AAKF;EACE;;;AAGF;EAGE;;AAGA;EACE;;;AAOJ;EACE;;;AAQF;AAAA;AAAA;AAAA;EAIE;;AAGE;AAAA;AAAA;AAAA;EACE;;;AAON;EACE;EACA;;;AAKF;EACE;;;AAUF;EACE;EACA;EACA;EACA;;;AAQF;EACE;EACA;EACA;EACA,eC8I4B;EFxVtB;EC6MN;;AD/WE;ECwWJ;ID/LQ;;;ACwMN;EACE;;;AAOJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAOE;;;AAGF;EACE;;;AASF;EACE;EACA;;;AAQF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;EACE;;;AAKF;EACE;;;AAOF;EACE;EACA;;;AAKF;EACE;;;AAKF;EACE;;;AAOF;EACE;EACA;;;AAQF;EACE;;;AAQF;EACE;;;AGpkBF;EJyQM,WALI;EIlQR,aFwkB4B;;;AEnkB5B;EJsQM;EIlQJ,aFyjBkB;EExjBlB,aFwiB0B;;AFzc1B;EIpGF;IJ6QM;;;;AI7QN;EJsQM;EIlQJ,aFyjBkB;EExjBlB,aFwiB0B;;AFzc1B;EIpGF;IJ6QM;;;;AI7QN;EJsQM;EIlQJ,aFyjBkB;EExjBlB,aFwiB0B;;AFzc1B;EIpGF;IJ6QM;;;;AI7QN;EJsQM;EIlQJ,aFyjBkB;EExjBlB,aFwiB0B;;AFzc1B;EIpGF;IJ6QM;;;;AI7QN;EJsQM;EIlQJ,aFyjBkB;EExjBlB,aFwiB0B;;AFzc1B;EIpGF;IJ6QM;;;;AI7QN;EJsQM;EIlQJ,aFyjBkB;EExjBlB,aFwiB0B;;AFzc1B;EIpGF;IJ6QM;;;;AIrPR;ECvDE;EACA;;;AD2DF;EC5DE;EACA;;;AD8DF;EACE;;AAEA;EACE,cFgkB0B;;;AEtjB9B;EJoNM,WALI;EI7MR;;;AAIF;EACE,eF6RO;EFhFH,WALI;;AIrMR;EACE;;;AAIJ;EACE;EACA,eFmRO;EFhFH,WALI;EI5LR,OFtFS;;AEwFT;EACE;;;AEhGJ;ECIE;EAGA;;;ADDF;EACE,SJ68CkC;EI58ClC,kBJPS;EIQT;EHGE;EIRF;EAGA;;;ADcF;EAEE;;;AAGF;EACE;EACA;;;AAGF;EN+PM,WALI;EMxPR,OJ1BS;;;AMRT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ECHA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACsDE;EF5CE;IACE,WN6ae;;;AQlYnB;EF5CE;IACE,WN6ae;;;AQlYnB;EF5CE;IACE,WN6ae;;;AQlYnB;EF5CE;IACE,WN6ae;;;AQlYnB;EF5CE;IACE,WN6ae;;;AS5brB;ECAA;EACA;EACA;EACA;EAEA;EACA;EACA;;ADJE;ECaF;EACA;EACA;EACA;EACA;EACA;;;AA+CI;EACE;;;AAGF;EApCJ;EACA;;;AAcA;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AA+BE;EAhDJ;EACA;;;AAqDQ;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AA+DM;EAhEN;EACA;;;AAuEQ;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAwDU;EAxDV;;;AAmEM;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAPF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAPF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAPF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAPF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAPF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AF1DN;EEUE;IACE;;EAGF;IApCJ;IACA;;EAcA;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EA+BE;IAhDJ;IACA;;EAqDQ;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EAuEQ;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAmEM;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;;AF1DN;EEUE;IACE;;EAGF;IApCJ;IACA;;EAcA;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EA+BE;IAhDJ;IACA;;EAqDQ;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EAuEQ;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAmEM;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;;AF1DN;EEUE;IACE;;EAGF;IApCJ;IACA;;EAcA;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EA+BE;IAhDJ;IACA;;EAqDQ;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EAuEQ;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAmEM;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;;AF1DN;EEUE;IACE;;EAGF;IApCJ;IACA;;EAcA;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EA+BE;IAhDJ;IACA;;EAqDQ;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EAuEQ;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAmEM;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;;AF1DN;EEUE;IACE;;EAGF;IApCJ;IACA;;EAcA;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EAFF;IACE;IACA;;EA+BE;IAhDJ;IACA;;EAqDQ;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EA+DM;IAhEN;IACA;;EAuEQ;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAwDU;IAxDV;;EAmEM;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;EAPF;AAAA;IAEE;;EAGF;AAAA;IAEE;;;ACrHV;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA,eXoWO;EWnWP;EACA,gBXqoB4B;EWpoB5B;;AAOA;EACE;EACA;EACA,qBXic0B;EWhc1B;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EACE;;;AAOF;EACE;;;AAUA;EACE;;;AAeF;EACE;;AAGA;EACE;;;AAOJ;EACE;;AAGF;EACE;;;AAUF;EACE;EACA;;;AAMF;EACE;EACA;;;AAQJ;EACE;EACA;;;AAQA;EACE;EACA;;;ACrIF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAlBF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAlBF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAlBF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAlBF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAlBF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAlBF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAlBF;EAOE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AD0IA;EACE;EACA;;;AHpFF;EGkFA;IACE;IACA;;;AHpFF;EGkFA;IACE;IACA;;;AHpFF;EGkFA;IACE;IACA;;;AHpFF;EGkFA;IACE;IACA;;;AHpFF;EGkFA;IACE;IACA;;;AE5JN;EACE,eb8xBsC;;;AarxBxC;EACE;EACA;EACA;EfoRI,WALI;Ee3QR,ab+hB4B;;;Aa3hB9B;EACE;EACA;Ef0QI,WALI;;;AejQV;EACE;EACA;EfoQI,WALI;;;AgB5RV;EACE,YdsxBsC;EFtflC,WALI;EgBvRR,OdKS;;;AeVX;EACE;EACA;EACA;EjB8RI,WALI;EiBtRR,afmiB4B;EeliB5B,afyiB4B;EexiB5B,OfKS;EeJT,kBfLS;EeMT;EACA;EACA;EdGE;EeHE,YDMJ;;ACFI;EDhBN;ICiBQ;;;ADGN;EACE;;AAEA;EACE;;AAKJ;EACE,OfjBO;EekBP,kBf3BO;Ee4BP,cfqyBoC;EepyBpC;EAKE,Yf6qB0B;;AetqB9B;EAEE;;AAIF;EACE,Of1CO;Ee4CP;;AAQF;EAEE,kBf1DO;Ee6DP;;AAIF;EACE;EACA;EACA,mBfgoB0B;Ee/nB1B,Of9DO;EiBbT,kBjBMS;EeuEP;EACA;EACA;EACA;EACA,yBf0Y0B;EezY1B;ECtEE,YDuEF;;ACnEE;EDuDJ;ICtDM;;;ADqEN;EACE,kBfs4B8B;;;Ae73BlC;EACE;EACA;EACA;EACA;EACA,af2c4B;Ee1c5B,OfzFS;Ee0FT;EACA;EACA;;AAEA;EACE;;AAGF;EAEE;EACA;;;AAWJ;EACE,YfstBsC;EertBtC;EjBkKI,WALI;EG7QN;;AcoHF;EACE;EACA;EACA,mBfglB0B;;;Ae5kB9B;EACE,Yf0sBsC;EezsBtC;EjBqJI,WALI;EG7QN;;AciIF;EACE;EACA;EACA,mBfukB0B;;;Ae/jB5B;EACE,YfurBoC;;AeprBtC;EACE,YforBoC;;AejrBtC;EACE,YfirBoC;;;Ae5qBxC;EACE,Of+qBsC;Ee9qBtC,QfwqBsC;EevqBtC,Sf6hB4B;;Ae3hB5B;EACE;;AAGF;EACE;EdpKA;;AcwKF;EdxKE;;Ac4KF;EAAoB,QfypBkB;;AexpBtC;EAAoB,QfypBkB;;;AkBp1BxC;EACE;EACA;EACA;EACA;EpB4RI,WALI;EoBpRR,alBiiB4B;EkBhiB5B,alBuiB4B;EkBtiB5B,OlBGS;EkBFT,kBlBPS;EkBQT;EACA;EACA,qBlBw5BkC;EkBv5BlC,iBlBw5BkC;EkBv5BlC;EjBDE;EeHE,YEOJ;EACA;;AFJI;EEfN;IFgBQ;;;AEKN;EACE,clB8yBoC;EkB7yBpC;EAKE,YlBy5B4B;;AkBr5BhC;EAEE,elBuqB0B;EkBtqB1B;;AAGF;EAEE,kBlBnCO;;AkBwCT;EACE;EACA;;;AAIJ;EACE,alBgqB4B;EkB/pB5B,gBlB+pB4B;EkB9pB5B,clB+pB4B;EFrbxB,WALI;EG7QN;;;AiB6CJ;EACE,alB4pB4B;EkB3pB5B,gBlB2pB4B;EkB1pB5B,clB2pB4B;EFzbxB,WALI;EG7QN;;;AkBfJ;EACE;EACA,YnB41BwC;EmB31BxC,cnB41BwC;EmB31BxC,enB41BwC;;AmB11BxC;EACE;EACA;;;AAIJ;EACE,enBk1BwC;EmBj1BxC;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE,OnBo0BwC;EmBn0BxC,QnBm0BwC;EmBl0BxC;EACA;EACA,kBnBzBS;EmB0BT;EACA;EACA;EACA,QnBu0BwC;EmBt0BxC;EACA;;AAGA;ElBvBE;;AkB2BF;EAEE,enB8zBsC;;AmB3zBxC;EACE,QnBqzBsC;;AmBlzBxC;EACE,cnBixBoC;EmBhxBpC;EACA,YnB6pB4B;;AmB1pB9B;EACE,kBnBxBM;EmByBN,cnBzBM;;AmB2BN;EAII;;AAIJ;EAII;;AAKN;EACE,kBnB7CM;EmB8CN,cnB9CM;EmBmDJ;;AAIJ;EACE;EACA;EACA,SnB6xBuC;;AmBtxBvC;EACE;EACA,SnBoxBqC;;;AmBtwB3C;EACE,cnB+wBgC;;AmB7wBhC;EACE,OnB2wB8B;EmB1wB9B;EACA;EACA;ElB3GA;EeHE,YGgHF;;AH5GE;EGsGJ;IHrGM;;;AG6GJ;EACE;;AAGF;EACE,qBnB0wB4B;EmBrwB1B;;AAKN;EACE,enBqvB8B;EmBpvB9B;;AAEA;EACE;EACA;;;AAKN;EACE;EACA,cnBmuBgC;;;AmBhuBlC;EACE;EACA;EACA;;AAIE;EACE;EACA;EACA,SnBolBwB;;;AoBzvB9B;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAIA;EAA0B,YpBq8Ba;;AoBp8BvC;EAA0B,YpBo8Ba;;AoBj8BzC;EACE;;AAGF;EACE,OpBs7BuC;EoBr7BvC,QpBq7BuC;EoBp7BvC;EHzBF,kBjBkCQ;EoBPN,QpBq7BuC;ECj8BvC;EeHE,YIkBF;EACA;;AJfE;EIMJ;IJLM;;;AIgBJ;EHjCF,kBjBq9ByC;;AoB/6BzC;EACE,OpB+5B8B;EoB95B9B,QpB+5B8B;EoB95B9B;EACA,QpB85B8B;EoB75B9B,kBpBpCO;EoBqCP;EnB7BA;;AmBkCF;EACE,OpB25BuC;EoB15BvC,QpB05BuC;EiB78BzC,kBjBkCQ;EoBmBN,QpB25BuC;ECj8BvC;EeHE,YI4CF;EACA;;AJzCE;EIiCJ;IJhCM;;;AI0CJ;EH3DF,kBjBq9ByC;;AoBr5BzC;EACE,OpBq4B8B;EoBp4B9B,QpBq4B8B;EoBp4B9B;EACA,QpBo4B8B;EoBn4B9B,kBpB9DO;EoB+DP;EnBvDA;;AmB4DF;EACE;;AAEA;EACE,kBpBtEK;;AoByEP;EACE,kBpB1EK;;;AqBbX;EACE;;AAEA;AAAA;AAAA;EAGE,QrB+9B8B;EqB99B9B,arB+9B8B;;AqB59BhC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ELNE,YKOF;;ALHE;EKVJ;ILWM;;;AKKN;AAAA;EAEE;;AAEA;AAAA;EACE;;AAGF;AAAA;AAAA;EAEE,arBq8B4B;EqBp8B5B,gBrBq8B4B;;AqBl8B9B;AAAA;EACE,arBg8B4B;EqB/7B5B,gBrBg8B4B;;AqB57BhC;EACE,arB07B8B;EqBz7B9B,gBrB07B8B;;AqBn7B9B;AAAA;AAAA;AAAA;EACE,SrBm7B4B;EqBl7B5B,WrBm7B4B;;AqB96B9B;EACE,SrB46B4B;EqB36B5B,WrB46B4B;;AqBv6B9B;EACE;;;AClEN;EACE;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAGE;EACA;EACA;EACA;;AAIF;AAAA;AAAA;EAGE;;AAMF;EACE;EACA;;AAEA;EACE;;;AAWN;EACE;EACA;EACA;ExBoPI,WALI;EwB7OR,atB0f4B;EsBzf5B,atBggB4B;EsB/f5B,OtBpCS;EsBqCT;EACA;EACA,kBtB9CS;EsB+CT;ErBtCE;;;AqBgDJ;AAAA;AAAA;AAAA;EAIE;ExB8NI,WALI;EG7QN;;;AqByDJ;AAAA;AAAA;AAAA;EAIE;ExBqNI,WALI;EG7QN;;;AqBkEJ;AAAA;EAEE;;;AAaE;AAAA;AAAA;AAAA;ErBjEA;EACA;;AqByEA;AAAA;AAAA;AAAA;ErB1EA;EACA;;AqBsFF;AAAA;AAAA;EAGE;ErB5EA;EACA;;;AsBzBF;EACE;EACA;EACA,YvB+vBoC;EFtflC,WALI;EyBjQN,OvBi+BqB;;;AuB99BvB;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EzB4PE,WALI;EyBpPN,OAvBc;EAwBd,kBAvBiB;EtBHjB;;;AsB+BA;AAAA;AAAA;AAAA;EAEE;;;AA9CF;EAoDE,cvBs8BmB;EuBn8BjB,evBsxBgC;EuBrxBhC;EACA;EACA;EACA;;AAGF;EACE,cvB27BiB;EuB17BjB,YA/Ca;;;AAjBjB;EAyEI,evBowBgC;EuBnwBhC;;;AA1EJ;EAiFE,cvBy6BmB;;AuBt6BjB;EAEE,evBm1B8B;EuBl1B9B;EACA;EACA;;AAIJ;EACE,cvB45BiB;EuB35BjB,YA9Ea;;;AAjBjB;EAuGI;;;AAvGJ;EA8GE,cvB44BmB;;AuB14BnB;EACE,kBvBy4BiB;;AuBt4BnB;EACE,YApGa;;AAuGf;EACE,OvBi4BiB;;;AuB53BrB;EACE;;;AA/HF;AAAA;AAAA;EAuII;;AAIF;AAAA;AAAA;EACE;;;AAzHN;EACE;EACA;EACA,YvB+vBoC;EFtflC,WALI;EyBjQN,OvBi+BqB;;;AuB99BvB;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EzB4PE,WALI;EyBpPN,OAvBc;EAwBd,kBAvBiB;EtBHjB;;;AsB+BA;AAAA;AAAA;AAAA;EAEE;;;AA9CF;EAoDE,cvBs8BmB;EuBn8BjB,evBsxBgC;EuBrxBhC;EACA;EACA;EACA;;AAGF;EACE,cvB27BiB;EuB17BjB,YA/Ca;;;AAjBjB;EAyEI,evBowBgC;EuBnwBhC;;;AA1EJ;EAiFE,cvBy6BmB;;AuBt6BjB;EAEE,evBm1B8B;EuBl1B9B;EACA;EACA;;AAIJ;EACE,cvB45BiB;EuB35BjB,YA9Ea;;;AAjBjB;EAuGI;;;AAvGJ;EA8GE,cvB44BmB;;AuB14BnB;EACE,kBvBy4BiB;;AuBt4BnB;EACE,YApGa;;AAuGf;EACE,OvBi4BiB;;;AuB53BrB;EACE;;;AA/HF;AAAA;AAAA;EAyII;;AAEF;AAAA;AAAA;EACE;;;AC9IR;EAEE;EACA;EACA;E1B6RI,oBALI;E0BtRR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;E1B6QI,WALI;E0BtQR;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EvBhBE;EgBfF,kBOiCqB;ERrBjB,YQuBJ;;ARnBI;EQhBN;IRiBQ;;;AQoBN;EACE;EAEA;EACA;;AAGF;EAEE;EP9CF,kBO+CuB;EACrB;EACA;EAKE;;AAIJ;EAKE;EACA;EAGA;;AAGA;EAKI;;AAKN;EAGE;EACA;EACA;EAEA;EACA;;;AAYF;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuEA;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuEA;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuEA;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuEA;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuEA;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuEA;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuEA;ECpFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADiGA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADwEA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADwEA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADwEA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADwEA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADwEA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADwEA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADwEA;ECrFA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADoFF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA,iBxB6PwC;;AwBtPxC;EACE;;AAGF;EACE;;;AAWJ;ECnHE;EACA;E3BoOI,oBALI;E2B7NR;;;ADoHF;ECvHE;EACA;E3BoOI,oBALI;E2B7NR;;;ACnEF;EVgBM,YUfJ;;AVmBI;EUpBN;IVqBQ;;;AUlBN;EACE;;;AAMF;EACE;;;AAIJ;EACE;EACA;EVDI,YUEJ;;AVEI;EULN;IVMQ;;;AUDN;EACE;EACA;EVNE,YUOF;;AVHE;EUAJ;IVCM;;;;AWpBR;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;;;AAGF;EACE;;ACmBE;EACE;EACA,a5BmewB;E4BlexB,gB5BiewB;E4BhexB;EAhCJ;EACA;EACA;EACA;;AAqDE;EACE;;;ADzCN;EAEE;EACA;EACA;EACA;E7B8QI,yBALI;E6BvQR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA,S3Bk+BkC;E2Bj+BlC;EACA;EACA;EACA;E7BiPI,WALI;E6B1OR;EACA;EACA;EACA;EACA;EACA;E1BxCE;;A0B4CF;EACE;EACA;EACA;;;AAwBA;EACE;;AAEA;EACE;EACA;;;AAIJ;EACE;;AAEA;EACE;EACA;;;AnBzCJ;EmB2BA;IACE;;EAEA;IACE;IACA;;EAIJ;IACE;;EAEA;IACE;IACA;;;AnBzCJ;EmB2BA;IACE;;EAEA;IACE;IACA;;EAIJ;IACE;;EAEA;IACE;IACA;;;AnBzCJ;EmB2BA;IACE;;EAEA;IACE;IACA;;EAIJ;IACE;;EAEA;IACE;IACA;;;AnBzCJ;EmB2BA;IACE;;EAEA;IACE;IACA;;EAIJ;IACE;;EAEA;IACE;IACA;;;AnBzCJ;EmB2BA;IACE;;EAEA;IACE;IACA;;EAIJ;IACE;;EAEA;IACE;IACA;;;AAUN;EACE;EACA;EACA;EACA;;ACxFA;EACE;EACA,a5BmewB;E4BlexB,gB5BiewB;E4BhexB;EAzBJ;EACA;EACA;EACA;;AA8CE;EACE;;;ADoEJ;EACE;EACA;EACA;EACA;EACA;;ACtGA;EACE;EACA,a5BmewB;E4BlexB,gB5BiewB;E4BhexB;EAlBJ;EACA;EACA;EACA;;AAuCE;EACE;;AD8EF;EACE;;;AAMJ;EACE;EACA;EACA;EACA;EACA;;ACvHA;EACE;EACA,a5BmewB;E4BlexB,gB5BiewB;E4BhexB;;AAWA;EACE;;AAGF;EACE;EACA,c5BgdsB;E4B/ctB,gB5B8csB;E4B7ctB;EA9BN;EACA;EACA;;AAiCE;EACE;;AD+FF;EACE;;;AAON;EACE;EACA;EACA;EACA;EACA;;;AAMF;EACE;EACA;EACA;EACA;EACA,a3B2X4B;E2B1X5B;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EVxLF,kBU0LuB;;AAGvB;EAEE;EACA;EVhMF,kBUiMuB;;AAGvB;EAEE;EACA;EACA;;;AAMJ;EACE;;;AAIF;EACE;EACA;EACA;E7B2EI,WALI;E6BpER;EACA;;;AAIF;EACE;EACA;EACA;;;AAIF;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AEpPF;AAAA;EAEE;EACA;EACA;;AAEA;AAAA;EACE;EACA;;AAKF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;;;AAKJ;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;E5BhBI;;A4BoBF;AAAA;EAEE;;AAIF;AAAA;AAAA;E5BVE;EACA;;A4BmBF;AAAA;AAAA;E5BNE;EACA;;;A4BwBJ;EACE;EACA;;AAEA;EAGE;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;;;AAoBF;EACE;EACA;EACA;;AAEA;AAAA;EAEE;;AAGF;AAAA;EAEE;;AAIF;AAAA;E5B1FE;EACA;;A4B8FF;AAAA;E5B7GE;EACA;;;A6BxBJ;EAEE;EACA;EAEA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EhC4QI,WALI;EgCrQR;EACA;EACA;EdbI,YccJ;;AdVI;EcGN;IdFQ;;;AcWN;EAEE;;AAKF;EACE;EACA;EACA;;;AAQJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;AAEA;EACE;EACA;EACA;E7BtCA;EACA;;A6BwCA;EAGE;EACA;;AAGF;EAEE;EACA;EACA;;AAIJ;AAAA;EAEE;EACA;EACA;;AAGF;EAEE;E7BjEA;EACA;;;A6B2EJ;EAEE;EACA;EACA;;AAGA;EACE;EACA;E7B9FA;;A6BiGA;EACE;EACA;EACA;;AAIJ;AAAA;EAEE;EbzHF,kBa0HuB;;;AAUvB;AAAA;EAEE;EACA;;;AAKF;AAAA;EAEE;EACA;EACA;;;AAMF;AAAA;EACE;;;AAUF;EACE;;AAEF;EACE;;;ACpKJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;EACA;EACA;;AAoBJ;EACE;EACA;EACA;EjCkOI,WALI;EiC3NR;EACA;EACA;;AAEA;EAEE;;;AAUJ;EAEE;EACA;EAEA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEE;;AAGF;EACE;;;AASJ;EACE,a/B46BkC;E+B36BlC,gB/B26BkC;E+B16BlC;;AAEA;AAAA;AAAA;EAGE;;;AAaJ;EACE;EACA;EAGA;;;AAIF;EACE;EjCiJI,WALI;EiC1IR;EACA;EACA;EACA;E9BtIE;EeHE,Ye2IJ;;AfvII;Ee+HN;If9HQ;;;AewIN;EACE;;AAGF;EACE;EACA;EACA;;;AAMJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AvBxHE;EuBoIA;IAEI;IACA;;EAEA;IACE;;EAEA;IACE;;EAGF;IACE;IACA;;EAIJ;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAGF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;If5NJ,Ye8NI;;EAGA;IACE;;EAGF;IACE;IACA;IACA;IACA;;;AvB1LR;EuBoIA;IAEI;IACA;;EAEA;IACE;;EAEA;IACE;;EAGF;IACE;IACA;;EAIJ;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAGF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;If5NJ,Ye8NI;;EAGA;IACE;;EAGF;IACE;IACA;IACA;IACA;;;AvB1LR;EuBoIA;IAEI;IACA;;EAEA;IACE;;EAEA;IACE;;EAGF;IACE;IACA;;EAIJ;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAGF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;If5NJ,Ye8NI;;EAGA;IACE;;EAGF;IACE;IACA;IACA;IACA;;;AvB1LR;EuBoIA;IAEI;IACA;;EAEA;IACE;;EAEA;IACE;;EAGF;IACE;IACA;;EAIJ;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAGF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;If5NJ,Ye8NI;;EAGA;IACE;;EAGF;IACE;IACA;IACA;IACA;;;AvB1LR;EuBoIA;IAEI;IACA;;EAEA;IACE;;EAEA;IACE;;EAGF;IACE;IACA;;EAIJ;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAGF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;If5NJ,Ye8NI;;EAGA;IACE;;EAGF;IACE;IACA;IACA;IACA;;;AAtDR;EAEI;EACA;;AAEA;EACE;;AAEA;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;Ef5NJ,Ye8NI;;AAGA;EACE;;AAGF;EACE;EACA;EACA;EACA;;;AAiBZ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AC9QF;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E/BdE;;A+BkBF;EACE;EACA;;AAGF;EACE;EACA;;AAEA;EACE;E/BnBF;EACA;;A+BsBA;EACE;E/BVF;EACA;;A+BgBF;AAAA;EAEE;;;AAIJ;EAGE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAQA;EACE;;;AAQJ;EACE;EACA;EACA;EACA;EACA;;AAEA;E/BxFE;;;A+B6FJ;EACE;EACA;EACA;EACA;;AAEA;E/BnGE;;;A+B6GJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;E/BrIE;;;A+ByIJ;AAAA;AAAA;EAGE;;;AAGF;AAAA;E/BtII;EACA;;;A+B0IJ;AAAA;E/B7HI;EACA;;;A+ByIF;EACE;;AxBtHA;EwBkHJ;IAQI;IACA;;EAGA;IAEE;IACA;;EAEA;IACE;IACA;;EAKA;I/BtKJ;IACA;;E+BwKM;AAAA;IAGE;;EAEF;AAAA;IAGE;;EAIJ;I/BvKJ;IACA;;E+ByKM;AAAA;IAGE;;EAEF;AAAA;IAGE;;;;AC/NZ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA;EnCiQI,WALI;EmC1PR;EACA;EACA;EACA;EhCtBE;EgCwBF;EjB3BI,YiB4BJ;;AjBxBI;EiBWN;IjBVQ;;;AiByBN;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EjBlDE,YiBmDF;;AjB/CE;EiBsCJ;IjBrCM;;;AiBiDN;EACE;;AAGF;EACE;EACA;EACA;EACA;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;;AAEA;EhC/DE;EACA;;AgCiEA;EhClEA;EACA;;AgCsEF;EACE;;AAIF;EhC9DE;EACA;;AgCiEE;EhClEF;EACA;;AgCsEA;EhCvEA;EACA;;;AgC4EJ;EACE;;;AASA;EACE;;AAGF;EACE;EACA;EhCpHA;;AgCuHA;EAAgB;;AAChB;EAAe;;AAEf;EhC1HA;;;AiCnBJ;EAEE;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EpCqRI,WALI;EoC9QR;EACA;EjCAE;;;AiCMF;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;;;ACrCJ;EAEE;EACA;ErCkSI,2BALI;EqC3RR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EhCpBA;EACA;;;AgCuBF;EACE;EACA;EACA;ErCsQI,WALI;EqC/PR;EACA;EACA;EACA;EnBpBI,YmBqBJ;;AnBjBI;EmBQN;InBPQ;;;AmBkBN;EACE;EACA;EAEA;EACA;;AAGF;EACE;EACA;EACA;EACA,SnCioCgC;EmChoChC;;AAGF;EAEE;EACA;ElBtDF,kBkBuDuB;EACrB;;AAGF;EAEE;EACA;EACA;EACA;;;AAKF;EACE,anComCgC;;AmC/lC9B;ElC9BF;EACA;;AkCmCE;ElClDF;EACA;;;AkCkEJ;EClGE;EACA;EtCgSI,2BALI;EsCzRR;;;ADmGF;ECtGE;EACA;EtCgSI,2BALI;EsCzRR;;;ACFF;EAEE;EACA;EvC6RI,sBALI;EuCtRR;EACA;EACA;EAGA;EACA;EvCqRI,WALI;EuC9QR;EACA;EACA;EACA;EACA;EACA;EpCJE;;AoCSF;EACE;;;AAKJ;EACE;EACA;;;AChCF;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;ErCFE;;;AqCOJ;EAEE;;;AAIF;EACE,atC8gB4B;;;AsCtgB9B;EACE,etC63C8B;;AsC13C9B;EACE;EACA;EACA;EACA;EACA;;;AAgBF;EChEA;EACA;EACA;;AAMA;EACE;;;ADuDF;EChEA;EACA;EACA;;AAMA;EACE;;;ADuDF;EChEA;EACA;EACA;;AAMA;EACE;;;ADuDF;EChEA;EACA;EACA;;AAMA;EACE;;;ADuDF;EChEA;EACA;EACA;;AAMA;EACE;;;ADuDF;EChEA;EACA;EACA;;AAMA;EACE;;;ADuDF;EChEA;EACA;EACA;;AAMA;EACE;;;ADuDF;EChEA;EACA;EACA;;AAMA;EACE;;;ACPF;EACE;IAAK,uBxCy6C2B;;;AwCp6CpC;EAEE;E1CyRI,yBALI;E0ClRR;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;E1C6QI,WALI;E0CtQR;EvCPE;;;AuCYJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ExBvBI,YwBwBJ;;AxBpBI;EwBWN;IxBVQ;;;;AwBsBR;EvBCE;EuBCA;;;AAIA;EACE;;AAGE;EAJJ;IAKM;;;;AClDR;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EAGA;EACA;ExCXE;;;AwCeJ;EACE;EACA;;AAEA;EAEE;EACA;;;AASJ;EACE;EACA;EACA;;AAGA;EAEE;EACA;EACA;EACA;;AAGF;EACE;EACA;;;AAQJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;ExCvDE;EACA;;AwC0DF;ExC7CE;EACA;;AwCgDF;EAEE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;EACA;;;AAaF;EACE;;AAGE;ExCtDJ;EAZA;;AwCuEI;ExCvEJ;EAYA;;AwCgEI;EACE;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AjCrFR;EiC6DA;IACE;;EAGE;IxCtDJ;IAZA;;EwCuEI;IxCvEJ;IAYA;;EwCgEI;IACE;;EAGF;IACE;IACA;;EAEA;IACE;IACA;;;AjCrFR;EiC6DA;IACE;;EAGE;IxCtDJ;IAZA;;EwCuEI;IxCvEJ;IAYA;;EwCgEI;IACE;;EAGF;IACE;IACA;;EAEA;IACE;IACA;;;AjCrFR;EiC6DA;IACE;;EAGE;IxCtDJ;IAZA;;EwCuEI;IxCvEJ;IAYA;;EwCgEI;IACE;;EAGF;IACE;IACA;;EAEA;IACE;IACA;;;AjCrFR;EiC6DA;IACE;;EAGE;IxCtDJ;IAZA;;EwCuEI;IxCvEJ;IAYA;;EwCgEI;IACE;;EAGF;IACE;IACA;;EAEA;IACE;IACA;;;AjCrFR;EiC6DA;IACE;;EAGE;IxCtDJ;IAZA;;EwCuEI;IxCvEJ;IAYA;;EwCgEI;IACE;;EAGF;IACE;IACA;;EAEA;IACE;IACA;;;AAcZ;ExC/II;;AwCkJF;EACE;;AAEA;EACE;;;ACrKJ;EACE,ODkLyB;ECjLzB,kBDgLsB;;AC7KpB;EAEE,OD4KqB;EC3KrB;;AAGF;EACE,O1CRG;E0CSH,kBDsKqB;ECrKrB,cDqKqB;;;ACnL3B;EACE,ODkLyB;ECjLzB,kBDgLsB;;AC7KpB;EAEE,OD4KqB;EC3KrB;;AAGF;EACE,O1CRG;E0CSH,kBDsKqB;ECrKrB,cDqKqB;;;ACnL3B;EACE,ODkLyB;ECjLzB,kBDgLsB;;AC7KpB;EAEE,OD4KqB;EC3KrB;;AAGF;EACE,O1CRG;E0CSH,kBDsKqB;ECrKrB,cDqKqB;;;ACnL3B;EACE,ODoL2B;ECnL3B,kBDgLsB;;AC7KpB;EAEE,OD8KuB;EC7KvB;;AAGF;EACE,O1CRG;E0CSH,kBDwKuB;ECvKvB,cDuKuB;;;ACrL7B;EACE,ODoL2B;ECnL3B,kBDgLsB;;AC7KpB;EAEE,OD8KuB;EC7KvB;;AAGF;EACE,O1CRG;E0CSH,kBDwKuB;ECvKvB,cDuKuB;;;ACrL7B;EACE,ODkLyB;ECjLzB,kBDgLsB;;AC7KpB;EAEE,OD4KqB;EC3KrB;;AAGF;EACE,O1CRG;E0CSH,kBDsKqB;ECrKrB,cDqKqB;;;ACnL3B;EACE,ODoL2B;ECnL3B,kBDgLsB;;AC7KpB;EAEE,OD8KuB;EC7KvB;;AAGF;EACE,O1CRG;E0CSH,kBDwKuB;ECvKvB,cDuKuB;;;ACrL7B;EACE,ODkLyB;ECjLzB,kBDgLsB;;AC7KpB;EAEE,OD4KqB;EC3KrB;;AAGF;EACE,O1CRG;E0CSH,kBDsKqB;ECrKrB,cDqKqB;;;AElL7B;EACE;EACA,O3C4iD2B;E2C3iD3B,Q3C2iD2B;E2C1iD3B;EACA,O3CQS;E2CPT;EACA;E1COE;E0CLF,S3C4iD2B;;A2CziD3B;EACE;EACA;EACA,S3CuiDyB;;A2CpiD3B;EACE;EACA,Y3C8rB4B;E2C7rB5B,S3CkiDyB;;A2C/hD3B;EAEE;EACA;EACA,S3C4hDyB;;;A2CxhD7B;EACE,Q3CwhD2B;;;A4C9jD7B;EAEE;EACA;EACA;EACA;E9CgSI,sBALI;E8CzRR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;E9CkRI,WALI;E8C3QR;EACA;EACA;EACA;EACA;EACA;E3CPE;;A2CUF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA,S5Cm/BkC;E4Cl/BlC;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;E3C7BE;EACA;;A2C+BF;EACE;EACA;;;AAIJ;EACE;EACA;;;AC3DF;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;;AAOF;EACE;EACA;EACA;EAEA;;AAGA;E7B5CI,Y6B6CF;EACA,W7Co1CgC;;AgB93C9B;E6BwCJ;I7BvCM;;;A6B2CN;EACE,W7Ck1CgC;;A6C90ClC;EACE,W7C+0CgC;;;A6C30CpC;EACE;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;E5CrFE;E4CyFF;;;AAIF;EAEE;EACA;EACA;EClHA;EACA;EACA;EACA,SDkH0B;ECjH1B;EACA;EACA,kBD+G4D;;AC5G5D;EAAS;;AACT;EAAS,SD2GiF;;;AAK5F;EACE;EACA;EACA;EACA;EACA;EACA;E5CtGE;EACA;;A4CwGF;EACE;EACA;;;AAKJ;EACE;EACA;;;AAKF;EACE;EAGA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E5C1HE;EACA;;A4C+HF;EACE;;;ArC5GA;EqCkHF;IACE;IACA;;EAIF;IACE;IACA;IACA;;EAGF;IACE;;;ArC/HA;EqCoIF;AAAA;IAEE;;;ArCtIA;EqC2IF;IACE;;;AAUA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;E5C1MJ;;A4C8ME;AAAA;E5C9MF;;A4CmNE;EACE;;;ArC3JJ;EqCyIA;IACE;IACA;IACA;IACA;;EAEA;IACE;IACA;I5C1MJ;;E4C8ME;AAAA;I5C9MF;;E4CmNE;IACE;;;ArC3JJ;EqCyIA;IACE;IACA;IACA;IACA;;EAEA;IACE;IACA;I5C1MJ;;E4C8ME;AAAA;I5C9MF;;E4CmNE;IACE;;;ArC3JJ;EqCyIA;IACE;IACA;IACA;IACA;;EAEA;IACE;IACA;I5C1MJ;;E4C8ME;AAAA;I5C9MF;;E4CmNE;IACE;;;ArC3JJ;EqCyIA;IACE;IACA;IACA;IACA;;EAEA;IACE;IACA;I5C1MJ;;E4C8ME;AAAA;I5C9MF;;E4CmNE;IACE;;;ArC3JJ;EqCyIA;IACE;IACA;IACA;IACA;;EAEA;IACE;IACA;I5C1MJ;;E4C8ME;AAAA;I5C9MF;;E4CmNE;IACE;;;AEtOR;EAEE;EACA;EACA;EACA;EACA;EjD8RI,wBALI;EiDvRR;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;ECnBA,ahDgiB4B;EgD9hB5B;EACA,ahDyiB4B;EgDxiB5B,ahD+iB4B;EgD9iB5B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ElDsRI,WALI;EiDrQR;EACA;;AAEA;EAAS;;AAET;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;;AAKN;EACE;;AAEA;EACE;EACA;EACA;;;AAIJ;AACA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;AAEA;EACE;;AAEA;EACE;EACA;EACA;;;AAIJ;AACA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;AAkBA;EACE;EACA;EACA;EACA;EACA;E9ClGE;;;AgDnBJ;EAEE;EACA;EnDkSI,wBALI;EmD3RR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EnDyRI,+BALI;EmDlRR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EDzBA,ahDgiB4B;EgD9hB5B;EACA,ahDyiB4B;EgDxiB5B,ahD+iB4B;EgD9iB5B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ElDsRI,WALI;EmDhQR;EACA;EACA;EACA;EhDhBE;;AgDoBF;EACE;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;EACA;;;AAMJ;EACE;;AAEA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAKN;AAEE;EACE;EACA;EACA;;AAEA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAKN;AAGE;EACE;;AAEA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;AAEE;EACE;EACA;EACA;;AAEA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAKN;AAkBA;EACE;EACA;EnDiHI,WALI;EmD1GR;EACA;EACA;EhD5JE;EACA;;AgD8JF;EACE;;;AAIJ;EACE;EACA;;;ACrLF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;ACtBA;EACE;EACA;EACA;;;ADuBJ;EACE;EACA;EACA;EACA;EACA;EACA;ElClBI,YkCmBJ;;AlCfI;EkCQN;IlCPQ;;;;AkCiBR;AAAA;AAAA;EAGE;;;AAGF;AACA;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAGF;AAQE;EACE;EACA;EACA;;AAGF;AAAA;AAAA;EAGE;EACA;;AAGF;AAAA;EAEE;EACA;ElC/DE,YkCgEF;;AlC5DE;EkCwDJ;AAAA;IlCvDM;;;;AkCoER;AAAA;EAEE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA,OlD65CmC;EkD55CnC;EACA,OlD7FS;EkD8FT;EACA;EACA;EACA,SlDw5CmC;EgBj/C/B,YkC0FJ;;AlCtFI;EkCqEN;AAAA;IlCpEQ;;;AkCwFN;AAAA;AAAA;EAEE,OlDvGO;EkDwGP;EACA;EACA,SlDg5CiC;;;AkD74CrC;EACE;;;AAGF;EACE;;;AAKF;AAAA;EAEE;EACA,OlDi5CmC;EkDh5CnC,QlDg5CmC;EkD/4CnC;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;EACE;;;AAEF;EACE;;;AAQF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA,clDy1CmC;EkDx1CnC;EACA,alDu1CmC;EkDt1CnC;;AAEA;EACE;EACA;EACA,OlDs1CiC;EkDr1CjC,QlDs1CiC;EkDr1CjC;EACA,clDs1CiC;EkDr1CjC,alDq1CiC;EkDp1CjC;EACA;EACA,kBlD9KO;EkD+KP;EACA;EAEA;EACA;EACA,SlD60CiC;EgBz/C/B,YkC6KF;;AlCzKE;EkCwJJ;IlCvJM;;;AkC2KN;EACE,SlD00CiC;;;AkDj0CrC;EACE;EACA;EACA,QlDo0CmC;EkDn0CnC;EACA,alDi0CmC;EkDh0CnC,gBlDg0CmC;EkD/zCnC,OlDzMS;EkD0MT;;;AAMA;AAAA;EAEE,QlDm0CiC;;AkDh0CnC;EACE,kBlD5MO;;AkD+MT;EACE,OlDhNO;;;AoDdX;AAAA;EAEE;EACA;EACA;EACA;EAEA;EACA;;;AAIF;EACE;IAAK;;;AAIP;EAEE;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;;;AAGF;EAEE;EACA;EACA;;;AASF;EACE;IACE;;EAEF;IACE;IACA;;;AAKJ;EAEE;EACA;EACA;EACA;EACA;EAGA;EACA;;;AAGF;EACE;EACA;;;AAIA;EACE;AAAA;IAEE;;;AC/EN;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;A7CgEE;E6C/CF;IAEI;IACA;IACA,SrDq/B8B;IqDp/B9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IrCzBA,YqC2BA;;;ArCvBA;EqCSJ;IrCRM;;;ARuDJ;E6C/BE;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IAEE;;EAGF;IAGE;;;A7CzBJ;E6ClCF;IAiEM;IACA;IACA;;EAEA;IACE;;EAGF;IACE;IACA;IACA;IACA;IAEA;;;;A7ChCN;E6C/CF;IAEI;IACA;IACA,SrDq/B8B;IqDp/B9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IrCzBA,YqC2BA;;;ArCvBA;EqCSJ;IrCRM;;;ARuDJ;E6C/BE;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IAEE;;EAGF;IAGE;;;A7CzBJ;E6ClCF;IAiEM;IACA;IACA;;EAEA;IACE;;EAGF;IACE;IACA;IACA;IACA;IAEA;;;;A7ChCN;E6C/CF;IAEI;IACA;IACA,SrDq/B8B;IqDp/B9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IrCzBA,YqC2BA;;;ArCvBA;EqCSJ;IrCRM;;;ARuDJ;E6C/BE;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IAEE;;EAGF;IAGE;;;A7CzBJ;E6ClCF;IAiEM;IACA;IACA;;EAEA;IACE;;EAGF;IACE;IACA;IACA;IACA;IAEA;;;;A7ChCN;E6C/CF;IAEI;IACA;IACA,SrDq/B8B;IqDp/B9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IrCzBA,YqC2BA;;;ArCvBA;EqCSJ;IrCRM;;;ARuDJ;E6C/BE;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IAEE;;EAGF;IAGE;;;A7CzBJ;E6ClCF;IAiEM;IACA;IACA;;EAEA;IACE;;EAGF;IACE;IACA;IACA;IACA;IAEA;;;;A7ChCN;E6C/CF;IAEI;IACA;IACA,SrDq/B8B;IqDp/B9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IrCzBA,YqC2BA;;;ArCvBA;EqCSJ;IrCRM;;;ARuDJ;E6C/BE;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IAEE;;EAGF;IAGE;;;A7CzBJ;E6ClCF;IAiEM;IACA;IACA;;EAEA;IACE;;EAGF;IACE;IACA;IACA;IACA;IAEA;;;;AA/ER;EAEI;EACA;EACA,SrDq/B8B;EqDp/B9B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ErCzBA,YqC2BA;;ArCvBA;EqCSJ;IrCRM;;;AqCwBF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EAEE;;AAGF;EAGE;;;AA2BR;EPjHE;EACA;EACA;EACA,S9CghCkC;E8C/gClC;EACA;EACA,kB9CUS;;A8CPT;EAAS;;AACT;EAAS,S9Cq3CyB;;;AqD1wCpC;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;;AAIJ;EACE;EACA,arD6a4B;;;AqD1a9B;EACE;EACA;EACA;;;AC7IF;EACE;EACA;EACA;EACA;EACA;EACA,StDssCkC;;AsDpsClC;EACE;EACA;;;AAKJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAKA;EACE;;;AAIJ;EACE;IACE,StDyqCgC;;;AsDrqCpC;EACE;EACA;EACA;;;AAGF;EACE;IACE;;;AH9CF;EACE;EACA;EACA;;;AIAF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;ACNF;EACE;;AAGE;EAEE;;;AANN;EACE;;AAGE;EAEE;;;AANN;EACE;;AAGE;EAEE;;;AANN;EACE;;AAGE;EAEE;;;AANN;EACE;;AAGE;EAEE;;;AANN;EACE;;AAGE;EAEE;;;AANN;EACE;;AAGE;EAEE;;;AANN;EACE;;AAGE;EAEE;;;ACLR;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAKF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;ACrBJ;EACE;EACA;EACA;EACA;EACA,S1D6gCkC;;;A0D1gCpC;EACE;EACA;EACA;EACA;EACA,S1DqgCkC;;;A0D7/BhC;EACE;EACA;EACA,S1Dy/B8B;;;A0Dt/BhC;EACE;EACA;EACA,S1Dm/B8B;;;AQp9BhC;EkDxCA;IACE;IACA;IACA,S1Dy/B8B;;E0Dt/BhC;IACE;IACA;IACA,S1Dm/B8B;;;AQp9BhC;EkDxCA;IACE;IACA;IACA,S1Dy/B8B;;E0Dt/BhC;IACE;IACA;IACA,S1Dm/B8B;;;AQp9BhC;EkDxCA;IACE;IACA;IACA,S1Dy/B8B;;E0Dt/BhC;IACE;IACA;IACA,S1Dm/B8B;;;AQp9BhC;EkDxCA;IACE;IACA;IACA,S1Dy/B8B;;E0Dt/BhC;IACE;IACA;IACA,S1Dm/B8B;;;AQp9BhC;EkDxCA;IACE;IACA;IACA,S1Dy/B8B;;E0Dt/BhC;IACE;IACA;IACA,S1Dm/B8B;;;A2DlhCpC;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;ACRF;AAAA;ECIE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACXA;EACE;EACA;EACA;EACA;EACA;EACA,S9DoZsC;E8DnZtC;;;ACRJ;ECAE;EACA;EACA;;;ACNF;EACE;EACA;EACA;EACA;EACA;EACA,SjEynB4B;;;AkE7jBtB;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAjBJ;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AASF;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AArBJ;AAcA;EAOI;EAAA;;;AAmBJ;AA1BA;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAjBJ;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AASF;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAPJ;EAIQ;EAGJ;;;AAjBJ;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AADF;EACE;;;AASF;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;EAAA;;;AAPJ;EAOI;;;AAPJ;EAOI;;;A1DVR;E0DGI;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;;A1DVR;E0DGI;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;;A1DVR;E0DGI;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;;A1DVR;E0DGI;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;;A1DVR;E0DGI;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;IAAA;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;;ACtDZ;ED+CQ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;;ACnCZ;ED4BQ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;EAPJ;IAOI;;;AEzEZ;EACE;;;AAGF;EACI;EACA;;;AAGJ;EACI;;;AAGF;EACE;;;AAGF;EACE;;;;AClBJ;EACI;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAEF;EACE","file":"styles.css"} \ No newline at end of file diff --git a/feed/index.html b/feed/index.html new file mode 100644 index 0000000..ef728d6 --- /dev/null +++ b/feed/index.html @@ -0,0 +1,88 @@ + + + + + + Feed - Noroff Social + + + + + + +
+
+
+ +
+ +
+
+
+ Loading... +
+
+
+
+
+ + +
+ + + + + + + + + diff --git a/feed/search.html b/feed/search.html new file mode 100644 index 0000000..9f5310c --- /dev/null +++ b/feed/search.html @@ -0,0 +1,87 @@ + + + + + + Feed - Noroff Social + + + + + + +
+
+
+ +
+ +
+
+
+ Loading... +
+
+
+
+
+ + +
+ + + + + + + + + \ No newline at end of file diff --git a/feed/tags.html b/feed/tags.html new file mode 100644 index 0000000..15878c1 --- /dev/null +++ b/feed/tags.html @@ -0,0 +1,84 @@ + + + + + + Feed - Noroff Social + + + + + + +
+
+
+ +
+ +
+
+
+ Loading... +
+
+
+
+
+ + +
+ + + + + + diff --git a/images/loginbackground.jpg b/images/loginbackground.jpg new file mode 100644 index 0000000..a2d58ce Binary files /dev/null and b/images/loginbackground.jpg differ diff --git a/images/placeholder.jpeg b/images/placeholder.jpeg new file mode 100644 index 0000000..72ff7a3 Binary files /dev/null and b/images/placeholder.jpeg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..a762a49 --- /dev/null +++ b/index.html @@ -0,0 +1,54 @@ + + + + + + Noroff Social + + + + + +
+
+

Welcome to Noroff Social

+
+
+
+ +
+
+
+ + + + + diff --git a/js/api-calls/createPost.js b/js/api-calls/createPost.js new file mode 100644 index 0000000..9340ab7 --- /dev/null +++ b/js/api-calls/createPost.js @@ -0,0 +1,23 @@ +import { BASE_API } from "../api/api.js"; +import { load } from "../functions/load.js"; +import { handlePost } from "../functions/handlePost.js"; +import { API_KEY } from "../api/api-key.js"; + + + +export async function createPost () { + const postData = await handlePost(); + const response = await fetch(BASE_API + "/social/posts", { + headers: { + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY, + "Content-Type": "application/json", + }, + method: "POST", + body: JSON.stringify(postData) + }); + if (response.ok) { + return await response.json(); + } + throw new Error("Could not create post") +} diff --git a/js/api-calls/feed/commentOnPost.js b/js/api-calls/feed/commentOnPost.js new file mode 100644 index 0000000..40dbcba --- /dev/null +++ b/js/api-calls/feed/commentOnPost.js @@ -0,0 +1,19 @@ +import { BASE_API } from "../../api/api.js"; +import { load } from "../../functions/load.js"; +import { API_KEY } from "../../api/api-key.js"; +export async function commentOnPost (id, comment) { + const endpoint = "/social/posts/"+id+"/comment"; + const response = await fetch(BASE_API + endpoint, { + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY + }, + method: "POST", + body: JSON.stringify({ body: comment }), + }); + if (response.ok) { + return await response.json(); + } + throw new Error("Could not comment") +} \ No newline at end of file diff --git a/js/api-calls/feed/fetchComments.js b/js/api-calls/feed/fetchComments.js new file mode 100644 index 0000000..21978b8 --- /dev/null +++ b/js/api-calls/feed/fetchComments.js @@ -0,0 +1,16 @@ +import { BASE_API } from "../../api/api.js"; +import { API_KEY } from "../../api/api-key.js" +import { load } from "../../functions/load.js"; + + +export async function fetchComments (id) { + const response = await fetch(BASE_API+"/social/posts/"+id+"?_comments=true", { + headers: { + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY + } + + }); + return await response.json(); +} + diff --git a/js/api-calls/feed/fetchPosts.js b/js/api-calls/feed/fetchPosts.js new file mode 100644 index 0000000..afdbe6e --- /dev/null +++ b/js/api-calls/feed/fetchPosts.js @@ -0,0 +1,18 @@ +import { BASE_API } from "../../api/api.js"; +import { API_KEY } from "../../api/api-key.js" +import { load } from "../../functions/load.js"; +const endpoint = "/social/posts?_author=true"; + + +export async function fetchPosts (endpoint) { + const response = await fetch(BASE_API+endpoint, { + headers: { + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY + } + }); + return await response.json(); +} + +const posts = await fetchPosts(endpoint); +console.log(posts); \ No newline at end of file diff --git a/js/api-calls/fetchUser.js b/js/api-calls/fetchUser.js new file mode 100644 index 0000000..173a483 --- /dev/null +++ b/js/api-calls/fetchUser.js @@ -0,0 +1,17 @@ +import { BASE_API } from "../api/api.js"; +import { API_KEY } from "../api/api-key.js" +import { load } from "../functions/load.js"; +const API_PROFILES = "/social/profiles/"; + + +export async function fetchUser (endpoint) { + const response = await fetch(BASE_API+API_PROFILES+endpoint, { + headers: { + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY + } + }); + return await response.json(); + +} + diff --git a/js/api-calls/loggedInCheck.js b/js/api-calls/loggedInCheck.js new file mode 100644 index 0000000..094ee91 --- /dev/null +++ b/js/api-calls/loggedInCheck.js @@ -0,0 +1,33 @@ +import { load } from "../functions/load.js"; +import { BASE_API } from "../api/api.js"; +import { API_KEY } from "../api/api-key.js"; + +export async function loggedInCheck() { + const token = load("token"); + + if (!token) { + return false; + } + + try { + const response = await fetch(BASE_API + "/social/posts/", { + headers: { + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY, + "Content-Type": "application/json", + }, + method: "GET", + }); + + if (response.ok) { + window.location.href = "/feed/index.html"; + return true; + } + } catch (error) { + console.error("Error validating token:", error); + } + return false; +} +loggedInCheck(); + + diff --git a/js/api-calls/loginUser.js b/js/api-calls/loginUser.js new file mode 100644 index 0000000..57c7b88 --- /dev/null +++ b/js/api-calls/loginUser.js @@ -0,0 +1,20 @@ +import { API_AUTH, API_LOGIN, BASE_API } from "../api/api.js"; +import { save } from "../functions/save.js"; + +export async function loginUser (email, password) { + const response = await fetch (BASE_API + API_AUTH + API_LOGIN, { + headers: { + "Content-Type": "application/json" + }, + method: "POST", + body: JSON.stringify({email, password}) + }); + if (response.ok) { + const { accessToken, ...profile } = (await response.json()).data; + save("token", accessToken); + save("profile", profile); + return profile + } + throw new Error("Could not login"); +} + diff --git a/js/api-calls/profile/checkIfFollow.js b/js/api-calls/profile/checkIfFollow.js new file mode 100644 index 0000000..24a9a9c --- /dev/null +++ b/js/api-calls/profile/checkIfFollow.js @@ -0,0 +1,27 @@ +import { fetchUser } from "../fetchUser.js"; +import { load } from "../../functions/load.js"; + +/** + * Checks if the current user is following the user profile currently being viewed and changes + * the follow button to unfollow if it does + * + * @param {string} userProfile - The name of the user profile to check if followed. + * @const {array} userData - Fetches an array of what users the current user is following + * @const {object} followButton - The follow button on the viewed profile page + * @const {boolean} isFollowing - Checks if the profile you are viewing is in the list of users you + * are following, and returns true if you are + * + */ + +export async function checkIfFollows (userProfile) { + const profile = load("profile"); + const profileName = profile.name; + const userData = await fetchUser(profileName+"?_following=true"); + const followButton = document.querySelector("#follow-button"); + const isFollowing = userData.data.following.some(user => user.name == userProfile); + if (isFollowing) { + followButton.textContent = "Unfollow"; + followButton.classList.remove("btn-primary"); + followButton.classList.add("btn-danger"); + } +} \ No newline at end of file diff --git a/js/api-calls/profile/deletePost.js b/js/api-calls/profile/deletePost.js new file mode 100644 index 0000000..769e683 --- /dev/null +++ b/js/api-calls/profile/deletePost.js @@ -0,0 +1,18 @@ +import { BASE_API } from "../../api/api.js"; +import { load } from "../../functions/load.js"; +import { API_KEY } from "../../api/api-key.js"; + +export async function deletePost (id) { + const response = await fetch(BASE_API + "/social/posts/"+id, { + headers: { + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY, + "Content-Type": "application/json", + }, + method: "DELETE", + }); + if (response.ok) { + return await response.json(); + } + throw new Error("Could not delete post") +} \ No newline at end of file diff --git a/js/api-calls/profile/fetchMyPosts.js b/js/api-calls/profile/fetchMyPosts.js new file mode 100644 index 0000000..096e145 --- /dev/null +++ b/js/api-calls/profile/fetchMyPosts.js @@ -0,0 +1,13 @@ + +import { load } from "../../functions/load.js"; +import { fetchPosts } from "../feed/fetchPosts.js"; + +export async function fetchMyPosts () { + const profile = load("profile"); + const userName = profile.name; + const endpoint = "/social/profiles/"+userName+"/posts"; + const posts = await fetchPosts(endpoint) + + return posts.data; +} + diff --git a/js/api-calls/profile/fetchUserPosts.js b/js/api-calls/profile/fetchUserPosts.js new file mode 100644 index 0000000..baf359d --- /dev/null +++ b/js/api-calls/profile/fetchUserPosts.js @@ -0,0 +1,13 @@ + +import { fetchPosts } from "../feed/fetchPosts.js"; + + +export async function fetchUserPosts (userName) { + const endpoint = "/social/profiles/"+userName+"/posts"; + console.log(userName); + const posts = await fetchPosts(endpoint) + console.log(posts); + + return posts.data; +} + diff --git a/js/api-calls/profile/followUser.js b/js/api-calls/profile/followUser.js new file mode 100644 index 0000000..8a51b9f --- /dev/null +++ b/js/api-calls/profile/followUser.js @@ -0,0 +1,21 @@ +import { BASE_API } from "../../api/api.js"; +import { load } from "../../functions/load.js"; +import { API_KEY } from "../../api/api-key.js"; + +export async function followUser (userName, followStatus) { + const endpoint = "/social/profiles/"; + const response = await fetch(BASE_API + endpoint + userName + followStatus, { + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY + }, + method: "PUT", + + }); + if (response.ok) { + return await response.json(); + } + throw new Error("Could not follow user") +} + diff --git a/js/api-calls/profile/updatePost.js b/js/api-calls/profile/updatePost.js new file mode 100644 index 0000000..a5645b7 --- /dev/null +++ b/js/api-calls/profile/updatePost.js @@ -0,0 +1,26 @@ +import { BASE_API } from "../../api/api.js"; +import { load } from "../../functions/load.js"; +import { API_KEY } from "../../api/api-key.js"; +export async function updatePost (id, title, body, imgUrl, imgAlt) { + const endpoint = "/social/posts/"; + const response = await fetch(BASE_API + endpoint + id, { + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY + }, + method: "PUT", + body: JSON.stringify({ + "title": title, + "body": body, + "media": { + "url": imgUrl, + "alt": imgAlt + } + }), + }); + if (response.ok) { + return await response.json(); + } + throw new Error("Could not update post") +} diff --git a/js/api-calls/profile/updateUser.js b/js/api-calls/profile/updateUser.js new file mode 100644 index 0000000..b9ff3f3 --- /dev/null +++ b/js/api-calls/profile/updateUser.js @@ -0,0 +1,26 @@ +import { BASE_API } from "../../api/api.js"; +import { load } from "../../functions/load.js"; +import { API_KEY } from "../../api/api-key.js"; +export async function updateUser (id, bio, avatarUrl, avatarUrlAlt) { + const endpoint = "/social/profiles/"; + const response = await fetch(BASE_API + endpoint + id, { + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${load("token")}`, + "X-Noroff-API-Key": API_KEY + }, + method: "PUT", + body: JSON.stringify({ + "bio": bio, + "avatar": { + "url": avatarUrl, + "alt": avatarUrlAlt + } + }), + }); + if (response.ok) { + return await response.json(); + } + throw new Error("Could not update account") +} + diff --git a/js/api-calls/registerUser.js b/js/api-calls/registerUser.js new file mode 100644 index 0000000..d09bdc7 --- /dev/null +++ b/js/api-calls/registerUser.js @@ -0,0 +1,16 @@ +import { API_AUTH, API_REGISTER, BASE_API } from "../api/api.js"; + +export async function registerUser (name, email, password) { + const response = await fetch(BASE_API + API_AUTH + API_REGISTER, { + headers: { + "Content-Type": "application/json" + }, + method: "POST", + body: JSON.stringify({name, email, password}) + }); + if (response.ok) { + return await response.json(); + } + throw new Error("Could not register account") +} + diff --git a/js/api/api-key.js b/js/api/api-key.js new file mode 100644 index 0000000..66b4a66 --- /dev/null +++ b/js/api/api-key.js @@ -0,0 +1 @@ +export const API_KEY ="2250b477-825c-49e0-b569-a4158e317ff9"; diff --git a/js/api/api.js b/js/api/api.js new file mode 100644 index 0000000..1141beb --- /dev/null +++ b/js/api/api.js @@ -0,0 +1,5 @@ +export const BASE_API = "https://v2.api.noroff.dev"; +export const API_AUTH = "/auth"; +export const API_REGISTER = "/register"; +export const API_LOGIN = "/login"; +export const API_KEY_URL ="/create-api-key"; \ No newline at end of file diff --git a/js/functions/followClick.js b/js/functions/followClick.js new file mode 100644 index 0000000..2cbe271 --- /dev/null +++ b/js/functions/followClick.js @@ -0,0 +1,26 @@ +import { followUser } from "../api-calls/profile/followUser.js"; + +export async function followClick(userName) { +const followButton = document.querySelector("#follow-button"); +followButton.addEventListener("click", async () => { + + + if (followButton.textContent == "Follow") { + await followUser(userName, "/follow"); + followButton.textContent = "Unfollow"; + followButton.classList.remove("btn-primary"); + followButton.classList.add("btn-danger"); + window.location.reload() + + + } else { + await followUser(userName, "/unfollow"); + followButton.textContent = "Follow"; + followButton.classList.remove("btn-danger"); + followButton.classList.add("btn-primary"); + window.location.reload() + + } +}); + +} \ No newline at end of file diff --git a/js/functions/formValidation.js b/js/functions/formValidation.js new file mode 100644 index 0000000..f135cda --- /dev/null +++ b/js/functions/formValidation.js @@ -0,0 +1,44 @@ +// Form validation for the register.html page + +import { handleSubmit } from "./handleSubmit.js" + +const form = document.querySelector("#registerForm"); +const email = document.querySelector("#email"); +const name = document.querySelector("#userName"); +const password = document.querySelector("#password"); +const password2 = document.querySelector("#password2"); +const successMsg = document.querySelector("#successMessage"); + +form.addEventListener("submit", async function (event) { + event.preventDefault(); + + if (!validateEmail(email.value)) { + email.setCustomValidity("You must enter a valid Noroff email address."); + } else { + email.setCustomValidity(""); + + } + + if (password.value !== password2.value) { + password2.setCustomValidity("Passwords do not match"); + } else { + password2.setCustomValidity(""); + } + if (form.checkValidity()) { + form.classList.add("was-validated"); + await handleSubmit(name.value, email.value, password.value); + window.location.reload() + successMsg.style.display = "block"; + } else { + form.classList.add("was-validated"); + console.log("Form contains invalid fields."); + } +}); + +function validateEmail(email) { + const regEx = /^[a-zA-Z0-9._%+-]+@(noroff\.no|stud\.noroff\.no)$/; + return regEx.test(email); +} + +console.log(form); + diff --git a/js/functions/handleLogin.js b/js/functions/handleLogin.js new file mode 100644 index 0000000..b9f9a28 --- /dev/null +++ b/js/functions/handleLogin.js @@ -0,0 +1,18 @@ +import { loginUser } from "../api-calls/loginUser.js"; + +const form = document.querySelector("#loginForm"); + +export async function handleLogin(event) { + event.preventDefault(); + const email = event.target.email.value; + const password = event.target.password.value; + console.log(email) + await loginUser(email, password); + window.location.href = "../feed/index.html"; +}; + +export function loginListner () { + form.addEventListener("submit", handleLogin) +} + +loginListner(); \ No newline at end of file diff --git a/js/functions/handlePost.js b/js/functions/handlePost.js new file mode 100644 index 0000000..22de9b0 --- /dev/null +++ b/js/functions/handlePost.js @@ -0,0 +1,43 @@ + +import { createPost } from "../api-calls/createPost.js"; +import { load } from "./load.js"; +const form = document.querySelector("#post-form"); + +export async function handlePost(event) { + const profileData = load("profile"); + const postTitle = document.querySelector("#postTitle").value; + const postBody = document.querySelector("#post-form textarea").value; + const imageURL = document.querySelector("#imageURL").value; + const imageAlt = document.querySelector("#imageAlt").value; + const tags = document.querySelector("#tags").value; + const tagsArray = tags.split(",").map(tag => tag.trim()); + + + const postData = { + "title": postTitle, + "body": postBody, + "tags": tagsArray, + "media": { + "url": imageURL, + "alt": imageAlt, + }, + "author": profileData + + } + return postData; +}; + +export function postListener() { + form.addEventListener("submit", async (event) => { + event.preventDefault(); + try { + const postData = await handlePost(); + const response = await createPost(postData); + form.reset(); + } catch (error) { + } + }); + } + + +postListener(); \ No newline at end of file diff --git a/js/functions/handleSubmit.js b/js/functions/handleSubmit.js new file mode 100644 index 0000000..a144123 --- /dev/null +++ b/js/functions/handleSubmit.js @@ -0,0 +1,6 @@ +import { registerUser } from "../api-calls/registerUser.js" + +export async function handleSubmit (name, email, password) { + await registerUser(name, email, password); + console.log("Registration successfull") +} \ No newline at end of file diff --git a/js/functions/load.js b/js/functions/load.js new file mode 100644 index 0000000..fa2a854 --- /dev/null +++ b/js/functions/load.js @@ -0,0 +1,3 @@ +export function load(key){ + return JSON.parse(localStorage.getItem(key)) +} \ No newline at end of file diff --git a/js/functions/postInputValues.js b/js/functions/postInputValues.js new file mode 100644 index 0000000..7d89207 --- /dev/null +++ b/js/functions/postInputValues.js @@ -0,0 +1,33 @@ +import { fetchPosts } from "../api-calls/feed/fetchPosts.js"; +import { updatePost } from "../api-calls/profile/updatePost.js"; + +export async function postInputValues (postID) { + + const endpoint = "/social/posts/"+postID; + const post = await fetchPosts(endpoint); + + + document.getElementById("updateTitle").value = post.data.title || "Test"; + document.querySelector("#update-form textarea").value = post.data.body || ""; + document.getElementById("updateURL").value = post.data.media?.url || ""; + document.getElementById("updateAlt").value = post.data.media?.alt || ""; + document.getElementById("updateTags").value = post.data.tags?.join(", ") || ""; + + const saveUpdateButton = document.getElementById("savePostUpdateButton"); + + saveUpdateButton.onclick = async () => { + const title = document.getElementById("updateTitle").value; + const body = document.querySelector("#update-form textarea").value; + const imgUrl = document.getElementById("updateURL").value; + const imgAlt = document.getElementById("updateAlt").value + + try { + const updatedPost = await updatePost(postID, title, body, imgUrl, imgAlt); + const post = await fetchPosts(endpoint); + window.location.reload() + + } catch (error) { + } + }; +} + diff --git a/js/functions/profileInputValues.js b/js/functions/profileInputValues.js new file mode 100644 index 0000000..101d74e --- /dev/null +++ b/js/functions/profileInputValues.js @@ -0,0 +1,30 @@ +import { fetchUser } from "../api-calls/fetchUser.js"; +import { updateUser } from "../api-calls/profile/updateUser.js"; +import { save } from "./save.js"; + +export async function profileInputValues (profileName) { + const profile = await fetchUser(profileName); + console.log(profile); + + document.getElementById('avatar').value = profile.data.avatar.url || ''; + document.getElementById('avatarAlt').value = profile.data.avatar.alt || ''; + document.getElementById('bio').value = profile.data.bio || ''; + const saveButton = document.getElementById("saveUpdatesButton"); + + saveButton.onclick = async () => { + const bio = document.getElementById('bio').value; + const avatarUrl = document.getElementById('avatar').value; + const avatarAlt = document.getElementById('avatarAlt').value; + + try { + const updatedProfile = await updateUser(profileName, bio, avatarUrl, avatarAlt); + console.log("Profile updated successfully:", updatedProfile); + const profile = await fetchUser(profileName); + save("profile", profile.data); + window.location.reload() + + } catch (error) { + console.error("Error updating profile:", error.message); + } + }; + } diff --git a/js/functions/save.js b/js/functions/save.js new file mode 100644 index 0000000..72673db --- /dev/null +++ b/js/functions/save.js @@ -0,0 +1,3 @@ +export function save(key, value) { + localStorage.setItem(key, JSON.stringify(value)); +} \ No newline at end of file diff --git a/js/functions/sortButtons.js b/js/functions/sortButtons.js new file mode 100644 index 0000000..479eeaa --- /dev/null +++ b/js/functions/sortButtons.js @@ -0,0 +1,17 @@ +import { renderPosts } from "../html-functions/feed/renderPosts.js"; + +export async function sortButtons(){ + document.querySelectorAll(".dropdown-item").forEach((item) => { + item.addEventListener("click", async (event) => { + event.preventDefault(); + const sortOrder = event.target.getAttribute("data-sort"); + console.log(sortOrder); + const endpoint = "/social/posts?_author=true&sortOrder="+sortOrder; + + renderPosts(endpoint); + }); + }); +} + +sortButtons(); + diff --git a/js/html-functions/createNav.js b/js/html-functions/createNav.js new file mode 100644 index 0000000..2bf287c --- /dev/null +++ b/js/html-functions/createNav.js @@ -0,0 +1,182 @@ +import { load } from "../functions/load.js"; + +/** + * Creates the navigationbar and injects it in the nav-container found in the HTML element + * @function createNav + * @requires load - Fetches the profile data from local storage + * @const {HTMLElement} navContainer - The container element for the navigation bar. + * @const {Object} profile - The profile object fetched from localStorage. + * @const {string} profile.avatar.url - The URL of the user's avatar image. + * @const {string} profile.avatar.alt - The alt text for the user's avatar image. + */ + +export function createNav() { + const navContainer = document.querySelector("#nav-container"); + const profile = load("profile"); + navContainer.innerHTML = ` + + +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+ + + + `; +} + +createNav(); diff --git a/js/html-functions/feed/renderComments.js b/js/html-functions/feed/renderComments.js new file mode 100644 index 0000000..45421cd --- /dev/null +++ b/js/html-functions/feed/renderComments.js @@ -0,0 +1,27 @@ + +import { fetchComments } from "../../api-calls/feed/fetchComments.js"; + +export async function renderComments(id){ + const comments = await fetchComments(id); + const container = document.querySelector("#comment-container"); + console.log(comments.data.comments); + container.innerHTML = ""; + + comments.data.comments.forEach(function(comment){ + const commentElement = document.createElement("div"); + commentElement.classList.add( + "p-1", + "position-relative", + "shadow", + "m-2" + ); + commentElement.innerHTML = ` +
${comment.author.name || 'Unknown User'}
+

${comment.body || 'No post text'}

+ `; + container.appendChild(commentElement); + +}) + +} + diff --git a/js/html-functions/feed/renderPost.js b/js/html-functions/feed/renderPost.js new file mode 100644 index 0000000..5a52651 --- /dev/null +++ b/js/html-functions/feed/renderPost.js @@ -0,0 +1,33 @@ +import { fetchPosts } from "../../api-calls/feed/fetchPosts.js"; +import { fetchComments } from "../../api-calls/feed/fetchComments.js"; +import { renderComments } from "./renderComments.js"; +import { commentOnPost } from "../../api-calls/feed/commentOnPost.js"; + +export async function renderPost(postID, postAuthor){ +const endpoint = "/social/posts/"+postID; + const post = await fetchPosts(endpoint); + const postHeader = document.querySelector("#modal-title"); + const container = document.querySelector("#postModalBody"); + postHeader.innerHTML = postAuthor; + container.innerHTML = ""; + console.log(post) + + container.innerHTML = ` +

${post.data.title || 'Untitled post'}

+

${post.data.body || 'No post text'}

+ ${post.media?.alt || 'Post Image'} +
${post.tags ? post.tags.map(tag => `#${tag}`).join(' ') : ''}
+ + `; + const commentButton = document.getElementById("comment-button"); + commentButton.addEventListener("click", (event) => { + event.preventDefault(); + const comment = document.getElementById("comment").value; + commentOnPost(postID, comment); + window.location.reload() + + +}); + renderComments(postID); +} + diff --git a/js/html-functions/feed/renderPosts.js b/js/html-functions/feed/renderPosts.js new file mode 100644 index 0000000..36c1dba --- /dev/null +++ b/js/html-functions/feed/renderPosts.js @@ -0,0 +1,53 @@ +import { fetchPosts } from "../../api-calls/feed/fetchPosts.js"; +import { renderPost } from "./renderPost.js"; +const endpoint = "/social/posts?_author=true"; + +export async function renderPosts(endpoint){ + const posts = await fetchPosts(endpoint); + const container = document.querySelector("#posts-container"); + + container.innerHTML = ""; + + posts.data.forEach(function(post){ + const postElement = document.createElement("div"); + const postAuthor = post.author.name; + postElement.classList.add( + "col-12", + "col-md-5", + "p-1", + "hover-element", + "position-relative", + "shadow", + "mt-2" + ); + postElement.innerHTML = ` +
+ ${post.author.alt}
${post.author.name || 'Unknown User'}
+
+
+
+

${post.title || 'Untitled post'}

+

${post.body || 'No post text'}

+ ${post.media?.alt || 'Post Image'} +
${post.tags ? post.tags.map(tag => `#${tag}`).join(' ') : ''}
+
+ + ${post._count.comments+' comments' || 'No comments'} +
+
+ `; + postElement.dataset.id = post.id; + postElement.addEventListener("click", () => { + renderPost(post.id, postAuthor); + }); + container.appendChild(postElement); +}) + +} + +renderPosts(endpoint); + diff --git a/js/html-functions/feed/searchPosts.js b/js/html-functions/feed/searchPosts.js new file mode 100644 index 0000000..d8a7224 --- /dev/null +++ b/js/html-functions/feed/searchPosts.js @@ -0,0 +1,51 @@ +import { fetchPosts } from "../../api-calls/feed/fetchPosts.js"; +import { renderPost } from "./renderPost.js"; +const endpoint = "/social/posts/search?q="; + +export async function searchPosts(endpoint){ + const params = new URLSearchParams(window.location.search); + const searchTerm = params.get('search'); + + const posts = await fetchPosts(endpoint+searchTerm); + const container = document.querySelector("#posts-container"); + console.log(posts); + + container.innerHTML = ""; + + posts.data.forEach(function(post){ + const postElement = document.createElement("div"); + postElement.classList.add( + "col-12", + "col-md-5", + "p-1", + "hover-element", + "position-relative", + "shadow", + "mt-2" + ); + postElement.innerHTML = ` + +
+

${post.title || 'Untitled post'}

+

${post.body || 'No post text'}

+ ${post.media?.alt || 'Post Image'} +
${post.tags ? post.tags.map(tag => `#${tag}`).join(' ') : ''}
+
+ + ${post._count.comments+' comments' || 'No comments'} + +
+
+ `; + + postElement.dataset.id = post.id; + postElement.addEventListener("click", () => { + renderPost(post.id); + }); + container.appendChild(postElement); + +}) +} + +searchPosts(endpoint); + diff --git a/js/html-functions/feed/tagPosts.js b/js/html-functions/feed/tagPosts.js new file mode 100644 index 0000000..a439bb2 --- /dev/null +++ b/js/html-functions/feed/tagPosts.js @@ -0,0 +1,48 @@ +import { fetchPosts } from "../../api-calls/feed/fetchPosts.js"; +import { renderPost } from "./renderPost.js"; + +export async function tagPosts(){ + const endpoint = "/social/posts?_tag="; + const params = new URLSearchParams(window.location.search); + const tagTerm = params.get('tag'); + + const posts = await fetchPosts(endpoint+tagTerm); + const container = document.querySelector("#posts-container"); + + container.innerHTML = ""; + + posts.data.forEach(function(post){ + const postElement = document.createElement("div"); + postElement.classList.add( + "col-12", + "col-md-5", + "p-1", + "hover-element", + "position-relative", + "shadow", + "mt-2" + ); + postElement.innerHTML = ` + +
+

${post.title || 'Untitled post'}

+

${post.body || 'No post text'}

+ ${post.media?.alt || 'Post Image'} +
${post.tags ? post.tags.map(tag => `#${tag}`).join(' ') : ''}
+
+ + ${post._count.comments+' comments' || 'No comments'} +
+
+ `; + + postElement.dataset.id = post.id; + postElement.addEventListener("click", () => { + renderPost(post.id); + }); + container.appendChild(postElement); + +}) +} + +tagPosts(); diff --git a/js/html-functions/profile/createProfile.js b/js/html-functions/profile/createProfile.js new file mode 100644 index 0000000..663de83 --- /dev/null +++ b/js/html-functions/profile/createProfile.js @@ -0,0 +1,47 @@ +import { load } from "../../functions/load.js"; +import { postInputValues } from "../../functions/postInputValues.js"; +import { profileInputValues } from "../../functions/profileInputValues.js"; +import { fetchUser } from "../../api-calls/fetchUser.js"; + +export async function createProfile () { + const container = document.querySelector("#profile-container"); + const myProfile = load("profile"); + + + const profileName = myProfile.name; + const profile = await fetchUser(profileName); + console.log(profile); + container.innerHTML = ` +
+
+
+
+ ${profile.data.avatar.alt} +
+

${profile.data.name}

+

+ ${profile.data.bio || "You haven't written a bio yet"} +

+
+
+
${profile.data._count.followers || "0"}
+

Followers

+
+
+
${profile.data._count.following || "0"}
+

Following

+
+ +
+
+
+
+ ` + profileInputValues(profileName); +} + +createProfile(); \ No newline at end of file diff --git a/js/html-functions/profile/createUserProfile.js b/js/html-functions/profile/createUserProfile.js new file mode 100644 index 0000000..5b8a5ca --- /dev/null +++ b/js/html-functions/profile/createUserProfile.js @@ -0,0 +1,48 @@ +import { fetchUser } from "../../api-calls/fetchUser.js"; +import { checkIfFollows } from "../../api-calls/profile/checkIfFollow.js"; +import { followClick } from "../../functions/followClick.js"; + +export async function createUserProfile () { + const container = document.querySelector("#profile-container"); + const queryString = document.location.search; + const params = new URLSearchParams(queryString); + const id = params.get("profile"); + const profile = await fetchUser(id); + console.log(profile); + + + container.innerHTML = ` +
+
+
+
+ ${profile.data.avatar.alt} +
+

${profile.data.name}

+

+ ${profile.data.bio || "This user haven't written a bio yet"} +

+
+ +
+
${profile.data._count.followers}
+

Followers

+
+
+
${profile.data._count.following}
+

Following

+
+
+
+
+
+ ` + followClick(id); + checkIfFollows(id); + +} +createUserProfile(); \ No newline at end of file diff --git a/js/html-functions/profile/renderMyPosts.js b/js/html-functions/profile/renderMyPosts.js new file mode 100644 index 0000000..2a3d0cd --- /dev/null +++ b/js/html-functions/profile/renderMyPosts.js @@ -0,0 +1,63 @@ +import { fetchMyPosts } from "../../api-calls/profile/fetchMyPosts.js"; +import { postInputValues } from "../../functions/postInputValues.js"; +import { deletePost } from "../../api-calls/profile/deletePost.js"; + + +export async function renderMyPosts(){ + const posts = await fetchMyPosts(); + const container = document.querySelector("#posts-container"); + container.innerHTML = ""; + + posts.forEach(function(post){ + const postElement = document.createElement("div"); + postElement.classList.add( + "col-12", + "col-md-5", + "p-1", + "hover-element", + "position-relative", + "shadow", + "mt-2" + ); + postElement.innerHTML = ` +

${post.title || 'Untitled post'}

+

${post.body || 'No post text'}

+ ${post.media?.alt || 'Post Image'} +
${post.tags ? post.tags.map(tag => `#${tag}`).join(' ') : ''}
+ + + + `; + + container.appendChild(postElement); +}) + +const editButtons = document.querySelectorAll(".modal-button"); + +editButtons.forEach((button) => { + button.addEventListener("click", (event) => { + const postId = event.target.getAttribute("data-id"); + console.log("Post ID:", postId); + postInputValues(postId); + + }); +}); +const deleteButtons = document.querySelectorAll(".delete-button"); + +deleteButtons.forEach((button) => { + button.addEventListener("click", (event) => { + const postId = event.target.getAttribute("data-id"); + console.log("Post ID:", postId); + const confirmDelete = confirm("Are you sure you want to delete this post?"); + if (confirmDelete) { + deletePost(postId); + window.location.reload() + } + + }); +}); + +} + +renderMyPosts(); + diff --git a/js/html-functions/profile/renderUserPosts.js b/js/html-functions/profile/renderUserPosts.js new file mode 100644 index 0000000..2d7ab3f --- /dev/null +++ b/js/html-functions/profile/renderUserPosts.js @@ -0,0 +1,34 @@ +import { fetchUserPosts } from "../../api-calls/profile/fetchUserPosts.js"; + +export async function renderUserPosts(){ + + const queryString = document.location.search; + const params = new URLSearchParams(queryString); + const id = params.get("profile"); + const posts = await fetchUserPosts(id); + const container = document.querySelector("#posts-container"); + container.innerHTML = ""; + + posts.forEach(function(post){ + const postElement = document.createElement("div"); + postElement.classList.add( + "col-12", + "col-md-5", + "p-1", + "hover-element", + "position-relative", + "shadow", + "mt-2" + ); + postElement.innerHTML = ` +

${post.title || 'Untitled post'}

+

${post.body || 'No post text'}

+ ${post.media?.alt || 'Post Image'} +
${post.tags ? post.tags.map(tag => `#${tag}`).join(' ') : ''}
+ `; + + container.appendChild(postElement); +}) +} + +renderUserPosts(); \ No newline at end of file diff --git a/node_modules/.bin/atob b/node_modules/.bin/atob new file mode 100644 index 0000000..bcdbad1 --- /dev/null +++ b/node_modules/.bin/atob @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../atob/bin/atob.js" "$@" +else + exec node "$basedir/../atob/bin/atob.js" "$@" +fi diff --git a/node_modules/.bin/atob.cmd b/node_modules/.bin/atob.cmd new file mode 100644 index 0000000..850a60b --- /dev/null +++ b/node_modules/.bin/atob.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\atob\bin\atob.js" %* diff --git a/node_modules/.bin/atob.ps1 b/node_modules/.bin/atob.ps1 new file mode 100644 index 0000000..4a9f311 --- /dev/null +++ b/node_modules/.bin/atob.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args + } else { + & "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../atob/bin/atob.js" $args + } else { + & "node$exe" "$basedir/../atob/bin/atob.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/live-server b/node_modules/.bin/live-server new file mode 100644 index 0000000..534fcce --- /dev/null +++ b/node_modules/.bin/live-server @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../live-server/live-server.js" "$@" +else + exec node "$basedir/../live-server/live-server.js" "$@" +fi diff --git a/node_modules/.bin/live-server.cmd b/node_modules/.bin/live-server.cmd new file mode 100644 index 0000000..f6e0d29 --- /dev/null +++ b/node_modules/.bin/live-server.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\live-server\live-server.js" %* diff --git a/node_modules/.bin/live-server.ps1 b/node_modules/.bin/live-server.ps1 new file mode 100644 index 0000000..5858d01 --- /dev/null +++ b/node_modules/.bin/live-server.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../live-server/live-server.js" $args + } else { + & "$basedir/node$exe" "$basedir/../live-server/live-server.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../live-server/live-server.js" $args + } else { + & "node$exe" "$basedir/../live-server/live-server.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 100644 index 0000000..7751de3 --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../mime/cli.js" "$@" +else + exec node "$basedir/../mime/cli.js" "$@" +fi diff --git a/node_modules/.bin/mime.cmd b/node_modules/.bin/mime.cmd new file mode 100644 index 0000000..54491f1 --- /dev/null +++ b/node_modules/.bin/mime.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* diff --git a/node_modules/.bin/mime.ps1 b/node_modules/.bin/mime.ps1 new file mode 100644 index 0000000..2222f40 --- /dev/null +++ b/node_modules/.bin/mime.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args + } else { + & "$basedir/node$exe" "$basedir/../mime/cli.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../mime/cli.js" $args + } else { + & "node$exe" "$basedir/../mime/cli.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/npm-run-all b/node_modules/.bin/npm-run-all new file mode 100644 index 0000000..adb4391 --- /dev/null +++ b/node_modules/.bin/npm-run-all @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../npm-run-all/bin/npm-run-all/index.js" "$@" +else + exec node "$basedir/../npm-run-all/bin/npm-run-all/index.js" "$@" +fi diff --git a/node_modules/.bin/npm-run-all.cmd b/node_modules/.bin/npm-run-all.cmd new file mode 100644 index 0000000..2fc6bff --- /dev/null +++ b/node_modules/.bin/npm-run-all.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\npm-run-all\bin\npm-run-all\index.js" %* diff --git a/node_modules/.bin/npm-run-all.ps1 b/node_modules/.bin/npm-run-all.ps1 new file mode 100644 index 0000000..382d2c5 --- /dev/null +++ b/node_modules/.bin/npm-run-all.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args + } else { + & "$basedir/node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args + } else { + & "node$exe" "$basedir/../npm-run-all/bin/npm-run-all/index.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/pidtree b/node_modules/.bin/pidtree new file mode 100644 index 0000000..05eec73 --- /dev/null +++ b/node_modules/.bin/pidtree @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../pidtree/bin/pidtree.js" "$@" +else + exec node "$basedir/../pidtree/bin/pidtree.js" "$@" +fi diff --git a/node_modules/.bin/pidtree.cmd b/node_modules/.bin/pidtree.cmd new file mode 100644 index 0000000..6a2256c --- /dev/null +++ b/node_modules/.bin/pidtree.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\pidtree\bin\pidtree.js" %* diff --git a/node_modules/.bin/pidtree.ps1 b/node_modules/.bin/pidtree.ps1 new file mode 100644 index 0000000..7507e54 --- /dev/null +++ b/node_modules/.bin/pidtree.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../pidtree/bin/pidtree.js" $args + } else { + & "$basedir/node$exe" "$basedir/../pidtree/bin/pidtree.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../pidtree/bin/pidtree.js" $args + } else { + & "node$exe" "$basedir/../pidtree/bin/pidtree.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 100644 index 0000000..c043cba --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../resolve/bin/resolve" "$@" +else + exec node "$basedir/../resolve/bin/resolve" "$@" +fi diff --git a/node_modules/.bin/resolve.cmd b/node_modules/.bin/resolve.cmd new file mode 100644 index 0000000..1a017c4 --- /dev/null +++ b/node_modules/.bin/resolve.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\resolve\bin\resolve" %* diff --git a/node_modules/.bin/resolve.ps1 b/node_modules/.bin/resolve.ps1 new file mode 100644 index 0000000..f22b2d3 --- /dev/null +++ b/node_modules/.bin/resolve.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args + } else { + & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../resolve/bin/resolve" $args + } else { + & "node$exe" "$basedir/../resolve/bin/resolve" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/run-p b/node_modules/.bin/run-p new file mode 100644 index 0000000..edba13d --- /dev/null +++ b/node_modules/.bin/run-p @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../npm-run-all/bin/run-p/index.js" "$@" +else + exec node "$basedir/../npm-run-all/bin/run-p/index.js" "$@" +fi diff --git a/node_modules/.bin/run-p.cmd b/node_modules/.bin/run-p.cmd new file mode 100644 index 0000000..234604b --- /dev/null +++ b/node_modules/.bin/run-p.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\npm-run-all\bin\run-p\index.js" %* diff --git a/node_modules/.bin/run-p.ps1 b/node_modules/.bin/run-p.ps1 new file mode 100644 index 0000000..b806ccb --- /dev/null +++ b/node_modules/.bin/run-p.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args + } else { + & "$basedir/node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args + } else { + & "node$exe" "$basedir/../npm-run-all/bin/run-p/index.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/run-s b/node_modules/.bin/run-s new file mode 100644 index 0000000..8979ff6 --- /dev/null +++ b/node_modules/.bin/run-s @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../npm-run-all/bin/run-s/index.js" "$@" +else + exec node "$basedir/../npm-run-all/bin/run-s/index.js" "$@" +fi diff --git a/node_modules/.bin/run-s.cmd b/node_modules/.bin/run-s.cmd new file mode 100644 index 0000000..ac02b33 --- /dev/null +++ b/node_modules/.bin/run-s.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\npm-run-all\bin\run-s\index.js" %* diff --git a/node_modules/.bin/run-s.ps1 b/node_modules/.bin/run-s.ps1 new file mode 100644 index 0000000..06b417c --- /dev/null +++ b/node_modules/.bin/run-s.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../npm-run-all/bin/run-s/index.js" $args + } else { + & "$basedir/node$exe" "$basedir/../npm-run-all/bin/run-s/index.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../npm-run-all/bin/run-s/index.js" $args + } else { + & "node$exe" "$basedir/../npm-run-all/bin/run-s/index.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/sass b/node_modules/.bin/sass new file mode 100644 index 0000000..dde8400 --- /dev/null +++ b/node_modules/.bin/sass @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../sass/sass.js" "$@" +else + exec node "$basedir/../sass/sass.js" "$@" +fi diff --git a/node_modules/.bin/sass.cmd b/node_modules/.bin/sass.cmd new file mode 100644 index 0000000..0cf95f6 --- /dev/null +++ b/node_modules/.bin/sass.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sass\sass.js" %* diff --git a/node_modules/.bin/sass.ps1 b/node_modules/.bin/sass.ps1 new file mode 100644 index 0000000..715ffd5 --- /dev/null +++ b/node_modules/.bin/sass.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../sass/sass.js" $args + } else { + & "$basedir/node$exe" "$basedir/../sass/sass.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../sass/sass.js" $args + } else { + & "node$exe" "$basedir/../sass/sass.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 100644 index 0000000..384db49 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../semver/bin/semver" "$@" +else + exec node "$basedir/../semver/bin/semver" "$@" +fi diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..22d9286 --- /dev/null +++ b/node_modules/.bin/semver.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver" %* diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 new file mode 100644 index 0000000..98c1b09 --- /dev/null +++ b/node_modules/.bin/semver.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + } else { + & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../semver/bin/semver" $args + } else { + & "node$exe" "$basedir/../semver/bin/semver" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 100644 index 0000000..93e9edb --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" +else + exec node "$basedir/../uuid/bin/uuid" "$@" +fi diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd new file mode 100644 index 0000000..1156e27 --- /dev/null +++ b/node_modules/.bin/uuid.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 new file mode 100644 index 0000000..9e6c24b --- /dev/null +++ b/node_modules/.bin/uuid.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args + } else { + & "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../uuid/bin/uuid" $args + } else { + & "node$exe" "$basedir/../uuid/bin/uuid" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 100644 index 0000000..cf23e65 --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../which/bin/which" "$@" +else + exec node "$basedir/../which/bin/which" "$@" +fi diff --git a/node_modules/.bin/which.cmd b/node_modules/.bin/which.cmd new file mode 100644 index 0000000..ead37d6 --- /dev/null +++ b/node_modules/.bin/which.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\which" %* diff --git a/node_modules/.bin/which.ps1 b/node_modules/.bin/which.ps1 new file mode 100644 index 0000000..1437a3b --- /dev/null +++ b/node_modules/.bin/which.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../which/bin/which" $args + } else { + & "$basedir/node$exe" "$basedir/../which/bin/which" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../which/bin/which" $args + } else { + & "node$exe" "$basedir/../which/bin/which" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..f042de8 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,3941 @@ +{ + "name": "bootstrap", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "license": "ISC", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/apache-crypt": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.6.tgz", + "integrity": "sha512-072WetlM4blL8PREJVeY+WHiUh1R5VNt2HfceGS8aKqttPHcmqE5pkKuXPz/ULmJOFkc8Hw3kfKl6vy7Qka6DA==", + "dev": true, + "license": "MIT", + "dependencies": { + "unix-crypt-td-js": "^1.1.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/apache-md5": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.8.tgz", + "integrity": "sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bootstrap": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0.tgz", + "integrity": "sha512-qlnS9GL6YZE6Wnef46GxGv1UpGGzAwO0aPL1yOjzDIJpeApeMvqV24iL+pjr2kU4dduoBA9fINKWKgMToobx9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.5" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.0.tgz", + "integrity": "sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "dev": true, + "license": "MIT" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/http-auth": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz", + "integrity": "sha512-Jbx0+ejo2IOx+cRUYAGS1z6RGc6JfYUNkysZM4u4Sfk1uLlGv814F7/PIjQQAuThLdAWxb74JMGd5J8zex1VQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "apache-crypt": "^1.1.2", + "apache-md5": "^1.0.6", + "bcryptjs": "^2.3.0", + "uuid": "^3.0.0" + }, + "engines": { + "node": ">=4.6.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/live-server": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/live-server/-/live-server-1.2.2.tgz", + "integrity": "sha512-t28HXLjITRGoMSrCOv4eZ88viHaBVIjKjdI5PO92Vxlu+twbk6aE0t7dVIaz6ZWkjPilYFV6OSdMYl9ybN2B4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^2.0.4", + "colors": "1.4.0", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + }, + "bin": { + "live-server": "live-server.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/live-server/node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/live-server/node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", + "dev": true + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/opn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz", + "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==", + "deprecated": "The package has been renamed to `open`", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^1.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "dev": true, + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "license": "MIT", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-middleware": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha512-EGCG8SeoIRVMhsqHQUdDigB2i7qU7fCsWASwn54+nPutYO8n4q6EiwMzyfWlC+dzRFExP+kvcnDFdBDHoZBU7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.1.tgz", + "integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true, + "license": "ISC" + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sass": { + "version": "1.79.3", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.79.3.tgz", + "integrity": "sha512-m7dZxh0W9EZ3cw50Me5GOuYm/tVAJAn91SUnohLRo9cXBixGUOdvmryN+dXpwR831bhoY3Zv7rEFt85PUwTmzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "license": "MIT", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unix-crypt-td-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz", + "integrity": "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + } + } +} diff --git a/node_modules/@popperjs/core/LICENSE.md b/node_modules/@popperjs/core/LICENSE.md new file mode 100644 index 0000000..0370c45 --- /dev/null +++ b/node_modules/@popperjs/core/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 Federico Zivolo + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@popperjs/core/README.md b/node_modules/@popperjs/core/README.md new file mode 100644 index 0000000..53be7b9 --- /dev/null +++ b/node_modules/@popperjs/core/README.md @@ -0,0 +1,376 @@ + +

+ Popper +

+ +
+

Tooltip & Popover Positioning Engine

+
+ +

+ + npm version + + + npm downloads per month (popper.js + @popperjs/core) + + + Rolling Versions + +

+ +
+ + +**Positioning tooltips and popovers is difficult. Popper is here to help!** + +Given an element, such as a button, and a tooltip element describing it, Popper +will automatically put the tooltip in the right place near the button. + +It will position _any_ UI element that "pops out" from the flow of your document +and floats near a target element. The most common example is a tooltip, but it +also includes popovers, drop-downs, and more. All of these can be generically +described as a "popper" element. + +## Demo + +[![Popper visualized](https://i.imgur.com/F7qWsmV.jpg)](https://popper.js.org) + +## Docs + +- [v2.x (latest)](https://popper.js.org/docs/v2/) +- [v1.x](https://popper.js.org/docs/v1/) + +We've created a +[Migration Guide](https://popper.js.org/docs/v2/migration-guide/) to help you +migrate from Popper 1 to Popper 2. + +To contribute to the Popper website and documentation, please visit the +[dedicated repository](https://github.com/popperjs/website). + +## Why not use pure CSS? + +- **Clipping and overflow issues**: Pure CSS poppers will not be prevented from + overflowing clipping boundaries, such as the viewport. It will get partially + cut off or overflows if it's near the edge since there is no dynamic + positioning logic. When using Popper, your popper will always be positioned in + the right place without needing manual adjustments. +- **No flipping**: CSS poppers will not flip to a different placement to fit + better in view if necessary. While you can manually adjust for the main axis + overflow, this feature cannot be achieved via CSS alone. Popper automatically + flips the tooltip to make it fit in view as best as possible for the user. +- **No virtual positioning**: CSS poppers cannot follow the mouse cursor or be + used as a context menu. Popper allows you to position your tooltip relative to + any coordinates you desire. +- **Slower development cycle**: When pure CSS is used to position popper + elements, the lack of dynamic positioning means they must be carefully placed + to consider overflow on all screen sizes. In reusable component libraries, + this means a developer can't just add the component anywhere on the page, + because these issues need to be considered and adjusted for every time. With + Popper, you can place your elements anywhere and they will be positioned + correctly, without needing to consider different screen sizes, layouts, etc. + This massively speeds up development time because this work is automatically + offloaded to Popper. +- **Lack of extensibility**: CSS poppers cannot be easily extended to fit any + arbitrary use case you may need to adjust for. Popper is built with + extensibility in mind. + +## Why Popper? + +With the CSS drawbacks out of the way, we now move on to Popper in the +JavaScript space itself. + +Naive JavaScript tooltip implementations usually have the following problems: + +- **Scrolling containers**: They don't ensure the tooltip stays with the + reference element while scrolling when inside any number of scrolling + containers. +- **DOM context**: They often require the tooltip move outside of its original + DOM context because they don't handle `offsetParent` contexts. +- **Compatibility**: Popper handles an incredible number of edge cases regarding + different browsers and environments (mobile viewports, RTL, scrollbars enabled + or disabled, etc.). Popper is a popular and well-maintained library, so you + can be confident positioning will work for your users on any device. +- **Configurability**: They often lack advanced configurability to suit any + possible use case. +- **Size**: They are usually relatively large in size, or require an ancient + jQuery dependency. +- **Performance**: They often have runtime performance issues and update the + tooltip position too slowly. + +**Popper solves all of these key problems in an elegant, performant manner.** It +is a lightweight ~3 kB library that aims to provide a reliable and extensible +positioning engine you can use to ensure all your popper elements are positioned +in the right place. + +When you start writing your own popper implementation, you'll quickly run into +all of the problems mentioned above. These widgets are incredibly common in our +UIs; we've done the hard work figuring this out so you don't need to spend hours +fixing and handling numerous edge cases that we already ran into while building +the library! + +Popper is used in popular libraries like Bootstrap, Foundation, Material UI, and +more. It's likely you've already used popper elements on the web positioned by +Popper at some point in the past few years. + +Since we write UIs using powerful abstraction libraries such as React or Angular +nowadays, you'll also be glad to know Popper can fully integrate with them and +be a good citizen together with your other components. Check out `react-popper` +for the official Popper wrapper for React. + +## Installation + +### 1. Package Manager + +```bash +# With npm +npm i @popperjs/core + +# With Yarn +yarn add @popperjs/core +``` + +### 2. CDN + +```html + + + + + +``` + +### 3. Direct Download? + +Managing dependencies by "directly downloading" them and placing them into your +source code is not recommended for a variety of reasons, including missing out +on feat/fix updates easily. Please use a versioning management system like a CDN +or npm/Yarn. + +## Usage + +The most straightforward way to get started is to import Popper from the `unpkg` +CDN, which includes all of its features. You can call the `Popper.createPopper` +constructor to create new popper instances. + +Here is a complete example: + +```html + +Popper example + + + + + + + + +``` + +Visit the [tutorial](https://popper.js.org/docs/v2/tutorial/) for an example of +how to build your own tooltip from scratch using Popper. + +### Module bundlers + +You can import the `createPopper` constructor from the fully-featured file: + +```js +import { createPopper } from '@popperjs/core'; + +const button = document.querySelector('#button'); +const tooltip = document.querySelector('#tooltip'); + +// Pass the button, the tooltip, and some options, and Popper will do the +// magic positioning for you: +createPopper(button, tooltip, { + placement: 'right', +}); +``` + +All the modifiers listed in the docs menu will be enabled and "just work", so +you don't need to think about setting Popper up. The size of Popper including +all of its features is about 5 kB minzipped, but it may grow a bit in the +future. + +#### Popper Lite (tree-shaking) + +If bundle size is important, you'll want to take advantage of tree-shaking. The +library is built in a modular way to allow to import only the parts you really +need. + +```js +import { createPopperLite as createPopper } from '@popperjs/core'; +``` + +The Lite version includes the most necessary modifiers that will compute the +offsets of the popper, compute and add the positioning styles, and add event +listeners. This is close in bundle size to pure CSS tooltip libraries, and +behaves somewhat similarly. + +However, this does not include the features that makes Popper truly useful. + +The two most useful modifiers not included in Lite are `preventOverflow` and +`flip`: + +```js +import { + createPopperLite as createPopper, + preventOverflow, + flip, +} from '@popperjs/core'; + +const button = document.querySelector('#button'); +const tooltip = document.querySelector('#tooltip'); + +createPopper(button, tooltip, { + modifiers: [preventOverflow, flip], +}); +``` + +As you make more poppers, you may be finding yourself needing other modifiers +provided by the library. + +See [tree-shaking](https://popper.js.org/docs/v2/performance/#tree-shaking) for more +information. + +## Distribution targets + +Popper is distributed in 3 different versions, in 3 different file formats. + +The 3 file formats are: + +- `esm` (works with `import` syntax — **recommended**) +- `umd` (works with ` + +``` + +Or use an AMD-style loader (such as [RequireJS](https://requirejs.org/)): + +```js +require(['./immutable.min.js'], function (Immutable) { + var map1 = Immutable.Map({ a: 1, b: 2, c: 3 }); + var map2 = map1.set('b', 50); + map1.get('b'); // 2 + map2.get('b'); // 50 +}); +``` + +### Flow & TypeScript + +Use these Immutable collections and sequences as you would use native +collections in your [Flowtype](https://flowtype.org/) or [TypeScript](https://typescriptlang.org) programs while still taking +advantage of type generics, error detection, and auto-complete in your IDE. + +Installing `immutable` via npm brings with it type definitions for Flow (v0.55.0 or higher) +and TypeScript (v2.1.0 or higher), so you shouldn't need to do anything at all! + +#### Using TypeScript with Immutable.js v4 + +Immutable.js type definitions embrace ES2015. While Immutable.js itself supports +legacy browsers and environments, its type definitions require TypeScript's 2015 +lib. Include either `"target": "es2015"` or `"lib": "es2015"` in your +`tsconfig.json`, or provide `--target es2015` or `--lib es2015` to the +`tsc` command. + + + +```js +const { Map } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = map1.set('b', 50); +map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50 +``` + +#### Using TypeScript with Immutable.js v3 and earlier: + +Previous versions of Immutable.js include a reference file which you can include +via relative path to the type definitions at the top of your file. + +```js +/// +import Immutable from 'immutable'; +var map1: Immutable.Map; +map1 = Immutable.Map({ a: 1, b: 2, c: 3 }); +var map2 = map1.set('b', 50); +map1.get('b'); // 2 +map2.get('b'); // 50 +``` + +## The case for Immutability + +Much of what makes application development difficult is tracking mutation and +maintaining state. Developing with immutable data encourages you to think +differently about how data flows through your application. + +Subscribing to data events throughout your application creates a huge overhead of +book-keeping which can hurt performance, sometimes dramatically, and creates +opportunities for areas of your application to get out of sync with each other +due to easy to make programmer error. Since immutable data never changes, +subscribing to changes throughout the model is a dead-end and new data can only +ever be passed from above. + +This model of data flow aligns well with the architecture of [React][] +and especially well with an application designed using the ideas of [Flux][]. + +When data is passed from above rather than being subscribed to, and you're only +interested in doing work when something has changed, you can use equality. + +Immutable collections should be treated as _values_ rather than _objects_. While +objects represent some thing which could change over time, a value represents +the state of that thing at a particular instance of time. This principle is most +important to understanding the appropriate use of immutable data. In order to +treat Immutable.js collections as values, it's important to use the +`Immutable.is()` function or `.equals()` method to determine _value equality_ +instead of the `===` operator which determines object _reference identity_. + + + +```js +const { Map } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = Map({ a: 1, b: 2, c: 3 }); +map1.equals(map2); // true +map1 === map2; // false +``` + +Note: As a performance optimization Immutable.js attempts to return the existing +collection when an operation would result in an identical collection, allowing +for using `===` reference equality to determine if something definitely has not +changed. This can be extremely useful when used within a memoization function +which would prefer to re-run the function if a deeper equality check could +potentially be more costly. The `===` equality check is also used internally by +`Immutable.is` and `.equals()` as a performance optimization. + + + +```js +const { Map } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = map1.set('b', 2); // Set to same value +map1 === map2; // true +``` + +If an object is immutable, it can be "copied" simply by making another reference +to it instead of copying the entire object. Because a reference is much smaller +than the object itself, this results in memory savings and a potential boost in +execution speed for programs which rely on copies (such as an undo-stack). + + + +```js +const { Map } = require('immutable'); +const map = Map({ a: 1, b: 2, c: 3 }); +const mapCopy = map; // Look, "copies" are free! +``` + +[React]: https://reactjs.org/ +[Flux]: https://facebook.github.io/flux/docs/in-depth-overview/ + + +## JavaScript-first API + +While Immutable.js is inspired by Clojure, Scala, Haskell and other functional +programming environments, it's designed to bring these powerful concepts to +JavaScript, and therefore has an Object-Oriented API that closely mirrors that +of [ES2015][] [Array][], [Map][], and [Set][]. + +[es2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla +[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array +[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map +[set]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set + +The difference for the immutable collections is that methods which would mutate +the collection, like `push`, `set`, `unshift` or `splice`, instead return a new +immutable collection. Methods which return new arrays, like `slice` or `concat`, +instead return new immutable collections. + + + +```js +const { List } = require('immutable'); +const list1 = List([1, 2]); +const list2 = list1.push(3, 4, 5); +const list3 = list2.unshift(0); +const list4 = list1.concat(list2, list3); +assert.equal(list1.size, 2); +assert.equal(list2.size, 5); +assert.equal(list3.size, 6); +assert.equal(list4.size, 13); +assert.equal(list4.get(0), 1); +``` + +Almost all of the methods on [Array][] will be found in similar form on +`Immutable.List`, those of [Map][] found on `Immutable.Map`, and those of [Set][] +found on `Immutable.Set`, including collection operations like `forEach()` +and `map()`. + + + +```js +const { Map } = require('immutable'); +const alpha = Map({ a: 1, b: 2, c: 3, d: 4 }); +alpha.map((v, k) => k.toUpperCase()).join(); +// 'A,B,C,D' +``` + +### Convert from raw JavaScript objects and arrays. + +Designed to inter-operate with your existing JavaScript, Immutable.js +accepts plain JavaScript Arrays and Objects anywhere a method expects a +`Collection`. + + + +```js +const { Map, List } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3, d: 4 }); +const map2 = Map({ c: 10, a: 20, t: 30 }); +const obj = { d: 100, o: 200, g: 300 }; +const map3 = map1.merge(map2, obj); +// Map { a: 20, b: 2, c: 10, d: 100, t: 30, o: 200, g: 300 } +const list1 = List([1, 2, 3]); +const list2 = List([4, 5, 6]); +const array = [7, 8, 9]; +const list3 = list1.concat(list2, array); +// List [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] +``` + +This is possible because Immutable.js can treat any JavaScript Array or Object +as a Collection. You can take advantage of this in order to get sophisticated +collection methods on JavaScript Objects, which otherwise have a very sparse +native API. Because Seq evaluates lazily and does not cache intermediate +results, these operations can be extremely efficient. + + + +```js +const { Seq } = require('immutable'); +const myObject = { a: 1, b: 2, c: 3 }; +Seq(myObject) + .map(x => x * x) + .toObject(); +// { a: 1, b: 4, c: 9 } +``` + +Keep in mind, when using JS objects to construct Immutable Maps, that +JavaScript Object properties are always strings, even if written in a quote-less +shorthand, while Immutable Maps accept keys of any type. + + + +```js +const { fromJS } = require('immutable'); + +const obj = { 1: 'one' }; +console.log(Object.keys(obj)); // [ "1" ] +console.log(obj['1'], obj[1]); // "one", "one" + +const map = fromJS(obj); +console.log(map.get('1'), map.get(1)); // "one", undefined +``` + +Property access for JavaScript Objects first converts the key to a string, but +since Immutable Map keys can be of any type the argument to `get()` is +not altered. + +### Converts back to raw JavaScript objects. + +All Immutable.js Collections can be converted to plain JavaScript Arrays and +Objects shallowly with `toArray()` and `toObject()` or deeply with `toJS()`. +All Immutable Collections also implement `toJSON()` allowing them to be passed +to `JSON.stringify` directly. They also respect the custom `toJSON()` methods of +nested objects. + + + +```js +const { Map, List } = require('immutable'); +const deep = Map({ a: 1, b: 2, c: List([3, 4, 5]) }); +console.log(deep.toObject()); // { a: 1, b: 2, c: List [ 3, 4, 5 ] } +console.log(deep.toArray()); // [ 1, 2, List [ 3, 4, 5 ] ] +console.log(deep.toJS()); // { a: 1, b: 2, c: [ 3, 4, 5 ] } +JSON.stringify(deep); // '{"a":1,"b":2,"c":[3,4,5]}' +``` + +### Embraces ES2015 + +Immutable.js supports all JavaScript environments, including legacy +browsers (even IE11). However it also takes advantage of features added to +JavaScript in [ES2015][], the latest standard version of JavaScript, including +[Iterators][], [Arrow Functions][], [Classes][], and [Modules][]. It's inspired +by the native [Map][] and [Set][] collections added to ES2015. + +All examples in the Documentation are presented in ES2015. To run in all +browsers, they need to be translated to ES5. + +```js +// ES2015 +const mapped = foo.map(x => x * x); +// ES5 +var mapped = foo.map(function (x) { + return x * x; +}); +``` + +All Immutable.js collections are [Iterable][iterators], which allows them to be +used anywhere an Iterable is expected, such as when spreading into an Array. + + + +```js +const { List } = require('immutable'); +const aList = List([1, 2, 3]); +const anArray = [0, ...aList, 4, 5]; // [ 0, 1, 2, 3, 4, 5 ] +``` + +Note: A Collection is always iterated in the same order, however that order may +not always be well defined, as is the case for the `Map` and `Set`. + +[Iterators]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol +[Arrow Functions]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions +[Classes]: https://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes +[Modules]: https://www.2ality.com/2014/09/es6-modules-final.html + + +## Nested Structures + +The collections in Immutable.js are intended to be nested, allowing for deep +trees of data, similar to JSON. + + + +```js +const { fromJS } = require('immutable'); +const nested = fromJS({ a: { b: { c: [3, 4, 5] } } }); +// Map { a: Map { b: Map { c: List [ 3, 4, 5 ] } } } +``` + +A few power-tools allow for reading and operating on nested data. The +most useful are `mergeDeep`, `getIn`, `setIn`, and `updateIn`, found on `List`, +`Map` and `OrderedMap`. + + + +```js +const { fromJS } = require('immutable'); +const nested = fromJS({ a: { b: { c: [3, 4, 5] } } }); + +const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } }); +// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 6 } } } + +console.log(nested2.getIn(['a', 'b', 'd'])); // 6 + +const nested3 = nested2.updateIn(['a', 'b', 'd'], value => value + 1); +console.log(nested3); +// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 7 } } } + +const nested4 = nested3.updateIn(['a', 'b', 'c'], list => list.push(6)); +// Map { a: Map { b: Map { c: List [ 3, 4, 5, 6 ], d: 7 } } } +``` + +## Equality treats Collections as Values + +Immutable.js collections are treated as pure data _values_. Two immutable +collections are considered _value equal_ (via `.equals()` or `is()`) if they +represent the same collection of values. This differs from JavaScript's typical +_reference equal_ (via `===` or `==`) for Objects and Arrays which only +determines if two variables represent references to the same object instance. + +Consider the example below where two identical `Map` instances are not +_reference equal_ but are _value equal_. + + + +```js +// First consider: +const obj1 = { a: 1, b: 2, c: 3 }; +const obj2 = { a: 1, b: 2, c: 3 }; +obj1 !== obj2; // two different instances are always not equal with === + +const { Map, is } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = Map({ a: 1, b: 2, c: 3 }); +map1 !== map2; // two different instances are not reference-equal +map1.equals(map2); // but are value-equal if they have the same values +is(map1, map2); // alternatively can use the is() function +``` + +Value equality allows Immutable.js collections to be used as keys in Maps or +values in Sets, and retrieved with different but equivalent collections: + + + +```js +const { Map, Set } = require('immutable'); +const map1 = Map({ a: 1, b: 2, c: 3 }); +const map2 = Map({ a: 1, b: 2, c: 3 }); +const set = Set().add(map1); +set.has(map2); // true because these are value-equal +``` + +Note: `is()` uses the same measure of equality as [Object.is][] for scalar +strings and numbers, but uses value equality for Immutable collections, +determining if both are immutable and all keys and values are equal +using the same measure of equality. + +[object.is]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + +#### Performance tradeoffs + +While value equality is useful in many circumstances, it has different +performance characteristics than reference equality. Understanding these +tradeoffs may help you decide which to use in each case, especially when used +to memoize some operation. + +When comparing two collections, value equality may require considering every +item in each collection, on an `O(N)` time complexity. For large collections of +values, this could become a costly operation. Though if the two are not equal +and hardly similar, the inequality is determined very quickly. In contrast, when +comparing two collections with reference equality, only the initial references +to memory need to be compared which is not based on the size of the collections, +which has an `O(1)` time complexity. Checking reference equality is always very +fast, however just because two collections are not reference-equal does not rule +out the possibility that they may be value-equal. + +#### Return self on no-op optimization + +When possible, Immutable.js avoids creating new objects for updates where no +change in _value_ occurred, to allow for efficient _reference equality_ checking +to quickly determine if no change occurred. + + + +```js +const { Map } = require('immutable'); +const originalMap = Map({ a: 1, b: 2, c: 3 }); +const updatedMap = originalMap.set('b', 2); +updatedMap === originalMap; // No-op .set() returned the original reference. +``` + +However updates which do result in a change will return a new reference. Each +of these operations occur independently, so two similar updates will not return +the same reference: + + + +```js +const { Map } = require('immutable'); +const originalMap = Map({ a: 1, b: 2, c: 3 }); +const updatedMap = originalMap.set('b', 1000); +// New instance, leaving the original immutable. +updatedMap !== originalMap; +const anotherUpdatedMap = originalMap.set('b', 1000); +// Despite both the results of the same operation, each created a new reference. +anotherUpdatedMap !== updatedMap; +// However the two are value equal. +anotherUpdatedMap.equals(updatedMap); +``` + +## Batching Mutations + +> If a tree falls in the woods, does it make a sound? +> +> If a pure function mutates some local data in order to produce an immutable +> return value, is that ok? +> +> — Rich Hickey, Clojure + +Applying a mutation to create a new immutable object results in some overhead, +which can add up to a minor performance penalty. If you need to apply a series +of mutations locally before returning, Immutable.js gives you the ability to +create a temporary mutable (transient) copy of a collection and apply a batch of +mutations in a performant manner by using `withMutations`. In fact, this is +exactly how Immutable.js applies complex mutations itself. + +As an example, building `list2` results in the creation of 1, not 3, new +immutable Lists. + + + +```js +const { List } = require('immutable'); +const list1 = List([1, 2, 3]); +const list2 = list1.withMutations(function (list) { + list.push(4).push(5).push(6); +}); +assert.equal(list1.size, 3); +assert.equal(list2.size, 6); +``` + +Note: Immutable.js also provides `asMutable` and `asImmutable`, but only +encourages their use when `withMutations` will not suffice. Use caution to not +return a mutable copy, which could result in undesired behavior. + +_Important!_: Only a select few methods can be used in `withMutations` including +`set`, `push` and `pop`. These methods can be applied directly against a +persistent data-structure where other methods like `map`, `filter`, `sort`, +and `splice` will always return new immutable data-structures and never mutate +a mutable collection. + +## Lazy Seq + +`Seq` describes a lazy operation, allowing them to efficiently chain +use of all the higher-order collection methods (such as `map` and `filter`) +by not creating intermediate collections. + +**Seq is immutable** — Once a Seq is created, it cannot be +changed, appended to, rearranged or otherwise modified. Instead, any mutative +method called on a `Seq` will return a new `Seq`. + +**Seq is lazy** — `Seq` does as little work as necessary to respond to any +method call. Values are often created during iteration, including implicit +iteration when reducing or converting to a concrete data structure such as +a `List` or JavaScript `Array`. + +For example, the following performs no work, because the resulting +`Seq`'s values are never iterated: + +```js +const { Seq } = require('immutable'); +const oddSquares = Seq([1, 2, 3, 4, 5, 6, 7, 8]) + .filter(x => x % 2 !== 0) + .map(x => x * x); +``` + +Once the `Seq` is used, it performs only the work necessary. In this +example, no intermediate arrays are ever created, filter is called three +times, and map is only called once: + +```js +oddSquares.get(1); // 9 +``` + +Any collection can be converted to a lazy Seq with `Seq()`. + + + +```js +const { Map, Seq } = require('immutable'); +const map = Map({ a: 1, b: 2, c: 3 }); +const lazySeq = Seq(map); +``` + +`Seq` allows for the efficient chaining of operations, allowing for the +expression of logic that can otherwise be very tedious: + +```js +lazySeq + .flip() + .map(key => key.toUpperCase()) + .flip(); +// Seq { A: 1, B: 2, C: 3 } +``` + +As well as expressing logic that would otherwise seem memory or time +limited, for example `Range` is a special kind of Lazy sequence. + + + +```js +const { Range } = require('immutable'); +Range(1, Infinity) + .skip(1000) + .map(n => -n) + .filter(n => n % 2 === 0) + .take(2) + .reduce((r, n) => r * n, 1); +// 1006008 +``` + +## Comparison of filter(), groupBy(), and partition() + +The `filter()`, `groupBy()`, and `partition()` methods are similar in that they +all divide a collection into parts based on applying a function to each element. +All three call the predicate or grouping function once for each item in the +input collection. All three return zero or more collections of the same type as +their input. The returned collections are always distinct from the input +(according to `===`), even if the contents are identical. + +Of these methods, `filter()` is the only one that is lazy and the only one which +discards items from the input collection. It is the simplest to use, and the +fact that it returns exactly one collection makes it easy to combine with other +methods to form a pipeline of operations. + +The `partition()` method is similar to an eager version of `filter()`, but it +returns two collections; the first contains the items that would have been +discarded by `filter()`, and the second contains the items that would have been +kept. It always returns an array of exactly two collections, which can make it +easier to use than `groupBy()`. Compared to making two separate calls to +`filter()`, `partition()` makes half as many calls it the predicate passed to +it. + +The `groupBy()` method is a more generalized version of `partition()` that can +group by an arbitrary function rather than just a predicate. It returns a map +with zero or more entries, where the keys are the values returned by the +grouping function, and the values are nonempty collections of the corresponding +arguments. Although `groupBy()` is more powerful than `partition()`, it can be +harder to use because it is not always possible predict in advance how many +entries the returned map will have and what their keys will be. + +| Summary | `filter` | `partition` | `groupBy` | +|:------------------------------|:---------|:------------|:---------------| +| ease of use | easiest | moderate | hardest | +| generality | least | moderate | most | +| laziness | lazy | eager | eager | +| # of returned sub-collections | 1 | 2 | 0 or more | +| sub-collections may be empty | yes | yes | no | +| can discard items | yes | no | no | +| wrapping container | none | array | Map/OrderedMap | + +## Additional Tools and Resources + +- [Atom-store](https://github.com/jameshopkins/atom-store/) + - A Clojure-inspired atom implementation in Javascript with configurability + for external persistance. + +- [Chai Immutable](https://github.com/astorije/chai-immutable) + - If you are using the [Chai Assertion Library](https://chaijs.com/), this + provides a set of assertions to use against Immutable.js collections. + +- [Fantasy-land](https://github.com/fantasyland/fantasy-land) + - Specification for interoperability of common algebraic structures in JavaScript. + +- [Immutagen](https://github.com/pelotom/immutagen) + - A library for simulating immutable generators in JavaScript. + +- [Immutable-cursor](https://github.com/redbadger/immutable-cursor) + - Immutable cursors incorporating the Immutable.js interface over + Clojure-inspired atom. + +- [Immutable-ext](https://github.com/DrBoolean/immutable-ext) + - Fantasyland extensions for immutablejs + +- [Immutable-js-tools](https://github.com/madeinfree/immutable-js-tools) + - Util tools for immutable.js + +- [Immutable-Redux](https://github.com/gajus/redux-immutable) + - redux-immutable is used to create an equivalent function of Redux + combineReducers that works with Immutable.js state. + +- [Immutable-Treeutils](https://github.com/lukasbuenger/immutable-treeutils) + - Functional tree traversal helpers for ImmutableJS data structures. + +- [Irecord](https://github.com/ericelliott/irecord) + - An immutable store that exposes an RxJS observable. Great for React. + +- [Mudash](https://github.com/brianneisler/mudash) + - Lodash wrapper providing Immutable.JS support. + +- [React-Immutable-PropTypes](https://github.com/HurricaneJames/react-immutable-proptypes) + - PropType validators that work with Immutable.js. + +- [Redux-Immutablejs](https://github.com/indexiatech/redux-immutablejs) + - Redux Immutable facilities. + +- [Rxstate](https://github.com/yamalight/rxstate) + - Simple opinionated state management library based on RxJS and Immutable.js. + +- [Transit-Immutable-js](https://github.com/glenjamin/transit-immutable-js) + - Transit serialisation for Immutable.js. + - See also: [Transit-js](https://github.com/cognitect/transit-js) + +Have an additional tool designed to work with Immutable.js? +Submit a PR to add it to this list in alphabetical order. + +## Contributing + +Use [Github issues](https://github.com/immutable-js/immutable-js/issues) for requests. + +We actively welcome pull requests, learn how to [contribute](https://github.com/immutable-js/immutable-js/blob/main/.github/CONTRIBUTING.md). + +Immutable.js is maintained within the [Contributor Covenant's Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). + +### Changelog + +Changes are tracked as [Github releases](https://github.com/immutable-js/immutable-js/releases). + +### License + +Immutable.js is [MIT-licensed](./LICENSE). + +### Thanks + +[Phil Bagwell](https://www.youtube.com/watch?v=K2NYwP90bNs), for his inspiration +and research in persistent data structures. + +[Hugh Jackson](https://github.com/hughfdjackson/), for providing the npm package +name. If you're looking for his unsupported package, see [this repository](https://github.com/hughfdjackson/immutable). diff --git a/node_modules/immutable/dist/immutable.d.ts b/node_modules/immutable/dist/immutable.d.ts new file mode 100644 index 0000000..dc2b245 --- /dev/null +++ b/node_modules/immutable/dist/immutable.d.ts @@ -0,0 +1,5912 @@ +/** + * Immutable data encourages pure functions (data-in, data-out) and lends itself + * to much simpler application development and enabling techniques from + * functional programming such as lazy evaluation. + * + * While designed to bring these powerful functional concepts to JavaScript, it + * presents an Object-Oriented API familiar to Javascript engineers and closely + * mirroring that of Array, Map, and Set. It is easy and efficient to convert to + * and from plain Javascript types. + * + * ## How to read these docs + * + * In order to better explain what kinds of values the Immutable.js API expects + * and produces, this documentation is presented in a statically typed dialect of + * JavaScript (like [Flow][] or [TypeScript][]). You *don't need* to use these + * type checking tools in order to use Immutable.js, however becoming familiar + * with their syntax will help you get a deeper understanding of this API. + * + * **A few examples and how to read them.** + * + * All methods describe the kinds of data they accept and the kinds of data + * they return. For example a function which accepts two numbers and returns + * a number would look like this: + * + * ```js + * sum(first: number, second: number): number + * ``` + * + * Sometimes, methods can accept different kinds of data or return different + * kinds of data, and this is described with a *type variable*, which is + * typically in all-caps. For example, a function which always returns the same + * kind of data it was provided would look like this: + * + * ```js + * identity(value: T): T + * ``` + * + * Type variables are defined with classes and referred to in methods. For + * example, a class that holds onto a value for you might look like this: + * + * ```js + * class Box { + * constructor(value: T) + * getValue(): T + * } + * ``` + * + * In order to manipulate Immutable data, methods that we're used to affecting + * a Collection instead return a new Collection of the same type. The type + * `this` refers to the same kind of class. For example, a List which returns + * new Lists when you `push` a value onto it might look like: + * + * ```js + * class List { + * push(value: T): this + * } + * ``` + * + * Many methods in Immutable.js accept values which implement the JavaScript + * [Iterable][] protocol, and might appear like `Iterable` for something + * which represents sequence of strings. Typically in JavaScript we use plain + * Arrays (`[]`) when an Iterable is expected, but also all of the Immutable.js + * collections are iterable themselves! + * + * For example, to get a value deep within a structure of data, we might use + * `getIn` which expects an `Iterable` path: + * + * ``` + * getIn(path: Iterable): unknown + * ``` + * + * To use this method, we could pass an array: `data.getIn([ "key", 2 ])`. + * + * + * Note: All examples are presented in the modern [ES2015][] version of + * JavaScript. Use tools like Babel to support older browsers. + * + * For example: + * + * ```js + * // ES2015 + * const mappedFoo = foo.map(x => x * x); + * // ES5 + * var mappedFoo = foo.map(function (x) { return x * x; }); + * ``` + * + * [ES2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla + * [TypeScript]: https://www.typescriptlang.org/ + * [Flow]: https://flowtype.org/ + * [Iterable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols + */ + +declare namespace Immutable { + /** @ignore */ + type OnlyObject = Extract; + + /** @ignore */ + type ContainObject = OnlyObject extends object + ? OnlyObject extends never + ? false + : true + : false; + + /** + * @ignore + * + * Used to convert deeply all immutable types to a plain TS type. + * Using `unknown` on object instead of recursive call as we have a circular reference issue + */ + export type DeepCopy = T extends Record + ? // convert Record to DeepCopy plain JS object + { + [key in keyof R]: ContainObject extends true ? unknown : R[key]; + } + : T extends Collection.Keyed + ? // convert KeyedCollection to DeepCopy plain JS object + { + [key in KeyedKey extends string | number | symbol + ? KeyedKey + : string]: V extends object ? unknown : V; + } + : // convert IndexedCollection or Immutable.Set to DeepCopy plain JS array + T extends Collection + ? Array> + : T extends string | number // Iterable scalar types : should be kept as is + ? T + : T extends Iterable // Iterable are converted to plain JS array + ? Array> + : T extends object // plain JS object are converted deeply + ? { + [ObjectKey in keyof T]: ContainObject extends true + ? unknown + : T[ObjectKey]; + } + : // other case : should be kept as is + T; + + /** + * Describes which item in a pair should be placed first when sorting + * + * @ignore + */ + export enum PairSorting { + LeftThenRight = -1, + RightThenLeft = +1, + } + + /** + * Function comparing two items of the same type. It can return: + * + * * a PairSorting value, to indicate whether the left-hand item or the right-hand item should be placed before the other + * + * * the traditional numeric return value - especially -1, 0, or 1 + * + * @ignore + */ + export type Comparator = (left: T, right: T) => PairSorting | number; + + /** + * Lists are ordered indexed dense collections, much like a JavaScript + * Array. + * + * Lists are immutable and fully persistent with O(log32 N) gets and sets, + * and O(1) push and pop. + * + * Lists implement Deque, with efficient addition and removal from both the + * end (`push`, `pop`) and beginning (`unshift`, `shift`). + * + * Unlike a JavaScript Array, there is no distinction between an + * "unset" index and an index set to `undefined`. `List#forEach` visits all + * indices from 0 to size, regardless of whether they were explicitly defined. + */ + namespace List { + /** + * True if the provided value is a List + * + * + * ```js + * const { List } = require('immutable'); + * List.isList([]); // false + * List.isList(List()); // true + * ``` + */ + function isList(maybeList: unknown): maybeList is List; + + /** + * Creates a new List containing `values`. + * + * + * ```js + * const { List } = require('immutable'); + * List.of(1, 2, 3, 4) + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Note: Values are not altered or converted in any way. + * + * + * ```js + * const { List } = require('immutable'); + * List.of({x:1}, 2, [3], 4) + * // List [ { x: 1 }, 2, [ 3 ], 4 ] + * ``` + */ + function of(...values: Array): List; + } + + /** + * Create a new immutable List containing the values of the provided + * collection-like. + * + * Note: `List` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * + * ```js + * const { List, Set } = require('immutable') + * + * const emptyList = List() + * // List [] + * + * const plainArray = [ 1, 2, 3, 4 ] + * const listFromPlainArray = List(plainArray) + * // List [ 1, 2, 3, 4 ] + * + * const plainSet = Set([ 1, 2, 3, 4 ]) + * const listFromPlainSet = List(plainSet) + * // List [ 1, 2, 3, 4 ] + * + * const arrayIterator = plainArray[Symbol.iterator]() + * const listFromCollectionArray = List(arrayIterator) + * // List [ 1, 2, 3, 4 ] + * + * listFromPlainArray.equals(listFromCollectionArray) // true + * listFromPlainSet.equals(listFromCollectionArray) // true + * listFromPlainSet.equals(listFromPlainArray) // true + * ``` + */ + function List(collection?: Iterable | ArrayLike): List; + + interface List extends Collection.Indexed { + /** + * The number of items in this List. + */ + readonly size: number; + + // Persistent changes + + /** + * Returns a new List which includes `value` at `index`. If `index` already + * exists in this List, it will be replaced. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.set(-1, "value")` sets the last item in the List. + * + * If `index` larger than `size`, the returned List's `size` will be large + * enough to include the `index`. + * + * + * ```js + * const originalList = List([ 0 ]); + * // List [ 0 ] + * originalList.set(1, 1); + * // List [ 0, 1 ] + * originalList.set(0, 'overwritten'); + * // List [ "overwritten" ] + * originalList.set(2, 2); + * // List [ 0, undefined, 2 ] + * + * List().set(50000, 'value').size; + * // 50001 + * ``` + * + * Note: `set` can be used in `withMutations`. + */ + set(index: number, value: T): List; + + /** + * Returns a new List which excludes this `index` and with a size 1 less + * than this List. Values at indices above `index` are shifted down by 1 to + * fill the position. + * + * This is synonymous with `list.splice(index, 1)`. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.delete(-1)` deletes the last item in the List. + * + * Note: `delete` cannot be safely used in IE8 + * + * + * ```js + * List([ 0, 1, 2, 3, 4 ]).delete(0); + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Since `delete()` re-indexes values, it produces a complete copy, which + * has `O(N)` complexity. + * + * Note: `delete` *cannot* be used in `withMutations`. + * + * @alias remove + */ + delete(index: number): List; + remove(index: number): List; + + /** + * Returns a new List with `value` at `index` with a size 1 more than this + * List. Values at indices above `index` are shifted over by 1. + * + * This is synonymous with `list.splice(index, 0, value)`. + * + * + * ```js + * List([ 0, 1, 2, 3, 4 ]).insert(6, 5) + * // List [ 0, 1, 2, 3, 4, 5 ] + * ``` + * + * Since `insert()` re-indexes values, it produces a complete copy, which + * has `O(N)` complexity. + * + * Note: `insert` *cannot* be used in `withMutations`. + */ + insert(index: number, value: T): List; + + /** + * Returns a new List with 0 size and no values in constant time. + * + * + * ```js + * List([ 1, 2, 3, 4 ]).clear() + * // List [] + * ``` + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): List; + + /** + * Returns a new List with the provided `values` appended, starting at this + * List's `size`. + * + * + * ```js + * List([ 1, 2, 3, 4 ]).push(5) + * // List [ 1, 2, 3, 4, 5 ] + * ``` + * + * Note: `push` can be used in `withMutations`. + */ + push(...values: Array): List; + + /** + * Returns a new List with a size ones less than this List, excluding + * the last index in this List. + * + * Note: this differs from `Array#pop` because it returns a new + * List rather than the removed value. Use `last()` to get the last value + * in this List. + * + * ```js + * List([ 1, 2, 3, 4 ]).pop() + * // List[ 1, 2, 3 ] + * ``` + * + * Note: `pop` can be used in `withMutations`. + */ + pop(): List; + + /** + * Returns a new List with the provided `values` prepended, shifting other + * values ahead to higher indices. + * + * + * ```js + * List([ 2, 3, 4]).unshift(1); + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Note: `unshift` can be used in `withMutations`. + */ + unshift(...values: Array): List; + + /** + * Returns a new List with a size ones less than this List, excluding + * the first index in this List, shifting all other values to a lower index. + * + * Note: this differs from `Array#shift` because it returns a new + * List rather than the removed value. Use `first()` to get the first + * value in this List. + * + * + * ```js + * List([ 0, 1, 2, 3, 4 ]).shift(); + * // List [ 1, 2, 3, 4 ] + * ``` + * + * Note: `shift` can be used in `withMutations`. + */ + shift(): List; + + /** + * Returns a new List with an updated value at `index` with the return + * value of calling `updater` with the existing value, or `notSetValue` if + * `index` was not set. If called with a single argument, `updater` is + * called with the List itself. + * + * `index` may be a negative number, which indexes back from the end of the + * List. `v.update(-1)` updates the last item in the List. + * + * + * ```js + * const list = List([ 'a', 'b', 'c' ]) + * const result = list.update(2, val => val.toUpperCase()) + * // List [ "a", "b", "C" ] + * ``` + * + * This can be very useful as a way to "chain" a normal function into a + * sequence of methods. RxJS calls this "let" and lodash calls it "thru". + * + * For example, to sum a List after mapping and filtering: + * + * + * ```js + * function sum(collection) { + * return collection.reduce((sum, x) => sum + x, 0) + * } + * + * List([ 1, 2, 3 ]) + * .map(x => x + 1) + * .filter(x => x % 2 === 0) + * .update(sum) + * // 6 + * ``` + * + * Note: `update(index)` can be used in `withMutations`. + * + * @see `Map#update` + */ + update(index: number, notSetValue: T, updater: (value: T) => T): this; + update( + index: number, + updater: (value: T | undefined) => T | undefined + ): this; + update(updater: (value: this) => R): R; + + /** + * Returns a new List with size `size`. If `size` is less than this + * List's size, the new List will exclude values at the higher indices. + * If `size` is greater than this List's size, the new List will have + * undefined values for the newly available indices. + * + * When building a new List and the final size is known up front, `setSize` + * used in conjunction with `withMutations` may result in the more + * performant construction. + */ + setSize(size: number): List; + + // Deep persistent changes + + /** + * Returns a new List having set `value` at this `keyPath`. If any keys in + * `keyPath` do not exist, a new immutable Map will be created at that key. + * + * Index numbers are used as keys to determine the path to follow in + * the List. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, List([ 3, 4 ])]) + * list.setIn([3, 0], 999); + * // List [ 0, 1, 2, List [ 999, 4 ] ] + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and setIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, { plain: 'object' }]) + * list.setIn([3, 'plain'], 'value'); + * // List([ 0, 1, 2, { plain: 'value' }]) + * ``` + * + * Note: `setIn` can be used in `withMutations`. + */ + setIn(keyPath: Iterable, value: unknown): this; + + /** + * Returns a new List having removed the value at this `keyPath`. If any + * keys in `keyPath` do not exist, no change will occur. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, List([ 3, 4 ])]) + * list.deleteIn([3, 0]); + * // List [ 0, 1, 2, List [ 4 ] ] + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and removeIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const { List } = require('immutable') + * const list = List([ 0, 1, 2, { plain: 'object' }]) + * list.removeIn([3, 'plain']); + * // List([ 0, 1, 2, {}]) + * ``` + * + * Note: `deleteIn` *cannot* be safely used in `withMutations`. + * + * @alias removeIn + */ + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + + /** + * Note: `updateIn` can be used in `withMutations`. + * + * @see `Map#updateIn` + */ + updateIn( + keyPath: Iterable, + notSetValue: unknown, + updater: (value: unknown) => unknown + ): this; + updateIn( + keyPath: Iterable, + updater: (value: unknown) => unknown + ): this; + + /** + * Note: `mergeIn` can be used in `withMutations`. + * + * @see `Map#mergeIn` + */ + mergeIn(keyPath: Iterable, ...collections: Array): this; + + /** + * Note: `mergeDeepIn` can be used in `withMutations`. + * + * @see `Map#mergeDeepIn` + */ + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this; + + // Transient changes + + /** + * Note: Not all methods can be safely used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * allows being used in `withMutations`. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * An alternative API for withMutations() + * + * Note: Not all methods can be safely used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * allows being used in `withMutations`. + * + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new List with other values or collections concatenated to this one. + * + * Note: `concat` can be used in `withMutations`. + * + * @alias merge + */ + concat(...valuesOrCollections: Array | C>): List; + merge(...collections: Array>): List; + + /** + * Returns a new List with values passed through a + * `mapper` function. + * + * + * ```js + * List([ 1, 2 ]).map(x => 10 * x) + * // List [ 10, 20 ] + * ``` + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): List; + + /** + * Flat-maps the List, returning a new List. + * + * Similar to `list.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): List; + + /** + * Returns a new List with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): List; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new List with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: T, index: number, iter: this) => value is F, + context?: C + ): [List, List]; + partition( + predicate: (this: C, value: T, index: number, iter: this) => unknown, + context?: C + ): [this, this]; + + /** + * Returns a List "zipped" with the provided collection. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): List<[T, U]>; + zip( + other: Collection, + other2: Collection + ): List<[T, U, V]>; + zip(...collections: Array>): List; + + /** + * Returns a List "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * + * ```js + * const a = List([ 1, 2 ]); + * const b = List([ 3, 4, 5 ]); + * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + * + * Note: Since zipAll will return a collection as large as the largest + * input, some results may contain undefined values. TypeScript cannot + * account for these without cases (as of v2.5). + */ + zipAll(other: Collection): List<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): List<[T, U, V]>; + zipAll(...collections: Array>): List; + + /** + * Returns a List "zipped" with the provided collections by using a + * custom `zipper` function. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // List [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): List; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): List; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): List; + } + + /** + * Immutable Map is an unordered Collection.Keyed of (key, value) pairs with + * `O(log32 N)` gets and `O(log32 N)` persistent sets. + * + * Iteration order of a Map is undefined, however is stable. Multiple + * iterations of the same Map will iterate in the same order. + * + * Map's keys can be of any type, and use `Immutable.is` to determine key + * equality. This allows the use of any value (including NaN) as a key. + * + * Because `Immutable.is` returns equality based on value semantics, and + * Immutable collections are treated as values, any Immutable collection may + * be used as a key. + * + * + * ```js + * const { Map, List } = require('immutable'); + * Map().set(List([ 1 ]), 'listofone').get(List([ 1 ])); + * // 'listofone' + * ``` + * + * Any JavaScript object may be used as a key, however strict identity is used + * to evaluate key equality. Two similar looking objects will represent two + * different keys. + * + * Implemented by a hash-array mapped trie. + */ + namespace Map { + /** + * True if the provided value is a Map + * + * + * ```js + * const { Map } = require('immutable') + * Map.isMap({}) // false + * Map.isMap(Map()) // true + * ``` + */ + function isMap(maybeMap: unknown): maybeMap is Map; + + /** + * Creates a new Map from alternating keys and values + * + * + * ```js + * const { Map } = require('immutable') + * Map.of( + * 'key', 'value', + * 'numerical value', 3, + * 0, 'numerical key' + * ) + * // Map { 0: "numerical key", "key": "value", "numerical value": 3 } + * ``` + * + * @deprecated Use Map([ [ 'k', 'v' ] ]) or Map({ k: 'v' }) + */ + function of(...keyValues: Array): Map; + } + + /** + * Creates a new Immutable Map. + * + * Created with the same key value pairs as the provided Collection.Keyed or + * JavaScript Object or expects a Collection of [K, V] tuple entries. + * + * Note: `Map` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ key: "value" }) + * Map([ [ "key", "value" ] ]) + * ``` + * + * Keep in mind, when using JS objects to construct Immutable Maps, that + * JavaScript Object properties are always strings, even if written in a + * quote-less shorthand, while Immutable Maps accept keys of any type. + * + * + * ```js + * let obj = { 1: "one" } + * Object.keys(obj) // [ "1" ] + * assert.equal(obj["1"], obj[1]) // "one" === "one" + * + * let map = Map(obj) + * assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined + * ``` + * + * Property access for JavaScript Objects first converts the key to a string, + * but since Immutable Map keys can be of any type the argument to `get()` is + * not altered. + */ + function Map(collection?: Iterable<[K, V]>): Map; + function Map(obj: { [key: string]: V }): Map; + function Map(obj: { [P in K]?: V }): Map; + + interface Map extends Collection.Keyed { + /** + * The number of entries in this Map. + */ + readonly size: number; + + // Persistent changes + + /** + * Returns a new Map also containing the new key, value pair. If an equivalent + * key already exists in this Map, it will be replaced. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map() + * const newerMap = originalMap.set('key', 'value') + * const newestMap = newerMap.set('key', 'newer value') + * + * originalMap + * // Map {} + * newerMap + * // Map { "key": "value" } + * newestMap + * // Map { "key": "newer value" } + * ``` + * + * Note: `set` can be used in `withMutations`. + */ + set(key: K, value: V): this; + + /** + * Returns a new Map which excludes this `key`. + * + * Note: `delete` cannot be safely used in IE8, but is provided to mirror + * the ES6 collection API. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map({ + * key: 'value', + * otherKey: 'other value' + * }) + * // Map { "key": "value", "otherKey": "other value" } + * originalMap.delete('otherKey') + * // Map { "key": "value" } + * ``` + * + * Note: `delete` can be used in `withMutations`. + * + * @alias remove + */ + delete(key: K): this; + remove(key: K): this; + + /** + * Returns a new Map which excludes the provided `keys`. + * + * + * ```js + * const { Map } = require('immutable') + * const names = Map({ a: "Aaron", b: "Barry", c: "Connor" }) + * names.deleteAll([ 'a', 'c' ]) + * // Map { "b": "Barry" } + * ``` + * + * Note: `deleteAll` can be used in `withMutations`. + * + * @alias removeAll + */ + deleteAll(keys: Iterable): this; + removeAll(keys: Iterable): this; + + /** + * Returns a new Map containing no keys or values. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ key: 'value' }).clear() + * // Map {} + * ``` + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): this; + + /** + * Returns a new Map having updated the value at this `key` with the return + * value of calling `updater` with the existing value. + * + * Similar to: `map.set(key, updater(map.get(key)))`. + * + * + * ```js + * const { Map } = require('immutable') + * const aMap = Map({ key: 'value' }) + * const newMap = aMap.update('key', value => value + value) + * // Map { "key": "valuevalue" } + * ``` + * + * This is most commonly used to call methods on collections within a + * structure of data. For example, in order to `.push()` onto a nested `List`, + * `update` and `push` can be used together: + * + * + * ```js + * const aMap = Map({ nestedList: List([ 1, 2, 3 ]) }) + * const newMap = aMap.update('nestedList', list => list.push(4)) + * // Map { "nestedList": List [ 1, 2, 3, 4 ] } + * ``` + * + * When a `notSetValue` is provided, it is provided to the `updater` + * function when the value at the key does not exist in the Map. + * + * + * ```js + * const aMap = Map({ key: 'value' }) + * const newMap = aMap.update('noKey', 'no value', value => value + value) + * // Map { "key": "value", "noKey": "no valueno value" } + * ``` + * + * However, if the `updater` function returns the same value it was called + * with, then no change will occur. This is still true if `notSetValue` + * is provided. + * + * + * ```js + * const aMap = Map({ apples: 10 }) + * const newMap = aMap.update('oranges', 0, val => val) + * // Map { "apples": 10 } + * assert.strictEqual(newMap, map); + * ``` + * + * For code using ES2015 or later, using `notSetValue` is discourged in + * favor of function parameter default values. This helps to avoid any + * potential confusion with identify functions as described above. + * + * The previous example behaves differently when written with default values: + * + * + * ```js + * const aMap = Map({ apples: 10 }) + * const newMap = aMap.update('oranges', (val = 0) => val) + * // Map { "apples": 10, "oranges": 0 } + * ``` + * + * If no key is provided, then the `updater` function return value is + * returned as well. + * + * + * ```js + * const aMap = Map({ key: 'value' }) + * const result = aMap.update(aMap => aMap.get('key')) + * // "value" + * ``` + * + * This can be very useful as a way to "chain" a normal function into a + * sequence of methods. RxJS calls this "let" and lodash calls it "thru". + * + * For example, to sum the values in a Map + * + * + * ```js + * function sum(collection) { + * return collection.reduce((sum, x) => sum + x, 0) + * } + * + * Map({ x: 1, y: 2, z: 3 }) + * .map(x => x + 1) + * .filter(x => x % 2 === 0) + * .update(sum) + * // 6 + * ``` + * + * Note: `update(key)` can be used in `withMutations`. + */ + update(key: K, notSetValue: V, updater: (value: V) => V): this; + update(key: K, updater: (value: V | undefined) => V | undefined): this; + update(updater: (value: this) => R): R; + + /** + * Returns a new Map resulting from merging the provided Collections + * (or JS objects) into this Map. In other words, this takes each entry of + * each collection and sets it on this Map. + * + * Note: Values provided to `merge` are shallowly converted before being + * merged. No nested values are altered. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: 10, b: 20, c: 30 }) + * const two = Map({ b: 40, a: 50, d: 60 }) + * one.merge(two) // Map { "a": 50, "b": 40, "c": 30, "d": 60 } + * two.merge(one) // Map { "b": 20, "a": 10, "d": 60, "c": 30 } + * ``` + * + * Note: `merge` can be used in `withMutations`. + * + * @alias concat + */ + merge( + ...collections: Array> + ): Map; + merge( + ...collections: Array<{ [key: string]: C }> + ): Map; + concat( + ...collections: Array> + ): Map; + concat( + ...collections: Array<{ [key: string]: C }> + ): Map; + + /** + * Like `merge()`, `mergeWith()` returns a new Map resulting from merging + * the provided Collections (or JS objects) into this Map, but uses the + * `merger` function for dealing with conflicts. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: 10, b: 20, c: 30 }) + * const two = Map({ b: 40, a: 50, d: 60 }) + * one.mergeWith((oldVal, newVal) => oldVal / newVal, two) + * // { "a": 0.2, "b": 0.5, "c": 30, "d": 60 } + * two.mergeWith((oldVal, newVal) => oldVal / newVal, one) + * // { "b": 2, "a": 5, "d": 60, "c": 30 } + * ``` + * + * Note: `mergeWith` can be used in `withMutations`. + */ + mergeWith( + merger: (oldVal: V, newVal: V, key: K) => V, + ...collections: Array | { [key: string]: V }> + ): this; + + /** + * Like `merge()`, but when two compatible collections are encountered with + * the same key, it merges them as well, recursing deeply through the nested + * data. Two collections are considered to be compatible (and thus will be + * merged together) if they both fall into one of three categories: keyed + * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and + * arrays), or set-like (e.g., `Set`s). If they fall into separate + * categories, `mergeDeep` will replace the existing collection with the + * collection being merged in. This behavior can be customized by using + * `mergeDeepWith()`. + * + * Note: Indexed and set-like collections are merged using + * `concat()`/`union()` and therefore do not recurse. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) }) + * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) }) + * one.mergeDeep(two) + * // Map { + * // "a": Map { "x": 2, "y": 10 }, + * // "b": Map { "x": 20, "y": 5 }, + * // "c": Map { "z": 3 } + * // } + * ``` + * + * Note: `mergeDeep` can be used in `withMutations`. + */ + mergeDeep( + ...collections: Array | { [key: string]: V }> + ): this; + + /** + * Like `mergeDeep()`, but when two non-collections or incompatible + * collections are encountered at the same key, it uses the `merger` + * function to determine the resulting value. Collections are considered + * incompatible if they fall into separate categories between keyed, + * indexed, and set-like. + * + * + * ```js + * const { Map } = require('immutable') + * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) }) + * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) }) + * one.mergeDeepWith((oldVal, newVal) => oldVal / newVal, two) + * // Map { + * // "a": Map { "x": 5, "y": 10 }, + * // "b": Map { "x": 20, "y": 10 }, + * // "c": Map { "z": 3 } + * // } + * ``` + * + * Note: `mergeDeepWith` can be used in `withMutations`. + */ + mergeDeepWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + ...collections: Array | { [key: string]: V }> + ): this; + + // Deep persistent changes + + /** + * Returns a new Map having set `value` at this `keyPath`. If any keys in + * `keyPath` do not exist, a new immutable Map will be created at that key. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map({ + * subObject: Map({ + * subKey: 'subvalue', + * subSubObject: Map({ + * subSubKey: 'subSubValue' + * }) + * }) + * }) + * + * const newMap = originalMap.setIn(['subObject', 'subKey'], 'ha ha!') + * // Map { + * // "subObject": Map { + * // "subKey": "ha ha!", + * // "subSubObject": Map { "subSubKey": "subSubValue" } + * // } + * // } + * + * const newerMap = originalMap.setIn( + * ['subObject', 'subSubObject', 'subSubKey'], + * 'ha ha ha!' + * ) + * // Map { + * // "subObject": Map { + * // "subKey": "subvalue", + * // "subSubObject": Map { "subSubKey": "ha ha ha!" } + * // } + * // } + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and setIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const { Map } = require('immutable') + * const originalMap = Map({ + * subObject: { + * subKey: 'subvalue', + * subSubObject: { + * subSubKey: 'subSubValue' + * } + * } + * }) + * + * originalMap.setIn(['subObject', 'subKey'], 'ha ha!') + * // Map { + * // "subObject": { + * // subKey: "ha ha!", + * // subSubObject: { subSubKey: "subSubValue" } + * // } + * // } + * ``` + * + * If any key in the path exists but cannot be updated (such as a primitive + * like number or a custom Object like Date), an error will be thrown. + * + * Note: `setIn` can be used in `withMutations`. + */ + setIn(keyPath: Iterable, value: unknown): this; + + /** + * Returns a new Map having removed the value at this `keyPath`. If any keys + * in `keyPath` do not exist, no change will occur. + * + * Note: `deleteIn` can be used in `withMutations`. + * + * @alias removeIn + */ + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + + /** + * Returns a new Map having applied the `updater` to the entry found at the + * keyPath. + * + * This is most commonly used to call methods on collections nested within a + * structure of data. For example, in order to `.push()` onto a nested `List`, + * `updateIn` and `push` can be used together: + * + * + * ```js + * const { Map, List } = require('immutable') + * const map = Map({ inMap: Map({ inList: List([ 1, 2, 3 ]) }) }) + * const newMap = map.updateIn(['inMap', 'inList'], list => list.push(4)) + * // Map { "inMap": Map { "inList": List [ 1, 2, 3, 4 ] } } + * ``` + * + * If any keys in `keyPath` do not exist, new Immutable `Map`s will + * be created at those keys. If the `keyPath` does not already contain a + * value, the `updater` function will be called with `notSetValue`, if + * provided, otherwise `undefined`. + * + * + * ```js + * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) + * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2) + * // Map { "a": Map { "b": Map { "c": 20 } } } + * ``` + * + * If the `updater` function returns the same value it was called with, then + * no change will occur. This is still true if `notSetValue` is provided. + * + * + * ```js + * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) + * const newMap = map.updateIn(['a', 'b', 'x'], 100, val => val) + * // Map { "a": Map { "b": Map { "c": 10 } } } + * assert.strictEqual(newMap, aMap) + * ``` + * + * For code using ES2015 or later, using `notSetValue` is discourged in + * favor of function parameter default values. This helps to avoid any + * potential confusion with identify functions as described above. + * + * The previous example behaves differently when written with default values: + * + * + * ```js + * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) + * const newMap = map.updateIn(['a', 'b', 'x'], (val = 100) => val) + * // Map { "a": Map { "b": Map { "c": 10, "x": 100 } } } + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and updateIn() can update those values as well, treating them + * immutably by creating new copies of those values with the changes applied. + * + * + * ```js + * const map = Map({ a: { b: { c: 10 } } }) + * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2) + * // Map { "a": { b: { c: 20 } } } + * ``` + * + * If any key in the path exists but cannot be updated (such as a primitive + * like number or a custom Object like Date), an error will be thrown. + * + * Note: `updateIn` can be used in `withMutations`. + */ + updateIn( + keyPath: Iterable, + notSetValue: unknown, + updater: (value: unknown) => unknown + ): this; + updateIn( + keyPath: Iterable, + updater: (value: unknown) => unknown + ): this; + + /** + * A combination of `updateIn` and `merge`, returning a new Map, but + * performing the merge at a point arrived at by following the keyPath. + * In other words, these two lines are equivalent: + * + * ```js + * map.updateIn(['a', 'b', 'c'], abc => abc.merge(y)) + * map.mergeIn(['a', 'b', 'c'], y) + * ``` + * + * Note: `mergeIn` can be used in `withMutations`. + */ + mergeIn(keyPath: Iterable, ...collections: Array): this; + + /** + * A combination of `updateIn` and `mergeDeep`, returning a new Map, but + * performing the deep merge at a point arrived at by following the keyPath. + * In other words, these two lines are equivalent: + * + * ```js + * map.updateIn(['a', 'b', 'c'], abc => abc.mergeDeep(y)) + * map.mergeDeepIn(['a', 'b', 'c'], y) + * ``` + * + * Note: `mergeDeepIn` can be used in `withMutations`. + */ + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this; + + // Transient changes + + /** + * Every time you call one of the above functions, a new immutable Map is + * created. If a pure function calls a number of these to produce a final + * return value, then a penalty on performance and memory has been paid by + * creating all of the intermediate immutable Maps. + * + * If you need to apply a series of mutations to produce a new immutable + * Map, `withMutations()` creates a temporary mutable copy of the Map which + * can apply mutations in a highly performant manner. In fact, this is + * exactly how complex mutations like `merge` are done. + * + * As an example, this results in the creation of 2, not 4, new Maps: + * + * + * ```js + * const { Map } = require('immutable') + * const map1 = Map() + * const map2 = map1.withMutations(map => { + * map.set('a', 1).set('b', 2).set('c', 3) + * }) + * assert.equal(map1.size, 0) + * assert.equal(map2.size, 3) + * ``` + * + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Read the documentation for each method to see if it + * is safe to use in `withMutations`. + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * Another way to avoid creation of intermediate Immutable maps is to create + * a mutable copy of this collection. Mutable copies *always* return `this`, + * and thus shouldn't be used for equality. Your function should never return + * a mutable copy of a collection, only use it internally to create a new + * collection. + * + * If possible, use `withMutations` to work with temporary mutable copies as + * it provides an easier to use API and considers many common optimizations. + * + * Note: if the collection is already mutable, `asMutable` returns itself. + * + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Read the documentation for each method to see if it + * is safe to use in `withMutations`. + * + * @see `Map#asImmutable` + */ + asMutable(): this; + + /** + * Returns true if this is a mutable copy (see `asMutable()`) and mutative + * alterations have been applied. + * + * @see `Map#asMutable` + */ + wasAltered(): boolean; + + /** + * The yin to `asMutable`'s yang. Because it applies to mutable collections, + * this operation is *mutable* and may return itself (though may not + * return itself, i.e. if the result is an empty collection). Once + * performed, the original mutable copy must no longer be mutated since it + * may be the immutable result. + * + * If possible, use `withMutations` to work with temporary mutable copies as + * it provides an easier to use API and considers many common optimizations. + * + * @see `Map#asMutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new Map with values passed through a + * `mapper` function. + * + * Map({ a: 1, b: 2 }).map(x => 10 * x) + * // Map { a: 10, b: 20 } + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Map; + + /** + * @see Collection.Keyed.mapKeys + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): Map; + + /** + * @see Collection.Keyed.mapEntries + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): Map; + + /** + * Flat-maps the Map, returning a new Map. + * + * Similar to `data.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Map; + + /** + * Returns a new Map with only the entries for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Map; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new Map with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: V, key: K, iter: this) => value is F, + context?: C + ): [Map, Map]; + partition( + predicate: (this: C, value: V, key: K, iter: this) => unknown, + context?: C + ): [this, this]; + + /** + * @see Collection.Keyed.flip + */ + flip(): Map; + } + + /** + * A type of Map that has the additional guarantee that the iteration order of + * entries will be the order in which they were set(). + * + * The iteration behavior of OrderedMap is the same as native ES6 Map and + * JavaScript Object. + * + * Note that `OrderedMap` are more expensive than non-ordered `Map` and may + * consume more memory. `OrderedMap#set` is amortized O(log32 N), but not + * stable. + */ + namespace OrderedMap { + /** + * True if the provided value is an OrderedMap. + */ + function isOrderedMap( + maybeOrderedMap: unknown + ): maybeOrderedMap is OrderedMap; + } + + /** + * Creates a new Immutable OrderedMap. + * + * Created with the same key value pairs as the provided Collection.Keyed or + * JavaScript Object or expects a Collection of [K, V] tuple entries. + * + * The iteration order of key-value pairs provided to this constructor will + * be preserved in the OrderedMap. + * + * let newOrderedMap = OrderedMap({key: "value"}) + * let newOrderedMap = OrderedMap([["key", "value"]]) + * + * Note: `OrderedMap` is a factory function and not a class, and does not use + * the `new` keyword during construction. + */ + function OrderedMap(collection?: Iterable<[K, V]>): OrderedMap; + function OrderedMap(obj: { [key: string]: V }): OrderedMap; + + interface OrderedMap extends Map { + /** + * The number of entries in this OrderedMap. + */ + readonly size: number; + + /** + * Returns a new OrderedMap also containing the new key, value pair. If an + * equivalent key already exists in this OrderedMap, it will be replaced + * while maintaining the existing order. + * + * + * ```js + * const { OrderedMap } = require('immutable') + * const originalMap = OrderedMap({a:1, b:1, c:1}) + * const updatedMap = originalMap.set('b', 2) + * + * originalMap + * // OrderedMap {a: 1, b: 1, c: 1} + * updatedMap + * // OrderedMap {a: 1, b: 2, c: 1} + * ``` + * + * Note: `set` can be used in `withMutations`. + */ + set(key: K, value: V): this; + + /** + * Returns a new OrderedMap resulting from merging the provided Collections + * (or JS objects) into this OrderedMap. In other words, this takes each + * entry of each collection and sets it on this OrderedMap. + * + * Note: Values provided to `merge` are shallowly converted before being + * merged. No nested values are altered. + * + * + * ```js + * const { OrderedMap } = require('immutable') + * const one = OrderedMap({ a: 10, b: 20, c: 30 }) + * const two = OrderedMap({ b: 40, a: 50, d: 60 }) + * one.merge(two) // OrderedMap { "a": 50, "b": 40, "c": 30, "d": 60 } + * two.merge(one) // OrderedMap { "b": 20, "a": 10, "d": 60, "c": 30 } + * ``` + * + * Note: `merge` can be used in `withMutations`. + * + * @alias concat + */ + merge( + ...collections: Array> + ): OrderedMap; + merge( + ...collections: Array<{ [key: string]: C }> + ): OrderedMap; + concat( + ...collections: Array> + ): OrderedMap; + concat( + ...collections: Array<{ [key: string]: C }> + ): OrderedMap; + + // Sequence algorithms + + /** + * Returns a new OrderedMap with values passed through a + * `mapper` function. + * + * OrderedMap({ a: 1, b: 2 }).map(x => 10 * x) + * // OrderedMap { "a": 10, "b": 20 } + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): OrderedMap; + + /** + * @see Collection.Keyed.mapKeys + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): OrderedMap; + + /** + * @see Collection.Keyed.mapEntries + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): OrderedMap; + + /** + * Flat-maps the OrderedMap, returning a new OrderedMap. + * + * Similar to `data.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): OrderedMap; + + /** + * Returns a new OrderedMap with only the entries for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): OrderedMap; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new OrderedMap with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: V, key: K, iter: this) => value is F, + context?: C + ): [OrderedMap, OrderedMap]; + partition( + predicate: (this: C, value: V, key: K, iter: this) => unknown, + context?: C + ): [this, this]; + + /** + * @see Collection.Keyed.flip + */ + flip(): OrderedMap; + } + + /** + * A Collection of unique values with `O(log32 N)` adds and has. + * + * When iterating a Set, the entries will be (value, value) pairs. Iteration + * order of a Set is undefined, however is stable. Multiple iterations of the + * same Set will iterate in the same order. + * + * Set values, like Map keys, may be of any type. Equality is determined using + * `Immutable.is`, enabling Sets to uniquely include other Immutable + * collections, custom value types, and NaN. + */ + namespace Set { + /** + * True if the provided value is a Set + */ + function isSet(maybeSet: unknown): maybeSet is Set; + + /** + * Creates a new Set containing `values`. + */ + function of(...values: Array): Set; + + /** + * `Set.fromKeys()` creates a new immutable Set containing the keys from + * this Collection or JavaScript Object. + */ + function fromKeys(iter: Collection.Keyed): Set; + // tslint:disable-next-line unified-signatures + function fromKeys(iter: Collection): Set; + function fromKeys(obj: { [key: string]: unknown }): Set; + + /** + * `Set.intersect()` creates a new immutable Set that is the intersection of + * a collection of other sets. + * + * ```js + * const { Set } = require('immutable') + * const intersected = Set.intersect([ + * Set([ 'a', 'b', 'c' ]) + * Set([ 'c', 'a', 't' ]) + * ]) + * // Set [ "a", "c" ] + * ``` + */ + function intersect(sets: Iterable>): Set; + + /** + * `Set.union()` creates a new immutable Set that is the union of a + * collection of other sets. + * + * ```js + * const { Set } = require('immutable') + * const unioned = Set.union([ + * Set([ 'a', 'b', 'c' ]) + * Set([ 'c', 'a', 't' ]) + * ]) + * // Set [ "a", "b", "c", "t" ] + * ``` + */ + function union(sets: Iterable>): Set; + } + + /** + * Create a new immutable Set containing the values of the provided + * collection-like. + * + * Note: `Set` is a factory function and not a class, and does not use the + * `new` keyword during construction. + */ + function Set(collection?: Iterable | ArrayLike): Set; + + interface Set extends Collection.Set { + /** + * The number of items in this Set. + */ + readonly size: number; + + // Persistent changes + + /** + * Returns a new Set which also includes this value. + * + * Note: `add` can be used in `withMutations`. + */ + add(value: T): this; + + /** + * Returns a new Set which excludes this value. + * + * Note: `delete` can be used in `withMutations`. + * + * Note: `delete` **cannot** be safely used in IE8, use `remove` if + * supporting old browsers. + * + * @alias remove + */ + delete(value: T): this; + remove(value: T): this; + + /** + * Returns a new Set containing no values. + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): this; + + /** + * Returns a Set including any value from `collections` that does not already + * exist in this Set. + * + * Note: `union` can be used in `withMutations`. + * @alias merge + * @alias concat + */ + union(...collections: Array>): Set; + merge(...collections: Array>): Set; + concat(...collections: Array>): Set; + + /** + * Returns a Set which has removed any values not also contained + * within `collections`. + * + * Note: `intersect` can be used in `withMutations`. + */ + intersect(...collections: Array>): this; + + /** + * Returns a Set excluding any values contained within `collections`. + * + * + * ```js + * const { OrderedSet } = require('immutable') + * OrderedSet([ 1, 2, 3 ]).subtract([1, 3]) + * // OrderedSet [2] + * ``` + * + * Note: `subtract` can be used in `withMutations`. + */ + subtract(...collections: Array>): this; + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new Set with values passed through a + * `mapper` function. + * + * Set([1,2]).map(x => 10 * x) + * // Set [10,20] + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): Set; + + /** + * Flat-maps the Set, returning a new Set. + * + * Similar to `set.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): Set; + + /** + * Returns a new Set with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): Set; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new Set with the values for which the `predicate` function + * returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: T, key: T, iter: this) => value is F, + context?: C + ): [Set, Set]; + partition( + predicate: (this: C, value: T, key: T, iter: this) => unknown, + context?: C + ): [this, this]; + } + + /** + * A type of Set that has the additional guarantee that the iteration order of + * values will be the order in which they were `add`ed. + * + * The iteration behavior of OrderedSet is the same as native ES6 Set. + * + * Note that `OrderedSet` are more expensive than non-ordered `Set` and may + * consume more memory. `OrderedSet#add` is amortized O(log32 N), but not + * stable. + */ + namespace OrderedSet { + /** + * True if the provided value is an OrderedSet. + */ + function isOrderedSet( + maybeOrderedSet: unknown + ): maybeOrderedSet is OrderedSet; + + /** + * Creates a new OrderedSet containing `values`. + */ + function of(...values: Array): OrderedSet; + + /** + * `OrderedSet.fromKeys()` creates a new immutable OrderedSet containing + * the keys from this Collection or JavaScript Object. + */ + function fromKeys(iter: Collection.Keyed): OrderedSet; + // tslint:disable-next-line unified-signatures + function fromKeys(iter: Collection): OrderedSet; + function fromKeys(obj: { [key: string]: unknown }): OrderedSet; + } + + /** + * Create a new immutable OrderedSet containing the values of the provided + * collection-like. + * + * Note: `OrderedSet` is a factory function and not a class, and does not use + * the `new` keyword during construction. + */ + function OrderedSet( + collection?: Iterable | ArrayLike + ): OrderedSet; + + interface OrderedSet extends Set { + /** + * The number of items in this OrderedSet. + */ + readonly size: number; + + /** + * Returns an OrderedSet including any value from `collections` that does + * not already exist in this OrderedSet. + * + * Note: `union` can be used in `withMutations`. + * @alias merge + * @alias concat + */ + union(...collections: Array>): OrderedSet; + merge(...collections: Array>): OrderedSet; + concat(...collections: Array>): OrderedSet; + + // Sequence algorithms + + /** + * Returns a new Set with values passed through a + * `mapper` function. + * + * OrderedSet([ 1, 2 ]).map(x => 10 * x) + * // OrderedSet [10, 20] + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): OrderedSet; + + /** + * Flat-maps the OrderedSet, returning a new OrderedSet. + * + * Similar to `set.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): OrderedSet; + + /** + * Returns a new OrderedSet with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): OrderedSet; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new OrderedSet with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: T, key: T, iter: this) => value is F, + context?: C + ): [OrderedSet, OrderedSet]; + partition( + predicate: (this: C, value: T, key: T, iter: this) => unknown, + context?: C + ): [this, this]; + + /** + * Returns an OrderedSet of the same type "zipped" with the provided + * collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * ```js + * const a = OrderedSet([ 1, 2, 3 ]) + * const b = OrderedSet([ 4, 5, 6 ]) + * const c = a.zip(b) + * // OrderedSet [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): OrderedSet<[T, U]>; + zip( + other1: Collection, + other2: Collection + ): OrderedSet<[T, U, V]>; + zip( + ...collections: Array> + ): OrderedSet; + + /** + * Returns a OrderedSet of the same type "zipped" with the provided + * collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = OrderedSet([ 1, 2 ]); + * const b = OrderedSet([ 3, 4, 5 ]); + * const c = a.zipAll(b); // OrderedSet [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + * + * Note: Since zipAll will return a collection as large as the largest + * input, some results may contain undefined values. TypeScript cannot + * account for these without cases (as of v2.5). + */ + zipAll(other: Collection): OrderedSet<[T, U]>; + zipAll( + other1: Collection, + other2: Collection + ): OrderedSet<[T, U, V]>; + zipAll( + ...collections: Array> + ): OrderedSet; + + /** + * Returns an OrderedSet of the same type "zipped" with the provided + * collections by using a custom `zipper` function. + * + * @see Seq.Indexed.zipWith + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): OrderedSet; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): OrderedSet; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): OrderedSet; + } + + /** + * Stacks are indexed collections which support very efficient O(1) addition + * and removal from the front using `unshift(v)` and `shift()`. + * + * For familiarity, Stack also provides `push(v)`, `pop()`, and `peek()`, but + * be aware that they also operate on the front of the list, unlike List or + * a JavaScript Array. + * + * Note: `reverse()` or any inherent reverse traversal (`reduceRight`, + * `lastIndexOf`, etc.) is not efficient with a Stack. + * + * Stack is implemented with a Single-Linked List. + */ + namespace Stack { + /** + * True if the provided value is a Stack + */ + function isStack(maybeStack: unknown): maybeStack is Stack; + + /** + * Creates a new Stack containing `values`. + */ + function of(...values: Array): Stack; + } + + /** + * Create a new immutable Stack containing the values of the provided + * collection-like. + * + * The iteration order of the provided collection is preserved in the + * resulting `Stack`. + * + * Note: `Stack` is a factory function and not a class, and does not use the + * `new` keyword during construction. + */ + function Stack(collection?: Iterable | ArrayLike): Stack; + + interface Stack extends Collection.Indexed { + /** + * The number of items in this Stack. + */ + readonly size: number; + + // Reading values + + /** + * Alias for `Stack.first()`. + */ + peek(): T | undefined; + + // Persistent changes + + /** + * Returns a new Stack with 0 size and no values. + * + * Note: `clear` can be used in `withMutations`. + */ + clear(): Stack; + + /** + * Returns a new Stack with the provided `values` prepended, shifting other + * values ahead to higher indices. + * + * This is very efficient for Stack. + * + * Note: `unshift` can be used in `withMutations`. + */ + unshift(...values: Array): Stack; + + /** + * Like `Stack#unshift`, but accepts a collection rather than varargs. + * + * Note: `unshiftAll` can be used in `withMutations`. + */ + unshiftAll(iter: Iterable): Stack; + + /** + * Returns a new Stack with a size ones less than this Stack, excluding + * the first item in this Stack, shifting all other values to a lower index. + * + * Note: this differs from `Array#shift` because it returns a new + * Stack rather than the removed value. Use `first()` or `peek()` to get the + * first value in this Stack. + * + * Note: `shift` can be used in `withMutations`. + */ + shift(): Stack; + + /** + * Alias for `Stack#unshift` and is not equivalent to `List#push`. + */ + push(...values: Array): Stack; + + /** + * Alias for `Stack#unshiftAll`. + */ + pushAll(iter: Iterable): Stack; + + /** + * Alias for `Stack#shift` and is not equivalent to `List#pop`. + */ + pop(): Stack; + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Check the documentation for each method to see if it + * mentions being safe to use in `withMutations`. + * + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + /** + * Returns a new Stack with other collections concatenated to this one. + */ + concat(...valuesOrCollections: Array | C>): Stack; + + /** + * Returns a new Stack with values passed through a + * `mapper` function. + * + * Stack([ 1, 2 ]).map(x => 10 * x) + * // Stack [ 10, 20 ] + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): Stack; + + /** + * Flat-maps the Stack, returning a new Stack. + * + * Similar to `stack.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): Stack; + + /** + * Returns a new Set with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): Set; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a Stack "zipped" with the provided collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * ```js + * const a = Stack([ 1, 2, 3 ]); + * const b = Stack([ 4, 5, 6 ]); + * const c = a.zip(b); // Stack [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): Stack<[T, U]>; + zip( + other: Collection, + other2: Collection + ): Stack<[T, U, V]>; + zip(...collections: Array>): Stack; + + /** + * Returns a Stack "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = Stack([ 1, 2 ]); + * const b = Stack([ 3, 4, 5 ]); + * const c = a.zipAll(b); // Stack [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + * + * Note: Since zipAll will return a collection as large as the largest + * input, some results may contain undefined values. TypeScript cannot + * account for these without cases (as of v2.5). + */ + zipAll(other: Collection): Stack<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): Stack<[T, U, V]>; + zipAll(...collections: Array>): Stack; + + /** + * Returns a Stack "zipped" with the provided collections by using a + * custom `zipper` function. + * + * ```js + * const a = Stack([ 1, 2, 3 ]); + * const b = Stack([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // Stack [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): Stack; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): Stack; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): Stack; + } + + /** + * Returns a Seq.Indexed of numbers from `start` (inclusive) to `end` + * (exclusive), by `step`, where `start` defaults to 0, `step` to 1, and `end` to + * infinity. When `start` is equal to `end`, returns empty range. + * + * Note: `Range` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * ```js + * const { Range } = require('immutable') + * Range() // [ 0, 1, 2, 3, ... ] + * Range(10) // [ 10, 11, 12, 13, ... ] + * Range(10, 15) // [ 10, 11, 12, 13, 14 ] + * Range(10, 30, 5) // [ 10, 15, 20, 25 ] + * Range(30, 10, 5) // [ 30, 25, 20, 15 ] + * Range(30, 30, 5) // [] + * ``` + */ + function Range( + start?: number, + end?: number, + step?: number + ): Seq.Indexed; + + /** + * Returns a Seq.Indexed of `value` repeated `times` times. When `times` is + * not defined, returns an infinite `Seq` of `value`. + * + * Note: `Repeat` is a factory function and not a class, and does not use the + * `new` keyword during construction. + * + * ```js + * const { Repeat } = require('immutable') + * Repeat('foo') // [ 'foo', 'foo', 'foo', ... ] + * Repeat('bar', 4) // [ 'bar', 'bar', 'bar', 'bar' ] + * ``` + */ + function Repeat(value: T, times?: number): Seq.Indexed; + + /** + * A record is similar to a JS object, but enforces a specific set of allowed + * string keys, and has default values. + * + * The `Record()` function produces new Record Factories, which when called + * create Record instances. + * + * ```js + * const { Record } = require('immutable') + * const ABRecord = Record({ a: 1, b: 2 }) + * const myRecord = ABRecord({ b: 3 }) + * ``` + * + * Records always have a value for the keys they define. `remove`ing a key + * from a record simply resets it to the default value for that key. + * + * ```js + * myRecord.get('a') // 1 + * myRecord.get('b') // 3 + * const myRecordWithoutB = myRecord.remove('b') + * myRecordWithoutB.get('b') // 2 + * ``` + * + * Values provided to the constructor not found in the Record type will + * be ignored. For example, in this case, ABRecord is provided a key "x" even + * though only "a" and "b" have been defined. The value for "x" will be + * ignored for this record. + * + * ```js + * const myRecord = ABRecord({ b: 3, x: 10 }) + * myRecord.get('x') // undefined + * ``` + * + * Because Records have a known set of string keys, property get access works + * as expected, however property sets will throw an Error. + * + * Note: IE8 does not support property access. Only use `get()` when + * supporting IE8. + * + * ```js + * myRecord.b // 3 + * myRecord.b = 5 // throws Error + * ``` + * + * Record Types can be extended as well, allowing for custom methods on your + * Record. This is not a common pattern in functional environments, but is in + * many JS programs. + * + * However Record Types are more restricted than typical JavaScript classes. + * They do not use a class constructor, which also means they cannot use + * class properties (since those are technically part of a constructor). + * + * While Record Types can be syntactically created with the JavaScript `class` + * form, the resulting Record function is actually a factory function, not a + * class constructor. Even though Record Types are not classes, JavaScript + * currently requires the use of `new` when creating new Record instances if + * they are defined as a `class`. + * + * ``` + * class ABRecord extends Record({ a: 1, b: 2 }) { + * getAB() { + * return this.a + this.b; + * } + * } + * + * var myRecord = new ABRecord({b: 3}) + * myRecord.getAB() // 4 + * ``` + * + * + * **Flow Typing Records:** + * + * Immutable.js exports two Flow types designed to make it easier to use + * Records with flow typed code, `RecordOf` and `RecordFactory`. + * + * When defining a new kind of Record factory function, use a flow type that + * describes the values the record contains along with `RecordFactory`. + * To type instances of the Record (which the factory function returns), + * use `RecordOf`. + * + * Typically, new Record definitions will export both the Record factory + * function as well as the Record instance type for use in other code. + * + * ```js + * import type { RecordFactory, RecordOf } from 'immutable'; + * + * // Use RecordFactory for defining new Record factory functions. + * type Point3DProps = { x: number, y: number, z: number }; + * const defaultValues: Point3DProps = { x: 0, y: 0, z: 0 }; + * const makePoint3D: RecordFactory = Record(defaultValues); + * export makePoint3D; + * + * // Use RecordOf for defining new instances of that Record. + * export type Point3D = RecordOf; + * const some3DPoint: Point3D = makePoint3D({ x: 10, y: 20, z: 30 }); + * ``` + * + * **Flow Typing Record Subclasses:** + * + * Records can be subclassed as a means to add additional methods to Record + * instances. This is generally discouraged in favor of a more functional API, + * since Subclasses have some minor overhead. However the ability to create + * a rich API on Record types can be quite valuable. + * + * When using Flow to type Subclasses, do not use `RecordFactory`, + * instead apply the props type when subclassing: + * + * ```js + * type PersonProps = {name: string, age: number}; + * const defaultValues: PersonProps = {name: 'Aristotle', age: 2400}; + * const PersonRecord = Record(defaultValues); + * class Person extends PersonRecord { + * getName(): string { + * return this.get('name') + * } + * + * setName(name: string): this { + * return this.set('name', name); + * } + * } + * ``` + * + * **Choosing Records vs plain JavaScript objects** + * + * Records offer a persistently immutable alternative to plain JavaScript + * objects, however they're not required to be used within Immutable.js + * collections. In fact, the deep-access and deep-updating functions + * like `getIn()` and `setIn()` work with plain JavaScript Objects as well. + * + * Deciding to use Records or Objects in your application should be informed + * by the tradeoffs and relative benefits of each: + * + * - *Runtime immutability*: plain JS objects may be carefully treated as + * immutable, however Record instances will *throw* if attempted to be + * mutated directly. Records provide this additional guarantee, however at + * some marginal runtime cost. While JS objects are mutable by nature, the + * use of type-checking tools like [Flow](https://medium.com/@gcanti/immutability-with-flow-faa050a1aef4) + * can help gain confidence in code written to favor immutability. + * + * - *Value equality*: Records use value equality when compared with `is()` + * or `record.equals()`. That is, two Records with the same keys and values + * are equal. Plain objects use *reference equality*. Two objects with the + * same keys and values are not equal since they are different objects. + * This is important to consider when using objects as keys in a `Map` or + * values in a `Set`, which use equality when retrieving values. + * + * - *API methods*: Records have a full featured API, with methods like + * `.getIn()`, and `.equals()`. These can make working with these values + * easier, but comes at the cost of not allowing keys with those names. + * + * - *Default values*: Records provide default values for every key, which + * can be useful when constructing Records with often unchanging values. + * However default values can make using Flow and TypeScript more laborious. + * + * - *Serialization*: Records use a custom internal representation to + * efficiently store and update their values. Converting to and from this + * form isn't free. If converting Records to plain objects is common, + * consider sticking with plain objects to begin with. + */ + namespace Record { + /** + * True if `maybeRecord` is an instance of a Record. + */ + function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>; + + /** + * Records allow passing a second parameter to supply a descriptive name + * that appears when converting a Record to a string or in any error + * messages. A descriptive name for any record can be accessed by using this + * method. If one was not provided, the string "Record" is returned. + * + * ```js + * const { Record } = require('immutable') + * const Person = Record({ + * name: null + * }, 'Person') + * + * var me = Person({ name: 'My Name' }) + * me.toString() // "Person { "name": "My Name" }" + * Record.getDescriptiveName(me) // "Person" + * ``` + */ + function getDescriptiveName(record: Record): string; + + /** + * A Record.Factory is created by the `Record()` function. Record instances + * are created by passing it some of the accepted values for that Record + * type: + * + * + * ```js + * // makePerson is a Record Factory function + * const makePerson = Record({ name: null, favoriteColor: 'unknown' }); + * + * // alan is a Record instance + * const alan = makePerson({ name: 'Alan' }); + * ``` + * + * Note that Record Factories return `Record & Readonly`, + * this allows use of both the Record instance API, and direct property + * access on the resulting instances: + * + * + * ```js + * // Use the Record API + * console.log('Record API: ' + alan.get('name')) + * + * // Or direct property access (Readonly) + * console.log('property access: ' + alan.name) + * ``` + * + * **Flow Typing Records:** + * + * Use the `RecordFactory` Flow type to get high quality type checking of + * Records: + * + * ```js + * import type { RecordFactory, RecordOf } from 'immutable'; + * + * // Use RecordFactory for defining new Record factory functions. + * type PersonProps = { name: ?string, favoriteColor: string }; + * const makePerson: RecordFactory = Record({ name: null, favoriteColor: 'unknown' }); + * + * // Use RecordOf for defining new instances of that Record. + * type Person = RecordOf; + * const alan: Person = makePerson({ name: 'Alan' }); + * ``` + */ + namespace Factory {} + + interface Factory { + (values?: Partial | Iterable<[string, unknown]>): Record & + Readonly; + new ( + values?: Partial | Iterable<[string, unknown]> + ): Record & Readonly; + + /** + * The name provided to `Record(values, name)` can be accessed with + * `displayName`. + */ + displayName: string; + } + + function Factory( + values?: Partial | Iterable<[string, unknown]> + ): Record & Readonly; + } + + /** + * Unlike other types in Immutable.js, the `Record()` function creates a new + * Record Factory, which is a function that creates Record instances. + * + * See above for examples of using `Record()`. + * + * Note: `Record` is a factory function and not a class, and does not use the + * `new` keyword during construction. + */ + function Record( + defaultValues: TProps, + name?: string + ): Record.Factory; + + interface Record { + // Reading values + + has(key: string): key is keyof TProps & string; + + /** + * Returns the value associated with the provided key, which may be the + * default value defined when creating the Record factory function. + * + * If the requested key is not defined by this Record type, then + * notSetValue will be returned if provided. Note that this scenario would + * produce an error when using Flow or TypeScript. + */ + get(key: K, notSetValue?: unknown): TProps[K]; + get(key: string, notSetValue: T): T; + + // Reading deep values + + hasIn(keyPath: Iterable): boolean; + getIn(keyPath: Iterable): unknown; + + // Value equality + + equals(other: unknown): boolean; + hashCode(): number; + + // Persistent changes + + set(key: K, value: TProps[K]): this; + update( + key: K, + updater: (value: TProps[K]) => TProps[K] + ): this; + merge( + ...collections: Array | Iterable<[string, unknown]>> + ): this; + mergeDeep( + ...collections: Array | Iterable<[string, unknown]>> + ): this; + + mergeWith( + merger: (oldVal: unknown, newVal: unknown, key: keyof TProps) => unknown, + ...collections: Array | Iterable<[string, unknown]>> + ): this; + mergeDeepWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + ...collections: Array | Iterable<[string, unknown]>> + ): this; + + /** + * Returns a new instance of this Record type with the value for the + * specific key set to its default value. + * + * @alias remove + */ + delete(key: K): this; + remove(key: K): this; + + /** + * Returns a new instance of this Record type with all values set + * to their default values. + */ + clear(): this; + + // Deep persistent changes + + setIn(keyPath: Iterable, value: unknown): this; + updateIn( + keyPath: Iterable, + updater: (value: unknown) => unknown + ): this; + mergeIn(keyPath: Iterable, ...collections: Array): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this; + + /** + * @alias removeIn + */ + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + + // Conversion to JavaScript types + + /** + * Deeply converts this Record to equivalent native JavaScript Object. + * + * Note: This method may not be overridden. Objects with custom + * serialization to plain JS may override toJSON() instead. + */ + toJS(): DeepCopy; + + /** + * Shallowly converts this Record to equivalent native JavaScript Object. + */ + toJSON(): TProps; + + /** + * Shallowly converts this Record to equivalent JavaScript Object. + */ + toObject(): TProps; + + // Transient changes + + /** + * Note: Not all methods can be used on a mutable collection or within + * `withMutations`! Only `set` may be used mutatively. + * + * @see `Map#withMutations` + */ + withMutations(mutator: (mutable: this) => unknown): this; + + /** + * @see `Map#asMutable` + */ + asMutable(): this; + + /** + * @see `Map#wasAltered` + */ + wasAltered(): boolean; + + /** + * @see `Map#asImmutable` + */ + asImmutable(): this; + + // Sequence algorithms + + toSeq(): Seq.Keyed; + + [Symbol.iterator](): IterableIterator<[keyof TProps, TProps[keyof TProps]]>; + } + + /** + * RecordOf is used in TypeScript to define interfaces expecting an + * instance of record with type T. + * + * This is equivalent to an instance of a record created by a Record Factory. + */ + type RecordOf = Record & Readonly; + + /** + * `Seq` describes a lazy operation, allowing them to efficiently chain + * use of all the higher-order collection methods (such as `map` and `filter`) + * by not creating intermediate collections. + * + * **Seq is immutable** — Once a Seq is created, it cannot be + * changed, appended to, rearranged or otherwise modified. Instead, any + * mutative method called on a `Seq` will return a new `Seq`. + * + * **Seq is lazy** — `Seq` does as little work as necessary to respond to any + * method call. Values are often created during iteration, including implicit + * iteration when reducing or converting to a concrete data structure such as + * a `List` or JavaScript `Array`. + * + * For example, the following performs no work, because the resulting + * `Seq`'s values are never iterated: + * + * ```js + * const { Seq } = require('immutable') + * const oddSquares = Seq([ 1, 2, 3, 4, 5, 6, 7, 8 ]) + * .filter(x => x % 2 !== 0) + * .map(x => x * x) + * ``` + * + * Once the `Seq` is used, it performs only the work necessary. In this + * example, no intermediate arrays are ever created, filter is called three + * times, and map is only called once: + * + * ```js + * oddSquares.get(1); // 9 + * ``` + * + * Any collection can be converted to a lazy Seq with `Seq()`. + * + * + * ```js + * const { Map } = require('immutable') + * const map = Map({ a: 1, b: 2, c: 3 }) + * const lazySeq = Seq(map) + * ``` + * + * `Seq` allows for the efficient chaining of operations, allowing for the + * expression of logic that can otherwise be very tedious: + * + * ```js + * lazySeq + * .flip() + * .map(key => key.toUpperCase()) + * .flip() + * // Seq { A: 1, B: 1, C: 1 } + * ``` + * + * As well as expressing logic that would otherwise seem memory or time + * limited, for example `Range` is a special kind of Lazy sequence. + * + * + * ```js + * const { Range } = require('immutable') + * Range(1, Infinity) + * .skip(1000) + * .map(n => -n) + * .filter(n => n % 2 === 0) + * .take(2) + * .reduce((r, n) => r * n, 1) + * // 1006008 + * ``` + * + * Seq is often used to provide a rich collection API to JavaScript Object. + * + * ```js + * Seq({ x: 0, y: 1, z: 2 }).map(v => v * 2).toObject(); + * // { x: 0, y: 2, z: 4 } + * ``` + */ + + namespace Seq { + /** + * True if `maybeSeq` is a Seq, it is not backed by a concrete + * structure such as Map, List, or Set. + */ + function isSeq( + maybeSeq: unknown + ): maybeSeq is + | Seq.Indexed + | Seq.Keyed + | Seq.Set; + + /** + * `Seq` which represents key-value pairs. + */ + namespace Keyed {} + + /** + * Always returns a Seq.Keyed, if input is not keyed, expects an + * collection of [K, V] tuples. + * + * Note: `Seq.Keyed` is a conversion function and not a class, and does not + * use the `new` keyword during construction. + */ + function Keyed(collection?: Iterable<[K, V]>): Seq.Keyed; + function Keyed(obj: { [key: string]: V }): Seq.Keyed; + + interface Keyed extends Seq, Collection.Keyed { + /** + * Deeply converts this Keyed Seq to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJS(): { [key in string | number | symbol]: DeepCopy }; + + /** + * Shallowly converts this Keyed Seq to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJSON(): { [key in string | number | symbol]: V }; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array<[K, V]>; + + /** + * Returns itself + */ + toSeq(): this; + + /** + * Returns a new Seq with other collections concatenated to this one. + * + * All entries will be present in the resulting Seq, even if they + * have the same key. + */ + concat( + ...collections: Array> + ): Seq.Keyed; + concat( + ...collections: Array<{ [key: string]: C }> + ): Seq.Keyed; + + /** + * Returns a new Seq.Keyed with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq.Keyed({ a: 1, b: 2 }).map(x => 10 * x) + * // Seq { "a": 10, "b": 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Seq.Keyed; + + /** + * @see Collection.Keyed.mapKeys + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): Seq.Keyed; + + /** + * @see Collection.Keyed.mapEntries + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): Seq.Keyed; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Seq.Keyed; + + /** + * Returns a new Seq with only the entries for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Seq.Keyed; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new keyed Seq with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: V, key: K, iter: this) => value is F, + context?: C + ): [Seq.Keyed, Seq.Keyed]; + partition( + predicate: (this: C, value: V, key: K, iter: this) => unknown, + context?: C + ): [this, this]; + + /** + * @see Collection.Keyed.flip + */ + flip(): Seq.Keyed; + + [Symbol.iterator](): IterableIterator<[K, V]>; + } + + /** + * `Seq` which represents an ordered indexed list of values. + */ + namespace Indexed { + /** + * Provides an Seq.Indexed of the values provided. + */ + function of(...values: Array): Seq.Indexed; + } + + /** + * Always returns Seq.Indexed, discarding associated keys and + * supplying incrementing indices. + * + * Note: `Seq.Indexed` is a conversion function and not a class, and does + * not use the `new` keyword during construction. + */ + function Indexed( + collection?: Iterable | ArrayLike + ): Seq.Indexed; + + interface Indexed extends Seq, Collection.Indexed { + /** + * Deeply converts this Indexed Seq to equivalent native JavaScript Array. + */ + toJS(): Array>; + + /** + * Shallowly converts this Indexed Seq to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + /** + * Returns itself + */ + toSeq(): this; + + /** + * Returns a new Seq with other collections concatenated to this one. + */ + concat( + ...valuesOrCollections: Array | C> + ): Seq.Indexed; + + /** + * Returns a new Seq.Indexed with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq.Indexed([ 1, 2 ]).map(x => 10 * x) + * // Seq [ 10, 20 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): Seq.Indexed; + + /** + * Flat-maps the Seq, returning a a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): Seq.Indexed; + + /** + * Returns a new Seq with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): Seq.Indexed; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new indexed Seq with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: T, index: number, iter: this) => value is F, + context?: C + ): [Seq.Indexed, Seq.Indexed]; + partition( + predicate: (this: C, value: T, index: number, iter: this) => unknown, + context?: C + ): [this, this]; + + /** + * Returns a Seq "zipped" with the provided collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * ```js + * const a = Seq([ 1, 2, 3 ]); + * const b = Seq([ 4, 5, 6 ]); + * const c = a.zip(b); // Seq [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): Seq.Indexed<[T, U]>; + zip( + other: Collection, + other2: Collection + ): Seq.Indexed<[T, U, V]>; + zip( + ...collections: Array> + ): Seq.Indexed; + + /** + * Returns a Seq "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = Seq([ 1, 2 ]); + * const b = Seq([ 3, 4, 5 ]); + * const c = a.zipAll(b); // Seq [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + */ + zipAll(other: Collection): Seq.Indexed<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): Seq.Indexed<[T, U, V]>; + zipAll( + ...collections: Array> + ): Seq.Indexed; + + /** + * Returns a Seq "zipped" with the provided collections by using a + * custom `zipper` function. + * + * ```js + * const a = Seq([ 1, 2, 3 ]); + * const b = Seq([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // Seq [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): Seq.Indexed; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): Seq.Indexed; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): Seq.Indexed; + + [Symbol.iterator](): IterableIterator; + } + + /** + * `Seq` which represents a set of values. + * + * Because `Seq` are often lazy, `Seq.Set` does not provide the same guarantee + * of value uniqueness as the concrete `Set`. + */ + namespace Set { + /** + * Returns a Seq.Set of the provided values + */ + function of(...values: Array): Seq.Set; + } + + /** + * Always returns a Seq.Set, discarding associated indices or keys. + * + * Note: `Seq.Set` is a conversion function and not a class, and does not + * use the `new` keyword during construction. + */ + function Set(collection?: Iterable | ArrayLike): Seq.Set; + + interface Set extends Seq, Collection.Set { + /** + * Deeply converts this Set Seq to equivalent native JavaScript Array. + */ + toJS(): Array>; + + /** + * Shallowly converts this Set Seq to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + /** + * Returns itself + */ + toSeq(): this; + + /** + * Returns a new Seq with other collections concatenated to this one. + * + * All entries will be present in the resulting Seq, even if they + * are duplicates. + */ + concat(...collections: Array>): Seq.Set; + + /** + * Returns a new Seq.Set with values passed through a + * `mapper` function. + * + * ```js + * Seq.Set([ 1, 2 ]).map(x => 10 * x) + * // Seq { 10, 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): Seq.Set; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): Seq.Set; + + /** + * Returns a new Seq with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): Seq.Set; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new set Seq with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: T, key: T, iter: this) => value is F, + context?: C + ): [Seq.Set, Seq.Set]; + partition( + predicate: (this: C, value: T, key: T, iter: this) => unknown, + context?: C + ): [this, this]; + + [Symbol.iterator](): IterableIterator; + } + } + + /** + * Creates a Seq. + * + * Returns a particular kind of `Seq` based on the input. + * + * * If a `Seq`, that same `Seq`. + * * If an `Collection`, a `Seq` of the same kind (Keyed, Indexed, or Set). + * * If an Array-like, an `Seq.Indexed`. + * * If an Iterable Object, an `Seq.Indexed`. + * * If an Object, a `Seq.Keyed`. + * + * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`, + * which is usually not what you want. You should turn your Iterator Object into + * an iterable object by defining a Symbol.iterator (or @@iterator) method which + * returns `this`. + * + * Note: `Seq` is a conversion function and not a class, and does not use the + * `new` keyword during construction. + */ + function Seq>(seq: S): S; + function Seq(collection: Collection.Keyed): Seq.Keyed; + function Seq(collection: Collection.Set): Seq.Set; + function Seq( + collection: Collection.Indexed | Iterable | ArrayLike + ): Seq.Indexed; + function Seq(obj: { [key: string]: V }): Seq.Keyed; + function Seq(): Seq; + + interface Seq extends Collection { + /** + * Some Seqs can describe their size lazily. When this is the case, + * size will be an integer. Otherwise it will be undefined. + * + * For example, Seqs returned from `map()` or `reverse()` + * preserve the size of the original `Seq` while `filter()` does not. + * + * Note: `Range`, `Repeat` and `Seq`s made from `Array`s and `Object`s will + * always have a size. + */ + readonly size: number | undefined; + + // Force evaluation + + /** + * Because Sequences are lazy and designed to be chained together, they do + * not cache their results. For example, this map function is called a total + * of 6 times, as each `join` iterates the Seq of three values. + * + * var squares = Seq([ 1, 2, 3 ]).map(x => x * x) + * squares.join() + squares.join() + * + * If you know a `Seq` will be used multiple times, it may be more + * efficient to first cache it in memory. Here, the map function is called + * only 3 times. + * + * var squares = Seq([ 1, 2, 3 ]).map(x => x * x).cacheResult() + * squares.join() + squares.join() + * + * Use this method judiciously, as it must fully evaluate a Seq which can be + * a burden on memory and possibly performance. + * + * Note: after calling `cacheResult`, a Seq will always have a `size`. + */ + cacheResult(): this; + + // Sequence algorithms + + /** + * Returns a new Seq with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq([ 1, 2 ]).map(x => 10 * x) + * // Seq [ 10, 20 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Seq; + + /** + * Returns a new Seq with values passed through a + * `mapper` function. + * + * ```js + * const { Seq } = require('immutable') + * Seq([ 1, 2 ]).map(x => 10 * x) + * // Seq [ 10, 20 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + * Note: used only for sets. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Seq; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable, + context?: unknown + ): Seq; + + /** + * Flat-maps the Seq, returning a Seq of the same type. + * + * Similar to `seq.map(...).flatten(true)`. + * Note: Used only for sets. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable, + context?: unknown + ): Seq; + + /** + * Returns a new Seq with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Seq; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new Seq with the values for which the `predicate` function + * returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: V, key: K, iter: this) => value is F, + context?: C + ): [Seq, Seq]; + partition( + predicate: (this: C, value: V, key: K, iter: this) => unknown, + context?: C + ): [this, this]; + } + + /** + * The `Collection` is a set of (key, value) entries which can be iterated, and + * is the base class for all collections in `immutable`, allowing them to + * make use of all the Collection methods (such as `map` and `filter`). + * + * Note: A collection is always iterated in the same order, however that order + * may not always be well defined, as is the case for the `Map` and `Set`. + * + * Collection is the abstract base class for concrete data structures. It + * cannot be constructed directly. + * + * Implementations should extend one of the subclasses, `Collection.Keyed`, + * `Collection.Indexed`, or `Collection.Set`. + */ + namespace Collection { + /** + * @deprecated use `const { isKeyed } = require('immutable')` + */ + function isKeyed( + maybeKeyed: unknown + ): maybeKeyed is Collection.Keyed; + + /** + * @deprecated use `const { isIndexed } = require('immutable')` + */ + function isIndexed( + maybeIndexed: unknown + ): maybeIndexed is Collection.Indexed; + + /** + * @deprecated use `const { isAssociative } = require('immutable')` + */ + function isAssociative( + maybeAssociative: unknown + ): maybeAssociative is + | Collection.Keyed + | Collection.Indexed; + + /** + * @deprecated use `const { isOrdered } = require('immutable')` + */ + function isOrdered(maybeOrdered: unknown): boolean; + + /** + * Keyed Collections have discrete keys tied to each value. + * + * When iterating `Collection.Keyed`, each iteration will yield a `[K, V]` + * tuple, in other words, `Collection#entries` is the default iterator for + * Keyed Collections. + */ + namespace Keyed {} + + /** + * Creates a Collection.Keyed + * + * Similar to `Collection()`, however it expects collection-likes of [K, V] + * tuples if not constructed from a Collection.Keyed or JS Object. + * + * Note: `Collection.Keyed` is a conversion function and not a class, and + * does not use the `new` keyword during construction. + */ + function Keyed(collection?: Iterable<[K, V]>): Collection.Keyed; + function Keyed(obj: { [key: string]: V }): Collection.Keyed; + + interface Keyed extends Collection { + /** + * Deeply converts this Keyed collection to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJS(): { [key in string | number | symbol]: DeepCopy }; + + /** + * Shallowly converts this Keyed collection to equivalent native JavaScript Object. + * + * Converts keys to Strings. + */ + toJSON(): { [key in string | number | symbol]: V }; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array<[K, V]>; + + /** + * Returns Seq.Keyed. + * @override + */ + toSeq(): Seq.Keyed; + + // Sequence functions + + /** + * Returns a new Collection.Keyed of the same type where the keys and values + * have been flipped. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 'z', b: 'y' }).flip() + * // Map { "z": "a", "y": "b" } + * ``` + */ + flip(): Collection.Keyed; + + /** + * Returns a new Collection with other collections concatenated to this one. + */ + concat( + ...collections: Array> + ): Collection.Keyed; + concat( + ...collections: Array<{ [key: string]: C }> + ): Collection.Keyed; + + /** + * Returns a new Collection.Keyed with values passed through a + * `mapper` function. + * + * ```js + * const { Collection } = require('immutable') + * Collection.Keyed({ a: 1, b: 2 }).map(x => 10 * x) + * // Seq { "a": 10, "b": 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Collection.Keyed; + + /** + * Returns a new Collection.Keyed of the same type with keys passed through + * a `mapper` function. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2 }).mapKeys(x => x.toUpperCase()) + * // Map { "A": 1, "B": 2 } + * ``` + * + * Note: `mapKeys()` always returns a new instance, even if it produced + * the same key at every step. + */ + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: unknown + ): Collection.Keyed; + + /** + * Returns a new Collection.Keyed of the same type with entries + * ([key, value] tuples) passed through a `mapper` function. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2 }) + * .mapEntries(([ k, v ]) => [ k.toUpperCase(), v * 2 ]) + * // Map { "A": 2, "B": 4 } + * ``` + * + * Note: `mapEntries()` always returns a new instance, even if it produced + * the same entry at every step. + * + * If the mapper function returns `undefined`, then the entry will be filtered + */ + mapEntries( + mapper: ( + entry: [K, V], + index: number, + iter: this + ) => [KM, VM] | undefined, + context?: unknown + ): Collection.Keyed; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Collection.Keyed; + + /** + * Returns a new Collection with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Collection.Keyed; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new keyed Collection with the values for which the + * `predicate` function returns false and another for which is returns + * true. + */ + partition( + predicate: (this: C, value: V, key: K, iter: this) => value is F, + context?: C + ): [Collection.Keyed, Collection.Keyed]; + partition( + predicate: (this: C, value: V, key: K, iter: this) => unknown, + context?: C + ): [this, this]; + + [Symbol.iterator](): IterableIterator<[K, V]>; + } + + /** + * Indexed Collections have incrementing numeric keys. They exhibit + * slightly different behavior than `Collection.Keyed` for some methods in order + * to better mirror the behavior of JavaScript's `Array`, and add methods + * which do not make sense on non-indexed Collections such as `indexOf`. + * + * Unlike JavaScript arrays, `Collection.Indexed`s are always dense. "Unset" + * indices and `undefined` indices are indistinguishable, and all indices from + * 0 to `size` are visited when iterated. + * + * All Collection.Indexed methods return re-indexed Collections. In other words, + * indices always start at 0 and increment until size. If you wish to + * preserve indices, using them as keys, convert to a Collection.Keyed by + * calling `toKeyedSeq`. + */ + namespace Indexed {} + + /** + * Creates a new Collection.Indexed. + * + * Note: `Collection.Indexed` is a conversion function and not a class, and + * does not use the `new` keyword during construction. + */ + function Indexed( + collection?: Iterable | ArrayLike + ): Collection.Indexed; + + interface Indexed extends Collection { + /** + * Deeply converts this Indexed collection to equivalent native JavaScript Array. + */ + toJS(): Array>; + + /** + * Shallowly converts this Indexed collection to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + // Reading values + + /** + * Returns the value associated with the provided index, or notSetValue if + * the index is beyond the bounds of the Collection. + * + * `index` may be a negative number, which indexes back from the end of the + * Collection. `s.get(-1)` gets the last item in the Collection. + */ + get(index: number, notSetValue: NSV): T | NSV; + get(index: number): T | undefined; + + // Conversion to Seq + + /** + * Returns Seq.Indexed. + * @override + */ + toSeq(): Seq.Indexed; + + /** + * If this is a collection of [key, value] entry tuples, it will return a + * Seq.Keyed of those entries. + */ + fromEntrySeq(): Seq.Keyed; + + // Combination + + /** + * Returns a Collection of the same type with `separator` between each item + * in this Collection. + */ + interpose(separator: T): this; + + /** + * Returns a Collection of the same type with the provided `collections` + * interleaved into this collection. + * + * The resulting Collection includes the first item from each, then the + * second from each, etc. + * + * + * ```js + * const { List } = require('immutable') + * List([ 1, 2, 3 ]).interleave(List([ 'A', 'B', 'C' ])) + * // List [ 1, "A", 2, "B", 3, "C" ] + * ``` + * + * The shortest Collection stops interleave. + * + * + * ```js + * List([ 1, 2, 3 ]).interleave( + * List([ 'A', 'B' ]), + * List([ 'X', 'Y', 'Z' ]) + * ) + * // List [ 1, "A", "X", 2, "B", "Y" ] + * ``` + * + * Since `interleave()` re-indexes values, it produces a complete copy, + * which has `O(N)` complexity. + * + * Note: `interleave` *cannot* be used in `withMutations`. + */ + interleave(...collections: Array>): this; + + /** + * Splice returns a new indexed Collection by replacing a region of this + * Collection with new values. If values are not provided, it only skips the + * region to be removed. + * + * `index` may be a negative number, which indexes back from the end of the + * Collection. `s.splice(-2)` splices after the second to last item. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'a', 'b', 'c', 'd' ]).splice(1, 2, 'q', 'r', 's') + * // List [ "a", "q", "r", "s", "d" ] + * ``` + * + * Since `splice()` re-indexes values, it produces a complete copy, which + * has `O(N)` complexity. + * + * Note: `splice` *cannot* be used in `withMutations`. + */ + splice(index: number, removeNum: number, ...values: Array): this; + + /** + * Returns a Collection of the same type "zipped" with the provided + * collections. + * + * Like `zipWith`, but using the default `zipper`: creating an `Array`. + * + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] + * ``` + */ + zip(other: Collection): Collection.Indexed<[T, U]>; + zip( + other: Collection, + other2: Collection + ): Collection.Indexed<[T, U, V]>; + zip( + ...collections: Array> + ): Collection.Indexed; + + /** + * Returns a Collection "zipped" with the provided collections. + * + * Unlike `zip`, `zipAll` continues zipping until the longest collection is + * exhausted. Missing values from shorter collections are filled with `undefined`. + * + * ```js + * const a = List([ 1, 2 ]); + * const b = List([ 3, 4, 5 ]); + * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] + * ``` + */ + zipAll(other: Collection): Collection.Indexed<[T, U]>; + zipAll( + other: Collection, + other2: Collection + ): Collection.Indexed<[T, U, V]>; + zipAll( + ...collections: Array> + ): Collection.Indexed; + + /** + * Returns a Collection of the same type "zipped" with the provided + * collections by using a custom `zipper` function. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 4, 5, 6 ]); + * const c = a.zipWith((a, b) => a + b, b); + * // List [ 5, 7, 9 ] + * ``` + */ + zipWith( + zipper: (value: T, otherValue: U) => Z, + otherCollection: Collection + ): Collection.Indexed; + zipWith( + zipper: (value: T, otherValue: U, thirdValue: V) => Z, + otherCollection: Collection, + thirdCollection: Collection + ): Collection.Indexed; + zipWith( + zipper: (...values: Array) => Z, + ...collections: Array> + ): Collection.Indexed; + + // Search for value + + /** + * Returns the first index at which a given value can be found in the + * Collection, or -1 if it is not present. + */ + indexOf(searchValue: T): number; + + /** + * Returns the last index at which a given value can be found in the + * Collection, or -1 if it is not present. + */ + lastIndexOf(searchValue: T): number; + + /** + * Returns the first index in the Collection where a value satisfies the + * provided predicate function. Otherwise -1 is returned. + */ + findIndex( + predicate: (value: T, index: number, iter: this) => boolean, + context?: unknown + ): number; + + /** + * Returns the last index in the Collection where a value satisfies the + * provided predicate function. Otherwise -1 is returned. + */ + findLastIndex( + predicate: (value: T, index: number, iter: this) => boolean, + context?: unknown + ): number; + + // Sequence algorithms + + /** + * Returns a new Collection with other collections concatenated to this one. + */ + concat( + ...valuesOrCollections: Array | C> + ): Collection.Indexed; + + /** + * Returns a new Collection.Indexed with values passed through a + * `mapper` function. + * + * ```js + * const { Collection } = require('immutable') + * Collection.Indexed([1,2]).map(x => 10 * x) + * // Seq [ 1, 2 ] + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: number, iter: this) => M, + context?: unknown + ): Collection.Indexed; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: number, iter: this) => Iterable, + context?: unknown + ): Collection.Indexed; + + /** + * Returns a new Collection with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, index: number, iter: this) => value is F, + context?: unknown + ): Collection.Indexed; + filter( + predicate: (value: T, index: number, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new indexed Collection with the values for which the + * `predicate` function returns false and another for which is returns + * true. + */ + partition( + predicate: (this: C, value: T, index: number, iter: this) => value is F, + context?: C + ): [Collection.Indexed, Collection.Indexed]; + partition( + predicate: (this: C, value: T, index: number, iter: this) => unknown, + context?: C + ): [this, this]; + + [Symbol.iterator](): IterableIterator; + } + + /** + * Set Collections only represent values. They have no associated keys or + * indices. Duplicate values are possible in the lazy `Seq.Set`s, however + * the concrete `Set` Collection does not allow duplicate values. + * + * Collection methods on Collection.Set such as `map` and `forEach` will provide + * the value as both the first and second arguments to the provided function. + * + * ```js + * const { Collection } = require('immutable') + * const seq = Collection.Set([ 'A', 'B', 'C' ]) + * // Seq { "A", "B", "C" } + * seq.forEach((v, k) => + * assert.equal(v, k) + * ) + * ``` + */ + namespace Set {} + + /** + * Similar to `Collection()`, but always returns a Collection.Set. + * + * Note: `Collection.Set` is a factory function and not a class, and does + * not use the `new` keyword during construction. + */ + function Set(collection?: Iterable | ArrayLike): Collection.Set; + + interface Set extends Collection { + /** + * Deeply converts this Set collection to equivalent native JavaScript Array. + */ + toJS(): Array>; + + /** + * Shallowly converts this Set collection to equivalent native JavaScript Array. + */ + toJSON(): Array; + + /** + * Shallowly converts this collection to an Array. + */ + toArray(): Array; + + /** + * Returns Seq.Set. + * @override + */ + toSeq(): Seq.Set; + + // Sequence algorithms + + /** + * Returns a new Collection with other collections concatenated to this one. + */ + concat(...collections: Array>): Collection.Set; + + /** + * Returns a new Collection.Set with values passed through a + * `mapper` function. + * + * ``` + * Collection.Set([ 1, 2 ]).map(x => 10 * x) + * // Seq { 1, 2 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the + * same value at every step. + */ + map( + mapper: (value: T, key: T, iter: this) => M, + context?: unknown + ): Collection.Set; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: T, key: T, iter: this) => Iterable, + context?: unknown + ): Collection.Set; + + /** + * Returns a new Collection with only the values for which the `predicate` + * function returns true. + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: T, key: T, iter: this) => value is F, + context?: unknown + ): Collection.Set; + filter( + predicate: (value: T, key: T, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new set Collection with the values for which the + * `predicate` function returns false and another for which is returns + * true. + */ + partition( + predicate: (this: C, value: T, key: T, iter: this) => value is F, + context?: C + ): [Collection.Set, Collection.Set]; + partition( + predicate: (this: C, value: T, key: T, iter: this) => unknown, + context?: C + ): [this, this]; + + [Symbol.iterator](): IterableIterator; + } + } + + /** + * Creates a Collection. + * + * The type of Collection created is based on the input. + * + * * If an `Collection`, that same `Collection`. + * * If an Array-like, an `Collection.Indexed`. + * * If an Object with an Iterator defined, an `Collection.Indexed`. + * * If an Object, an `Collection.Keyed`. + * + * This methods forces the conversion of Objects and Strings to Collections. + * If you want to ensure that a Collection of one item is returned, use + * `Seq.of`. + * + * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`, + * which is usually not what you want. You should turn your Iterator Object into + * an iterable object by defining a Symbol.iterator (or @@iterator) method which + * returns `this`. + * + * Note: `Collection` is a conversion function and not a class, and does not + * use the `new` keyword during construction. + */ + function Collection>(collection: I): I; + function Collection( + collection: Iterable | ArrayLike + ): Collection.Indexed; + function Collection(obj: { + [key: string]: V; + }): Collection.Keyed; + function Collection(): Collection; + + interface Collection extends ValueObject { + // Value equality + + /** + * True if this and the other Collection have value equality, as defined + * by `Immutable.is()`. + * + * Note: This is equivalent to `Immutable.is(this, other)`, but provided to + * allow for chained expressions. + */ + equals(other: unknown): boolean; + + /** + * Computes and returns the hashed identity for this Collection. + * + * The `hashCode` of a Collection is used to determine potential equality, + * and is used when adding this to a `Set` or as a key in a `Map`, enabling + * lookup via a different instance. + * + * + * ```js + * const a = List([ 1, 2, 3 ]); + * const b = List([ 1, 2, 3 ]); + * assert.notStrictEqual(a, b); // different instances + * const set = Set([ a ]); + * assert.equal(set.has(b), true); + * ``` + * + * If two values have the same `hashCode`, they are [not guaranteed + * to be equal][Hash Collision]. If two values have different `hashCode`s, + * they must not be equal. + * + * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science) + */ + hashCode(): number; + + // Reading values + + /** + * Returns the value associated with the provided key, or notSetValue if + * the Collection does not contain this key. + * + * Note: it is possible a key may be associated with an `undefined` value, + * so if `notSetValue` is not provided and this method returns `undefined`, + * that does not guarantee the key was not found. + */ + get(key: K, notSetValue: NSV): V | NSV; + get(key: K): V | undefined; + + /** + * True if a key exists within this `Collection`, using `Immutable.is` + * to determine equality + */ + has(key: K): boolean; + + /** + * True if a value exists within this `Collection`, using `Immutable.is` + * to determine equality + * @alias contains + */ + includes(value: V): boolean; + contains(value: V): boolean; + + /** + * In case the `Collection` is not empty returns the first element of the + * `Collection`. + * In case the `Collection` is empty returns the optional default + * value if provided, if no default value is provided returns undefined. + */ + first(notSetValue?: NSV): V | NSV; + + /** + * In case the `Collection` is not empty returns the last element of the + * `Collection`. + * In case the `Collection` is empty returns the optional default + * value if provided, if no default value is provided returns undefined. + */ + last(notSetValue?: NSV): V | NSV; + + // Reading deep values + + /** + * Returns the value found by following a path of keys or indices through + * nested Collections. + * + * + * ```js + * const { Map, List } = require('immutable') + * const deepData = Map({ x: List([ Map({ y: 123 }) ]) }); + * deepData.getIn(['x', 0, 'y']) // 123 + * ``` + * + * Plain JavaScript Object or Arrays may be nested within an Immutable.js + * Collection, and getIn() can access those values as well: + * + * + * ```js + * const { Map, List } = require('immutable') + * const deepData = Map({ x: [ { y: 123 } ] }); + * deepData.getIn(['x', 0, 'y']) // 123 + * ``` + */ + getIn(searchKeyPath: Iterable, notSetValue?: unknown): unknown; + + /** + * True if the result of following a path of keys or indices through nested + * Collections results in a set value. + */ + hasIn(searchKeyPath: Iterable): boolean; + + // Persistent changes + + /** + * This can be very useful as a way to "chain" a normal function into a + * sequence of methods. RxJS calls this "let" and lodash calls it "thru". + * + * For example, to sum a Seq after mapping and filtering: + * + * + * ```js + * const { Seq } = require('immutable') + * + * function sum(collection) { + * return collection.reduce((sum, x) => sum + x, 0) + * } + * + * Seq([ 1, 2, 3 ]) + * .map(x => x + 1) + * .filter(x => x % 2 === 0) + * .update(sum) + * // 6 + * ``` + */ + update(updater: (value: this) => R): R; + + // Conversion to JavaScript types + + /** + * Deeply converts this Collection to equivalent native JavaScript Array or Object. + * + * `Collection.Indexed`, and `Collection.Set` become `Array`, while + * `Collection.Keyed` become `Object`, converting keys to Strings. + */ + toJS(): + | Array> + | { [key in string | number | symbol]: DeepCopy }; + + /** + * Shallowly converts this Collection to equivalent native JavaScript Array or Object. + * + * `Collection.Indexed`, and `Collection.Set` become `Array`, while + * `Collection.Keyed` become `Object`, converting keys to Strings. + */ + toJSON(): Array | { [key in string | number | symbol]: V }; + + /** + * Shallowly converts this collection to an Array. + * + * `Collection.Indexed`, and `Collection.Set` produce an Array of values. + * `Collection.Keyed` produce an Array of [key, value] tuples. + */ + toArray(): Array | Array<[K, V]>; + + /** + * Shallowly converts this Collection to an Object. + * + * Converts keys to Strings. + */ + toObject(): { [key: string]: V }; + + // Conversion to Collections + + /** + * Converts this Collection to a Map, Throws if keys are not hashable. + * + * Note: This is equivalent to `Map(this.toKeyedSeq())`, but provided + * for convenience and to allow for chained expressions. + */ + toMap(): Map; + + /** + * Converts this Collection to a Map, maintaining the order of iteration. + * + * Note: This is equivalent to `OrderedMap(this.toKeyedSeq())`, but + * provided for convenience and to allow for chained expressions. + */ + toOrderedMap(): OrderedMap; + + /** + * Converts this Collection to a Set, discarding keys. Throws if values + * are not hashable. + * + * Note: This is equivalent to `Set(this)`, but provided to allow for + * chained expressions. + */ + toSet(): Set; + + /** + * Converts this Collection to a Set, maintaining the order of iteration and + * discarding keys. + * + * Note: This is equivalent to `OrderedSet(this.valueSeq())`, but provided + * for convenience and to allow for chained expressions. + */ + toOrderedSet(): OrderedSet; + + /** + * Converts this Collection to a List, discarding keys. + * + * This is similar to `List(collection)`, but provided to allow for chained + * expressions. However, when called on `Map` or other keyed collections, + * `collection.toList()` discards the keys and creates a list of only the + * values, whereas `List(collection)` creates a list of entry tuples. + * + * + * ```js + * const { Map, List } = require('immutable') + * var myMap = Map({ a: 'Apple', b: 'Banana' }) + * List(myMap) // List [ [ "a", "Apple" ], [ "b", "Banana" ] ] + * myMap.toList() // List [ "Apple", "Banana" ] + * ``` + */ + toList(): List; + + /** + * Converts this Collection to a Stack, discarding keys. Throws if values + * are not hashable. + * + * Note: This is equivalent to `Stack(this)`, but provided to allow for + * chained expressions. + */ + toStack(): Stack; + + // Conversion to Seq + + /** + * Converts this Collection to a Seq of the same kind (indexed, + * keyed, or set). + */ + toSeq(): Seq; + + /** + * Returns a Seq.Keyed from this Collection where indices are treated as keys. + * + * This is useful if you want to operate on an + * Collection.Indexed and preserve the [index, value] pairs. + * + * The returned Seq will have identical iteration order as + * this Collection. + * + * + * ```js + * const { Seq } = require('immutable') + * const indexedSeq = Seq([ 'A', 'B', 'C' ]) + * // Seq [ "A", "B", "C" ] + * indexedSeq.filter(v => v === 'B') + * // Seq [ "B" ] + * const keyedSeq = indexedSeq.toKeyedSeq() + * // Seq { 0: "A", 1: "B", 2: "C" } + * keyedSeq.filter(v => v === 'B') + * // Seq { 1: "B" } + * ``` + */ + toKeyedSeq(): Seq.Keyed; + + /** + * Returns an Seq.Indexed of the values of this Collection, discarding keys. + */ + toIndexedSeq(): Seq.Indexed; + + /** + * Returns a Seq.Set of the values of this Collection, discarding keys. + */ + toSetSeq(): Seq.Set; + + // Iterators + + /** + * An iterator of this `Collection`'s keys. + * + * Note: this will return an ES6 iterator which does not support + * Immutable.js sequence algorithms. Use `keySeq` instead, if this is + * what you want. + */ + keys(): IterableIterator; + + /** + * An iterator of this `Collection`'s values. + * + * Note: this will return an ES6 iterator which does not support + * Immutable.js sequence algorithms. Use `valueSeq` instead, if this is + * what you want. + */ + values(): IterableIterator; + + /** + * An iterator of this `Collection`'s entries as `[ key, value ]` tuples. + * + * Note: this will return an ES6 iterator which does not support + * Immutable.js sequence algorithms. Use `entrySeq` instead, if this is + * what you want. + */ + entries(): IterableIterator<[K, V]>; + + [Symbol.iterator](): IterableIterator; + + // Collections (Seq) + + /** + * Returns a new Seq.Indexed of the keys of this Collection, + * discarding values. + */ + keySeq(): Seq.Indexed; + + /** + * Returns an Seq.Indexed of the values of this Collection, discarding keys. + */ + valueSeq(): Seq.Indexed; + + /** + * Returns a new Seq.Indexed of [key, value] tuples. + */ + entrySeq(): Seq.Indexed<[K, V]>; + + // Sequence algorithms + + /** + * Returns a new Collection of the same type with values passed through a + * `mapper` function. + * + * + * ```js + * const { Collection } = require('immutable') + * Collection({ a: 1, b: 2 }).map(x => 10 * x) + * // Seq { "a": 10, "b": 20 } + * ``` + * + * Note: `map()` always returns a new instance, even if it produced the same + * value at every step. + */ + map( + mapper: (value: V, key: K, iter: this) => M, + context?: unknown + ): Collection; + + /** + * Note: used only for sets, which return Collection but are otherwise + * identical to normal `map()`. + * + * @ignore + */ + map(...args: Array): unknown; + + /** + * Returns a new Collection of the same type with only the entries for which + * the `predicate` function returns true. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2, c: 3, d: 4}).filter(x => x % 2 === 0) + * // Map { "b": 2, "d": 4 } + * ``` + * + * Note: `filter()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filter( + predicate: (value: V, key: K, iter: this) => value is F, + context?: unknown + ): Collection; + filter( + predicate: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type with only the entries for which + * the `predicate` function returns false. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ a: 1, b: 2, c: 3, d: 4}).filterNot(x => x % 2 === 0) + * // Map { "a": 1, "c": 3 } + * ``` + * + * Note: `filterNot()` always returns a new instance, even if it results in + * not filtering out any values. + */ + filterNot( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection with the values for which the `predicate` + * function returns false and another for which is returns true. + */ + partition( + predicate: (this: C, value: V, key: K, iter: this) => value is F, + context?: C + ): [Collection, Collection]; + partition( + predicate: (this: C, value: V, key: K, iter: this) => unknown, + context?: C + ): [this, this]; + + /** + * Returns a new Collection of the same type in reverse order. + */ + reverse(): this; + + /** + * Returns a new Collection of the same type which includes the same entries, + * stably sorted by using a `comparator`. + * + * If a `comparator` is not provided, a default comparator uses `<` and `>`. + * + * `comparator(valueA, valueB)`: + * + * * Returns `0` if the elements should not be swapped. + * * Returns `-1` (or any negative number) if `valueA` comes before `valueB` + * * Returns `1` (or any positive number) if `valueA` comes after `valueB` + * * Alternatively, can return a value of the `PairSorting` enum type + * * Is pure, i.e. it must always return the same value for the same pair + * of values. + * + * When sorting collections which have no defined order, their ordered + * equivalents will be returned. e.g. `map.sort()` returns OrderedMap. + * + * + * ```js + * const { Map } = require('immutable') + * Map({ "c": 3, "a": 1, "b": 2 }).sort((a, b) => { + * if (a < b) { return -1; } + * if (a > b) { return 1; } + * if (a === b) { return 0; } + * }); + * // OrderedMap { "a": 1, "b": 2, "c": 3 } + * ``` + * + * Note: `sort()` Always returns a new instance, even if the original was + * already sorted. + * + * Note: This is always an eager operation. + */ + sort(comparator?: Comparator): this; + + /** + * Like `sort`, but also accepts a `comparatorValueMapper` which allows for + * sorting by more sophisticated means: + * + * + * ```js + * const { Map } = require('immutable') + * const beattles = Map({ + * John: { name: "Lennon" }, + * Paul: { name: "McCartney" }, + * George: { name: "Harrison" }, + * Ringo: { name: "Starr" }, + * }); + * beattles.sortBy(member => member.name); + * ``` + * + * Note: `sortBy()` Always returns a new instance, even if the original was + * already sorted. + * + * Note: This is always an eager operation. + */ + sortBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: Comparator + ): this; + + /** + * Returns a `Map` of `Collection`, grouped by the return + * value of the `grouper` function. + * + * Note: This is always an eager operation. + * + * + * ```js + * const { List, Map } = require('immutable') + * const listOfMaps = List([ + * Map({ v: 0 }), + * Map({ v: 1 }), + * Map({ v: 1 }), + * Map({ v: 0 }), + * Map({ v: 2 }) + * ]) + * const groupsOfMaps = listOfMaps.groupBy(x => x.get('v')) + * // Map { + * // 0: List [ Map{ "v": 0 }, Map { "v": 0 } ], + * // 1: List [ Map{ "v": 1 }, Map { "v": 1 } ], + * // 2: List [ Map{ "v": 2 } ], + * // } + * ``` + */ + groupBy( + grouper: (value: V, key: K, iter: this) => G, + context?: unknown + ): Map; + + // Side effects + + /** + * The `sideEffect` is executed for every entry in the Collection. + * + * Unlike `Array#forEach`, if any call of `sideEffect` returns + * `false`, the iteration will stop. Returns the number of entries iterated + * (including the last iteration which returned false). + */ + forEach( + sideEffect: (value: V, key: K, iter: this) => unknown, + context?: unknown + ): number; + + // Creating subsets + + /** + * Returns a new Collection of the same type representing a portion of this + * Collection from start up to but not including end. + * + * If begin is negative, it is offset from the end of the Collection. e.g. + * `slice(-2)` returns a Collection of the last two entries. If it is not + * provided the new Collection will begin at the beginning of this Collection. + * + * If end is negative, it is offset from the end of the Collection. e.g. + * `slice(0, -1)` returns a Collection of everything but the last entry. If + * it is not provided, the new Collection will continue through the end of + * this Collection. + * + * If the requested slice is equivalent to the current Collection, then it + * will return itself. + */ + slice(begin?: number, end?: number): this; + + /** + * Returns a new Collection of the same type containing all entries except + * the first. + */ + rest(): this; + + /** + * Returns a new Collection of the same type containing all entries except + * the last. + */ + butLast(): this; + + /** + * Returns a new Collection of the same type which excludes the first `amount` + * entries from this Collection. + */ + skip(amount: number): this; + + /** + * Returns a new Collection of the same type which excludes the last `amount` + * entries from this Collection. + */ + skipLast(amount: number): this; + + /** + * Returns a new Collection of the same type which includes entries starting + * from when `predicate` first returns false. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .skipWhile(x => x.match(/g/)) + * // List [ "cat", "hat", "god" ] + * ``` + */ + skipWhile( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type which includes entries starting + * from when `predicate` first returns true. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .skipUntil(x => x.match(/hat/)) + * // List [ "hat", "god" ] + * ``` + */ + skipUntil( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type which includes the first `amount` + * entries from this Collection. + */ + take(amount: number): this; + + /** + * Returns a new Collection of the same type which includes the last `amount` + * entries from this Collection. + */ + takeLast(amount: number): this; + + /** + * Returns a new Collection of the same type which includes entries from this + * Collection as long as the `predicate` returns true. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .takeWhile(x => x.match(/o/)) + * // List [ "dog", "frog" ] + * ``` + */ + takeWhile( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + /** + * Returns a new Collection of the same type which includes entries from this + * Collection as long as the `predicate` returns false. + * + * + * ```js + * const { List } = require('immutable') + * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) + * .takeUntil(x => x.match(/at/)) + * // List [ "dog", "frog" ] + * ``` + */ + takeUntil( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): this; + + // Combination + + /** + * Returns a new Collection of the same type with other values and + * collection-like concatenated to this one. + * + * For Seqs, all entries will be present in the resulting Seq, even if they + * have the same key. + */ + concat( + ...valuesOrCollections: Array + ): Collection; + + /** + * Flattens nested Collections. + * + * Will deeply flatten the Collection by default, returning a Collection of the + * same type, but a `depth` can be provided in the form of a number or + * boolean (where true means to shallowly flatten one level). A depth of 0 + * (or shallow: false) will deeply flatten. + * + * Flattens only others Collection, not Arrays or Objects. + * + * Note: `flatten(true)` operates on Collection> and + * returns Collection + */ + flatten(depth?: number): Collection; + // tslint:disable-next-line unified-signatures + flatten(shallow?: boolean): Collection; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable, + context?: unknown + ): Collection; + + /** + * Flat-maps the Collection, returning a Collection of the same type. + * + * Similar to `collection.map(...).flatten(true)`. + * Used for Dictionaries only. + */ + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: unknown + ): Collection; + + // Reducing a value + + /** + * Reduces the Collection to a value by calling the `reducer` for every entry + * in the Collection and passing along the reduced value. + * + * If `initialReduction` is not provided, the first item in the + * Collection will be used. + * + * @see `Array#reduce`. + */ + reduce( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: unknown + ): R; + reduce( + reducer: (reduction: V | R, value: V, key: K, iter: this) => R + ): R; + + /** + * Reduces the Collection in reverse (from the right side). + * + * Note: Similar to this.reverse().reduce(), and provided for parity + * with `Array#reduceRight`. + */ + reduceRight( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: unknown + ): R; + reduceRight( + reducer: (reduction: V | R, value: V, key: K, iter: this) => R + ): R; + + /** + * True if `predicate` returns true for all entries in the Collection. + */ + every( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): boolean; + + /** + * True if `predicate` returns true for any entry in the Collection. + */ + some( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): boolean; + + /** + * Joins values together as a string, inserting a separator between each. + * The default separator is `","`. + */ + join(separator?: string): string; + + /** + * Returns true if this Collection includes no values. + * + * For some lazy `Seq`, `isEmpty` might need to iterate to determine + * emptiness. At most one iteration will occur. + */ + isEmpty(): boolean; + + /** + * Returns the size of this Collection. + * + * Regardless of if this Collection can describe its size lazily (some Seqs + * cannot), this method will always return the correct size. E.g. it + * evaluates a lazy `Seq` if necessary. + * + * If `predicate` is provided, then this returns the count of entries in the + * Collection for which the `predicate` returns true. + */ + count(): number; + count( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): number; + + /** + * Returns a `Seq.Keyed` of counts, grouped by the return value of + * the `grouper` function. + * + * Note: This is not a lazy operation. + */ + countBy( + grouper: (value: V, key: K, iter: this) => G, + context?: unknown + ): Map; + + // Search for value + + /** + * Returns the first value for which the `predicate` returns true. + */ + find( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): V | undefined; + + /** + * Returns the last value for which the `predicate` returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLast( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): V | undefined; + + /** + * Returns the first [key, value] entry for which the `predicate` returns true. + */ + findEntry( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): [K, V] | undefined; + + /** + * Returns the last [key, value] entry for which the `predicate` + * returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLastEntry( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown, + notSetValue?: V + ): [K, V] | undefined; + + /** + * Returns the key for which the `predicate` returns true. + */ + findKey( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): K | undefined; + + /** + * Returns the last key for which the `predicate` returns true. + * + * Note: `predicate` will be called for each entry in reverse. + */ + findLastKey( + predicate: (value: V, key: K, iter: this) => boolean, + context?: unknown + ): K | undefined; + + /** + * Returns the key associated with the search value, or undefined. + */ + keyOf(searchValue: V): K | undefined; + + /** + * Returns the last key associated with the search value, or undefined. + */ + lastKeyOf(searchValue: V): K | undefined; + + /** + * Returns the maximum value in this collection. If any values are + * comparatively equivalent, the first one found will be returned. + * + * The `comparator` is used in the same way as `Collection#sort`. If it is not + * provided, the default comparator is `>`. + * + * When two values are considered equivalent, the first encountered will be + * returned. Otherwise, `max` will operate independent of the order of input + * as long as the comparator is commutative. The default comparator `>` is + * commutative *only* when types do not differ. + * + * If `comparator` returns 0 and either value is NaN, undefined, or null, + * that value will be returned. + */ + max(comparator?: Comparator): V | undefined; + + /** + * Like `max`, but also accepts a `comparatorValueMapper` which allows for + * comparing by more sophisticated means: + * + * + * ```js + * const { List, } = require('immutable'); + * const l = List([ + * { name: 'Bob', avgHit: 1 }, + * { name: 'Max', avgHit: 3 }, + * { name: 'Lili', avgHit: 2 } , + * ]); + * l.maxBy(i => i.avgHit); // will output { name: 'Max', avgHit: 3 } + * ``` + */ + maxBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: Comparator + ): V | undefined; + + /** + * Returns the minimum value in this collection. If any values are + * comparatively equivalent, the first one found will be returned. + * + * The `comparator` is used in the same way as `Collection#sort`. If it is not + * provided, the default comparator is `<`. + * + * When two values are considered equivalent, the first encountered will be + * returned. Otherwise, `min` will operate independent of the order of input + * as long as the comparator is commutative. The default comparator `<` is + * commutative *only* when types do not differ. + * + * If `comparator` returns 0 and either value is NaN, undefined, or null, + * that value will be returned. + */ + min(comparator?: Comparator): V | undefined; + + /** + * Like `min`, but also accepts a `comparatorValueMapper` which allows for + * comparing by more sophisticated means: + * + * + * ```js + * const { List, } = require('immutable'); + * const l = List([ + * { name: 'Bob', avgHit: 1 }, + * { name: 'Max', avgHit: 3 }, + * { name: 'Lili', avgHit: 2 } , + * ]); + * l.minBy(i => i.avgHit); // will output { name: 'Bob', avgHit: 1 } + * ``` + */ + minBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: Comparator + ): V | undefined; + + // Comparison + + /** + * True if `iter` includes every value in this Collection. + */ + isSubset(iter: Iterable): boolean; + + /** + * True if this Collection includes every value in `iter`. + */ + isSuperset(iter: Iterable): boolean; + } + + /** + * The interface to fulfill to qualify as a Value Object. + */ + interface ValueObject { + /** + * True if this and the other Collection have value equality, as defined + * by `Immutable.is()`. + * + * Note: This is equivalent to `Immutable.is(this, other)`, but provided to + * allow for chained expressions. + */ + equals(other: unknown): boolean; + + /** + * Computes and returns the hashed identity for this Collection. + * + * The `hashCode` of a Collection is used to determine potential equality, + * and is used when adding this to a `Set` or as a key in a `Map`, enabling + * lookup via a different instance. + * + * + * ```js + * const { List, Set } = require('immutable'); + * const a = List([ 1, 2, 3 ]); + * const b = List([ 1, 2, 3 ]); + * assert.notStrictEqual(a, b); // different instances + * const set = Set([ a ]); + * assert.equal(set.has(b), true); + * ``` + * + * Note: hashCode() MUST return a Uint32 number. The easiest way to + * guarantee this is to return `myHash | 0` from a custom implementation. + * + * If two values have the same `hashCode`, they are [not guaranteed + * to be equal][Hash Collision]. If two values have different `hashCode`s, + * they must not be equal. + * + * Note: `hashCode()` is not guaranteed to always be called before + * `equals()`. Most but not all Immutable.js collections use hash codes to + * organize their internal data structures, while all Immutable.js + * collections use equality during lookups. + * + * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science) + */ + hashCode(): number; + } + + /** + * Deeply converts plain JS objects and arrays to Immutable Maps and Lists. + * + * `fromJS` will convert Arrays and [array-like objects][2] to a List, and + * plain objects (without a custom prototype) to a Map. [Iterable objects][3] + * may be converted to List, Map, or Set. + * + * If a `reviver` is optionally provided, it will be called with every + * collection as a Seq (beginning with the most nested collections + * and proceeding to the top-level collection itself), along with the key + * referring to each collection and the parent JS object provided as `this`. + * For the top level, object, the key will be `""`. This `reviver` is expected + * to return a new Immutable Collection, allowing for custom conversions from + * deep JS objects. Finally, a `path` is provided which is the sequence of + * keys to this value from the starting value. + * + * `reviver` acts similarly to the [same parameter in `JSON.parse`][1]. + * + * If `reviver` is not provided, the default behavior will convert Objects + * into Maps and Arrays into Lists like so: + * + * + * ```js + * const { fromJS, isKeyed } = require('immutable') + * function (key, value) { + * return isKeyed(value) ? value.toMap() : value.toList() + * } + * ``` + * + * Accordingly, this example converts native JS data to OrderedMap and List: + * + * + * ```js + * const { fromJS, isKeyed } = require('immutable') + * fromJS({ a: {b: [10, 20, 30]}, c: 40}, function (key, value, path) { + * console.log(key, value, path) + * return isKeyed(value) ? value.toOrderedMap() : value.toList() + * }) + * + * > "b", [ 10, 20, 30 ], [ "a", "b" ] + * > "a", {b: [10, 20, 30]}, [ "a" ] + * > "", {a: {b: [10, 20, 30]}, c: 40}, [] + * ``` + * + * Keep in mind, when using JS objects to construct Immutable Maps, that + * JavaScript Object properties are always strings, even if written in a + * quote-less shorthand, while Immutable Maps accept keys of any type. + * + * + * ```js + * const { Map } = require('immutable') + * let obj = { 1: "one" }; + * Object.keys(obj); // [ "1" ] + * assert.equal(obj["1"], obj[1]); // "one" === "one" + * + * let map = Map(obj); + * assert.notEqual(map.get("1"), map.get(1)); // "one" !== undefined + * ``` + * + * Property access for JavaScript Objects first converts the key to a string, + * but since Immutable Map keys can be of any type the argument to `get()` is + * not altered. + * + * [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter + * "Using the reviver parameter" + * [2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects + * "Working with array-like objects" + * [3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol + * "The iterable protocol" + */ + function fromJS( + jsValue: JSValue, + reviver?: undefined + ): FromJS; + function fromJS( + jsValue: unknown, + reviver?: ( + key: string | number, + sequence: Collection.Keyed | Collection.Indexed, + path?: Array + ) => unknown + ): Collection; + + type FromJS = JSValue extends FromJSNoTransform + ? JSValue + : JSValue extends Array + ? FromJSArray + : JSValue extends {} + ? FromJSObject + : any; + + type FromJSNoTransform = + | Collection + | number + | string + | null + | undefined; + + type FromJSArray = JSValue extends Array + ? List> + : never; + + type FromJSObject = JSValue extends {} + ? Map> + : never; + + /** + * Value equality check with semantics similar to `Object.is`, but treats + * Immutable `Collection`s as values, equal if the second `Collection` includes + * equivalent values. + * + * It's used throughout Immutable when checking for equality, including `Map` + * key equality and `Set` membership. + * + * + * ```js + * const { Map, is } = require('immutable') + * const map1 = Map({ a: 1, b: 1, c: 1 }) + * const map2 = Map({ a: 1, b: 1, c: 1 }) + * assert.equal(map1 !== map2, true) + * assert.equal(Object.is(map1, map2), false) + * assert.equal(is(map1, map2), true) + * ``` + * + * `is()` compares primitive types like strings and numbers, Immutable.js + * collections like `Map` and `List`, but also any custom object which + * implements `ValueObject` by providing `equals()` and `hashCode()` methods. + * + * Note: Unlike `Object.is`, `Immutable.is` assumes `0` and `-0` are the same + * value, matching the behavior of ES6 Map key equality. + */ + function is(first: unknown, second: unknown): boolean; + + /** + * The `hash()` function is an important part of how Immutable determines if + * two values are equivalent and is used to determine how to store those + * values. Provided with any value, `hash()` will return a 31-bit integer. + * + * When designing Objects which may be equal, it's important that when a + * `.equals()` method returns true, that both values `.hashCode()` method + * return the same value. `hash()` may be used to produce those values. + * + * For non-Immutable Objects that do not provide a `.hashCode()` functions + * (including plain Objects, plain Arrays, Date objects, etc), a unique hash + * value will be created for each *instance*. That is, the create hash + * represents referential equality, and not value equality for Objects. This + * ensures that if that Object is mutated over time that its hash code will + * remain consistent, allowing Objects to be used as keys and values in + * Immutable.js collections. + * + * Note that `hash()` attempts to balance between speed and avoiding + * collisions, however it makes no attempt to produce secure hashes. + * + * *New in Version 4.0* + */ + function hash(value: unknown): number; + + /** + * True if `maybeImmutable` is an Immutable Collection or Record. + * + * Note: Still returns true even if the collections is within a `withMutations()`. + * + * + * ```js + * const { isImmutable, Map, List, Stack } = require('immutable'); + * isImmutable([]); // false + * isImmutable({}); // false + * isImmutable(Map()); // true + * isImmutable(List()); // true + * isImmutable(Stack()); // true + * isImmutable(Map().asMutable()); // true + * ``` + */ + function isImmutable( + maybeImmutable: unknown + ): maybeImmutable is Collection; + + /** + * True if `maybeCollection` is a Collection, or any of its subclasses. + * + * + * ```js + * const { isCollection, Map, List, Stack } = require('immutable'); + * isCollection([]); // false + * isCollection({}); // false + * isCollection(Map()); // true + * isCollection(List()); // true + * isCollection(Stack()); // true + * ``` + */ + function isCollection( + maybeCollection: unknown + ): maybeCollection is Collection; + + /** + * True if `maybeKeyed` is a Collection.Keyed, or any of its subclasses. + * + * + * ```js + * const { isKeyed, Map, List, Stack } = require('immutable'); + * isKeyed([]); // false + * isKeyed({}); // false + * isKeyed(Map()); // true + * isKeyed(List()); // false + * isKeyed(Stack()); // false + * ``` + */ + function isKeyed( + maybeKeyed: unknown + ): maybeKeyed is Collection.Keyed; + + /** + * True if `maybeIndexed` is a Collection.Indexed, or any of its subclasses. + * + * + * ```js + * const { isIndexed, Map, List, Stack, Set } = require('immutable'); + * isIndexed([]); // false + * isIndexed({}); // false + * isIndexed(Map()); // false + * isIndexed(List()); // true + * isIndexed(Stack()); // true + * isIndexed(Set()); // false + * ``` + */ + function isIndexed( + maybeIndexed: unknown + ): maybeIndexed is Collection.Indexed; + + /** + * True if `maybeAssociative` is either a Keyed or Indexed Collection. + * + * + * ```js + * const { isAssociative, Map, List, Stack, Set } = require('immutable'); + * isAssociative([]); // false + * isAssociative({}); // false + * isAssociative(Map()); // true + * isAssociative(List()); // true + * isAssociative(Stack()); // true + * isAssociative(Set()); // false + * ``` + */ + function isAssociative( + maybeAssociative: unknown + ): maybeAssociative is + | Collection.Keyed + | Collection.Indexed; + + /** + * True if `maybeOrdered` is a Collection where iteration order is well + * defined. True for Collection.Indexed as well as OrderedMap and OrderedSet. + * + * + * ```js + * const { isOrdered, Map, OrderedMap, List, Set } = require('immutable'); + * isOrdered([]); // false + * isOrdered({}); // false + * isOrdered(Map()); // false + * isOrdered(OrderedMap()); // true + * isOrdered(List()); // true + * isOrdered(Set()); // false + * ``` + */ + function isOrdered(maybeOrdered: unknown): boolean; + + /** + * True if `maybeValue` is a JavaScript Object which has *both* `equals()` + * and `hashCode()` methods. + * + * Any two instances of *value objects* can be compared for value equality with + * `Immutable.is()` and can be used as keys in a `Map` or members in a `Set`. + */ + function isValueObject(maybeValue: unknown): maybeValue is ValueObject; + + /** + * True if `maybeSeq` is a Seq. + */ + function isSeq( + maybeSeq: unknown + ): maybeSeq is + | Seq.Indexed + | Seq.Keyed + | Seq.Set; + + /** + * True if `maybeList` is a List. + */ + function isList(maybeList: unknown): maybeList is List; + + /** + * True if `maybeMap` is a Map. + * + * Also true for OrderedMaps. + */ + function isMap(maybeMap: unknown): maybeMap is Map; + + /** + * True if `maybeOrderedMap` is an OrderedMap. + */ + function isOrderedMap( + maybeOrderedMap: unknown + ): maybeOrderedMap is OrderedMap; + + /** + * True if `maybeStack` is a Stack. + */ + function isStack(maybeStack: unknown): maybeStack is Stack; + + /** + * True if `maybeSet` is a Set. + * + * Also true for OrderedSets. + */ + function isSet(maybeSet: unknown): maybeSet is Set; + + /** + * True if `maybeOrderedSet` is an OrderedSet. + */ + function isOrderedSet( + maybeOrderedSet: unknown + ): maybeOrderedSet is OrderedSet; + + /** + * True if `maybeRecord` is a Record. + */ + function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>; + + /** + * Returns the value within the provided collection associated with the + * provided key, or notSetValue if the key is not defined in the collection. + * + * A functional alternative to `collection.get(key)` which will also work on + * plain Objects and Arrays as an alternative for `collection[key]`. + * + * + * ```js + * const { get } = require('immutable') + * get([ 'dog', 'frog', 'cat' ], 2) // 'frog' + * get({ x: 123, y: 456 }, 'x') // 123 + * get({ x: 123, y: 456 }, 'z', 'ifNotSet') // 'ifNotSet' + * ``` + */ + function get(collection: Collection, key: K): V | undefined; + function get( + collection: Collection, + key: K, + notSetValue: NSV + ): V | NSV; + function get( + record: Record, + key: K, + notSetValue: unknown + ): TProps[K]; + function get(collection: Array, key: number): V | undefined; + function get( + collection: Array, + key: number, + notSetValue: NSV + ): V | NSV; + function get( + object: C, + key: K, + notSetValue: unknown + ): C[K]; + function get(collection: { [key: string]: V }, key: string): V | undefined; + function get( + collection: { [key: string]: V }, + key: string, + notSetValue: NSV + ): V | NSV; + + /** + * Returns true if the key is defined in the provided collection. + * + * A functional alternative to `collection.has(key)` which will also work with + * plain Objects and Arrays as an alternative for + * `collection.hasOwnProperty(key)`. + * + * + * ```js + * const { has } = require('immutable') + * has([ 'dog', 'frog', 'cat' ], 2) // true + * has([ 'dog', 'frog', 'cat' ], 5) // false + * has({ x: 123, y: 456 }, 'x') // true + * has({ x: 123, y: 456 }, 'z') // false + * ``` + */ + function has(collection: object, key: unknown): boolean; + + /** + * Returns a copy of the collection with the value at key removed. + * + * A functional alternative to `collection.remove(key)` which will also work + * with plain Objects and Arrays as an alternative for + * `delete collectionCopy[key]`. + * + * + * ```js + * const { remove } = require('immutable') + * const originalArray = [ 'dog', 'frog', 'cat' ] + * remove(originalArray, 1) // [ 'dog', 'cat' ] + * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] + * const originalObject = { x: 123, y: 456 } + * remove(originalObject, 'x') // { y: 456 } + * console.log(originalObject) // { x: 123, y: 456 } + * ``` + */ + function remove>( + collection: C, + key: K + ): C; + function remove< + TProps extends object, + C extends Record, + K extends keyof TProps + >(collection: C, key: K): C; + function remove>(collection: C, key: number): C; + function remove(collection: C, key: K): C; + function remove( + collection: C, + key: K + ): C; + + /** + * Returns a copy of the collection with the value at key set to the provided + * value. + * + * A functional alternative to `collection.set(key, value)` which will also + * work with plain Objects and Arrays as an alternative for + * `collectionCopy[key] = value`. + * + * + * ```js + * const { set } = require('immutable') + * const originalArray = [ 'dog', 'frog', 'cat' ] + * set(originalArray, 1, 'cow') // [ 'dog', 'cow', 'cat' ] + * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] + * const originalObject = { x: 123, y: 456 } + * set(originalObject, 'x', 789) // { x: 789, y: 456 } + * console.log(originalObject) // { x: 123, y: 456 } + * ``` + */ + function set>( + collection: C, + key: K, + value: V + ): C; + function set< + TProps extends object, + C extends Record, + K extends keyof TProps + >(record: C, key: K, value: TProps[K]): C; + function set>(collection: C, key: number, value: V): C; + function set(object: C, key: K, value: C[K]): C; + function set( + collection: C, + key: string, + value: V + ): C; + + /** + * Returns a copy of the collection with the value at key set to the result of + * providing the existing value to the updating function. + * + * A functional alternative to `collection.update(key, fn)` which will also + * work with plain Objects and Arrays as an alternative for + * `collectionCopy[key] = fn(collection[key])`. + * + * + * ```js + * const { update } = require('immutable') + * const originalArray = [ 'dog', 'frog', 'cat' ] + * update(originalArray, 1, val => val.toUpperCase()) // [ 'dog', 'FROG', 'cat' ] + * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] + * const originalObject = { x: 123, y: 456 } + * update(originalObject, 'x', val => val * 6) // { x: 738, y: 456 } + * console.log(originalObject) // { x: 123, y: 456 } + * ``` + */ + function update>( + collection: C, + key: K, + updater: (value: V | undefined) => V | undefined + ): C; + function update, NSV>( + collection: C, + key: K, + notSetValue: NSV, + updater: (value: V | NSV) => V + ): C; + function update< + TProps extends object, + C extends Record, + K extends keyof TProps + >(record: C, key: K, updater: (value: TProps[K]) => TProps[K]): C; + function update< + TProps extends object, + C extends Record, + K extends keyof TProps, + NSV + >( + record: C, + key: K, + notSetValue: NSV, + updater: (value: TProps[K] | NSV) => TProps[K] + ): C; + function update( + collection: Array, + key: number, + updater: (value: V | undefined) => V | undefined + ): Array; + function update( + collection: Array, + key: number, + notSetValue: NSV, + updater: (value: V | NSV) => V + ): Array; + function update( + object: C, + key: K, + updater: (value: C[K]) => C[K] + ): C; + function update( + object: C, + key: K, + notSetValue: NSV, + updater: (value: C[K] | NSV) => C[K] + ): C; + function update( + collection: C, + key: K, + updater: (value: V) => V + ): { [key: string]: V }; + function update( + collection: C, + key: K, + notSetValue: NSV, + updater: (value: V | NSV) => V + ): { [key: string]: V }; + + /** + * Returns the value at the provided key path starting at the provided + * collection, or notSetValue if the key path is not defined. + * + * A functional alternative to `collection.getIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { getIn } = require('immutable') + * getIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // 123 + * getIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p'], 'ifNotSet') // 'ifNotSet' + * ``` + */ + function getIn( + collection: unknown, + keyPath: Iterable, + notSetValue?: unknown + ): unknown; + + /** + * Returns true if the key path is defined in the provided collection. + * + * A functional alternative to `collection.hasIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { hasIn } = require('immutable') + * hasIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // true + * hasIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p']) // false + * ``` + */ + function hasIn(collection: unknown, keyPath: Iterable): boolean; + + /** + * Returns a copy of the collection with the value at the key path removed. + * + * A functional alternative to `collection.removeIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { removeIn } = require('immutable') + * const original = { x: { y: { z: 123 }}} + * removeIn(original, ['x', 'y', 'z']) // { x: { y: {}}} + * console.log(original) // { x: { y: { z: 123 }}} + * ``` + */ + function removeIn(collection: C, keyPath: Iterable): C; + + /** + * Returns a copy of the collection with the value at the key path set to the + * provided value. + * + * A functional alternative to `collection.setIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { setIn } = require('immutable') + * const original = { x: { y: { z: 123 }}} + * setIn(original, ['x', 'y', 'z'], 456) // { x: { y: { z: 456 }}} + * console.log(original) // { x: { y: { z: 123 }}} + * ``` + */ + function setIn( + collection: C, + keyPath: Iterable, + value: unknown + ): C; + + /** + * Returns a copy of the collection with the value at key path set to the + * result of providing the existing value to the updating function. + * + * A functional alternative to `collection.updateIn(keypath)` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { updateIn } = require('immutable') + * const original = { x: { y: { z: 123 }}} + * updateIn(original, ['x', 'y', 'z'], val => val * 6) // { x: { y: { z: 738 }}} + * console.log(original) // { x: { y: { z: 123 }}} + * ``` + */ + function updateIn( + collection: C, + keyPath: Iterable, + updater: (value: unknown) => unknown + ): C; + function updateIn( + collection: C, + keyPath: Iterable, + notSetValue: unknown, + updater: (value: unknown) => unknown + ): C; + + /** + * Returns a copy of the collection with the remaining collections merged in. + * + * A functional alternative to `collection.merge()` which will also work with + * plain Objects and Arrays. + * + * + * ```js + * const { merge } = require('immutable') + * const original = { x: 123, y: 456 } + * merge(original, { y: 789, z: 'abc' }) // { x: 123, y: 789, z: 'abc' } + * console.log(original) // { x: 123, y: 456 } + * ``` + */ + function merge( + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; + + /** + * Returns a copy of the collection with the remaining collections merged in, + * calling the `merger` function whenever an existing value is encountered. + * + * A functional alternative to `collection.mergeWith()` which will also work + * with plain Objects and Arrays. + * + * + * ```js + * const { mergeWith } = require('immutable') + * const original = { x: 123, y: 456 } + * mergeWith( + * (oldVal, newVal) => oldVal + newVal, + * original, + * { y: 789, z: 'abc' } + * ) // { x: 123, y: 1245, z: 'abc' } + * console.log(original) // { x: 123, y: 456 } + * ``` + */ + function mergeWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; + + /** + * Like `merge()`, but when two compatible collections are encountered with + * the same key, it merges them as well, recursing deeply through the nested + * data. Two collections are considered to be compatible (and thus will be + * merged together) if they both fall into one of three categories: keyed + * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and + * arrays), or set-like (e.g., `Set`s). If they fall into separate + * categories, `mergeDeep` will replace the existing collection with the + * collection being merged in. This behavior can be customized by using + * `mergeDeepWith()`. + * + * Note: Indexed and set-like collections are merged using + * `concat()`/`union()` and therefore do not recurse. + * + * A functional alternative to `collection.mergeDeep()` which will also work + * with plain Objects and Arrays. + * + * + * ```js + * const { mergeDeep } = require('immutable') + * const original = { x: { y: 123 }} + * mergeDeep(original, { x: { z: 456 }}) // { x: { y: 123, z: 456 }} + * console.log(original) // { x: { y: 123 }} + * ``` + */ + function mergeDeep( + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; + + /** + * Like `mergeDeep()`, but when two non-collections or incompatible + * collections are encountered at the same key, it uses the `merger` function + * to determine the resulting value. Collections are considered incompatible + * if they fall into separate categories between keyed, indexed, and set-like. + * + * A functional alternative to `collection.mergeDeepWith()` which will also + * work with plain Objects and Arrays. + * + * + * ```js + * const { mergeDeepWith } = require('immutable') + * const original = { x: { y: 123 }} + * mergeDeepWith( + * (oldVal, newVal) => oldVal + newVal, + * original, + * { x: { y: 456 }} + * ) // { x: { y: 579 }} + * console.log(original) // { x: { y: 123 }} + * ``` + */ + function mergeDeepWith( + merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, + collection: C, + ...collections: Array< + | Iterable + | Iterable<[unknown, unknown]> + | { [key: string]: unknown } + > + ): C; +} + +/** + * Defines the main export of the immutable module to be the Immutable namespace + * This supports many common module import patterns: + * + * const Immutable = require("immutable"); + * const { List } = require("immutable"); + * import Immutable from "immutable"; + * import * as Immutable from "immutable"; + * import { List } from "immutable"; + * + */ +export = Immutable; + +/** + * A global "Immutable" namespace used by UMD modules which allows the use of + * the full Immutable API. + * + * If using Immutable as an imported module, prefer using: + * + * import Immutable from 'immutable' + * + */ +export as namespace Immutable; diff --git a/node_modules/immutable/dist/immutable.es.js b/node_modules/immutable/dist/immutable.es.js new file mode 100644 index 0000000..30f5e00 --- /dev/null +++ b/node_modules/immutable/dist/immutable.es.js @@ -0,0 +1,5988 @@ +/** + * MIT License + * + * Copyright (c) 2014-present, Lee Byron and other contributors. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +var DELETE = 'delete'; + +// Constants describing the size of trie nodes. +var SHIFT = 5; // Resulted in best performance after ______? +var SIZE = 1 << SHIFT; +var MASK = SIZE - 1; + +// A consistent shared value representing "not set" which equals nothing other +// than itself, and nothing that could be provided externally. +var NOT_SET = {}; + +// Boolean references, Rough equivalent of `bool &`. +function MakeRef() { + return { value: false }; +} + +function SetRef(ref) { + if (ref) { + ref.value = true; + } +} + +// A function which returns a value representing an "owner" for transient writes +// to tries. The return value will only ever equal itself, and will not equal +// the return of any subsequent call of this function. +function OwnerID() {} + +function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; +} + +function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; +} + +function returnTrue() { + return true; +} + +function wholeSlice(begin, end, size) { + return ( + ((begin === 0 && !isNeg(begin)) || + (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)) + ); +} + +function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); +} + +function resolveEnd(end, size) { + return resolveIndex(end, size, size); +} + +function resolveIndex(index, size, defaultIndex) { + // Sanitize indices using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + return index === undefined + ? defaultIndex + : isNeg(index) + ? size === Infinity + ? size + : Math.max(0, size + index) | 0 + : size === undefined || size === index + ? index + : Math.min(size, index) | 0; +} + +function isNeg(value) { + // Account for -0 which is negative, but not less than 0. + return value < 0 || (value === 0 && 1 / value === -Infinity); +} + +var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@'; + +function isCollection(maybeCollection) { + return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]); +} + +var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@'; + +function isKeyed(maybeKeyed) { + return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]); +} + +var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@'; + +function isIndexed(maybeIndexed) { + return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]); +} + +function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); +} + +var Collection = function Collection(value) { + // eslint-disable-next-line no-constructor-return + return isCollection(value) ? value : Seq(value); +}; + +var KeyedCollection = /*@__PURE__*/(function (Collection) { + function KeyedCollection(value) { + // eslint-disable-next-line no-constructor-return + return isKeyed(value) ? value : KeyedSeq(value); + } + + if ( Collection ) KeyedCollection.__proto__ = Collection; + KeyedCollection.prototype = Object.create( Collection && Collection.prototype ); + KeyedCollection.prototype.constructor = KeyedCollection; + + return KeyedCollection; +}(Collection)); + +var IndexedCollection = /*@__PURE__*/(function (Collection) { + function IndexedCollection(value) { + // eslint-disable-next-line no-constructor-return + return isIndexed(value) ? value : IndexedSeq(value); + } + + if ( Collection ) IndexedCollection.__proto__ = Collection; + IndexedCollection.prototype = Object.create( Collection && Collection.prototype ); + IndexedCollection.prototype.constructor = IndexedCollection; + + return IndexedCollection; +}(Collection)); + +var SetCollection = /*@__PURE__*/(function (Collection) { + function SetCollection(value) { + // eslint-disable-next-line no-constructor-return + return isCollection(value) && !isAssociative(value) ? value : SetSeq(value); + } + + if ( Collection ) SetCollection.__proto__ = Collection; + SetCollection.prototype = Object.create( Collection && Collection.prototype ); + SetCollection.prototype.constructor = SetCollection; + + return SetCollection; +}(Collection)); + +Collection.Keyed = KeyedCollection; +Collection.Indexed = IndexedCollection; +Collection.Set = SetCollection; + +var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@'; + +function isSeq(maybeSeq) { + return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]); +} + +var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'; + +function isRecord(maybeRecord) { + return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]); +} + +function isImmutable(maybeImmutable) { + return isCollection(maybeImmutable) || isRecord(maybeImmutable); +} + +var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@'; + +function isOrdered(maybeOrdered) { + return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]); +} + +var ITERATE_KEYS = 0; +var ITERATE_VALUES = 1; +var ITERATE_ENTRIES = 2; + +var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; + +var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + +var Iterator = function Iterator(next) { + this.next = next; +}; + +Iterator.prototype.toString = function toString () { + return '[Iterator]'; +}; + +Iterator.KEYS = ITERATE_KEYS; +Iterator.VALUES = ITERATE_VALUES; +Iterator.ENTRIES = ITERATE_ENTRIES; + +Iterator.prototype.inspect = Iterator.prototype.toSource = function () { + return this.toString(); +}; +Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; +}; + +function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult + ? (iteratorResult.value = value) + : (iteratorResult = { + value: value, + done: false, + }); + return iteratorResult; +} + +function iteratorDone() { + return { value: undefined, done: true }; +} + +function hasIterator(maybeIterable) { + if (Array.isArray(maybeIterable)) { + // IE11 trick as it does not support `Symbol.iterator` + return true; + } + + return !!getIteratorFn(maybeIterable); +} + +function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; +} + +function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); +} + +function getIteratorFn(iterable) { + var iteratorFn = + iterable && + ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || + iterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +function isEntriesIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.entries; +} + +function isKeysIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.keys; +} + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function isArrayLike(value) { + if (Array.isArray(value) || typeof value === 'string') { + return true; + } + + return ( + value && + typeof value === 'object' && + Number.isInteger(value.length) && + value.length >= 0 && + (value.length === 0 + ? // Only {length: 0} is considered Array-like. + Object.keys(value).length === 1 + : // An object is only Array-like if it has a property where the last value + // in the array-like may be found (which could be undefined). + value.hasOwnProperty(value.length - 1)) + ); +} + +var Seq = /*@__PURE__*/(function (Collection) { + function Seq(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySequence() + : isImmutable(value) + ? value.toSeq() + : seqFromValue(value); + } + + if ( Collection ) Seq.__proto__ = Collection; + Seq.prototype = Object.create( Collection && Collection.prototype ); + Seq.prototype.constructor = Seq; + + Seq.prototype.toSeq = function toSeq () { + return this; + }; + + Seq.prototype.toString = function toString () { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function cacheResult () { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function __iterate (fn, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + while (i !== size) { + var entry = cache[reverse ? size - ++i : i++]; + if (fn(entry[1], entry[0], this) === false) { + break; + } + } + return i; + } + return this.__iterateUncached(fn, reverse); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function __iterator (type, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var entry = cache[reverse ? size - ++i : i++]; + return iteratorValue(type, entry[0], entry[1]); + }); + } + return this.__iteratorUncached(type, reverse); + }; + + return Seq; +}(Collection)); + +var KeyedSeq = /*@__PURE__*/(function (Seq) { + function KeyedSeq(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySequence().toKeyedSeq() + : isCollection(value) + ? isKeyed(value) + ? value.toSeq() + : value.fromEntrySeq() + : isRecord(value) + ? value.toSeq() + : keyedSeqFromValue(value); + } + + if ( Seq ) KeyedSeq.__proto__ = Seq; + KeyedSeq.prototype = Object.create( Seq && Seq.prototype ); + KeyedSeq.prototype.constructor = KeyedSeq; + + KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () { + return this; + }; + + return KeyedSeq; +}(Seq)); + +var IndexedSeq = /*@__PURE__*/(function (Seq) { + function IndexedSeq(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySequence() + : isCollection(value) + ? isKeyed(value) + ? value.entrySeq() + : value.toIndexedSeq() + : isRecord(value) + ? value.toSeq().entrySeq() + : indexedSeqFromValue(value); + } + + if ( Seq ) IndexedSeq.__proto__ = Seq; + IndexedSeq.prototype = Object.create( Seq && Seq.prototype ); + IndexedSeq.prototype.constructor = IndexedSeq; + + IndexedSeq.of = function of (/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () { + return this; + }; + + IndexedSeq.prototype.toString = function toString () { + return this.__toString('Seq [', ']'); + }; + + return IndexedSeq; +}(Seq)); + +var SetSeq = /*@__PURE__*/(function (Seq) { + function SetSeq(value) { + // eslint-disable-next-line no-constructor-return + return ( + isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value) + ).toSetSeq(); + } + + if ( Seq ) SetSeq.__proto__ = Seq; + SetSeq.prototype = Object.create( Seq && Seq.prototype ); + SetSeq.prototype.constructor = SetSeq; + + SetSeq.of = function of (/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function toSetSeq () { + return this; + }; + + return SetSeq; +}(Seq)); + +Seq.isSeq = isSeq; +Seq.Keyed = KeyedSeq; +Seq.Set = SetSeq; +Seq.Indexed = IndexedSeq; + +Seq.prototype[IS_SEQ_SYMBOL] = true; + +// #pragma Root Sequences + +var ArraySeq = /*@__PURE__*/(function (IndexedSeq) { + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq; + ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ArraySeq.prototype.constructor = ArraySeq; + + ArraySeq.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function __iterate (fn, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + while (i !== size) { + var ii = reverse ? size - ++i : i++; + if (fn(array[ii], ii, this) === false) { + break; + } + } + return i; + }; + + ArraySeq.prototype.__iterator = function __iterator (type, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var ii = reverse ? size - ++i : i++; + return iteratorValue(type, ii, array[ii]); + }); + }; + + return ArraySeq; +}(IndexedSeq)); + +var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) { + function ObjectSeq(object) { + var keys = Object.keys(object).concat( + Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [] + ); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq; + ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ObjectSeq.prototype.constructor = ObjectSeq; + + ObjectSeq.prototype.get = function get (key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function has (key) { + return hasOwnProperty.call(this._object, key); + }; + + ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + while (i !== size) { + var key = keys[reverse ? size - ++i : i++]; + if (fn(object[key], key, this) === false) { + break; + } + } + return i; + }; + + ObjectSeq.prototype.__iterator = function __iterator (type, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var key = keys[reverse ? size - ++i : i++]; + return iteratorValue(type, key, object[key]); + }); + }; + + return ObjectSeq; +}(KeyedSeq)); +ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true; + +var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) { + function CollectionSeq(collection) { + this._collection = collection; + this.size = collection.length || collection.size; + } + + if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq; + CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + CollectionSeq.prototype.constructor = CollectionSeq; + + CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + return CollectionSeq; +}(IndexedSeq)); + +// # pragma Helper functions + +var EMPTY_SEQ; + +function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); +} + +function keyedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq.fromEntrySeq(); + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of [k, v] entries, or keyed object: ' + + value + ); +} + +function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq; + } + throw new TypeError( + 'Expected Array or collection object of values: ' + value + ); +} + +function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return isEntriesIterable(value) + ? seq.fromEntrySeq() + : isKeysIterable(value) + ? seq.toSetSeq() + : seq; + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of values, or keyed object: ' + value + ); +} + +function maybeIndexedSeqFromValue(value) { + return isArrayLike(value) + ? new ArraySeq(value) + : hasIterator(value) + ? new CollectionSeq(value) + : undefined; +} + +var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@'; + +function isMap(maybeMap) { + return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]); +} + +function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); +} + +function isValueObject(maybeValue) { + return Boolean( + maybeValue && + typeof maybeValue.equals === 'function' && + typeof maybeValue.hashCode === 'function' + ); +} + +/** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections are Value Objects: they implement `equals()` + * and `hashCode()`. + */ +function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if ( + typeof valueA.valueOf === 'function' && + typeof valueB.valueOf === 'function' + ) { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + return !!( + isValueObject(valueA) && + isValueObject(valueB) && + valueA.equals(valueB) + ); +} + +var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 + ? Math.imul + : function imul(a, b) { + a |= 0; // int + b |= 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int + }; + +// v8 has an optimization for storing 31-bit signed numbers. +// Values which have either 00 or 11 as the high order bits qualify. +// This function drops the highest order bit in a signed number, maintaining +// the sign bit. +function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); +} + +var defaultValueOf = Object.prototype.valueOf; + +function hash(o) { + if (o == null) { + return hashNullish(o); + } + + if (typeof o.hashCode === 'function') { + // Drop any high bits from accidentally long hash codes. + return smi(o.hashCode(o)); + } + + var v = valueOf(o); + + if (v == null) { + return hashNullish(v); + } + + switch (typeof v) { + case 'boolean': + // The hash values for built-in constants are a 1 value for each 5-byte + // shift region expect for the first, which encodes the value. This + // reduces the odds of a hash collision for these common values. + return v ? 0x42108421 : 0x42108420; + case 'number': + return hashNumber(v); + case 'string': + return v.length > STRING_HASH_CACHE_MIN_STRLEN + ? cachedHashString(v) + : hashString(v); + case 'object': + case 'function': + return hashJSObj(v); + case 'symbol': + return hashSymbol(v); + default: + if (typeof v.toString === 'function') { + return hashString(v.toString()); + } + throw new Error('Value type ' + typeof v + ' cannot be hashed.'); + } +} + +function hashNullish(nullish) { + return nullish === null ? 0x42108422 : /* undefined */ 0x42108423; +} + +// Compress arbitrarily large numbers into smi hashes. +function hashNumber(n) { + if (n !== n || n === Infinity) { + return 0; + } + var hash = n | 0; + if (hash !== n) { + hash ^= n * 0xffffffff; + } + while (n > 0xffffffff) { + n /= 0xffffffff; + hash ^= n; + } + return smi(hash); +} + +function cachedHashString(string) { + var hashed = stringHashCache[string]; + if (hashed === undefined) { + hashed = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hashed; + } + return hashed; +} + +// http://jsperf.com/hashing-strings +function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hashed = 0; + for (var ii = 0; ii < string.length; ii++) { + hashed = (31 * hashed + string.charCodeAt(ii)) | 0; + } + return smi(hashed); +} + +function hashSymbol(sym) { + var hashed = symbolMap[sym]; + if (hashed !== undefined) { + return hashed; + } + + hashed = nextHash(); + + symbolMap[sym] = hashed; + + return hashed; +} + +function hashJSObj(obj) { + var hashed; + if (usingWeakMap) { + hashed = weakMap.get(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = obj[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + if (!canDefineProperty) { + hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + hashed = getIENodeHash(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = nextHash(); + + if (usingWeakMap) { + weakMap.set(obj, hashed); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + enumerable: false, + configurable: false, + writable: false, + value: hashed, + }); + } else if ( + obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable + ) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function () { + return this.constructor.prototype.propertyIsEnumerable.apply( + this, + arguments + ); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hashed; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hashed; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hashed; +} + +// Get references to ES5 object methods. +var isExtensible = Object.isExtensible; + +// True if Object.defineProperty works as expected. IE8 fails this test. +var canDefineProperty = (function () { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } +})(); + +// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it +// and avoid memory leaks from the IE cloneNode bug. +function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } +} + +function valueOf(obj) { + return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function' + ? obj.valueOf(obj) + : obj; +} + +function nextHash() { + var nextHash = ++_objHashUID; + if (_objHashUID & 0x40000000) { + _objHashUID = 0; + } + return nextHash; +} + +// If possible, use a WeakMap. +var usingWeakMap = typeof WeakMap === 'function'; +var weakMap; +if (usingWeakMap) { + weakMap = new WeakMap(); +} + +var symbolMap = Object.create(null); + +var _objHashUID = 0; + +var UID_HASH_KEY = '__immutablehash__'; +if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); +} + +var STRING_HASH_CACHE_MIN_STRLEN = 16; +var STRING_HASH_CACHE_MAX_SIZE = 255; +var STRING_HASH_CACHE_SIZE = 0; +var stringHashCache = {}; + +var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) { + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq; + ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ToKeyedSequence.prototype.constructor = ToKeyedSequence; + + ToKeyedSequence.prototype.get = function get (key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function has (key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function valueSeq () { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function reverse () { + var this$1$1 = this; + + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); }; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); }; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse); + }; + + ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) { + return this._iter.__iterator(type, reverse); + }; + + return ToKeyedSequence; +}(KeyedSeq)); +ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true; + +var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) { + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq; + ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ToIndexedSequence.prototype.constructor = ToIndexedSequence; + + ToIndexedSequence.prototype.includes = function includes (value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(this); + return this._iter.__iterate( + function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); }, + reverse + ); + }; + + ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var i = 0; + reverse && ensureSize(this); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue( + type, + reverse ? this$1$1.size - ++i : i++, + step.value, + step + ); + }); + }; + + return ToIndexedSequence; +}(IndexedSeq)); + +var ToSetSequence = /*@__PURE__*/(function (SetSeq) { + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( SetSeq ) ToSetSequence.__proto__ = SetSeq; + ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype ); + ToSetSequence.prototype.constructor = ToSetSequence; + + ToSetSequence.prototype.has = function has (key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse); + }; + + ToSetSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue(type, step.value, step.value, step); + }); + }; + + return ToSetSequence; +}(SetSeq)); + +var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) { + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq; + FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + FromEntriesSequence.prototype.constructor = FromEntriesSequence; + + FromEntriesSequence.prototype.entrySeq = function entrySeq () { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (entry) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return fn( + indexedCollection ? entry.get(1) : entry[1], + indexedCollection ? entry.get(0) : entry[0], + this$1$1 + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return iteratorValue( + type, + indexedCollection ? entry.get(0) : entry[0], + indexedCollection ? entry.get(1) : entry[1], + step + ); + } + } + }); + }; + + return FromEntriesSequence; +}(KeyedSeq)); + +ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + +function flipFactory(collection) { + var flipSequence = makeSequence(collection); + flipSequence._iter = collection; + flipSequence.size = collection.size; + flipSequence.flip = function () { return collection; }; + flipSequence.reverse = function () { + var reversedSequence = collection.reverse.apply(this); // super.reverse() + reversedSequence.flip = function () { return collection.reverse(); }; + return reversedSequence; + }; + flipSequence.has = function (key) { return collection.includes(key); }; + flipSequence.includes = function (key) { return collection.has(key); }; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse); + }; + flipSequence.__iteratorUncached = function (type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = collection.__iterator(type, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return collection.__iterator( + type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, + reverse + ); + }; + return flipSequence; +} + +function mapFactory(collection, mapper, context) { + var mappedSequence = makeSequence(collection); + mappedSequence.size = collection.size; + mappedSequence.has = function (key) { return collection.has(key); }; + mappedSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v === NOT_SET + ? notSetValue + : mapper.call(context, v, key, collection); + }; + mappedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate( + function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; }, + reverse + ); + }; + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue( + type, + key, + mapper.call(context, entry[1], key, collection), + step + ); + }); + }; + return mappedSequence; +} + +function reverseFactory(collection, useKeys) { + var this$1$1 = this; + + var reversedSequence = makeSequence(collection); + reversedSequence._iter = collection; + reversedSequence.size = collection.size; + reversedSequence.reverse = function () { return collection; }; + if (collection.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(collection); + flipSequence.reverse = function () { return collection.flip(); }; + return flipSequence; + }; + } + reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); }; + reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); }; + reversedSequence.includes = function (value) { return collection.includes(value); }; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(collection); + return collection.__iterate( + function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); }, + !reverse + ); + }; + reversedSequence.__iterator = function (type, reverse) { + var i = 0; + reverse && ensureSize(collection); + var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + return iteratorValue( + type, + useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++, + entry[1], + step + ); + }); + }; + return reversedSequence; +} + +function filterFactory(collection, predicate, context, useKeys) { + var filterSequence = makeSequence(collection); + if (useKeys) { + filterSequence.has = function (key) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, collection); + }; + filterSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, collection) + ? v + : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, collection)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + }; + return filterSequence; +} + +function countByFactory(collection, grouper, context) { + var groups = Map().asMutable(); + collection.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; }); + }); + return groups.asImmutable(); +} + +function groupByFactory(collection, grouper, context) { + var isKeyedIter = isKeyed(collection); + var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable(); + collection.__iterate(function (v, k) { + groups.update( + grouper.call(context, v, k, collection), + function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); } + ); + }); + var coerce = collectionClass(collection); + return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable(); +} + +function partitionFactory(collection, predicate, context) { + var isKeyedIter = isKeyed(collection); + var groups = [[], []]; + collection.__iterate(function (v, k) { + groups[predicate.call(context, v, k, collection) ? 1 : 0].push( + isKeyedIter ? [k, v] : v + ); + }); + var coerce = collectionClass(collection); + return groups.map(function (arr) { return reify(collection, coerce(arr)); }); +} + +function sliceFactory(collection, begin, end, useKeys) { + var originalSize = collection.size; + + if (wholeSlice(begin, end, originalSize)) { + return collection; + } + + // begin or end can not be resolved if they were provided as negative numbers and + // this collection's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (typeof originalSize === 'undefined' && (begin < 0 || end < 0)) { + return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys); + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(collection); + + // If collection.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = + sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined; + + if (!useKeys && isSeq(collection) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize + ? collection.get(index + resolvedBegin, notSetValue) + : notSetValue; + }; + } + + sliceSeq.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return ( + fn(v, useKeys ? k : iterations - 1, this$1$1) !== false && + iterations !== sliceSize + ); + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function (type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + if (sliceSize === 0) { + return new Iterator(iteratorDone); + } + var iterator = collection.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function () { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES || step.done) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } + return iteratorValue(type, iterations - 1, step.value[1], step); + }); + }; + + return sliceSeq; +} + +function takeWhileFactory(collection, predicate, context) { + var takeSequence = makeSequence(collection); + takeSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + collection.__iterate( + function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); } + ); + return iterations; + }; + takeSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function () { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$1$1)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return takeSequence; +} + +function skipWhileFactory(collection, predicate, context, useKeys) { + var skipSequence = makeSequence(collection); + skipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function () { + var step; + var k; + var v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } + return iteratorValue(type, iterations++, step.value[1], step); + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$1$1)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return skipSequence; +} + +function concatFactory(collection, values) { + var isKeyedCollection = isKeyed(collection); + var iters = [collection] + .concat(values) + .map(function (v) { + if (!isCollection(v)) { + v = isKeyedCollection + ? keyedSeqFromValue(v) + : indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedCollection) { + v = KeyedCollection(v); + } + return v; + }) + .filter(function (v) { return v.size !== 0; }); + + if (iters.length === 0) { + return collection; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if ( + singleton === collection || + (isKeyedCollection && isKeyed(singleton)) || + (isIndexed(collection) && isIndexed(singleton)) + ) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedCollection) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(collection)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce(function (sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, 0); + return concatSeq; +} + +function flattenFactory(collection, depth, useKeys) { + var flatSequence = makeSequence(collection); + flatSequence.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) { + iter.__iterate(function (v, k) { + if ((!depth || currentDepth < depth) && isCollection(v)) { + flatDeep(v, currentDepth + 1); + } else { + iterations++; + if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) { + stopped = true; + } + } + return !stopped; + }, reverse); + } + flatDeep(collection, 0); + return iterations; + }; + flatSequence.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function () { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isCollection(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + }; + return flatSequence; +} + +function flatMapFactory(collection, mapper, context) { + var coerce = collectionClass(collection); + return collection + .toSeq() + .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); }) + .flatten(true); +} + +function interposeFactory(collection, separator) { + var interposedSequence = makeSequence(collection); + interposedSequence.size = collection.size && collection.size * 2 - 1; + interposedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate( + function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) && + fn(v, iterations++, this$1$1) !== false; }, + reverse + ); + return iterations; + }; + interposedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function () { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 + ? iteratorValue(type, iterations++, separator) + : iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; +} + +function sortFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedCollection = isKeyed(collection); + var index = 0; + var entries = collection + .toSeq() + .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; }) + .valueSeq() + .toArray(); + entries + .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; }) + .forEach( + isKeyedCollection + ? function (v, i) { + entries[i].length = 2; + } + : function (v, i) { + entries[i] = v[1]; + } + ); + return isKeyedCollection + ? KeyedSeq(entries) + : isIndexed(collection) + ? IndexedSeq(entries) + : SetSeq(entries); +} + +function maxFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = collection + .toSeq() + .map(function (v, k) { return [v, mapper(v, k, collection)]; }) + .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); }); + return entry && entry[0]; + } + return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); }); +} + +function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return ( + (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || + comp > 0 + ); +} + +function zipWithFactory(keyIter, zipper, iters, zipAll) { + var zipSequence = makeSequence(keyIter); + var sizes = new ArraySeq(iters).map(function (i) { return i.size; }); + zipSequence.size = zipAll ? sizes.max() : sizes.min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function (fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function (type, reverse) { + var iterators = iters.map( + function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); } + ); + var iterations = 0; + var isDone = false; + return new Iterator(function () { + var steps; + if (!isDone) { + steps = iterators.map(function (i) { return i.next(); }); + isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; }); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply( + null, + steps.map(function (s) { return s.value; }) + ) + ); + }); + }; + return zipSequence; +} + +// #pragma Helper Functions + +function reify(iter, seq) { + return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq); +} + +function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } +} + +function collectionClass(collection) { + return isKeyed(collection) + ? KeyedCollection + : isIndexed(collection) + ? IndexedCollection + : SetCollection; +} + +function makeSequence(collection) { + return Object.create( + (isKeyed(collection) + ? KeyedSeq + : isIndexed(collection) + ? IndexedSeq + : SetSeq + ).prototype + ); +} + +function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } + return Seq.prototype.cacheResult.call(this); +} + +function defaultComparator(a, b) { + if (a === undefined && b === undefined) { + return 0; + } + + if (a === undefined) { + return 1; + } + + if (b === undefined) { + return -1; + } + + return a > b ? 1 : a < b ? -1 : 0; +} + +function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; +} + +function invariant(condition, error) { + if (!condition) { throw new Error(error); } +} + +function assertNotInfinite(size) { + invariant( + size !== Infinity, + 'Cannot perform this action with an infinite size.' + ); +} + +function coerceKeyPath(keyPath) { + if (isArrayLike(keyPath) && typeof keyPath !== 'string') { + return keyPath; + } + if (isOrdered(keyPath)) { + return keyPath.toArray(); + } + throw new TypeError( + 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath + ); +} + +var toString = Object.prototype.toString; + +function isPlainObject(value) { + // The base prototype's toString deals with Argument objects and native namespaces like Math + if ( + !value || + typeof value !== 'object' || + toString.call(value) !== '[object Object]' + ) { + return false; + } + + var proto = Object.getPrototypeOf(value); + if (proto === null) { + return true; + } + + // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc) + var parentProto = proto; + var nextProto = Object.getPrototypeOf(proto); + while (nextProto !== null) { + parentProto = nextProto; + nextProto = Object.getPrototypeOf(parentProto); + } + return parentProto === proto; +} + +/** + * Returns true if the value is a potentially-persistent data structure, either + * provided by Immutable.js or a plain Array or Object. + */ +function isDataStructure(value) { + return ( + typeof value === 'object' && + (isImmutable(value) || Array.isArray(value) || isPlainObject(value)) + ); +} + +function quoteString(value) { + try { + return typeof value === 'string' ? JSON.stringify(value) : String(value); + } catch (_ignoreError) { + return JSON.stringify(value); + } +} + +function has(collection, key) { + return isImmutable(collection) + ? collection.has(key) + : isDataStructure(collection) && hasOwnProperty.call(collection, key); +} + +function get(collection, key, notSetValue) { + return isImmutable(collection) + ? collection.get(key, notSetValue) + : !has(collection, key) + ? notSetValue + : typeof collection.get === 'function' + ? collection.get(key) + : collection[key]; +} + +function shallowCopy(from) { + if (Array.isArray(from)) { + return arrCopy(from); + } + var to = {}; + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + return to; +} + +function remove(collection, key) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.remove) { + throw new TypeError( + 'Cannot update immutable value without .remove() method: ' + collection + ); + } + return collection.remove(key); + } + if (!hasOwnProperty.call(collection, key)) { + return collection; + } + var collectionCopy = shallowCopy(collection); + if (Array.isArray(collectionCopy)) { + collectionCopy.splice(key, 1); + } else { + delete collectionCopy[key]; + } + return collectionCopy; +} + +function set(collection, key, value) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.set) { + throw new TypeError( + 'Cannot update immutable value without .set() method: ' + collection + ); + } + return collection.set(key, value); + } + if (hasOwnProperty.call(collection, key) && value === collection[key]) { + return collection; + } + var collectionCopy = shallowCopy(collection); + collectionCopy[key] = value; + return collectionCopy; +} + +function updateIn$1(collection, keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeeply( + isImmutable(collection), + collection, + coerceKeyPath(keyPath), + 0, + notSetValue, + updater + ); + return updatedValue === NOT_SET ? notSetValue : updatedValue; +} + +function updateInDeeply( + inImmutable, + existing, + keyPath, + i, + notSetValue, + updater +) { + var wasNotSet = existing === NOT_SET; + if (i === keyPath.length) { + var existingValue = wasNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + if (!wasNotSet && !isDataStructure(existing)) { + throw new TypeError( + 'Cannot update within non-data-structure value in path [' + + keyPath.slice(0, i).map(quoteString) + + ']: ' + + existing + ); + } + var key = keyPath[i]; + var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET); + var nextUpdated = updateInDeeply( + nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), + nextExisting, + keyPath, + i + 1, + notSetValue, + updater + ); + return nextUpdated === nextExisting + ? existing + : nextUpdated === NOT_SET + ? remove(existing, key) + : set( + wasNotSet ? (inImmutable ? emptyMap() : {}) : existing, + key, + nextUpdated + ); +} + +function setIn$1(collection, keyPath, value) { + return updateIn$1(collection, keyPath, NOT_SET, function () { return value; }); +} + +function setIn(keyPath, v) { + return setIn$1(this, keyPath, v); +} + +function removeIn(collection, keyPath) { + return updateIn$1(collection, keyPath, function () { return NOT_SET; }); +} + +function deleteIn(keyPath) { + return removeIn(this, keyPath); +} + +function update$1(collection, key, notSetValue, updater) { + return updateIn$1(collection, [key], notSetValue, updater); +} + +function update(key, notSetValue, updater) { + return arguments.length === 1 + ? key(this) + : update$1(this, key, notSetValue, updater); +} + +function updateIn(keyPath, notSetValue, updater) { + return updateIn$1(this, keyPath, notSetValue, updater); +} + +function merge$1() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeIntoKeyedWith(this, iters); +} + +function mergeWith$1(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + if (typeof merger !== 'function') { + throw new TypeError('Invalid merger function: ' + merger); + } + return mergeIntoKeyedWith(this, iters, merger); +} + +function mergeIntoKeyedWith(collection, collections, merger) { + var iters = []; + for (var ii = 0; ii < collections.length; ii++) { + var collection$1 = KeyedCollection(collections[ii]); + if (collection$1.size !== 0) { + iters.push(collection$1); + } + } + if (iters.length === 0) { + return collection; + } + if ( + collection.toSeq().size === 0 && + !collection.__ownerID && + iters.length === 1 + ) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function (collection) { + var mergeIntoCollection = merger + ? function (value, key) { + update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); } + ); + } + : function (value, key) { + collection.set(key, value); + }; + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoCollection); + } + }); +} + +function merge(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeWithSources(collection, sources); +} + +function mergeWith(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeWithSources(collection, sources, merger); +} + +function mergeDeep$1(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(collection, sources); +} + +function mergeDeepWith$1(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeDeepWithSources(collection, sources, merger); +} + +function mergeDeepWithSources(collection, sources, merger) { + return mergeWithSources(collection, sources, deepMergerWith(merger)); +} + +function mergeWithSources(collection, sources, merger) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot merge into non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + return typeof merger === 'function' && collection.mergeWith + ? collection.mergeWith.apply(collection, [ merger ].concat( sources )) + : collection.merge + ? collection.merge.apply(collection, sources) + : collection.concat.apply(collection, sources); + } + var isArray = Array.isArray(collection); + var merged = collection; + var Collection = isArray ? IndexedCollection : KeyedCollection; + var mergeItem = isArray + ? function (value) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged.push(value); + } + : function (value, key) { + var hasVal = hasOwnProperty.call(merged, key); + var nextVal = + hasVal && merger ? merger(merged[key], value, key) : value; + if (!hasVal || nextVal !== merged[key]) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged[key] = nextVal; + } + }; + for (var i = 0; i < sources.length; i++) { + Collection(sources[i]).forEach(mergeItem); + } + return merged; +} + +function deepMergerWith(merger) { + function deepMerger(oldValue, newValue, key) { + return isDataStructure(oldValue) && + isDataStructure(newValue) && + areMergeable(oldValue, newValue) + ? mergeWithSources(oldValue, [newValue], deepMerger) + : merger + ? merger(oldValue, newValue, key) + : newValue; + } + return deepMerger; +} + +/** + * It's unclear what the desired behavior is for merging two collections that + * fall into separate categories between keyed, indexed, or set-like, so we only + * consider them mergeable if they fall into the same category. + */ +function areMergeable(oldDataStructure, newDataStructure) { + var oldSeq = Seq(oldDataStructure); + var newSeq = Seq(newDataStructure); + // This logic assumes that a sequence can only fall into one of the three + // categories mentioned above (since there's no `isSetLike()` method). + return ( + isIndexed(oldSeq) === isIndexed(newSeq) && + isKeyed(oldSeq) === isKeyed(newSeq) + ); +} + +function mergeDeep() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeDeepWithSources(this, iters); +} + +function mergeDeepWith(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(this, iters, merger); +} + +function mergeIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); }); +} + +function mergeDeepIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); } + ); +} + +function withMutations(fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; +} + +function asMutable() { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); +} + +function asImmutable() { + return this.__ensureOwner(); +} + +function wasAltered() { + return this.__altered; +} + +var Map = /*@__PURE__*/(function (KeyedCollection) { + function Map(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyMap() + : isMap(value) && !isOrdered(value) + ? value + : emptyMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( KeyedCollection ) Map.__proto__ = KeyedCollection; + Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype ); + Map.prototype.constructor = Map; + + Map.of = function of () { + var keyValues = [], len = arguments.length; + while ( len-- ) keyValues[ len ] = arguments[ len ]; + + return emptyMap().withMutations(function (map) { + for (var i = 0; i < keyValues.length; i += 2) { + if (i + 1 >= keyValues.length) { + throw new Error('Missing value for key: ' + keyValues[i]); + } + map.set(keyValues[i], keyValues[i + 1]); + } + }); + }; + + Map.prototype.toString = function toString () { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function get (k, notSetValue) { + return this._root + ? this._root.get(0, undefined, k, notSetValue) + : notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function set (k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.remove = function remove (k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteAll = function deleteAll (keys) { + var collection = Collection(keys); + + if (collection.size === 0) { + return this; + } + + return this.withMutations(function (map) { + collection.forEach(function (key) { return map.remove(key); }); + }); + }; + + Map.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.sort = function sort (comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + Map.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (map) { + map.forEach(function (value, key) { + map.set(key, mapper.call(context, value, key, this$1$1)); + }); + }); + }; + + // @pragma Mutability + + Map.prototype.__iterator = function __iterator (type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + this._root && + this._root.iterate(function (entry) { + iterations++; + return fn(entry[1], entry[0], this$1$1); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + return Map; +}(KeyedCollection)); + +Map.isMap = isMap; + +var MapPrototype = Map.prototype; +MapPrototype[IS_MAP_SYMBOL] = true; +MapPrototype[DELETE] = MapPrototype.remove; +MapPrototype.removeAll = MapPrototype.deleteAll; +MapPrototype.setIn = setIn; +MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn; +MapPrototype.update = update; +MapPrototype.updateIn = updateIn; +MapPrototype.merge = MapPrototype.concat = merge$1; +MapPrototype.mergeWith = mergeWith$1; +MapPrototype.mergeDeep = mergeDeep; +MapPrototype.mergeDeepWith = mergeDeepWith; +MapPrototype.mergeIn = mergeIn; +MapPrototype.mergeDeepIn = mergeDeepIn; +MapPrototype.withMutations = withMutations; +MapPrototype.wasAltered = wasAltered; +MapPrototype.asImmutable = asImmutable; +MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable; +MapPrototype['@@transducer/step'] = function (result, arr) { + return result.set(arr[0], arr[1]); +}; +MapPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +// #pragma Trie Nodes + +var ArrayMapNode = function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; +}; + +ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; +}; + +ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); +}; + +var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; +}; + +BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 + ? notSetValue + : this.nodes[popCount(bitmap & (bit - 1))].get( + shift + SHIFT, + keyHash, + key, + notSetValue + ); +}; + +BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if ( + exists && + !newNode && + nodes.length === 2 && + isLeafNode(nodes[idx ^ 1]) + ) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; + var newNodes = exists + ? newNode + ? setAt(nodes, idx, newNode, isEditable) + : spliceOut(nodes, idx, isEditable) + : spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); +}; + +var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; +}; + +HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node + ? node.get(shift + SHIFT, keyHash, key, notSetValue) + : notSetValue; +}; + +HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setAt(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); +}; + +var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; +}; + +HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; +}; + +HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); +}; + +var ValueNode = function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; +}; + +ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; +}; + +ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); +}; + +// #pragma Iterators + +ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = + function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + }; + +BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = + function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + }; + +// eslint-disable-next-line no-unused-vars +ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); +}; + +var MapIterator = /*@__PURE__*/(function (Iterator) { + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + if ( Iterator ) MapIterator.__proto__ = Iterator; + MapIterator.prototype = Object.create( Iterator && Iterator.prototype ); + MapIterator.prototype.constructor = MapIterator; + + MapIterator.prototype.next = function next () { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex = (void 0); + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue( + type, + node.entries[this._reverse ? maxIndex - index : index] + ); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + return MapIterator; +}(Iterator)); + +function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); +} + +function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev, + }; +} + +function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; +} + +var EMPTY_MAP; +function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); +} + +function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(); + var didAlter = MakeRef(); + newRoot = updateNode( + map._root, + map.__ownerID, + 0, + undefined, + k, + v, + didChangeSize, + didAlter + ); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); +} + +function updateNode( + node, + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter +) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter + ); +} + +function isLeafNode(node) { + return ( + node.constructor === ValueNode || node.constructor === HashCollisionNode + ); +} + +function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = + idx1 === idx2 + ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] + : ((newNode = new ValueNode(ownerID, keyHash, entry)), + idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); +} + +function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; +} + +function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); +} + +function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); +} + +function popCount(x) { + x -= (x >> 1) & 0x55555555; + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x += x >> 8; + x += x >> 16; + return x & 0x7f; +} + +function setAt(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; +} + +function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; +} + +function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; +} + +var MAX_ARRAY_MAP_SIZE = SIZE / 4; +var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; +var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + +var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@'; + +function isList(maybeList) { + return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]); +} + +var List = /*@__PURE__*/(function (IndexedCollection) { + function List(value) { + var empty = emptyList(); + if (value === undefined || value === null) { + // eslint-disable-next-line no-constructor-return + return empty; + } + if (isList(value)) { + // eslint-disable-next-line no-constructor-return + return value; + } + var iter = IndexedCollection(value); + var size = iter.size; + if (size === 0) { + // eslint-disable-next-line no-constructor-return + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + // eslint-disable-next-line no-constructor-return + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + // eslint-disable-next-line no-constructor-return + return empty.withMutations(function (list) { + list.setSize(size); + iter.forEach(function (v, i) { return list.set(i, v); }); + }); + } + + if ( IndexedCollection ) List.__proto__ = IndexedCollection; + List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + List.prototype.constructor = List; + + List.of = function of (/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function toString () { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function get (index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function set (index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function remove (index) { + return !this.has(index) + ? this + : index === 0 + ? this.shift() + : index === this.size - 1 + ? this.pop() + : this.splice(index, 1); + }; + + List.prototype.insert = function insert (index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function push (/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function (list) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function pop () { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function unshift (/*...values*/) { + var values = arguments; + return this.withMutations(function (list) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function shift () { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.concat = function concat (/*...collections*/) { + var arguments$1 = arguments; + + var seqs = []; + for (var i = 0; i < arguments.length; i++) { + var argument = arguments$1[i]; + var seq = IndexedCollection( + typeof argument !== 'string' && hasIterator(argument) + ? argument + : [argument] + ); + if (seq.size !== 0) { + seqs.push(seq); + } + } + if (seqs.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && seqs.length === 1) { + return this.constructor(seqs[0]); + } + return this.withMutations(function (list) { + seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); }); + }); + }; + + List.prototype.setSize = function setSize (size) { + return setListBounds(this, 0, size); + }; + + List.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (list) { + for (var i = 0; i < this$1$1.size; i++) { + list.set(i, mapper.call(context, list.get(i), i, this$1$1)); + } + }); + }; + + // @pragma Iteration + + List.prototype.slice = function slice (begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds( + this, + resolveBegin(begin, size), + resolveEnd(end, size) + ); + }; + + List.prototype.__iterator = function __iterator (type, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + return new Iterator(function () { + var value = values(); + return value === DONE + ? iteratorDone() + : iteratorValue(type, reverse ? --index : index++, value); + }); + }; + + List.prototype.__iterate = function __iterate (fn, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, reverse ? --index : index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyList(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeList( + this._origin, + this._capacity, + this._level, + this._root, + this._tail, + ownerID, + this.__hash + ); + }; + + return List; +}(IndexedCollection)); + +List.isList = isList; + +var ListPrototype = List.prototype; +ListPrototype[IS_LIST_SYMBOL] = true; +ListPrototype[DELETE] = ListPrototype.remove; +ListPrototype.merge = ListPrototype.concat; +ListPrototype.setIn = setIn; +ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn; +ListPrototype.update = update; +ListPrototype.updateIn = updateIn; +ListPrototype.mergeIn = mergeIn; +ListPrototype.mergeDeepIn = mergeDeepIn; +ListPrototype.withMutations = withMutations; +ListPrototype.wasAltered = wasAltered; +ListPrototype.asImmutable = asImmutable; +ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable; +ListPrototype['@@transducer/step'] = function (result, arr) { + return result.push(arr); +}; +ListPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +var VNode = function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; +}; + +// TODO: seems like these methods are very similar + +VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) { + if (index === level ? 1 << level : this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = + oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; +}; + +VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = + oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; +}; + +var DONE = {}; + +function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 + ? iterateLeaf(node, offset) + : iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function () { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function () { + while (true) { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf( + array && array[idx], + level - SHIFT, + offset + (idx << level) + ); + } + }; + } +} + +function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; +} + +var EMPTY_LIST; +function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); +} + +function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function (list) { + index < 0 + ? setListBounds(list, index).set(0, value) + : setListBounds(list, 0, index + 1).set(index, value); + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode( + newRoot, + list.__ownerID, + list._level, + index, + value, + didAlter + ); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); +} + +function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode( + lowerNode, + ownerID, + level - SHIFT, + index, + value, + didAlter + ); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + if (didAlter) { + SetRef(didAlter); + } + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; +} + +function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); +} + +function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } +} + +function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin |= 0; + } + if (end !== undefined) { + end |= 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = + end === undefined + ? oldCapacity + : end < 0 + ? oldCapacity + end + : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [undefined, newRoot] : [], + owner + ); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [newRoot] : [], + owner + ); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = + newTailOffset < oldTailOffset + ? listNodeFor(list, newCapacity - 1) + : newTailOffset > oldTailOffset + ? new VNode([], owner) + : oldTail; + + // Merge Tail into tree. + if ( + oldTail && + newTailOffset > oldTailOffset && + newOrigin < oldCapacity && + oldTail.array.length + ) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter( + owner, + newLevel, + newTailOffset - offsetShift + ); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); +} + +function getTailOffset(size) { + return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; +} + +var OrderedMap = /*@__PURE__*/(function (Map) { + function OrderedMap(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyOrderedMap() + : isOrderedMap(value) + ? value + : emptyOrderedMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( Map ) OrderedMap.__proto__ = Map; + OrderedMap.prototype = Object.create( Map && Map.prototype ); + OrderedMap.prototype.constructor = OrderedMap; + + OrderedMap.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function toString () { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function get (k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + this.__altered = true; + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function set (k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function remove (k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._list.__iterate( + function (entry) { return entry && fn(entry[1], entry[0], this$1$1); }, + reverse + ); + }; + + OrderedMap.prototype.__iterator = function __iterator (type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return emptyOrderedMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + return OrderedMap; +}(Map)); + +OrderedMap.isOrderedMap = isOrderedMap; + +OrderedMap.prototype[IS_ORDERED_SYMBOL] = true; +OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + +function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + omap.__altered = false; + return omap; +} + +var EMPTY_ORDERED_MAP; +function emptyOrderedMap() { + return ( + EMPTY_ORDERED_MAP || + (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())) + ); +} + +function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { + // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; }); + newMap = newList + .toKeyedSeq() + .map(function (entry) { return entry[0]; }) + .flip() + .toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + omap.__altered = true; + return omap; + } + return makeOrderedMap(newMap, newList); +} + +var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@'; + +function isStack(maybeStack) { + return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]); +} + +var Stack = /*@__PURE__*/(function (IndexedCollection) { + function Stack(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyStack() + : isStack(value) + ? value + : emptyStack().pushAll(value); + } + + if ( IndexedCollection ) Stack.__proto__ = IndexedCollection; + Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + Stack.prototype.constructor = Stack; + + Stack.of = function of (/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function toString () { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function get (index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function peek () { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function push (/*...values*/) { + var arguments$1 = arguments; + + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments$1[ii], + next: head, + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function pushAll (iter) { + iter = IndexedCollection(iter); + if (iter.size === 0) { + return this; + } + if (this.size === 0 && isStack(iter)) { + return iter; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.__iterate(function (value) { + newSize++; + head = { + value: value, + next: head, + }; + }, /* reverse */ true); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function pop () { + return this.slice(1); + }; + + Stack.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyStack(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return new ArraySeq(this.toArray()).__iterate( + function (v, k) { return fn(v, k, this$1$1); }, + reverse + ); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function __iterator (type, reverse) { + if (reverse) { + return new ArraySeq(this.toArray()).__iterator(type, reverse); + } + var iterations = 0; + var node = this._head; + return new Iterator(function () { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + return Stack; +}(IndexedCollection)); + +Stack.isStack = isStack; + +var StackPrototype = Stack.prototype; +StackPrototype[IS_STACK_SYMBOL] = true; +StackPrototype.shift = StackPrototype.pop; +StackPrototype.unshift = StackPrototype.push; +StackPrototype.unshiftAll = StackPrototype.pushAll; +StackPrototype.withMutations = withMutations; +StackPrototype.wasAltered = wasAltered; +StackPrototype.asImmutable = asImmutable; +StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable; +StackPrototype['@@transducer/step'] = function (result, arr) { + return result.unshift(arr); +}; +StackPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; +} + +var EMPTY_STACK; +function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); +} + +var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@'; + +function isSet(maybeSet) { + return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]); +} + +function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); +} + +function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isCollection(b) || + (a.size !== undefined && b.size !== undefined && a.size !== b.size) || + (a.__hash !== undefined && + b.__hash !== undefined && + a.__hash !== b.__hash) || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return ( + b.every(function (v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done + ); + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function (v, k) { + if ( + notAssociative + ? !a.has(v) + : flipped + ? !is(v, a.get(k, NOT_SET)) + : !is(a.get(k, NOT_SET), v) + ) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; +} + +function mixin(ctor, methods) { + var keyCopier = function (key) { + ctor.prototype[key] = methods[key]; + }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && + Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; +} + +function toJS(value) { + if (!value || typeof value !== 'object') { + return value; + } + if (!isCollection(value)) { + if (!isDataStructure(value)) { + return value; + } + value = Seq(value); + } + if (isKeyed(value)) { + var result$1 = {}; + value.__iterate(function (v, k) { + result$1[k] = toJS(v); + }); + return result$1; + } + var result = []; + value.__iterate(function (v) { + result.push(toJS(v)); + }); + return result; +} + +var Set = /*@__PURE__*/(function (SetCollection) { + function Set(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySet() + : isSet(value) && !isOrdered(value) + ? value + : emptySet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( SetCollection ) Set.__proto__ = SetCollection; + Set.prototype = Object.create( SetCollection && SetCollection.prototype ); + Set.prototype.constructor = Set; + + Set.of = function of (/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + Set.intersect = function intersect (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.intersect.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.union = function union (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.union.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.prototype.toString = function toString () { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function has (value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function add (value) { + return updateSet(this, this._map.set(value, value)); + }; + + Set.prototype.remove = function remove (value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function clear () { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + // keep track if the set is altered by the map function + var didChanges = false; + + var newMap = updateSet( + this, + this._map.mapEntries(function (ref) { + var v = ref[1]; + + var mapped = mapper.call(context, v, v, this$1$1); + + if (mapped !== v) { + didChanges = true; + } + + return [mapped, mapped]; + }, context) + ); + + return didChanges ? newMap : this; + }; + + Set.prototype.union = function union () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + iters = iters.filter(function (x) { return x.size !== 0; }); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function (set) { + for (var ii = 0; ii < iters.length; ii++) { + if (typeof iters[ii] === 'string') { + set.add(iters[ii]); + } else { + SetCollection(iters[ii]).forEach(function (value) { return set.add(value); }); + } + } + }); + }; + + Set.prototype.intersect = function intersect () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (!iters.every(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.subtract = function subtract () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (iters.some(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.sort = function sort (comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function wasAltered () { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse); + }; + + Set.prototype.__iterator = function __iterator (type, reverse) { + return this._map.__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return this.__empty(); + } + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + return Set; +}(SetCollection)); + +Set.isSet = isSet; + +var SetPrototype = Set.prototype; +SetPrototype[IS_SET_SYMBOL] = true; +SetPrototype[DELETE] = SetPrototype.remove; +SetPrototype.merge = SetPrototype.concat = SetPrototype.union; +SetPrototype.withMutations = withMutations; +SetPrototype.asImmutable = asImmutable; +SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable; +SetPrototype['@@transducer/step'] = function (result, arr) { + return result.add(arr); +}; +SetPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); +}; + +SetPrototype.__empty = emptySet; +SetPrototype.__make = makeSet; + +function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map + ? set + : newMap.size === 0 + ? set.__empty() + : set.__make(newMap); +} + +function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; +} + +var EMPTY_SET; +function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); +} + +/** + * Returns a lazy seq of nums from start (inclusive) to end + * (exclusive), by step, where start defaults to 0, step to 1, and end to + * infinity. When start is equal to end, returns empty list. + */ +var Range = /*@__PURE__*/(function (IndexedSeq) { + function Range(start, end, step) { + if (!(this instanceof Range)) { + // eslint-disable-next-line no-constructor-return + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + // eslint-disable-next-line no-constructor-return + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + if ( IndexedSeq ) Range.__proto__ = IndexedSeq; + Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Range.prototype.constructor = Range; + + Range.prototype.toString = function toString () { + if (this.size === 0) { + return 'Range []'; + } + return ( + 'Range [ ' + + this._start + + '...' + + this._end + + (this._step !== 1 ? ' by ' + this._step : '') + + ' ]' + ); + }; + + Range.prototype.get = function get (index, notSetValue) { + return this.has(index) + ? this._start + wrapIndex(this, index) * this._step + : notSetValue; + }; + + Range.prototype.includes = function includes (searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return ( + possibleIndex >= 0 && + possibleIndex < this.size && + possibleIndex === Math.floor(possibleIndex) + ); + }; + + Range.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range( + this.get(begin, this._end), + this.get(end, this._end), + this._step + ); + }; + + Range.prototype.indexOf = function indexOf (searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index; + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function lastIndexOf (searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + while (i !== size) { + if (fn(value, reverse ? size - ++i : i++, this) === false) { + break; + } + value += reverse ? -step : step; + } + return i; + }; + + Range.prototype.__iterator = function __iterator (type, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var v = value; + value += reverse ? -step : step; + return iteratorValue(type, reverse ? size - ++i : i++, v); + }); + }; + + Range.prototype.equals = function equals (other) { + return other instanceof Range + ? this._start === other._start && + this._end === other._end && + this._step === other._step + : deepEqual(this, other); + }; + + return Range; +}(IndexedSeq)); + +var EMPTY_RANGE; + +function getIn$1(collection, searchKeyPath, notSetValue) { + var keyPath = coerceKeyPath(searchKeyPath); + var i = 0; + while (i !== keyPath.length) { + collection = get(collection, keyPath[i++], NOT_SET); + if (collection === NOT_SET) { + return notSetValue; + } + } + return collection; +} + +function getIn(searchKeyPath, notSetValue) { + return getIn$1(this, searchKeyPath, notSetValue); +} + +function hasIn$1(collection, keyPath) { + return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET; +} + +function hasIn(searchKeyPath) { + return hasIn$1(this, searchKeyPath); +} + +function toObject() { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function (v, k) { + object[k] = v; + }); + return object; +} + +// Note: all of these methods are deprecated. +Collection.isIterable = isCollection; +Collection.isKeyed = isKeyed; +Collection.isIndexed = isIndexed; +Collection.isAssociative = isAssociative; +Collection.isOrdered = isOrdered; + +Collection.Iterator = Iterator; + +mixin(Collection, { + // ### Conversion to other types + + toArray: function toArray() { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + var useTuples = isKeyed(this); + var i = 0; + this.__iterate(function (v, k) { + // Keyed collections produce an array of tuples. + array[i++] = useTuples ? [k, v] : v; + }); + return array; + }, + + toIndexedSeq: function toIndexedSeq() { + return new ToIndexedSequence(this); + }, + + toJS: function toJS$1() { + return toJS(this); + }, + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, true); + }, + + toMap: function toMap() { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: toObject, + + toOrderedMap: function toOrderedMap() { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function toOrderedSet() { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function toSet() { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function toSetSeq() { + return new ToSetSequence(this); + }, + + toSeq: function toSeq() { + return isIndexed(this) + ? this.toIndexedSeq() + : isKeyed(this) + ? this.toKeyedSeq() + : this.toSetSeq(); + }, + + toStack: function toStack() { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function toList() { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + // ### Common JavaScript methods and properties + + toString: function toString() { + return '[Collection]'; + }, + + __toString: function __toString(head, tail) { + if (this.size === 0) { + return head + tail; + } + return ( + head + + ' ' + + this.toSeq().map(this.__toStringMapper).join(', ') + + ' ' + + tail + ); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function concat() { + var values = [], len = arguments.length; + while ( len-- ) values[ len ] = arguments[ len ]; + + return reify(this, concatFactory(this, values)); + }, + + includes: function includes(searchValue) { + return this.some(function (value) { return is(value, searchValue); }); + }, + + entries: function entries() { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function every(predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function (v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + partition: function partition(predicate, context) { + return partitionFactory(this, predicate, context); + }, + + find: function find(predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + forEach: function forEach(sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function join(separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function (v) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function keys() { + return this.__iterator(ITERATE_KEYS); + }, + + map: function map(mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function reduce$1(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + false + ); + }, + + reduceRight: function reduceRight(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + true + ); + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, true)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function some(predicate, context) { + assertNotInfinite(this.size); + var returnValue = false; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + returnValue = true; + return false; + } + }); + return returnValue; + }, + + sort: function sort(comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function values() { + return this.__iterator(ITERATE_VALUES); + }, + + // ### More sequential methods + + butLast: function butLast() { + return this.slice(0, -1); + }, + + isEmpty: function isEmpty() { + return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; }); + }, + + count: function count(predicate, context) { + return ensureSize( + predicate ? this.toSeq().filter(predicate, context) : this + ); + }, + + countBy: function countBy(grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function equals(other) { + return deepEqual(this, other); + }, + + entrySeq: function entrySeq() { + var collection = this; + if (collection._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(collection._cache); + } + var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function () { return collection.toSeq(); }; + return entriesSequence; + }, + + filterNot: function filterNot(predicate, context) { + return this.filter(not(predicate), context); + }, + + findEntry: function findEntry(predicate, context, notSetValue) { + var found = notSetValue; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findKey: function findKey(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLast: function findLast(predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + findLastEntry: function findLastEntry(predicate, context, notSetValue) { + return this.toKeyedSeq() + .reverse() + .findEntry(predicate, context, notSetValue); + }, + + findLastKey: function findLastKey(predicate, context) { + return this.toKeyedSeq().reverse().findKey(predicate, context); + }, + + first: function first(notSetValue) { + return this.find(returnTrue, null, notSetValue); + }, + + flatMap: function flatMap(mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function fromEntrySeq() { + return new FromEntriesSequence(this); + }, + + get: function get(searchKey, notSetValue) { + return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue); + }, + + getIn: getIn, + + groupBy: function groupBy(grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function has(searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: hasIn, + + isSubset: function isSubset(iter) { + iter = typeof iter.includes === 'function' ? iter : Collection(iter); + return this.every(function (value) { return iter.includes(value); }); + }, + + isSuperset: function isSuperset(iter) { + iter = typeof iter.isSubset === 'function' ? iter : Collection(iter); + return iter.isSubset(this); + }, + + keyOf: function keyOf(searchValue) { + return this.findKey(function (value) { return is(value, searchValue); }); + }, + + keySeq: function keySeq() { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function last(notSetValue) { + return this.toSeq().reverse().first(notSetValue); + }, + + lastKeyOf: function lastKeyOf(searchValue) { + return this.toKeyedSeq().reverse().keyOf(searchValue); + }, + + max: function max(comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function maxBy(mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function min(comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator + ); + }, + + minBy: function minBy(mapper, comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator, + mapper + ); + }, + + rest: function rest() { + return this.slice(1); + }, + + skip: function skip(amount) { + return amount === 0 ? this : this.slice(Math.max(0, amount)); + }, + + skipLast: function skipLast(amount) { + return amount === 0 ? this : this.slice(0, -Math.max(0, amount)); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function skipUntil(predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function sortBy(mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function take(amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function takeLast(amount) { + return this.slice(-Math.max(0, amount)); + }, + + takeWhile: function takeWhile(predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function takeUntil(predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + update: function update(fn) { + return fn(this); + }, + + valueSeq: function valueSeq() { + return this.toIndexedSeq(); + }, + + // ### Hashable Object + + hashCode: function hashCode() { + return this.__hash || (this.__hash = hashCollection(this)); + }, + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) +}); + +var CollectionPrototype = Collection.prototype; +CollectionPrototype[IS_COLLECTION_SYMBOL] = true; +CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values; +CollectionPrototype.toJSON = CollectionPrototype.toArray; +CollectionPrototype.__toStringMapper = quoteString; +CollectionPrototype.inspect = CollectionPrototype.toSource = function () { + return this.toString(); +}; +CollectionPrototype.chain = CollectionPrototype.flatMap; +CollectionPrototype.contains = CollectionPrototype.includes; + +mixin(KeyedCollection, { + // ### More sequential methods + + flip: function flip() { + return reify(this, flipFactory(this)); + }, + + mapEntries: function mapEntries(mapper, context) { + var this$1$1 = this; + + var iterations = 0; + return reify( + this, + this.toSeq() + .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); }) + .fromEntrySeq() + ); + }, + + mapKeys: function mapKeys(mapper, context) { + var this$1$1 = this; + + return reify( + this, + this.toSeq() + .flip() + .map(function (k, v) { return mapper.call(context, k, v, this$1$1); }) + .flip() + ); + }, +}); + +var KeyedCollectionPrototype = KeyedCollection.prototype; +KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true; +KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries; +KeyedCollectionPrototype.toJSON = toObject; +KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); }; + +mixin(IndexedCollection, { + // ### Conversion to other types + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, false); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function findIndex(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function indexOf(searchValue) { + var key = this.keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function lastIndexOf(searchValue) { + var key = this.lastKeyOf(searchValue); + return key === undefined ? -1 : key; + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, false)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function splice(index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum || 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 + ? spliced + : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) + ); + }, + + // ### More collection methods + + findLastIndex: function findLastIndex(predicate, context) { + var entry = this.findLastEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + first: function first(notSetValue) { + return this.get(0, notSetValue); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function get(index, notSetValue) { + index = wrapIndex(this, index); + return index < 0 || + this.size === Infinity || + (this.size !== undefined && index > this.size) + ? notSetValue + : this.find(function (_, key) { return key === index; }, undefined, notSetValue); + }, + + has: function has(index) { + index = wrapIndex(this, index); + return ( + index >= 0 && + (this.size !== undefined + ? this.size === Infinity || index < this.size + : this.indexOf(index) !== -1) + ); + }, + + interpose: function interpose(separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function interleave(/*...collections*/) { + var collections = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * collections.length; + } + return reify(this, interleaved); + }, + + keySeq: function keySeq() { + return Range(0, this.size); + }, + + last: function last(notSetValue) { + return this.get(-1, notSetValue); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function zip(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections)); + }, + + zipAll: function zipAll(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections, true)); + }, + + zipWith: function zipWith(zipper /*, ...collections */) { + var collections = arrCopy(arguments); + collections[0] = this; + return reify(this, zipWithFactory(this, zipper, collections)); + }, +}); + +var IndexedCollectionPrototype = IndexedCollection.prototype; +IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true; +IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true; + +mixin(SetCollection, { + // ### ES6 Collection methods (ES6 Array and Map) + + get: function get(value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function includes(value) { + return this.has(value); + }, + + // ### More sequential methods + + keySeq: function keySeq() { + return this.valueSeq(); + }, +}); + +var SetCollectionPrototype = SetCollection.prototype; +SetCollectionPrototype.has = CollectionPrototype.includes; +SetCollectionPrototype.contains = SetCollectionPrototype.includes; +SetCollectionPrototype.keys = SetCollectionPrototype.values; + +// Mixin subclasses + +mixin(KeyedSeq, KeyedCollectionPrototype); +mixin(IndexedSeq, IndexedCollectionPrototype); +mixin(SetSeq, SetCollectionPrototype); + +// #pragma Helper functions + +function reduce(collection, reducer, reduction, context, useFirst, reverse) { + assertNotInfinite(collection.size); + collection.__iterate(function (v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }, reverse); + return reduction; +} + +function keyMapper(v, k) { + return k; +} + +function entryMapper(v, k) { + return [k, v]; +} + +function not(predicate) { + return function () { + return !predicate.apply(this, arguments); + }; +} + +function neg(predicate) { + return function () { + return -predicate.apply(this, arguments); + }; +} + +function defaultZipper() { + return arrCopy(arguments); +} + +function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; +} + +function hashCollection(collection) { + if (collection.size === Infinity) { + return 0; + } + var ordered = isOrdered(collection); + var keyed = isKeyed(collection); + var h = ordered ? 1 : 0; + var size = collection.__iterate( + keyed + ? ordered + ? function (v, k) { + h = (31 * h + hashMerge(hash(v), hash(k))) | 0; + } + : function (v, k) { + h = (h + hashMerge(hash(v), hash(k))) | 0; + } + : ordered + ? function (v) { + h = (31 * h + hash(v)) | 0; + } + : function (v) { + h = (h + hash(v)) | 0; + } + ); + return murmurHashOfSize(size, h); +} + +function murmurHashOfSize(size, h) { + h = imul(h, 0xcc9e2d51); + h = imul((h << 15) | (h >>> -15), 0x1b873593); + h = imul((h << 13) | (h >>> -13), 5); + h = ((h + 0xe6546b64) | 0) ^ size; + h = imul(h ^ (h >>> 16), 0x85ebca6b); + h = imul(h ^ (h >>> 13), 0xc2b2ae35); + h = smi(h ^ (h >>> 16)); + return h; +} + +function hashMerge(a, b) { + return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int +} + +var OrderedSet = /*@__PURE__*/(function (Set) { + function OrderedSet(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyOrderedSet() + : isOrderedSet(value) + ? value + : emptyOrderedSet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( Set ) OrderedSet.__proto__ = Set; + OrderedSet.prototype = Object.create( Set && Set.prototype ); + OrderedSet.prototype.constructor = OrderedSet; + + OrderedSet.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + OrderedSet.prototype.toString = function toString () { + return this.__toString('OrderedSet {', '}'); + }; + + return OrderedSet; +}(Set)); + +OrderedSet.isOrderedSet = isOrderedSet; + +var OrderedSetPrototype = OrderedSet.prototype; +OrderedSetPrototype[IS_ORDERED_SYMBOL] = true; +OrderedSetPrototype.zip = IndexedCollectionPrototype.zip; +OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith; +OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll; + +OrderedSetPrototype.__empty = emptyOrderedSet; +OrderedSetPrototype.__make = makeOrderedSet; + +function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; +} + +var EMPTY_ORDERED_SET; +function emptyOrderedSet() { + return ( + EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())) + ); +} + +var PairSorting = { + LeftThenRight: -1, + RightThenLeft: +1, +}; + +function throwOnInvalidDefaultValues(defaultValues) { + if (isRecord(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.' + ); + } + + if (isImmutable(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.' + ); + } + + if (defaultValues === null || typeof defaultValues !== 'object') { + throw new Error( + 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.' + ); + } +} + +var Record = function Record(defaultValues, name) { + var hasInitialized; + + throwOnInvalidDefaultValues(defaultValues); + + var RecordType = function Record(values) { + var this$1$1 = this; + + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + var indices = (RecordTypePrototype._indices = {}); + // Deprecated: left to attempt not to break any external code which + // relies on a ._name property existing on record instances. + // Use Record.getDescriptiveName() instead + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + for (var i = 0; i < keys.length; i++) { + var propName = keys[i]; + indices[propName] = i; + if (RecordTypePrototype[propName]) { + /* eslint-disable no-console */ + typeof console === 'object' && + console.warn && + console.warn( + 'Cannot define ' + + recordName(this) + + ' with property "' + + propName + + '" since that property name is part of the Record API.' + ); + /* eslint-enable no-console */ + } else { + setProp(RecordTypePrototype, propName); + } + } + } + this.__ownerID = undefined; + this._values = List().withMutations(function (l) { + l.setSize(this$1$1._keys.length); + KeyedCollection(values).forEach(function (v, k) { + l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v); + }); + }); + return this; + }; + + var RecordTypePrototype = (RecordType.prototype = + Object.create(RecordPrototype)); + RecordTypePrototype.constructor = RecordType; + + if (name) { + RecordType.displayName = name; + } + + // eslint-disable-next-line no-constructor-return + return RecordType; +}; + +Record.prototype.toString = function toString () { + var str = recordName(this) + ' { '; + var keys = this._keys; + var k; + for (var i = 0, l = keys.length; i !== l; i++) { + k = keys[i]; + str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k)); + } + return str + ' }'; +}; + +Record.prototype.equals = function equals (other) { + return ( + this === other || + (isRecord(other) && recordSeq(this).equals(recordSeq(other))) + ); +}; + +Record.prototype.hashCode = function hashCode () { + return recordSeq(this).hashCode(); +}; + +// @pragma Access + +Record.prototype.has = function has (k) { + return this._indices.hasOwnProperty(k); +}; + +Record.prototype.get = function get (k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var index = this._indices[k]; + var value = this._values.get(index); + return value === undefined ? this._defaultValues[k] : value; +}; + +// @pragma Modification + +Record.prototype.set = function set (k, v) { + if (this.has(k)) { + var newValues = this._values.set( + this._indices[k], + v === this._defaultValues[k] ? undefined : v + ); + if (newValues !== this._values && !this.__ownerID) { + return makeRecord(this, newValues); + } + } + return this; +}; + +Record.prototype.remove = function remove (k) { + return this.set(k); +}; + +Record.prototype.clear = function clear () { + var newValues = this._values.clear().setSize(this._keys.length); + + return this.__ownerID ? this : makeRecord(this, newValues); +}; + +Record.prototype.wasAltered = function wasAltered () { + return this._values.wasAltered(); +}; + +Record.prototype.toSeq = function toSeq () { + return recordSeq(this); +}; + +Record.prototype.toJS = function toJS$1 () { + return toJS(this); +}; + +Record.prototype.entries = function entries () { + return this.__iterator(ITERATE_ENTRIES); +}; + +Record.prototype.__iterator = function __iterator (type, reverse) { + return recordSeq(this).__iterator(type, reverse); +}; + +Record.prototype.__iterate = function __iterate (fn, reverse) { + return recordSeq(this).__iterate(fn, reverse); +}; + +Record.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newValues = this._values.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._values = newValues; + return this; + } + return makeRecord(this, newValues, ownerID); +}; + +Record.isRecord = isRecord; +Record.getDescriptiveName = recordName; +var RecordPrototype = Record.prototype; +RecordPrototype[IS_RECORD_SYMBOL] = true; +RecordPrototype[DELETE] = RecordPrototype.remove; +RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn; +RecordPrototype.getIn = getIn; +RecordPrototype.hasIn = CollectionPrototype.hasIn; +RecordPrototype.merge = merge$1; +RecordPrototype.mergeWith = mergeWith$1; +RecordPrototype.mergeIn = mergeIn; +RecordPrototype.mergeDeep = mergeDeep; +RecordPrototype.mergeDeepWith = mergeDeepWith; +RecordPrototype.mergeDeepIn = mergeDeepIn; +RecordPrototype.setIn = setIn; +RecordPrototype.update = update; +RecordPrototype.updateIn = updateIn; +RecordPrototype.withMutations = withMutations; +RecordPrototype.asMutable = asMutable; +RecordPrototype.asImmutable = asImmutable; +RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries; +RecordPrototype.toJSON = RecordPrototype.toObject = + CollectionPrototype.toObject; +RecordPrototype.inspect = RecordPrototype.toSource = function () { + return this.toString(); +}; + +function makeRecord(likeRecord, values, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + record._values = values; + record.__ownerID = ownerID; + return record; +} + +function recordName(record) { + return record.constructor.displayName || record.constructor.name || 'Record'; +} + +function recordSeq(record) { + return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; })); +} + +function setProp(prototype, name) { + try { + Object.defineProperty(prototype, name, { + get: function () { + return this.get(name); + }, + set: function (value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + }, + }); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } +} + +/** + * Returns a lazy Seq of `value` repeated `times` times. When `times` is + * undefined, returns an infinite sequence of `value`. + */ +var Repeat = /*@__PURE__*/(function (IndexedSeq) { + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + // eslint-disable-next-line no-constructor-return + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + // eslint-disable-next-line no-constructor-return + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq; + Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Repeat.prototype.constructor = Repeat; + + Repeat.prototype.toString = function toString () { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function includes (searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function slice (begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) + ? this + : new Repeat( + this._value, + resolveEnd(end, size) - resolveBegin(begin, size) + ); + }; + + Repeat.prototype.reverse = function reverse () { + return this; + }; + + Repeat.prototype.indexOf = function indexOf (searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var i = 0; + while (i !== size) { + if (fn(this._value, reverse ? size - ++i : i++, this) === false) { + break; + } + } + return i; + }; + + Repeat.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var size = this.size; + var i = 0; + return new Iterator(function () { return i === size + ? iteratorDone() + : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); } + ); + }; + + Repeat.prototype.equals = function equals (other) { + return other instanceof Repeat + ? is(this._value, other._value) + : deepEqual(this, other); + }; + + return Repeat; +}(IndexedSeq)); + +var EMPTY_REPEAT; + +function fromJS(value, converter) { + return fromJSWith( + [], + converter || defaultConverter, + value, + '', + converter && converter.length > 2 ? [] : undefined, + { '': value } + ); +} + +function fromJSWith(stack, converter, value, key, keyPath, parentValue) { + if ( + typeof value !== 'string' && + !isImmutable(value) && + (isArrayLike(value) || hasIterator(value) || isPlainObject(value)) + ) { + if (~stack.indexOf(value)) { + throw new TypeError('Cannot convert circular structure to Immutable'); + } + stack.push(value); + keyPath && key !== '' && keyPath.push(key); + var converted = converter.call( + parentValue, + key, + Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); } + ), + keyPath && keyPath.slice() + ); + stack.pop(); + keyPath && keyPath.pop(); + return converted; + } + return value; +} + +function defaultConverter(k, v) { + // Effectively the opposite of "Collection.toSeq()" + return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet(); +} + +var version = "4.3.7"; + +var Immutable = { + version: version, + + Collection: Collection, + // Note: Iterable is deprecated + Iterable: Collection, + + Seq: Seq, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + PairSorting: PairSorting, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS, + hash: hash, + + isImmutable: isImmutable, + isCollection: isCollection, + isKeyed: isKeyed, + isIndexed: isIndexed, + isAssociative: isAssociative, + isOrdered: isOrdered, + isValueObject: isValueObject, + isPlainObject: isPlainObject, + isSeq: isSeq, + isList: isList, + isMap: isMap, + isOrderedMap: isOrderedMap, + isStack: isStack, + isSet: isSet, + isOrderedSet: isOrderedSet, + isRecord: isRecord, + + get: get, + getIn: getIn$1, + has: has, + hasIn: hasIn$1, + merge: merge, + mergeDeep: mergeDeep$1, + mergeWith: mergeWith, + mergeDeepWith: mergeDeepWith$1, + remove: remove, + removeIn: removeIn, + set: set, + setIn: setIn$1, + update: update$1, + updateIn: updateIn$1, +}; + +// Note: Iterable is deprecated +var Iterable = Collection; + +export default Immutable; +export { Collection, Iterable, List, Map, OrderedMap, OrderedSet, PairSorting, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn$1 as getIn, has, hasIn$1 as hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep$1 as mergeDeep, mergeDeepWith$1 as mergeDeepWith, mergeWith, remove, removeIn, set, setIn$1 as setIn, update$1 as update, updateIn$1 as updateIn, version }; diff --git a/node_modules/immutable/dist/immutable.js b/node_modules/immutable/dist/immutable.js new file mode 100644 index 0000000..61aa251 --- /dev/null +++ b/node_modules/immutable/dist/immutable.js @@ -0,0 +1,6044 @@ +/** + * MIT License + * + * Copyright (c) 2014-present, Lee Byron and other contributors. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Immutable = {})); +}(this, (function (exports) { 'use strict'; + + var DELETE = 'delete'; + + // Constants describing the size of trie nodes. + var SHIFT = 5; // Resulted in best performance after ______? + var SIZE = 1 << SHIFT; + var MASK = SIZE - 1; + + // A consistent shared value representing "not set" which equals nothing other + // than itself, and nothing that could be provided externally. + var NOT_SET = {}; + + // Boolean references, Rough equivalent of `bool &`. + function MakeRef() { + return { value: false }; + } + + function SetRef(ref) { + if (ref) { + ref.value = true; + } + } + + // A function which returns a value representing an "owner" for transient writes + // to tries. The return value will only ever equal itself, and will not equal + // the return of any subsequent call of this function. + function OwnerID() {} + + function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; + } + + function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; + } + + function returnTrue() { + return true; + } + + function wholeSlice(begin, end, size) { + return ( + ((begin === 0 && !isNeg(begin)) || + (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)) + ); + } + + function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); + } + + function resolveEnd(end, size) { + return resolveIndex(end, size, size); + } + + function resolveIndex(index, size, defaultIndex) { + // Sanitize indices using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + return index === undefined + ? defaultIndex + : isNeg(index) + ? size === Infinity + ? size + : Math.max(0, size + index) | 0 + : size === undefined || size === index + ? index + : Math.min(size, index) | 0; + } + + function isNeg(value) { + // Account for -0 which is negative, but not less than 0. + return value < 0 || (value === 0 && 1 / value === -Infinity); + } + + var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@'; + + function isCollection(maybeCollection) { + return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]); + } + + var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@'; + + function isKeyed(maybeKeyed) { + return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]); + } + + var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@'; + + function isIndexed(maybeIndexed) { + return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]); + } + + function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); + } + + var Collection = function Collection(value) { + // eslint-disable-next-line no-constructor-return + return isCollection(value) ? value : Seq(value); + }; + + var KeyedCollection = /*@__PURE__*/(function (Collection) { + function KeyedCollection(value) { + // eslint-disable-next-line no-constructor-return + return isKeyed(value) ? value : KeyedSeq(value); + } + + if ( Collection ) KeyedCollection.__proto__ = Collection; + KeyedCollection.prototype = Object.create( Collection && Collection.prototype ); + KeyedCollection.prototype.constructor = KeyedCollection; + + return KeyedCollection; + }(Collection)); + + var IndexedCollection = /*@__PURE__*/(function (Collection) { + function IndexedCollection(value) { + // eslint-disable-next-line no-constructor-return + return isIndexed(value) ? value : IndexedSeq(value); + } + + if ( Collection ) IndexedCollection.__proto__ = Collection; + IndexedCollection.prototype = Object.create( Collection && Collection.prototype ); + IndexedCollection.prototype.constructor = IndexedCollection; + + return IndexedCollection; + }(Collection)); + + var SetCollection = /*@__PURE__*/(function (Collection) { + function SetCollection(value) { + // eslint-disable-next-line no-constructor-return + return isCollection(value) && !isAssociative(value) ? value : SetSeq(value); + } + + if ( Collection ) SetCollection.__proto__ = Collection; + SetCollection.prototype = Object.create( Collection && Collection.prototype ); + SetCollection.prototype.constructor = SetCollection; + + return SetCollection; + }(Collection)); + + Collection.Keyed = KeyedCollection; + Collection.Indexed = IndexedCollection; + Collection.Set = SetCollection; + + var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@'; + + function isSeq(maybeSeq) { + return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]); + } + + var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'; + + function isRecord(maybeRecord) { + return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]); + } + + function isImmutable(maybeImmutable) { + return isCollection(maybeImmutable) || isRecord(maybeImmutable); + } + + var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@'; + + function isOrdered(maybeOrdered) { + return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]); + } + + var ITERATE_KEYS = 0; + var ITERATE_VALUES = 1; + var ITERATE_ENTRIES = 2; + + var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + + var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + + var Iterator = function Iterator(next) { + this.next = next; + }; + + Iterator.prototype.toString = function toString () { + return '[Iterator]'; + }; + + Iterator.KEYS = ITERATE_KEYS; + Iterator.VALUES = ITERATE_VALUES; + Iterator.ENTRIES = ITERATE_ENTRIES; + + Iterator.prototype.inspect = Iterator.prototype.toSource = function () { + return this.toString(); + }; + Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; + }; + + function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult + ? (iteratorResult.value = value) + : (iteratorResult = { + value: value, + done: false, + }); + return iteratorResult; + } + + function iteratorDone() { + return { value: undefined, done: true }; + } + + function hasIterator(maybeIterable) { + if (Array.isArray(maybeIterable)) { + // IE11 trick as it does not support `Symbol.iterator` + return true; + } + + return !!getIteratorFn(maybeIterable); + } + + function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; + } + + function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); + } + + function getIteratorFn(iterable) { + var iteratorFn = + iterable && + ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || + iterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + function isEntriesIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.entries; + } + + function isKeysIterable(maybeIterable) { + var iteratorFn = getIteratorFn(maybeIterable); + return iteratorFn && iteratorFn === maybeIterable.keys; + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + + function isArrayLike(value) { + if (Array.isArray(value) || typeof value === 'string') { + return true; + } + + return ( + value && + typeof value === 'object' && + Number.isInteger(value.length) && + value.length >= 0 && + (value.length === 0 + ? // Only {length: 0} is considered Array-like. + Object.keys(value).length === 1 + : // An object is only Array-like if it has a property where the last value + // in the array-like may be found (which could be undefined). + value.hasOwnProperty(value.length - 1)) + ); + } + + var Seq = /*@__PURE__*/(function (Collection) { + function Seq(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySequence() + : isImmutable(value) + ? value.toSeq() + : seqFromValue(value); + } + + if ( Collection ) Seq.__proto__ = Collection; + Seq.prototype = Object.create( Collection && Collection.prototype ); + Seq.prototype.constructor = Seq; + + Seq.prototype.toSeq = function toSeq () { + return this; + }; + + Seq.prototype.toString = function toString () { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function cacheResult () { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function __iterate (fn, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + while (i !== size) { + var entry = cache[reverse ? size - ++i : i++]; + if (fn(entry[1], entry[0], this) === false) { + break; + } + } + return i; + } + return this.__iterateUncached(fn, reverse); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function __iterator (type, reverse) { + var cache = this._cache; + if (cache) { + var size = cache.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var entry = cache[reverse ? size - ++i : i++]; + return iteratorValue(type, entry[0], entry[1]); + }); + } + return this.__iteratorUncached(type, reverse); + }; + + return Seq; + }(Collection)); + + var KeyedSeq = /*@__PURE__*/(function (Seq) { + function KeyedSeq(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySequence().toKeyedSeq() + : isCollection(value) + ? isKeyed(value) + ? value.toSeq() + : value.fromEntrySeq() + : isRecord(value) + ? value.toSeq() + : keyedSeqFromValue(value); + } + + if ( Seq ) KeyedSeq.__proto__ = Seq; + KeyedSeq.prototype = Object.create( Seq && Seq.prototype ); + KeyedSeq.prototype.constructor = KeyedSeq; + + KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () { + return this; + }; + + return KeyedSeq; + }(Seq)); + + var IndexedSeq = /*@__PURE__*/(function (Seq) { + function IndexedSeq(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySequence() + : isCollection(value) + ? isKeyed(value) + ? value.entrySeq() + : value.toIndexedSeq() + : isRecord(value) + ? value.toSeq().entrySeq() + : indexedSeqFromValue(value); + } + + if ( Seq ) IndexedSeq.__proto__ = Seq; + IndexedSeq.prototype = Object.create( Seq && Seq.prototype ); + IndexedSeq.prototype.constructor = IndexedSeq; + + IndexedSeq.of = function of (/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () { + return this; + }; + + IndexedSeq.prototype.toString = function toString () { + return this.__toString('Seq [', ']'); + }; + + return IndexedSeq; + }(Seq)); + + var SetSeq = /*@__PURE__*/(function (Seq) { + function SetSeq(value) { + // eslint-disable-next-line no-constructor-return + return ( + isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value) + ).toSetSeq(); + } + + if ( Seq ) SetSeq.__proto__ = Seq; + SetSeq.prototype = Object.create( Seq && Seq.prototype ); + SetSeq.prototype.constructor = SetSeq; + + SetSeq.of = function of (/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function toSetSeq () { + return this; + }; + + return SetSeq; + }(Seq)); + + Seq.isSeq = isSeq; + Seq.Keyed = KeyedSeq; + Seq.Set = SetSeq; + Seq.Indexed = IndexedSeq; + + Seq.prototype[IS_SEQ_SYMBOL] = true; + + // #pragma Root Sequences + + var ArraySeq = /*@__PURE__*/(function (IndexedSeq) { + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq; + ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ArraySeq.prototype.constructor = ArraySeq; + + ArraySeq.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function __iterate (fn, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + while (i !== size) { + var ii = reverse ? size - ++i : i++; + if (fn(array[ii], ii, this) === false) { + break; + } + } + return i; + }; + + ArraySeq.prototype.__iterator = function __iterator (type, reverse) { + var array = this._array; + var size = array.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var ii = reverse ? size - ++i : i++; + return iteratorValue(type, ii, array[ii]); + }); + }; + + return ArraySeq; + }(IndexedSeq)); + + var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) { + function ObjectSeq(object) { + var keys = Object.keys(object).concat( + Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [] + ); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq; + ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ObjectSeq.prototype.constructor = ObjectSeq; + + ObjectSeq.prototype.get = function get (key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function has (key) { + return hasOwnProperty.call(this._object, key); + }; + + ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + while (i !== size) { + var key = keys[reverse ? size - ++i : i++]; + if (fn(object[key], key, this) === false) { + break; + } + } + return i; + }; + + ObjectSeq.prototype.__iterator = function __iterator (type, reverse) { + var object = this._object; + var keys = this._keys; + var size = keys.length; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var key = keys[reverse ? size - ++i : i++]; + return iteratorValue(type, key, object[key]); + }); + }; + + return ObjectSeq; + }(KeyedSeq)); + ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true; + + var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) { + function CollectionSeq(collection) { + this._collection = collection; + this.size = collection.length || collection.size; + } + + if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq; + CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + CollectionSeq.prototype.constructor = CollectionSeq; + + CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var collection = this._collection; + var iterator = getIterator(collection); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + return CollectionSeq; + }(IndexedSeq)); + + // # pragma Helper functions + + var EMPTY_SEQ; + + function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); + } + + function keyedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq.fromEntrySeq(); + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of [k, v] entries, or keyed object: ' + + value + ); + } + + function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return seq; + } + throw new TypeError( + 'Expected Array or collection object of values: ' + value + ); + } + + function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (seq) { + return isEntriesIterable(value) + ? seq.fromEntrySeq() + : isKeysIterable(value) + ? seq.toSetSeq() + : seq; + } + if (typeof value === 'object') { + return new ObjectSeq(value); + } + throw new TypeError( + 'Expected Array or collection object of values, or keyed object: ' + value + ); + } + + function maybeIndexedSeqFromValue(value) { + return isArrayLike(value) + ? new ArraySeq(value) + : hasIterator(value) + ? new CollectionSeq(value) + : undefined; + } + + var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@'; + + function isMap(maybeMap) { + return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]); + } + + function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); + } + + function isValueObject(maybeValue) { + return Boolean( + maybeValue && + typeof maybeValue.equals === 'function' && + typeof maybeValue.hashCode === 'function' + ); + } + + /** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections are Value Objects: they implement `equals()` + * and `hashCode()`. + */ + function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if ( + typeof valueA.valueOf === 'function' && + typeof valueB.valueOf === 'function' + ) { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + return !!( + isValueObject(valueA) && + isValueObject(valueB) && + valueA.equals(valueB) + ); + } + + var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 + ? Math.imul + : function imul(a, b) { + a |= 0; // int + b |= 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int + }; + + // v8 has an optimization for storing 31-bit signed numbers. + // Values which have either 00 or 11 as the high order bits qualify. + // This function drops the highest order bit in a signed number, maintaining + // the sign bit. + function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); + } + + var defaultValueOf = Object.prototype.valueOf; + + function hash(o) { + if (o == null) { + return hashNullish(o); + } + + if (typeof o.hashCode === 'function') { + // Drop any high bits from accidentally long hash codes. + return smi(o.hashCode(o)); + } + + var v = valueOf(o); + + if (v == null) { + return hashNullish(v); + } + + switch (typeof v) { + case 'boolean': + // The hash values for built-in constants are a 1 value for each 5-byte + // shift region expect for the first, which encodes the value. This + // reduces the odds of a hash collision for these common values. + return v ? 0x42108421 : 0x42108420; + case 'number': + return hashNumber(v); + case 'string': + return v.length > STRING_HASH_CACHE_MIN_STRLEN + ? cachedHashString(v) + : hashString(v); + case 'object': + case 'function': + return hashJSObj(v); + case 'symbol': + return hashSymbol(v); + default: + if (typeof v.toString === 'function') { + return hashString(v.toString()); + } + throw new Error('Value type ' + typeof v + ' cannot be hashed.'); + } + } + + function hashNullish(nullish) { + return nullish === null ? 0x42108422 : /* undefined */ 0x42108423; + } + + // Compress arbitrarily large numbers into smi hashes. + function hashNumber(n) { + if (n !== n || n === Infinity) { + return 0; + } + var hash = n | 0; + if (hash !== n) { + hash ^= n * 0xffffffff; + } + while (n > 0xffffffff) { + n /= 0xffffffff; + hash ^= n; + } + return smi(hash); + } + + function cachedHashString(string) { + var hashed = stringHashCache[string]; + if (hashed === undefined) { + hashed = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hashed; + } + return hashed; + } + + // http://jsperf.com/hashing-strings + function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hashed = 0; + for (var ii = 0; ii < string.length; ii++) { + hashed = (31 * hashed + string.charCodeAt(ii)) | 0; + } + return smi(hashed); + } + + function hashSymbol(sym) { + var hashed = symbolMap[sym]; + if (hashed !== undefined) { + return hashed; + } + + hashed = nextHash(); + + symbolMap[sym] = hashed; + + return hashed; + } + + function hashJSObj(obj) { + var hashed; + if (usingWeakMap) { + hashed = weakMap.get(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = obj[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + if (!canDefineProperty) { + hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hashed !== undefined) { + return hashed; + } + + hashed = getIENodeHash(obj); + if (hashed !== undefined) { + return hashed; + } + } + + hashed = nextHash(); + + if (usingWeakMap) { + weakMap.set(obj, hashed); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + enumerable: false, + configurable: false, + writable: false, + value: hashed, + }); + } else if ( + obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable + ) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function () { + return this.constructor.prototype.propertyIsEnumerable.apply( + this, + arguments + ); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hashed; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hashed; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hashed; + } + + // Get references to ES5 object methods. + var isExtensible = Object.isExtensible; + + // True if Object.defineProperty works as expected. IE8 fails this test. + var canDefineProperty = (function () { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } + })(); + + // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it + // and avoid memory leaks from the IE cloneNode bug. + function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } + } + + function valueOf(obj) { + return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function' + ? obj.valueOf(obj) + : obj; + } + + function nextHash() { + var nextHash = ++_objHashUID; + if (_objHashUID & 0x40000000) { + _objHashUID = 0; + } + return nextHash; + } + + // If possible, use a WeakMap. + var usingWeakMap = typeof WeakMap === 'function'; + var weakMap; + if (usingWeakMap) { + weakMap = new WeakMap(); + } + + var symbolMap = Object.create(null); + + var _objHashUID = 0; + + var UID_HASH_KEY = '__immutablehash__'; + if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); + } + + var STRING_HASH_CACHE_MIN_STRLEN = 16; + var STRING_HASH_CACHE_MAX_SIZE = 255; + var STRING_HASH_CACHE_SIZE = 0; + var stringHashCache = {}; + + var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) { + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq; + ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + ToKeyedSequence.prototype.constructor = ToKeyedSequence; + + ToKeyedSequence.prototype.get = function get (key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function has (key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function valueSeq () { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function reverse () { + var this$1$1 = this; + + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); }; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); }; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse); + }; + + ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) { + return this._iter.__iterator(type, reverse); + }; + + return ToKeyedSequence; + }(KeyedSeq)); + ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true; + + var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) { + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq; + ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + ToIndexedSequence.prototype.constructor = ToIndexedSequence; + + ToIndexedSequence.prototype.includes = function includes (value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(this); + return this._iter.__iterate( + function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); }, + reverse + ); + }; + + ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var i = 0; + reverse && ensureSize(this); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue( + type, + reverse ? this$1$1.size - ++i : i++, + step.value, + step + ); + }); + }; + + return ToIndexedSequence; + }(IndexedSeq)); + + var ToSetSequence = /*@__PURE__*/(function (SetSeq) { + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + if ( SetSeq ) ToSetSequence.__proto__ = SetSeq; + ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype ); + ToSetSequence.prototype.constructor = ToSetSequence; + + ToSetSequence.prototype.has = function has (key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse); + }; + + ToSetSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + var step = iterator.next(); + return step.done + ? step + : iteratorValue(type, step.value, step.value, step); + }); + }; + + return ToSetSequence; + }(SetSeq)); + + var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) { + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq; + FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); + FromEntriesSequence.prototype.constructor = FromEntriesSequence; + + FromEntriesSequence.prototype.entrySeq = function entrySeq () { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._iter.__iterate(function (entry) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return fn( + indexedCollection ? entry.get(1) : entry[1], + indexedCollection ? entry.get(0) : entry[0], + this$1$1 + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedCollection = isCollection(entry); + return iteratorValue( + type, + indexedCollection ? entry.get(0) : entry[0], + indexedCollection ? entry.get(1) : entry[1], + step + ); + } + } + }); + }; + + return FromEntriesSequence; + }(KeyedSeq)); + + ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + + function flipFactory(collection) { + var flipSequence = makeSequence(collection); + flipSequence._iter = collection; + flipSequence.size = collection.size; + flipSequence.flip = function () { return collection; }; + flipSequence.reverse = function () { + var reversedSequence = collection.reverse.apply(this); // super.reverse() + reversedSequence.flip = function () { return collection.reverse(); }; + return reversedSequence; + }; + flipSequence.has = function (key) { return collection.includes(key); }; + flipSequence.includes = function (key) { return collection.has(key); }; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse); + }; + flipSequence.__iteratorUncached = function (type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = collection.__iterator(type, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return collection.__iterator( + type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, + reverse + ); + }; + return flipSequence; + } + + function mapFactory(collection, mapper, context) { + var mappedSequence = makeSequence(collection); + mappedSequence.size = collection.size; + mappedSequence.has = function (key) { return collection.has(key); }; + mappedSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v === NOT_SET + ? notSetValue + : mapper.call(context, v, key, collection); + }; + mappedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + return collection.__iterate( + function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; }, + reverse + ); + }; + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue( + type, + key, + mapper.call(context, entry[1], key, collection), + step + ); + }); + }; + return mappedSequence; + } + + function reverseFactory(collection, useKeys) { + var this$1$1 = this; + + var reversedSequence = makeSequence(collection); + reversedSequence._iter = collection; + reversedSequence.size = collection.size; + reversedSequence.reverse = function () { return collection; }; + if (collection.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(collection); + flipSequence.reverse = function () { return collection.flip(); }; + return flipSequence; + }; + } + reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); }; + reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); }; + reversedSequence.includes = function (value) { return collection.includes(value); }; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) { + var this$1$1 = this; + + var i = 0; + reverse && ensureSize(collection); + return collection.__iterate( + function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); }, + !reverse + ); + }; + reversedSequence.__iterator = function (type, reverse) { + var i = 0; + reverse && ensureSize(collection); + var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + return iteratorValue( + type, + useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++, + entry[1], + step + ); + }); + }; + return reversedSequence; + } + + function filterFactory(collection, predicate, context, useKeys) { + var filterSequence = makeSequence(collection); + if (useKeys) { + filterSequence.has = function (key) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, collection); + }; + filterSequence.get = function (key, notSetValue) { + var v = collection.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, collection) + ? v + : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, collection)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + }; + return filterSequence; + } + + function countByFactory(collection, grouper, context) { + var groups = Map().asMutable(); + collection.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; }); + }); + return groups.asImmutable(); + } + + function groupByFactory(collection, grouper, context) { + var isKeyedIter = isKeyed(collection); + var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable(); + collection.__iterate(function (v, k) { + groups.update( + grouper.call(context, v, k, collection), + function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); } + ); + }); + var coerce = collectionClass(collection); + return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable(); + } + + function partitionFactory(collection, predicate, context) { + var isKeyedIter = isKeyed(collection); + var groups = [[], []]; + collection.__iterate(function (v, k) { + groups[predicate.call(context, v, k, collection) ? 1 : 0].push( + isKeyedIter ? [k, v] : v + ); + }); + var coerce = collectionClass(collection); + return groups.map(function (arr) { return reify(collection, coerce(arr)); }); + } + + function sliceFactory(collection, begin, end, useKeys) { + var originalSize = collection.size; + + if (wholeSlice(begin, end, originalSize)) { + return collection; + } + + // begin or end can not be resolved if they were provided as negative numbers and + // this collection's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (typeof originalSize === 'undefined' && (begin < 0 || end < 0)) { + return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys); + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(collection); + + // If collection.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = + sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined; + + if (!useKeys && isSeq(collection) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize + ? collection.get(index + resolvedBegin, notSetValue) + : notSetValue; + }; + } + + sliceSeq.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return ( + fn(v, useKeys ? k : iterations - 1, this$1$1) !== false && + iterations !== sliceSize + ); + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function (type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + if (sliceSize === 0) { + return new Iterator(iteratorDone); + } + var iterator = collection.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function () { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES || step.done) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } + return iteratorValue(type, iterations - 1, step.value[1], step); + }); + }; + + return sliceSeq; + } + + function takeWhileFactory(collection, predicate, context) { + var takeSequence = makeSequence(collection); + takeSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + collection.__iterate( + function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); } + ); + return iterations; + }; + takeSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function () { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$1$1)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return takeSequence; + } + + function skipWhileFactory(collection, predicate, context, useKeys) { + var skipSequence = makeSequence(collection); + skipSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + collection.__iterate(function (v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$1$1); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function (type, reverse) { + var this$1$1 = this; + + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function () { + var step; + var k; + var v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } + if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } + return iteratorValue(type, iterations++, step.value[1], step); + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$1$1)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return skipSequence; + } + + function concatFactory(collection, values) { + var isKeyedCollection = isKeyed(collection); + var iters = [collection] + .concat(values) + .map(function (v) { + if (!isCollection(v)) { + v = isKeyedCollection + ? keyedSeqFromValue(v) + : indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedCollection) { + v = KeyedCollection(v); + } + return v; + }) + .filter(function (v) { return v.size !== 0; }); + + if (iters.length === 0) { + return collection; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if ( + singleton === collection || + (isKeyedCollection && isKeyed(singleton)) || + (isIndexed(collection) && isIndexed(singleton)) + ) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedCollection) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(collection)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce(function (sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, 0); + return concatSeq; + } + + function flattenFactory(collection, depth, useKeys) { + var flatSequence = makeSequence(collection); + flatSequence.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) { + iter.__iterate(function (v, k) { + if ((!depth || currentDepth < depth) && isCollection(v)) { + flatDeep(v, currentDepth + 1); + } else { + iterations++; + if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) { + stopped = true; + } + } + return !stopped; + }, reverse); + } + flatDeep(collection, 0); + return iterations; + }; + flatSequence.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = collection.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function () { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isCollection(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + }; + return flatSequence; + } + + function flatMapFactory(collection, mapper, context) { + var coerce = collectionClass(collection); + return collection + .toSeq() + .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); }) + .flatten(true); + } + + function interposeFactory(collection, separator) { + var interposedSequence = makeSequence(collection); + interposedSequence.size = collection.size && collection.size * 2 - 1; + interposedSequence.__iterateUncached = function (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + collection.__iterate( + function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) && + fn(v, iterations++, this$1$1) !== false; }, + reverse + ); + return iterations; + }; + interposedSequence.__iteratorUncached = function (type, reverse) { + var iterator = collection.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function () { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 + ? iteratorValue(type, iterations++, separator) + : iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; + } + + function sortFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedCollection = isKeyed(collection); + var index = 0; + var entries = collection + .toSeq() + .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; }) + .valueSeq() + .toArray(); + entries + .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; }) + .forEach( + isKeyedCollection + ? function (v, i) { + entries[i].length = 2; + } + : function (v, i) { + entries[i] = v[1]; + } + ); + return isKeyedCollection + ? KeyedSeq(entries) + : isIndexed(collection) + ? IndexedSeq(entries) + : SetSeq(entries); + } + + function maxFactory(collection, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = collection + .toSeq() + .map(function (v, k) { return [v, mapper(v, k, collection)]; }) + .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); }); + return entry && entry[0]; + } + return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); }); + } + + function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return ( + (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || + comp > 0 + ); + } + + function zipWithFactory(keyIter, zipper, iters, zipAll) { + var zipSequence = makeSequence(keyIter); + var sizes = new ArraySeq(iters).map(function (i) { return i.size; }); + zipSequence.size = zipAll ? sizes.max() : sizes.min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function (fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function (type, reverse) { + var iterators = iters.map( + function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); } + ); + var iterations = 0; + var isDone = false; + return new Iterator(function () { + var steps; + if (!isDone) { + steps = iterators.map(function (i) { return i.next(); }); + isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; }); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply( + null, + steps.map(function (s) { return s.value; }) + ) + ); + }); + }; + return zipSequence; + } + + // #pragma Helper Functions + + function reify(iter, seq) { + return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq); + } + + function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } + } + + function collectionClass(collection) { + return isKeyed(collection) + ? KeyedCollection + : isIndexed(collection) + ? IndexedCollection + : SetCollection; + } + + function makeSequence(collection) { + return Object.create( + (isKeyed(collection) + ? KeyedSeq + : isIndexed(collection) + ? IndexedSeq + : SetSeq + ).prototype + ); + } + + function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } + return Seq.prototype.cacheResult.call(this); + } + + function defaultComparator(a, b) { + if (a === undefined && b === undefined) { + return 0; + } + + if (a === undefined) { + return 1; + } + + if (b === undefined) { + return -1; + } + + return a > b ? 1 : a < b ? -1 : 0; + } + + function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; + } + + function invariant(condition, error) { + if (!condition) { throw new Error(error); } + } + + function assertNotInfinite(size) { + invariant( + size !== Infinity, + 'Cannot perform this action with an infinite size.' + ); + } + + function coerceKeyPath(keyPath) { + if (isArrayLike(keyPath) && typeof keyPath !== 'string') { + return keyPath; + } + if (isOrdered(keyPath)) { + return keyPath.toArray(); + } + throw new TypeError( + 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath + ); + } + + var toString = Object.prototype.toString; + + function isPlainObject(value) { + // The base prototype's toString deals with Argument objects and native namespaces like Math + if ( + !value || + typeof value !== 'object' || + toString.call(value) !== '[object Object]' + ) { + return false; + } + + var proto = Object.getPrototypeOf(value); + if (proto === null) { + return true; + } + + // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc) + var parentProto = proto; + var nextProto = Object.getPrototypeOf(proto); + while (nextProto !== null) { + parentProto = nextProto; + nextProto = Object.getPrototypeOf(parentProto); + } + return parentProto === proto; + } + + /** + * Returns true if the value is a potentially-persistent data structure, either + * provided by Immutable.js or a plain Array or Object. + */ + function isDataStructure(value) { + return ( + typeof value === 'object' && + (isImmutable(value) || Array.isArray(value) || isPlainObject(value)) + ); + } + + function quoteString(value) { + try { + return typeof value === 'string' ? JSON.stringify(value) : String(value); + } catch (_ignoreError) { + return JSON.stringify(value); + } + } + + function has(collection, key) { + return isImmutable(collection) + ? collection.has(key) + : isDataStructure(collection) && hasOwnProperty.call(collection, key); + } + + function get(collection, key, notSetValue) { + return isImmutable(collection) + ? collection.get(key, notSetValue) + : !has(collection, key) + ? notSetValue + : typeof collection.get === 'function' + ? collection.get(key) + : collection[key]; + } + + function shallowCopy(from) { + if (Array.isArray(from)) { + return arrCopy(from); + } + var to = {}; + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + return to; + } + + function remove(collection, key) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.remove) { + throw new TypeError( + 'Cannot update immutable value without .remove() method: ' + collection + ); + } + return collection.remove(key); + } + if (!hasOwnProperty.call(collection, key)) { + return collection; + } + var collectionCopy = shallowCopy(collection); + if (Array.isArray(collectionCopy)) { + collectionCopy.splice(key, 1); + } else { + delete collectionCopy[key]; + } + return collectionCopy; + } + + function set(collection, key, value) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot update non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + if (!collection.set) { + throw new TypeError( + 'Cannot update immutable value without .set() method: ' + collection + ); + } + return collection.set(key, value); + } + if (hasOwnProperty.call(collection, key) && value === collection[key]) { + return collection; + } + var collectionCopy = shallowCopy(collection); + collectionCopy[key] = value; + return collectionCopy; + } + + function updateIn$1(collection, keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeeply( + isImmutable(collection), + collection, + coerceKeyPath(keyPath), + 0, + notSetValue, + updater + ); + return updatedValue === NOT_SET ? notSetValue : updatedValue; + } + + function updateInDeeply( + inImmutable, + existing, + keyPath, + i, + notSetValue, + updater + ) { + var wasNotSet = existing === NOT_SET; + if (i === keyPath.length) { + var existingValue = wasNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + if (!wasNotSet && !isDataStructure(existing)) { + throw new TypeError( + 'Cannot update within non-data-structure value in path [' + + keyPath.slice(0, i).map(quoteString) + + ']: ' + + existing + ); + } + var key = keyPath[i]; + var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET); + var nextUpdated = updateInDeeply( + nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), + nextExisting, + keyPath, + i + 1, + notSetValue, + updater + ); + return nextUpdated === nextExisting + ? existing + : nextUpdated === NOT_SET + ? remove(existing, key) + : set( + wasNotSet ? (inImmutable ? emptyMap() : {}) : existing, + key, + nextUpdated + ); + } + + function setIn$1(collection, keyPath, value) { + return updateIn$1(collection, keyPath, NOT_SET, function () { return value; }); + } + + function setIn(keyPath, v) { + return setIn$1(this, keyPath, v); + } + + function removeIn(collection, keyPath) { + return updateIn$1(collection, keyPath, function () { return NOT_SET; }); + } + + function deleteIn(keyPath) { + return removeIn(this, keyPath); + } + + function update$1(collection, key, notSetValue, updater) { + return updateIn$1(collection, [key], notSetValue, updater); + } + + function update(key, notSetValue, updater) { + return arguments.length === 1 + ? key(this) + : update$1(this, key, notSetValue, updater); + } + + function updateIn(keyPath, notSetValue, updater) { + return updateIn$1(this, keyPath, notSetValue, updater); + } + + function merge$1() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeIntoKeyedWith(this, iters); + } + + function mergeWith$1(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + if (typeof merger !== 'function') { + throw new TypeError('Invalid merger function: ' + merger); + } + return mergeIntoKeyedWith(this, iters, merger); + } + + function mergeIntoKeyedWith(collection, collections, merger) { + var iters = []; + for (var ii = 0; ii < collections.length; ii++) { + var collection$1 = KeyedCollection(collections[ii]); + if (collection$1.size !== 0) { + iters.push(collection$1); + } + } + if (iters.length === 0) { + return collection; + } + if ( + collection.toSeq().size === 0 && + !collection.__ownerID && + iters.length === 1 + ) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function (collection) { + var mergeIntoCollection = merger + ? function (value, key) { + update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); } + ); + } + : function (value, key) { + collection.set(key, value); + }; + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoCollection); + } + }); + } + + function merge(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeWithSources(collection, sources); + } + + function mergeWith(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeWithSources(collection, sources, merger); + } + + function mergeDeep$1(collection) { + var sources = [], len = arguments.length - 1; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(collection, sources); + } + + function mergeDeepWith$1(merger, collection) { + var sources = [], len = arguments.length - 2; + while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; + + return mergeDeepWithSources(collection, sources, merger); + } + + function mergeDeepWithSources(collection, sources, merger) { + return mergeWithSources(collection, sources, deepMergerWith(merger)); + } + + function mergeWithSources(collection, sources, merger) { + if (!isDataStructure(collection)) { + throw new TypeError( + 'Cannot merge into non-data-structure value: ' + collection + ); + } + if (isImmutable(collection)) { + return typeof merger === 'function' && collection.mergeWith + ? collection.mergeWith.apply(collection, [ merger ].concat( sources )) + : collection.merge + ? collection.merge.apply(collection, sources) + : collection.concat.apply(collection, sources); + } + var isArray = Array.isArray(collection); + var merged = collection; + var Collection = isArray ? IndexedCollection : KeyedCollection; + var mergeItem = isArray + ? function (value) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged.push(value); + } + : function (value, key) { + var hasVal = hasOwnProperty.call(merged, key); + var nextVal = + hasVal && merger ? merger(merged[key], value, key) : value; + if (!hasVal || nextVal !== merged[key]) { + // Copy on write + if (merged === collection) { + merged = shallowCopy(merged); + } + merged[key] = nextVal; + } + }; + for (var i = 0; i < sources.length; i++) { + Collection(sources[i]).forEach(mergeItem); + } + return merged; + } + + function deepMergerWith(merger) { + function deepMerger(oldValue, newValue, key) { + return isDataStructure(oldValue) && + isDataStructure(newValue) && + areMergeable(oldValue, newValue) + ? mergeWithSources(oldValue, [newValue], deepMerger) + : merger + ? merger(oldValue, newValue, key) + : newValue; + } + return deepMerger; + } + + /** + * It's unclear what the desired behavior is for merging two collections that + * fall into separate categories between keyed, indexed, or set-like, so we only + * consider them mergeable if they fall into the same category. + */ + function areMergeable(oldDataStructure, newDataStructure) { + var oldSeq = Seq(oldDataStructure); + var newSeq = Seq(newDataStructure); + // This logic assumes that a sequence can only fall into one of the three + // categories mentioned above (since there's no `isSetLike()` method). + return ( + isIndexed(oldSeq) === isIndexed(newSeq) && + isKeyed(oldSeq) === isKeyed(newSeq) + ); + } + + function mergeDeep() { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + return mergeDeepWithSources(this, iters); + } + + function mergeDeepWith(merger) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return mergeDeepWithSources(this, iters, merger); + } + + function mergeIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); }); + } + + function mergeDeepIn(keyPath) { + var iters = [], len = arguments.length - 1; + while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; + + return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); } + ); + } + + function withMutations(fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; + } + + function asMutable() { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); + } + + function asImmutable() { + return this.__ensureOwner(); + } + + function wasAltered() { + return this.__altered; + } + + var Map = /*@__PURE__*/(function (KeyedCollection) { + function Map(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyMap() + : isMap(value) && !isOrdered(value) + ? value + : emptyMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( KeyedCollection ) Map.__proto__ = KeyedCollection; + Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype ); + Map.prototype.constructor = Map; + + Map.of = function of () { + var keyValues = [], len = arguments.length; + while ( len-- ) keyValues[ len ] = arguments[ len ]; + + return emptyMap().withMutations(function (map) { + for (var i = 0; i < keyValues.length; i += 2) { + if (i + 1 >= keyValues.length) { + throw new Error('Missing value for key: ' + keyValues[i]); + } + map.set(keyValues[i], keyValues[i + 1]); + } + }); + }; + + Map.prototype.toString = function toString () { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function get (k, notSetValue) { + return this._root + ? this._root.get(0, undefined, k, notSetValue) + : notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function set (k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.remove = function remove (k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteAll = function deleteAll (keys) { + var collection = Collection(keys); + + if (collection.size === 0) { + return this; + } + + return this.withMutations(function (map) { + collection.forEach(function (key) { return map.remove(key); }); + }); + }; + + Map.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.sort = function sort (comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + Map.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (map) { + map.forEach(function (value, key) { + map.set(key, mapper.call(context, value, key, this$1$1)); + }); + }); + }; + + // @pragma Mutability + + Map.prototype.__iterator = function __iterator (type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + var iterations = 0; + this._root && + this._root.iterate(function (entry) { + iterations++; + return fn(entry[1], entry[0], this$1$1); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + return Map; + }(KeyedCollection)); + + Map.isMap = isMap; + + var MapPrototype = Map.prototype; + MapPrototype[IS_MAP_SYMBOL] = true; + MapPrototype[DELETE] = MapPrototype.remove; + MapPrototype.removeAll = MapPrototype.deleteAll; + MapPrototype.setIn = setIn; + MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn; + MapPrototype.update = update; + MapPrototype.updateIn = updateIn; + MapPrototype.merge = MapPrototype.concat = merge$1; + MapPrototype.mergeWith = mergeWith$1; + MapPrototype.mergeDeep = mergeDeep; + MapPrototype.mergeDeepWith = mergeDeepWith; + MapPrototype.mergeIn = mergeIn; + MapPrototype.mergeDeepIn = mergeDeepIn; + MapPrototype.withMutations = withMutations; + MapPrototype.wasAltered = wasAltered; + MapPrototype.asImmutable = asImmutable; + MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable; + MapPrototype['@@transducer/step'] = function (result, arr) { + return result.set(arr[0], arr[1]); + }; + MapPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + // #pragma Trie Nodes + + var ArrayMapNode = function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; + }; + + ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); + }; + + var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; + }; + + BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 + ? notSetValue + : this.nodes[popCount(bitmap & (bit - 1))].get( + shift + SHIFT, + keyHash, + key, + notSetValue + ); + }; + + BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if ( + exists && + !newNode && + nodes.length === 2 && + isLeafNode(nodes[idx ^ 1]) + ) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; + var newNodes = exists + ? newNode + ? setAt(nodes, idx, newNode, isEditable) + : spliceOut(nodes, idx, isEditable) + : spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); + }; + + var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; + }; + + HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node + ? node.get(shift + SHIFT, keyHash, key, notSetValue) + : notSetValue; + }; + + HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setAt(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); + }; + + var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; + }; + + HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + var len = entries.length; + for (; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 + ? newEntries.pop() + : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); + }; + + var ValueNode = function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; + }; + + ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; + }; + + ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); + }; + + // #pragma Iterators + + ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = + function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + }; + + BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = + function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + }; + + // eslint-disable-next-line no-unused-vars + ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); + }; + + var MapIterator = /*@__PURE__*/(function (Iterator) { + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + if ( Iterator ) MapIterator.__proto__ = Iterator; + MapIterator.prototype = Object.create( Iterator && Iterator.prototype ); + MapIterator.prototype.constructor = MapIterator; + + MapIterator.prototype.next = function next () { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex = (void 0); + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue( + type, + node.entries[this._reverse ? maxIndex - index : index] + ); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + return MapIterator; + }(Iterator)); + + function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); + } + + function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev, + }; + } + + function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_MAP; + function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); + } + + function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(); + var didAlter = MakeRef(); + newRoot = updateNode( + map._root, + map.__ownerID, + 0, + undefined, + k, + v, + didChangeSize, + didAlter + ); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); + } + + function updateNode( + node, + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter + ) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter + ); + } + + function isLeafNode(node) { + return ( + node.constructor === ValueNode || node.constructor === HashCollisionNode + ); + } + + function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = + idx1 === idx2 + ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] + : ((newNode = new ValueNode(ownerID, keyHash, entry)), + idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); + } + + function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; + } + + function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); + } + + function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); + } + + function popCount(x) { + x -= (x >> 1) & 0x55555555; + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x += x >> 8; + x += x >> 16; + return x & 0x7f; + } + + function setAt(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; + } + + function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; + } + + function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; + } + + var MAX_ARRAY_MAP_SIZE = SIZE / 4; + var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; + var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + + var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@'; + + function isList(maybeList) { + return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]); + } + + var List = /*@__PURE__*/(function (IndexedCollection) { + function List(value) { + var empty = emptyList(); + if (value === undefined || value === null) { + // eslint-disable-next-line no-constructor-return + return empty; + } + if (isList(value)) { + // eslint-disable-next-line no-constructor-return + return value; + } + var iter = IndexedCollection(value); + var size = iter.size; + if (size === 0) { + // eslint-disable-next-line no-constructor-return + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + // eslint-disable-next-line no-constructor-return + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + // eslint-disable-next-line no-constructor-return + return empty.withMutations(function (list) { + list.setSize(size); + iter.forEach(function (v, i) { return list.set(i, v); }); + }); + } + + if ( IndexedCollection ) List.__proto__ = IndexedCollection; + List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + List.prototype.constructor = List; + + List.of = function of (/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function toString () { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function get (index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function set (index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function remove (index) { + return !this.has(index) + ? this + : index === 0 + ? this.shift() + : index === this.size - 1 + ? this.pop() + : this.splice(index, 1); + }; + + List.prototype.insert = function insert (index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function push (/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function (list) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function pop () { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function unshift (/*...values*/) { + var values = arguments; + return this.withMutations(function (list) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function shift () { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.concat = function concat (/*...collections*/) { + var arguments$1 = arguments; + + var seqs = []; + for (var i = 0; i < arguments.length; i++) { + var argument = arguments$1[i]; + var seq = IndexedCollection( + typeof argument !== 'string' && hasIterator(argument) + ? argument + : [argument] + ); + if (seq.size !== 0) { + seqs.push(seq); + } + } + if (seqs.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && seqs.length === 1) { + return this.constructor(seqs[0]); + } + return this.withMutations(function (list) { + seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); }); + }); + }; + + List.prototype.setSize = function setSize (size) { + return setListBounds(this, 0, size); + }; + + List.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + return this.withMutations(function (list) { + for (var i = 0; i < this$1$1.size; i++) { + list.set(i, mapper.call(context, list.get(i), i, this$1$1)); + } + }); + }; + + // @pragma Iteration + + List.prototype.slice = function slice (begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds( + this, + resolveBegin(begin, size), + resolveEnd(end, size) + ); + }; + + List.prototype.__iterator = function __iterator (type, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + return new Iterator(function () { + var value = values(); + return value === DONE + ? iteratorDone() + : iteratorValue(type, reverse ? --index : index++, value); + }); + }; + + List.prototype.__iterate = function __iterate (fn, reverse) { + var index = reverse ? this.size : 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, reverse ? --index : index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyList(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeList( + this._origin, + this._capacity, + this._level, + this._root, + this._tail, + ownerID, + this.__hash + ); + }; + + return List; + }(IndexedCollection)); + + List.isList = isList; + + var ListPrototype = List.prototype; + ListPrototype[IS_LIST_SYMBOL] = true; + ListPrototype[DELETE] = ListPrototype.remove; + ListPrototype.merge = ListPrototype.concat; + ListPrototype.setIn = setIn; + ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn; + ListPrototype.update = update; + ListPrototype.updateIn = updateIn; + ListPrototype.mergeIn = mergeIn; + ListPrototype.mergeDeepIn = mergeDeepIn; + ListPrototype.withMutations = withMutations; + ListPrototype.wasAltered = wasAltered; + ListPrototype.asImmutable = asImmutable; + ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable; + ListPrototype['@@transducer/step'] = function (result, arr) { + return result.push(arr); + }; + ListPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + var VNode = function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; + }; + + // TODO: seems like these methods are very similar + + VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) { + if (index === level ? 1 << level : this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = + oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; + }; + + VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = + oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; + }; + + var DONE = {}; + + function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 + ? iterateLeaf(node, offset) + : iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function () { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function () { + while (true) { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf( + array && array[idx], + level - SHIFT, + offset + (idx << level) + ); + } + }; + } + } + + function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; + } + + var EMPTY_LIST; + function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); + } + + function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function (list) { + index < 0 + ? setListBounds(list, index).set(0, value) + : setListBounds(list, 0, index + 1).set(index, value); + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode( + newRoot, + list.__ownerID, + list._level, + index, + value, + didAlter + ); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); + } + + function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode( + lowerNode, + ownerID, + level - SHIFT, + index, + value, + didAlter + ); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + if (didAlter) { + SetRef(didAlter); + } + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; + } + + function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); + } + + function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } + } + + function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin |= 0; + } + if (end !== undefined) { + end |= 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = + end === undefined + ? oldCapacity + : end < 0 + ? oldCapacity + end + : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [undefined, newRoot] : [], + owner + ); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode( + newRoot && newRoot.array.length ? [newRoot] : [], + owner + ); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = + newTailOffset < oldTailOffset + ? listNodeFor(list, newCapacity - 1) + : newTailOffset > oldTailOffset + ? new VNode([], owner) + : oldTail; + + // Merge Tail into tree. + if ( + oldTail && + newTailOffset > oldTailOffset && + newOrigin < oldCapacity && + oldTail.array.length + ) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter( + owner, + newLevel, + newTailOffset - offsetShift + ); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); + } + + function getTailOffset(size) { + return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; + } + + var OrderedMap = /*@__PURE__*/(function (Map) { + function OrderedMap(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyOrderedMap() + : isOrderedMap(value) + ? value + : emptyOrderedMap().withMutations(function (map) { + var iter = KeyedCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { return map.set(k, v); }); + }); + } + + if ( Map ) OrderedMap.__proto__ = Map; + OrderedMap.prototype = Object.create( Map && Map.prototype ); + OrderedMap.prototype.constructor = OrderedMap; + + OrderedMap.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function toString () { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function get (k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + this.__altered = true; + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function set (k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function remove (k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._list.__iterate( + function (entry) { return entry && fn(entry[1], entry[0], this$1$1); }, + reverse + ); + }; + + OrderedMap.prototype.__iterator = function __iterator (type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return emptyOrderedMap(); + } + this.__ownerID = ownerID; + this.__altered = false; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + return OrderedMap; + }(Map)); + + OrderedMap.isOrderedMap = isOrderedMap; + + OrderedMap.prototype[IS_ORDERED_SYMBOL] = true; + OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + + function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + omap.__altered = false; + return omap; + } + + var EMPTY_ORDERED_MAP; + function emptyOrderedMap() { + return ( + EMPTY_ORDERED_MAP || + (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())) + ); + } + + function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { + // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; }); + newMap = newList + .toKeyedSeq() + .map(function (entry) { return entry[0]; }) + .flip() + .toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + omap.__altered = true; + return omap; + } + return makeOrderedMap(newMap, newList); + } + + var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@'; + + function isStack(maybeStack) { + return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]); + } + + var Stack = /*@__PURE__*/(function (IndexedCollection) { + function Stack(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyStack() + : isStack(value) + ? value + : emptyStack().pushAll(value); + } + + if ( IndexedCollection ) Stack.__proto__ = IndexedCollection; + Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); + Stack.prototype.constructor = Stack; + + Stack.of = function of (/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function toString () { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function get (index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function peek () { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function push (/*...values*/) { + var arguments$1 = arguments; + + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments$1[ii], + next: head, + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function pushAll (iter) { + iter = IndexedCollection(iter); + if (iter.size === 0) { + return this; + } + if (this.size === 0 && isStack(iter)) { + return iter; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.__iterate(function (value) { + newSize++; + head = { + value: value, + next: head, + }; + }, /* reverse */ true); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function pop () { + return this.slice(1); + }; + + Stack.prototype.clear = function clear () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + if (this.size === 0) { + return emptyStack(); + } + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + if (reverse) { + return new ArraySeq(this.toArray()).__iterate( + function (v, k) { return fn(v, k, this$1$1); }, + reverse + ); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function __iterator (type, reverse) { + if (reverse) { + return new ArraySeq(this.toArray()).__iterator(type, reverse); + } + var iterations = 0; + var node = this._head; + return new Iterator(function () { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + return Stack; + }(IndexedCollection)); + + Stack.isStack = isStack; + + var StackPrototype = Stack.prototype; + StackPrototype[IS_STACK_SYMBOL] = true; + StackPrototype.shift = StackPrototype.pop; + StackPrototype.unshift = StackPrototype.push; + StackPrototype.unshiftAll = StackPrototype.pushAll; + StackPrototype.withMutations = withMutations; + StackPrototype.wasAltered = wasAltered; + StackPrototype.asImmutable = asImmutable; + StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable; + StackPrototype['@@transducer/step'] = function (result, arr) { + return result.unshift(arr); + }; + StackPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_STACK; + function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); + } + + var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@'; + + function isSet(maybeSet) { + return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]); + } + + function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); + } + + function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isCollection(b) || + (a.size !== undefined && b.size !== undefined && a.size !== b.size) || + (a.__hash !== undefined && + b.__hash !== undefined && + a.__hash !== b.__hash) || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return ( + b.every(function (v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done + ); + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function (v, k) { + if ( + notAssociative + ? !a.has(v) + : flipped + ? !is(v, a.get(k, NOT_SET)) + : !is(a.get(k, NOT_SET), v) + ) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; + } + + function mixin(ctor, methods) { + var keyCopier = function (key) { + ctor.prototype[key] = methods[key]; + }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && + Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; + } + + function toJS(value) { + if (!value || typeof value !== 'object') { + return value; + } + if (!isCollection(value)) { + if (!isDataStructure(value)) { + return value; + } + value = Seq(value); + } + if (isKeyed(value)) { + var result$1 = {}; + value.__iterate(function (v, k) { + result$1[k] = toJS(v); + }); + return result$1; + } + var result = []; + value.__iterate(function (v) { + result.push(toJS(v)); + }); + return result; + } + + var Set = /*@__PURE__*/(function (SetCollection) { + function Set(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptySet() + : isSet(value) && !isOrdered(value) + ? value + : emptySet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( SetCollection ) Set.__proto__ = SetCollection; + Set.prototype = Object.create( SetCollection && SetCollection.prototype ); + Set.prototype.constructor = Set; + + Set.of = function of (/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + Set.intersect = function intersect (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.intersect.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.union = function union (sets) { + sets = Collection(sets).toArray(); + return sets.length + ? SetPrototype.union.apply(Set(sets.pop()), sets) + : emptySet(); + }; + + Set.prototype.toString = function toString () { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function has (value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function add (value) { + return updateSet(this, this._map.set(value, value)); + }; + + Set.prototype.remove = function remove (value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function clear () { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.map = function map (mapper, context) { + var this$1$1 = this; + + // keep track if the set is altered by the map function + var didChanges = false; + + var newMap = updateSet( + this, + this._map.mapEntries(function (ref) { + var v = ref[1]; + + var mapped = mapper.call(context, v, v, this$1$1); + + if (mapped !== v) { + didChanges = true; + } + + return [mapped, mapped]; + }, context) + ); + + return didChanges ? newMap : this; + }; + + Set.prototype.union = function union () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + iters = iters.filter(function (x) { return x.size !== 0; }); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function (set) { + for (var ii = 0; ii < iters.length; ii++) { + if (typeof iters[ii] === 'string') { + set.add(iters[ii]); + } else { + SetCollection(iters[ii]).forEach(function (value) { return set.add(value); }); + } + } + }); + }; + + Set.prototype.intersect = function intersect () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (!iters.every(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.subtract = function subtract () { + var iters = [], len = arguments.length; + while ( len-- ) iters[ len ] = arguments[ len ]; + + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { return SetCollection(iter); }); + var toRemove = []; + this.forEach(function (value) { + if (iters.some(function (iter) { return iter.includes(value); })) { + toRemove.push(value); + } + }); + return this.withMutations(function (set) { + toRemove.forEach(function (value) { + set.remove(value); + }); + }); + }; + + Set.prototype.sort = function sort (comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function sortBy (mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function wasAltered () { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function __iterate (fn, reverse) { + var this$1$1 = this; + + return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse); + }; + + Set.prototype.__iterator = function __iterator (type, reverse) { + return this._map.__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + if (this.size === 0) { + return this.__empty(); + } + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + return Set; + }(SetCollection)); + + Set.isSet = isSet; + + var SetPrototype = Set.prototype; + SetPrototype[IS_SET_SYMBOL] = true; + SetPrototype[DELETE] = SetPrototype.remove; + SetPrototype.merge = SetPrototype.concat = SetPrototype.union; + SetPrototype.withMutations = withMutations; + SetPrototype.asImmutable = asImmutable; + SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable; + SetPrototype['@@transducer/step'] = function (result, arr) { + return result.add(arr); + }; + SetPrototype['@@transducer/result'] = function (obj) { + return obj.asImmutable(); + }; + + SetPrototype.__empty = emptySet; + SetPrototype.__make = makeSet; + + function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map + ? set + : newMap.size === 0 + ? set.__empty() + : set.__make(newMap); + } + + function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_SET; + function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); + } + + /** + * Returns a lazy seq of nums from start (inclusive) to end + * (exclusive), by step, where start defaults to 0, step to 1, and end to + * infinity. When start is equal to end, returns empty list. + */ + var Range = /*@__PURE__*/(function (IndexedSeq) { + function Range(start, end, step) { + if (!(this instanceof Range)) { + // eslint-disable-next-line no-constructor-return + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + // eslint-disable-next-line no-constructor-return + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + if ( IndexedSeq ) Range.__proto__ = IndexedSeq; + Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Range.prototype.constructor = Range; + + Range.prototype.toString = function toString () { + if (this.size === 0) { + return 'Range []'; + } + return ( + 'Range [ ' + + this._start + + '...' + + this._end + + (this._step !== 1 ? ' by ' + this._step : '') + + ' ]' + ); + }; + + Range.prototype.get = function get (index, notSetValue) { + return this.has(index) + ? this._start + wrapIndex(this, index) * this._step + : notSetValue; + }; + + Range.prototype.includes = function includes (searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return ( + possibleIndex >= 0 && + possibleIndex < this.size && + possibleIndex === Math.floor(possibleIndex) + ); + }; + + Range.prototype.slice = function slice (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range( + this.get(begin, this._end), + this.get(end, this._end), + this._step + ); + }; + + Range.prototype.indexOf = function indexOf (searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index; + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function lastIndexOf (searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + while (i !== size) { + if (fn(value, reverse ? size - ++i : i++, this) === false) { + break; + } + value += reverse ? -step : step; + } + return i; + }; + + Range.prototype.__iterator = function __iterator (type, reverse) { + var size = this.size; + var step = this._step; + var value = reverse ? this._start + (size - 1) * step : this._start; + var i = 0; + return new Iterator(function () { + if (i === size) { + return iteratorDone(); + } + var v = value; + value += reverse ? -step : step; + return iteratorValue(type, reverse ? size - ++i : i++, v); + }); + }; + + Range.prototype.equals = function equals (other) { + return other instanceof Range + ? this._start === other._start && + this._end === other._end && + this._step === other._step + : deepEqual(this, other); + }; + + return Range; + }(IndexedSeq)); + + var EMPTY_RANGE; + + function getIn$1(collection, searchKeyPath, notSetValue) { + var keyPath = coerceKeyPath(searchKeyPath); + var i = 0; + while (i !== keyPath.length) { + collection = get(collection, keyPath[i++], NOT_SET); + if (collection === NOT_SET) { + return notSetValue; + } + } + return collection; + } + + function getIn(searchKeyPath, notSetValue) { + return getIn$1(this, searchKeyPath, notSetValue); + } + + function hasIn$1(collection, keyPath) { + return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET; + } + + function hasIn(searchKeyPath) { + return hasIn$1(this, searchKeyPath); + } + + function toObject() { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function (v, k) { + object[k] = v; + }); + return object; + } + + // Note: all of these methods are deprecated. + Collection.isIterable = isCollection; + Collection.isKeyed = isKeyed; + Collection.isIndexed = isIndexed; + Collection.isAssociative = isAssociative; + Collection.isOrdered = isOrdered; + + Collection.Iterator = Iterator; + + mixin(Collection, { + // ### Conversion to other types + + toArray: function toArray() { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + var useTuples = isKeyed(this); + var i = 0; + this.__iterate(function (v, k) { + // Keyed collections produce an array of tuples. + array[i++] = useTuples ? [k, v] : v; + }); + return array; + }, + + toIndexedSeq: function toIndexedSeq() { + return new ToIndexedSequence(this); + }, + + toJS: function toJS$1() { + return toJS(this); + }, + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, true); + }, + + toMap: function toMap() { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: toObject, + + toOrderedMap: function toOrderedMap() { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function toOrderedSet() { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function toSet() { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function toSetSeq() { + return new ToSetSequence(this); + }, + + toSeq: function toSeq() { + return isIndexed(this) + ? this.toIndexedSeq() + : isKeyed(this) + ? this.toKeyedSeq() + : this.toSetSeq(); + }, + + toStack: function toStack() { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function toList() { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + // ### Common JavaScript methods and properties + + toString: function toString() { + return '[Collection]'; + }, + + __toString: function __toString(head, tail) { + if (this.size === 0) { + return head + tail; + } + return ( + head + + ' ' + + this.toSeq().map(this.__toStringMapper).join(', ') + + ' ' + + tail + ); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function concat() { + var values = [], len = arguments.length; + while ( len-- ) values[ len ] = arguments[ len ]; + + return reify(this, concatFactory(this, values)); + }, + + includes: function includes(searchValue) { + return this.some(function (value) { return is(value, searchValue); }); + }, + + entries: function entries() { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function every(predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function (v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + partition: function partition(predicate, context) { + return partitionFactory(this, predicate, context); + }, + + find: function find(predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + forEach: function forEach(sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function join(separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function (v) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function keys() { + return this.__iterator(ITERATE_KEYS); + }, + + map: function map(mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function reduce$1(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + false + ); + }, + + reduceRight: function reduceRight(reducer, initialReduction, context) { + return reduce( + this, + reducer, + initialReduction, + context, + arguments.length < 2, + true + ); + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, true)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function some(predicate, context) { + assertNotInfinite(this.size); + var returnValue = false; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + returnValue = true; + return false; + } + }); + return returnValue; + }, + + sort: function sort(comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function values() { + return this.__iterator(ITERATE_VALUES); + }, + + // ### More sequential methods + + butLast: function butLast() { + return this.slice(0, -1); + }, + + isEmpty: function isEmpty() { + return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; }); + }, + + count: function count(predicate, context) { + return ensureSize( + predicate ? this.toSeq().filter(predicate, context) : this + ); + }, + + countBy: function countBy(grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function equals(other) { + return deepEqual(this, other); + }, + + entrySeq: function entrySeq() { + var collection = this; + if (collection._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(collection._cache); + } + var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function () { return collection.toSeq(); }; + return entriesSequence; + }, + + filterNot: function filterNot(predicate, context) { + return this.filter(not(predicate), context); + }, + + findEntry: function findEntry(predicate, context, notSetValue) { + var found = notSetValue; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findKey: function findKey(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLast: function findLast(predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + findLastEntry: function findLastEntry(predicate, context, notSetValue) { + return this.toKeyedSeq() + .reverse() + .findEntry(predicate, context, notSetValue); + }, + + findLastKey: function findLastKey(predicate, context) { + return this.toKeyedSeq().reverse().findKey(predicate, context); + }, + + first: function first(notSetValue) { + return this.find(returnTrue, null, notSetValue); + }, + + flatMap: function flatMap(mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function fromEntrySeq() { + return new FromEntriesSequence(this); + }, + + get: function get(searchKey, notSetValue) { + return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue); + }, + + getIn: getIn, + + groupBy: function groupBy(grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function has(searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: hasIn, + + isSubset: function isSubset(iter) { + iter = typeof iter.includes === 'function' ? iter : Collection(iter); + return this.every(function (value) { return iter.includes(value); }); + }, + + isSuperset: function isSuperset(iter) { + iter = typeof iter.isSubset === 'function' ? iter : Collection(iter); + return iter.isSubset(this); + }, + + keyOf: function keyOf(searchValue) { + return this.findKey(function (value) { return is(value, searchValue); }); + }, + + keySeq: function keySeq() { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function last(notSetValue) { + return this.toSeq().reverse().first(notSetValue); + }, + + lastKeyOf: function lastKeyOf(searchValue) { + return this.toKeyedSeq().reverse().keyOf(searchValue); + }, + + max: function max(comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function maxBy(mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function min(comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator + ); + }, + + minBy: function minBy(mapper, comparator) { + return maxFactory( + this, + comparator ? neg(comparator) : defaultNegComparator, + mapper + ); + }, + + rest: function rest() { + return this.slice(1); + }, + + skip: function skip(amount) { + return amount === 0 ? this : this.slice(Math.max(0, amount)); + }, + + skipLast: function skipLast(amount) { + return amount === 0 ? this : this.slice(0, -Math.max(0, amount)); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function skipUntil(predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function sortBy(mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function take(amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function takeLast(amount) { + return this.slice(-Math.max(0, amount)); + }, + + takeWhile: function takeWhile(predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function takeUntil(predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + update: function update(fn) { + return fn(this); + }, + + valueSeq: function valueSeq() { + return this.toIndexedSeq(); + }, + + // ### Hashable Object + + hashCode: function hashCode() { + return this.__hash || (this.__hash = hashCollection(this)); + }, + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) + }); + + var CollectionPrototype = Collection.prototype; + CollectionPrototype[IS_COLLECTION_SYMBOL] = true; + CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values; + CollectionPrototype.toJSON = CollectionPrototype.toArray; + CollectionPrototype.__toStringMapper = quoteString; + CollectionPrototype.inspect = CollectionPrototype.toSource = function () { + return this.toString(); + }; + CollectionPrototype.chain = CollectionPrototype.flatMap; + CollectionPrototype.contains = CollectionPrototype.includes; + + mixin(KeyedCollection, { + // ### More sequential methods + + flip: function flip() { + return reify(this, flipFactory(this)); + }, + + mapEntries: function mapEntries(mapper, context) { + var this$1$1 = this; + + var iterations = 0; + return reify( + this, + this.toSeq() + .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); }) + .fromEntrySeq() + ); + }, + + mapKeys: function mapKeys(mapper, context) { + var this$1$1 = this; + + return reify( + this, + this.toSeq() + .flip() + .map(function (k, v) { return mapper.call(context, k, v, this$1$1); }) + .flip() + ); + }, + }); + + var KeyedCollectionPrototype = KeyedCollection.prototype; + KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true; + KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries; + KeyedCollectionPrototype.toJSON = toObject; + KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); }; + + mixin(IndexedCollection, { + // ### Conversion to other types + + toKeyedSeq: function toKeyedSeq() { + return new ToKeyedSequence(this, false); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function filter(predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function findIndex(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function indexOf(searchValue) { + var key = this.keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function lastIndexOf(searchValue) { + var key = this.lastKeyOf(searchValue); + return key === undefined ? -1 : key; + }, + + reverse: function reverse() { + return reify(this, reverseFactory(this, false)); + }, + + slice: function slice(begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function splice(index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum || 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 + ? spliced + : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) + ); + }, + + // ### More collection methods + + findLastIndex: function findLastIndex(predicate, context) { + var entry = this.findLastEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + first: function first(notSetValue) { + return this.get(0, notSetValue); + }, + + flatten: function flatten(depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function get(index, notSetValue) { + index = wrapIndex(this, index); + return index < 0 || + this.size === Infinity || + (this.size !== undefined && index > this.size) + ? notSetValue + : this.find(function (_, key) { return key === index; }, undefined, notSetValue); + }, + + has: function has(index) { + index = wrapIndex(this, index); + return ( + index >= 0 && + (this.size !== undefined + ? this.size === Infinity || index < this.size + : this.indexOf(index) !== -1) + ); + }, + + interpose: function interpose(separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function interleave(/*...collections*/) { + var collections = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * collections.length; + } + return reify(this, interleaved); + }, + + keySeq: function keySeq() { + return Range(0, this.size); + }, + + last: function last(notSetValue) { + return this.get(-1, notSetValue); + }, + + skipWhile: function skipWhile(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function zip(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections)); + }, + + zipAll: function zipAll(/*, ...collections */) { + var collections = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, collections, true)); + }, + + zipWith: function zipWith(zipper /*, ...collections */) { + var collections = arrCopy(arguments); + collections[0] = this; + return reify(this, zipWithFactory(this, zipper, collections)); + }, + }); + + var IndexedCollectionPrototype = IndexedCollection.prototype; + IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true; + IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true; + + mixin(SetCollection, { + // ### ES6 Collection methods (ES6 Array and Map) + + get: function get(value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function includes(value) { + return this.has(value); + }, + + // ### More sequential methods + + keySeq: function keySeq() { + return this.valueSeq(); + }, + }); + + var SetCollectionPrototype = SetCollection.prototype; + SetCollectionPrototype.has = CollectionPrototype.includes; + SetCollectionPrototype.contains = SetCollectionPrototype.includes; + SetCollectionPrototype.keys = SetCollectionPrototype.values; + + // Mixin subclasses + + mixin(KeyedSeq, KeyedCollectionPrototype); + mixin(IndexedSeq, IndexedCollectionPrototype); + mixin(SetSeq, SetCollectionPrototype); + + // #pragma Helper functions + + function reduce(collection, reducer, reduction, context, useFirst, reverse) { + assertNotInfinite(collection.size); + collection.__iterate(function (v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }, reverse); + return reduction; + } + + function keyMapper(v, k) { + return k; + } + + function entryMapper(v, k) { + return [k, v]; + } + + function not(predicate) { + return function () { + return !predicate.apply(this, arguments); + }; + } + + function neg(predicate) { + return function () { + return -predicate.apply(this, arguments); + }; + } + + function defaultZipper() { + return arrCopy(arguments); + } + + function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; + } + + function hashCollection(collection) { + if (collection.size === Infinity) { + return 0; + } + var ordered = isOrdered(collection); + var keyed = isKeyed(collection); + var h = ordered ? 1 : 0; + var size = collection.__iterate( + keyed + ? ordered + ? function (v, k) { + h = (31 * h + hashMerge(hash(v), hash(k))) | 0; + } + : function (v, k) { + h = (h + hashMerge(hash(v), hash(k))) | 0; + } + : ordered + ? function (v) { + h = (31 * h + hash(v)) | 0; + } + : function (v) { + h = (h + hash(v)) | 0; + } + ); + return murmurHashOfSize(size, h); + } + + function murmurHashOfSize(size, h) { + h = imul(h, 0xcc9e2d51); + h = imul((h << 15) | (h >>> -15), 0x1b873593); + h = imul((h << 13) | (h >>> -13), 5); + h = ((h + 0xe6546b64) | 0) ^ size; + h = imul(h ^ (h >>> 16), 0x85ebca6b); + h = imul(h ^ (h >>> 13), 0xc2b2ae35); + h = smi(h ^ (h >>> 16)); + return h; + } + + function hashMerge(a, b) { + return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int + } + + var OrderedSet = /*@__PURE__*/(function (Set) { + function OrderedSet(value) { + // eslint-disable-next-line no-constructor-return + return value === undefined || value === null + ? emptyOrderedSet() + : isOrderedSet(value) + ? value + : emptyOrderedSet().withMutations(function (set) { + var iter = SetCollection(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { return set.add(v); }); + }); + } + + if ( Set ) OrderedSet.__proto__ = Set; + OrderedSet.prototype = Object.create( Set && Set.prototype ); + OrderedSet.prototype.constructor = OrderedSet; + + OrderedSet.of = function of (/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function fromKeys (value) { + return this(KeyedCollection(value).keySeq()); + }; + + OrderedSet.prototype.toString = function toString () { + return this.__toString('OrderedSet {', '}'); + }; + + return OrderedSet; + }(Set)); + + OrderedSet.isOrderedSet = isOrderedSet; + + var OrderedSetPrototype = OrderedSet.prototype; + OrderedSetPrototype[IS_ORDERED_SYMBOL] = true; + OrderedSetPrototype.zip = IndexedCollectionPrototype.zip; + OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith; + OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll; + + OrderedSetPrototype.__empty = emptyOrderedSet; + OrderedSetPrototype.__make = makeOrderedSet; + + function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_ORDERED_SET; + function emptyOrderedSet() { + return ( + EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())) + ); + } + + var PairSorting = { + LeftThenRight: -1, + RightThenLeft: +1, + }; + + function throwOnInvalidDefaultValues(defaultValues) { + if (isRecord(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.' + ); + } + + if (isImmutable(defaultValues)) { + throw new Error( + 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.' + ); + } + + if (defaultValues === null || typeof defaultValues !== 'object') { + throw new Error( + 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.' + ); + } + } + + var Record = function Record(defaultValues, name) { + var hasInitialized; + + throwOnInvalidDefaultValues(defaultValues); + + var RecordType = function Record(values) { + var this$1$1 = this; + + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + var indices = (RecordTypePrototype._indices = {}); + // Deprecated: left to attempt not to break any external code which + // relies on a ._name property existing on record instances. + // Use Record.getDescriptiveName() instead + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + for (var i = 0; i < keys.length; i++) { + var propName = keys[i]; + indices[propName] = i; + if (RecordTypePrototype[propName]) { + /* eslint-disable no-console */ + typeof console === 'object' && + console.warn && + console.warn( + 'Cannot define ' + + recordName(this) + + ' with property "' + + propName + + '" since that property name is part of the Record API.' + ); + /* eslint-enable no-console */ + } else { + setProp(RecordTypePrototype, propName); + } + } + } + this.__ownerID = undefined; + this._values = List().withMutations(function (l) { + l.setSize(this$1$1._keys.length); + KeyedCollection(values).forEach(function (v, k) { + l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v); + }); + }); + return this; + }; + + var RecordTypePrototype = (RecordType.prototype = + Object.create(RecordPrototype)); + RecordTypePrototype.constructor = RecordType; + + if (name) { + RecordType.displayName = name; + } + + // eslint-disable-next-line no-constructor-return + return RecordType; + }; + + Record.prototype.toString = function toString () { + var str = recordName(this) + ' { '; + var keys = this._keys; + var k; + for (var i = 0, l = keys.length; i !== l; i++) { + k = keys[i]; + str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k)); + } + return str + ' }'; + }; + + Record.prototype.equals = function equals (other) { + return ( + this === other || + (isRecord(other) && recordSeq(this).equals(recordSeq(other))) + ); + }; + + Record.prototype.hashCode = function hashCode () { + return recordSeq(this).hashCode(); + }; + + // @pragma Access + + Record.prototype.has = function has (k) { + return this._indices.hasOwnProperty(k); + }; + + Record.prototype.get = function get (k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var index = this._indices[k]; + var value = this._values.get(index); + return value === undefined ? this._defaultValues[k] : value; + }; + + // @pragma Modification + + Record.prototype.set = function set (k, v) { + if (this.has(k)) { + var newValues = this._values.set( + this._indices[k], + v === this._defaultValues[k] ? undefined : v + ); + if (newValues !== this._values && !this.__ownerID) { + return makeRecord(this, newValues); + } + } + return this; + }; + + Record.prototype.remove = function remove (k) { + return this.set(k); + }; + + Record.prototype.clear = function clear () { + var newValues = this._values.clear().setSize(this._keys.length); + + return this.__ownerID ? this : makeRecord(this, newValues); + }; + + Record.prototype.wasAltered = function wasAltered () { + return this._values.wasAltered(); + }; + + Record.prototype.toSeq = function toSeq () { + return recordSeq(this); + }; + + Record.prototype.toJS = function toJS$1 () { + return toJS(this); + }; + + Record.prototype.entries = function entries () { + return this.__iterator(ITERATE_ENTRIES); + }; + + Record.prototype.__iterator = function __iterator (type, reverse) { + return recordSeq(this).__iterator(type, reverse); + }; + + Record.prototype.__iterate = function __iterate (fn, reverse) { + return recordSeq(this).__iterate(fn, reverse); + }; + + Record.prototype.__ensureOwner = function __ensureOwner (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newValues = this._values.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._values = newValues; + return this; + } + return makeRecord(this, newValues, ownerID); + }; + + Record.isRecord = isRecord; + Record.getDescriptiveName = recordName; + var RecordPrototype = Record.prototype; + RecordPrototype[IS_RECORD_SYMBOL] = true; + RecordPrototype[DELETE] = RecordPrototype.remove; + RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn; + RecordPrototype.getIn = getIn; + RecordPrototype.hasIn = CollectionPrototype.hasIn; + RecordPrototype.merge = merge$1; + RecordPrototype.mergeWith = mergeWith$1; + RecordPrototype.mergeIn = mergeIn; + RecordPrototype.mergeDeep = mergeDeep; + RecordPrototype.mergeDeepWith = mergeDeepWith; + RecordPrototype.mergeDeepIn = mergeDeepIn; + RecordPrototype.setIn = setIn; + RecordPrototype.update = update; + RecordPrototype.updateIn = updateIn; + RecordPrototype.withMutations = withMutations; + RecordPrototype.asMutable = asMutable; + RecordPrototype.asImmutable = asImmutable; + RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries; + RecordPrototype.toJSON = RecordPrototype.toObject = + CollectionPrototype.toObject; + RecordPrototype.inspect = RecordPrototype.toSource = function () { + return this.toString(); + }; + + function makeRecord(likeRecord, values, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + record._values = values; + record.__ownerID = ownerID; + return record; + } + + function recordName(record) { + return record.constructor.displayName || record.constructor.name || 'Record'; + } + + function recordSeq(record) { + return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; })); + } + + function setProp(prototype, name) { + try { + Object.defineProperty(prototype, name, { + get: function () { + return this.get(name); + }, + set: function (value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + }, + }); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } + } + + /** + * Returns a lazy Seq of `value` repeated `times` times. When `times` is + * undefined, returns an infinite sequence of `value`. + */ + var Repeat = /*@__PURE__*/(function (IndexedSeq) { + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + // eslint-disable-next-line no-constructor-return + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + // eslint-disable-next-line no-constructor-return + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq; + Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); + Repeat.prototype.constructor = Repeat; + + Repeat.prototype.toString = function toString () { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function get (index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function includes (searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function slice (begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) + ? this + : new Repeat( + this._value, + resolveEnd(end, size) - resolveBegin(begin, size) + ); + }; + + Repeat.prototype.reverse = function reverse () { + return this; + }; + + Repeat.prototype.indexOf = function indexOf (searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function __iterate (fn, reverse) { + var size = this.size; + var i = 0; + while (i !== size) { + if (fn(this._value, reverse ? size - ++i : i++, this) === false) { + break; + } + } + return i; + }; + + Repeat.prototype.__iterator = function __iterator (type, reverse) { + var this$1$1 = this; + + var size = this.size; + var i = 0; + return new Iterator(function () { return i === size + ? iteratorDone() + : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); } + ); + }; + + Repeat.prototype.equals = function equals (other) { + return other instanceof Repeat + ? is(this._value, other._value) + : deepEqual(this, other); + }; + + return Repeat; + }(IndexedSeq)); + + var EMPTY_REPEAT; + + function fromJS(value, converter) { + return fromJSWith( + [], + converter || defaultConverter, + value, + '', + converter && converter.length > 2 ? [] : undefined, + { '': value } + ); + } + + function fromJSWith(stack, converter, value, key, keyPath, parentValue) { + if ( + typeof value !== 'string' && + !isImmutable(value) && + (isArrayLike(value) || hasIterator(value) || isPlainObject(value)) + ) { + if (~stack.indexOf(value)) { + throw new TypeError('Cannot convert circular structure to Immutable'); + } + stack.push(value); + keyPath && key !== '' && keyPath.push(key); + var converted = converter.call( + parentValue, + key, + Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); } + ), + keyPath && keyPath.slice() + ); + stack.pop(); + keyPath && keyPath.pop(); + return converted; + } + return value; + } + + function defaultConverter(k, v) { + // Effectively the opposite of "Collection.toSeq()" + return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet(); + } + + var version = "4.3.7"; + + var Immutable = { + version: version, + + Collection: Collection, + // Note: Iterable is deprecated + Iterable: Collection, + + Seq: Seq, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + PairSorting: PairSorting, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS, + hash: hash, + + isImmutable: isImmutable, + isCollection: isCollection, + isKeyed: isKeyed, + isIndexed: isIndexed, + isAssociative: isAssociative, + isOrdered: isOrdered, + isValueObject: isValueObject, + isPlainObject: isPlainObject, + isSeq: isSeq, + isList: isList, + isMap: isMap, + isOrderedMap: isOrderedMap, + isStack: isStack, + isSet: isSet, + isOrderedSet: isOrderedSet, + isRecord: isRecord, + + get: get, + getIn: getIn$1, + has: has, + hasIn: hasIn$1, + merge: merge, + mergeDeep: mergeDeep$1, + mergeWith: mergeWith, + mergeDeepWith: mergeDeepWith$1, + remove: remove, + removeIn: removeIn, + set: set, + setIn: setIn$1, + update: update$1, + updateIn: updateIn$1, + }; + + // Note: Iterable is deprecated + var Iterable = Collection; + + exports.Collection = Collection; + exports.Iterable = Iterable; + exports.List = List; + exports.Map = Map; + exports.OrderedMap = OrderedMap; + exports.OrderedSet = OrderedSet; + exports.PairSorting = PairSorting; + exports.Range = Range; + exports.Record = Record; + exports.Repeat = Repeat; + exports.Seq = Seq; + exports.Set = Set; + exports.Stack = Stack; + exports.default = Immutable; + exports.fromJS = fromJS; + exports.get = get; + exports.getIn = getIn$1; + exports.has = has; + exports.hasIn = hasIn$1; + exports.hash = hash; + exports.is = is; + exports.isAssociative = isAssociative; + exports.isCollection = isCollection; + exports.isImmutable = isImmutable; + exports.isIndexed = isIndexed; + exports.isKeyed = isKeyed; + exports.isList = isList; + exports.isMap = isMap; + exports.isOrdered = isOrdered; + exports.isOrderedMap = isOrderedMap; + exports.isOrderedSet = isOrderedSet; + exports.isPlainObject = isPlainObject; + exports.isRecord = isRecord; + exports.isSeq = isSeq; + exports.isSet = isSet; + exports.isStack = isStack; + exports.isValueObject = isValueObject; + exports.merge = merge; + exports.mergeDeep = mergeDeep$1; + exports.mergeDeepWith = mergeDeepWith$1; + exports.mergeWith = mergeWith; + exports.remove = remove; + exports.removeIn = removeIn; + exports.set = set; + exports.setIn = setIn$1; + exports.update = update$1; + exports.updateIn = updateIn$1; + exports.version = version; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/node_modules/immutable/dist/immutable.js.flow b/node_modules/immutable/dist/immutable.js.flow new file mode 100644 index 0000000..67a496f --- /dev/null +++ b/node_modules/immutable/dist/immutable.js.flow @@ -0,0 +1,2412 @@ +/** + * This file provides type definitions for use with the Flow type checker. + * + * An important caveat when using these definitions is that the types for + * `Collection.Keyed`, `Collection.Indexed`, `Seq.Keyed`, and so on are stubs. + * When referring to those types, you can get the proper definitions by + * importing the types `KeyedCollection`, `IndexedCollection`, `KeyedSeq`, etc. + * For example, + * + * import { Seq } from 'immutable' + * import type { IndexedCollection, IndexedSeq } from 'immutable' + * + * const someSeq: IndexedSeq = Seq.Indexed.of(1, 2, 3) + * + * function takesASeq>(iter: TS): TS { + * return iter.butLast() + * } + * + * takesASeq(someSeq) + * + * @flow strict + */ + +// Helper type that represents plain objects allowed as arguments to +// some constructors and functions. +type PlainObjInput = { +[key: K]: V, __proto__: null }; + +type K = $Keys; + +// Helper types to extract the "keys" and "values" use by the *In() methods. +type $KeyOf = $Call< + ((?_Collection) => K) & + ((?$ReadOnlyArray) => number) & + ((?RecordInstance | T) => $Keys) & + ((T) => $Keys), + C +>; + +type $ValOf> = $Call< + ((?_Collection) => V) & + ((?$ReadOnlyArray) => T) & + (>(?RecordInstance | T, K) => $ElementType) & + ((T) => $Values), + C, + K +>; + +type $IterableOf = $Call< + ( | IndexedCollection | SetCollection>( + V + ) => Iterable<$ValOf>) & + (< + V: + | KeyedCollection + | RecordInstance + | PlainObjInput + >( + V + ) => Iterable<[$KeyOf, $ValOf]>), + C +>; + +const PairSorting: $ReadOnly<{ LeftThenRight: number, RightThenLeft: number }> = + { + LeftThenRight: -1, + RightThenLeft: +1, + }; + +type Comparator = (left: T, right: T) => number; + +declare class _Collection implements ValueObject { + equals(other: mixed): boolean; + hashCode(): number; + get(key: K, ..._: []): V | void; + get(key: K, notSetValue: NSV): V | NSV; + has(key: K): boolean; + includes(value: V): boolean; + contains(value: V): boolean; + first(notSetValue?: NSV): V | NSV; + last(notSetValue?: NSV): V | NSV; + + hasIn(keyPath: Iterable): boolean; + + getIn(keyPath: [], notSetValue?: mixed): this; + getIn(keyPath: [K], notSetValue: NSV): V | NSV; + getIn>( + keyPath: [K, K2], + notSetValue: NSV + ): $ValOf | NSV; + getIn, K3: $KeyOf<$ValOf>>( + keyPath: [K, K2, K3], + notSetValue: NSV + ): $ValOf<$ValOf, K3> | NSV; + getIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf, K3>, K4> | NSV; + getIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> | NSV; + + update(updater: (value: this) => U): U; + + toJS(): Array | { [key: string]: mixed }; + toJSON(): Array | { [key: string]: V }; + toArray(): Array | Array<[K, V]>; + toObject(): { [key: string]: V }; + toMap(): Map; + toOrderedMap(): OrderedMap; + toSet(): Set; + toOrderedSet(): OrderedSet; + toList(): List; + toStack(): Stack; + toSeq(): Seq; + toKeyedSeq(): KeyedSeq; + toIndexedSeq(): IndexedSeq; + toSetSeq(): SetSeq; + + keys(): Iterator; + values(): Iterator; + entries(): Iterator<[K, V]>; + + keySeq(): IndexedSeq; + valueSeq(): IndexedSeq; + entrySeq(): IndexedSeq<[K, V]>; + + reverse(): this; + sort(comparator?: Comparator): this; + + sortBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: Comparator + ): this; + + groupBy( + grouper: (value: V, key: K, iter: this) => G, + context?: mixed + ): KeyedSeq; + + forEach( + sideEffect: (value: V, key: K, iter: this) => any, + context?: mixed + ): number; + + slice(begin?: number, end?: number): this; + rest(): this; + butLast(): this; + skip(amount: number): this; + skipLast(amount: number): this; + skipWhile( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + skipUntil( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + take(amount: number): this; + takeLast(amount: number): this; + takeWhile( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + takeUntil( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + + filterNot( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): this; + + reduce( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: mixed + ): R; + reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; + + reduceRight( + reducer: (reduction: R, value: V, key: K, iter: this) => R, + initialReduction: R, + context?: mixed + ): R; + reduceRight( + reducer: (reduction: V | R, value: V, key: K, iter: this) => R + ): R; + + every( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): boolean; + some( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): boolean; + join(separator?: string): string; + isEmpty(): boolean; + count( + predicate?: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): number; + countBy( + grouper: (value: V, key: K, iter: this) => G, + context?: mixed + ): Map; + + find( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed, + notSetValue?: NSV + ): V | NSV; + findLast( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed, + notSetValue?: NSV + ): V | NSV; + + findEntry(predicate: (value: V, key: K, iter: this) => mixed): [K, V] | void; + findLastEntry( + predicate: (value: V, key: K, iter: this) => mixed + ): [K, V] | void; + + findKey( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): K | void; + findLastKey( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): K | void; + + keyOf(searchValue: V): K | void; + lastKeyOf(searchValue: V): K | void; + + max(comparator?: Comparator): V; + maxBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: Comparator + ): V; + min(comparator?: Comparator): V; + minBy( + comparatorValueMapper: (value: V, key: K, iter: this) => C, + comparator?: Comparator + ): V; + + isSubset(iter: Iterable): boolean; + isSuperset(iter: Iterable): boolean; +} + +declare function isImmutable( + maybeImmutable: mixed +): boolean %checks(maybeImmutable instanceof Collection); +declare function isCollection( + maybeCollection: mixed +): boolean %checks(maybeCollection instanceof Collection); +declare function isKeyed( + maybeKeyed: mixed +): boolean %checks(maybeKeyed instanceof KeyedCollection); +declare function isIndexed( + maybeIndexed: mixed +): boolean %checks(maybeIndexed instanceof IndexedCollection); +declare function isAssociative( + maybeAssociative: mixed +): boolean %checks(maybeAssociative instanceof KeyedCollection || + maybeAssociative instanceof IndexedCollection); +declare function isOrdered( + maybeOrdered: mixed +): boolean %checks(maybeOrdered instanceof IndexedCollection || + maybeOrdered instanceof OrderedMap || + maybeOrdered instanceof OrderedSet); +declare function isValueObject(maybeValue: mixed): boolean; + +declare function isSeq(maybeSeq: any): boolean %checks(maybeSeq instanceof Seq); +declare function isList(maybeList: any): boolean %checks(maybeList instanceof + List); +declare function isMap(maybeMap: any): boolean %checks(maybeMap instanceof Map); +declare function isOrderedMap( + maybeOrderedMap: any +): boolean %checks(maybeOrderedMap instanceof OrderedMap); +declare function isStack(maybeStack: any): boolean %checks(maybeStack instanceof + Stack); +declare function isSet(maybeSet: any): boolean %checks(maybeSet instanceof Set); +declare function isOrderedSet( + maybeOrderedSet: any +): boolean %checks(maybeOrderedSet instanceof OrderedSet); +declare function isRecord( + maybeRecord: any +): boolean %checks(maybeRecord instanceof Record); + +declare interface ValueObject { + equals(other: mixed): boolean; + hashCode(): number; +} + +declare class Collection extends _Collection { + static Keyed: typeof KeyedCollection; + static Indexed: typeof IndexedCollection; + static Set: typeof SetCollection; + + static isCollection: typeof isCollection; + static isKeyed: typeof isKeyed; + static isIndexed: typeof isIndexed; + static isAssociative: typeof isAssociative; + static isOrdered: typeof isOrdered; +} + +declare class KeyedCollection extends Collection { + static ( + values?: Iterable<[K, V]> | PlainObjInput + ): KeyedCollection; + + toJS(): { [key: string]: mixed }; + toJSON(): { [key: string]: V }; + toArray(): Array<[K, V]>; + @@iterator(): Iterator<[K, V]>; + toSeq(): KeyedSeq; + flip(): KeyedCollection; + + concat( + ...iters: Array | PlainObjInput> + ): KeyedCollection; + + filter(predicate: typeof Boolean): KeyedCollection>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): KeyedCollection; + + partition( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): KeyedCollection; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): KeyedCollection; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): KeyedCollection; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): KeyedCollection; + + flatten(depth?: number): KeyedCollection; + flatten(shallow?: boolean): KeyedCollection; +} + +Collection.Keyed = KeyedCollection; + +declare class IndexedCollection<+T> extends Collection { + static (iter?: Iterable): IndexedCollection; + + toJS(): Array; + toJSON(): Array; + toArray(): Array; + @@iterator(): Iterator; + toSeq(): IndexedSeq; + fromEntrySeq(): KeyedSeq; + interpose(separator: T): this; + interleave(...collections: Iterable[]): this; + splice(index: number, removeNum: number, ...values: T[]): this; + + zip(a: Iterable, ..._: []): IndexedCollection<[T, A]>; + zip( + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedCollection<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): IndexedCollection<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedCollection<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedCollection<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedCollection<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedCollection< + [T | void, A | void, B | void, C | void, D | void, E | void] + >; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedCollection; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedCollection; + + indexOf(searchValue: T): number; + lastIndexOf(searchValue: T): number; + findIndex( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): number; + findLastIndex( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): number; + + concat(...iters: Array | C>): IndexedCollection; + + filter(predicate: typeof Boolean): IndexedCollection<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): IndexedCollection; + + partition( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): IndexedCollection; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): IndexedCollection; + + flatten(depth?: number): IndexedCollection; + flatten(shallow?: boolean): IndexedCollection; +} + +declare class SetCollection<+T> extends Collection { + static (iter?: Iterable): SetCollection; + + toJS(): Array; + toJSON(): Array; + toArray(): Array; + @@iterator(): Iterator; + toSeq(): SetSeq; + + concat(...collections: Iterable[]): SetCollection; + + // `filter`, `map` and `flatMap` cannot be defined further up the hierarchy, + // because the implementation for `KeyedCollection` allows the value type to + // change without constraining the key type. That does not work for + // `SetCollection` - the value and key types *must* match. + filter(predicate: typeof Boolean): SetCollection<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): SetCollection; + + partition( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): SetCollection; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): SetCollection; + + flatten(depth?: number): SetCollection; + flatten(shallow?: boolean): SetCollection; +} + +declare function isSeq(maybeSeq: mixed): boolean %checks(maybeSeq instanceof + Seq); +declare class Seq extends _Collection { + static Keyed: typeof KeyedSeq; + static Indexed: typeof IndexedSeq; + static Set: typeof SetSeq; + + static (values: KeyedSeq): KeyedSeq; + static (values: SetSeq): SetSeq; + static (values: Iterable): IndexedSeq; + static (values?: PlainObjInput): KeyedSeq; + + static isSeq: typeof isSeq; + + size: number | void; + cacheResult(): this; + toSeq(): this; +} + +declare class KeyedSeq extends Seq mixins KeyedCollection { + static ( + values?: Iterable<[K, V]> | PlainObjInput + ): KeyedSeq; + + // Override specialized return types + flip(): KeyedSeq; + + concat( + ...iters: Array | PlainObjInput> + ): KeyedSeq; + + filter(predicate: typeof Boolean): KeyedSeq>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): KeyedSeq; + + partition( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): KeyedSeq; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): KeyedSeq; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): KeyedSeq; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): KeyedSeq; + + flatten(depth?: number): KeyedSeq; + flatten(shallow?: boolean): KeyedSeq; +} + +declare class IndexedSeq<+T> + extends Seq + mixins IndexedCollection +{ + static (values?: Iterable): IndexedSeq; + + static of(...values: T[]): IndexedSeq; + + // Override specialized return types + + concat(...iters: Array | C>): IndexedSeq; + + filter(predicate: typeof Boolean): IndexedSeq<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): IndexedSeq; + + partition( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): IndexedSeq; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): IndexedSeq; + + flatten(depth?: number): IndexedSeq; + flatten(shallow?: boolean): IndexedSeq; + + zip(a: Iterable, ..._: []): IndexedSeq<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): IndexedSeq<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedSeq<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedSeq<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedSeq<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): IndexedSeq<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): IndexedSeq; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): IndexedSeq; +} + +declare class SetSeq<+T> extends Seq mixins SetCollection { + static (values?: Iterable): SetSeq; + + static of(...values: T[]): SetSeq; + + // Override specialized return types + + concat(...collections: Iterable[]): SetSeq; + + filter(predicate: typeof Boolean): SetSeq<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): SetSeq; + + partition( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): SetSeq; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): SetSeq; + + flatten(depth?: number): SetSeq; + flatten(shallow?: boolean): SetSeq; +} + +declare class UpdatableInCollection { + setIn(keyPath: [], value: S): S; + setIn(keyPath: [K], value: V): this; + setIn, S: $ValOf>(keyPath: [K, K2], value: S): this; + setIn, K3: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K3>>( + keyPath: [K, K2, K3], + value: S + ): this; + setIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + S: $ValOf<$ValOf<$ValOf, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + value: S + ): this; + setIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + value: S + ): this; + + deleteIn(keyPath: []): void; + deleteIn(keyPath: [K]): this; + deleteIn>(keyPath: [K, K2]): this; + deleteIn, K3: $KeyOf<$ValOf>>( + keyPath: [K, K2, K3] + ): this; + deleteIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this; + deleteIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this; + + removeIn(keyPath: []): void; + removeIn(keyPath: [K]): this; + removeIn>(keyPath: [K, K2]): this; + removeIn, K3: $KeyOf<$ValOf>>( + keyPath: [K, K2, K3] + ): this; + removeIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this; + removeIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this; + + updateIn(keyPath: [], notSetValue: mixed, updater: (value: this) => U): U; + updateIn(keyPath: [], updater: (value: this) => U): U; + updateIn(keyPath: [K], notSetValue: NSV, updater: (value: V) => V): this; + updateIn(keyPath: [K], updater: (value: V) => V): this; + updateIn, S: $ValOf>( + keyPath: [K, K2], + notSetValue: NSV, + updater: (value: $ValOf | NSV) => S + ): this; + updateIn, S: $ValOf>( + keyPath: [K, K2], + updater: (value: $ValOf) => S + ): this; + updateIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K3> + >( + keyPath: [K, K2, K3], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf, K3> | NSV) => S + ): this; + updateIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K3> + >( + keyPath: [K, K2, K3], + updater: (value: $ValOf<$ValOf, K3>) => S + ): this; + updateIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + S: $ValOf<$ValOf<$ValOf, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf, K3>, K4> | NSV) => S + ): this; + updateIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + S: $ValOf<$ValOf<$ValOf, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + updater: (value: $ValOf<$ValOf<$ValOf, K3>, K4>) => S + ): this; + updateIn< + NSV, + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> | NSV + ) => S + ): this; + updateIn< + K2: $KeyOf, + K3: $KeyOf<$ValOf>, + K4: $KeyOf<$ValOf<$ValOf, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5>) => S + ): this; +} + +declare function isList(maybeList: mixed): boolean %checks(maybeList instanceof + List); +declare class List<+T> + extends IndexedCollection + mixins UpdatableInCollection +{ + static (collection?: Iterable): List; + + static of(...values: T[]): List; + + static isList: typeof isList; + + size: number; + + set(index: number, value: U): List; + delete(index: number): this; + remove(index: number): this; + insert(index: number, value: U): List; + clear(): this; + push(...values: U[]): List; + pop(): this; + unshift(...values: U[]): List; + shift(): this; + + update(updater: (value: this) => U): U; + update(index: number, updater: (value: T) => U): List; + update( + index: number, + notSetValue: U, + updater: (value: T) => U + ): List; + + merge(...collections: Iterable[]): List; + + setSize(size: number): this; + + mergeIn(keyPath: Iterable, ...collections: Iterable[]): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: Iterable[] + ): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + concat(...iters: Array | C>): List; + + filter(predicate: typeof Boolean): List<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): List; + + partition( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): List; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): List; + + flatten(depth?: number): List; + flatten(shallow?: boolean): List; + + zip(a: Iterable, ..._: []): List<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): List<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): List<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): List<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): List<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): List<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): List<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): List; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): List; +} + +declare function isMap(maybeMap: mixed): boolean %checks(maybeMap instanceof + Map); +declare class Map + extends KeyedCollection + mixins UpdatableInCollection +{ + static (values?: Iterable<[K, V]> | PlainObjInput): Map; + + static isMap: typeof isMap; + + size: number; + + set(key: K_, value: V_): Map; + delete(key: K): this; + remove(key: K): this; + clear(): this; + + deleteAll(keys: Iterable): Map; + removeAll(keys: Iterable): Map; + + update(updater: (value: this) => U): U; + update(key: K, updater: (value: V) => V_): Map; + update( + key: K, + notSetValue: V_, + updater: (value: V) => V_ + ): Map; + + merge( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + concat( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + + mergeWith( + merger: (oldVal: V, newVal: W, key: K) => X, + ...collections: (Iterable<[K_, W]> | PlainObjInput)[] + ): Map; + + mergeDeep( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + + mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => mixed, + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): Map; + + mergeIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + flip(): Map; + + filter(predicate: typeof Boolean): Map>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): Map; + + partition( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): Map; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): Map; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): Map; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): Map; + + flatten(depth?: number): Map; + flatten(shallow?: boolean): Map; +} + +declare function isOrderedMap( + maybeOrderedMap: mixed +): boolean %checks(maybeOrderedMap instanceof OrderedMap); +declare class OrderedMap + extends Map + mixins UpdatableInCollection +{ + static ( + values?: Iterable<[K, V]> | PlainObjInput + ): OrderedMap; + + static isOrderedMap: typeof isOrderedMap; + + size: number; + + set(key: K_, value: V_): OrderedMap; + delete(key: K): this; + remove(key: K): this; + clear(): this; + + update(updater: (value: this) => U): U; + update(key: K, updater: (value: V) => V_): OrderedMap; + update( + key: K, + notSetValue: V_, + updater: (value: V) => V_ + ): OrderedMap; + + merge( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + concat( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + + mergeWith( + merger: (oldVal: V, newVal: W, key: K) => X, + ...collections: (Iterable<[K_, W]> | PlainObjInput)[] + ): OrderedMap; + + mergeDeep( + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + + mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => mixed, + ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] + ): OrderedMap; + + mergeIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + mergeDeepIn( + keyPath: Iterable, + ...collections: (Iterable | PlainObjInput)[] + ): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + flip(): OrderedMap; + + filter(predicate: typeof Boolean): OrderedMap>; + filter( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): OrderedMap; + + partition( + predicate: (value: V, key: K, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: V, key: K, iter: this) => M, + context?: mixed + ): OrderedMap; + + mapKeys( + mapper: (key: K, value: V, iter: this) => M, + context?: mixed + ): OrderedMap; + + mapEntries( + mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], + context?: mixed + ): OrderedMap; + + flatMap( + mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, + context?: mixed + ): OrderedMap; + + flatten(depth?: number): OrderedMap; + flatten(shallow?: boolean): OrderedMap; +} + +declare function isSet(maybeSet: mixed): boolean %checks(maybeSet instanceof + Set); +declare class Set<+T> extends SetCollection { + static (values?: Iterable): Set; + + static of(...values: T[]): Set; + static fromKeys( + values: Iterable<[T, mixed]> | PlainObjInput + ): Set; + + static intersect(sets: Iterable>): Set; + static union(sets: Iterable>): Set; + + static isSet: typeof isSet; + + size: number; + + add(value: U): Set; + delete(value: T): this; + remove(value: T): this; + clear(): this; + union(...collections: Iterable[]): Set; + merge(...collections: Iterable[]): Set; + concat(...collections: Iterable[]): Set; + intersect(...collections: Iterable[]): Set; + subtract(...collections: Iterable[]): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + filter(predicate: typeof Boolean): Set<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): Set; + + partition( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): Set; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): Set; + + flatten(depth?: number): Set; + flatten(shallow?: boolean): Set; +} + +// Overrides except for `isOrderedSet` are for specialized return types +declare function isOrderedSet( + maybeOrderedSet: mixed +): boolean %checks(maybeOrderedSet instanceof OrderedSet); +declare class OrderedSet<+T> extends Set { + static (values?: Iterable): OrderedSet; + + static of(...values: T[]): OrderedSet; + static fromKeys( + values: Iterable<[T, mixed]> | PlainObjInput + ): OrderedSet; + + static isOrderedSet: typeof isOrderedSet; + + size: number; + + add(value: U): OrderedSet; + union(...collections: Iterable[]): OrderedSet; + merge(...collections: Iterable[]): OrderedSet; + concat(...collections: Iterable[]): OrderedSet; + intersect(...collections: Iterable[]): OrderedSet; + + filter(predicate: typeof Boolean): OrderedSet<$NonMaybeType>; + filter( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): OrderedSet; + + partition( + predicate: (value: T, value: T, iter: this) => mixed, + context?: mixed + ): [this, this]; + + map( + mapper: (value: T, value: T, iter: this) => M, + context?: mixed + ): OrderedSet; + + flatMap( + mapper: (value: T, value: T, iter: this) => Iterable, + context?: mixed + ): OrderedSet; + + flatten(depth?: number): OrderedSet; + flatten(shallow?: boolean): OrderedSet; + + zip(a: Iterable, ..._: []): OrderedSet<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): OrderedSet<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): OrderedSet<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): OrderedSet<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): OrderedSet<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): OrderedSet<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): OrderedSet<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): OrderedSet; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): OrderedSet; +} + +declare function isStack( + maybeStack: mixed +): boolean %checks(maybeStack instanceof Stack); +declare class Stack<+T> extends IndexedCollection { + static (collection?: Iterable): Stack; + + static isStack(maybeStack: mixed): boolean; + static of(...values: T[]): Stack; + + static isStack: typeof isStack; + + size: number; + + peek(): T; + clear(): this; + unshift(...values: U[]): Stack; + unshiftAll(iter: Iterable): Stack; + shift(): this; + push(...values: U[]): Stack; + pushAll(iter: Iterable): Stack; + pop(): this; + + withMutations(mutator: (mutable: this) => mixed): this; + asMutable(): this; + wasAltered(): boolean; + asImmutable(): this; + + // Override specialized return types + + concat(...iters: Array | C>): Stack; + + filter(predicate: typeof Boolean): Stack<$NonMaybeType>; + filter( + predicate: (value: T, index: number, iter: this) => mixed, + context?: mixed + ): Stack; + + map( + mapper: (value: T, index: number, iter: this) => M, + context?: mixed + ): Stack; + + flatMap( + mapper: (value: T, index: number, iter: this) => Iterable, + context?: mixed + ): Stack; + + flatten(depth?: number): Stack; + flatten(shallow?: boolean): Stack; + + zip(a: Iterable, ..._: []): Stack<[T, A]>; + zip(a: Iterable, b: Iterable, ..._: []): Stack<[T, A, B]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): Stack<[T, A, B, C]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): Stack<[T, A, B, C, D]>; + zip( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): Stack<[T, A, B, C, D, E]>; + + zipAll(a: Iterable, ..._: []): Stack<[T | void, A | void]>; + zipAll( + a: Iterable, + b: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void, C | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void, C | void, D | void]>; + zipAll( + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): Stack<[T | void, A | void, B | void, C | void, D | void, E | void]>; + + zipWith( + zipper: (value: T, a: A) => R, + a: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B) => R, + a: Iterable, + b: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B, c: C) => R, + a: Iterable, + b: Iterable, + c: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + ..._: [] + ): Stack; + zipWith( + zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, + a: Iterable, + b: Iterable, + c: Iterable, + d: Iterable, + e: Iterable, + ..._: [] + ): Stack; +} + +declare function Range( + start?: number, + end?: number, + step?: number +): IndexedSeq; +declare function Repeat(value: T, times?: number): IndexedSeq; + +// The type of a Record factory function. +type RecordFactory = Class>; + +// The type of runtime Record instances. +type RecordOf = RecordInstance & $ReadOnly; + +// The values of a Record instance. +type _RecordValues | T> = R; +type RecordValues = _RecordValues<*, R>; + +declare function isRecord( + maybeRecord: any +): boolean %checks(maybeRecord instanceof RecordInstance); +declare class Record { + static (spec: Values, name?: string): typeof RecordInstance; + constructor( + spec: Values, + name?: string + ): typeof RecordInstance; + + static isRecord: typeof isRecord; + + static getDescriptiveName(record: RecordInstance): string; +} + +declare class RecordInstance { + static (values?: Iterable<[$Keys, $ValOf]> | $Shape): RecordOf; + // Note: a constructor can only create an instance of RecordInstance, + // it's encouraged to not use `new` when creating Records. + constructor(values?: Iterable<[$Keys, $ValOf]> | $Shape): void; + + size: number; + + has(key: string): boolean; + + get>(key: K, ..._: []): $ElementType; + get, NSV>(key: K, notSetValue: NSV): $ElementType | NSV; + + hasIn(keyPath: Iterable): boolean; + + getIn(keyPath: [], notSetValue?: mixed): this & $ReadOnly; + getIn>(keyPath: [K], notSetValue?: mixed): $ElementType; + getIn, K2: $KeyOf<$ValOf>>( + keyPath: [K, K2], + notSetValue: NSV + ): $ValOf<$ValOf, K2> | NSV; + getIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> + >( + keyPath: [K, K2, K3], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf, K2>, K3> | NSV; + getIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV; + getIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV + ): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV; + + equals(other: any): boolean; + hashCode(): number; + + set>(key: K, value: $ElementType): this & $ReadOnly; + update>( + key: K, + updater: (value: $ElementType) => $ElementType + ): this & $ReadOnly; + merge( + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + mergeDeep( + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + + mergeWith( + merger: (oldVal: $ValOf, newVal: $ValOf, key: $Keys) => $ValOf, + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => any, + ...collections: Array, $ValOf]> | $Shape> + ): this & $ReadOnly; + + delete>(key: K): this & $ReadOnly; + remove>(key: K): this & $ReadOnly; + clear(): this & $ReadOnly; + + setIn(keyPath: [], value: S): S; + setIn, S: $ValOf>( + keyPath: [K], + value: S + ): this & $ReadOnly; + setIn, K2: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K2>>( + keyPath: [K, K2], + value: S + ): this & $ReadOnly; + setIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> + >( + keyPath: [K, K2, K3], + value: S + ): this & $ReadOnly; + setIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + value: S + ): this & $ReadOnly; + setIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + value: S + ): this & $ReadOnly; + + deleteIn(keyPath: []): void; + deleteIn>(keyPath: [K]): this & $ReadOnly; + deleteIn, K2: $KeyOf<$ValOf>>( + keyPath: [K, K2] + ): this & $ReadOnly; + deleteIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> + >( + keyPath: [K, K2, K3] + ): this & $ReadOnly; + deleteIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this & $ReadOnly; + deleteIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this & $ReadOnly; + + removeIn(keyPath: []): void; + removeIn>(keyPath: [K]): this & $ReadOnly; + removeIn, K2: $KeyOf<$ValOf>>( + keyPath: [K, K2] + ): this & $ReadOnly; + removeIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> + >( + keyPath: [K, K2, K3] + ): this & $ReadOnly; + removeIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> + >( + keyPath: [K, K2, K3, K4] + ): this & $ReadOnly; + removeIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> + >( + keyPath: [K, K2, K3, K4, K5] + ): this & $ReadOnly; + + updateIn( + keyPath: [], + notSetValue: mixed, + updater: (value: this & T) => U + ): U; + updateIn(keyPath: [], updater: (value: this & T) => U): U; + updateIn, S: $ValOf>( + keyPath: [K], + notSetValue: NSV, + updater: (value: $ValOf) => S + ): this & $ReadOnly; + updateIn, S: $ValOf>( + keyPath: [K], + updater: (value: $ValOf) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2> + >( + keyPath: [K, K2], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf, K2> | NSV) => S + ): this & $ReadOnly; + updateIn, K2: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K2>>( + keyPath: [K, K2], + updater: (value: $ValOf<$ValOf, K2>) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> + >( + keyPath: [K, K2, K3], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3> | NSV) => S + ): this & $ReadOnly; + updateIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> + >( + keyPath: [K, K2, K3], + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3>) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV + ) => S + ): this & $ReadOnly; + updateIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> + >( + keyPath: [K, K2, K3, K4], + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>) => S + ): this & $ReadOnly; + updateIn< + NSV, + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV + ) => S + ): this & $ReadOnly; + updateIn< + K: $Keys, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + >( + keyPath: [K, K2, K3, K4, K5], + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + ) => S + ): this & $ReadOnly; + + mergeIn( + keyPath: Iterable, + ...collections: Array + ): this & $ReadOnly; + mergeDeepIn( + keyPath: Iterable, + ...collections: Array + ): this & $ReadOnly; + + toSeq(): KeyedSeq<$Keys, any>; + + toJS(): { [key: $Keys]: mixed }; + toJSON(): T; + toObject(): T; + + withMutations(mutator: (mutable: this & T) => mixed): this & $ReadOnly; + asMutable(): this & $ReadOnly; + wasAltered(): boolean; + asImmutable(): this & $ReadOnly; + + @@iterator(): Iterator<[$Keys, $ValOf]>; +} + +declare function fromJS( + jsValue: mixed, + reviver?: ( + key: string | number, + sequence: KeyedCollection | IndexedCollection, + path?: Array + ) => mixed +): Collection; + +declare function is(first: mixed, second: mixed): boolean; +declare function hash(value: mixed): number; + +declare function get>( + collection: C, + key: K, + notSetValue: mixed +): $ValOf; +declare function get, NSV>( + collection: C, + key: K, + notSetValue: NSV +): $ValOf | NSV; + +declare function has(collection: Object, key: mixed): boolean; +declare function remove(collection: C, key: $KeyOf): C; +declare function set, V: $ValOf>( + collection: C, + key: K, + value: V +): C; +declare function update, V: $ValOf, NSV>( + collection: C, + key: K, + notSetValue: NSV, + updater: ($ValOf | NSV) => V +): C; +declare function update, V: $ValOf>( + collection: C, + key: K, + updater: ($ValOf) => V +): C; + +declare function getIn(collection: C, keyPath: [], notSetValue?: mixed): C; +declare function getIn, NSV>( + collection: C, + keyPath: [K], + notSetValue: NSV +): $ValOf | NSV; +declare function getIn, K2: $KeyOf<$ValOf>, NSV>( + collection: C, + keyPath: [K, K2], + notSetValue: NSV +): $ValOf<$ValOf, K2> | NSV; +declare function getIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + NSV +>( + collection: C, + keyPath: [K, K2, K3], + notSetValue: NSV +): $ValOf<$ValOf<$ValOf, K2>, K3> | NSV; +declare function getIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4], + notSetValue: NSV +): $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV; +declare function getIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV +): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV; + +declare function hasIn(collection: Object, keyPath: Iterable): boolean; + +declare function removeIn(collection: C, keyPath: []): void; +declare function removeIn>(collection: C, keyPath: [K]): C; +declare function removeIn, K2: $KeyOf<$ValOf>>( + collection: C, + keyPath: [K, K2] +): C; +declare function removeIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>> +>( + collection: C, + keyPath: [K, K2, K3] +): C; +declare function removeIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> +>( + collection: C, + keyPath: [K, K2, K3, K4] +): C; +declare function removeIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> +>( + collection: C, + keyPath: [K, K2, K3, K4, K5] +): C; + +declare function setIn(collection: Object, keyPath: [], value: S): S; +declare function setIn, S: $ValOf>( + collection: C, + keyPath: [K], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2> +>( + collection: C, + keyPath: [K, K2], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> +>( + collection: C, + keyPath: [K, K2, K3], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> +>( + collection: C, + keyPath: [K, K2, K3, K4], + value: S +): C; +declare function setIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + value: S +): C; + +declare function updateIn( + collection: C, + keyPath: [], + notSetValue: mixed, + updater: (value: C) => S +): S; +declare function updateIn( + collection: C, + keyPath: [], + updater: (value: C) => S +): S; +declare function updateIn, S: $ValOf, NSV>( + collection: C, + keyPath: [K], + notSetValue: NSV, + updater: (value: $ValOf | NSV) => S +): C; +declare function updateIn, S: $ValOf>( + collection: C, + keyPath: [K], + updater: (value: $ValOf) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2>, + NSV +>( + collection: C, + keyPath: [K, K2], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf, K2> | NSV) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + S: $ValOf<$ValOf, K2> +>( + collection: C, + keyPath: [K, K2], + updater: (value: $ValOf<$ValOf, K2>) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3>, + NSV +>( + collection: C, + keyPath: [K, K2, K3], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3> | NSV) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + S: $ValOf<$ValOf<$ValOf, K2>, K3> +>( + collection: C, + keyPath: [K, K2, K3], + updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3>) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4], + notSetValue: NSV, + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> +>( + collection: C, + keyPath: [K, K2, K3, K4], + updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5>, + NSV +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + notSetValue: NSV, + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV + ) => S +): C; +declare function updateIn< + C, + K: $KeyOf, + K2: $KeyOf<$ValOf>, + K3: $KeyOf<$ValOf<$ValOf, K2>>, + K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, + K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, + S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> +>( + collection: C, + keyPath: [K, K2, K3, K4, K5], + updater: ( + value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> + ) => S +): C; + +declare function merge( + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; +declare function mergeWith( + merger: (oldVal: $ValOf, newVal: $ValOf, key: $KeyOf) => $ValOf, + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; +declare function mergeDeep( + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; +declare function mergeDeepWith( + merger: (oldVal: any, newVal: any, key: any) => mixed, + collection: C, + ...collections: Array< + | $IterableOf + | $Shape> + | PlainObjInput<$KeyOf, $ValOf> + > +): C; + +export { + Collection, + Seq, + List, + Map, + OrderedMap, + OrderedSet, + Range, + Repeat, + Record, + Set, + Stack, + fromJS, + is, + hash, + isImmutable, + isCollection, + isKeyed, + isIndexed, + isAssociative, + isOrdered, + isRecord, + isValueObject, + get, + has, + remove, + set, + update, + getIn, + hasIn, + removeIn, + setIn, + updateIn, + merge, + mergeWith, + mergeDeep, + mergeDeepWith, +}; + +export default { + Collection, + Seq, + + List, + Map, + OrderedMap, + OrderedSet, + PairSorting, + Range, + Repeat, + Record, + Set, + Stack, + + fromJS, + is, + hash, + + isImmutable, + isCollection, + isKeyed, + isIndexed, + isAssociative, + isOrdered, + isRecord, + isValueObject, + + get, + has, + remove, + set, + update, + getIn, + hasIn, + removeIn, + setIn, + updateIn, + merge, + mergeWith, + mergeDeep, + mergeDeepWith, +}; + +export type { + Comparator, + KeyedCollection, + IndexedCollection, + SetCollection, + KeyedSeq, + IndexedSeq, + SetSeq, + RecordFactory, + RecordOf, + RecordInstance, + ValueObject, + $KeyOf, + $ValOf, +}; diff --git a/node_modules/immutable/dist/immutable.min.js b/node_modules/immutable/dist/immutable.min.js new file mode 100644 index 0000000..641cdbe --- /dev/null +++ b/node_modules/immutable/dist/immutable.min.js @@ -0,0 +1,55 @@ +/** + * MIT License + * + * Copyright (c) 2014-present, Lee Byron and other contributors. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Immutable={})}(this,function(t){"use strict";var e="delete",d=5,l=1<>>0;if(""+r!==e||4294967295==r)return NaN;e=r}return e<0?c(t)+e:e}function r(){return!0}function p(t,e,r){return(0===t&&!i(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&r<=e)}function y(t,e){return n(t,e,0)}function w(t,e){return n(t,e,e)}function n(t,e,r){return void 0===t?r:i(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function i(t){return t<0||0===t&&1/t==-1/0}var o="@@__IMMUTABLE_ITERABLE__@@";function f(t){return!(!t||!t[o])}var s="@@__IMMUTABLE_KEYED__@@";function a(t){return!(!t||!t[s])}var S="@@__IMMUTABLE_INDEXED__@@";function z(t){return!(!t||!t[S])}function b(t){return a(t)||z(t)}function I(t){return f(t)?t:F(t)}var O=function(t){function e(t){return a(t)?t:G(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I),E=function(t){function e(t){return z(t)?t:Z(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I),j=function(t){function e(t){return f(t)&&!b(t)?t:$(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I);I.Keyed=O,I.Indexed=E,I.Set=j;var q="@@__IMMUTABLE_SEQ__@@";function M(t){return!(!t||!t[q])}var D="@@__IMMUTABLE_RECORD__@@";function x(t){return!(!t||!t[D])}function A(t){return f(t)||x(t)}var k="@@__IMMUTABLE_ORDERED__@@";function R(t){return!(!t||!t[k])}var U=0,T=1,K=2,L="function"==typeof Symbol&&Symbol.iterator,C="@@iterator",B=L||C,P=function(t){this.next=t};function W(t,e,r,n){r=0===t?e:1===t?r:[e,r];return n?n.value=r:n={value:r,done:!1},n}function N(){return{value:void 0,done:!0}}function H(t){return Array.isArray(t +)||Y(t)}function J(t){return t&&"function"==typeof t.next}function V(t){var e=Y(t);return e&&e.call(t)}function Y(t){t=t&&(L&&t[L]||t[C]);if("function"==typeof t)return t}P.prototype.toString=function(){return"[Iterator]"},P.KEYS=U,P.VALUES=T,P.ENTRIES=K,P.prototype.inspect=P.prototype.toSource=function(){return""+this},P.prototype[B]=function(){return this};var Q=Object.prototype.hasOwnProperty;function X(t){return Array.isArray(t)||"string"==typeof t||t&&"object"==typeof t&&Number.isInteger(t.length)&&0<=t.length&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var F=function(t){function e(t){return null==t?it():A(t)?t.toSeq():function(t){var e=st(t);if(e)return function(t){var e=Y(t);return e&&e===t.entries}(t)?e.fromEntrySeq():function(t){var e=Y(t);return e&&e===t.keys}(t)?e.toSetSeq():e;if("object"!=typeof t)throw new TypeError("Expected Array or collection object of values, or keyed object: "+t);return new et(t)}(t)}return e.__proto__=t,((e.prototype=Object.create(t.prototype)).constructor=e).prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(e,r){var n=this._cache;if(n){var i=n.length,o=0;return new P(function(){if(o===i)return N();var t=n[r?i-++o:o++];return W(e,t[0],t[1])})}return this.__iteratorUncached(e,r)},e}(I),G=function(t){function e(t){return null==t?it().toKeyedSeq():f(t)?a(t)?t.toSeq():t.fromEntrySeq():x(t)?t.toSeq():ot(t)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.toKeyedSeq=function(){return this},e}(F),Z=function(t){function e(t){return null==t?it():f(t)?a(t)?t.entrySeq():t.toIndexedSeq():x(t +)?t.toSeq().entrySeq():ut(t)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(F),$=function(t){function e(t){return(f(t)&&!b(t)?t:Z(t)).toSetSeq()}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(F);F.isSeq=M,F.Keyed=G,F.Set=$,F.Indexed=Z,F.prototype[q]=!0;var tt=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.get=function(t,e){return this.has(t)?this._array[h(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(e,r){var n=this._array,i=n.length,o=0;return new P(function(){if(o===i)return N();var t=r?i-++o:o++;return W(e,t,n[t])})},e}(Z),et=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return Q.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var u=n[e?i-++o:o++];if(!1===t(r[u],u,this))break}return o},e.prototype.__iterator=function(e,r){var n=this._object,i=this._keys,o=i.length,u=0;return new P(function(){if(u===o)return N();var t=i[r?o-++u:u++];return W(e,t,n[t])})},e}(G);et.prototype[k]=!0;var rt,nt=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__iterateUncached=function(t,e){ +if(e)return this.cacheResult().__iterate(t,e);var r,n=V(this._collection),i=0;if(J(n))for(;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},e.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=V(this._collection);if(!J(r))return new P(N);var n=0;return new P(function(){var t=r.next();return t.done?t:W(e,n++,t.value)})},e}(Z);function it(){return rt=rt||new tt([])}function ot(t){var e=st(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new et(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function ut(t){var e=st(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function st(t){return X(t)?new tt(t):H(t)?new nt(t):void 0}var at="@@__IMMUTABLE_MAP__@@";function ct(t){return!(!t||!t[at])}function ft(t){return ct(t)&&R(t)}function ht(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function _t(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(ht(t)&&ht(e)&&t.equals(e))}var pt="function"==typeof Math.imul&&-2==Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function lt(t){return t>>>1&1073741824|3221225471&t}var vt=Object.prototype.valueOf;function yt(t){if(null==t)return dt(t);if("function"==typeof t.hashCode)return lt(t.hashCode(t));var e,r=(e=t).valueOf!==vt&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return dt(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;4294967295c)return N();var t=r.next();return a||e===T||t.done?t:W(e,i-1,e===U?void 0:t.value[1],t)})},r}function Bt(e,c,f,h){var t=Xt(e);return t.__iterateUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterate(n,t);var o=!0,u=0;return e.__iterate(function(t,e,r){if(!(o=o&&c.call(f,t,e,r)))return u++,n(t,h?e:u-1,i)}),u},t.__iteratorUncached=function(i,t){var o=this;if(t)return this.cacheResult().__iterator(i,t);var u=e.__iterator(K,t),s=!0,a=0;return new P(function(){var t;do{if((t=u.next()).done)return h||i===T?t:W(i,a++,i===U?void 0:t.value[1],t);var e=t.value,r=e[0],n=e[1];s=s&&c.call(f,n,r,o)}while(s);return i===K?t:W(i,r,n,t)})},t}function Pt(t,s,a){var c=Xt(t);return c.__iterateUncached=function(i,e){if(e)return this.cacheResult().__iterate(i,e);var o=0,u=!1;return function r(t,n){t.__iterate(function(t,e){return(!s||n>>t)&g),o=this.bitmap;return 0==(o&i)?n:this.nodes[$e(o&i-1)].get(t+d,e,r,n)},Ce.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=yt(n));var s=(0===e?r:r>>>e)&g,a=1<>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new Be(t,o+1,u)}(t,_,c,s,u);if(f&&!u&&2===_.length&&Ge(_[1^h]))return _[1^h];if(f&&u&&1===_.length&&Ge(u))return u;s=t&&t===this.ownerID,a=f?u?c:c^a:c|a,u=f?u?tr(_,h,u,s):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u>>t)&g];return i?i.get(t+d,e,r,n):n},Be.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=yt(n));var s=(0===e?r:r>>>e)&g,a=this.nodes,c=a[s];if(i===v&&!c)return this;o=Fe(c,t,e+d,r,n,i,o,u);if(o===c)return this;u=this.count;if(c){if(!o&&--u>>r)&g,u=(0===r?n:n>>>r)&g,t=o==u?[Ze(t,e,r+d,n,i)]:(i=new We(e,n,i),o>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function tr(t,e,r,n){t=n?t:Zt(t);return t[e]=r,t}var er=l/4,rr=l/2,nr=l/4,ir="@@__IMMUTABLE_LIST__@@";function or(t){return!(!t||!t[ir])}var ur=function(o){function t(t){var e=pr();if(null==t)return e;if(or(t))return t;var n=o(t),i=n.size;return 0===i?e:(te(i),0=gr(t._capacity)?n=lr(n,t.__ownerID,0,e,r,o):i=lr(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return _r(t._origin,t._capacity,t._level,i,n)}(this,t,e)},t.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},t.prototype.insert=function(t,e){return this.splice(t,0,e)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=d,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):pr()},t.prototype.push=function(){var r=arguments,n=this.size;return this.withMutations(function(t){dr(t,0,n+r.length);for(var e=0;e>>e&g;if(this.array.length<=n)return new ar([],t);var i=0==n;if(0>>e&g;if(this.array.length<=n)return this;if(0>e,u=1+(c-r>>e);l>>r&g,a=t&&s=gr(t._capacity))return t._tail;if(e<1<>>n&g],n-=d;return r}}function dr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new m,i=t._origin,o=t._capacity,u=i+e,s=void 0===r?o:r<0?o+r:i+r;if(u===i&&s===o)return t;if(s<=u)return t.clear();for(var a=t._level,c=t._root,f=0;u+f<0;)c=new ar(c&&c.array.length?[void 0,c]:[],n),f+=1<<(a+=d);f&&(u+=f,i+=f,s+=f,o+=f);for(var h=gr(o),_=gr(s);1<>>l&g,p=p.array[v]=vr(p.array[v],n);p.array[h>>>d&g]=e}if(s>>a&g;if(y!=_>>>a&g)break;y&&(f+=(1<>>d<>>-15,461845907),e=pt(e<<13|e>>>-13,5),e=pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=lt((e=pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+sn(yt(t),yt(e))|0}:function(t,e){n=n+sn(yt(t),yt(e))|0}:e?function(t){n=31*n+yt(t)|0}:function(t){n=n+yt(t)|0}),n)}(this))}});var Xr=I.prototype;Xr[o]=!0,Xr[B]=Xr.values,Xr.toJSON=Xr.toArray,Xr.__toStringMapper=oe,Xr.inspect=Xr.toSource=function(){return""+this},Xr.chain=Xr.flatMap,Xr.contains=Xr.includes,Ur(O,{flip:function(){return Vt(this,Ut(this))},mapEntries:function(r,n){var i=this,o=0;return Vt(this,this.toSeq().map(function(t,e){return r.call(n,[e,t],o++,i)}).fromEntrySeq())},mapKeys:function(r,n){var i=this;return Vt(this,this.toSeq().flip().map(function(t,e){return r.call(n,t,e,i)}).flip())}});var Fr=O.prototype;Fr[s]=!0,Fr[B]=Xr.entries,Fr.toJSON=Qr,Fr.__toStringMapper=function(t,e){return oe(e)+": "+oe(t)},Ur(E,{toKeyedSeq:function(){return new xt(this,!1)},filter:function(t,e){return Vt(this,Lt(this,t,e,!1))},findIndex:function(t,e){e=this.findEntry(t,e);return e?e[0]:-1},indexOf:function(t){t=this.keyOf(t);return void 0===t?-1:t},lastIndexOf:function(t){t=this.lastKeyOf(t);return void 0===t?-1:t},reverse:function(){return Vt(this,Kt(this,!1))},slice:function(t,e){return Vt(this,Ct(this,t,e,!1))},splice:function(t,e){ +var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=y(t,t<0?this.count():this.size);var n=this.slice(0,t);return Vt(this,1===r?n:n.concat(Zt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){e=this.findLastEntry(t,e);return e?e[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Vt(this,Pt(this,t,!1))},get:function(r,t){return(r=h(this,r))<0||this.size===1/0||void 0!==this.size&&this.size>2)|0}Zr.has=Xr.includes,Zr.contains=Zr.includes,Zr.keys=Zr.values,Ur(G,Fr),Ur(Z,Gr),Ur($,Zr);var an=function(t){function e(r){return null==r?_n():kr(r)?r:_n().withMutations(function(e){var t=j(r);te(t.size),t.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return this(arguments)},e.fromKeys=function(t){return this(O(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Kr);an.isOrderedSet=kr;var cn,fn=an.prototype;function hn(t,e){var r=Object.create(fn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function _n(){return cn=cn||hn(zr())}fn[k]=!0,fn.zip=Gr.zip,fn.zipWith=Gr.zipWith,fn.zipAll=Gr.zipAll,fn.__empty=_n,fn.__make=hn;Zr={LeftThenRight:-1,RightThenLeft:1};Gr=function(u,s){var a;!function(t){if(x(t))throw Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(A(t))throw Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(u);var c=function(t){var n=this;if(t instanceof c)return t;if(!(this instanceof c))return new c(t);if(!a){a=!0;var e=Object.keys(u),r=f._indices={};f._name=s,f._keys=e,f._defaultValues=u;for(var i=0;i 5 February 2024 + +- [Dev Deps] update `aud`, `npmignore`, `tape` [`89c88c1`](https://github.com/ljharb/internal-slot/commit/89c88c1ed8de7c681fd3cec7bb2f045db0268d84) +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`b437631`](https://github.com/ljharb/internal-slot/commit/b4376312d4a5d7bc99fb383cae3f15bd2f3d36d1) + +#### [v1.0.6](https://github.com/ljharb/internal-slot/compare/v1.0.5...v1.0.6) + +> 20 October 2023 + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`4d568d2`](https://github.com/ljharb/internal-slot/commit/4d568d2897a2efe9b0604ae240bc89787924070f) +- [Refactor] use `hasown` instead of `has` [`f946e94`](https://github.com/ljharb/internal-slot/commit/f946e94885f5fa092a4de04f366d746c0c5a2f2f) +- [Deps] update `get-intrinsic` [`1bbc885`](https://github.com/ljharb/internal-slot/commit/1bbc885b0225dadac6e50f421cda5814c242b0bb) +- [meta] remove unused `.eslintignore` [`6fdde1a`](https://github.com/ljharb/internal-slot/commit/6fdde1a25348cf9fc41c9808d342e6502f37658d) + +#### [v1.0.5](https://github.com/ljharb/internal-slot/compare/v1.0.4...v1.0.5) + +> 9 February 2023 + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`e427703`](https://github.com/ljharb/internal-slot/commit/e427703bfc669c590a863ec77ecd3789d7b7c458) +- [Deps] update `get-intrinsic` [`aa652f0`](https://github.com/ljharb/internal-slot/commit/aa652f05c5c15b4ed1a118be60f0565e47bd7208) +- [Fix] improve assertion message [`8df86e3`](https://github.com/ljharb/internal-slot/commit/8df86e3ea21786b5eb7654f22202665c8b63accf) + +#### [v1.0.4](https://github.com/ljharb/internal-slot/compare/v1.0.3...v1.0.4) + +> 13 December 2022 + +- [actions] reuse common workflows [`82a1aee`](https://github.com/ljharb/internal-slot/commit/82a1aee603bce8627930597edb3a04b4970ed151) +- [meta] use `npmignore` to autogenerate an npmignore file [`56f7e71`](https://github.com/ljharb/internal-slot/commit/56f7e7182dd934dd6c1b80497a110670d02a91b9) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`e25ff67`](https://github.com/ljharb/internal-slot/commit/e25ff67d568f77c1b66168957d82b080779e1c0a) +- [actions] update rebase action to use reusable workflow [`227e81e`](https://github.com/ljharb/internal-slot/commit/227e81eaef7230a265103ef1ef0618d2920c3f30) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `foreach`, `object-inspect`, `tape` [`fc9f319`](https://github.com/ljharb/internal-slot/commit/fc9f319d136ddf2e79910390d1e7ad279d41cc01) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`0a72a0f`](https://github.com/ljharb/internal-slot/commit/0a72a0f389511b41645f441da19257a266cb37f7) +- [actions] update codecov uploader [`e2b993f`](https://github.com/ljharb/internal-slot/commit/e2b993f143278a30424ebd5526019e59828989d0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`8f0ab80`](https://github.com/ljharb/internal-slot/commit/8f0ab808afdd458001c35c828962dc714d824754) +- [actions] update checkout action [`8da4b91`](https://github.com/ljharb/internal-slot/commit/8da4b91c3454671da2e53a831ca0928147965a09) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@safe-publish-latest`, `tape` [`7ab37aa`](https://github.com/ljharb/internal-slot/commit/7ab37aabf01ded2605fa583a9866b62172f82e30) +- [readme] add github actions/codecov badges [`71234be`](https://github.com/ljharb/internal-slot/commit/71234bef4ef99e2f17d72ae3a1b7c0522519b7d7) +- [Fix] `assert`: throw on a nonexistent slot even when an object already has other slots [`12580bd`](https://github.com/ljharb/internal-slot/commit/12580bd26fe9f8603566e9e076092b5e1fb7340b) +- [Tests] use `for-each` instead of `foreach` [`7229df0`](https://github.com/ljharb/internal-slot/commit/7229df01666ccb022dde82686d84b97b7bcfc53a) +- [meta] use `prepublishOnly` script for npm 7+ [`8728872`](https://github.com/ljharb/internal-slot/commit/8728872cfbd735d3ae87e885c081a08d5b26edf0) +- [Deps] update `get-intrinsic` [`1b7088f`](https://github.com/ljharb/internal-slot/commit/1b7088fa970c33757816b08357814bdbf6d722b6) +- [Deps] update `get-intrinsic` [`063621e`](https://github.com/ljharb/internal-slot/commit/063621ec99d1b9262d3898c0ecad0e1e98be5f75) + +#### [v1.0.3](https://github.com/ljharb/internal-slot/compare/v1.0.2...v1.0.3) + +> 26 January 2021 + +- [Tests] use shared travis-ci configs [`0ef2263`](https://github.com/ljharb/internal-slot/commit/0ef22634fa2269d9df0d784aca3c5748e8eabd3b) +- [Tests] migrate tests to Github Actions [`6253915`](https://github.com/ljharb/internal-slot/commit/6253915d28721df2eda5630849bc6b57647e3ee2) +- [meta] do not publish github action workflow files [`ef94e55`](https://github.com/ljharb/internal-slot/commit/ef94e555727ed6a649ef64010904fe89a468d459) +- [Tests] run `nyc` on all tests; use `tape` runner [`917d6ca`](https://github.com/ljharb/internal-slot/commit/917d6ca630cdcd6b4da9a2c300c6a3abb6e724fe) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`8dcb6fe`](https://github.com/ljharb/internal-slot/commit/8dcb6fe01d6a45e1af17a9dace95ca47c99b4328) +- [actions] add "Allow Edits" workflow [`7aa3e86`](https://github.com/ljharb/internal-slot/commit/7aa3e86edb0149fd882717481885760aeb28474e) +- [Refactor] use `get-intrinsic` instead of `es-abstract`; update `side-channel` [`11ad17d`](https://github.com/ljharb/internal-slot/commit/11ad17d4255adcbc55fd4eca0bf6733bac59f1bf) +- [readme] remove travis badge [`5b75452`](https://github.com/ljharb/internal-slot/commit/5b754523aa07e8f67d0135df75059a18047292bb) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`d531688`](https://github.com/ljharb/internal-slot/commit/d5316880956b4dd83e6b6c9ab48fdd8171a4a268) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`c76fa91`](https://github.com/ljharb/internal-slot/commit/c76fa91a7e623a738e22332bee4e985aea41122e) +- [Dev Deps] update `eslint`, `tape` [`e733ccd`](https://github.com/ljharb/internal-slot/commit/e733ccd68e81c72ef2e02726e001895053de7887) +- [Dev Deps] update `auto-changelog`; add `aud` [`df20bf5`](https://github.com/ljharb/internal-slot/commit/df20bf5d3943a533c20799d8cc1449997e85d53b) +- [meta] fix autochangelog [`e89e6f1`](https://github.com/ljharb/internal-slot/commit/e89e6f1ff9f10f386e6400b586db78ad9c0f1309) +- [Tests] only audit prod deps [`71317b9`](https://github.com/ljharb/internal-slot/commit/71317b95ec6bbd9877807da0c0316ee9f5f30fab) +- [Deps] update `es-abstract` [`c17ccf4`](https://github.com/ljharb/internal-slot/commit/c17ccf45f4cb0d3b7a1536e9cd3a7ff9a7dafd21) +- [Dev Deps] update `tape` [`d81ae03`](https://github.com/ljharb/internal-slot/commit/d81ae030a0e8f58cee00f752601ce60405a93d78) +- [Deps] update `es-abstract` [`b56303b`](https://github.com/ljharb/internal-slot/commit/b56303b4c3af7a510f9f51860895a46fd2e14752) +- [Deps] update `es-abstract` [`9996d1c`](https://github.com/ljharb/internal-slot/commit/9996d1cf3507750c7a6845a2fb0d0f849ea898a1) + +#### [v1.0.2](https://github.com/ljharb/internal-slot/compare/v1.0.1...v1.0.2) + +> 20 December 2019 + +- [Deps] update `es-abstract`, `side-channel` [`5c9df03`](https://github.com/ljharb/internal-slot/commit/5c9df03a25518f5c482cff4e1447a26fa071df9a) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7820f98`](https://github.com/ljharb/internal-slot/commit/7820f984e523a64ddf3068c4e5631abf61eb1ea4) + +#### [v1.0.1](https://github.com/ljharb/internal-slot/compare/v1.0.0...v1.0.1) + +> 1 December 2019 + +- [Refactor] use `side-channel` package [`d38639f`](https://github.com/ljharb/internal-slot/commit/d38639f0a3cdb5090711179d0e78df857ecbd5d3) +- [actions] add automatic rebasing / merge commit blocking [`74267e6`](https://github.com/ljharb/internal-slot/commit/74267e6e591e18ba39186cb99139d3fd7a757c9f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest` [`b042eef`](https://github.com/ljharb/internal-slot/commit/b042eefc067b830bbd370833f7f21754e802b0b2) +- [Deps] update `es-abstract` [`98cf4e8`](https://github.com/ljharb/internal-slot/commit/98cf4e86c1bfe99eda7b11a8ea70394368f33e4f) + +#### v1.0.0 + +> 20 October 2019 + +- Tests [`b50fa41`](https://github.com/ljharb/internal-slot/commit/b50fa41b6f47aba39ac4cb733658580974a0b00a) +- implementation [`c5a59f3`](https://github.com/ljharb/internal-slot/commit/c5a59f3753677f81aa12a0226d3b1187846d06dd) +- Initial commit [`15ebe4d`](https://github.com/ljharb/internal-slot/commit/15ebe4dc6d46885f67969d64c9c3e705780963f8) +- readme [`382a3f5`](https://github.com/ljharb/internal-slot/commit/382a3f53d8975e6488373a0fc2abcdc7c4c44247) +- npm init [`d5e7c97`](https://github.com/ljharb/internal-slot/commit/d5e7c977ef694e89c245fd11165f63c06a7a5040) +- [meta] add FUNDING.yml [`685b608`](https://github.com/ljharb/internal-slot/commit/685b6087613f6735f4411a558500d92f8a3ec3f2) +- [meta] add `auto-changelog`, `safe-publish-latest` [`f8fdf1c`](https://github.com/ljharb/internal-slot/commit/f8fdf1c3f0c592f71746da6d7f8bea18f8946dda) +- [Tests] add `npm run lint` [`baaaa09`](https://github.com/ljharb/internal-slot/commit/baaaa09ab6e5bc5fcc0e7c76e10c55aa18f4ca7e) +- Only apps should have lockfiles [`dfa7efa`](https://github.com/ljharb/internal-slot/commit/dfa7efa3d5cd23261cb75c2adab6ee3c06790fee) diff --git a/node_modules/internal-slot/LICENSE b/node_modules/internal-slot/LICENSE new file mode 100644 index 0000000..3900dd7 --- /dev/null +++ b/node_modules/internal-slot/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/internal-slot/README.md b/node_modules/internal-slot/README.md new file mode 100644 index 0000000..73d9852 --- /dev/null +++ b/node_modules/internal-slot/README.md @@ -0,0 +1,58 @@ +# internal-slot [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Truly private storage, akin to the JS spec’s concept of internal slots. + +Uses a WeakMap when available; a Map when not; and a regular object in even older engines. Performance and garbage collection behavior will reflect the environment’s capabilities accordingly. + +## Example + +```js +var SLOT = require('internal-slot'); +var assert = require('assert'); + +var o = {}; + +assert.throws(function () { SLOT.assert(o, 'foo'); }); + +assert.equal(SLOT.has(o, 'foo'), false); +assert.equal(SLOT.get(o, 'foo'), undefined); + +SLOT.set(o, 'foo', 42); + +assert.equal(SLOT.has(o, 'foo'), true); +assert.equal(SLOT.get(o, 'foo'), 42); + +assert.doesNotThrow(function () { SLOT.assert(o, 'foo'); }); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/internal-slot +[npm-version-svg]: https://versionbadg.es/ljharb/internal-slot.svg +[deps-svg]: https://david-dm.org/ljharb/internal-slot.svg +[deps-url]: https://david-dm.org/ljharb/internal-slot +[dev-deps-svg]: https://david-dm.org/ljharb/internal-slot/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/internal-slot#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/internal-slot.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/internal-slot.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/internal-slot.svg +[downloads-url]: https://npm-stat.com/charts.html?package=internal-slot +[codecov-image]: https://codecov.io/gh/ljharb/internal-slot/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/internal-slot/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/internal-slot +[actions-url]: https://github.com/ljharb/internal-slot/actions diff --git a/node_modules/internal-slot/index.js b/node_modules/internal-slot/index.js new file mode 100644 index 0000000..e2b6cdd --- /dev/null +++ b/node_modules/internal-slot/index.js @@ -0,0 +1,61 @@ +'use strict'; + +var hasOwn = require('hasown'); +var channel = require('side-channel')(); + +var $TypeError = require('es-errors/type'); + +var SLOT = { + assert: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + channel.assert(O); + if (!SLOT.has(O, slot)) { + throw new $TypeError('`' + slot + '` is not present on `O`'); + } + }, + get: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + return slots && slots['$' + slot]; + }, + has: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + return !!slots && hasOwn(slots, '$' + slot); + }, + set: function (O, slot, V) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + if (!slots) { + slots = {}; + channel.set(O, slots); + } + slots['$' + slot] = V; + } +}; + +if (Object.freeze) { + Object.freeze(SLOT); +} + +module.exports = SLOT; diff --git a/node_modules/internal-slot/package.json b/node_modules/internal-slot/package.json new file mode 100644 index 0000000..1a05d92 --- /dev/null +++ b/node_modules/internal-slot/package.json @@ -0,0 +1,71 @@ +{ + "name": "internal-slot", + "version": "1.0.7", + "description": "ES spec-like internal slots", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "pretest": "npm run lint", + "lint": "eslint .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/internal-slot.git" + }, + "keywords": [ + "internal", + "slot", + "internal slot", + "ecmascript", + "es", + "spec", + "private", + "data", + "private data", + "weakmap" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/internal-slot/issues" + }, + "homepage": "https://github.com/ljharb/internal-slot#readme", + "engines": { + "node": ">= 0.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4" + }, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/internal-slot/test/index.js b/node_modules/internal-slot/test/index.js new file mode 100644 index 0000000..d1db994 --- /dev/null +++ b/node_modules/internal-slot/test/index.js @@ -0,0 +1,121 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); + +var SLOT = require('../'); + +test('assert', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.assert(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.assert({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + t['throws']( + function () { SLOT.assert({}, 'whatever'); }, + TypeError, + 'nonexistent slot throws' + ); + + var o = {}; + SLOT.set(o, 'x'); + t.doesNotThrow(function () { SLOT.assert(o, 'x'); }, 'existent slot noops'); + t['throws'](function () { SLOT.assert(o, 'y'); }, 'thing with a slot throws on a nonexistent slot'); + + t.end(); +}); + +test('has', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.has(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.has({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = {}; + + t.equal(SLOT.has(o, 'nonexistent'), false, 'nonexistent slot yields false'); + + SLOT.set(o, 'foo'); + t.equal(SLOT.has(o, 'foo'), true, 'existent slot yields true'); + + t.end(); +}); + +test('get', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.get(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.get({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = {}; + t.equal(SLOT.get(o, 'nonexistent'), undefined, 'nonexistent slot is undefined'); + + var v = {}; + SLOT.set(o, 'f', v); + t.equal(SLOT.get(o, 'f'), v, '"get" retrieves value set by "set"'); + + t.end(); +}); + +test('set', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.set(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.set({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = function () {}; + t.equal(SLOT.get(o, 'f'), undefined, 'slot not set'); + + SLOT.set(o, 'f', 42); + t.equal(SLOT.get(o, 'f'), 42, 'slot was set'); + + SLOT.set(o, 'f', Infinity); + t.equal(SLOT.get(o, 'f'), Infinity, 'slot was set again'); + + t.end(); +}); diff --git a/node_modules/is-accessor-descriptor/.editorconfig b/node_modules/is-accessor-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/node_modules/is-accessor-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/is-accessor-descriptor/.eslintrc b/node_modules/is-accessor-descriptor/.eslintrc new file mode 100644 index 0000000..1b155fc --- /dev/null +++ b/node_modules/is-accessor-descriptor/.eslintrc @@ -0,0 +1,23 @@ +{ + "root": true, + + "extends": "@ljharb", + + "overrides": [ + { + "files": "index.js", + "rules": { + "complexity": "off", + "no-param-reassign": "warn", + }, + }, + { + "files": "test/**/*.js", + "rules": { + "id-length": "off", + "getter-return": "off", + "max-lines-per-function": "warn", + }, + }, + ], +} diff --git a/node_modules/is-accessor-descriptor/.github/FUNDING.yml b/node_modules/is-accessor-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..25f4ee9 --- /dev/null +++ b/node_modules/is-accessor-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-accessor-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-accessor-descriptor/.nycrc b/node_modules/is-accessor-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-accessor-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-accessor-descriptor/CHANGELOG.md b/node_modules/is-accessor-descriptor/CHANGELOG.md new file mode 100644 index 0000000..be5b184 --- /dev/null +++ b/node_modules/is-accessor-descriptor/CHANGELOG.md @@ -0,0 +1,125 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.0.3](https://github.com/inspect-js/is-accessor-descriptor/compare/v3.0.2...v3.0.3) - 2023-10-25 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `has-property-descriptors`, `tape` [`908044d`](https://github.com/inspect-js/is-accessor-descriptor/commit/908044d05559496cddf61b8f634641e879305f24) +- [Refactor] use `hasown` [`8b94cc1`](https://github.com/inspect-js/is-accessor-descriptor/commit/8b94cc153ba580143fe27bab0437199e873e58e3) + +## [v3.0.2](https://github.com/inspect-js/is-accessor-descriptor/compare/v3.0.1...v3.0.2) - 2023-04-27 + +### Commits + +- [eslint] cleanup [`c0a3a34`](https://github.com/inspect-js/is-accessor-descriptor/commit/c0a3a34eabaed6634dd674600df2c647688d3a31) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`a45de10`](https://github.com/inspect-js/is-accessor-descriptor/commit/a45de10c8020a350df860c2c4fe7697a74cdb943) +- [readme] clean up docs, URLs, package.json, etc [`d2f3547`](https://github.com/inspect-js/is-accessor-descriptor/commit/d2f354741f4fecc8c0e1ed6a83d351028a2ce2ba) +- [New] increase support from node 6 down to node 0.4 [`825f88e`](https://github.com/inspect-js/is-accessor-descriptor/commit/825f88e69da75476b638e9879296a37d370ce9fd) +- [Tests] convert from mocha to tape [`072d097`](https://github.com/inspect-js/is-accessor-descriptor/commit/072d097f5bbe1d6383ec38c13bbe67b491c0c671) +- [Docs] remove `verb` [`7567b54`](https://github.com/inspect-js/is-accessor-descriptor/commit/7567b54961b87af9ae890584089f5f29f19d8537) +- [Tests] use `has-property-descriptors` to skip true getter tests in older engines [`0e26d80`](https://github.com/inspect-js/is-accessor-descriptor/commit/0e26d806b7f97e23f287eac39bb352e772ac3f3b) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`3962d00`](https://github.com/inspect-js/is-accessor-descriptor/commit/3962d006fbe65dce0bc0847e278af142829057cb) +- [Tests] add coverage [`6337da4`](https://github.com/inspect-js/is-accessor-descriptor/commit/6337da417af127694412e5f18ba853f47b9a4270) +- [meta] switch from `files` field to npmignore; add `exports` [`6e870be`](https://github.com/inspect-js/is-accessor-descriptor/commit/6e870be859d17221b11b8c9f2fcb3e8a1e649598) + +## [v3.0.1](https://github.com/inspect-js/is-accessor-descriptor/compare/v3.0.0...v3.0.1) - 2018-12-13 + +### Commits + +- cleanup readme [`5cce1d2`](https://github.com/inspect-js/is-accessor-descriptor/commit/5cce1d212f887f9b4afe2b29dd95d657e1ea210c) +- remove unnecessary check [`288d4b9`](https://github.com/inspect-js/is-accessor-descriptor/commit/288d4b9f407bd7a01a606456ac40b7c29d7fd407) + +## [v3.0.0](https://github.com/inspect-js/is-accessor-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`d01d897`](https://github.com/inspect-js/is-accessor-descriptor/commit/d01d897175f09d3fb285a6bb22e4eb46a46a6045) + +## [v2.0.0](https://github.com/inspect-js/is-accessor-descriptor/compare/v1.0.1...v2.0.0) - 2017-12-04 + +### Commits + +- refactor to be stricter [`f7370ef`](https://github.com/inspect-js/is-accessor-descriptor/commit/f7370efe312e338c7f3175d76b973bdd838d0d27) +- update docs [`fd1764c`](https://github.com/inspect-js/is-accessor-descriptor/commit/fd1764c14dc6bfba668cb502dad57e5e03855ecf) + +## [v1.0.1](https://github.com/inspect-js/is-accessor-descriptor/compare/v1.0.0...v1.0.1) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`a05c057`](https://github.com/inspect-js/is-accessor-descriptor/commit/a05c0576662de977798bcba0ffa037a1ffdb9f68) +- [readme] clean up docs, URLs, package.json, etc [`6648dcd`](https://github.com/inspect-js/is-accessor-descriptor/commit/6648dcde8c01fcb36f7d6aaa3f70e3563df54b67) +- [meta] update `.gitignore` [`cba0ea0`](https://github.com/inspect-js/is-accessor-descriptor/commit/cba0ea006594dd4583ba671c1643a1e96aaab7ff) +- [readme] remove verb [`2f07da4`](https://github.com/inspect-js/is-accessor-descriptor/commit/2f07da493d0c824b5738675999ea4a3db541c84e) +- [Tests] switch to tape [`7e39202`](https://github.com/inspect-js/is-accessor-descriptor/commit/7e392020781a23f4c1276e78da4bf8a798021d85) +- [Tests] migrate from travis to github actions [`aa436b0`](https://github.com/inspect-js/is-accessor-descriptor/commit/aa436b0bbeb03c1281e816445e4d495e582274c7) +- [Fix] properly handle an accessor descriptor with only a setter [`04647f4`](https://github.com/inspect-js/is-accessor-descriptor/commit/04647f45870a2d3a78e2ae8adf07b0e9d47e0fc9) +- [Refactor] properly guard for-in loop [`a0454cc`](https://github.com/inspect-js/is-accessor-descriptor/commit/a0454cca3ea0610c8cf5e0b70bd581689ded929a) +- [Fix] allow any non-primitive; arrays and functions are objects too [`123e3c3`](https://github.com/inspect-js/is-accessor-descriptor/commit/123e3c3da341a1a397e274805df88ed13646442f) +- [Refactor] use `hasown` [`7ad36a0`](https://github.com/inspect-js/is-accessor-descriptor/commit/7ad36a05be98c7f0ae3f4dc9b3a3df1fa392c7fd) +- [readme] fix incorrect example [`3ee754a`](https://github.com/inspect-js/is-accessor-descriptor/commit/3ee754af6cb65c690ccd9ade150b33e8ec2808f8) +- [Tests] move tests to test dir [`5d70880`](https://github.com/inspect-js/is-accessor-descriptor/commit/5d70880ae2256d1f5927dab02c0bf8fe78cafef3) +- [Dev Deps] add missing `npmignore` [`97ce4bc`](https://github.com/inspect-js/is-accessor-descriptor/commit/97ce4bca878e775672e3d7349906bd7fc7db5f24) +- [Robustness] use a null object just in case [`675af5b`](https://github.com/inspect-js/is-accessor-descriptor/commit/675af5b191ebe9e18fb65c0aecb2a5ae65a535e0) + +## [v1.0.0](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.6...v1.0.0) - 2017-11-01 + +### Merged + +- Pin mocha to version 3 to support Node 0.12 [`#3`](https://github.com/inspect-js/is-accessor-descriptor/pull/3) +- Update kind-of to version 6.0 [`#2`](https://github.com/inspect-js/is-accessor-descriptor/pull/2) + +### Commits + +- run update [`2489800`](https://github.com/inspect-js/is-accessor-descriptor/commit/2489800869cbecf53e9bc3596916abf2e6008edb) +- run verb to generate readme documentation [`22b0a26`](https://github.com/inspect-js/is-accessor-descriptor/commit/22b0a2617ccbebd131247c29e3700ca860d37d06) +- remove should [`4b10d2a`](https://github.com/inspect-js/is-accessor-descriptor/commit/4b10d2aa721021d5f7af69c47f49a1691a8c3fcd) + +## [v0.1.6](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.5...v0.1.6) - 2015-12-28 + +### Commits + +- update docs [`914d85d`](https://github.com/inspect-js/is-accessor-descriptor/commit/914d85d44b914b8b693889081942bf95ea172914) +- update related projects [`92679ea`](https://github.com/inspect-js/is-accessor-descriptor/commit/92679eab1c0eb16eef052218e309aa55b10ce606) + +## [v0.1.5](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.4...v0.1.5) - 2015-12-28 + +### Commits + +- run update [`139251c`](https://github.com/inspect-js/is-accessor-descriptor/commit/139251c5225d7cdc2b6d16e5c6c713b515643ce8) +- improve checks for valid/invalid properties [`de1be1e`](https://github.com/inspect-js/is-accessor-descriptor/commit/de1be1e6250ca2f084f5d0ac43fed8dd4f607376) +- use verb layout, add verb plugin for formatting markdown [`2324242`](https://github.com/inspect-js/is-accessor-descriptor/commit/23242429e18e6f518318cf1568ec53c636bc1085) +- run verb to generate readme [`84587a4`](https://github.com/inspect-js/is-accessor-descriptor/commit/84587a4269640683049cb06aa75ae9e33165b5fe) + +## [v0.1.4](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-20 + +### Commits + +- lint [`d076464`](https://github.com/inspect-js/is-accessor-descriptor/commit/d0764648b3428e7f01303ea7835e25be9d1b5c21) +- generate docs [`12e2143`](https://github.com/inspect-js/is-accessor-descriptor/commit/12e2143ca3d93ece7ae73ee3fcbdb8952d7c5091) + +## [v0.1.3](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.2...v0.1.3) - 2015-10-04 + +### Commits + +- files prop [`0bcef73`](https://github.com/inspect-js/is-accessor-descriptor/commit/0bcef73f2c7c90be7e05f3dd56f02fbe67790897) + +## [v0.1.2](https://github.com/inspect-js/is-accessor-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- lazy-cache [`fc6da15`](https://github.com/inspect-js/is-accessor-descriptor/commit/fc6da15ecef4a18c20f102a412d596407bb86a5c) +- update docs [`943c0cd`](https://github.com/inspect-js/is-accessor-descriptor/commit/943c0cd4d709eff029fa3880560aec27c0d0f458) + +## v0.1.1 - 2015-08-31 + +### Commits + +- first commit [`dca2279`](https://github.com/inspect-js/is-accessor-descriptor/commit/dca22793793cf208e65d8daee9d949d76252b647) +- 0.1.1 readme [`27c92b6`](https://github.com/inspect-js/is-accessor-descriptor/commit/27c92b65b85b9bfb39945d646f223cbfd262ab41) +- 0.1.1 docs [`09beed6`](https://github.com/inspect-js/is-accessor-descriptor/commit/09beed68a3c5a5ea76128d5faf2933848181750d) +- lint [`aa03d9b`](https://github.com/inspect-js/is-accessor-descriptor/commit/aa03d9ba1e65e2e71be0add9de75d25cc981e9e2) diff --git a/node_modules/is-accessor-descriptor/LICENSE b/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/is-accessor-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-accessor-descriptor/README.md b/node_modules/is-accessor-descriptor/README.md new file mode 100644 index 0000000..dde6c00 --- /dev/null +++ b/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,98 @@ +# is-accessor-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +## Examples + +```js +var isAccessor = require('is-accessor-descriptor'); +var assert = require('assert'); + +assert.equal(isAccessor({ get: function() {} }), true); +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +assert.equal(isAccessor({ bar: {} }, 'bar'), true); +``` + +## Examples + +`false` when not an object + +```js +assert.equal(isAccessor('a'), false); +assert.equal(isAccessor(null), false); +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +assert.equal(isAccessor({ get() {}, set() {} }), true); +assert.equal(isAccessor({ get() {} }), true); +assert.equal(isAccessor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isAccessor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isAccessor({ get() {}, writable: true }), false); +assert.equal(isAccessor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +isAccessor({ get() {}, set: 'baz' }); +isAccessor({ get: 'foo', set() {} }); +isAccessor({ get: 'foo', bar: 'baz' }); +isAccessor({ get: 'foo', set: 'baz' }); +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({ get() {}, set() {}, enumerable: 'foo' }); +isAccessor({ set() {}, configurable: 'foo' }); +isAccessor({ get() {}, configurable: 'foo' }); +//=> false +``` + +### Related projects + +You might also be interested in these projects: + +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/inspect-js/is-descriptor) +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-accessor-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-accessor-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-accessor-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-accessor-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-accessor-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-accessor-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-accessor-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-accessor-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-accessor-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-accessor-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-accessor-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-accessor-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-accessor-descriptor +[actions-url]: https://github.com/inspect-js/is-accessor-descriptor/actions diff --git a/node_modules/is-accessor-descriptor/index.js b/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000..64e46d5 --- /dev/null +++ b/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,50 @@ +'use strict'; + +var hasOwn = require('hasown'); + +// accessor descriptor properties +var accessor = { + __proto__: null, + configurable: 'boolean', + enumerable: 'boolean', + get: 'function', + set: 'function' +}; + +module.exports = function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!obj || typeof obj !== 'object') { + return false; + } + + if (hasOwn(obj, 'value') || hasOwn(obj, 'writable')) { + return false; + } + + // one of them must be a function + if ( + (!hasOwn(obj, 'get') || typeof obj.get !== 'function') + && (!hasOwn(obj, 'set') || typeof obj.set !== 'function') + ) { + return false; + } + + // both of them must be a function or undefined + if ( + (hasOwn(obj, 'get') && typeof obj.get !== 'function' && typeof obj.get !== 'undefined') + || (hasOwn(obj, 'set') && typeof obj.set !== 'function' && typeof obj.set !== 'undefined') + ) { + return false; + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (hasOwn(obj, key) && hasOwn(accessor, key) && typeof obj[key] !== accessor[key] && typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +}; diff --git a/node_modules/is-accessor-descriptor/package.json b/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000..ec2433e --- /dev/null +++ b/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-accessor-descriptor", + "version": "1.0.1", + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-accessor-descriptor.git" + }, + "keywords": [ + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-accessor-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-accessor-descriptor", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "dependencies": { + "hasown": "^2.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.10" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-accessor-descriptor/test/index.js b/node_modules/is-accessor-descriptor/test/index.js new file mode 100644 index 0000000..a07b019 --- /dev/null +++ b/node_modules/is-accessor-descriptor/test/index.js @@ -0,0 +1,62 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('value type', function (st) { + st.notOk(isDescriptor('a'), 'string is not a descriptor'); + st.notOk(isDescriptor(null), 'null is not a descriptor'); + st.notOk(isDescriptor([]), 'Array is not a descriptor'); + + st.end(); + }); + + t.test('is false when the object has data descriptor properties:', function (st) { + st.notOk(isDescriptor({ get: noop, writable: true })); + st.notOk(isDescriptor({ get: noop, value: true })); + + st.end(); + }); + + t.test('is not false when unrecognized properties are defined:', function (st) { + st.ok(isDescriptor({ get: noop, foo: true })); + st.ok(isDescriptor({ get: noop, bar: true })); + + st.end(); + }); + + t.test('is false when a get or set are not functions:', function (st) { + st.notOk(isDescriptor({ get: noop, set: 'baz' })); + st.notOk(isDescriptor({ get: 'foo', set: noop })); + st.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + st.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + st.notOk(isDescriptor({ get: 'foo' })); + + st.end(); + }); + + t.test('is true when "get" is not defined:', function (st) { + st.ok(isDescriptor({ set: noop })); + + st.end(); + }); + + t.test('is true when the object has valid properties:', function (st) { + st.ok(isDescriptor({ get: noop, set: noop })); + st.ok(isDescriptor({ get: noop })); + + st.end(); + }); + + t.test('is false when a value is not the correct type:', function (st) { + st.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + st.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + st.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-array-buffer/.eslintrc b/node_modules/is-array-buffer/.eslintrc new file mode 100644 index 0000000..0b9a855 --- /dev/null +++ b/node_modules/is-array-buffer/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "DataView": false, + }, + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/is-array-buffer/.github/FUNDING.yml b/node_modules/is-array-buffer/.github/FUNDING.yml new file mode 100644 index 0000000..61d7d6c --- /dev/null +++ b/node_modules/is-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-array-buffer/.nycrc b/node_modules/is-array-buffer/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-array-buffer/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-array-buffer/CHANGELOG.md b/node_modules/is-array-buffer/CHANGELOG.md new file mode 100644 index 0000000..e203112 --- /dev/null +++ b/node_modules/is-array-buffer/CHANGELOG.md @@ -0,0 +1,75 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.0.4](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.3...v3.0.4) - 2024-02-02 + +### Commits + +- [patch] add types [`15fab4c`](https://github.com/fengyuanchen/is-array-buffer/commit/15fab4c68378904a12592969042e638dbc6be8e5) + +## [v3.0.3](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.2...v3.0.3) - 2024-02-02 + +### Commits + +- [Fix] TAs can take a DataView in node 0.8; use a simpler check [`69a03f6`](https://github.com/fengyuanchen/is-array-buffer/commit/69a03f671f892b724be1a899a3d90c981e7601c9) +- [Dev Deps] update `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`53ca341`](https://github.com/fengyuanchen/is-array-buffer/commit/53ca34182d2aab61e90e744ee47d01f6577b616e) +- [Deps] update `call-bind`, `get-intrinsic`, `is-typed-array` [`bec883f`](https://github.com/fengyuanchen/is-array-buffer/commit/bec883f31e83410a46927a843ded46ebffbbb1f6) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`944d4ce`](https://github.com/fengyuanchen/is-array-buffer/commit/944d4cea229ce29a0965665bf59df290c53ecbbb) +- [meta] add missing `engines.node` [`0852be6`](https://github.com/fengyuanchen/is-array-buffer/commit/0852be6f64188912d2383ff9b6a7cc12bd369006) +- [Deps] update `get-intrinsic` [`b59c4af`](https://github.com/fengyuanchen/is-array-buffer/commit/b59c4af432014649d6cd1f070cf6e9917e6ad524) + +## [v3.0.2](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.1...v3.0.2) - 2023-03-01 + +### Commits + +- [Fix] `node` 0.8: an object arg to a TA only throws a RangeError when it is an ArrayBuffer of an incompatible byte length [`d5108f6`](https://github.com/fengyuanchen/is-array-buffer/commit/d5108f6d06245e616b6c563995f214a38732243c) +- [Dev Deps] update `object-inspect`, `tape` [`400f456`](https://github.com/fengyuanchen/is-array-buffer/commit/400f4563ccbe27c7fbb485665352c76210bba9cb) +- [Deps] update `get-intrinsic` [`133732e`](https://github.com/fengyuanchen/is-array-buffer/commit/133732ec88f8dded1c705b758badc2240077a6d8) + +## [v3.0.1](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.0...v3.0.1) - 2023-01-05 + +### Commits + +- [Fix] in node 0.8, TAs do not coerce Uint8Arrays to an ArrayBuffer properly [`e488763`](https://github.com/fengyuanchen/is-array-buffer/commit/e48876346f446825dad619e55dcc830ed93f2853) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8eebfa2`](https://github.com/fengyuanchen/is-array-buffer/commit/8eebfa21881f3a9fa5094f8c486f00e496658ea9) + +## [v3.0.0](https://github.com/fengyuanchen/is-array-buffer/compare/v2.0.0...v3.0.0) - 2023-01-04 + +### Commits + +- [Breaking] replace package implementation [`b65f929`](https://github.com/fengyuanchen/is-array-buffer/commit/b65f929d856d2a42f043be0f5a0fc2e067370ed1) +- Initial implementation, tests, readme [`06afa73`](https://github.com/fengyuanchen/is-array-buffer/commit/06afa73e775960802ea9257cc6b4cdf768c72d3f) +- Initial commit [`051813f`](https://github.com/fengyuanchen/is-array-buffer/commit/051813f15e3cbf515e2447306761dd9c42819150) +- npm init [`946d3de`](https://github.com/fengyuanchen/is-array-buffer/commit/946d3de82b15471fb2c00a4a2a5a52eb0515eb04) +- [meta] use `npmignore` to autogenerate an npmignore file [`ca4c446`](https://github.com/fengyuanchen/is-array-buffer/commit/ca4c446f37daf5ab8cc590f2194574c2706561ed) +- Only apps should have lockfiles [`be7d8eb`](https://github.com/fengyuanchen/is-array-buffer/commit/be7d8eb09dc5033c04df85d7ba9a8714f4e54357) +- docs: fix badge link [`9ea7fb6`](https://github.com/fengyuanchen/is-array-buffer/commit/9ea7fb638e79f8938161b3b7370cb965d8e93a8b) + + + +## 2.0.0 (Feb 12, 2021) + +- Refactor in TypeScript. +- Drop the `dist` directory. +- Drop the UMD bundled file. +- Add a declaration file for TypeScript. + +## 1.0.1 (Apr 1, 2018) + +- Improve code style. + +## 1.0.0 (Jul 25, 2017) + +- Supports UMD, CommonJS and ES Module. + +## 0.1.0 (Nov 28, 2015) + +- Check if ArrayBuffer is defined first. + +## 0.0.1 (Nov 11, 2015) + +- Initial release. diff --git a/node_modules/is-array-buffer/LICENSE b/node_modules/is-array-buffer/LICENSE new file mode 100644 index 0000000..a9b309c --- /dev/null +++ b/node_modules/is-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2015 Chen Gengyuan, Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-array-buffer/README.md b/node_modules/is-array-buffer/README.md new file mode 100644 index 0000000..7b0292f --- /dev/null +++ b/node_modules/is-array-buffer/README.md @@ -0,0 +1,56 @@ +# is-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS ArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var assert = require('assert'); +var isArrayBuffer = require('is-array-buffer'); + +assert(!isArrayBuffer(function () {})); +assert(!isArrayBuffer(null)); +assert(!isArrayBuffer(function* () { yield 42; return Infinity; }); +assert(!isArrayBuffer(Symbol('foo'))); +assert(!isArrayBuffer(1n)); +assert(!isArrayBuffer(Object(1n))); + +assert(!isArrayBuffer(new Set())); +assert(!isArrayBuffer(new WeakSet())); +assert(!isArrayBuffer(new Map())); +assert(!isArrayBuffer(new WeakMap())); +assert(!isArrayBuffer(new WeakRef({}))); +assert(!isArrayBuffer(new FinalizationRegistry(() => {}))); +assert(!isArrayBuffer(new SharedArrayBuffer())); + +assert(isArrayBuffer(new ArrayBuffer())); + +class MyArrayBuffer extends ArrayBuffer {} +assert(isArrayBuffer(new MyArrayBuffer())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-array-buffer +[npm-version-svg]: https://versionbadg.es/inspect-js/is-array-buffer.svg +[deps-svg]: https://david-dm.org/inspect-js/is-array-buffer.svg +[deps-url]: https://david-dm.org/inspect-js/is-array-buffer +[dev-deps-svg]: https://david-dm.org/inspect-js/is-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-array-buffer +[codecov-image]: https://codecov.io/gh/inspect-js/is-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-array-buffer +[actions-url]: https://github.com/inspect-js/is-array-buffer/actions diff --git a/node_modules/is-array-buffer/index.d.ts b/node_modules/is-array-buffer/index.d.ts new file mode 100644 index 0000000..993527c --- /dev/null +++ b/node_modules/is-array-buffer/index.d.ts @@ -0,0 +1,3 @@ +declare function isArrayBuffer(value: unknown): value is ArrayBuffer; + +export = isArrayBuffer; \ No newline at end of file diff --git a/node_modules/is-array-buffer/index.js b/node_modules/is-array-buffer/index.js new file mode 100644 index 0000000..126f59e --- /dev/null +++ b/node_modules/is-array-buffer/index.js @@ -0,0 +1,42 @@ +'use strict'; + +var callBind = require('call-bind'); +var callBound = require('call-bind/callBound'); +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); +/** @type {undefined | ((receiver: ArrayBuffer) => number) | ((receiver: unknown) => never)} */ +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); +var $toString = callBound('Object.prototype.toString'); + +// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method +var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice; +var $abSlice = !!abSlice && callBind(abSlice); + +/** @type {import('.')} */ +module.exports = $byteLength || $abSlice + ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + if ($byteLength) { + // @ts-expect-error no idea why TS can't handle the overload + $byteLength(obj); + } else { + // @ts-expect-error TS chooses not to type-narrow inside a closure + $abSlice(obj, 0); + } + return true; + } catch (e) { + return false; + } + } + : $ArrayBuffer + // in node 0.8, ArrayBuffers have no prototype or own methods, but also no Symbol.toStringTag + ? function isArrayBuffer(obj) { + return $toString(obj) === '[object ArrayBuffer]'; + } + : function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; diff --git a/node_modules/is-array-buffer/package.json b/node_modules/is-array-buffer/package.json new file mode 100644 index 0000000..e1b4a83 --- /dev/null +++ b/node_modules/is-array-buffer/package.json @@ -0,0 +1,89 @@ +{ + "name": "is-array-buffer", + "version": "3.0.4", + "description": "Is this value a JS ArrayBuffer?", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only --", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-array-buffer.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "is", + "arraybuffer", + "array", + "buffer" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-array-buffer/issues" + }, + "homepage": "https://github.com/inspect-js/is-array-buffer#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/get-intrinsic": "^1.2.2", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.6", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "2.0.1" + }, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/is-array-buffer/test/index.js b/node_modules/is-array-buffer/test/index.js new file mode 100644 index 0000000..6c452d6 --- /dev/null +++ b/node_modules/is-array-buffer/test/index.js @@ -0,0 +1,50 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var availableTypedArrays = require('available-typed-arrays')(); + +var isArrayBuffer = require('..'); + +test('isArrayBuffer', function (t) { + t.equal(typeof isArrayBuffer, 'function', 'is a function'); + + /** @type {unknown[]} */ + var nonABs = [].concat( + // @ts-expect-error TS sucks with [].concat + v.primitives, + v.objects, + typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(0) : [] + ); + forEach(nonABs, function (nonAB) { + t.equal(isArrayBuffer(nonAB), false, inspect(nonAB) + ' is not an ArrayBuffer'); + }); + + t.test('actual ArrayBuffer instances', { skip: typeof ArrayBuffer === 'undefined' }, function (st) { + // @ts-expect-error TS grumbles about 0 args + var ab = new ArrayBuffer(); + st.equal(isArrayBuffer(ab), true, inspect(ab) + ' is an ArrayBuffer'); + + var ab42 = new ArrayBuffer(42); + st.equal(isArrayBuffer(ab42), true, inspect(ab42) + ' is an ArrayBuffer'); + + var dv = new DataView(ab42); + st.equal(isArrayBuffer(dv), false, inspect(dv) + ' is not an ArrayBuffer'); + + st.end(); + }); + + t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) { + forEach(availableTypedArrays, function (TypedArray) { + var ta = new global[TypedArray](0); + st.equal(isArrayBuffer(ta.buffer), true, inspect(ta.buffer) + ', the TA\'s buffer, is an ArrayBuffer'); + st.equal(isArrayBuffer(ta), false, inspect(ta) + ' is not an ArrayBuffer'); + }); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-array-buffer/tsconfig.json b/node_modules/is-array-buffer/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/is-array-buffer/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/is-arrayish/.editorconfig b/node_modules/is-arrayish/.editorconfig new file mode 100644 index 0000000..4c017f8 --- /dev/null +++ b/node_modules/is-arrayish/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.coffee] +indent_style = space + +[{package.json,*.yml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/is-arrayish/.istanbul.yml b/node_modules/is-arrayish/.istanbul.yml new file mode 100644 index 0000000..19fbec3 --- /dev/null +++ b/node_modules/is-arrayish/.istanbul.yml @@ -0,0 +1,4 @@ +instrumentation: + excludes: + - test.js + - test/**/* diff --git a/node_modules/is-arrayish/.npmignore b/node_modules/is-arrayish/.npmignore new file mode 100644 index 0000000..8d5eacb --- /dev/null +++ b/node_modules/is-arrayish/.npmignore @@ -0,0 +1,5 @@ +/coverage/ +/test.js +/test/ +*.sw[a-p] +/node_modules/ diff --git a/node_modules/is-arrayish/.travis.yml b/node_modules/is-arrayish/.travis.yml new file mode 100644 index 0000000..5a04243 --- /dev/null +++ b/node_modules/is-arrayish/.travis.yml @@ -0,0 +1,17 @@ +language: node_js + +script: + - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register + - cat coverage/lcov.info | node_modules/.bin/coveralls +node_js: + - "0.10" + - "0.11" + - "0.12" + - "iojs" +os: + - linux + - osx + +notifications: + slack: + secure: oOt8QGzdrPDsTMcyahtIq5Q+0U1iwfgJgFCxBLsomQ0bpIMn+y5m4viJydA2UinHPGc944HS3LMZS9iKQyv+DjTgbhUyNXqeVjtxCwRe37f5rKQlXVvdfmjHk2kln4H8DcK3r5Qd/+2hd9BeMsp2GImTrkRSud1CZQlhhe5IgZOboSoWpGVMMy1iazWT06tAtiB2LRVhmsdUaFZDWAhGZ+UAvCPf+mnBOAylIj+U0GDrofhfTi25RK0gddG2f/p2M1HCu49O6wECGWkt2hVei233DkNJyLLLJVcvmhf+aXkV5TjMyaoxh/HdcV4DrA7KvYuWmWWKsINa9hlwAsdd/FYmJ6PjRkKWas2JoQ1C+qOzDxyQvn3CaUZFKD99pdsq0rBBZujqXQKZZ/hWb/CE74BI6fKmqQkiEPaD/7uADj04FEg6HVBZaMCyauOaK5b3VC97twbALZ1qVxYV6mU+zSEvnUbpnjjvRO0fSl9ZHA+rzkW73kX3GmHY0wAozEZbSy7QLuZlQ2QtHmBLr+APaGMdL1sFF9qFfzqKy0WDbSE0WS6hpAEJpTsjYmeBrnI8UmK3m++iEgyQPvZoH9LhUT+ek7XIfHZMe04BmC6wuO24/RfpmR6bQK9VMarFCYlBiWxg/z30vkP0KTpUi3o/cqFm7/Noxc0i2LVqM3E0Sy4= diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/is-arrayish/LICENSE new file mode 100644 index 0000000..0a5f461 --- /dev/null +++ b/node_modules/is-arrayish/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-arrayish/README.md b/node_modules/is-arrayish/README.md new file mode 100644 index 0000000..7d36072 --- /dev/null +++ b/node_modules/is-arrayish/README.md @@ -0,0 +1,16 @@ +# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) +> Determines if an object can be used like an Array + +## Example +```javascript +var isArrayish = require('is-arrayish'); + +isArrayish([]); // true +isArrayish({__proto__: []}); // true +isArrayish({}); // false +isArrayish({length:10}); // false +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js new file mode 100644 index 0000000..5b97186 --- /dev/null +++ b/node_modules/is-arrayish/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && obj.splice instanceof Function); +}; diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json new file mode 100644 index 0000000..8b2d1c3 --- /dev/null +++ b/node_modules/is-arrayish/package.json @@ -0,0 +1,34 @@ +{ + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.2.1", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.6.1" + } +} diff --git a/node_modules/is-bigint/.eslintignore b/node_modules/is-bigint/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/is-bigint/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-bigint/.eslintrc b/node_modules/is-bigint/.eslintrc new file mode 100644 index 0000000..1283fcf --- /dev/null +++ b/node_modules/is-bigint/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], + "operator-linebreak": [2, "before"], + }, +} diff --git a/node_modules/is-bigint/.github/FUNDING.yml b/node_modules/is-bigint/.github/FUNDING.yml new file mode 100644 index 0000000..59d03ba --- /dev/null +++ b/node_modules/is-bigint/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-bigint +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-bigint/.nycrc b/node_modules/is-bigint/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-bigint/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-bigint/CHANGELOG.md b/node_modules/is-bigint/CHANGELOG.md new file mode 100644 index 0000000..c1b0271 --- /dev/null +++ b/node_modules/is-bigint/CHANGELOG.md @@ -0,0 +1,71 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/inspect-js/is-bigint/compare/v1.0.3...v1.0.4) - 2021-08-11 + +### Commits + +- [eslint] remove unnecessary eslintrc file [`7220aa5`](https://github.com/inspect-js/is-bigint/commit/7220aa515c51649b48ba57bb77f92d85e27557d8) +- [readme] add github actions/codecov badges [`053a071`](https://github.com/inspect-js/is-bigint/commit/053a07123511eef5a91fd7889ae2d8323fbcf7d7) +- [Deps] add `has-bigints` as a runtime dependency [`0fc3c9d`](https://github.com/inspect-js/is-bigint/commit/0fc3c9d5165f62500ea9c27943cb302df65432f7) +- [Dev Deps] update `tape` [`145f11d`](https://github.com/inspect-js/is-bigint/commit/145f11d1d285d92b3144f48178fe0fb3b2f828d9) + +## [v1.0.3](https://github.com/inspect-js/is-bigint/compare/v1.0.2...v1.0.3) - 2021-08-06 + +### Commits + +- [Tests] use `has-tostringtag` for easier checking of Symbol.toStringTag [`3b44080`](https://github.com/inspect-js/is-bigint/commit/3b440801b69689d907b33184134f00d7e8a35f9f) +- [Dev Deps] update `auto-changelog`, `eslint`, `object-inspect`, `tape` [`e4d4a6c`](https://github.com/inspect-js/is-bigint/commit/e4d4a6c2ab743b52eda906abd1ed4b0608952533) +- [Fix] use `has-bigints` for more robust BigInt detection [`7bb9d7a`](https://github.com/inspect-js/is-bigint/commit/7bb9d7ab42214c12ce25e9f0cfe2af769388c3bb) + +## [v1.0.2](https://github.com/inspect-js/is-bigint/compare/v1.0.1...v1.0.2) - 2021-05-04 + +### Commits + +- [meta] do not publish github action workflow files [`276d677`](https://github.com/inspect-js/is-bigint/commit/276d677d1eac61e990a2f2b523c7cdef70784865) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`cea7fb6`](https://github.com/inspect-js/is-bigint/commit/cea7fb6e882ad7e2f550de2bd9317a4409bcd735) +- [readme] fix repo URLs; remove travis badge [`c8e7c36`](https://github.com/inspect-js/is-bigint/commit/c8e7c3651f3303fddafa61cf29cfbb79ea2d5d4b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `object-inspect`, `tape` [`32f3d90`](https://github.com/inspect-js/is-bigint/commit/32f3d909363045fe5d40dde9e4db354344ab4d50) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape` [`c2f20f5`](https://github.com/inspect-js/is-bigint/commit/c2f20f577d84e68b4e3224abb51024fbc4b9b2ba) +- [meta] remove unneeded token; update checkout action [`94e46e9`](https://github.com/inspect-js/is-bigint/commit/94e46e92a1a85ec022c8febf8d5d3c2369b46e97) +- [meta] use `prepublishOnly` script for npm 7+ [`3e663ec`](https://github.com/inspect-js/is-bigint/commit/3e663ecb09bfdc5dbaaa37aaef4adf28b5e49035) + +## [v1.0.1](https://github.com/inspect-js/is-bigint/compare/v1.0.0...v1.0.1) - 2020-11-30 + +### Commits + +- [Tests] use shared travis-ci configs [`28f1211`](https://github.com/inspect-js/is-bigint/commit/28f1211132ad2a6495d816140680fa16c12eb6f3) +- [Tests] migrate tests to Github Actions [`0998c64`](https://github.com/inspect-js/is-bigint/commit/0998c6443d603028f8b988bcdd52d23dbf513031) +- [meta] add `auto-changelog` [`2352de6`](https://github.com/inspect-js/is-bigint/commit/2352de6df8385b256d75ce50c360947243a599f6) +- [Tests] run `nyc` on all tests [`9c16a9a`](https://github.com/inspect-js/is-bigint/commit/9c16a9a5ddaf7c2c578542ab8f00dd4e72eff541) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `tape` [`4cd0edd`](https://github.com/inspect-js/is-bigint/commit/4cd0edd1917f789501291315c9eac5f895fd719e) +- [actions] add automatic rebasing / merge commit blocking [`f0f4b91`](https://github.com/inspect-js/is-bigint/commit/f0f4b91dba029dbca5b3cd27ef91c4fb8e3ec51a) +- [actions] add "Allow Edits" workflow [`7f4f46e`](https://github.com/inspect-js/is-bigint/commit/7f4f46ec07679c00e22287ec55b39ff1e4f809cf) +- [meta] create FUNDING.yml [`2d0cb9a`](https://github.com/inspect-js/is-bigint/commit/2d0cb9ae8ddf635f2c472ce49f95f717f2c432bf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`0ee110e`](https://github.com/inspect-js/is-bigint/commit/0ee110effdcaa96d90f21a0ec6e625941f77c45a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`, `object-inspect`, `tape` [`5bb7f3a`](https://github.com/inspect-js/is-bigint/commit/5bb7f3a8de6ec5ee2aa573c22e41884f3d2d1cc3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`d3d67d0`](https://github.com/inspect-js/is-bigint/commit/d3d67d05f8a3f4cb07085811629f56ef872949c3) +- [Dev Deps] update `auto-changelog`, `tape` [`54e270f`](https://github.com/inspect-js/is-bigint/commit/54e270fa29856dba90f86785fa61bffc79a2825d) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`d82bfe7`](https://github.com/inspect-js/is-bigint/commit/d82bfe75c63aeda40f7e473c57f26cea8790ba3a) +- [Dev Deps] update `auto-changelog`; add `aud` [`9c34bd1`](https://github.com/inspect-js/is-bigint/commit/9c34bd1873f08d77c82d8e54ad90c5a1a035e7ea) +- [Tests] add missing `posttest` script [`0690bd9`](https://github.com/inspect-js/is-bigint/commit/0690bd9868d4d8b43424b4224cdbb8659a1c6423) +- [meta] add `funding` field [`7ca36d0`](https://github.com/inspect-js/is-bigint/commit/7ca36d06ebcf6b01a592ecd6758bd2b39c0fb0db) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`5ffa8da`](https://github.com/inspect-js/is-bigint/commit/5ffa8dad9f634891cf739ee118f1b43142b0f01d) +- [Dev Deps] update `eslint` [`8512c2f`](https://github.com/inspect-js/is-bigint/commit/8512c2f29a9267fe8fe19209bcf77df94f127172) +- [Tests] only audit prod deps [`f2147dc`](https://github.com/inspect-js/is-bigint/commit/f2147dc54e72594985e8f6db3932a4f0819dc4db) +- [readme] fix header [`d6eff75`](https://github.com/inspect-js/is-bigint/commit/d6eff75d00471f465768deb92867e878c27733b3) + +## v1.0.0 - 2018-09-20 + +### Commits + +- [Tests] add tests [`847f12a`](https://github.com/inspect-js/is-bigint/commit/847f12af125fcefb75ed3517550feedf7dd73e88) +- Initial commit [`b53f3c6`](https://github.com/inspect-js/is-bigint/commit/b53f3c6754e7fd7a9982ff5b1466c4dc9799dad9) +- readme [`66c15fe`](https://github.com/inspect-js/is-bigint/commit/66c15fe1a0d965b8c78bf3a3bfc289dcfec53ee1) +- Implementation [`c2c0974`](https://github.com/inspect-js/is-bigint/commit/c2c0974397825a2a56e1ea8af0546171309d4805) +- package.json [`98b174c`](https://github.com/inspect-js/is-bigint/commit/98b174c24b070053f0548e58f9b87bc9dbdf922a) +- Only apps should have lockfiles [`a77c74b`](https://github.com/inspect-js/is-bigint/commit/a77c74bd8ca5f058f1e6165ae7b33bb84adef98c) diff --git a/node_modules/is-bigint/LICENSE b/node_modules/is-bigint/LICENSE new file mode 100644 index 0000000..9dd868f --- /dev/null +++ b/node_modules/is-bigint/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-bigint/README.md b/node_modules/is-bigint/README.md new file mode 100644 index 0000000..d64549f --- /dev/null +++ b/node_modules/is-bigint/README.md @@ -0,0 +1,44 @@ +# is-bigint [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this an ES BigInt value? + +## Example + +```js +var isBigInt = require('is-bigint'); +assert(!isBigInt(function () {})); +assert(!isBigInt(null)); +assert(!isBigInt(function* () { yield 42; return Infinity; }); +assert(!isBigInt(Symbol('foo'))); + +assert(isBigInt(1n)); +assert(isBigInt(Object(1n))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-bigint +[2]: https://versionbadg.es/inspect-js/is-bigint.svg +[5]: https://david-dm.org/inspect-js/is-bigint.svg +[6]: https://david-dm.org/inspect-js/is-bigint +[7]: https://david-dm.org/inspect-js/is-bigint/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-bigint#info=devDependencies +[11]: https://nodei.co/npm/is-bigint.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-bigint.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-bigint.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-bigint +[codecov-image]: https://codecov.io/gh/inspect-js/is-bigint/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-bigint/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-bigint +[actions-url]: https://github.com/inspect-js/is-bigint/actions diff --git a/node_modules/is-bigint/index.js b/node_modules/is-bigint/index.js new file mode 100644 index 0000000..8da47d7 --- /dev/null +++ b/node_modules/is-bigint/index.js @@ -0,0 +1,38 @@ +'use strict'; + +var hasBigInts = require('has-bigints')(); + +if (hasBigInts) { + var bigIntValueOf = BigInt.prototype.valueOf; + var tryBigInt = function tryBigIntObject(value) { + try { + bigIntValueOf.call(value); + return true; + } catch (e) { + } + return false; + }; + + module.exports = function isBigInt(value) { + if ( + value === null + || typeof value === 'undefined' + || typeof value === 'boolean' + || typeof value === 'string' + || typeof value === 'number' + || typeof value === 'symbol' + || typeof value === 'function' + ) { + return false; + } + if (typeof value === 'bigint') { + return true; + } + + return tryBigInt(value); + }; +} else { + module.exports = function isBigInt(value) { + return false && value; + }; +} diff --git a/node_modules/is-bigint/package.json b/node_modules/is-bigint/package.json new file mode 100644 index 0000000..850dbd8 --- /dev/null +++ b/node_modules/is-bigint/package.json @@ -0,0 +1,58 @@ +{ + "name": "is-bigint", + "version": "1.0.4", + "description": "Is this value an ES BigInt?", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-bigint.git" + }, + "keywords": [ + "bigint", + "es", + "integer", + "is" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-bigint/issues" + }, + "homepage": "https://github.com/inspect-js/is-bigint#readme", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^7.32.0", + "has-symbols": "^1.0.2", + "nyc": "^10.3.2", + "object-inspect": "^1.11.0", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-bigint/test/index.js b/node_modules/is-bigint/test/index.js new file mode 100644 index 0000000..21537d6 --- /dev/null +++ b/node_modules/is-bigint/test/index.js @@ -0,0 +1,81 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var hasBigInts = require('has-bigints')(); +var hasSymbols = require('has-symbols')(); +var hasToStringTag = require('has-tostringtag/shams')(); + +var isBigInt = require('../'); + +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +test('non-BigInt values', function (t) { + var nonBigInts = [ + true, + false, + Object(true), + Object(false), + null, + undefined, + {}, + [], + /a/g, + 'string', + 42, + new Date(), + function () {}, + NaN + ]; + if (hasSymbols) { + nonBigInts.push(Symbol.iterator, Symbol('foo')); + } + t.plan(nonBigInts.length); + forEach(nonBigInts, function (nonBigInt) { + t.equal(false, isBigInt(nonBigInt), debug(nonBigInt, 'is not a BigInt')); + }); + t.end(); +}); + +test('faked BigInt values', function (t) { + t.test('real BigInt valueOf', { skip: !hasBigInts }, function (st) { + var fakeBigInt = { valueOf: function () { return BigInt(42); } }; + st.equal(false, isBigInt(fakeBigInt), 'object with valueOf returning a BigInt is not a BigInt'); + st.end(); + }); + + t.test('faked @@toStringTag', { skip: !hasBigInts || !hasToStringTag }, function (st) { + var fakeBigInt = { valueOf: function () { return BigInt(42); } }; + fakeBigInt[Symbol.toStringTag] = 'BigInt'; + st.equal(false, isBigInt(fakeBigInt), 'object with fake BigInt @@toStringTag and valueOf returning a BigInt is not a BigInt'); + + var notSoFakeBigInt = { valueOf: function () { return 42; } }; + notSoFakeBigInt[Symbol.toStringTag] = 'BigInt'; + st.equal(false, isBigInt(notSoFakeBigInt), 'object with fake BigInt @@toStringTag and valueOf not returning a BigInt is not a BigInt'); + st.end(); + }); + + var fakeBigIntString = { toString: function () { return '42n'; } }; + t.equal(false, isBigInt(fakeBigIntString), 'object with toString returning 42n is not a BigInt'); + + t.end(); +}); + +test('BigInt support', { skip: !hasBigInts }, function (t) { + forEach([ + Function('return 42n')(), // eslint-disable-line no-new-func + BigInt(42), + Object(BigInt(42)) + ], function (bigInt) { + t.equal(true, isBigInt(bigInt), debug(bigInt, 'is a BigInt')); + }); + + t.end(); +}); diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js new file mode 100644 index 0000000..6c8c7e7 --- /dev/null +++ b/node_modules/is-binary-path/index.js @@ -0,0 +1,12 @@ +'use strict'; +var path = require('path'); +var binaryExtensions = require('binary-extensions'); +var exts = Object.create(null); + +binaryExtensions.forEach(function (el) { + exts[el] = true; +}); + +module.exports = function (filepath) { + return path.extname(filepath).slice(1).toLowerCase() in exts; +}; diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-binary-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json new file mode 100644 index 0000000..cd21d88 --- /dev/null +++ b/node_modules/is-binary-path/package.json @@ -0,0 +1,39 @@ +{ + "name": "is-binary-path", + "version": "1.0.1", + "description": "Check if a filepath is a binary file", + "license": "MIT", + "repository": "sindresorhus/is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "bin", + "binary", + "ext", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000..a17d6a2 --- /dev/null +++ b/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a filepath is a binary file + + +## Install + +``` +$ npm install --save is-binary-path +``` + + +## Usage + +```js +var isBinaryPath = require('is-binary-path'); + +isBinaryPath('src/unicorn.png'); +//=> true + +isBinaryPath('src/unicorn.txt'); +//=> false +``` + + +## Related + +- [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-boolean-object/.editorconfig b/node_modules/is-boolean-object/.editorconfig new file mode 100644 index 0000000..8d93cc1 --- /dev/null +++ b/node_modules/is-boolean-object/.editorconfig @@ -0,0 +1,22 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[.github/workflows/*.yml] +indent_style = off +indent_size = off +max_line_length = off + +[{CHANGELOG.md,*.json}] +max_line_length = off diff --git a/node_modules/is-boolean-object/.eslintignore b/node_modules/is-boolean-object/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/is-boolean-object/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-boolean-object/.eslintrc b/node_modules/is-boolean-object/.eslintrc new file mode 100644 index 0000000..a072916 --- /dev/null +++ b/node_modules/is-boolean-object/.eslintrc @@ -0,0 +1,22 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-nested-callbacks": [2, 3] + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "prefer-regex-literals": 0, + }, + }, + { + "files": "test-corejs.js", + "extends": "@ljharb/eslint-config/tests", + }, + ], +} diff --git a/node_modules/is-boolean-object/.github/FUNDING.yml b/node_modules/is-boolean-object/.github/FUNDING.yml new file mode 100644 index 0000000..fd04996 --- /dev/null +++ b/node_modules/is-boolean-object/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-boolean-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-boolean-object/.nycrc b/node_modules/is-boolean-object/.nycrc new file mode 100644 index 0000000..a69aa2d --- /dev/null +++ b/node_modules/is-boolean-object/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-boolean-object/CHANGELOG.md b/node_modules/is-boolean-object/CHANGELOG.md new file mode 100644 index 0000000..f789bdb --- /dev/null +++ b/node_modules/is-boolean-object/CHANGELOG.md @@ -0,0 +1,107 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/inspect-js/is-boolean-object/compare/v1.1.1...v1.1.2) - 2021-08-05 + +### Commits + +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`6d319ea`](https://github.com/inspect-js/is-boolean-object/commit/6d319eac0ba237f7ba440a1fc4b32d007b1b0cf3) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4f85bef`](https://github.com/inspect-js/is-boolean-object/commit/4f85bef244f8fdd9ab99db0afe0b8fa00c853709) + +## [v1.1.1](https://github.com/inspect-js/is-boolean-object/compare/v1.1.0...v1.1.1) - 2021-05-07 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7201c41`](https://github.com/inspect-js/is-boolean-object/commit/7201c41fc1fd9d64b51716b80fc63d95064a4a59) +- [Tests] run tests with core-js as well [`9590e61`](https://github.com/inspect-js/is-boolean-object/commit/9590e6135505e2e3f69c6d8785a539fca1b1e594) +- [meta] do not publish github action workflow files [`341472b`](https://github.com/inspect-js/is-boolean-object/commit/341472bbe9855030c7eda9340ee4284244f0a4ad) +- [readme] update repo URLs; remove travis badge [`9fdbbc6`](https://github.com/inspect-js/is-boolean-object/commit/9fdbbc64b2a70ee93fcfd95fc6c94c7ec2bbedd4) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1cd35c9`](https://github.com/inspect-js/is-boolean-object/commit/1cd35c9b9b0b4af203f20bda0d7fd60798e57f99) +- [readme] add actions and codecov badges [`03769fe`](https://github.com/inspect-js/is-boolean-object/commit/03769feb1466f03b1345882ca0e4f8cacbbce9ce) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`db6598c`](https://github.com/inspect-js/is-boolean-object/commit/db6598c4cabcd0ffd2ba9b4525b53907f8b2ff1f) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`e0b8a9f`](https://github.com/inspect-js/is-boolean-object/commit/e0b8a9f0fc1290a0a29c75967d56bc1c17eb8d2d) +- [readme] remove defunct testling badge [`986a621`](https://github.com/inspect-js/is-boolean-object/commit/986a6217da7385f7063e1d4e4bf5be2892d00c20) +- [meta] use `prepublishOnly` script for npm 7+ [`7bb3b29`](https://github.com/inspect-js/is-boolean-object/commit/7bb3b2902008ca07af4185ca98bc41b3222d579f) +- [Deps] update `call-bind` [`3af6a71`](https://github.com/inspect-js/is-boolean-object/commit/3af6a71e1004c79567630ac9944b9f2cc184ac77) +- [meta] do not publish corejs test file [`d911f03`](https://github.com/inspect-js/is-boolean-object/commit/d911f0368b6922645d15b9e28f3ed92e1badcef4) +- [actions] update workflows [`9bb3d90`](https://github.com/inspect-js/is-boolean-object/commit/9bb3d9015f377280324b162a3062d21936707216) + +## [v1.1.0](https://github.com/inspect-js/is-boolean-object/compare/v1.0.1...v1.1.0) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`6cdb652`](https://github.com/inspect-js/is-boolean-object/commit/6cdb652add3c6e44c2f7fe07c5ca4c0d14ddc2c1) +- [Tests] run `nyc` on all tests [`9a33076`](https://github.com/inspect-js/is-boolean-object/commit/9a33076d14869bf5120a6ca3903bcb9a008cf2e5) +- [Tests] add .editorconfig [`bb401c0`](https://github.com/inspect-js/is-boolean-object/commit/bb401c084416b010d64e0c5a74465b37addab31f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`5cb2405`](https://github.com/inspect-js/is-boolean-object/commit/5cb24052ca84d840e929f05cd1fe6c03b85ec032) +- [Robustness] use `call-bind` to avoid a dependency on `.call` [`76d87ae`](https://github.com/inspect-js/is-boolean-object/commit/76d87ae74235a9995d39bcf5783c04c744c34520) +- [actions] add "Allow Edits" workflow [`337206a`](https://github.com/inspect-js/is-boolean-object/commit/337206af74bd7c340bc938ab6dc0535c08490b3d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`11f0481`](https://github.com/inspect-js/is-boolean-object/commit/11f0481efca28a241a35d384e2a302b1bcdc9a37) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b9602c8`](https://github.com/inspect-js/is-boolean-object/commit/b9602c8ca11be138722187c1fb0a5b25a57a4edc) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`999e9e2`](https://github.com/inspect-js/is-boolean-object/commit/999e9e224d4eec8b20fc9c3431e9ba42caad79c9) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bbb6728`](https://github.com/inspect-js/is-boolean-object/commit/bbb6728b9410f9d3e2d266523a477127e5e4c16f) + +## [v1.0.1](https://github.com/inspect-js/is-boolean-object/compare/v1.0.0...v1.0.1) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`a1778b8`](https://github.com/inspect-js/is-boolean-object/commit/a1778b81ab4fe4479176de854e4e233cc441f183) +- Update `eslint`; use my personal shared `eslint` config. [`2c42c50`](https://github.com/inspect-js/is-boolean-object/commit/2c42c50a0654044b6c7e2a4ab18227e8c275464b) +- [Tests] remove `jscs` [`3807025`](https://github.com/inspect-js/is-boolean-object/commit/380702504fabc47fe22f61c4847379023d31a657) +- [Tests] up to `node` `v8.4`, `v7.10`, `v6.11`, `v5.12`, `v4.8`; improve matrix; newer npm breaks in older node; improve scripts. [`a02b986`](https://github.com/inspect-js/is-boolean-object/commit/a02b98682b285de09e2c5a895627771d6a7f552c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `jscs`, `nsp`, `semver`, `tape` [`d9030a9`](https://github.com/inspect-js/is-boolean-object/commit/d9030a99b8e274c76ae5f23f31d9d085a7e25272) +- Update `eslint`, `nsp` [`a1b6388`](https://github.com/inspect-js/is-boolean-object/commit/a1b6388fabd0de51a02c567953826344ef05890c) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`17a0fd3`](https://github.com/inspect-js/is-boolean-object/commit/17a0fd391e32635ec3434baca0d062f8abeeb592) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`0b1818f`](https://github.com/inspect-js/is-boolean-object/commit/0b1818fdcaebc6133e515dfe3b5a8930b38999b5) +- [meta] remove unused Makefile and associated utilities [`33dc0ae`](https://github.com/inspect-js/is-boolean-object/commit/33dc0ae35a03e91f81b1bb3db5ba763dacadbfa2) +- Update `covert`, `jscs`, `eslint`, `semver` [`7e513c1`](https://github.com/inspect-js/is-boolean-object/commit/7e513c12998a651c14f62b3ecfb7215a5cc5ee8f) +- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` [`992b849`](https://github.com/inspect-js/is-boolean-object/commit/992b84933760e0fe6ba2cee74ad7fff507f28128) +- [meta] add `auto-changelog` [`63d71b8`](https://github.com/inspect-js/is-boolean-object/commit/63d71b8beb9aeb77cab3d2db2cf643f1b8b1a55c) +- Update `tape`, `eslint`, `semver` [`76aea69`](https://github.com/inspect-js/is-boolean-object/commit/76aea699fb315ac460799182d707c388b4a4e017) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a6cbec0`](https://github.com/inspect-js/is-boolean-object/commit/a6cbec09940b6f2c7cf366526a94c0c4756508f5) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape`; add `safe-publish-latest` [`7cf6bb0`](https://github.com/inspect-js/is-boolean-object/commit/7cf6bb05ba7bac504df680dd9ca625fba6dccb5a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`57d713c`](https://github.com/inspect-js/is-boolean-object/commit/57d713cca2ccbbbf1da1142ee5e8236d12551f76) +- [actions] add automatic rebasing / merge commit blocking [`f7a2bdb`](https://github.com/inspect-js/is-boolean-object/commit/f7a2bdb905e07d75c65593359f81bfeda9fe9826) +- [meta] create FUNDING.yml [`9765e73`](https://github.com/inspect-js/is-boolean-object/commit/9765e738cccdd5ff6c89b21324119a2bf4064fbd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `replace`, `semver`, `tape` [`5c16b56`](https://github.com/inspect-js/is-boolean-object/commit/5c16b56a5a2d36c6a70c1bd396b3a6c931f655db) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`5717aad`](https://github.com/inspect-js/is-boolean-object/commit/5717aadd8b0e8c76ccb194d1845ad8cc120f29c6) +- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`80b924d`](https://github.com/inspect-js/is-boolean-object/commit/80b924dd270188e1e928f4141078bee14d810e9b) +- [Dev Deps] update `jscs` [`2e5479e`](https://github.com/inspect-js/is-boolean-object/commit/2e5479e56b6d33288582cfe8c254ca081e79500c) +- Test up to `io.js` `v2.2` [`93379a4`](https://github.com/inspect-js/is-boolean-object/commit/93379a4b48ba719113006ab08bbe6679c8a27293) +- [Tests] remove `nsp`; use `npm audit`; allow to fail for now [`36ae30a`](https://github.com/inspect-js/is-boolean-object/commit/36ae30acffe4a892ea0882a793b8a90f09d08fdf) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`ef76976`](https://github.com/inspect-js/is-boolean-object/commit/ef76976db22f2867fca2ee377fdbc9da81f0d142) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`a1182bd`](https://github.com/inspect-js/is-boolean-object/commit/a1182bd99e5d31e113107241f0d697e71b27bf7b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`4f79b47`](https://github.com/inspect-js/is-boolean-object/commit/4f79b474f0643fd2c9dbc863949a61cf01255b6f) +- [Tests] up to `node` `v10.3` [`5e96464`](https://github.com/inspect-js/is-boolean-object/commit/5e96464fc08eacc45f5f58fe7800ddbc45e40cea) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`e1eb3fa`](https://github.com/inspect-js/is-boolean-object/commit/e1eb3fad8bad65140db3bd2381bb3bea6a9c6242) +- Only apps should have lockfiles. [`c7f301f`](https://github.com/inspect-js/is-boolean-object/commit/c7f301ff368f9e04f7f64a2ce9b6ae1aec803e69) +- [meta] add `funding` field [`fad0366`](https://github.com/inspect-js/is-boolean-object/commit/fad03662becea5db7cef29d816d173ad771be86a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`80d39d9`](https://github.com/inspect-js/is-boolean-object/commit/80d39d90205d3bb564acb80b0625e90c267347fd) +- [Tests] use `eclint` instead of `editorconfig-tools` [`980e91b`](https://github.com/inspect-js/is-boolean-object/commit/980e91b186a728f77366ba16b7bebc813b9cc3b0) +- [Dev Deps] Update `tape`, `eslint` [`9960830`](https://github.com/inspect-js/is-boolean-object/commit/9960830876a3672686c569fde3d43bb7983955f1) +- Test up to `io.js` `v3.0` [`a3c3cd0`](https://github.com/inspect-js/is-boolean-object/commit/a3c3cd087d7fcefbf4f3525c05f4cee3b6e5b0ef) +- [Dev Deps] update `tape` [`217fbd6`](https://github.com/inspect-js/is-boolean-object/commit/217fbd6bb2989f9304ad95cd49697da7fe03b8d5) +- [Tests] only audit prod deps [`89284ee`](https://github.com/inspect-js/is-boolean-object/commit/89284ee17dce1d044df0ca9e006072f25742bbaf) +- [Performance] only use toStringTag code path when the value has that property [`2863bc5`](https://github.com/inspect-js/is-boolean-object/commit/2863bc5b72680f05ace8e66fddcf48966b942d55) +- [Dev Deps] update `replace` [`53e72a5`](https://github.com/inspect-js/is-boolean-object/commit/53e72a5ceca5b3a82e6407829f9227df9df6d329) +- [Enhancement] slight optimization for `null` [`a90a3c4`](https://github.com/inspect-js/is-boolean-object/commit/a90a3c4464d0300e23384d96fb4281b55b7fd723) +- [Dev Deps] update `tape` [`9377bd5`](https://github.com/inspect-js/is-boolean-object/commit/9377bd5110e99d8ec550f24ef3f6ead62a8f1f50) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`3085530`](https://github.com/inspect-js/is-boolean-object/commit/30855304841854f79e406372f524efe4bc7d8c04) +- Test on `io.js` `v2.4` [`8af335c`](https://github.com/inspect-js/is-boolean-object/commit/8af335ca82a0eeba4a0a593775e4caf744834ec4) +- Test on `io.js` `v2.3` [`1eb3424`](https://github.com/inspect-js/is-boolean-object/commit/1eb3424bef528551f5c99a754281a51d92e40ab1) + +## v1.0.0 - 2015-04-28 + +### Commits + +- Dotfiles [`6b9b998`](https://github.com/inspect-js/is-boolean-object/commit/6b9b998bb238a32d4829c9f9bf274e5ca15023ee) +- `make release` [`d5e50b3`](https://github.com/inspect-js/is-boolean-object/commit/d5e50b33a3cd8d8abe7de8ae36e2944c24ce76ba) +- package.json [`117676a`](https://github.com/inspect-js/is-boolean-object/commit/117676a48609e636d4257c1b35c695ff20939211) +- Read me [`ef327a7`](https://github.com/inspect-js/is-boolean-object/commit/ef327a74c7f73e64cfa3c20a9620ef7accf8b762) +- Initial commit [`2346886`](https://github.com/inspect-js/is-boolean-object/commit/2346886252b9637c1af6851a3fc2cbc98bc986aa) +- Tests [`67211f8`](https://github.com/inspect-js/is-boolean-object/commit/67211f8bff1a49e5df219935765b83573c097353) +- Implementation [`2d88bd6`](https://github.com/inspect-js/is-boolean-object/commit/2d88bd6e1ef0f07f5a639775eb89f3b78e12eb65) diff --git a/node_modules/is-boolean-object/LICENSE b/node_modules/is-boolean-object/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/is-boolean-object/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-boolean-object/README.md b/node_modules/is-boolean-object/README.md new file mode 100644 index 0000000..a77f3e9 --- /dev/null +++ b/node_modules/is-boolean-object/README.md @@ -0,0 +1,57 @@ +# is-boolean-object [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isBoolean = require('is-boolean-object'); +var assert = require('assert'); + +assert.notOk(isBoolean(undefined)); +assert.notOk(isBoolean(null)); +assert.notOk(isBoolean('foo')); +assert.notOk(isBoolean(function () {})); +assert.notOk(isBoolean([])); +assert.notOk(isBoolean({})); +assert.notOk(isBoolean(/a/g)); +assert.notOk(isBoolean(new RegExp('a', 'g'))); +assert.notOk(isBoolean(new Date())); +assert.notOk(isBoolean(42)); +assert.notOk(isBoolean(NaN)); +assert.notOk(isBoolean(Infinity)); + +assert.ok(isBoolean(new Boolean(42))); +assert.ok(isBoolean(false)); +assert.ok(isBoolean(Object(false))); +assert.ok(isBoolean(true)); +assert.ok(isBoolean(Object(true))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-boolean-object +[2]: https://versionbadg.es/inspect-js/is-boolean-object.svg +[5]: https://david-dm.org/inspect-js/is-boolean-object.svg +[6]: https://david-dm.org/inspect-js/is-boolean-object +[7]: https://david-dm.org/inspect-js/is-boolean-object/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-boolean-object#info=devDependencies +[11]: https://nodei.co/npm/is-boolean-object.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-boolean-object.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-boolean-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-boolean-object +[codecov-image]: https://codecov.io/gh/inspect-js/is-boolean-object/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-boolean-object/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-boolean-object +[actions-url]: https://github.com/inspect-js/is-boolean-object/actions diff --git a/node_modules/is-boolean-object/index.js b/node_modules/is-boolean-object/index.js new file mode 100644 index 0000000..e1011f6 --- /dev/null +++ b/node_modules/is-boolean-object/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $boolToStr = callBound('Boolean.prototype.toString'); +var $toString = callBound('Object.prototype.toString'); + +var tryBooleanObject = function booleanBrandCheck(value) { + try { + $boolToStr(value); + return true; + } catch (e) { + return false; + } +}; +var boolClass = '[object Boolean]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isBoolean(value) { + if (typeof value === 'boolean') { + return true; + } + if (value === null || typeof value !== 'object') { + return false; + } + return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; +}; diff --git a/node_modules/is-boolean-object/package.json b/node_modules/is-boolean-object/package.json new file mode 100644 index 0000000..06196f6 --- /dev/null +++ b/node_modules/is-boolean-object/package.json @@ -0,0 +1,87 @@ +{ + "name": "is-boolean-object", + "version": "1.1.2", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only && npm run test:harmony && npm run test:corejs", + "tests-only": "nyc tape 'test/**/*.js'", + "test:harmony": "node --harmony --es-staging test", + "test:corejs": "nyc tape test-corejs.js", + "posttest": "aud --production", + "prelint": "npm run eccheck", + "lint": "eslint --ext=js,mjs .", + "eccheck": "eclint check $(git ls-files)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-boolean-object.git" + }, + "keywords": [ + "Boolean", + "ES6", + "toStringTag", + "@@toStringTag", + "Boolean object", + "true", + "false", + "is-boolean" + ], + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", + "eclint": "^2.8.1", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-boolean-object/test/index.js b/node_modules/is-boolean-object/test/index.js new file mode 100644 index 0000000..cd4c44f --- /dev/null +++ b/node_modules/is-boolean-object/test/index.js @@ -0,0 +1,48 @@ +'use strict'; + +var test = require('tape'); +var isBoolean = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Booleans', function (t) { + t.test('primitives', function (st) { + st.notOk(isBoolean(), 'undefined is not Boolean'); + st.notOk(isBoolean(null), 'null is not Boolean'); + st.notOk(isBoolean(0), '0 is not Boolean'); + st.notOk(isBoolean(NaN), 'NaN is not Boolean'); + st.notOk(isBoolean(Infinity), 'Infinity is not Boolean'); + st.notOk(isBoolean('foo'), 'string is not Boolean'); + st.end(); + }); + + t.test('objects', function (st) { + st.notOk(isBoolean(Object(42)), 'number object is not Boolean'); + st.notOk(isBoolean([]), 'array is not Boolean'); + st.notOk(isBoolean({}), 'object is not Boolean'); + st.notOk(isBoolean(function () {}), 'function is not Boolean'); + st.notOk(isBoolean(/a/g), 'regex literal is not Boolean'); + st.notOk(isBoolean(new RegExp('a', 'g')), 'regex object is not Boolean'); + st.notOk(isBoolean(new Date()), 'new Date() is not Boolean'); + st.end(); + }); + + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeBoolean = { + toString: function () { return 'true'; }, + valueOf: function () { return true; } + }; + fakeBoolean[Symbol.toStringTag] = 'Boolean'; + t.notOk(isBoolean(fakeBoolean), 'fake Boolean with @@toStringTag "Boolean" is not Boolean'); + t.end(); +}); + +test('Booleans', function (t) { + t.ok(isBoolean(true), 'true is Boolean'); + t.ok(isBoolean(false), 'false is Boolean'); + t.ok(isBoolean(Object(true)), 'Object(true) is Boolean'); + t.ok(isBoolean(Object(false)), 'Object(false) is Boolean'); + t.end(); +}); diff --git a/node_modules/is-buffer/LICENSE b/node_modules/is-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/is-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-buffer/README.md b/node_modules/is-buffer/README.md new file mode 100644 index 0000000..cce0a8c --- /dev/null +++ b/node_modules/is-buffer/README.md @@ -0,0 +1,53 @@ +# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg +[downloads-url]: https://npmjs.org/package/is-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg +[saucelabs-url]: https://saucelabs.com/u/is-buffer + +## Why not use `Buffer.isBuffer`? + +This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). + +It's future-proof and works in node too! + +## install + +```bash +npm install is-buffer +``` + +## usage + +```js +var isBuffer = require('is-buffer') + +isBuffer(new Buffer(4)) // true + +isBuffer(undefined) // false +isBuffer(null) // false +isBuffer('') // false +isBuffer(true) // false +isBuffer(false) // false +isBuffer(0) // false +isBuffer(1) // false +isBuffer(1.0) // false +isBuffer('string') // false +isBuffer({}) // false +isBuffer(function foo () {}) // false +``` + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/is-buffer/index.js b/node_modules/is-buffer/index.js new file mode 100644 index 0000000..9cce396 --- /dev/null +++ b/node_modules/is-buffer/index.js @@ -0,0 +1,21 @@ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json new file mode 100644 index 0000000..ea12137 --- /dev/null +++ b/node_modules/is-buffer/package.json @@ -0,0 +1,51 @@ +{ + "name": "is-buffer", + "description": "Determine if an object is a Buffer", + "version": "1.1.6", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "dependencies": {}, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "keywords": [ + "buffer", + "buffers", + "type", + "core buffer", + "browser buffer", + "browserify", + "typed array", + "uint32array", + "int16array", + "int32array", + "float32array", + "float64array", + "browser", + "arraybuffer", + "dataview" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "testling": { + "files": "test/*.js" + } +} diff --git a/node_modules/is-buffer/test/basic.js b/node_modules/is-buffer/test/basic.js new file mode 100644 index 0000000..be4f8e4 --- /dev/null +++ b/node_modules/is-buffer/test/basic.js @@ -0,0 +1,24 @@ +var isBuffer = require('../') +var test = require('tape') + +test('is-buffer', function (t) { + t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') + t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') + + t.equal(isBuffer(undefined), false, 'undefined') + t.equal(isBuffer(null), false, 'null') + t.equal(isBuffer(''), false, 'empty string') + t.equal(isBuffer(true), false, 'true') + t.equal(isBuffer(false), false, 'false') + t.equal(isBuffer(0), false, '0') + t.equal(isBuffer(1), false, '1') + t.equal(isBuffer(1.0), false, '1.0') + t.equal(isBuffer('string'), false, 'string') + t.equal(isBuffer({}), false, '{}') + t.equal(isBuffer([]), false, '[]') + t.equal(isBuffer(function foo () {}), false, 'function foo () {}') + t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') + t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') + + t.end() +}) diff --git a/node_modules/is-callable/.editorconfig b/node_modules/is-callable/.editorconfig new file mode 100644 index 0000000..f5f5679 --- /dev/null +++ b/node_modules/is-callable/.editorconfig @@ -0,0 +1,31 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 +max_line_length = off + +[README.md] +indent_style = off +indent_size = off +max_line_length = off + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off + +[coverage*/**/*] +indent_style = off +indent_size = off +max_line_length = off diff --git a/node_modules/is-callable/.eslintrc b/node_modules/is-callable/.eslintrc new file mode 100644 index 0000000..ce033bf --- /dev/null +++ b/node_modules/is-callable/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "max-statements-per-line": [2, { "max": 2 }], + }, +} diff --git a/node_modules/is-callable/.github/FUNDING.yml b/node_modules/is-callable/.github/FUNDING.yml new file mode 100644 index 0000000..0fdebd0 --- /dev/null +++ b/node_modules/is-callable/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-callable +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-callable/.nycrc b/node_modules/is-callable/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-callable/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-callable/CHANGELOG.md b/node_modules/is-callable/CHANGELOG.md new file mode 100644 index 0000000..32788cd --- /dev/null +++ b/node_modules/is-callable/CHANGELOG.md @@ -0,0 +1,158 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.7](https://github.com/inspect-js/is-callable/compare/v1.2.6...v1.2.7) - 2022-09-23 + +### Commits + +- [Fix] recognize `document.all` in IE 6-10 [`06c1db2`](https://github.com/inspect-js/is-callable/commit/06c1db2b9b2e0f28428e1293eb572f8f93871ec7) +- [Tests] improve logic for FF 20-35 [`0f7d9b9`](https://github.com/inspect-js/is-callable/commit/0f7d9b9c7fe149ca87e71f0a125ade251a6a578c) +- [Fix] handle `document.all` in FF 27 (and +, probably) [`696c661`](https://github.com/inspect-js/is-callable/commit/696c661b8c0810c2d05ab172f1607f4e77ddf81e) +- [Tests] fix proxy tests in FF 42-63 [`985df0d`](https://github.com/inspect-js/is-callable/commit/985df0dd36f8cfe6f1993657b7c0f4cfc19dae30) +- [readme] update tested browsers [`389e919`](https://github.com/inspect-js/is-callable/commit/389e919493b1cb2010126b0411e5291bf76169bd) +- [Fix] detect `document.all` in Opera 12.16 [`b9f1022`](https://github.com/inspect-js/is-callable/commit/b9f1022b3d7e466b7f09080bd64c253caf644325) +- [Fix] HTML elements: properly report as callable in Opera 12.16 [`17391fe`](https://github.com/inspect-js/is-callable/commit/17391fe02b895777c4337be28dca3b364b743b34) +- [Tests] fix inverted logic in FF3 test [`056ebd4`](https://github.com/inspect-js/is-callable/commit/056ebd48790f46ca18ff5b12f51b44c08ccc3595) + +## [v1.2.6](https://github.com/inspect-js/is-callable/compare/v1.2.5...v1.2.6) - 2022-09-14 + +### Commits + +- [Fix] work for `document.all` in Firefox 3 and IE 6-8 [`015132a`](https://github.com/inspect-js/is-callable/commit/015132aaef886ec777b5b3593ef4ce461dd0c7d4) +- [Test] skip function toString check for nullish values [`8698116`](https://github.com/inspect-js/is-callable/commit/8698116f95eb59df8b48ec8e4585fc1cdd8cae9f) +- [readme] add "supported engines" section [`0442207`](https://github.com/inspect-js/is-callable/commit/0442207a89a1554d41ba36daf21862ef7ccbd500) +- [Tests] skip one of the fixture objects in FF 3.6 [`a501141`](https://github.com/inspect-js/is-callable/commit/a5011410bc6edb276c6ec8b47ce5c5d83c4bee15) +- [Tests] allow `class` constructor tests to fail in FF v45 - v54, which has undetectable classes [`b12e4a4`](https://github.com/inspect-js/is-callable/commit/b12e4a4d8c438678bd7710f9f896680150766b51) +- [Fix] Safari 4: regexes should not be considered callable [`4b732ff`](https://github.com/inspect-js/is-callable/commit/4b732ffa34346db3f0193ea4e46b7d4e637e6c82) +- [Fix] properly recognize `document.all` in Safari 4 [`3193735`](https://github.com/inspect-js/is-callable/commit/319373525dc4603346661641840cd9a3e0613136) + +## [v1.2.5](https://github.com/inspect-js/is-callable/compare/v1.2.4...v1.2.5) - 2022-09-11 + +### Commits + +- [actions] reuse common workflows [`5bb4b32`](https://github.com/inspect-js/is-callable/commit/5bb4b32dc93987328ab4f396601f751c4a7abd62) +- [meta] better `eccheck` command [`b9bd597`](https://github.com/inspect-js/is-callable/commit/b9bd597322b6e3a24c74c09881ca73e1d9f9f485) +- [meta] use `npmignore` to autogenerate an npmignore file [`3192d38`](https://github.com/inspect-js/is-callable/commit/3192d38527c7fc461d05d5aa93d47628e658bc45) +- [Fix] for HTML constructors, always use `tryFunctionObject` even in pre-toStringTag browsers [`3076ea2`](https://github.com/inspect-js/is-callable/commit/3076ea21d1f6ecc1cb711dcf1da08f257892c72b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `available-typed-arrays`, `object-inspect`, `safe-publish-latest`, `tape` [`8986746`](https://github.com/inspect-js/is-callable/commit/89867464c42adc5cd375ee074a4574b0295442cb) +- [meta] add `auto-changelog` [`7dda9d0`](https://github.com/inspect-js/is-callable/commit/7dda9d04e670a69ae566c8fa596da4ff4371e615) +- [Fix] properly report `document.all` [`da90b2b`](https://github.com/inspect-js/is-callable/commit/da90b2b68dc4f33702c2e01ad07b4f89bcb60984) +- [actions] update codecov uploader [`c8f847c`](https://github.com/inspect-js/is-callable/commit/c8f847c90e04e54ff73c7cfae86e96e94990e324) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`899ae00`](https://github.com/inspect-js/is-callable/commit/899ae00b6abd10d81fc8bc7f02b345fd885d5f56) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-value-fixtures`, `object-inspect`, `tape` [`344e913`](https://github.com/inspect-js/is-callable/commit/344e913b149609bf741aa7345fa32dc0b90d8893) +- [meta] remove greenkeeper config [`737dce5`](https://github.com/inspect-js/is-callable/commit/737dce5590b1abb16183a63cb9d7d26920b3b394) +- [meta] npmignore coverage output [`680a883`](https://github.com/inspect-js/is-callable/commit/680a8839071bf36a419fe66e1ced7a3303c27b28) + + +1.2.4 / 2021-08-05 +================= + * [Fix] use `has-tostringtag` approach to behave correctly in the presence of symbol shams + * [readme] fix repo URLs + * [readme] add actions and codecov badges + * [readme] remove defunct badges + * [meta] ignore eclint checking coverage output + * [meta] use `prepublishOnly` script for npm 7+ + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] remove unused workflow file + * [Tests] run `nyc` on all tests; use `tape` runner + * [Tests] use `available-typed-arrays`, `for-each`, `has-symbols`, `object-inspect` + * [Dev Deps] update `available-typed-arrays`, `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` + +1.2.3 / 2021-01-31 +================= + * [Fix] `document.all` is callable (do not use `document.all`!) + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` + * [Tests] migrate tests to Github Actions + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + +1.2.2 / 2020-09-21 +================= + * [Fix] include actual fix from 579179e + * [Dev Deps] update `eslint` + +1.2.1 / 2020-09-09 +================= + * [Fix] phantomjs‘ Reflect.apply does not throw properly on a bad array-like + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + * [meta] fix eclint error + +1.2.0 / 2020-06-02 +================= + * [New] use `Reflect.apply`‑based callability detection + * [readme] add install instructions (#55) + * [meta] only run `aud` on prod deps + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `make-arrow-function`, `make-generator-function`; add `aud`, `safe-publish-latest`, `make-async-function` + * [Tests] add tests for function proxies (#53, #25) + +1.1.5 / 2019-12-18 +================= + * [meta] remove unused Makefile and associated utilities + * [meta] add `funding` field; add FUNDING.yml + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `tape`, `covert`, `rimraf` + * [Tests] use shared travis configs + * [Tests] use `eccheck` over `editorconfig-tools` + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + * [actions] add automatic rebasing / merge commit blocking + +1.1.4 / 2018-07-02 +================= + * [Fix] improve `class` and arrow function detection (#30, #31) + * [Tests] on all latest node minors; improve matrix + * [Dev Deps] update all dev deps + +1.1.3 / 2016-02-27 +================= + * [Fix] ensure “class “ doesn’t screw up “class” detection + * [Tests] up to `node` `v5.7`, `v4.3` + * [Dev Deps] update to `eslint` v2, `@ljharb/eslint-config`, `jscs` + +1.1.2 / 2016-01-15 +================= + * [Fix] Make sure comments don’t screw up “class” detection (#4) + * [Tests] up to `node` `v5.3` + * [Tests] Add `parallelshell`, run both `--es-staging` and stock tests at once + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Refactor] convert `isNonES6ClassFn` into `isES6ClassFn` + +1.1.1 / 2015-11-30 +================= + * [Fix] do not throw when a non-function has a function in its [[Prototype]] (#2) + * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `semver` + * [Tests] up to `node` `v5.1` + * [Tests] no longer allow node 0.8 to fail. + * [Tests] fix npm upgrades in older nodes + +1.1.0 / 2015-10-02 +================= + * [Fix] Some browsers report TypedArray constructors as `typeof object` + * [New] return false for "class" constructors, when possible. + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Dev Deps] update `eslint`, `editorconfig-tools`, `nsp`, `tape`, `semver`, `jscs`, `covert`, `make-arrow-function` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.4 / 2015-01-30 +================= + * If @@toStringTag is not present, use the old-school Object#toString test. + +1.0.3 / 2015-01-29 +================= + * Add tests to ensure arrow functions are callable. + * Refactor to aid optimization of non-try/catch code. + +1.0.2 / 2015-01-29 +================= + * Fix broken package.json + +1.0.1 / 2015-01-29 +================= + * Add early exit for typeof not "function" + +1.0.0 / 2015-01-29 +================= + * Initial release. diff --git a/node_modules/is-callable/LICENSE b/node_modules/is-callable/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/is-callable/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-callable/README.md b/node_modules/is-callable/README.md new file mode 100644 index 0000000..4f2b6d6 --- /dev/null +++ b/node_modules/is-callable/README.md @@ -0,0 +1,83 @@ +# is-callable [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag. + +## Supported engines +Automatically tested in every minor version of node. + +Manually tested in: + - Safari: v4 - v15 (4, 5, 5.1, 6.0.5, 6.2, 7.1, 8, 9.1.3, 10.1.2, 11.1.2, 12.1, 13.1.2, 14.1.2, 15.3, 15.6.1) + - Note: Safari 9 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - Chrome: v15 - v81, v83 - v106(every integer version) + - Note: This includes Edge v80+ and Opera v15+, which matches Chrome + - Firefox: v3, v3.6, v4 - v105 (every integer version) + - Note: v45 - v54 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - Note: in v42 - v63, `Function.prototype.toString` throws on HTML element constructors, or a Proxy to a function + - Note: in v20 - v35, HTML element constructors are not callable, despite having typeof `function`. + - Note: in v19, `document.all` is not callable. + - IE: v6 - v11(every integer version + - Opera: v11.1, v11.5, v11.6, v12.1, v12.14, v12.15, v12.16, v15+ v15+ matches Chrome + +## Example + +```js +var isCallable = require('is-callable'); +var assert = require('assert'); + +assert.notOk(isCallable(undefined)); +assert.notOk(isCallable(null)); +assert.notOk(isCallable(false)); +assert.notOk(isCallable(true)); +assert.notOk(isCallable([])); +assert.notOk(isCallable({})); +assert.notOk(isCallable(/a/g)); +assert.notOk(isCallable(new RegExp('a', 'g'))); +assert.notOk(isCallable(new Date())); +assert.notOk(isCallable(42)); +assert.notOk(isCallable(NaN)); +assert.notOk(isCallable(Infinity)); +assert.notOk(isCallable(new Number(42))); +assert.notOk(isCallable('foo')); +assert.notOk(isCallable(Object('foo'))); + +assert.ok(isCallable(function () {})); +assert.ok(isCallable(function* () {})); +assert.ok(isCallable(x => x * x)); +``` + +## Install + +Install with + +``` +npm install is-callable +``` + +## Tests + +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-callable +[2]: https://versionbadg.es/inspect-js/is-callable.svg +[5]: https://david-dm.org/inspect-js/is-callable.svg +[6]: https://david-dm.org/inspect-js/is-callable +[7]: https://david-dm.org/inspect-js/is-callable/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-callable#info=devDependencies +[11]: https://nodei.co/npm/is-callable.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-callable.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-callable.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-callable +[codecov-image]: https://codecov.io/gh/inspect-js/is-callable/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-callable/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-callable +[actions-url]: https://github.com/inspect-js/is-callable/actions diff --git a/node_modules/is-callable/index.js b/node_modules/is-callable/index.js new file mode 100644 index 0000000..f2a89f8 --- /dev/null +++ b/node_modules/is-callable/index.js @@ -0,0 +1,101 @@ +'use strict'; + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return ( + str === ddaClass + || str === ddaClass2 + || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} + +module.exports = reflectApply + ? function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } + : function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } + return tryFunctionObject(value); + }; diff --git a/node_modules/is-callable/package.json b/node_modules/is-callable/package.json new file mode 100644 index 0000000..aa3e8df --- /dev/null +++ b/node_modules/is-callable/package.json @@ -0,0 +1,106 @@ +{ + "name": "is-callable", + "version": "1.2.7", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only --", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs ." + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-callable.git" + }, + "keywords": [ + "Function", + "function", + "callable", + "generator", + "generator function", + "arrow", + "arrow function", + "ES6", + "toStringTag", + "@@toStringTag" + ], + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "make-arrow-function": "^1.2.0", + "make-async-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "v1.2.5" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-callable/test/index.js b/node_modules/is-callable/test/index.js new file mode 100644 index 0000000..bfe5db5 --- /dev/null +++ b/node_modules/is-callable/test/index.js @@ -0,0 +1,244 @@ +'use strict'; + +/* eslint no-magic-numbers: 1 */ + +var test = require('tape'); +var isCallable = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var typedArrayNames = require('available-typed-arrays')(); +var generators = require('make-generator-function')(); +var arrows = require('make-arrow-function').list(); +var asyncs = require('make-async-function').list(); +var weirdlyCommentedArrowFn; +try { + /* eslint-disable no-new-func */ + weirdlyCommentedArrowFn = Function('return cl/*/**/=>/**/ass - 1;')(); + /* eslint-enable no-new-func */ +} catch (e) { /**/ } + +var isIE68 = !(0 in [undefined]); +var isFirefox = typeof window !== 'undefined' && ('netscape' in window) && (/ rv:/).test(navigator.userAgent); +var fnToStringCoerces; +try { + Function.prototype.toString.call(v.uncoercibleFnObject); + fnToStringCoerces = true; +} catch (e) { + fnToStringCoerces = false; +} + +var noop = function () {}; +var classFake = function classFake() { }; // eslint-disable-line func-name-matching +var returnClass = function () { return ' class '; }; +var return3 = function () { return 3; }; +/* for coverage */ +noop(); +classFake(); +returnClass(); +return3(); +/* end for coverage */ + +var proxy; +if (typeof Proxy === 'function') { + try { + proxy = new Proxy(function () {}, {}); + // for coverage + proxy(); + String(proxy); + } catch (_) { + // Older engines throw a `TypeError` when `Function.prototype.toString` is called on a Proxy object. + proxy = null; + } +} + +var invokeFunction = function invokeFunctionString(str) { + var result; + try { + /* eslint-disable no-new-func */ + var fn = Function(str); + /* eslint-enable no-new-func */ + result = fn(); + } catch (e) {} + return result; +}; + +var classConstructor = invokeFunction('"use strict"; return class Foo {}'); +var hasDetectableClasses = classConstructor && Function.prototype.toString.call(classConstructor) === 'class Foo {}'; + +var commentedClass = invokeFunction('"use strict"; return class/*kkk*/\n//blah\n Bar\n//blah\n {}'); +var commentedClassOneLine = invokeFunction('"use strict"; return class/**/A{}'); +var classAnonymous = invokeFunction('"use strict"; return class{}'); +var classAnonymousCommentedOneLine = invokeFunction('"use strict"; return class/*/*/{}'); + +test('not callables', function (t) { + t.notOk(isCallable(), 'implicit undefined is not callable'); + + forEach(v.nonFunctions.concat([ + Object(42), + Object('foo'), + NaN, + [], + /a/g, + new RegExp('a', 'g'), + new Date() + ]), function (nonFunction) { + if (fnToStringCoerces && nonFunction === v.coercibleFnObject) { + t.comment('FF 3.6 has a Function toString that coerces its receiver, so this test is skipped'); + return; + } + if (nonFunction != null) { // eslint-disable-line eqeqeq + if (isFirefox) { + // Firefox 3 throws some kind of *object* here instead of a proper error + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } else { + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + TypeError, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } + } + t.equal(isCallable(nonFunction), false, inspect(nonFunction) + ' is not callable'); + }); + + t.test('non-function with function in its [[Prototype]] chain', function (st) { + var Foo = function Bar() {}; + Foo.prototype = noop; + st.equal(isCallable(Foo), true, 'sanity check: Foo is callable'); + st.equal(isCallable(new Foo()), false, 'instance of Foo is not callable'); + st.end(); + }); + + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeFunction = { + toString: function () { return String(return3); }, + valueOf: return3 + }; + fakeFunction[Symbol.toStringTag] = 'Function'; + t.equal(String(fakeFunction), String(return3)); + t.equal(Number(fakeFunction), return3()); + t.notOk(isCallable(fakeFunction), 'fake Function with @@toStringTag "Function" is not callable'); + t.end(); +}); + +test('Functions', function (t) { + t.ok(isCallable(noop), 'function is callable'); + t.ok(isCallable(classFake), 'function with name containing "class" is callable'); + t.ok(isCallable(returnClass), 'function with string " class " is callable'); + t.ok(isCallable(isCallable), 'isCallable is callable'); + t.end(); +}); + +test('Typed Arrays', { skip: typedArrayNames.length === 0 }, function (st) { + forEach(typedArrayNames, function (typedArray) { + st.ok(isCallable(global[typedArray]), typedArray + ' is callable'); + }); + st.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.ok(isCallable(genFn), 'generator function ' + genFn + ' is callable'); + }); + t.end(); +}); + +test('Arrow functions', { skip: arrows.length === 0 }, function (t) { + forEach(arrows, function (arrowFn) { + t.ok(isCallable(arrowFn), 'arrow function ' + arrowFn + ' is callable'); + }); + t.ok(isCallable(weirdlyCommentedArrowFn), 'weirdly commented arrow functions are callable'); + t.end(); +}); + +test('"Class" constructors', { + skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous, todo: !hasDetectableClasses +}, function (t) { + if (!hasDetectableClasses) { + t.comment('WARNING: This engine does not support detectable classes'); + } + t.notOk(isCallable(classConstructor), 'class constructors are not callable'); + t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not callable'); + t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signature are not callable'); + t.notOk(isCallable(classAnonymous), 'anonymous class constructors are not callable'); + t.notOk(isCallable(classAnonymousCommentedOneLine), 'anonymous one-line class constructors with comments in the signature are not callable'); + t.end(); +}); + +test('`async function`s', { skip: asyncs.length === 0 }, function (t) { + forEach(asyncs, function (asyncFn) { + t.ok(isCallable(asyncFn), '`async function` ' + asyncFn + ' is callable'); + }); + t.end(); +}); + +test('proxies of functions', { skip: !proxy }, function (t) { + t.equal(isCallable(proxy), true, 'proxies of functions are callable'); + t.end(); +}); + +test('throwing functions', function (t) { + t.plan(1); + + var thrower = function (a) { return a.b; }; + t.ok(isCallable(thrower), 'a function that throws is callable'); +}); + +test('DOM', function (t) { + /* eslint-env browser */ + + t.test('document.all', { skip: typeof document !== 'object' }, function (st) { + st.notOk(isCallable(document), 'document is not callable'); + + var all = document.all; + var isFF3 = !isIE68 && Object.prototype.toString(all) === Object.prototype.toString.call(document.all); // this test is true in IE 6-8 also + var expected = false; + if (!isFF3) { + try { + expected = document.all('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + st.equal(isCallable(document.all), expected, 'document.all is ' + (isFF3 ? 'not ' : '') + 'callable'); + + st.end(); + }); + + forEach([ + 'HTMLElement', + 'HTMLAnchorElement' + ], function (name) { + var constructor = global[name]; + + t.test(name, { skip: !constructor }, function (st) { + st.match(typeof constructor, /^(?:function|object)$/, name + ' is a function or object'); + + var callable = isCallable(constructor); + st.equal(typeof callable, 'boolean'); + + if (callable) { + st.doesNotThrow( + function () { Function.prototype.toString.call(constructor); }, + 'anything this library claims is callable should be accepted by Function toString' + ); + } else { + st['throws']( + function () { Function.prototype.toString.call(constructor); }, + TypeError, + 'anything this library claims is not callable should not be accepted by Function toString' + ); + } + + st.end(); + }); + }); + + t.end(); +}); diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc new file mode 100644 index 0000000..f2e0726 --- /dev/null +++ b/node_modules/is-core-module/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "func-style": 1, + }, + "overrides": [ + { + "files": "test/**", + "rules": { + "global-require": 0, + "max-depth": 0, + "max-lines-per-function": 0, + "no-negated-condition": 0, + }, + }, + ], +} diff --git a/node_modules/is-core-module/.nycrc b/node_modules/is-core-module/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-core-module/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md new file mode 100644 index 0000000..ae847df --- /dev/null +++ b/node_modules/is-core-module/CHANGELOG.md @@ -0,0 +1,205 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.15.1](https://github.com/inspect-js/is-core-module/compare/v2.15.0...v2.15.1) - 2024-08-21 + +### Commits + +- [Tests] add `process.getBuiltinModule` tests [`28c7791`](https://github.com/inspect-js/is-core-module/commit/28c7791c196d58c64cfdf638b7e68ed1b62a4da0) +- [Fix] `test/mock_loader` is no longer exposed as of v22.7 [`68b08b0`](https://github.com/inspect-js/is-core-module/commit/68b08b0d7963447dbffa5142e8810dca550383af) +- [Tests] replace `aud` with `npm audit` [`32f8060`](https://github.com/inspect-js/is-core-module/commit/32f806026dac14f9016be4401a643851240c76b9) +- [Dev Deps] update `mock-property` [`f7d3c8f`](https://github.com/inspect-js/is-core-module/commit/f7d3c8f01e922be49621683eb41477c4f50522e1) +- [Dev Deps] add missing peer dep [`eaee885`](https://github.com/inspect-js/is-core-module/commit/eaee885b67238819e9c8ed5bd2098766e1d05331) + +## [v2.15.0](https://github.com/inspect-js/is-core-module/compare/v2.14.0...v2.15.0) - 2024-07-17 + +### Commits + +- [New] add `node:sea` [`2819fb3`](https://github.com/inspect-js/is-core-module/commit/2819fb3eae312fa64643bc5430ebd06ec0f3fb88) + +## [v2.14.0](https://github.com/inspect-js/is-core-module/compare/v2.13.1...v2.14.0) - 2024-06-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `mock-property`, `npmignore`, `tape` [`0e43200`](https://github.com/inspect-js/is-core-module/commit/0e432006d97237cc082d41e6a593e87c81068364) +- [meta] add missing `engines.node` [`4ea3af8`](https://github.com/inspect-js/is-core-module/commit/4ea3af88891a1d4f96026f0ec0ef08c67cd1bd24) +- [New] add `test/mock_loader` [`e9fbd29`](https://github.com/inspect-js/is-core-module/commit/e9fbd2951383be070aeffb9ebbf3715237282610) +- [Deps] update `hasown` [`57f1940`](https://github.com/inspect-js/is-core-module/commit/57f1940947b3e368abdf529232d2f17d88909358) + +## [v2.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20 + +### Commits + +- [Refactor] use `hasown` instead of `has` [`0e52096`](https://github.com/inspect-js/is-core-module/commit/0e520968b0a725276b67420ab4b877486b243ae0) +- [Dev Deps] update `mock-property`, `tape` [`8736b35`](https://github.com/inspect-js/is-core-module/commit/8736b35464d0f297b55da2c6b30deee04b8303c5) + +## [v2.13.0](https://github.com/inspect-js/is-core-module/compare/v2.12.1...v2.13.0) - 2023-08-05 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `semver`, `tape` [`c75b263`](https://github.com/inspect-js/is-core-module/commit/c75b263d047cb53430c3970107e5eb64d6cd6c0c) +- [New] `node:test/reporters` and `wasi`/`node:wasi` are in v18.17 [`d76cbf8`](https://github.com/inspect-js/is-core-module/commit/d76cbf8e9b208acfd98913fed5a5f45cb15fe5dc) + +## [v2.12.1](https://github.com/inspect-js/is-core-module/compare/v2.12.0...v2.12.1) - 2023-05-16 + +### Commits + +- [Fix] `test/reporters` now requires the `node:` prefix as of v20.2 [`12183d0`](https://github.com/inspect-js/is-core-module/commit/12183d0d8e4edf56b6ce18a1b3be54bfce10175b) + +## [v2.12.0](https://github.com/inspect-js/is-core-module/compare/v2.11.0...v2.12.0) - 2023-04-10 + +### Commits + +- [actions] update rebase action to use reusable workflow [`c0a7251`](https://github.com/inspect-js/is-core-module/commit/c0a7251f734f3c621932c5fcdfd1bf966b42ca32) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9ae8b7f`](https://github.com/inspect-js/is-core-module/commit/9ae8b7fac03c369861d0991b4a2ce8d4848e6a7d) +- [New] `test/reporters` added in v19.9, `wasi` added in v20 [`9d5341a`](https://github.com/inspect-js/is-core-module/commit/9d5341ab32053f25b7fa7db3c0e18461db24a79c) +- [Dev Deps] add missing `in-publish` dep [`5980245`](https://github.com/inspect-js/is-core-module/commit/59802456e9ac919fa748f53be9d8fbf304a197df) + +## [v2.11.0](https://github.com/inspect-js/is-core-module/compare/v2.10.0...v2.11.0) - 2022-10-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3360011`](https://github.com/inspect-js/is-core-module/commit/33600118857b46177178072fba2affcdeb009d12) +- [Dev Deps] update `aud`, `tape` [`651c6b0`](https://github.com/inspect-js/is-core-module/commit/651c6b0cc2799d4130866cf43ad333dcade3d26c) +- [New] `inspector/promises` and `node:inspector/promises` is now available in node 19 [`22d332f`](https://github.com/inspect-js/is-core-module/commit/22d332fe22ac050305444e0781ff85af819abcb0) + +## [v2.10.0](https://github.com/inspect-js/is-core-module/compare/v2.9.0...v2.10.0) - 2022-08-03 + +### Commits + +- [New] `node:test` is now available in node ^16.17 [`e8fd36e`](https://github.com/inspect-js/is-core-module/commit/e8fd36e9b86c917775a07cc473b62a3294f459f2) +- [Tests] improve skip message [`c014a4c`](https://github.com/inspect-js/is-core-module/commit/c014a4c0cd6eb15fff573ae4709191775e70cab4) + +## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19 + +### Commits + +- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5) +- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455) +- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8) + +## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05 + +### Commits + +- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d) +- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e) +- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14) + +## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14 + +### Commits + +- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904) +- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e) +- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4) + +## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27 + +### Commits + +- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526) +- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7) +- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c) +- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2) +- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13) + +## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17 + +### Commits + +- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081) +- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d) +- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832) +- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963) + +## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12 + +### Commits + +- [Dev Deps] update `auto-changelog`, `eslint` [`6334cc9`](https://github.com/inspect-js/is-core-module/commit/6334cc94f3af7469685bd8f236740991baaf2705) +- [New] add `stream/web` to node v16.5+ [`17ac59b`](https://github.com/inspect-js/is-core-module/commit/17ac59b662d63e220a2e5728625f005c24f177b2) + +## [v2.4.0](https://github.com/inspect-js/is-core-module/compare/v2.3.0...v2.4.0) - 2021-05-09 + +### Commits + +- [readme] add actions and codecov badges [`82b7faa`](https://github.com/inspect-js/is-core-module/commit/82b7faa12b56dbe47fbea67e1a5b9e447027ba40) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8096868`](https://github.com/inspect-js/is-core-module/commit/8096868c024a161ccd4d44110b136763e92eace8) +- [Dev Deps] update `eslint` [`6726824`](https://github.com/inspect-js/is-core-module/commit/67268249b88230018c510f6532a8046d7326346f) +- [New] add `diagnostics_channel` to node `^14.17` [`86c6563`](https://github.com/inspect-js/is-core-module/commit/86c65634201b8ff9b3e48a9a782594579c7f5c3c) +- [meta] fix prepublish script [`697a01e`](https://github.com/inspect-js/is-core-module/commit/697a01e3c9c0be074066520954f30fb28532ec57) + +## [v2.3.0](https://github.com/inspect-js/is-core-module/compare/v2.2.0...v2.3.0) - 2021-04-24 + +### Commits + +- [meta] do not publish github action workflow files [`060d4bb`](https://github.com/inspect-js/is-core-module/commit/060d4bb971a29451c19ff336eb56bee27f9fa95a) +- [New] add support for `node:` prefix, in node 16+ [`7341223`](https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`016269a`](https://github.com/inspect-js/is-core-module/commit/016269abae9f6657a5254adfbb813f09a05067f9) +- [patch] remove unneeded `.0` in version ranges [`cb466a6`](https://github.com/inspect-js/is-core-module/commit/cb466a6d89e52b8389e5c12715efcd550c41cea3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`c9f9c39`](https://github.com/inspect-js/is-core-module/commit/c9f9c396ace60ef81906f98059c064e6452473ed) +- [actions] update workflows [`3ee4a89`](https://github.com/inspect-js/is-core-module/commit/3ee4a89fd5a02fccd43882d905448ea6a98e9a3c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`dee4fed`](https://github.com/inspect-js/is-core-module/commit/dee4fed79690c1d43a22f7fa9426abebdc6d727f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`7d046ba`](https://github.com/inspect-js/is-core-module/commit/7d046ba07ae8c9292e43652694ca808d7b309de8) +- [meta] use `prepublishOnly` script for npm 7+ [`149e677`](https://github.com/inspect-js/is-core-module/commit/149e6771a5ede6d097e71785b467a9c4b4977cc7) +- [readme] remove travis badge [`903b51d`](https://github.com/inspect-js/is-core-module/commit/903b51d6b69b98abeabfbc3695c345b02646f19c) + +## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26 + +### Commits + +- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426) +- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b) +- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72) +- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3) + +## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04 + +### Commits + +- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4) +- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec) + +## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29 + +### Commits + +- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd) +- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b) +- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348) +- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496) +- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63) +- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a) +- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697) +- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9) +- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6) +- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655) +- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65) + +## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28 + +### Commits + +- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2) + +## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28 + +### Commits + +- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac) +- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027) + +## v1.0.0 - 2014-09-28 + +### Commits + +- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96) diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE new file mode 100644 index 0000000..2e50287 --- /dev/null +++ b/node_modules/is-core-module/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Dave Justice + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-core-module/README.md b/node_modules/is-core-module/README.md new file mode 100644 index 0000000..062d906 --- /dev/null +++ b/node_modules/is-core-module/README.md @@ -0,0 +1,40 @@ +# is-core-module [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. + +## Example + +```js +var isCore = require('is-core-module'); +var assert = require('assert'); +assert(isCore('fs')); +assert(!isCore('butts')); +``` + +## Tests +Clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-core-module +[2]: https://versionbadg.es/inspect-js/is-core-module.svg +[5]: https://david-dm.org/inspect-js/is-core-module.svg +[6]: https://david-dm.org/inspect-js/is-core-module +[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies +[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-core-module.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module +[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module +[actions-url]: https://github.com/inspect-js/is-core-module/actions diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json new file mode 100644 index 0000000..91890be --- /dev/null +++ b/node_modules/is-core-module/core.json @@ -0,0 +1,161 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "node:sea": [">= 20.12 && < 21", ">= 21.7"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "test/reporters": ">= 19.9 && < 20.2", + "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], + "test/mock_loader": ">= 22.3 && < 22.7", + "node:test/mock_loader": ">= 22.3 && < 22.7", + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], + "node:wasi": [">= 18.17 && < 19", ">= 20"], + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js new file mode 100644 index 0000000..423e20c --- /dev/null +++ b/node_modules/is-core-module/index.js @@ -0,0 +1,69 @@ +'use strict'; + +var hasOwn = require('hasown'); + +function specifierIncluded(current, specifier) { + var nodeParts = current.split('.'); + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } + if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; +} + +function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + var current = typeof nodeVersion === 'undefined' + ? process.versions && process.versions.node + : nodeVersion; + + if (typeof current !== 'string') { + throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); +} + +var data = require('./core.json'); + +module.exports = function isCore(x, nodeVersion) { + return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); +}; diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json new file mode 100644 index 0000000..3aba4a0 --- /dev/null +++ b/node_modules/is-core-module/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-core-module", + "version": "2.15.1", + "description": "Is this specifier a node.js core module?", + "main": "index.js", + "sideEffects": false, + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-core-module.git" + }, + "keywords": [ + "core", + "modules", + "module", + "npm", + "node", + "dependencies" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-core-module/issues" + }, + "homepage": "https://github.com/inspect-js/is-core-module", + "dependencies": { + "hasown": "^2.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "auto-changelog": "^2.4.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mock-property": "^1.1.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.1", + "tape": "^5.8.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js new file mode 100644 index 0000000..746e72a --- /dev/null +++ b/node_modules/is-core-module/test/index.js @@ -0,0 +1,154 @@ +'use strict'; + +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); +var mockProperty = require('mock-property'); + +var isCore = require('../'); +var data = require('../core.json'); + +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(isCore('fs')); + st.ok(isCore('net')); + st.ok(isCore('http')); + + st.ok(!isCore('seq')); + st.ok(!isCore('../')); + + st.ok(!isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(data); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + if (isCore(mod)) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else { + st['throws'](requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !data.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('repl._builtinLibs does not exist'); + } else { + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !data.module }, function (st) { + var Module = require('module'); + var libs = Module.builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + var excludeList = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } + if (semver.satisfies(process.version, '^20.12 || >= 21.7')) { + libs = libs.concat('node:sea'); + } + + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (excludeList.indexOf(mod) === -1) { + st.ok(data[mod], mod + ' is a core module'); + + if (Module.isBuiltin) { + st.ok(Module.isBuiltin(mod), 'module.isBuiltin(' + mod + ') is true'); + } + + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + + if (process.getBuiltinModule) { + st.equal( + process.getBuiltinModule(mod), + require(mod), + 'process.getBuiltinModule(' + mod + ') === require(' + mod + ')' + ); + } + + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + } + + st.end(); + }); + + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-data-descriptor/.editorconfig b/node_modules/is-data-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/node_modules/is-data-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/is-data-descriptor/.eslintrc b/node_modules/is-data-descriptor/.eslintrc new file mode 100644 index 0000000..a3e0df3 --- /dev/null +++ b/node_modules/is-data-descriptor/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb/eslint-config/node/0.4", + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "warn", + "max-nested-callbacks": "warn", + }, + }, + ], +} diff --git a/node_modules/is-data-descriptor/.github/FUNDING.yml b/node_modules/is-data-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..156c8d7 --- /dev/null +++ b/node_modules/is-data-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-data-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-data-descriptor/.nycrc b/node_modules/is-data-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-data-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-data-descriptor/CHANGELOG.md b/node_modules/is-data-descriptor/CHANGELOG.md new file mode 100644 index 0000000..3e1ca8d --- /dev/null +++ b/node_modules/is-data-descriptor/CHANGELOG.md @@ -0,0 +1,109 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.1.2](https://github.com/inspect-js/is-data-descriptor/compare/v2.1.1...v2.1.2) - 2023-10-25 + +### Commits + +- [Refactor] use `hasown` [`77ad812`](https://github.com/inspect-js/is-data-descriptor/commit/77ad8129c7543f6826e2cbcadc015cc815ef94b7) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`88f2cb7`](https://github.com/inspect-js/is-data-descriptor/commit/88f2cb744242131a98086967ea4a3c5d42c6fa77) + +## [v2.1.1](https://github.com/inspect-js/is-data-descriptor/compare/v2.1.0...v2.1.1) - 2023-04-27 + +### Commits + +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`72692d3`](https://github.com/inspect-js/is-data-descriptor/commit/72692d3c1184e4d1f11faecbc9446b21cf5610a1) +- [readme] remove empty section [`72ec85b`](https://github.com/inspect-js/is-data-descriptor/commit/72ec85b9c4d781d551f19e595cca91b5f933d90d) + +## [v2.1.0](https://github.com/inspect-js/is-data-descriptor/compare/v2.0.0...v2.1.0) - 2023-04-27 + +### Commits + +- [eslint] cleanup [`c18a236`](https://github.com/inspect-js/is-data-descriptor/commit/c18a23640c00f32fca39112381b5cabdaa6a9a55) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5758410`](https://github.com/inspect-js/is-data-descriptor/commit/5758410ec503add0727f2215633e5b1998c21293) +- [readme] clean up docs, URLs, package.json, etc [`28f61dd`](https://github.com/inspect-js/is-data-descriptor/commit/28f61dd676d8661ca7468e091ddf2e22bf4a8da2) +- [Docs] remove verb [`e20d28c`](https://github.com/inspect-js/is-data-descriptor/commit/e20d28cc86ce8a7cbc4beb0f306e5a4034b6d704) +- [Tests] convert from mocha to tape [`666c175`](https://github.com/inspect-js/is-data-descriptor/commit/666c1755f29668098dc07fbda0eb1d354a4da640) +- [New] increase support from node 6 down to node 0.4 [`aa43b69`](https://github.com/inspect-js/is-data-descriptor/commit/aa43b699b4a53b97e7af13f4d49eb7a21d253d99) +- [Tests] add coverage [`8f094f6`](https://github.com/inspect-js/is-data-descriptor/commit/8f094f6809514862f367c07bd879f2de42f4d9d0) +- [meta] switch from `files` field to npmignore; add `exports` [`2769e1d`](https://github.com/inspect-js/is-data-descriptor/commit/2769e1d408330b05331a40216e7a6bdce2322f69) +- [Deps] remove unused `kind-of` [`bc87bcd`](https://github.com/inspect-js/is-data-descriptor/commit/bc87bcd5f9abfa3ac8bcd2daf85ca9c380cb225d) + +## [v2.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v1.0.1...v2.0.0) - 2018-12-13 + +### Commits + +- refactor [`8dcc492`](https://github.com/inspect-js/is-data-descriptor/commit/8dcc492bfb8e6d5b7964c1c566cdfe27ffbd8b0a) + +## [v1.0.1](https://github.com/inspect-js/is-data-descriptor/compare/v1.0.0...v1.0.1) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`65fed07`](https://github.com/inspect-js/is-data-descriptor/commit/65fed07b2dde027da64f303c21a44a4375a2e2bd) +- [readme] clean up readme, remove verb [`10ad663`](https://github.com/inspect-js/is-data-descriptor/commit/10ad663093b0ed9c9c0c13c6db4ead4351b8670e) +- [meta] clean up package.json [`7f76a01`](https://github.com/inspect-js/is-data-descriptor/commit/7f76a015050fc87e9b394440c3b5283cf55b2c82) +- [meta] update `.gitignore` [`a2ca593`](https://github.com/inspect-js/is-data-descriptor/commit/a2ca593bb1173e73f23eb401e455249c71c2eda8) +- [Tests] switch to tape [`70540e5`](https://github.com/inspect-js/is-data-descriptor/commit/70540e5449ef3239051d4e40dce8a5a1978d1634) +- [Tests] migrate from travis to github actions [`eee138d`](https://github.com/inspect-js/is-data-descriptor/commit/eee138d84d57191310acf3e7fdc83f5951570188) +- [Fix] properly return false for an accessor descriptor [`2c213cd`](https://github.com/inspect-js/is-data-descriptor/commit/2c213cd67d558c169a02892dc52592ca1d5d8f40) +- [Performance] move data object to module level [`37688a1`](https://github.com/inspect-js/is-data-descriptor/commit/37688a1653f3a2a364f14bb396803413cb435963) +- [Fix] allow any non-primitive; arrays and functions are objects too [`197c77a`](https://github.com/inspect-js/is-data-descriptor/commit/197c77a39c53d12d7a091bcc029fcf7d75ce3a26) +- Only apps should have lockfiles [`20aa6e5`](https://github.com/inspect-js/is-data-descriptor/commit/20aa6e513aeb4bb84be63e278ce073c860deeade) +- [Robustness] switch to `hasown` [`aa48e2f`](https://github.com/inspect-js/is-data-descriptor/commit/aa48e2f61b3fb29e80cf655618d1573a21e8433e) +- [Fix] properly guard for-in loop [`014971e`](https://github.com/inspect-js/is-data-descriptor/commit/014971ea90715c2675511b89d05df00d4be10ecf) +- [Robustness] use a null object just in case [`ab05aad`](https://github.com/inspect-js/is-data-descriptor/commit/ab05aad03368d202505c4acde07ebc22f8da128d) + +## [v1.0.0](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.4...v1.0.0) - 2017-11-01 + +### Merged + +- Update kind-of to version 6.0 [`#1`](https://github.com/inspect-js/is-data-descriptor/pull/1) +- Pin mocha to version 3 to support Node 0.12 [`#2`](https://github.com/inspect-js/is-data-descriptor/pull/2) + +### Commits + +- run update [`63e5992`](https://github.com/inspect-js/is-data-descriptor/commit/63e5992c6b953d652952cecb93468897ae8e5e29) +- update verb, generate readme documentation [`42dcba2`](https://github.com/inspect-js/is-data-descriptor/commit/42dcba2627fe655daa21aec843ca8de849f26cd6) +- minor edits [`23164cb`](https://github.com/inspect-js/is-data-descriptor/commit/23164cbc3496f7b13ec470781f05636ef610eecb) + +## [v0.1.4](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Fixed + +- fixes https://github.com/jonschlinkert/is-descriptor/issues/2 [`#2`](https://github.com/jonschlinkert/is-descriptor/issues/2) + +### Commits + +- lint [`6d69a34`](https://github.com/inspect-js/is-data-descriptor/commit/6d69a34001d6191d7874cd28aebcdc5441f06f70) +- lint, update lazy-cache [`58bcd4e`](https://github.com/inspect-js/is-data-descriptor/commit/58bcd4ea72f000c83fb167024cf116d4c357440e) +- generate docs with verb [`e6317db`](https://github.com/inspect-js/is-data-descriptor/commit/e6317dbcb27a95281a60120bac83f5938dda4e2c) +- update docs [`fb2e768`](https://github.com/inspect-js/is-data-descriptor/commit/fb2e7689724ad948673734865999051aec2da552) +- generate docs [`bd0ea52`](https://github.com/inspect-js/is-data-descriptor/commit/bd0ea52c7a80223bedc90aadd43e466169907c2a) +- adds verb plugin [`7657b81`](https://github.com/inspect-js/is-data-descriptor/commit/7657b8188aa6fd003586bdb4e791e02dce21bc99) + +## [v0.1.3](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.2...v0.1.3) - 2015-10-04 + +### Commits + +- files prop [`b0b7700`](https://github.com/inspect-js/is-data-descriptor/commit/b0b77004c51fec564e68bf6ff89fd4a169915d5b) + +## [v0.1.2](https://github.com/inspect-js/is-data-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- lazy-cache [`49a868c`](https://github.com/inspect-js/is-data-descriptor/commit/49a868c410a1651367315763e24c796e0b5127ce) +- update readme [`936d3f4`](https://github.com/inspect-js/is-data-descriptor/commit/936d3f4327f782c9e0d0ef120c68a81bb987ce72) + +## v0.1.1 - 2015-08-31 + +### Commits + +- first commit [`a1915ae`](https://github.com/inspect-js/is-data-descriptor/commit/a1915ae8a9a4a633d18630102264d266b6e08f08) +- 0.1.1 readme [`8fd6ad0`](https://github.com/inspect-js/is-data-descriptor/commit/8fd6ad0e1b49fa4a22293bfdd807762863afbd5e) +- 0.1.1 docs [`5e54369`](https://github.com/inspect-js/is-data-descriptor/commit/5e543699944b7ee5fe091399dc4186bcace47e3e) +- 0.1.1 docs [`8ec34af`](https://github.com/inspect-js/is-data-descriptor/commit/8ec34af8e80d0f8e386c6bff57e2e4b18d4e0afb) +- lint [`d265658`](https://github.com/inspect-js/is-data-descriptor/commit/d265658d986a688bf217461ca9c24d9c5300bdc8) diff --git a/node_modules/is-data-descriptor/LICENSE b/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/is-data-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-data-descriptor/README.md b/node_modules/is-data-descriptor/README.md new file mode 100644 index 0000000..1ca46bd --- /dev/null +++ b/node_modules/is-data-descriptor/README.md @@ -0,0 +1,112 @@ +# is-data-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +## Install + +Install with [npm](https://npmjs.com/): + +```sh +$ npm install --save is-data-descriptor +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +var assert = require('assert'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +assert.equal(isDataDesc({ value: 'foo' }), true); +assert.equal(isDataDesc({ value: function () {} }), true); +assert.equal(isDataDesc({ value: true }), true); +``` + +`false` when not an object + +```js +assert.equal(isDataDesc('a'), false); +assert.equal(isDataDesc(null), false); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDataDesc({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDataDesc({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDataDesc({ value: 'foo', get() {} }), false); +assert.equal(isDataDesc({ get() {}, value: 'foo' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDataDesc({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDataDesc({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDataDesc({ value: 'foo', writable: 'foo' }), false); +``` + +## Valid properties + +The only valid data descriptor properties are the following: + +* `configurable` (required) +* `enumerable` (required) +* `value` (optional) +* `writable` (optional) + +To be a valid data descriptor, either `value` or `writable` must be defined. + +**Invalid properties** + +A descriptor may have additional _invalid_ properties (an error will **not** be thrown). + +```js +var foo = {}; + +Object.defineProperty(foo, 'bar', { + enumerable: true, + whatever: 'blah', // invalid, but doesn't cause an error + get() { + return 'baz'; + } +}); + +assert.equal(foo.bar, 'baz'); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://npmjs.com/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-descriptor](https://npmjs.com/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://npmjs.com/is-descriptor) + +[package-url]: https://npmjs.org/package/is-data-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-data-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-data-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-data-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-data-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-data-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-data-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-data-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-data-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-data-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-data-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-data-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-data-descriptor +[actions-url]: https://github.com/inspect-js/is-data-descriptor/actions diff --git a/node_modules/is-data-descriptor/index.js b/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000..6d801de --- /dev/null +++ b/node_modules/is-data-descriptor/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var hasOwn = require('hasown'); + +// data descriptor properties +var data = { + __proto__: null, + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean', +}; + +module.exports = function isDataDescriptor(obj, prop) { + if (!obj || typeof obj !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if ( + (!('value' in obj) && !('writable' in obj)) + || 'get' in obj + || 'set' in obj + ) { + return false; + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if ( + key !== 'value' + && hasOwn(obj, key) + && hasOwn(data, key) + && typeof obj[key] !== data[key] + && typeof obj[key] !== 'undefined' + ) { + return false; + } + } + return true; +}; diff --git a/node_modules/is-data-descriptor/package.json b/node_modules/is-data-descriptor/package.json new file mode 100644 index 0000000..dc7dd93 --- /dev/null +++ b/node_modules/is-data-descriptor/package.json @@ -0,0 +1,87 @@ +{ + "name": "is-data-descriptor", + "version": "1.0.1", + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "prelint": "evalmd README.md", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-data-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-data-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-data-descriptor", + "contributors": [ + "Jordan Harband (https://github.com/ljharb)", + "Jon Schlinkert (https://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "dependencies": { + "hasown": "^2.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-data-descriptor/test/index.js b/node_modules/is-data-descriptor/test/index.js new file mode 100644 index 0000000..0859518 --- /dev/null +++ b/node_modules/is-data-descriptor/test/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('value type', function (st) { + st.notOk(isDescriptor('a'), 'string is not a descriptor'); + st.notOk(isDescriptor(null), 'null is not a descriptor'); + + st.end(); + }); + + t.test('should not be false when the object has unknown properties:', function (st) { + st.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + st.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + st.end(); + }); + + t.test('should be false when the object has accessor properties', function (st) { + st.notOk(isDescriptor({ value: 'foo', get: noop })); + st.notOk(isDescriptor({ set: noop, value: noop })); + + st.end(); + }); + + t.test('should be true when the object has valid data-descriptor properties', function (st) { + st.ok(isDescriptor({ value: 'foo' })); + st.ok(isDescriptor({ value: noop })); + + st.end(); + }); + + t.test('should be false when valid properties are invalid types', function (st) { + st.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + st.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + st.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + st.end(); + }); + + t.test('should be true when a value is a valid data descriptor', function (st) { + st.ok(isDescriptor({ value: 'foo' })); + st.ok(isDescriptor({ writable: true })); + + st.end(); + }); + + t.test('should be false when the value is not a valid descriptor', function (st) { + st.notOk(isDescriptor('foo')); + st.notOk(isDescriptor({})); + st.notOk(isDescriptor({ configurable: true })); + st.notOk(isDescriptor({ enumerable: true })); + st.notOk(isDescriptor({ + get: undefined, + set: undefined, + enumerable: true, + configurable: true, + })); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-data-view/.editorconfig b/node_modules/is-data-view/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/is-data-view/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-data-view/.eslintrc b/node_modules/is-data-view/.eslintrc new file mode 100644 index 0000000..73e9ac8 --- /dev/null +++ b/node_modules/is-data-view/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "DataView": false + }, + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/is-data-view/.github/FUNDING.yml b/node_modules/is-data-view/.github/FUNDING.yml new file mode 100644 index 0000000..7dd24b9 --- /dev/null +++ b/node_modules/is-data-view/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-typed-array +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-data-view/.nycrc b/node_modules/is-data-view/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-data-view/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-data-view/CHANGELOG.md b/node_modules/is-data-view/CHANGELOG.md new file mode 100644 index 0000000..56553d9 --- /dev/null +++ b/node_modules/is-data-view/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/inspect-js/is-data-view/compare/v1.0.0...v1.0.1) - 2024-02-02 + +### Commits + +- [patch] add types [`c2728ef`](https://github.com/inspect-js/is-data-view/commit/c2728ef20064bba2588eed503a0c2e36985b638a) +- [Dev Deps] update `aud`, `available-typed-arrays`, `has-tostringtag`, `npmignore`, `object-inspect`, `tape` [`e7f9ebc`](https://github.com/inspect-js/is-data-view/commit/e7f9ebccf9aacdc112dd4f665271c96417ddfa64) +- [Deps] update `is-typed-array` [`2ca9333`](https://github.com/inspect-js/is-data-view/commit/2ca9333516afac321431ddae02d6791d50e8d5c2) + +## v1.0.0 - 2024-01-31 + +### Commits + +- Initial implementation, tests, readme [`6f7e424`](https://github.com/inspect-js/is-data-view/commit/6f7e4244ae9d766309b8f050c0b786e9c0692825) +- Initial commit [`4b7ea57`](https://github.com/inspect-js/is-data-view/commit/4b7ea57d6942dd268bcda990a96b8cd663b19eb8) +- npm init [`25130e2`](https://github.com/inspect-js/is-data-view/commit/25130e2dbecc91d398cf74c39878aa89f5e604ab) +- Only apps should have lockfiles [`18cde47`](https://github.com/inspect-js/is-data-view/commit/18cde474201a292ebdaa704d232127c814cb1d0e) diff --git a/node_modules/is-data-view/LICENSE b/node_modules/is-data-view/LICENSE new file mode 100644 index 0000000..870f861 --- /dev/null +++ b/node_modules/is-data-view/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-data-view/README.md b/node_modules/is-data-view/README.md new file mode 100644 index 0000000..23d9f73 --- /dev/null +++ b/node_modules/is-data-view/README.md @@ -0,0 +1,69 @@ +# is-data-view [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var isDataView = require('is-data-view'); +var assert = require('assert'); + +assert.equal(false, isDataView(undefined)); +assert.equal(false, isDataView(null)); +assert.equal(false, isDataView(false)); +assert.equal(false, isDataView(true)); +assert.equal(false, isDataView([])); +assert.equal(false, isDataView({})); +assert.equal(false, isDataView(/a/g)); +assert.equal(false, isDataView(new RegExp('a', 'g'))); +assert.equal(false, isDataView(new Date())); +assert.equal(false, isDataView(42)); +assert.equal(false, isDataView(NaN)); +assert.equal(false, isDataView(Infinity)); +assert.equal(false, isDataView(new Number(42))); +assert.equal(false, isDataView('foo')); +assert.equal(false, isDataView(Object('foo'))); +assert.equal(false, isDataView(function () {})); +assert.equal(false, isDataView(function* () {})); +assert.equal(false, isDataView(x => x * x)); +assert.equal(false, isDataView([])); +assert.equal(false, isDataView(new Int8Array())); +assert.equal(false, isDataView(new Uint8Array())); +assert.equal(false, isDataView(new Uint8ClampedArray())); +assert.equal(false, isDataView(new Int16Array())); +assert.equal(false, isDataView(new Uint16Array())); +assert.equal(false, isDataView(new Int32Array())); +assert.equal(false, isDataView(new Uint32Array())); +assert.equal(false, isDataView(new Float32Array())); +assert.equal(false, isDataView(new Float64Array())); +assert.equal(false, isDataView(new BigInt64Array())); +assert.equal(false, isDataView(new BigUint64Array())); + +assert.ok(isDataView(new DataView(new ArrayBuffer(0)))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-data-view +[npm-version-svg]: https://versionbadg.es/inspect-js/is-data-view.svg +[deps-svg]: https://david-dm.org/inspect-js/is-data-view.svg +[deps-url]: https://david-dm.org/inspect-js/is-data-view +[dev-deps-svg]: https://david-dm.org/inspect-js/is-data-view/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-data-view#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-data-view.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-data-view.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-data-view.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-data-view +[codecov-image]: https://codecov.io/gh/inspect-js/is-data-view/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-data-view/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-data-view +[actions-url]: https://github.com/inspect-js/is-data-view/actions diff --git a/node_modules/is-data-view/index.d.ts b/node_modules/is-data-view/index.d.ts new file mode 100644 index 0000000..1031181 --- /dev/null +++ b/node_modules/is-data-view/index.d.ts @@ -0,0 +1,3 @@ +declare function isDataView(value: unknown): value is DataView; + +export = isDataView; \ No newline at end of file diff --git a/node_modules/is-data-view/index.js b/node_modules/is-data-view/index.js new file mode 100644 index 0000000..5da0a0a --- /dev/null +++ b/node_modules/is-data-view/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%'); +var $DataView = GetIntrinsic('%DataView%', true); + +var callBound = require('call-bind/callBound'); + +// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter +var $dataViewBuffer = callBound('DataView.prototype.buffer', true); + +var isTypedArray = require('is-typed-array'); + +/** @type {import('.')} */ +module.exports = function isDataView(x) { + if (!x || typeof x !== 'object' || !$DataView || isTypedArray(x)) { + return false; + } + + if ($dataViewBuffer) { + try { + $dataViewBuffer(x); + return true; + } catch (e) { + return false; + } + } + + if ( + ('getInt8' in x) + && typeof x.getInt8 === 'function' + && x.getInt8 === new $DataView(new $ArrayBuffer(1)).getInt8 + ) { + return true; + } + + return false; +}; diff --git a/node_modules/is-data-view/package.json b/node_modules/is-data-view/package.json new file mode 100644 index 0000000..5f0788c --- /dev/null +++ b/node_modules/is-data-view/package.json @@ -0,0 +1,97 @@ +{ + "name": "is-data-view", + "version": "1.0.1", + "description": "Is this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "./index.d.ts", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-data-view.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "dataview", + "data", + "view", + "typedarray", + "typedarrays" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-data-view/issues" + }, + "homepage": "https://github.com/inspect-js/is-data-view#readme", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/make-arrow-function": "^1.2.2", + "@types/make-generator-function": "^2.0.3", + "@types/node": "^20.11.14", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.6", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.2", + "in-publish": "^2.0.1", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "testling": { + "files": "test/index.js" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-data-view/test/index.js b/node_modules/is-data-view/test/index.js new file mode 100644 index 0000000..4c14a90 --- /dev/null +++ b/node_modules/is-data-view/test/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var test = require('tape'); +var isDataView = require('../'); + +var hasToStringTag = require('has-tostringtag/shams')(); +var generators = require('make-generator-function')(); +var arrowFns = require('make-arrow-function').list(); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var inspect = require('object-inspect'); +var availableTypedArrays = require('available-typed-arrays')(); + +test('not DataViews', function (t) { + forEach([].concat( + // @ts-expect-error TS sucks at [].concat + v.primitives, + v.objects, + function () {}, + generators, + arrowFns, + [] + ), /** @type {(nonDV: unknown) => void} */ function (nonDV) { + t.equal( + isDataView(nonDV), + false, + inspect(nonDV) + ' is not a DataView' + ); + }); + + forEach(availableTypedArrays, function (typedArray) { + var TA = global[typedArray]; + var ta = new TA(8); + t.equal(isDataView(ta), false, inspect(ta) + ' is not a DataView'); + }); + + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + forEach(availableTypedArrays, function (typedArray) { + // @ts-expect-error + var fakeTypedArray = []; + // @ts-expect-error + fakeTypedArray[Symbol.toStringTag] = typedArray; + // @ts-expect-error + t.notOk(isDataView(fakeTypedArray), 'faked ' + typedArray + ' is not typed array'); + }); + + t.end(); +}); + +test('Data Views', { skip: typeof DataView !== 'function' }, function (t) { + var ab = new ArrayBuffer(1); + var dv = new DataView(ab); + + t.equal(isDataView(dv), true, inspect(dv) + ' is a DataView'); + + t.end(); +}); diff --git a/node_modules/is-data-view/tsconfig.json b/node_modules/is-data-view/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/is-data-view/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/is-date-object/.editorconfig b/node_modules/is-date-object/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/is-date-object/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-date-object/.eslintignore b/node_modules/is-date-object/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/is-date-object/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-date-object/.eslintrc b/node_modules/is-date-object/.eslintrc new file mode 100644 index 0000000..1228f97 --- /dev/null +++ b/node_modules/is-date-object/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 12] + } +} diff --git a/node_modules/is-date-object/.github/FUNDING.yml b/node_modules/is-date-object/.github/FUNDING.yml new file mode 100644 index 0000000..9cfa9fd --- /dev/null +++ b/node_modules/is-date-object/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-date-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-date-object/.nycrc b/node_modules/is-date-object/.nycrc new file mode 100644 index 0000000..a69aa2d --- /dev/null +++ b/node_modules/is-date-object/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-date-object/CHANGELOG.md b/node_modules/is-date-object/CHANGELOG.md new file mode 100644 index 0000000..49f624a --- /dev/null +++ b/node_modules/is-date-object/CHANGELOG.md @@ -0,0 +1,114 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.5](https://github.com/inspect-js/is-date-object/compare/v1.0.4...v1.0.5) - 2021-08-05 + +### Commits + +- [meta] remove `.jscs.json` [`31c731c`](https://github.com/inspect-js/is-date-object/commit/31c731c5efc5b1b86e6426d904373dc6225b929f) +- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`17a6df4`](https://github.com/inspect-js/is-date-object/commit/17a6df4a3ab9bcb1395a638ced14f571f9549427) +- [Dev Deps] update `eslint`, `auto-changelog`, `tape` [`79db3af`](https://github.com/inspect-js/is-date-object/commit/79db3af1a745042a0a11e03c7dd7db910b5e0d01) + +## [v1.0.4](https://github.com/inspect-js/is-date-object/compare/v1.0.3...v1.0.4) - 2021-05-07 + +### Commits + +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`8943a4a`](https://github.com/inspect-js/is-date-object/commit/8943a4a5035b3f2c8cee9a5edabb55579c16983d) +- [readme] make all URLs https [`1d4d6cd`](https://github.com/inspect-js/is-date-object/commit/1d4d6cd37365c3a36f98e3f82cfe6262227437db) +- [Dev Deps] update `eslint` [`a7abeaa`](https://github.com/inspect-js/is-date-object/commit/a7abeaa2409d3a34fccebcb5b362e0b90d0a8883) + +## [v1.0.3](https://github.com/inspect-js/is-date-object/compare/v1.0.2...v1.0.3) - 2021-05-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`023504f`](https://github.com/inspect-js/is-date-object/commit/023504f4d48fc8788ff52ee525a1d9ec74fa7df5) +- [readme] add actions and codecov badges [`e63305f`](https://github.com/inspect-js/is-date-object/commit/e63305f2fb9ff3eb0dab7e0716585507a4f95a75) +- [meta] do not publish github action workflow files [`017d906`](https://github.com/inspect-js/is-date-object/commit/017d90679b6b1c16b398c0157904f91f56160219) +- [Tests] run `nyc` on all tests [`0376b6f`](https://github.com/inspect-js/is-date-object/commit/0376b6fb7a0ffcc42107c3c579ba0b3ab635b9e4) +- [readme] fix repo URLs; remove defunct badges [`1c148c6`](https://github.com/inspect-js/is-date-object/commit/1c148c6cb6eb0892b3186e814df3367dabb9732d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`c7a3f54`](https://github.com/inspect-js/is-date-object/commit/c7a3f54a207a6056ffafaa58178889ea1b1b77f7) +- [actions] add "Allow Edits" workflow [`e79b5b2`](https://github.com/inspect-js/is-date-object/commit/e79b5b25c173c3201e8b42a614d5f12c48b74a86) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`da28980`](https://github.com/inspect-js/is-date-object/commit/da28980c5fe86528585b2a420319ca8fc35f763a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`5cabae9`](https://github.com/inspect-js/is-date-object/commit/5cabae9f00bf458a470bde68b734540b8ab78c3b) +- [readme] add actions and codecov badges [`33dfb88`](https://github.com/inspect-js/is-date-object/commit/33dfb881b7abf668cd3bf956e2947a1ece552f25) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`745eb04`](https://github.com/inspect-js/is-date-object/commit/745eb0462ef3838df65f41f4a95453cc4f0aa06e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`466c62b`](https://github.com/inspect-js/is-date-object/commit/466c62b45af5a5a83963f6ef8617da887b0ab272) +- [actions] use checkout v2; remove unneeded env [`ff87a16`](https://github.com/inspect-js/is-date-object/commit/ff87a161e36d76d081d70933bf801a357c3b25fe) +- [Dev Deps] update `auto-changelog`, `tape` [`93188f5`](https://github.com/inspect-js/is-date-object/commit/93188f58e4b2c2b5e978a61a45380101d01f9838) +- [meta] use `prepublishOnly` script for npm 7+ [`1d0e3ea`](https://github.com/inspect-js/is-date-object/commit/1d0e3ea672971f02bb48c88b49079789ab41f574) +- [actions] update workflows [`4d1a235`](https://github.com/inspect-js/is-date-object/commit/4d1a2358de35a9fbe23a1dee10735748ed276301) +- [Dev Deps] update `auto-changelog`; add `aud` [`67be59a`](https://github.com/inspect-js/is-date-object/commit/67be59aa3c0ba44b982aaefb7e42adfb14eb279b) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`a6661c2`](https://github.com/inspect-js/is-date-object/commit/a6661c26af701a7782f6e06ad1b34587ce2b09bc) +- [Tests] only audit prod deps [`dd4a47f`](https://github.com/inspect-js/is-date-object/commit/dd4a47f8bcf82c3090826d890a7766f50d6f7af9) + +## [v1.0.2](https://github.com/inspect-js/is-date-object/compare/v1.0.1...v1.0.2) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`8a378b8`](https://github.com/inspect-js/is-date-object/commit/8a378b8fd6a4202fffc9ec193aca02efe937bc35) +- [Tests] on all node minors; use `nvm install-latest-npm`; fix scripts; improve matrix [`6e97a21`](https://github.com/inspect-js/is-date-object/commit/6e97a21276cf448ce424fb9ea13edd4587f289f1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `jscs`, `nsp`, `semver`, `tape` [`8472b90`](https://github.com/inspect-js/is-date-object/commit/8472b90f82e5153c22e7a8a7726a5cc6110e93d7) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`ae73e38`](https://github.com/inspect-js/is-date-object/commit/ae73e3890df7da0bc4449088e30340cb4df3294d) +- [meta] add `auto-changelog` [`82f8f47`](https://github.com/inspect-js/is-date-object/commit/82f8f473a6ee45e2b66810cb743e0122c18381c5) +- [meta] remove unused Makefile and associated utilities [`788a2cd`](https://github.com/inspect-js/is-date-object/commit/788a2cdfd0bc8f1903967219897f6d00c4c6a26b) +- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` [`b9caf7c`](https://github.com/inspect-js/is-date-object/commit/b9caf7c814e5e2549454cb444f8b739f9ce1a388) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v8.15`, `v6.17`; use `nvm install-latest-npm` [`cda0abc`](https://github.com/inspect-js/is-date-object/commit/cda0abc04a21c9b5ec72eabd010155c988032056) +- [Tests] up to `node` `v12.10`, `v10.16`, `v8.16` [`49bc482`](https://github.com/inspect-js/is-date-object/commit/49bc482fd9f71436b663c07144083a8423697299) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `tape`; add `safe-publish-latest` [`f77fec4`](https://github.com/inspect-js/is-date-object/commit/f77fec48057e156b2276b4c14cf303306116b9f6) +- [actions] add automatic rebasing / merge commit blocking [`68605fc`](https://github.com/inspect-js/is-date-object/commit/68605fcb6bc0341ff0aae14a94bf5d18e1bc73be) +- [meta] create FUNDING.yml [`4f82d88`](https://github.com/inspect-js/is-date-object/commit/4f82d88e1e6ac1b97f0ce96aa0aa057ad758a581) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`3cbf28a`](https://github.com/inspect-js/is-date-object/commit/3cbf28a185ced940cfce8a09fa8479cc83575876) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config@`, `is`, `semver`, `tape` [`abf9fb0`](https://github.com/inspect-js/is-date-object/commit/abf9fb0d55ef0697e64e888d74f2e5fe53d7cdcb) +- [Tests] switch from `nsp` to `npm audit` [`6543c7d`](https://github.com/inspect-js/is-date-object/commit/6543c7d559d1fb79215b46c8b79e0e3e2a83f5de) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`ba5d2d7`](https://github.com/inspect-js/is-date-object/commit/ba5d2d7fc0975d7c03b8f2b7f43a09af93e365ba) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`c1e3525`](https://github.com/inspect-js/is-date-object/commit/c1e3525afa76a696f7cf1b58aab7f55d220b2c20) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`14e4824`](https://github.com/inspect-js/is-date-object/commit/14e4824188c85207ed3b86627b09e9f64b135db7) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`68ead64`](https://github.com/inspect-js/is-date-object/commit/68ead64a07e0de282ea3cd38e12cc8b0e0f6d3cd) +- [Dev Deps] update `eslint`, semver`, `tape`, `semver` [`f55453f`](https://github.com/inspect-js/is-date-object/commit/f55453f200903277465d7e9307a9c49120a4f419) +- Only apps should have lockfiles [`6c848eb`](https://github.com/inspect-js/is-date-object/commit/6c848eba982cc58053d4cca08c01f12a433f3695) +- [Tests] remove `jscs` [`3fd3a62`](https://github.com/inspect-js/is-date-object/commit/3fd3a62121607ad074b7fc977f3fc6575b66f755) +- [Dev Deps] update `eslint`, `tape` [`77d3130`](https://github.com/inspect-js/is-date-object/commit/77d3130a0039e5dae24c17de790dd510c265edc6) +- [meta] add `funding` field [`9ef6d58`](https://github.com/inspect-js/is-date-object/commit/9ef6d5888bf829a5812b3b091dc99839d48c355e) + +## [v1.0.1](https://github.com/inspect-js/is-date-object/compare/v1.0.0...v1.0.1) - 2015-09-27 + +### Commits + +- Update `tape`, `semver`, `eslint`; use my personal shared `eslint` config. [`731aa13`](https://github.com/inspect-js/is-date-object/commit/731aa134b0b8dc84e302d0b2264a415cb456ccab) +- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `nsp`, `eslint`, `semver` [`53e43a6`](https://github.com/inspect-js/is-date-object/commit/53e43a627dd01757cf3d469599f3dffd9d72b150) +- Update `eslint` [`d2fc304`](https://github.com/inspect-js/is-date-object/commit/d2fc3046f087b0026448ffde0cf46b1f741cbd4e) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`c9568df`](https://github.com/inspect-js/is-date-object/commit/c9568df228fa698dc6fcc9553b5d612e7ee427aa) +- Test on latest `node` and `io.js` versions. [`a21d537`](https://github.com/inspect-js/is-date-object/commit/a21d537562166ebd18bde3a262fd157dd774ae17) +- Update `nsp`, `eslint`, `semver` [`9e1d908`](https://github.com/inspect-js/is-date-object/commit/9e1d9087c0c79c34fcb2abfc701cdfa1efcb327c) +- Update `covert`, `jscs`, `eslint`, `semver` [`f198f6b`](https://github.com/inspect-js/is-date-object/commit/f198f6b997912da10a3d821a089e1581edc730a0) +- [Dev Deps] update `tape`, `jscs`, `eslint` [`ab9bdbb`](https://github.com/inspect-js/is-date-object/commit/ab9bdbbc189cef033346508db47cd1feb04a69d3) +- If `@@toStringTag` is not present, use the old-school `Object#toString` test. [`c03afce`](https://github.com/inspect-js/is-date-object/commit/c03afce001368b29eb929900075749b113a252c8) +- [Dev Deps] update `jscs`, `nsp`, `tape`, `eslint`, `@ljharb/eslint-config` [`9d94ccb`](https://github.com/inspect-js/is-date-object/commit/9d94ccbab4160d2fa649123e37951d86b69a8b15) +- [Dev Deps] update `is`, `eslint`, `@ljharb/eslint-config`, `semver` [`35cbff7`](https://github.com/inspect-js/is-date-object/commit/35cbff7f7c8216fbb79c799f74b2336eaf0d726a) +- Test up to `io.js` `v2.3` [`be5d11e`](https://github.com/inspect-js/is-date-object/commit/be5d11e7ebd9473d7ae554179b3769082485f6f4) +- [Tests] on `io.js` `v3.3`, up to `node` `v4.1` [`20221a3`](https://github.com/inspect-js/is-date-object/commit/20221a34858d2b21e23bdc2c08df23f0bc08d11e) +- [Tests] up to `io.js` `v3.2 ` [`7009b4a`](https://github.com/inspect-js/is-date-object/commit/7009b4a9999e14eacbdf6068afd82f478473f007) +- Test on `io.js` `v2.1` [`68b29b1`](https://github.com/inspect-js/is-date-object/commit/68b29b19a07e6589a7ca37ab764be28f144ac88e) +- Remove `editorconfig-tools` [`8d3972c`](https://github.com/inspect-js/is-date-object/commit/8d3972c1795fdcfd337680e11ab610e4885fb079) +- [Dev Deps] update `tape` [`204945d`](https://github.com/inspect-js/is-date-object/commit/204945d8658a3513ca6315ddf795e4034adb4545) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`7bff214`](https://github.com/inspect-js/is-date-object/commit/7bff214dcb2317b96219921476f990814afbb401) +- Test on `io.js` `v2.5` [`92f7bd6`](https://github.com/inspect-js/is-date-object/commit/92f7bd6747e3259b0ddc9c287876f46a9cd4c270) +- Test on `io.js` `v2.4` [`ebb34bf`](https://github.com/inspect-js/is-date-object/commit/ebb34bf1f58949768063f86ac012f1ca5d7cf6d9) +- Fix tests for faked @@toStringTag [`3b9c26c`](https://github.com/inspect-js/is-date-object/commit/3b9c26c15040af6a87f8d77ce6c85a7bef7a4304) +- Test on `io.js` `v3.0` [`5eedf4b`](https://github.com/inspect-js/is-date-object/commit/5eedf4bea76380a08813fd0977469c2480302a82) + +## v1.0.0 - 2015-01-28 + +### Commits + +- Dotfiles. [`5b6a929`](https://github.com/inspect-js/is-date-object/commit/5b6a9298c6f70882e78e66d64c9c019f85790f52) +- `make release` [`e8d40ce`](https://github.com/inspect-js/is-date-object/commit/e8d40ceca85acd0aa4b2753faa6e41c0c54cf6c3) +- package.json [`a107259`](https://github.com/inspect-js/is-date-object/commit/a1072591ea510a2998298be6cef827b123f4643f) +- Read me [`eb92695`](https://github.com/inspect-js/is-date-object/commit/eb92695664bdee8fc49891cd73aa2f41075f53cb) +- Initial commit [`4fc7755`](https://github.com/inspect-js/is-date-object/commit/4fc7755ff12f1d7a55cf841d486bf6b2350fe5a0) +- Tests. [`b6f432f`](https://github.com/inspect-js/is-date-object/commit/b6f432fb6801c5ff8d89cfec7601d59478e23dd1) +- Implementation. [`dd0fd96`](https://github.com/inspect-js/is-date-object/commit/dd0fd96c4016a66cec7cd59db0fde37c2ef3cdb5) diff --git a/node_modules/is-date-object/LICENSE b/node_modules/is-date-object/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/is-date-object/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-date-object/README.md b/node_modules/is-date-object/README.md new file mode 100644 index 0000000..1c084ad --- /dev/null +++ b/node_modules/is-date-object/README.md @@ -0,0 +1,52 @@ +# is-date-object [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isDate = require('is-date-object'); +var assert = require('assert'); + +assert.notOk(isDate(undefined)); +assert.notOk(isDate(null)); +assert.notOk(isDate(false)); +assert.notOk(isDate(true)); +assert.notOk(isDate(42)); +assert.notOk(isDate('foo')); +assert.notOk(isDate(function () {})); +assert.notOk(isDate([])); +assert.notOk(isDate({})); +assert.notOk(isDate(/a/g)); +assert.notOk(isDate(new RegExp('a', 'g'))); + +assert.ok(isDate(new Date())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-date-object +[2]: https://versionbadg.es/inspect-js/is-date-object.svg +[5]: https://david-dm.org/inspect-js/is-date-object.svg +[6]: https://david-dm.org/inspect-js/is-date-object +[7]: https://david-dm.org/inspect-js/is-date-object/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-date-object#info=devDependencies +[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-date-object.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-date-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-date-object +[codecov-image]: https://codecov.io/gh/inspect-js/is-date-object/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-date-object/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-date-object +[actions-url]: https://github.com/inspect-js/is-date-object/actions diff --git a/node_modules/is-date-object/index.js b/node_modules/is-date-object/index.js new file mode 100644 index 0000000..11628f3 --- /dev/null +++ b/node_modules/is-date-object/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; diff --git a/node_modules/is-date-object/package.json b/node_modules/is-date-object/package.json new file mode 100644 index 0000000..7b32ed8 --- /dev/null +++ b/node_modules/is-date-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-date-object", + "version": "1.0.5", + "author": "Jordan Harband", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only && npm run test:corejs", + "tests-only": "nyc tape 'test/**/*.js'", + "test:corejs": "nyc tape test-corejs.js", + "posttest": "aud --production", + "lint": "eslint .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-date-object.git" + }, + "keywords": [ + "Date", + "ES6", + "toStringTag", + "@@toStringTag", + "Date object" + ], + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.12.0", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-date-object/test/index.js b/node_modules/is-date-object/test/index.js new file mode 100644 index 0000000..5279dad --- /dev/null +++ b/node_modules/is-date-object/test/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var test = require('tape'); +var isDate = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Dates', function (t) { + t.notOk(isDate(), 'undefined is not Date'); + t.notOk(isDate(null), 'null is not Date'); + t.notOk(isDate(false), 'false is not Date'); + t.notOk(isDate(true), 'true is not Date'); + t.notOk(isDate(42), 'number is not Date'); + t.notOk(isDate('foo'), 'string is not Date'); + t.notOk(isDate([]), 'array is not Date'); + t.notOk(isDate({}), 'object is not Date'); + t.notOk(isDate(function () {}), 'function is not Date'); + t.notOk(isDate(/a/g), 'regex literal is not Date'); + t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var realDate = new Date(); + var fakeDate = { + toString: function () { return String(realDate); }, + valueOf: function () { return realDate.getTime(); } + }; + fakeDate[Symbol.toStringTag] = 'Date'; + t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date'); + t.end(); +}); + +test('Dates', function (t) { + t.ok(isDate(new Date()), 'new Date() is Date'); + t.end(); +}); diff --git a/node_modules/is-descriptor/.editorconfig b/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/is-descriptor/.eslintrc b/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000..24e5090 --- /dev/null +++ b/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/is-descriptor/.gitattributes b/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000..660957e --- /dev/null +++ b/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..37535da --- /dev/null +++ b/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-descriptor/.nycrc b/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-descriptor/CHANGELOG.md b/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000..0564264 --- /dev/null +++ b/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,121 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v1.0.0) - 2017-02-25 + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/is-descriptor/LICENSE b/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-descriptor/README.md b/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..fd9ddcf --- /dev/null +++ b/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/is-descriptor/index.js b/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9dd24d --- /dev/null +++ b/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/node_modules/is-descriptor/package.json b/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..2c35d2b --- /dev/null +++ b/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "1.0.3", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-descriptor/test/index.js b/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000..0b74a35 --- /dev/null +++ b/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/is-extendable/LICENSE b/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-extendable/README.md b/node_modules/is-extendable/README.md new file mode 100644 index 0000000..e4cfaeb --- /dev/null +++ b/node_modules/is-extendable/README.md @@ -0,0 +1,72 @@ +# is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable) + +> Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?" + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-extendable --save +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* `array` +* `regexp` +* `plain object` +* `function` +* `date` +* `error` + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is an `object`, `function` + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Related projects + +* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ \ No newline at end of file diff --git a/node_modules/is-extendable/index.js b/node_modules/is-extendable/index.js new file mode 100644 index 0000000..4ee71a4 --- /dev/null +++ b/node_modules/is-extendable/index.js @@ -0,0 +1,13 @@ +/*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function isExtendable(val) { + return typeof val !== 'undefined' && val !== null + && (typeof val === 'object' || typeof val === 'function'); +}; diff --git a/node_modules/is-extendable/package.json b/node_modules/is-extendable/package.json new file mode 100644 index 0000000..5dd006e --- /dev/null +++ b/node_modules/is-extendable/package.json @@ -0,0 +1,51 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verbiage": { + "related": { + "list": [ + "isobject", + "is-plain-object", + "kind-of", + "is-extendable", + "is-equal-shallow", + "extend-shallow", + "assign-deep" + ] + } + } +} diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md new file mode 100644 index 0000000..0416af5 --- /dev/null +++ b/node_modules/is-extglob/README.md @@ -0,0 +1,107 @@ +# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extglob +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +Escaped extglobs: + +```js +isExtglob('\\?(abc)'); +isExtglob('\\@(abc)'); +isExtglob('\\!(abc)'); +isExtglob('\\*(abc)'); +isExtglob('\\+(abc)'); +``` + +Everything else... + +```js +isExtglob('foo.js'); +isExtglob('!foo.js'); +isExtglob('*.js'); +isExtglob('**/abc.js'); +isExtglob('abc/*.js'); +isExtglob('abc/(aaa|bbb).js'); +isExtglob('abc/[a-z].js'); +isExtglob('abc/{a,b}.js'); +isExtglob('abc/?.js'); +isExtglob('abc.js'); +isExtglob('abc/def/ghi.js'); +``` + +## History + +**v2.0** + +Adds support for escaping. Escaped exglobs no longer return true. + +## About + +### Related projects + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js new file mode 100644 index 0000000..c1d986f --- /dev/null +++ b/node_modules/is-extglob/index.js @@ -0,0 +1,20 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json new file mode 100644 index 0000000..7a90836 --- /dev/null +++ b/node_modules/is-extglob/package.json @@ -0,0 +1,69 @@ +{ + "name": "is-extglob", + "description": "Returns true if a string has an extglob.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/is-extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extglob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md new file mode 100644 index 0000000..740724b --- /dev/null +++ b/node_modules/is-glob/README.md @@ -0,0 +1,206 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +### Default behavior + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob('abc/?.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +### Option strict + +When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that +some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js', {strict: false}); +isGlob('*.js', {strict: false}); +isGlob('**/abc.js', {strict: false}); +isGlob('abc/*.js', {strict: false}); +isGlob('abc/(aaa|bbb).js', {strict: false}); +isGlob('abc/[a-z].js', {strict: false}); +isGlob('abc/{a,b}.js', {strict: false}); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js', {strict: false}); +isGlob('abc/!(a).js', {strict: false}); +isGlob('abc/+(a).js', {strict: false}); +isGlob('abc/*(a).js', {strict: false}); +isGlob('abc/?(a).js', {strict: false}); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('\\!foo.js', {strict: false}); +isGlob('\\*.js', {strict: false}); +isGlob('\\*\\*/abc.js', {strict: false}); +isGlob('abc/\\*.js', {strict: false}); +isGlob('abc/\\(aaa|bbb).js', {strict: false}); +isGlob('abc/\\[a-z].js', {strict: false}); +isGlob('abc/\\{a,b}.js', {strict: false}); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 47 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [doowb](https://github.com/doowb) | +| 1 | [phated](https://github.com/phated) | +| 1 | [danhper](https://github.com/danhper) | +| 1 | [paulmillr](https://github.com/paulmillr) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js new file mode 100644 index 0000000..620f563 --- /dev/null +++ b/node_modules/is-glob/index.js @@ -0,0 +1,150 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isExtglob = require('is-extglob'); +var chars = { '{': '}', '(': ')', '[': ']'}; +var strictCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === '*') { + return true; + } + + if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { + return true; + } + + if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { + if (closeSquareIndex < index) { + closeSquareIndex = str.indexOf(']', index); + } + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +module.exports = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var check = strictCheck; + + // optionally relax check + if (options && options.strict === false) { + check = relaxedCheck; + } + + return check(str); +}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json new file mode 100644 index 0000000..858af03 --- /dev/null +++ b/node_modules/is-glob/package.json @@ -0,0 +1,81 @@ +{ + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "4.0.3", + "homepage": "https://github.com/micromatch/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Daniel Perez (https://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/is-glob", + "bugs": { + "url": "https://github.com/micromatch/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha && node benchmark.js" + }, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + } +} diff --git a/node_modules/is-negative-zero/.editorconfig b/node_modules/is-negative-zero/.editorconfig new file mode 100644 index 0000000..aaac325 --- /dev/null +++ b/node_modules/is-negative-zero/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/node_modules/is-negative-zero/.eslintrc b/node_modules/is-negative-zero/.eslintrc new file mode 100644 index 0000000..f858c0a --- /dev/null +++ b/node_modules/is-negative-zero/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "no-magic-numbers": 0 + } +} diff --git a/node_modules/is-negative-zero/.github/FUNDING.yml b/node_modules/is-negative-zero/.github/FUNDING.yml new file mode 100644 index 0000000..e34502b --- /dev/null +++ b/node_modules/is-negative-zero/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: ljharb +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-negative-zero +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-negative-zero/.nycrc b/node_modules/is-negative-zero/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-negative-zero/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-negative-zero/CHANGELOG.md b/node_modules/is-negative-zero/CHANGELOG.md new file mode 100644 index 0000000..a3a2ded --- /dev/null +++ b/node_modules/is-negative-zero/CHANGELOG.md @@ -0,0 +1,147 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.3](https://github.com/inspect-js/is-negative-zero/compare/v2.0.2...v2.0.3) - 2024-02-19 + +### Commits + +- add types [`e28f0d5`](https://github.com/inspect-js/is-negative-zero/commit/e28f0d59cffc61bd3d41c10563105e8adb868e59) +- [meta] use `npmignore` to autogenerate an npmignore file [`f68ec13`](https://github.com/inspect-js/is-negative-zero/commit/f68ec13c1d04a2ef1e1c72506ae9c2ac0567bcdd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`70abff7`](https://github.com/inspect-js/is-negative-zero/commit/70abff788bb0156f300a09c2f5cc7d30d5618184) +- [actions] update rebase action to use reusable workflow [`6e1356e`](https://github.com/inspect-js/is-negative-zero/commit/6e1356e9fc5fee1bcae20b365c7d71b14ecf876d) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `tape` [`c00d4ab`](https://github.com/inspect-js/is-negative-zero/commit/c00d4ab5c381d22ac3e6d89180b3e012c479f13f) +- [meta] add `sideEffects` flag [`9c45539`](https://github.com/inspect-js/is-negative-zero/commit/9c455398988d2db940fe6644541d09d510b6661f) + +## [v2.0.2](https://github.com/inspect-js/is-negative-zero/compare/v2.0.1...v2.0.2) - 2021-12-10 + +### Commits + +- [actions] reuse common workflows [`ece923d`](https://github.com/inspect-js/is-negative-zero/commit/ece923d6b50820b7832150957774047da43d1743) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`3a26f43`](https://github.com/inspect-js/is-negative-zero/commit/3a26f435434bbfb8a254ddd32d6079bf50263121) +- [meta] do not publish workflow files [`2cea0c2`](https://github.com/inspect-js/is-negative-zero/commit/2cea0c20c7f8b167bb6064f916f3285642bf5ab1) +- [readme] add github actions/codecov badges; update URLs [`0c0be3e`](https://github.com/inspect-js/is-negative-zero/commit/0c0be3eb148ccf9d764e8ed515ef0e1d0ffeed9d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`a93d16e`](https://github.com/inspect-js/is-negative-zero/commit/a93d16eddf46cad6bc9b71a92968ce758e6f4ea4) +- [meta] create FUNDING.yml [`b4f425e`](https://github.com/inspect-js/is-negative-zero/commit/b4f425e49edb8c4aa1efa6ba34c2d5c1150b2a26) +- [actions] update codecov uploader [`7999db3`](https://github.com/inspect-js/is-negative-zero/commit/7999db3bff3f0f9cc729529940b9077a586822e2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest`, `tape` [`140e4d9`](https://github.com/inspect-js/is-negative-zero/commit/140e4d95eda9ad821608c28a5f705d84a906096d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`23a8b6d`](https://github.com/inspect-js/is-negative-zero/commit/23a8b6d257cea0b8a608b2319739562ecbc6ba75) +- [readme] add actions and codecov badges [`fe92126`](https://github.com/inspect-js/is-negative-zero/commit/fe9212634346ced7a45905d958cb85d129e4c10b) +- [readme] fix repo URLs [`50c428e`](https://github.com/inspect-js/is-negative-zero/commit/50c428e423e5861a6c231440b8b3e746cbf6230f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`688155f`](https://github.com/inspect-js/is-negative-zero/commit/688155ff0214da72cbafa4c438c3b9629265d82b) +- [meta] use `prepublishOnly` script for npm 7+ [`83171f9`](https://github.com/inspect-js/is-negative-zero/commit/83171f9131aed266f475d7a3283d9c2fc77e1436) +- [actions] update workflows [`e9823db`](https://github.com/inspect-js/is-negative-zero/commit/e9823db3054887d8bb5b3f2c8f698b93cdce7d82) + +## [v2.0.1](https://github.com/inspect-js/is-negative-zero/compare/v2.0.0...v2.0.1) - 2020-12-04 + +### Commits + +- [Tests] use shared travis-ci configs [`5b92482`](https://github.com/inspect-js/is-negative-zero/commit/5b92482ed26e55e1aafcc6b6310d279958af8204) +- [Tests] up to `node` `v11.7`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.16`, `v5.12`, `v4.9`; use `nvm install-latest-npm`; fix test scripts [`0f5d2f8`](https://github.com/inspect-js/is-negative-zero/commit/0f5d2f85ea7fe83de47f39b6b35e489b866d88a7) +- [Tests] migrate tests to Github Actions [`b80f05a`](https://github.com/inspect-js/is-negative-zero/commit/b80f05adb11a6a3232860fb50272b101aacb504f) +- [Tests] remove `jscs` [`7ccaf41`](https://github.com/inspect-js/is-negative-zero/commit/7ccaf4100281b614d61d7c9122e6f87943a89295) +- [meta] add missing changelog [`992bdde`](https://github.com/inspect-js/is-negative-zero/commit/992bddee362cbae71f2cdfd8666f4774b252412e) +- [readme] fix repo URLs; remove defunct badges [`80fd18d`](https://github.com/inspect-js/is-negative-zero/commit/80fd18d2b0191321afe0e1b572200e4c025eb664) +- [Tests] run `nyc` on all tests [`df26f14`](https://github.com/inspect-js/is-negative-zero/commit/df26f14b0b854d82b0d3ca7b4949811c9f151357) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`d7723aa`](https://github.com/inspect-js/is-negative-zero/commit/d7723aa70e5b478adc36d98e1338abe741c1906a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`9fdaabe`](https://github.com/inspect-js/is-negative-zero/commit/9fdaabecfdb25e6e860e5007a91b60ee0f20734f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`f07eeb2`](https://github.com/inspect-js/is-negative-zero/commit/f07eeb2740037c53f270e95d2f62edc051cafc56) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`bd5c751`](https://github.com/inspect-js/is-negative-zero/commit/bd5c751fa4850ba8726dc1c197ed6c843a227b05) +- [actions] add automatic rebasing / merge commit blocking [`5666a91`](https://github.com/inspect-js/is-negative-zero/commit/5666a917db6bdcee63c0a3e28e5e281359975abc) +- [meta] add `auto-changelog` [`f70fb2b`](https://github.com/inspect-js/is-negative-zero/commit/f70fb2b5b9ea53dc52729310717553648292189e) +- [actions] add "Allow Edits" workflow [`2b040a8`](https://github.com/inspect-js/is-negative-zero/commit/2b040a87d362f17d8cab2b0d48058b80e426ad4e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`09e2e53`](https://github.com/inspect-js/is-negative-zero/commit/09e2e537390225c1d1a6912be64267eaec6ea367) +- [Tests] use `npm audit` instead of `nsp` [`7df2669`](https://github.com/inspect-js/is-negative-zero/commit/7df2669013ac9328d424e9d8c82a53a0458f0888) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`4ff97c5`](https://github.com/inspect-js/is-negative-zero/commit/4ff97c5891c7a241a91c03fb54bd83e78570ef22) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`9e8cb7b`](https://github.com/inspect-js/is-negative-zero/commit/9e8cb7bca46d325ecf202187c0fde7da8722bcab) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `nsp` [`70b9888`](https://github.com/inspect-js/is-negative-zero/commit/70b988802a99c84ab7eb8da287bb8ff0efc5c055) +- [Dev Deps] update `jscs` [`59d0c42`](https://github.com/inspect-js/is-negative-zero/commit/59d0c42131020b74e68fd444798b9a3bf247fb2d) +- Add `npm run security` [`eb418ed`](https://github.com/inspect-js/is-negative-zero/commit/eb418ed7e79216808c206388fbd360cc7a75655f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`86a758d`](https://github.com/inspect-js/is-negative-zero/commit/86a758d42eb7d17a18f7f584c337d8820b842758) +- Only apps should have lockfiles [`a0ab621`](https://github.com/inspect-js/is-negative-zero/commit/a0ab6215590bf6adb3eaf1ff9e7c036d72e807ec) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`5c51349`](https://github.com/inspect-js/is-negative-zero/commit/5c513498fc5a8b2fd06f5e0c1b38b8e93c3477ac) +- [meta] add `funding` field [`1d0b2f4`](https://github.com/inspect-js/is-negative-zero/commit/1d0b2f43bf5bf75176859a440346b3e338ee510e) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`9b12367`](https://github.com/inspect-js/is-negative-zero/commit/9b12367706f1c269a3df406c8e2c211558671a15) +- [Dev Deps] update `auto-changelog`, `tape` [`6d98b8d`](https://github.com/inspect-js/is-negative-zero/commit/6d98b8d1f512c3844d4062215c793070084d1164) +- [Dev Deps] Update `tape`, `eslint` [`a258cdb`](https://github.com/inspect-js/is-negative-zero/commit/a258cdb86691725482d1d43a1f9e7953c3c6733f) +- [Dev Deps] update `auto-changelog`; add `aud` [`2ca2afb`](https://github.com/inspect-js/is-negative-zero/commit/2ca2afb9efef4ebc8b3c19046ab1ab3ad516ea9a) +- Test up to `io.js` `v3.0` [`1254ae8`](https://github.com/inspect-js/is-negative-zero/commit/1254ae80b7706616331ac914654d7a17bff31039) +- [Dev Deps] update `auto-changelog` [`4b54722`](https://github.com/inspect-js/is-negative-zero/commit/4b547228fceaae8f9eccabc9ad8a49046492348d) +- [Tests] only audit prod deps [`86d298b`](https://github.com/inspect-js/is-negative-zero/commit/86d298b56db90f81617ee5d942476eda34afb374) +- [Dev Deps] update `tape` [`3a47e27`](https://github.com/inspect-js/is-negative-zero/commit/3a47e2730f889539f666ef0eb09a93fb9c80bfd1) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`128d9bd`](https://github.com/inspect-js/is-negative-zero/commit/128d9bd4c12385fb5e478ac3dd3138fa4360a777) + +## [v2.0.0](https://github.com/inspect-js/is-negative-zero/compare/v1.0.0...v2.0.0) - 2015-07-24 + +### Commits + +- Update `tape`, `eslint`; use my personal shared `eslint` config. [`648d002`](https://github.com/inspect-js/is-negative-zero/commit/648d0029b177886428a11b07307f233ae2d3175b) +- Add `npm run eslint` [`5a52d80`](https://github.com/inspect-js/is-negative-zero/commit/5a52d80ab052e377044b9b181991a32afaaa3090) +- Using my standard jscs.json file [`5a667d9`](https://github.com/inspect-js/is-negative-zero/commit/5a667d9f8b7402ca3bd134080cd4435b5c7f1462) +- Adding `npm run lint` [`9a85ed9`](https://github.com/inspect-js/is-negative-zero/commit/9a85ed934da65d8733a38bf6ad3c89fd62115194) +- Update `tape`, `covert`, `jscs` [`c6cd3a6`](https://github.com/inspect-js/is-negative-zero/commit/c6cd3a64ea5b98100e10537549f50a9eeadc30ec) +- Update `eslint` [`e9c9b6e`](https://github.com/inspect-js/is-negative-zero/commit/e9c9b6e9623f021b7f3ae4091bf9ea2571ab02b4) +- Test on latest `io.js` [`2f7c8a9`](https://github.com/inspect-js/is-negative-zero/commit/2f7c8a9d174066400c072841d7bcf02cf90f8ebf) +- Adding license and downloads badges [`717087a`](https://github.com/inspect-js/is-negative-zero/commit/717087a013b4cfc9dc7847d3d4a64faf19341be4) +- Remove Number type coercion. [`481295d`](https://github.com/inspect-js/is-negative-zero/commit/481295dbd09dbf81d196dc77382f1b92f534de3f) +- Test up to `io.js` `v2.1` [`139a84a`](https://github.com/inspect-js/is-negative-zero/commit/139a84a3dbdec29682044c6e7ac884a7382ae6e1) +- Update `eslint` [`2f5fbfb`](https://github.com/inspect-js/is-negative-zero/commit/2f5fbfbc436ccd8676fc36fcd9f0edcdda33a1e7) +- Update `eslint` [`53cb4c5`](https://github.com/inspect-js/is-negative-zero/commit/53cb4c5eccecdf2d874e78e5c38cca762ed76a9d) +- Test on `io.js` `v2.2` [`98a1824`](https://github.com/inspect-js/is-negative-zero/commit/98a1824c86366f8a03cf303f46acecd67409f94b) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`772d6cd`](https://github.com/inspect-js/is-negative-zero/commit/772d6cdf397e6fc1b26e5ed5f279d07a5ead6df8) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`3e6147e`](https://github.com/inspect-js/is-negative-zero/commit/3e6147ebb5ecdfda4a2bffa441572fe017c7bb73) +- Use SVG badges instead of PNG [`d986cb4`](https://github.com/inspect-js/is-negative-zero/commit/d986cb450e5bd4f373041255b69e18f47c252a1e) +- Update `tape`, `jscs` [`9f9d7e7`](https://github.com/inspect-js/is-negative-zero/commit/9f9d7e751bcf4ceeed8e36e75e31d29c76326b3f) +- Update `jscs` [`079eaf6`](https://github.com/inspect-js/is-negative-zero/commit/079eaf699d53e7e32c54e5233259a00f5f494d9a) +- Update `tape`, `jscs` [`cffe3fc`](https://github.com/inspect-js/is-negative-zero/commit/cffe3fc17c6bfaa6996bf7402446b160631a04b3) +- Update `tape`, `jscs` [`3a16616`](https://github.com/inspect-js/is-negative-zero/commit/3a166165ae8770d59c296794d28547379cebec58) +- Use consistent quotes [`9509a81`](https://github.com/inspect-js/is-negative-zero/commit/9509a8110027b12c5762ba48d03b649a921847d5) +- Test on `io.js` `v2.4` [`a9150a3`](https://github.com/inspect-js/is-negative-zero/commit/a9150a3397db339d992e9e4e6ddb52d1237fd617) +- Test on `io.js` `v2.3` [`36d7acf`](https://github.com/inspect-js/is-negative-zero/commit/36d7acf5bb9193a2b35585e2c49ae8be9f45a55e) +- Lock covert to v1.0.0. [`29d8917`](https://github.com/inspect-js/is-negative-zero/commit/29d89171c3aad69ace372edbf641ec3a5468c760) +- Updating jscs [`fe09c8a`](https://github.com/inspect-js/is-negative-zero/commit/fe09c8a6d16c637ecd83a9a8a7f6192faef0754a) +- Updating jscs [`5877bc7`](https://github.com/inspect-js/is-negative-zero/commit/5877bc7c2ed44c1ecc5d31e1c484c523450722d8) +- Running linter as part of tests [`9e77756`](https://github.com/inspect-js/is-negative-zero/commit/9e777563905f511d915ec7257e2637811b911bd6) +- Updating covert [`520a695`](https://github.com/inspect-js/is-negative-zero/commit/520a695164465b88c76860a638baafd4192bce5c) + +## [v1.0.0](https://github.com/inspect-js/is-negative-zero/compare/v0.1.1...v1.0.0) - 2014-08-08 + +### Commits + +- Updating tape [`31d1942`](https://github.com/inspect-js/is-negative-zero/commit/31d19422ecd9d453677851a9d5a8d9372a16fb39) +- Updating tape [`e7143bf`](https://github.com/inspect-js/is-negative-zero/commit/e7143bf3b67d8881b1b6ee0444637647d7bb1d2b) + +## [v0.1.1](https://github.com/inspect-js/is-negative-zero/compare/v0.1.0...v0.1.1) - 2014-05-13 + +### Merged + +- Simplify code [`#1`](https://github.com/inspect-js/is-negative-zero/pull/1) + +### Commits + +- Adding a trailing newline [`61fb37f`](https://github.com/inspect-js/is-negative-zero/commit/61fb37f677e871cca53d9309e765d808ddddfd5a) + +## [v0.1.0](https://github.com/inspect-js/is-negative-zero/compare/v0.0.0...v0.1.0) - 2014-05-13 + +### Commits + +- Make sure old and unstable nodes don't break Travis [`f627215`](https://github.com/inspect-js/is-negative-zero/commit/f627215527a95dc1ca014600650e00f15fe122c5) +- Updating deps [`b502f48`](https://github.com/inspect-js/is-negative-zero/commit/b502f48e807d7671cb07e2ca247ae2daa62e4165) +- Oops, negative numbers were negative zero! [`746cb97`](https://github.com/inspect-js/is-negative-zero/commit/746cb975d82c0fa0c5058e8e031807f9afcfd6db) +- Updating covert [`99ef4ed`](https://github.com/inspect-js/is-negative-zero/commit/99ef4ed97d2f76f2a5afbef029bf794f1b5bcffa) +- Updating tape [`ee9cfc2`](https://github.com/inspect-js/is-negative-zero/commit/ee9cfc2fd0039bdb65b6493ce0b8e47d18aa17cd) +- Testing on node 0.6 again [`6a9bf0a`](https://github.com/inspect-js/is-negative-zero/commit/6a9bf0a09e210cca09c7a8a225d08ef1e6789b5a) + +## v0.0.0 - 2014-01-19 + +### Commits + +- package.json [`8411d92`](https://github.com/inspect-js/is-negative-zero/commit/8411d92ec787fd522a1b5e65154ae88e9024a23f) +- read me [`5c8bf3c`](https://github.com/inspect-js/is-negative-zero/commit/5c8bf3ce4867dbf2997ef01ea6b712aa294ec959) +- Initial commit [`c06f7dc`](https://github.com/inspect-js/is-negative-zero/commit/c06f7dcf926f5b35ba678787a0f16cdd7b544054) +- Tests. [`5c554d4`](https://github.com/inspect-js/is-negative-zero/commit/5c554d405bfb323a7413fde395d8dc39c5316356) +- Travis CI [`334d000`](https://github.com/inspect-js/is-negative-zero/commit/334d000941fc926493cc7dbdb4e5f7ae481a311b) +- Implementation. [`4ef4491`](https://github.com/inspect-js/is-negative-zero/commit/4ef449189c36d471d283e40aa20a8ebfa4985882) diff --git a/node_modules/is-negative-zero/LICENSE b/node_modules/is-negative-zero/LICENSE new file mode 100644 index 0000000..47b7b50 --- /dev/null +++ b/node_modules/is-negative-zero/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-negative-zero/README.md b/node_modules/is-negative-zero/README.md new file mode 100644 index 0000000..e8193a4 --- /dev/null +++ b/node_modules/is-negative-zero/README.md @@ -0,0 +1,54 @@ +# is-negative-zero [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value negative zero? === will lie to you. + +## Example + +```js +var isNegativeZero = require('is-negative-zero'); +var assert = require('assert'); + +assert.notOk(isNegativeZero(undefined)); +assert.notOk(isNegativeZero(null)); +assert.notOk(isNegativeZero(false)); +assert.notOk(isNegativeZero(true)); +assert.notOk(isNegativeZero(0)); +assert.notOk(isNegativeZero(42)); +assert.notOk(isNegativeZero(Infinity)); +assert.notOk(isNegativeZero(-Infinity)); +assert.notOk(isNegativeZero(NaN)); +assert.notOk(isNegativeZero('foo')); +assert.notOk(isNegativeZero(function () {})); +assert.notOk(isNegativeZero([])); +assert.notOk(isNegativeZero({})); + +assert.ok(isNegativeZero(-0)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-negative-zero +[npm-version-svg]: https://versionbadg.es/inspect-js/is-negative-zero.svg +[deps-svg]: https://david-dm.org/inspect-js/is-negative-zero.svg +[deps-url]: https://david-dm.org/inspect-js/is-negative-zero +[dev-deps-svg]: https://david-dm.org/inspect-js/is-negative-zero/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-negative-zero#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-negative-zero.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-negative-zero.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-negative-zero.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-negative-zero +[codecov-image]: https://codecov.io/gh/inspect-js/is-negative-zero/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-negative-zero/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-negative-zero +[actions-url]: https://github.com/inspect-js/is-negative-zero/actions diff --git a/node_modules/is-negative-zero/index.d.ts b/node_modules/is-negative-zero/index.d.ts new file mode 100644 index 0000000..7147b50 --- /dev/null +++ b/node_modules/is-negative-zero/index.d.ts @@ -0,0 +1,3 @@ +declare function isNegativeZero(number: unknown): number is -0; + +export = isNegativeZero; \ No newline at end of file diff --git a/node_modules/is-negative-zero/index.js b/node_modules/is-negative-zero/index.js new file mode 100644 index 0000000..bd5222e --- /dev/null +++ b/node_modules/is-negative-zero/index.js @@ -0,0 +1,7 @@ +'use strict'; + +/** @type {import('.')} */ +module.exports = function isNegativeZero(number) { + return number === 0 && (1 / number) === -Infinity; +}; + diff --git a/node_modules/is-negative-zero/package.json b/node_modules/is-negative-zero/package.json new file mode 100644 index 0000000..3ed79ab --- /dev/null +++ b/node_modules/is-negative-zero/package.json @@ -0,0 +1,92 @@ +{ + "name": "is-negative-zero", + "version": "2.0.3", + "description": "Is this value negative zero? === will lie to you", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "main": "index.js", + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-negative-zero.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/is-negative-zero/issues" + }, + "homepage": "https://github.com/inspect-js/is-negative-zero", + "keywords": [ + "is", + "negative", + "zero", + "negative zero", + "number", + "positive", + "0", + "-0" + ], + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..12.0", + "opera/15.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-negative-zero/test/index.js b/node_modules/is-negative-zero/test/index.js new file mode 100644 index 0000000..d7b51c3 --- /dev/null +++ b/node_modules/is-negative-zero/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var isNegativeZero = require('../'); + +test('not negative zero', function (t) { + // @ts-expect-error + t.notOk(isNegativeZero(), 'undefined is not negative zero'); + t.notOk(isNegativeZero(null), 'null is not negative zero'); + t.notOk(isNegativeZero(false), 'false is not negative zero'); + t.notOk(isNegativeZero(true), 'true is not negative zero'); + t.notOk(isNegativeZero(0), 'positive zero is not negative zero'); + t.notOk(isNegativeZero(Infinity), 'Infinity is not negative zero'); + t.notOk(isNegativeZero(-Infinity), '-Infinity is not negative zero'); + t.notOk(isNegativeZero(NaN), 'NaN is not negative zero'); + t.notOk(isNegativeZero('foo'), 'string is not negative zero'); + t.notOk(isNegativeZero([]), 'array is not negative zero'); + t.notOk(isNegativeZero({}), 'object is not negative zero'); + t.notOk(isNegativeZero(function () {}), 'function is not negative zero'); + t.notOk(isNegativeZero(-1), '-1 is not negative zero'); + + t.end(); +}); + +test('negative zero', function (t) { + t.ok(isNegativeZero(-0), 'negative zero is negative zero'); + t.end(); +}); + diff --git a/node_modules/is-negative-zero/tsconfig.json b/node_modules/is-negative-zero/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/is-negative-zero/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/is-number-object/.editorconfig b/node_modules/is-number-object/.editorconfig new file mode 100644 index 0000000..4e36aee --- /dev/null +++ b/node_modules/is-number-object/.editorconfig @@ -0,0 +1,23 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off + +[CHANGELOG.md] +max_line_length = off diff --git a/node_modules/is-number-object/.eslintrc b/node_modules/is-number-object/.eslintrc new file mode 100644 index 0000000..c7933f4 --- /dev/null +++ b/node_modules/is-number-object/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + }, + + "overrides": [ + { + "files": "test-core-js.js", + "extends": "@ljharb/eslint-config/tests", + }, + ], +} diff --git a/node_modules/is-number-object/.github/FUNDING.yml b/node_modules/is-number-object/.github/FUNDING.yml new file mode 100644 index 0000000..17f4dc5 --- /dev/null +++ b/node_modules/is-number-object/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-number-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-number-object/.nycrc b/node_modules/is-number-object/.nycrc new file mode 100644 index 0000000..a69aa2d --- /dev/null +++ b/node_modules/is-number-object/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-number-object/CHANGELOG.md b/node_modules/is-number-object/CHANGELOG.md new file mode 100644 index 0000000..028b484 --- /dev/null +++ b/node_modules/is-number-object/CHANGELOG.md @@ -0,0 +1,125 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.7](https://github.com/inspect-js/is-number-object/compare/v1.0.6...v1.0.7) - 2022-04-01 + +### Commits + +- [actions] reuse common workflows [`8f9a1b0`](https://github.com/inspect-js/is-number-object/commit/8f9a1b040a435a5c5d12150952d0e6f96d4f713a) +- [meta] better `eccheck` command [`9dc8dff`](https://github.com/inspect-js/is-number-object/commit/9dc8dff273e4d0b954fd4f2a2eacc849d321b646) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`c50ecbf`](https://github.com/inspect-js/is-number-object/commit/c50ecbfc7577c69324fca4d2b40dd354c5156be9) +- [actions] update codecov uploader [`f1a2560`](https://github.com/inspect-js/is-number-object/commit/f1a2560d4a996abea90f7a792069a35359869b67) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js`, `tape` [`4b06ace`](https://github.com/inspect-js/is-number-object/commit/4b06aceeba2ebf0887af020aa89caad8950e5f47) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `tape` [`3dc0e8b`](https://github.com/inspect-js/is-number-object/commit/3dc0e8b0fcc96a9bc9936e9a62a523fe67bafca5) +- [meta] add `bugs`/`homepage` package.json fields [`d7e0bcf`](https://github.com/inspect-js/is-number-object/commit/d7e0bcf1fe1b4a48d6500266c8b4058c854fecba) + +## [v1.0.6](https://github.com/inspect-js/is-number-object/compare/v1.0.5...v1.0.6) - 2021-08-05 + +### Commits + +- [Tests] run tests with core-js as well [`5177312`](https://github.com/inspect-js/is-number-object/commit/51773120b18e27bfe8a3bd228ef2e21f5802f338) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`ca2b31d`](https://github.com/inspect-js/is-number-object/commit/ca2b31d81c5d7d9b11e812dee58cd627a6d634e2) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`50950f9`](https://github.com/inspect-js/is-number-object/commit/50950f962a4b1188c478f6034194d7eb4314c884) + +## [v1.0.5](https://github.com/inspect-js/is-number-object/compare/v1.0.4...v1.0.5) - 2021-05-07 + +### Commits + +- [Tests] migrate tests to Github Actions [`9666737`](https://github.com/inspect-js/is-number-object/commit/96667372f8e36f70516218f86318f957f8c175ad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7815ce2`](https://github.com/inspect-js/is-number-object/commit/7815ce21cb5662c2d1651b3ec302f186aa8a016b) +- [meta] do not publish github action workflow files [`80ccb75`](https://github.com/inspect-js/is-number-object/commit/80ccb7509f91732675b018cc1a636d649a92889e) +- [Tests] run `nyc` on all tests [`c9ffb74`](https://github.com/inspect-js/is-number-object/commit/c9ffb74443690ef22f9aa7dd35855fd1e3be5184) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7e84161`](https://github.com/inspect-js/is-number-object/commit/7e84161d089c87ef42e3639ac1889642624ebd28) +- [readme] add actions and codecov badges [`0c5ec7a`](https://github.com/inspect-js/is-number-object/commit/0c5ec7aa87dac27bdcda2365124c3aa0ccf9c278) +- [actions] add Require Allow Edits workflow [`dd0fb74`](https://github.com/inspect-js/is-number-object/commit/dd0fb74b2ecb630ea7778a6f06dcc017323a3c1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape` [`2d36f80`](https://github.com/inspect-js/is-number-object/commit/2d36f809a7b9896958b0b0f3b69be0067caedb45) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`77d3140`](https://github.com/inspect-js/is-number-object/commit/77d3140557d483e467ce070b21bf384e9a7562d5) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`75d4abf`](https://github.com/inspect-js/is-number-object/commit/75d4abf34168e69d73f621c696a16179ddc0873c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`0c2a917`](https://github.com/inspect-js/is-number-object/commit/0c2a917e4802b102888759fad912bd9faa5587f7) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`8b6ebc4`](https://github.com/inspect-js/is-number-object/commit/8b6ebc489db14a0c369214e081413f326fc0d598) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`62045fc`](https://github.com/inspect-js/is-number-object/commit/62045fcaddb9e4d3ef81068e99d07d21cd62023b) +- [actions] use checkout v2; remove unneeded env [`d48cd06`](https://github.com/inspect-js/is-number-object/commit/d48cd06720ea71f278a6d35c6f0a8ec04242a58f) +- [meta] use `prepublishOnly` script for npm 7+ [`827ab0d`](https://github.com/inspect-js/is-number-object/commit/827ab0d52d25f46d232ae7442ece270dec2de1df) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfed500`](https://github.com/inspect-js/is-number-object/commit/bfed500e6cc3cd3b9e7ffea78429c59857035791) +- [meta] remove explicit audit level config [`ce23e5e`](https://github.com/inspect-js/is-number-object/commit/ce23e5e49fbebe190267d8c99ddfd880a963b7ee) +- [meta] gitignore coverage output [`f1ad981`](https://github.com/inspect-js/is-number-object/commit/f1ad98106549c1c88322d8cb206068ea4c5bd424) + +## [v1.0.4](https://github.com/inspect-js/is-number-object/compare/v1.0.3...v1.0.4) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`792b5aa`](https://github.com/inspect-js/is-number-object/commit/792b5aa5e7313ddf5507f7283bb7d5d5c646b11b) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`dc66db7`](https://github.com/inspect-js/is-number-object/commit/dc66db7dd1eca0263f6602597eb40601519e912e) +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`7660fed`](https://github.com/inspect-js/is-number-object/commit/7660fed03a7060eb5c91e74b9a17303d4fac1056) +- [Tests] remove `jscs` [`f1fee97`](https://github.com/inspect-js/is-number-object/commit/f1fee97423478bcc653c844fadda55138d9b9a54) +- [meta] add `auto-changelog` [`4b1c225`](https://github.com/inspect-js/is-number-object/commit/4b1c2253770eb18761a1e8b157772028d6f742c4) +- [meta] remove unused Makefile and associated utilities [`379b979`](https://github.com/inspect-js/is-number-object/commit/379b9793d9c61d7889e53bd9de9578dca9964ebc) +- Update `covert`, `jscs`, `eslint`, `semver` [`16d2af8`](https://github.com/inspect-js/is-number-object/commit/16d2af82a6c93aee614f7a4b2c468411c743e95f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is`, `replace`, `semver`, `tape` [`21c0f04`](https://github.com/inspect-js/is-number-object/commit/21c0f0431984b87443c6acb9f003368feb7b4368) +- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `nsp`, `eslint`, `semver`. Add `replace`. Use `^` instead of `~`. [`19d6ee3`](https://github.com/inspect-js/is-number-object/commit/19d6ee3a3d4a87764d57316804fd8b882ba5197c) +- Update `eslint` [`d32754b`](https://github.com/inspect-js/is-number-object/commit/d32754bcca0033e01eba531c4353d1239e992203) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace` [`1df8165`](https://github.com/inspect-js/is-number-object/commit/1df8165dd63d9f2f78ccb78e905d0a6b3e302884) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`675372b`](https://github.com/inspect-js/is-number-object/commit/675372b115fb20b5034f40bcbb5560c6c0512746) +- [readme] clean up readme; remove testling; fix repo URLs [`80e29c4`](https://github.com/inspect-js/is-number-object/commit/80e29c4d6d0811fc361e95ee83b81280bf3ae3f5) +- [Tests] up to `node` `v12.7`, `v10.16`, `v8.16` [`287a968`](https://github.com/inspect-js/is-number-object/commit/287a9687b1fc3d091ec231c06f19a19ff7b0e8f6) +- Test on latest `iojs` and `node` versions. [`11c98a2`](https://github.com/inspect-js/is-number-object/commit/11c98a23b232cb21c7daab797fd63875c2970681) +- [actions] add automatic rebasing / merge commit blocking [`022d026`](https://github.com/inspect-js/is-number-object/commit/022d026129df445f239ba2ecd8d47a2786242d75) +- [meta] create FUNDING.yml [`7f52710`](https://github.com/inspect-js/is-number-object/commit/7f527107168aad7108b7c262d295dcf44e03214d) +- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`bc8cd50`](https://github.com/inspect-js/is-number-object/commit/bc8cd508fe4440168f9b049be3ddf93c56c06c49) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`1f9200b`](https://github.com/inspect-js/is-number-object/commit/1f9200b7c56840dc23eeeca5d0ee4f64a0446e08) +- [Tests] up to `node` `v12.11` [`706d50a`](https://github.com/inspect-js/is-number-object/commit/706d50a779b90feb3f4d2ae88d8189d19b913073) +- [Dev Deps] update `jscs` [`e3591a4`](https://github.com/inspect-js/is-number-object/commit/e3591a445b1af25d46632eafea51efa07b4eb6dc) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`baf4ee7`](https://github.com/inspect-js/is-number-object/commit/baf4ee749fb65ec12e9cab102e77aa0e14312109) +- Update `nsp`, `eslint` [`61b18d5`](https://github.com/inspect-js/is-number-object/commit/61b18d5b44542fddf4950534d506b20d8c8b1f44) +- Update `eslint`, `semver` [`52e61bd`](https://github.com/inspect-js/is-number-object/commit/52e61bd4334c0a1afacd147fd0bc1e2c1be10df5) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`; add `safe-publish-latest` [`79db7f6`](https://github.com/inspect-js/is-number-object/commit/79db7f610d2bcf5f0d6e8ca834f7402504101072) +- Only apps should have lockfiles [`677b9b4`](https://github.com/inspect-js/is-number-object/commit/677b9b4fb6ad9d7b984cb0f89c8b5a6df143b29a) +- Test on `io.js` `v2.2` [`e8a38b2`](https://github.com/inspect-js/is-number-object/commit/e8a38b2fe73b841b0ed55d9f60573d460a4f2a62) +- [meta] add `funding` field [`85315e7`](https://github.com/inspect-js/is-number-object/commit/85315e75c119a2aef70a766f2ddc1079b64d006b) +- [Dev Deps] update `eslint`, `tape` [`f3581aa`](https://github.com/inspect-js/is-number-object/commit/f3581aaea310546f6ee4612990468d39f058d320) +- [Tests] use `eclint` instead of `editorconfig-tools` [`7b53680`](https://github.com/inspect-js/is-number-object/commit/7b5368071000eb1c715aeeee5ff47ffdbee9fe5c) +- [Dev Deps] update `semver`, `tape` [`d6b524a`](https://github.com/inspect-js/is-number-object/commit/d6b524ac2e8c0240c436cbe8828671e383d51fd5) +- [Dev Deps] Update `tape`, `eslint` [`be19203`](https://github.com/inspect-js/is-number-object/commit/be19203dee0aa70ff8f09823bf880a38b824e1ed) +- Test up to `io.js` `v2.1` [`feb7ba6`](https://github.com/inspect-js/is-number-object/commit/feb7ba63a0816f1d36419ce240f96e9b4e4c90ba) +- Test up to `io.js` `v3.0` [`7be1f0a`](https://github.com/inspect-js/is-number-object/commit/7be1f0a25dc59b6606be9ee1ace38cb7039a59d2) +- [Dev Deps] update `tape` [`d9a2318`](https://github.com/inspect-js/is-number-object/commit/d9a2318bc82477e9321e961def11e28d364e5562) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a6cd411`](https://github.com/inspect-js/is-number-object/commit/a6cd411c6bd92691a48b52683afce584c2c6b21b) +- Test on `io.js` `v2.4` [`46c2e7f`](https://github.com/inspect-js/is-number-object/commit/46c2e7f2ce8ad7f8ab3c1da827d93fc2780eff06) +- Test on `io.js` `v2.3` [`9c344b0`](https://github.com/inspect-js/is-number-object/commit/9c344b0df83628908a1f776a3f2e5fc4fae1d4d2) +- Fix tests for faked @@toStringTag [`f8c446e`](https://github.com/inspect-js/is-number-object/commit/f8c446e9fc320c23807717356e259529f494b9f3) + +## [v1.0.3](https://github.com/inspect-js/is-number-object/compare/v1.0.2...v1.0.3) - 2015-01-29 + +### Commits + +- If @@toStringTag is not present, use the old-school Object#toString test. [`9b2a4df`](https://github.com/inspect-js/is-number-object/commit/9b2a4df6ccf903e89198d4244eeb7f47a7056327) + +## [v1.0.2](https://github.com/inspect-js/is-number-object/compare/v1.0.1...v1.0.2) - 2015-01-29 + +### Commits + +- Improve optimizability of the non-try/catch part. [`7e6be2f`](https://github.com/inspect-js/is-number-object/commit/7e6be2fd2346557fc81bd544ac8745021c50e266) +- Fix package.json [`4f2ebea`](https://github.com/inspect-js/is-number-object/commit/4f2ebeae09c45e1eefeb2c10a011ff2ef0aca921) + +## [v1.0.1](https://github.com/inspect-js/is-number-object/compare/v1.0.0...v1.0.1) - 2015-01-29 + +### Commits + +- Use Object() instead of new Number() [`1aaa746`](https://github.com/inspect-js/is-number-object/commit/1aaa746c26878a0f698aabea4d88215311f2a38d) +- Add early exits for typeof number, or typeof not "object". [`eae4337`](https://github.com/inspect-js/is-number-object/commit/eae43375d3f88e04bb10eabd954e5a6b66ad5305) + +## v1.0.0 - 2015-01-28 + +### Commits + +- Dotfiles. [`9c74e3e`](https://github.com/inspect-js/is-number-object/commit/9c74e3eb2b10398d4022de7c4015531e874f06c8) +- `make release` [`a99e5ae`](https://github.com/inspect-js/is-number-object/commit/a99e5aeb3995a7d543fc5833722bc02011fabad6) +- package.json [`4fed9ef`](https://github.com/inspect-js/is-number-object/commit/4fed9ef7c35ccfc45ca8acd3c92c9cb91c7daa6d) +- Read me [`c91d6ba`](https://github.com/inspect-js/is-number-object/commit/c91d6ba00de79eaaac5fec7c9d8866d61d0abb62) +- Initial commit [`629fb96`](https://github.com/inspect-js/is-number-object/commit/629fb969f076e0802c799b368c7b02556bb0750e) +- Tests. [`a39de62`](https://github.com/inspect-js/is-number-object/commit/a39de624785cc204ed7c0ea5518f1c878870ceb1) +- Implementation. [`aedd91e`](https://github.com/inspect-js/is-number-object/commit/aedd91e6fc23f00852ad1266b6c19f32b7f93a22) diff --git a/node_modules/is-number-object/LICENSE b/node_modules/is-number-object/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/is-number-object/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-number-object/README.md b/node_modules/is-number-object/README.md new file mode 100644 index 0000000..a5f1e5b --- /dev/null +++ b/node_modules/is-number-object/README.md @@ -0,0 +1,55 @@ +# is-number-object [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isNumber = require('is-number-object'); +var assert = require('assert'); + +assert.notOk(isNumber(undefined)); +assert.notOk(isNumber(null)); +assert.notOk(isNumber(false)); +assert.notOk(isNumber(true)); +assert.notOk(isNumber('foo')); +assert.notOk(isNumber(function () {})); +assert.notOk(isNumber([])); +assert.notOk(isNumber({})); +assert.notOk(isNumber(/a/g)); +assert.notOk(isNumber(new RegExp('a', 'g'))); +assert.notOk(isNumber(new Date())); + +assert.ok(isNumber(42)); +assert.ok(isNumber(NaN)); +assert.ok(isNumber(Infinity)); +assert.ok(isNumber(new Number(42))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-number-object +[2]: https://versionbadg.es/inspect-js/is-number-object.svg +[5]: https://david-dm.org/inspect-js/is-number-object.svg +[6]: https://david-dm.org/inspect-js/is-number-object +[7]: https://david-dm.org/inspect-js/is-number-object/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-number-object#info=devDependencies +[11]: https://nodei.co/npm/is-number-object.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-number-object.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-number-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-number-object +[codecov-image]: https://codecov.io/gh/inspect-js/is-number-object/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-number-object/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-number-object +[actions-url]: https://github.com/inspect-js/is-number-object/actions diff --git a/node_modules/is-number-object/index.js b/node_modules/is-number-object/index.js new file mode 100644 index 0000000..9107c31 --- /dev/null +++ b/node_modules/is-number-object/index.js @@ -0,0 +1,24 @@ +'use strict'; + +var numToStr = Number.prototype.toString; +var tryNumberObject = function tryNumberObject(value) { + try { + numToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var numClass = '[object Number]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isNumberObject(value) { + if (typeof value === 'number') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; +}; diff --git a/node_modules/is-number-object/package.json b/node_modules/is-number-object/package.json new file mode 100644 index 0000000..2c8b16d --- /dev/null +++ b/node_modules/is-number-object/package.json @@ -0,0 +1,85 @@ +{ + "name": "is-number-object", + "version": "1.0.7", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test:corejs": "nyc tape test-corejs.js", + "test": "npm run tests-only && npm run test:corejs", + "posttest": "aud --production", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-number-object.git" + }, + "keywords": [ + "Number", + "ES6", + "toStringTag", + "@@toStringTag", + "Number object" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-number-object/issues" + }, + "homepage": "https://github.com/inspect-js/is-number-object#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^3.21.1", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "has-tostringtag": "^1.0.0" + } +} diff --git a/node_modules/is-number-object/test/index.js b/node_modules/is-number-object/test/index.js new file mode 100644 index 0000000..bca48b2 --- /dev/null +++ b/node_modules/is-number-object/test/index.js @@ -0,0 +1,38 @@ +'use strict'; + +var test = require('tape'); +var isNumber = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Numbers', function (t) { + t.notOk(isNumber(), 'undefined is not Number'); + t.notOk(isNumber(null), 'null is not Number'); + t.notOk(isNumber(false), 'false is not Number'); + t.notOk(isNumber(true), 'true is not Number'); + t.notOk(isNumber('foo'), 'string is not Number'); + t.notOk(isNumber([]), 'array is not Number'); + t.notOk(isNumber({}), 'object is not Number'); + t.notOk(isNumber(function () {}), 'function is not Number'); + t.notOk(isNumber(/a/g), 'regex literal is not Number'); + t.notOk(isNumber(new RegExp('a', 'g')), 'regex object is not Number'); + t.notOk(isNumber(new Date()), 'new Date() is not Number'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeNumber = { + toString: function () { return '7'; }, + valueOf: function () { return 42; } + }; + fakeNumber[Symbol.toStringTag] = 'Number'; + t.notOk(isNumber(fakeNumber), 'fake Number with @@toStringTag "Number" is not Number'); + t.end(); +}); + +test('Numbers', function (t) { + t.ok(isNumber(42), 'number is Number'); + t.ok(isNumber(Object(42)), 'number object is Number'); + t.ok(isNumber(NaN), 'NaN is Number'); + t.ok(isNumber(Infinity), 'Infinity is Number'); + t.end(); +}); diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000..281165d --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,115 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +### Related projects + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-number/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 10, 2016._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js new file mode 100644 index 0000000..7a2a45b --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,22 @@ +/*! + * is-number + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function isNumber(num) { + var type = typeOf(num); + + if (type === 'string') { + if (!num.trim()) return false; + } else if (type !== 'number') { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000..8c1f9ab --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,83 @@ +{ + "name": "is-number", + "description": "Returns true if the value is a number. comprehensive tests.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Charlike Mike Reagent (http://www.tunnckocore.tk)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} \ No newline at end of file diff --git a/node_modules/is-plain-object/LICENSE b/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-plain-object/README.md b/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/is-plain-object/index.d.ts b/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/is-plain-object/index.js b/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/is-plain-object/package.json b/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..dd60498 --- /dev/null +++ b/node_modules/is-plain-object/package.json @@ -0,0 +1,79 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor.", + "version": "2.0.4", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha", + "test": "npm run test_node && npm run browserify && npm run test_browser" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-regex/.editorconfig b/node_modules/is-regex/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/is-regex/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-regex/.eslintignore b/node_modules/is-regex/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/is-regex/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-regex/.eslintrc b/node_modules/is-regex/.eslintrc new file mode 100644 index 0000000..1f6f127 --- /dev/null +++ b/node_modules/is-regex/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [1], + "operator-linebreak": [2, "before"], + }, + + "overrides": [ + { + "files": ["test/**/*.js"], + "globals": { + "Proxy": false, + }, + }, + ], +} diff --git a/node_modules/is-regex/.nycrc b/node_modules/is-regex/.nycrc new file mode 100644 index 0000000..a69aa2d --- /dev/null +++ b/node_modules/is-regex/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-regex/CHANGELOG.md b/node_modules/is-regex/CHANGELOG.md new file mode 100644 index 0000000..b7496b2 --- /dev/null +++ b/node_modules/is-regex/CHANGELOG.md @@ -0,0 +1,197 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.4](https://github.com/inspect-js/is-regex/compare/v1.1.3...v1.1.4) - 2021-08-05 + +### Commits + +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4b17cad`](https://github.com/inspect-js/is-regex/commit/4b17cad8496b1ae621b18335fa3afe94d0c65e83) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`2dad4af`](https://github.com/inspect-js/is-regex/commit/2dad4afffa15f07cbbf7675b77d1f650c92652c4) + +## [v1.1.3](https://github.com/inspect-js/is-regex/compare/v1.1.2...v1.1.3) - 2021-05-07 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c681ab9`](https://github.com/inspect-js/is-regex/commit/c681ab99c07f8b3b7ae5f652b3105a30bce94f69) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`ca019fd`](https://github.com/inspect-js/is-regex/commit/ca019fdb828dc7d32e323213403ac9995d8604e3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`605a66f`](https://github.com/inspect-js/is-regex/commit/605a66f278900f1c8ae9d1dfcec31e5f61b10ad3) +- [readme] add actions and codecov badges [`8d7c6f0`](https://github.com/inspect-js/is-regex/commit/8d7c6f0e007bd982f21b958e0abc98b8a84e2a24) +- [meta] use `prepublishOnly` script for npm 7+ [`8e50e91`](https://github.com/inspect-js/is-regex/commit/8e50e91f51aa5038745526710ef2e030527982a7) +- [Deps] update `has-symbols` [`4742c81`](https://github.com/inspect-js/is-regex/commit/4742c81260c3db9a8c9ef57110981fb6175f58e0) + +## [v1.1.2](https://github.com/inspect-js/is-regex/compare/v1.1.1...v1.1.2) - 2021-02-01 + +### Commits + +- [Tests] migrate tests to Github Actions [`cc1686e`](https://github.com/inspect-js/is-regex/commit/cc1686e25f446ca6948f43b3f180d6e55e31fb4e) +- [readme] fix repo URLs; remove travis badge [`d1d1da6`](https://github.com/inspect-js/is-regex/commit/d1d1da647bb4e91589606f12470cd27a47b3bb81) +- [meta] do not publish github action workflow files [`9f84b99`](https://github.com/inspect-js/is-regex/commit/9f84b993a995f057b4d2d097ef47b1ff9c84115d) +- [Tests] run `nyc` on all tests [`c37aab9`](https://github.com/inspect-js/is-regex/commit/c37aab9d332c4834b08ada94736c45ab1d39cd2f) +- [Robustness] use `call-bind` [`fbb61bf`](https://github.com/inspect-js/is-regex/commit/fbb61bf3e19ccc178e6ed1e0d7ab9cc7c7167393) +- [actions] add "Allow Edits" workflow [`9022b53`](https://github.com/inspect-js/is-regex/commit/9022b53cb05b0f105cd179800cf96e055b249f08) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`d60f28f`](https://github.com/inspect-js/is-regex/commit/d60f28f7f2fb21dade7bce302b3e0246206423d3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`2c35c43`](https://github.com/inspect-js/is-regex/commit/2c35c437edf3eeb37129eea2404d8f465d27620f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`1009e25`](https://github.com/inspect-js/is-regex/commit/1009e259d49a63753dc6e79e2b876a30c00c6de6) +- [meta] gitignore coverage output [`3b5fa9e`](https://github.com/inspect-js/is-regex/commit/3b5fa9ed2882c65ee81dff979f79f1a2751d3772) +- [actions] update workflows [`1843ef6`](https://github.com/inspect-js/is-regex/commit/1843ef65b8b8c24a44e91bc4ed5ee60dffc31c2d) + +## [v1.1.1](https://github.com/inspect-js/is-regex/compare/v1.1.0...v1.1.1) - 2020-08-03 + +### Commits + +- [Performance] Re-add lastIndex check to improve performance [`d8495cd`](https://github.com/inspect-js/is-regex/commit/d8495cd22d475ddca250818921b6088f631c1972) +- [Dev Deps] update `auto-changelog`, `eslint` [`778fa6b`](https://github.com/inspect-js/is-regex/commit/778fa6b9d2b182ee6d73993e103532855e956f85) + +## [v1.1.0](https://github.com/inspect-js/is-regex/compare/v1.0.5...v1.1.0) - 2020-06-03 + +### Commits + +- [New] use `badStringifier`‑based RegExp detection [`31eff67`](https://github.com/inspect-js/is-regex/commit/31eff673243d65c3d6c05848c0eb52f5380f1be3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`fc91458`](https://github.com/inspect-js/is-regex/commit/fc914588187b8bb00d8d792c84f06a6e15d883c1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`d43ed83`](https://github.com/inspect-js/is-regex/commit/d43ed83db54ea727bb0b1b77a50af79d1edb8a6d) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`56647d1`](https://github.com/inspect-js/is-regex/commit/56647d196be34ef3c118ad67726e75169fbcb875) +- [meta] only run `aud` on prod deps [`e0865b8`](https://github.com/inspect-js/is-regex/commit/e0865b8360b0ac1b9d17b7b81ae5f339e5c9036b) + +## [v1.0.5](https://github.com/inspect-js/is-regex/compare/v1.0.4...v1.0.5) - 2019-12-15 + +### Commits + +- [Tests] use shared travis-ci configs [`af728b2`](https://github.com/inspect-js/is-regex/commit/af728b21c5cc9e41234fb4015594bffdcfff597c) +- [Tests] remove `jscs` [`1b8cfe8`](https://github.com/inspect-js/is-regex/commit/1b8cfe8cfb14820c196775f19d370276e4034791) +- [meta] add `auto-changelog` [`c3131d8`](https://github.com/inspect-js/is-regex/commit/c3131d8ab5d06ea5fa05a4bb2ad28bbfb81668ad) +- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`, `v4.8`; newer npm fails on older nodes [`660b658`](https://github.com/inspect-js/is-regex/commit/660b6585d1a9607dbdae879b70ce2f6a5684616c) +- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS [`7c25218`](https://github.com/inspect-js/is-regex/commit/7c25218d540ab17c18e4ae333677c5725806a778) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`fa95547`](https://github.com/inspect-js/is-regex/commit/fa955478950a5ba0a920010d5daaa29487500b30) +- [meta] remove unused Makefile and associated utilities [`9fd2a29`](https://github.com/inspect-js/is-regex/commit/9fd2a29dc57ed125f3d61e94f6254a9dd8ee0044) +- [Tests] up to `node` `v11.3`, `v10.14`, `v8.14`, `v6.15` [`7f2ac41`](https://github.com/inspect-js/is-regex/commit/7f2ac41ef5dc4d53bfe2fb1c24486c688a2537bd) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`6fa2b0f`](https://github.com/inspect-js/is-regex/commit/6fa2b0fe171a5b02086a06679a92d989e83a8b8e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`697e1de`](https://github.com/inspect-js/is-regex/commit/697e1de1c9e69f08e591cc0040d81fdbbde6fe4e) +- [actions] add automatic rebasing / merge commit blocking [`ad86dc9`](https://github.com/inspect-js/is-regex/commit/ad86dc97a52e4f66fbfb3b8c9c78da3963588b54) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `replace`, `semver`, `tape` [`5c99c8e`](https://github.com/inspect-js/is-regex/commit/5c99c8e384d5ce2ef434be5853c301477cf35456) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape` [`bb63686`](https://github.com/inspect-js/is-regex/commit/bb63686a9d0fc586d121549cf484da95edec3b0a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config@`, `replace`, `semver`, `tape` [`ddf3670`](https://github.com/inspect-js/is-regex/commit/ddf36705e5f7bd29832721e4a23abf06195032c6) +- [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config` [`e7b5a62`](https://github.com/inspect-js/is-regex/commit/e7b5a626eef3b9648c7d52d4620ce2e2a98a9ab8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`c803db5`](https://github.com/inspect-js/is-regex/commit/c803db5cd94cf9e0a559617adbc1e4c9d22007ff) +- [Tests] switch from `nsp` to `npm audit` [`b7239be`](https://github.com/inspect-js/is-regex/commit/b7239be9da263a0f7066f79d087eaf700a9613e9) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`347ee6c`](https://github.com/inspect-js/is-regex/commit/347ee6c67ba0f56b03f21a5abe743658f6515963) +- Only apps should have lockfiles. [`3866575`](https://github.com/inspect-js/is-regex/commit/38665755ecf028061f15816059e26023890a0dc7) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`d099a39`](https://github.com/inspect-js/is-regex/commit/d099a3943eb7e156a3e64fb8b74e11d7c83a4bec) +- [meta] add `funding` field [`741aecd`](https://github.com/inspect-js/is-regex/commit/741aecd92cd49868b3606c8cc99ce299e5f3c7d5) +- [Tests] use `eclint` instead of `editorconfig-tools` [`bc6aa75`](https://github.com/inspect-js/is-regex/commit/bc6aa7539e506788709b96f7bf3d7549850a81c3) +- [Tests] on `node` `v10.1` [`262226f`](https://github.com/inspect-js/is-regex/commit/262226f08fa34dff9a8dffd16daabb3dc6e262eb) +- [Dev Deps] update `eslint` [`31fd719`](https://github.com/inspect-js/is-regex/commit/31fd719dd59a6111ca710cdb0d19a8adadf9b8c6) +- [Deps] update `has` [`e9e25a3`](https://github.com/inspect-js/is-regex/commit/e9e25a3de7e89faaa6aadf5010477074140e8218) +- [Dev Deps] update `replace` [`aeeb968`](https://github.com/inspect-js/is-regex/commit/aeeb968bf5a4fc07f0fa6905f2c699fc563b6c32) +- [Tests] set audit level [`2a6290e`](https://github.com/inspect-js/is-regex/commit/2a6290e78b58bf14b734d7998fe53b4a84db5e44) +- [Tests] remove `nsp` [`fc74c2b`](https://github.com/inspect-js/is-regex/commit/fc74c2bb6970a7f3280abe6eff3b492d77d89c9f) + +## [v1.0.4](https://github.com/inspect-js/is-regex/compare/v1.0.3...v1.0.4) - 2017-02-18 + +### Fixed + +- [Fix] ensure that `lastIndex` is not mutated [`#3`](https://github.com/inspect-js/is-regex/issues/3) + +### Commits + +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`c4a41c3`](https://github.com/inspect-js/is-regex/commit/c4a41c3a8203a3919b01cd0d1b577daadf30a452) +- [Tests] on all node minors; improve test matrix [`58d7508`](https://github.com/inspect-js/is-regex/commit/58d7508a36eb92bd76717486b9e78bde502ffe3e) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`7290076`](https://github.com/inspect-js/is-regex/commit/729007606e9ed162953d1f5812c37eb06c554ec2) +- Update `covert`, `jscs`, `eslint`, `semver` [`dabc729`](https://github.com/inspect-js/is-regex/commit/dabc729cfc4458264c6f7642004d41dd5c214bfd) +- Update `eslint` [`a946b05`](https://github.com/inspect-js/is-regex/commit/a946b051159396b4311c564880f96e3d00e8b8e2) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`1744dde`](https://github.com/inspect-js/is-regex/commit/1744dde77526841f216fa2c1c866c5a82b1638c0) +- [Refactor] when try/catch is needed, bail early if the value lacks an own `lastIndex` data property. [`288ad93`](https://github.com/inspect-js/is-regex/commit/288ad93dbfed9f6828de20de67105ee6d6504425) +- Update `editorconfig-tools`, `eslint`, `semver`, `replace` [`4d895c6`](https://github.com/inspect-js/is-regex/commit/4d895c68a0cdbb5803185928963c15147aad0404) +- Update `eslint`, `tape`, `semver` [`f387f03`](https://github.com/inspect-js/is-regex/commit/f387f03b260b56372bfca301d4e79c4067633854) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`55e480f`](https://github.com/inspect-js/is-regex/commit/55e480f407cafb6c21a6c32aef04ccaa3ba4216c) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`89d9528`](https://github.com/inspect-js/is-regex/commit/89d95285b364913ebcd8ac7e0872570fe009a5d3) +- [Dev Deps] update `jscs` [`eb222a8`](https://github.com/inspect-js/is-regex/commit/eb222a8435e59909354f3700fd4880e4ce1cb13e) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`c65429c`](https://github.com/inspect-js/is-regex/commit/c65429cea0366508c10ad2ab773af7b83a34fc81) +- Update `nsp`, `eslint` [`c60fbd8`](https://github.com/inspect-js/is-regex/commit/c60fbd8680f7fb3508ec3c5be8ebb788672516c8) +- Update `eslint`, `semver` [`6a62116`](https://github.com/inspect-js/is-regex/commit/6a621168c63616bf004ca8b1f885b4eb8a58a3e5) +- [Tests] on `node` `v7.5`, `v4.7` [`e764651`](https://github.com/inspect-js/is-regex/commit/e764651336f5da5e239e9fe8869f3a3201c19d2b) +- Test up to `io.js` `v2.1` [`3bf326a`](https://github.com/inspect-js/is-regex/commit/3bf326a9bcd530fd16c9fc806e249a68e25ab7e3) +- Test on the latest `io.js` versions. [`693d047`](https://github.com/inspect-js/is-regex/commit/693d0477631c5d7671f6c99eca5594ffffa75771) +- [Refactor] use an early return instead of a ternary. [`31eaca2`](https://github.com/inspect-js/is-regex/commit/31eaca28b7d0aaac0599fe7a569b93b842f8ab16) +- Test on `io.js` `v2.2` [`c18c55a`](https://github.com/inspect-js/is-regex/commit/c18c55aee6358d70531f935e98851e42b698d93c) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`a1c237d`](https://github.com/inspect-js/is-regex/commit/a1c237d35f880fe0bcbc9275254611a6a2300aaf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`aa3ea0f`](https://github.com/inspect-js/is-regex/commit/aa3ea0f148af31d75f7ef8a800412729d82def04) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`d97831d`](https://github.com/inspect-js/is-regex/commit/d97831d0e2ccd3d00d1f7354b7f81e2575f90953) +- [Dev Deps] Update `tape`, `eslint` [`95e6def`](https://github.com/inspect-js/is-regex/commit/95e6defe3178c45dc9df16e474e558979d5f5c05) +- Update `eslint`, `nsp` [`3844c93`](https://github.com/inspect-js/is-regex/commit/3844c935cfe7c52fae0dc74d27e884c417cb4616) +- Update `tape`, `jscs` [`0d6dac8`](https://github.com/inspect-js/is-regex/commit/0d6dac818ed251910171965932f021291919e770) +- Fix tests for faked @@toStringTag [`2ebef9f`](https://github.com/inspect-js/is-regex/commit/2ebef9f0759843e9a063de7a512b46e3e7daea7e) +- Test up to `io.js` `v3.0` [`ec1d2d4`](https://github.com/inspect-js/is-regex/commit/ec1d2d44481fa0fa11448527da8030c99fe47a12) +- [Refactor] bail earlier when the value is falsy. [`a9e333e`](https://github.com/inspect-js/is-regex/commit/a9e333e2ac8912ca05b7e31d30e4eea683c0da4b) +- [Dev Deps] update `tape` [`8cdcaae`](https://github.com/inspect-js/is-regex/commit/8cdcaae07be8c790cdb99849e6076ea7702a4c84) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`281c4ef`](https://github.com/inspect-js/is-regex/commit/281c4efeb71c86dd380e741bcaee3f7dbf956151) +- Test on `io.js` `v2.4` [`4d54c68`](https://github.com/inspect-js/is-regex/commit/4d54c68a81b5332a3b76259d8aa8f514be5efd13) +- Test on `io.js` `v2.3` [`23170f5`](https://github.com/inspect-js/is-regex/commit/23170f5cae632d0377de73bd2febc53db8aebbc9) +- Test on `iojs-v1.6` [`4487ad0`](https://github.com/inspect-js/is-regex/commit/4487ad0194a5684223bfa2690da4e0a441f7132a) + +## [v1.0.3](https://github.com/inspect-js/is-regex/compare/v1.0.2...v1.0.3) - 2015-01-29 + +### Commits + +- Update npm run scripts. [`dc528dd`](https://github.com/inspect-js/is-regex/commit/dc528dd25e775089bc0a3f5a8f7ae7ffc4cdf52a) +- Add toStringTag tests. [`f48a83a`](https://github.com/inspect-js/is-regex/commit/f48a83a78720b78ab60ca586c16f6f3dbcfec825) +- If @@toStringTag is not present, use the old-school Object#toString test. [`50b0ffd`](https://github.com/inspect-js/is-regex/commit/50b0ffd9c7fdbd54aee8cde1b07e680ae84f6a0d) + +## [v1.0.2](https://github.com/inspect-js/is-regex/compare/v1.0.1...v1.0.2) - 2015-01-29 + +### Commits + +- `make release` [`a1de7ec`](https://github.com/inspect-js/is-regex/commit/a1de7eca4cecc8015fd27804669f8fc61bd16a68) +- Improve optimization by separating the try/catch, and bailing out early when not typeof "object". [`5ab7632`](https://github.com/inspect-js/is-regex/commit/5ab76322a348487fa8b16761e83f6824c3c27d11) + +## [v1.0.1](https://github.com/inspect-js/is-regex/compare/v1.0.0...v1.0.1) - 2015-01-28 + +### Commits + +- Using my standard jscs.json file [`1f1733a`](https://github.com/inspect-js/is-regex/commit/1f1733ac8433cdcceb25356f86b74136a4477cb9) +- Adding `npm run lint` [`51ea70f`](https://github.com/inspect-js/is-regex/commit/51ea70fa7e461d022f611c195f343ea8d0333d71) +- Use RegExp#exec to test if something is a regex, which works even with ES6 @@toStringTag. [`042c8c7`](https://github.com/inspect-js/is-regex/commit/042c8c734faade9015932b61f1e8ea4f3a93b1b3) +- Adding license and downloads badges [`366d619`](https://github.com/inspect-js/is-regex/commit/366d61965d3a4119126e78e09b2166bbcddd0c5a) +- Use SVG badges instead of PNG [`6a32e4f`](https://github.com/inspect-js/is-regex/commit/6a32e4fc87d7d3a3787b800dd033c9293aead6df) +- Update `tape`, `jscs` [`f1b9462`](https://github.com/inspect-js/is-regex/commit/f1b9462f86d1b69de07176e7f277f668757ba964) +- Update `jscs` [`1bff23f`](https://github.com/inspect-js/is-regex/commit/1bff23ff0fe88c8263e8bf04cf99e290af96d5b0) +- Update `tape`, `jscs` [`c22ea2e`](https://github.com/inspect-js/is-regex/commit/c22ea2e7967f45618deed01ff5ea483f918be216) +- Update `tape`, `jscs` [`b0479db`](https://github.com/inspect-js/is-regex/commit/b0479db99a1b1b872d1618fb0a71f0c74a78b29b) +- Use consistent quotes [`1a6e347`](https://github.com/inspect-js/is-regex/commit/1a6e34730d9270f3f20519139faa4c4e6ec2e1f5) +- Make travis builds faster. [`090a4ea`](https://github.com/inspect-js/is-regex/commit/090a4ea7c5fa709d108d596e3bc304e6ce973dec) +- Update `tape` [`7d76129`](https://github.com/inspect-js/is-regex/commit/7d7612928bdd43230fbd835db71797249ca24f35) +- Lock covert to v1.0.0. [`9a90b03`](https://github.com/inspect-js/is-regex/commit/9a90b03fb390e66f874223a34c58ba2bb109edd3) +- Updating tape [`bfbc7f5`](https://github.com/inspect-js/is-regex/commit/bfbc7f593a007acd0411152bbb55f724dc4ca935) +- Updating jscs [`13ad511`](https://github.com/inspect-js/is-regex/commit/13ad511d80cd67300c2c0c5387fc4b3b423e2768) +- Updating jscs [`cda1945`](https://github.com/inspect-js/is-regex/commit/cda1945d603dfe99e24d5a909a931d366451bc4d) +- Updating jscs [`de96c99`](https://github.com/inspect-js/is-regex/commit/de96c99d4bf5787df671de6df9138b6547a6545b) +- Running linter as part of tests [`2cb6567`](https://github.com/inspect-js/is-regex/commit/2cb656733b1ed0af14ad11fb584006d22de0c69d) +- Updating covert [`a56ae74`](https://github.com/inspect-js/is-regex/commit/a56ae74ec8d5f0473295a8b10519a18580f16624) +- Updating tape [`ffe47f7`](https://github.com/inspect-js/is-regex/commit/ffe47f7fe9cf6d16896b4bdc286bd1d0805d5c49) + +## [v1.0.0](https://github.com/inspect-js/is-regex/compare/v0.0.0...v1.0.0) - 2014-05-19 + +### Commits + +- Make sure old and unstable nodes don't break Travis [`05da747`](https://github.com/inspect-js/is-regex/commit/05da7478f960dc131ec3ad864e27e8c6b7d74a80) +- toString is a reserved var name in old Opera [`885c48c`](https://github.com/inspect-js/is-regex/commit/885c48c120f921a55f1842b0607d3e7875379821) +- Updating deps [`2ca0e79`](https://github.com/inspect-js/is-regex/commit/2ca0e79a2443ca34d85e8b2ea2e26f55855b74a7) +- Updating tape. [`9678435`](https://github.com/inspect-js/is-regex/commit/96784355611deb0c23b9064be774216d76e3e457) +- Updating covert [`c3bb898`](https://github.com/inspect-js/is-regex/commit/c3bb8985a422e3e0c81f9c43899b6c19a72c755f) +- Updating tape [`7811708`](https://github.com/inspect-js/is-regex/commit/78117089688258b8f939b397b37897b5b3e30f74) +- Testing on node 0.6 again [`dec36ae`](https://github.com/inspect-js/is-regex/commit/dec36ae58a39a3f80e832b702c3e19406363c160) +- Run code coverage as part of tests [`e6f4ebe`](https://github.com/inspect-js/is-regex/commit/e6f4ebec26894543747603f2cb360e839f2ca290) + +## v0.0.0 - 2014-01-15 + +### Commits + +- package.json [`aa60d43`](https://github.com/inspect-js/is-regex/commit/aa60d43d2c8adb9fdd47f5898e5e1e570bd238d8) +- read me [`861e944`](https://github.com/inspect-js/is-regex/commit/861e944de88e84010eaa662ea9ea9f17c90cff8c) +- Initial commit [`d0cdd71`](https://github.com/inspect-js/is-regex/commit/d0cdd71a637d8490b7ee3eaaf75c7e31d0f9242f) +- Tests. [`b533f74`](https://github.com/inspect-js/is-regex/commit/b533f741a88dff002790fb7af054b2a74e72d4da) +- Implementation. [`3c9a8c0`](https://github.com/inspect-js/is-regex/commit/3c9a8c06994003cdfffeb3620f251f4c4cae7755) +- Travis CI [`742c440`](https://github.com/inspect-js/is-regex/commit/742c4407015f9108875fd108fde137f5245e9e7a) diff --git a/node_modules/is-regex/LICENSE b/node_modules/is-regex/LICENSE new file mode 100644 index 0000000..47b7b50 --- /dev/null +++ b/node_modules/is-regex/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-regex/README.md b/node_modules/is-regex/README.md new file mode 100644 index 0000000..d61332b --- /dev/null +++ b/node_modules/is-regex/README.md @@ -0,0 +1,52 @@ +# is-regex [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS regex? +This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isRegex = require('is-regex'); +var assert = require('assert'); + +assert.notOk(isRegex(undefined)); +assert.notOk(isRegex(null)); +assert.notOk(isRegex(false)); +assert.notOk(isRegex(true)); +assert.notOk(isRegex(42)); +assert.notOk(isRegex('foo')); +assert.notOk(isRegex(function () {})); +assert.notOk(isRegex([])); +assert.notOk(isRegex({})); + +assert.ok(isRegex(/a/g)); +assert.ok(isRegex(new RegExp('a', 'g'))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-regex +[2]: https://versionbadg.es/inspect-js/is-regex.svg +[5]: https://david-dm.org/inspect-js/is-regex.svg +[6]: https://david-dm.org/inspect-js/is-regex +[7]: https://david-dm.org/inspect-js/is-regex/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-regex#info=devDependencies +[11]: https://nodei.co/npm/is-regex.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-regex.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-regex.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-regex +[codecov-image]: https://codecov.io/gh/inspect-js/is-regex/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-regex/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-regex +[actions-url]: https://github.com/inspect-js/is-regex/actions diff --git a/node_modules/is-regex/index.js b/node_modules/is-regex/index.js new file mode 100644 index 0000000..19780f4 --- /dev/null +++ b/node_modules/is-regex/index.js @@ -0,0 +1,58 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var hasToStringTag = require('has-tostringtag/shams')(); +var has; +var $exec; +var isRegexMarker; +var badStringifier; + +if (hasToStringTag) { + has = callBound('Object.prototype.hasOwnProperty'); + $exec = callBound('RegExp.prototype.exec'); + isRegexMarker = {}; + + var throwRegexMarker = function () { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + + if (typeof Symbol.toPrimitive === 'symbol') { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } +} + +var $toString = callBound('Object.prototype.toString'); +var gOPD = Object.getOwnPropertyDescriptor; +var regexClass = '[object RegExp]'; + +module.exports = hasToStringTag + // eslint-disable-next-line consistent-return + ? function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + try { + $exec(value, badStringifier); + } catch (e) { + return e === isRegexMarker; + } + } + : function isRegex(value) { + // In older browsers, typeof regex incorrectly returns 'function' + if (!value || (typeof value !== 'object' && typeof value !== 'function')) { + return false; + } + + return $toString(value) === regexClass; + }; diff --git a/node_modules/is-regex/package.json b/node_modules/is-regex/package.json new file mode 100644 index 0000000..094fd41 --- /dev/null +++ b/node_modules/is-regex/package.json @@ -0,0 +1,86 @@ +{ + "name": "is-regex", + "version": "1.1.4", + "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc node test", + "test:harmony": "nyc node --harmony --es-staging test", + "test:corejs": "nyc tape test-corejs.js", + "posttest": "npx aud --production", + "lint": "eslint .", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-regex.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/is-regex/issues" + }, + "homepage": "https://github.com/inspect-js/is-regex", + "keywords": [ + "regex", + "regexp", + "is", + "regular expression", + "regular", + "expression" + ], + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", + "eclint": "^2.8.1", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-regex/test/index.js b/node_modules/is-regex/test/index.js new file mode 100644 index 0000000..f6c0802 --- /dev/null +++ b/node_modules/is-regex/test/index.js @@ -0,0 +1,104 @@ +'use strict'; + +var hasToStringTag = require('has-tostringtag/shams')(); +var forEach = require('foreach'); +var test = require('tape'); +var isRegex = require('..'); + +test('not regexes', function (t) { + t.notOk(isRegex(), 'undefined is not regex'); + t.notOk(isRegex(null), 'null is not regex'); + t.notOk(isRegex(false), 'false is not regex'); + t.notOk(isRegex(true), 'true is not regex'); + t.notOk(isRegex(42), 'number is not regex'); + t.notOk(isRegex('foo'), 'string is not regex'); + t.notOk(isRegex([]), 'array is not regex'); + t.notOk(isRegex({}), 'object is not regex'); + t.notOk(isRegex(function () {}), 'function is not regex'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var regex = /a/g; + var fakeRegex = { + toString: function () { return String(regex); }, + valueOf: function () { return regex; } + }; + fakeRegex[Symbol.toStringTag] = 'RegExp'; + t.notOk(isRegex(fakeRegex), 'fake RegExp with @@toStringTag "RegExp" is not regex'); + t.end(); +}); + +test('regexes', function (t) { + t.ok(isRegex(/a/g), 'regex literal is regex'); + t.ok(isRegex(new RegExp('a', 'g')), 'regex object is regex'); + t.end(); +}); + +test('does not mutate regexes', function (t) { + t.test('lastIndex is a marker object', function (st) { + var regex = /a/; + var marker = {}; + regex.lastIndex = marker; + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object after isRegex'); + st.end(); + }); + + t.test('lastIndex is nonzero', function (st) { + var regex = /a/; + regex.lastIndex = 3; + st.equal(regex.lastIndex, 3, 'lastIndex is 3'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, 3, 'lastIndex is 3 after isRegex'); + st.end(); + }); + + t.end(); +}); + +test('does not perform operations observable to Proxies', { skip: typeof Proxy !== 'function' }, function (t) { + var Handler = function () { + this.trapCalls = []; + }; + + forEach([ + 'defineProperty', + 'deleteProperty', + 'get', + 'getOwnPropertyDescriptor', + 'getPrototypeOf', + 'has', + 'isExtensible', + 'ownKeys', + 'preventExtensions', + 'set', + 'setPrototypeOf' + ], function (trapName) { + Handler.prototype[trapName] = function () { + this.trapCalls.push(trapName); + return Reflect[trapName].apply(Reflect, arguments); + }; + }); + + t.test('proxy of object', function (st) { + var handler = new Handler(); + var proxy = new Proxy({ lastIndex: 0 }, handler); + + st.equal(isRegex(proxy), false, 'proxy of plain object is not regex'); + st.deepEqual(handler.trapCalls, ['getOwnPropertyDescriptor'], 'no unexpected proxy traps were triggered'); + st.end(); + }); + + t.test('proxy of RegExp instance', function (st) { + var handler = new Handler(); + var proxy = new Proxy(/a/, handler); + + st.equal(isRegex(proxy), false, 'proxy of RegExp instance is not regex'); + st.deepEqual(handler.trapCalls, ['getOwnPropertyDescriptor'], 'no unexpected proxy traps were triggered'); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-shared-array-buffer/.eslintrc b/node_modules/is-shared-array-buffer/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/is-shared-array-buffer/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/is-shared-array-buffer/.github/FUNDING.yml b/node_modules/is-shared-array-buffer/.github/FUNDING.yml new file mode 100644 index 0000000..61db3c4 --- /dev/null +++ b/node_modules/is-shared-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-shared-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-shared-array-buffer/.nycrc b/node_modules/is-shared-array-buffer/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-shared-array-buffer/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-shared-array-buffer/CHANGELOG.md b/node_modules/is-shared-array-buffer/CHANGELOG.md new file mode 100644 index 0000000..fda6c2f --- /dev/null +++ b/node_modules/is-shared-array-buffer/CHANGELOG.md @@ -0,0 +1,61 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.3](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.2...v1.0.3) - 2024-02-20 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`c4131f5`](https://github.com/inspect-js/is-shared-array-buffer/commit/c4131f568b1828c1b5d068871332712f475e6c96) +- add types [`41cb419`](https://github.com/inspect-js/is-shared-array-buffer/commit/41cb41918c2cf423938c767ffc67fd352130f6d1) +- [actions] skip ls check on node < 10; remove redundant finisher [`2655b01`](https://github.com/inspect-js/is-shared-array-buffer/commit/2655b0142c06220a2f7912dc10caab31a465e9bc) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`5917f9a`](https://github.com/inspect-js/is-shared-array-buffer/commit/5917f9ac45800df43d53fb77b1506c6d08e58370) +- [Tests] add tests that TypedArrays are not SABs [`823dd7a`](https://github.com/inspect-js/is-shared-array-buffer/commit/823dd7a0c933efa3abdb2e9ae5c903fe15d6b2fe) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-value-fixtures`, `object-inspect`, `tape` [`6701ad4`](https://github.com/inspect-js/is-shared-array-buffer/commit/6701ad425da15c6557d01744bfe68eaf56fd9ab3) +- [actions] update rebase action to use reusable workflow [`b5119f0`](https://github.com/inspect-js/is-shared-array-buffer/commit/b5119f05ececf1f0f516a38d7f444e3a7174bd43) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`38a6d72`](https://github.com/inspect-js/is-shared-array-buffer/commit/38a6d721588e6e4db83fd24e63b8a19fd4398123) +- [meta] add missing `engines.node` [`aac97e1`](https://github.com/inspect-js/is-shared-array-buffer/commit/aac97e1839f671dbba07941c6d7c4f153918548f) +- [readme] remove dead badges [`07c452d`](https://github.com/inspect-js/is-shared-array-buffer/commit/07c452daa96c1cfe49a428b11da692facb72eb08) +- [Deps] update `call-bind` [`b8576fe`](https://github.com/inspect-js/is-shared-array-buffer/commit/b8576feb56508f3bf43905f5d23f7178c9e1af39) +- [meta] add `sideEffects` flag [`3e6730e`](https://github.com/inspect-js/is-shared-array-buffer/commit/3e6730e0ee3a47cb6d7c2ee8bc34bd61dd8f2455) + +## [v1.0.2](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.1...v1.0.2) - 2022-04-01 + +### Commits + +- [actions] reuse common workflows [`48d01e6`](https://github.com/inspect-js/is-shared-array-buffer/commit/48d01e690f76c92f5c9072fbcb9b6215402db8a7) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7b0e12a`](https://github.com/inspect-js/is-shared-array-buffer/commit/7b0e12a4e8f5db8eac586be68c879119a4a12e7a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`8d57a8e`](https://github.com/inspect-js/is-shared-array-buffer/commit/8d57a8e1d9ce093f04f83e196ca7c80a02617939) +- [readme] update URLs [`dca4d27`](https://github.com/inspect-js/is-shared-array-buffer/commit/dca4d27d35352309da5abb4feb584158004008cf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`2a7bb99`](https://github.com/inspect-js/is-shared-array-buffer/commit/2a7bb990610d7f6c058bdae7f21c49cc7276848f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`389c6db`](https://github.com/inspect-js/is-shared-array-buffer/commit/389c6db4311a85a84fd4cb75646f26023b0c1685) +- [actions] update codecov uploader [`b9661f9`](https://github.com/inspect-js/is-shared-array-buffer/commit/b9661f9ac2e1e002372b9b1e136faca837a6647f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect` [`f99cd48`](https://github.com/inspect-js/is-shared-array-buffer/commit/f99cd4827e23bc893ed711cbffe28f3e51a4d401) +- [readme] add actions and codecov badges [`9515ed2`](https://github.com/inspect-js/is-shared-array-buffer/commit/9515ed2184a3ed1ce913b92b5092884dad5ac794) +- [Fix] add missing `call-bind` dependency [`cff5358`](https://github.com/inspect-js/is-shared-array-buffer/commit/cff53582740f9f053ec67e1acbf2bafc83bdb7b5) +- [meta] add `safe-publish-latest`; use `prepublishOnly` script for npm 7+ [`ba0b719`](https://github.com/inspect-js/is-shared-array-buffer/commit/ba0b7190a42d4290d31a5fce215e874da573dd77) + +## [v1.0.1](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.0...v1.0.1) - 2021-03-04 + +### Commits + +- [readme] fix repo URLs [`37c38f3`](https://github.com/inspect-js/is-shared-array-buffer/commit/37c38f347392da177197dd2fd518b61240a56203) + +## v1.0.0 - 2021-03-04 + +### Commits + +- [Tests] add tests [`9c7b806`](https://github.com/inspect-js/is-shared-array-buffer/commit/9c7b806ab1528814308a7420f8198644f55c916f) +- Initial commit [`4e65c5e`](https://github.com/inspect-js/is-shared-array-buffer/commit/4e65c5ecdaa255162bc6507de4ff98cea2472e3b) +- [meta] do not publish github action workflow files [`ac3693d`](https://github.com/inspect-js/is-shared-array-buffer/commit/ac3693db8ec26db5444ef4b46aa38a81e8841d30) +- readme [`7a984d0`](https://github.com/inspect-js/is-shared-array-buffer/commit/7a984d0db73b77943f6731098134e3351a36793b) +- npm init [`a586c99`](https://github.com/inspect-js/is-shared-array-buffer/commit/a586c99316f3c8ae4fd5125621ea933e97a1bf1b) +- [actions] add automatic rebasing / merge commit blocking [`184fe62`](https://github.com/inspect-js/is-shared-array-buffer/commit/184fe622680d523e89ac322fa1a52dbba46a8fc0) +- Implementation [`207e26d`](https://github.com/inspect-js/is-shared-array-buffer/commit/207e26d1128930f28384cb213b38d69fd52bbd7c) +- [meta] create `FUNDING.yml`; add "funding" field [`3cad3fc`](https://github.com/inspect-js/is-shared-array-buffer/commit/3cad3fc9509f91fbc71e84565529f53a94d538d4) +- [meta] add auto-changelog [`31f1f2c`](https://github.com/inspect-js/is-shared-array-buffer/commit/31f1f2cbcd616d6c09089d62198d5cc775053324) +- [Tests] add `npm run lint` [`2e5146e`](https://github.com/inspect-js/is-shared-array-buffer/commit/2e5146e18f44533382a781fa09a50d4f47caa0e5) +- Only apps should have lockfiles [`7b2adfa`](https://github.com/inspect-js/is-shared-array-buffer/commit/7b2adfad6dcd95271ab6ba34658a9a1a21dbeacf) diff --git a/node_modules/is-shared-array-buffer/LICENSE b/node_modules/is-shared-array-buffer/LICENSE new file mode 100644 index 0000000..7948bc0 --- /dev/null +++ b/node_modules/is-shared-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-shared-array-buffer/README.md b/node_modules/is-shared-array-buffer/README.md new file mode 100644 index 0000000..05e780f --- /dev/null +++ b/node_modules/is-shared-array-buffer/README.md @@ -0,0 +1,56 @@ +# is-shared-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS SharedArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var assert = require('assert'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +assert(!isSharedArrayBuffer(function () {})); +assert(!isSharedArrayBuffer(null)); +assert(!isSharedArrayBuffer(function* () { yield 42; return Infinity; }); +assert(!isSharedArrayBuffer(Symbol('foo'))); +assert(!isSharedArrayBuffer(1n)); +assert(!isSharedArrayBuffer(Object(1n))); + +assert(!isSharedArrayBuffer(new Set())); +assert(!isSharedArrayBuffer(new WeakSet())); +assert(!isSharedArrayBuffer(new Map())); +assert(!isSharedArrayBuffer(new WeakMap())); +assert(!isSharedArrayBuffer(new WeakRef({}))); +assert(!isSharedArrayBuffer(new FinalizationRegistry(() => {}))); +assert(!isSharedArrayBuffer(new ArrayBuffer())); + +assert(isSharedArrayBuffer(new SharedArrayBuffer())); + +class MySharedArrayBuffer extends SharedArrayBuffer {} +assert(isSharedArrayBuffer(new MySharedArrayBuffer())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-shared-array-buffer +[npm-version-svg]: https://versionbadg.es/inspect-js/is-shared-array-buffer.svg +[deps-svg]: https://david-dm.org/inspect-js/is-shared-array-buffer.svg +[deps-url]: https://david-dm.org/inspect-js/is-shared-array-buffer +[dev-deps-svg]: https://david-dm.org/inspect-js/is-shared-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-shared-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-shared-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-shared-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-shared-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-shared-array-buffer +[codecov-image]: https://codecov.io/gh/inspect-js/is-shared-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-shared-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-shared-array-buffer +[actions-url]: https://github.com/inspect-js/is-shared-array-buffer/actions diff --git a/node_modules/is-shared-array-buffer/index.d.ts b/node_modules/is-shared-array-buffer/index.d.ts new file mode 100644 index 0000000..6882145 --- /dev/null +++ b/node_modules/is-shared-array-buffer/index.d.ts @@ -0,0 +1,3 @@ +declare function isSharedArrayBuffer(obj: unknown): obj is SharedArrayBuffer; + +export = isSharedArrayBuffer; \ No newline at end of file diff --git a/node_modules/is-shared-array-buffer/index.js b/node_modules/is-shared-array-buffer/index.js new file mode 100644 index 0000000..7843ab4 --- /dev/null +++ b/node_modules/is-shared-array-buffer/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +/** @type {import('.')} */ +module.exports = $byteLength + ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e) { + return false; + } + } + : function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; diff --git a/node_modules/is-shared-array-buffer/package.json b/node_modules/is-shared-array-buffer/package.json new file mode 100644 index 0000000..4549511 --- /dev/null +++ b/node_modules/is-shared-array-buffer/package.json @@ -0,0 +1,91 @@ +{ + "name": "is-shared-array-buffer", + "version": "1.0.3", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS SharedArrayBuffer?", + "license": "MIT", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only --", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-shared-array-buffer.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "is", + "sharedarraybuffer", + "shared", + "array", + "buffer" + ], + "bugs": { + "url": "https://github.com/inspect-js/is-shared-array-buffer/issues" + }, + "homepage": "https://github.com/inspect-js/is-shared-array-buffer#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/node": "^20.11.19", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.7", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.7" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/is-shared-array-buffer/test/index.js b/node_modules/is-shared-array-buffer/test/index.js new file mode 100644 index 0000000..8fd9227 --- /dev/null +++ b/node_modules/is-shared-array-buffer/test/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var availableTypedArrays = require('available-typed-arrays')(); + +var isSharedArrayBuffer = require('..'); + +test('isSharedArrayBuffer', function (t) { + t.equal(typeof isSharedArrayBuffer, 'function', 'is a function'); + + // @ts-expect-error TS sucks with concat + var nonSABs = [].concat(v.primitives, v.objects); + forEach(nonSABs, function (nonSAB) { + t.equal(isSharedArrayBuffer(nonSAB), false, inspect(nonSAB) + ' is not a SharedArrayBuffer'); + }); + + t.test('actual SharedArrayBuffer instances', { skip: typeof SharedArrayBuffer === 'undefined' }, function (st) { + var sab = new SharedArrayBuffer(0); + + st.equal(isSharedArrayBuffer(sab), true, inspect(sab) + ' is a SharedArrayBuffer'); + + st.end(); + }); + + t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) { + forEach(availableTypedArrays, function (TypedArray) { + var ta = new global[TypedArray](0); + st.equal(isSharedArrayBuffer(ta.buffer), false, inspect(ta.buffer) + ', the TA\'s buffer, is not a SharedArrayBuffer'); + st.equal(isSharedArrayBuffer(ta), false, inspect(ta) + ' is not a SharedArrayBuffer'); + }); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-shared-array-buffer/tsconfig.json b/node_modules/is-shared-array-buffer/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/is-shared-array-buffer/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/is-string/.eslintignore b/node_modules/is-string/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/is-string/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-string/.eslintrc b/node_modules/is-string/.eslintrc new file mode 100644 index 0000000..5bf1191 --- /dev/null +++ b/node_modules/is-string/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "max-statements": [2, 15] + }, + + "overrides": [ + { + "files": ["test.js"], + "rules": { + "no-magic-numbers": 0, + }, + }, + ], +} diff --git a/node_modules/is-string/.github/FUNDING.yml b/node_modules/is-string/.github/FUNDING.yml new file mode 100644 index 0000000..519746b --- /dev/null +++ b/node_modules/is-string/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-string +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-string/.nycrc b/node_modules/is-string/.nycrc new file mode 100644 index 0000000..a69aa2d --- /dev/null +++ b/node_modules/is-string/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test", + "test-corejs.js" + ] +} diff --git a/node_modules/is-string/CHANGELOG.md b/node_modules/is-string/CHANGELOG.md new file mode 100644 index 0000000..6f62043 --- /dev/null +++ b/node_modules/is-string/CHANGELOG.md @@ -0,0 +1,114 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +## [v1.0.7](https://github.com/inspect-js/is-string/compare/v1.0.6...v1.0.7) - 2021-08-05 + +### Commits + +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`d973ffd`](https://github.com/inspect-js/is-string/commit/d973ffd2268e10c0e2cd4f0c57ecf8ce0a8d8578) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4bfaabf`](https://github.com/inspect-js/is-string/commit/4bfaabf877e874ca21d2c44be26f13add8ee2761) + +## [v1.0.6](https://github.com/inspect-js/is-string/compare/v1.0.5...v1.0.6) - 2021-05-07 + +### Commits + +- [Tests] migrate tests to Github Actions [`c7790c8`](https://github.com/inspect-js/is-string/commit/c7790c89e5077251fe7ca32ac29eeee02f1b2751) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`1e52bbd`](https://github.com/inspect-js/is-string/commit/1e52bbd19b1608f6932c0335d9981824584c3186) +- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`83337eb`](https://github.com/inspect-js/is-string/commit/83337ebf55308b7bb9c1befae420760e0f8d8016) +- [meta] do not publish github action workflow files [`b25aea2`](https://github.com/inspect-js/is-string/commit/b25aea2e8a53ed9e9090cf96481590cdc00a0957) +- [readme] update badges [`759ccd9`](https://github.com/inspect-js/is-string/commit/759ccd94de4a2000231a179f91af6b5c12c11e00) +- [Tests] run `nyc` on all tests [`dc02f70`](https://github.com/inspect-js/is-string/commit/dc02f7080c355f0d24368c1622db09f7cc30cdbd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape`; add `aud` [`a0f76fa`](https://github.com/inspect-js/is-string/commit/a0f76fa1990bb580948f9e2daa89bdcda3fae7f0) +- [actions] add "Allow Edits" workflow [`9ec3902`](https://github.com/inspect-js/is-string/commit/9ec390295b4faef7744d2b579c1050be66168cb7) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`57fbe21`](https://github.com/inspect-js/is-string/commit/57fbe215da83a3b601855a9c6543ad1a96de5702) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`191e55f`](https://github.com/inspect-js/is-string/commit/191e55ff1fa782654ffcce2df922e23345b56690) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`1ea2b81`](https://github.com/inspect-js/is-string/commit/1ea2b81e866775a7890e75c44c742204124aa354) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`105d1b9`](https://github.com/inspect-js/is-string/commit/105d1b9851e366ef23c2a27d4064e0d36da25939) +- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`114cfad`](https://github.com/inspect-js/is-string/commit/114cfad854d8860421f847cd99a3bdb8ef1353dc) +- [meta] use `prepublishOnly` script for npm 7+ [`fc38f26`](https://github.com/inspect-js/is-string/commit/fc38f26adb486f50880c5771d145ab2bffb6247a) +- [meta] gitignore coverage output [`3419127`](https://github.com/inspect-js/is-string/commit/34191278f1fa09ba4da801a6fd7a32e31050e759) +- [actions] update rebase action to use checkout v2 [`334eca0`](https://github.com/inspect-js/is-string/commit/334eca02d40f4cf7dc15a8e7d5ff06852028abb5) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`7a332e9`](https://github.com/inspect-js/is-string/commit/7a332e963f1ab717fafa671e0fa8a1b20c53d861) +- [meta] remove explicit audit level config [`04630b1`](https://github.com/inspect-js/is-string/commit/04630b1b535084322ddeae8efb79a8810d7cf325) + +## [v1.0.5](https://github.com/inspect-js/is-string/compare/v1.0.4...v1.0.5) - 2019-12-18 + +### Commits + +- [Tests] use shared travis-ci configs [`4121d6b`](https://github.com/inspect-js/is-string/commit/4121d6b168ae1d54a81791ee6877f9813cab6253) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`e7a3e89`](https://github.com/inspect-js/is-string/commit/e7a3e89ccb9638d73f45dbcb2a42e509bd3153c4) +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`6c380a7`](https://github.com/inspect-js/is-string/commit/6c380a70011714370e754fa0df95f56cdcaa3e60) +- [Tests] remove `jscs` [`3d49592`](https://github.com/inspect-js/is-string/commit/3d49592b9880fcb1a23b67286445281131a553e3) +- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `eslint`, `nsp`, `semver`. [`cc6983d`](https://github.com/inspect-js/is-string/commit/cc6983d06bc98f4ae9b7c9439d5d73c7318d8acd) +- [meta] add `auto-changelog` [`b857897`](https://github.com/inspect-js/is-string/commit/b85789723ce3a7064536598e0fcdd495257c6134) +- [meta] remove unused Makefile and associated utilities [`3f0f51c`](https://github.com/inspect-js/is-string/commit/3f0f51cbae1f97dbe1466eee88d105b3df0d2f0a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `covert`, `tape`, `semver` [`9d4a95e`](https://github.com/inspect-js/is-string/commit/9d4a95e4473fe8195501878525b5af5948aa45c9) +- Update `eslint` [`e861b4b`](https://github.com/inspect-js/is-string/commit/e861b4bc71f5390670aebdff91119a1f8aeeb88a) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`172e2dd`](https://github.com/inspect-js/is-string/commit/172e2dd1a0b9eb042bcb9a80ff5e774a90ff0695) +- Test on `node` and `io.js` latest. [`fd426cd`](https://github.com/inspect-js/is-string/commit/fd426cd18b22b0d0e1731598125393dcfe0c5704) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`23bdf83`](https://github.com/inspect-js/is-string/commit/23bdf83cf42138eba09f45bd0b040b069f9839d4) +- [actions] add automatic rebasing / merge commit blocking [`96153c0`](https://github.com/inspect-js/is-string/commit/96153c0d687a7fda2261f4c02add5d0b41e8aed7) +- [meta] create FUNDING.yml [`66ae246`](https://github.com/inspect-js/is-string/commit/66ae246d6cdaa4ccbc21f7c144b672139b8ccef6) +- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`817361a`](https://github.com/inspect-js/is-string/commit/817361a9673cd1ec9854b52578a980159f7d8701) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `tape` [`fc35d3f`](https://github.com/inspect-js/is-string/commit/fc35d3feb40921bb22e1639903cb7f2fab77814b) +- [Dev Deps] update `jscs` [`886767e`](https://github.com/inspect-js/is-string/commit/886767e04e5ad59ac0bc926a87233cc8546c8b4f) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`3410922`](https://github.com/inspect-js/is-string/commit/341092203c11a3b92eee55a7ecb7b8265e8fcecd) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`4d6c73b`](https://github.com/inspect-js/is-string/commit/4d6c73b507bcd39050ef71e554069f72fc5b222a) +- Update `nsp`, `eslint` [`b11de49`](https://github.com/inspect-js/is-string/commit/b11de4910beee1ffe1e67fbe25ec6707ca796b27) +- Update `eslint`, `semver` [`0777977`](https://github.com/inspect-js/is-string/commit/0777977757a85a1db75831d03a14b4b1fde05d7e) +- Only apps should have lockfiles [`78b49ff`](https://github.com/inspect-js/is-string/commit/78b49ffd04d4cd8c57d9e7b485421fbf3641b41b) +- [meta] add `funding` field [`81328a6`](https://github.com/inspect-js/is-string/commit/81328a6ef3eee989164127e4c0c82f1da73d3567) +- [Dev Deps] update `eslint`, `tape` [`fc9a225`](https://github.com/inspect-js/is-string/commit/fc9a225b27935f7c9c2704281d7fddd3614d3cb8) +- [Tests] use `eclint` instead of `editorconfig-tools` [`59c2c61`](https://github.com/inspect-js/is-string/commit/59c2c610dbd8e8ca1e4aa3fa9c9f93205cab9b07) +- [Dev Deps] Update `tape`, `eslint` [`a429816`](https://github.com/inspect-js/is-string/commit/a429816688e23c81948b4ae72324c26c27849b7c) +- Test on `io.js` `v2.2` [`08b476e`](https://github.com/inspect-js/is-string/commit/08b476ed0734a70e3091c04ddd2f173a2df21eb2) +- Test up to `io.js` `v3.0` [`22637ef`](https://github.com/inspect-js/is-string/commit/22637ef9e0030533df85cf1992fc099a88b1924c) +- [meta] add `safe-publish-latest` [`20ccb48`](https://github.com/inspect-js/is-string/commit/20ccb48fd85f0245eb893507d00003090da020d0) +- [Dev Deps] update `tape` [`06b58a0`](https://github.com/inspect-js/is-string/commit/06b58a048c2a820e5611ad2bd9ddfbe893295a57) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`ea7cf84`](https://github.com/inspect-js/is-string/commit/ea7cf849b952c924d1687a302098251a7b827c80) +- Test on `io.js` `v2.4` [`66ec3ea`](https://github.com/inspect-js/is-string/commit/66ec3ea390b364583a792799b53857fd186ccc88) +- Test on `io.js` `v2.3` [`ca6e796`](https://github.com/inspect-js/is-string/commit/ca6e796f16ec433b88962162fde8012f28e18f1e) +- Fix tests for faked @@toStringTag [`3cce832`](https://github.com/inspect-js/is-string/commit/3cce8329133dfd233987359df151018b3b136be1) + +## [v1.0.4](https://github.com/inspect-js/is-string/compare/v1.0.3...v1.0.4) - 2015-01-29 + +### Commits + +- If @@toStringTag is not present, use the old-school Object#toString test. [`30675ec`](https://github.com/inspect-js/is-string/commit/30675ecb5c5cc43873918661a414a1d0f8b77325) + +## [v1.0.3](https://github.com/inspect-js/is-string/compare/v1.0.2...v1.0.3) - 2015-01-29 + +### Commits + +- Refactor to aid optimization of non-try/catch code. [`9b2772a`](https://github.com/inspect-js/is-string/commit/9b2772abe09ba8cbaa631322cc226ee906d2db22) + +## [v1.0.2](https://github.com/inspect-js/is-string/compare/v1.0.1...v1.0.2) - 2015-01-29 + +### Commits + +- Fix broken package.json [`dc921d3`](https://github.com/inspect-js/is-string/commit/dc921d332b64e4041162f04e4712b0dc687863a5) + +## [v1.0.1](https://github.com/inspect-js/is-string/compare/v1.0.0...v1.0.1) - 2015-01-29 + +### Commits + +- Fix eslint config. [`c4e05bd`](https://github.com/inspect-js/is-string/commit/c4e05bd171da6002d432e451fd48912db8b048e0) +- Add early exits for typeof "string", or typeof not "object". [`82f41d3`](https://github.com/inspect-js/is-string/commit/82f41d36a599bc6a06152792c84c7683e412c513) + +## v1.0.0 - 2015-01-29 + +### Commits + +- Dotfiles. [`45bc9dd`](https://github.com/inspect-js/is-string/commit/45bc9dd60201722344986a6c7536be9ea9ccefbf) +- `make release` [`23707f5`](https://github.com/inspect-js/is-string/commit/23707f5ecfdf00afb0e57c06ac07f7f49cdeb606) +- package.json [`575ad81`](https://github.com/inspect-js/is-string/commit/575ad811c61b156cfbcc60ff61947183c6ebe6a2) +- Read me [`3f67c9a`](https://github.com/inspect-js/is-string/commit/3f67c9a0725f811845d38646a19322895cd03981) +- Initial commit [`2c26a7a`](https://github.com/inspect-js/is-string/commit/2c26a7a2e41dec77be2c59d5847f29a6ab7c0b29) +- Tests. [`38c987b`](https://github.com/inspect-js/is-string/commit/38c987b8513b0ac03b0897e0fce7de8135d4ee0f) +- Implementation. [`0471d59`](https://github.com/inspect-js/is-string/commit/0471d59078d7f3f77619913ec21c57c0af27114c) diff --git a/node_modules/is-string/LICENSE b/node_modules/is-string/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/is-string/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-string/README.md b/node_modules/is-string/README.md new file mode 100644 index 0000000..d9d7edf --- /dev/null +++ b/node_modules/is-string/README.md @@ -0,0 +1,56 @@ +# is-string [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isString = require('is-string'); +var assert = require('assert'); + +assert.notOk(isString(undefined)); +assert.notOk(isString(null)); +assert.notOk(isString(false)); +assert.notOk(isString(true)); +assert.notOk(isString(function () {})); +assert.notOk(isString([])); +assert.notOk(isString({})); +assert.notOk(isString(/a/g)); +assert.notOk(isString(new RegExp('a', 'g'))); +assert.notOk(isString(new Date())); +assert.notOk(isString(42)); +assert.notOk(isString(NaN)); +assert.notOk(isString(Infinity)); +assert.notOk(isString(new Number(42))); + +assert.ok(isString('foo')); +assert.ok(isString(Object('foo'))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-string +[2]: https://versionbadg.es/inspect-js/is-string.svg +[5]: https://david-dm.org/inspect-js/is-string.svg +[6]: https://david-dm.org/inspect-js/is-string +[7]: https://david-dm.org/inspect-js/is-string/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-string#info=devDependencies +[11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-string.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-string.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-string +[codecov-image]: https://codecov.io/gh/inspect-js/is-string/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-string/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-string +[actions-url]: https://github.com/inspect-js/is-string/actions diff --git a/node_modules/is-string/index.js b/node_modules/is-string/index.js new file mode 100644 index 0000000..f44f7bb --- /dev/null +++ b/node_modules/is-string/index.js @@ -0,0 +1,24 @@ +'use strict'; + +var strValue = String.prototype.valueOf; +var tryStringObject = function tryStringObject(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var strClass = '[object String]'; +var hasToStringTag = require('has-tostringtag/shams')(); + +module.exports = function isString(value) { + if (typeof value === 'string') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; +}; diff --git a/node_modules/is-string/package.json b/node_modules/is-string/package.json new file mode 100644 index 0000000..9b36548 --- /dev/null +++ b/node_modules/is-string/package.json @@ -0,0 +1,81 @@ +{ + "name": "is-string", + "version": "1.0.7", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test:corejs": "nyc tape test-corejs.js", + "test": "npm run tests-only && npm run test:corejs", + "posttest": "npx aud --production", + "lint": "eslint .", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-string.git" + }, + "keywords": [ + "String", + "string", + "ES6", + "toStringTag", + "@@toStringTag", + "String object" + ], + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", + "eclint": "^2.8.1", + "eslint": "^7.32.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + } +} diff --git a/node_modules/is-string/test/index.js b/node_modules/is-string/test/index.js new file mode 100644 index 0000000..5239dfa --- /dev/null +++ b/node_modules/is-string/test/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var test = require('tape'); +var isString = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('not Strings', function (t) { + t.notOk(isString(), 'undefined is not String'); + t.notOk(isString(null), 'null is not String'); + t.notOk(isString(false), 'false is not String'); + t.notOk(isString(true), 'true is not String'); + t.notOk(isString([]), 'array is not String'); + t.notOk(isString({}), 'object is not String'); + t.notOk(isString(function () {}), 'function is not String'); + t.notOk(isString(/a/g), 'regex literal is not String'); + t.notOk(isString(new RegExp('a', 'g')), 'regex object is not String'); + t.notOk(isString(new Date()), 'new Date() is not String'); + t.notOk(isString(42), 'number is not String'); + t.notOk(isString(Object(42)), 'number object is not String'); + t.notOk(isString(NaN), 'NaN is not String'); + t.notOk(isString(Infinity), 'Infinity is not String'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var fakeString = { + toString: function () { return '7'; }, + valueOf: function () { return '42'; } + }; + fakeString[Symbol.toStringTag] = 'String'; + t.notOk(isString(fakeString), 'fake String with @@toStringTag "String" is not String'); + t.end(); +}); + +test('Strings', function (t) { + t.ok(isString('foo'), 'string primitive is String'); + t.ok(isString(Object('foo')), 'string object is String'); + t.end(); +}); diff --git a/node_modules/is-symbol/.editorconfig b/node_modules/is-symbol/.editorconfig new file mode 100644 index 0000000..eaa2141 --- /dev/null +++ b/node_modules/is-symbol/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/is-symbol/.eslintignore b/node_modules/is-symbol/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/is-symbol/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-symbol/.eslintrc b/node_modules/is-symbol/.eslintrc new file mode 100644 index 0000000..046dd07 --- /dev/null +++ b/node_modules/is-symbol/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "overrides": [ + { + "files": "test/**", + "rules": { + "no-restricted-properties": 0, + }, + }, + ], +} diff --git a/node_modules/is-symbol/.github/FUNDING.yml b/node_modules/is-symbol/.github/FUNDING.yml new file mode 100644 index 0000000..a65600e --- /dev/null +++ b/node_modules/is-symbol/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-symbol +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-symbol/.nycrc b/node_modules/is-symbol/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-symbol/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-symbol/CHANGELOG.md b/node_modules/is-symbol/CHANGELOG.md new file mode 100644 index 0000000..ce8dd99 --- /dev/null +++ b/node_modules/is-symbol/CHANGELOG.md @@ -0,0 +1,113 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/inspect-js/is-symbol/compare/v1.0.3...v1.0.4) - 2021-05-08 + +### Commits + +- [Tests] migrate tests to Github Actions [`997d43c`](https://github.com/inspect-js/is-symbol/commit/997d43c091d1f8d3a2b3d7dfb17a73cdc5a75dde) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`fe0ccb7`](https://github.com/inspect-js/is-symbol/commit/fe0ccb7b7b64e74e095ef782dcc1d24d6c4b0be4) +- [meta] remove unused Makefile and associated utilities [`3ab2748`](https://github.com/inspect-js/is-symbol/commit/3ab2748ab6c2de21fc24f131bb880c68ba0b7b34) +- [meta] do not publish github action workflow files [`f20fafe`](https://github.com/inspect-js/is-symbol/commit/f20fafeb21585c7b4871ea19f104fd7696734fe8) +- [Tests] run `nyc` on all tests [`5c332fc`](https://github.com/inspect-js/is-symbol/commit/5c332fc92cecbed4a2041bc0c52b991b4a593f34) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c5a58a8`](https://github.com/inspect-js/is-symbol/commit/c5a58a8bea390a9b02e1c8c4aac30c223370297b) +- [readme] fix repo URLs; remove travis badge [`bcd9258`](https://github.com/inspect-js/is-symbol/commit/bcd9258d161fe709148fcc47962df3372c544727) +- [actions] add "Allow Edits" workflow [`33ae2d3`](https://github.com/inspect-js/is-symbol/commit/33ae2d3940e9daa6003a84c232874ee558b2fb44) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`e53def0`](https://github.com/inspect-js/is-symbol/commit/e53def0b77c38cbfae87fd8bbfd78953b845ea94) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect` [`ae36504`](https://github.com/inspect-js/is-symbol/commit/ae365048c0c1b13457faa78658b80561f5a0bcd0) +- [readme] add actions and codecov badges [`aae7f09`](https://github.com/inspect-js/is-symbol/commit/aae7f09bd59d36df69d3b66d9b351c39fe072330) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`d993fae`](https://github.com/inspect-js/is-symbol/commit/d993fae6d89856d4ab7818874be597249cb8a8cc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`51808a5`](https://github.com/inspect-js/is-symbol/commit/51808a55f272023201f40a59b2459ec6305bf73a) +- [Dev Deps] update `auto-changelog`, `tape` [`c90040f`](https://github.com/inspect-js/is-symbol/commit/c90040f0aeded8d0071a78d5cd593b385f8828ee) +- [Dev Deps] update `eslint`, `tape` [`9fee159`](https://github.com/inspect-js/is-symbol/commit/9fee159403d499a5ed2f5cb5db03747d09ab1766) +- [meta] use `prepublishOnly` script for npm 7+ [`b166afc`](https://github.com/inspect-js/is-symbol/commit/b166afc3ae3c6d11721a9558ddb112a28261688d) +- [meta] gitignore coverage output [`4a0fe3a`](https://github.com/inspect-js/is-symbol/commit/4a0fe3aa074b933074fcc231ce739005e1fec195) +- [actions] update workflows [`fbcbc9e`](https://github.com/inspect-js/is-symbol/commit/fbcbc9eb5bfe2cf9a77d5bd86bb1dece8e5f81d0) +- [Dev Deps] update `auto-changelog`; add `aud` [`e66ab98`](https://github.com/inspect-js/is-symbol/commit/e66ab989e48b81b48bd443d35dba0071950c5d7a) +- [Deps] update `has-symbols` [`6ce7de5`](https://github.com/inspect-js/is-symbol/commit/6ce7de53c866c068de2c28d97b3a64cf6d5f6a76) +- [actions] update rebase action to use checkout v2 [`1173c79`](https://github.com/inspect-js/is-symbol/commit/1173c79914076d73aec9aebc22dce4122e7bd3ae) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`94a6348`](https://github.com/inspect-js/is-symbol/commit/94a6348f6274eac9bf4c5a6057b4f6120fc7d1d1) +- [Tests] only audit prod deps [`0692681`](https://github.com/inspect-js/is-symbol/commit/06926811fa029fe0fded5d0af4553a7808c143d1) +- [meta] do not publish .nvmrc file [`ed47833`](https://github.com/inspect-js/is-symbol/commit/ed478333c72384f8dbeb51e5fd501238f52a4972) + +## [v1.0.3](https://github.com/inspect-js/is-symbol/compare/v1.0.2...v1.0.3) - 2019-11-20 + +### Commits + +- [Tests] use shared travis-ci configs [`034afdd`](https://github.com/inspect-js/is-symbol/commit/034afdd677c1b72b76751f3e5131acc927a32916) +- [Tests] remove `jscs` [`0c026a0`](https://github.com/inspect-js/is-symbol/commit/0c026a06815e46a33a8a5b4b1be8965d32d38e5c) +- [meta] add `auto-changelog` [`9a1776b`](https://github.com/inspect-js/is-symbol/commit/9a1776bb49f3e6ac12a5b3a447edcc651216891b) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`23a6db4`](https://github.com/inspect-js/is-symbol/commit/23a6db49a338d19eab19d876745513820bb6a9dc) +- [Tests] up to `node` `v11.7`, `v10.15`, `v8.15`, `v6.16` [`892d92e`](https://github.com/inspect-js/is-symbol/commit/892d92e7c40f3c0577583a98134106181c38bb7e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `tape` [`c2e6d6a`](https://github.com/inspect-js/is-symbol/commit/c2e6d6a71f839522bbd124b7419f5fc42ffff6d3) +- [readme] fix repo URLs [`655c288`](https://github.com/inspect-js/is-symbol/commit/655c288a815856e647dba4b6049b1743cec3533c) +- [actions] add automatic rebasing / merge commit blocking [`97b1229`](https://github.com/inspect-js/is-symbol/commit/97b12296bf8fa1ce0c6121bf3de56c413da10aae) +- [meta] add FUNDING.yml [`94c64a3`](https://github.com/inspect-js/is-symbol/commit/94c64a367a1c34f960cf6007fc65cfbbcba34ba3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape`, `semver` [`71ab543`](https://github.com/inspect-js/is-symbol/commit/71ab543e09b820378362f4f66248addd410c6388) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `tape` [`c6212f9`](https://github.com/inspect-js/is-symbol/commit/c6212f94e28622c94bb37189ffc241ee88b5b1dd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `object-inspect` [`91bc802`](https://github.com/inspect-js/is-symbol/commit/91bc802e18e63f4e8230ee0148302ce849e2f733) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`8cbe69c`](https://github.com/inspect-js/is-symbol/commit/8cbe69c3fafe9cfbe7d27f710c88d02d2d2c6a00) +- [Tests] use `npm audit` instead of `nsp` [`741b51d`](https://github.com/inspect-js/is-symbol/commit/741b51dac868f6b22736c204910d257bcf4d5044) +- [meta] add `funding` field [`65b58d1`](https://github.com/inspect-js/is-symbol/commit/65b58d1e9fc572712d462d615e6b2418627d8fb9) +- [Deps] update `has-symbols` [`9cb5b2a`](https://github.com/inspect-js/is-symbol/commit/9cb5b2a9a3b89e8e0246be8df4fff3f5ceac7309) + +## [v1.0.2](https://github.com/inspect-js/is-symbol/compare/v1.0.1...v1.0.2) - 2018-09-20 + +### Commits + +- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`e86aaea`](https://github.com/inspect-js/is-symbol/commit/e86aaea8d81356801ecfc60540523e9b809a55f4) +- [Tests] on all node minors; improve test matrix [`50bc07f`](https://github.com/inspect-js/is-symbol/commit/50bc07f2ff73e5499b02a61f0a00ea48a84ae213) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `semver`, `eslint`, `@ljharb/eslint-config` [`45e17bd`](https://github.com/inspect-js/is-symbol/commit/45e17bdf145846f30122348a94c5e506b90836ba) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`44402cb`](https://github.com/inspect-js/is-symbol/commit/44402cb82d4499e947b48b31b14667d1ebe7e2b4) +- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`, `v4.8`; improve matrix; old npm breaks on newer nodes [`9047c23`](https://github.com/inspect-js/is-symbol/commit/9047c232857ecb80551a21cc0b1cc4c91d28da1f) +- Update `tape`, `covert`, `jscs`, `semver` [`d57d1ce`](https://github.com/inspect-js/is-symbol/commit/d57d1ce3fc0b740885a1ed5c0738d4a27b29ab07) +- Add `npm run eslint` [`0d75a66`](https://github.com/inspect-js/is-symbol/commit/0d75a6638ad6f7ff7d5bc958531a6328fb13e3fe) +- Update `eslint` [`042fb3a`](https://github.com/inspect-js/is-symbol/commit/042fb3aec590f0c0d205b15812b285ad95cfff6b) +- [Refactor] use `has-symbols` and `object-inspect` [`129bc68`](https://github.com/inspect-js/is-symbol/commit/129bc68dd619b789b9956ac9b63b46257ee1060c) +- [Tests] up to `node` `v10.11`, `v8.12` [`c1822e8`](https://github.com/inspect-js/is-symbol/commit/c1822e84d6cc0cee9f1c2893e91b1aa999ad41db) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`089d2cf`](https://github.com/inspect-js/is-symbol/commit/089d2cf7cad87b75aa534769af11524ad2e79080) +- [Tests] up to `node` `v8.4`; newer npm breaks on older node [`05ce701`](https://github.com/inspect-js/is-symbol/commit/05ce701e3c1be8b3266ffac49806832e410491c1) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`241e6a6`](https://github.com/inspect-js/is-symbol/commit/241e6a655c0e19e9dcf0ae88e7fddd4cde394c5c) +- Test on latest `node` and `io.js` versions. [`5c8d5de`](https://github.com/inspect-js/is-symbol/commit/5c8d5deb9b7c01a8cdf959082a3d619c19751b0a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` [`06047bf`](https://github.com/inspect-js/is-symbol/commit/06047bf72b20a66c0b455e80856b2d00b1910391) +- [Dev Deps] update `jscs`, `nsp`, `semver`, `eslint`, `@ljharb/eslint-config` [`9d25dd7`](https://github.com/inspect-js/is-symbol/commit/9d25dd79347c89f98207a3bad39f667f1f8a410e) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`ce173bd`](https://github.com/inspect-js/is-symbol/commit/ce173bda6e146907e3061a0e70463107d955de35) +- Update `nsp`, `eslint` [`29e5214`](https://github.com/inspect-js/is-symbol/commit/29e52140fac2049b4a32e175787bb3b184a1dd72) +- Update `semver`, `eslint` [`53be884`](https://github.com/inspect-js/is-symbol/commit/53be884c2811f7a4452581003d9cdaf6f9bddd3c) +- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`3bd149c`](https://github.com/inspect-js/is-symbol/commit/3bd149c869c099b07104b06c0692755a01f8298c) +- [Dev Deps] update `jscs` [`69b4231`](https://github.com/inspect-js/is-symbol/commit/69b4231632b170e5ddb350db2f0c59e6cad6f548) +- Test up to `io.js` `v2.1` [`0b61ac7`](https://github.com/inspect-js/is-symbol/commit/0b61ac7ac4de390296aeefb9395549592ea87da4) +- [Dev Deps] update `tape` [`5e1b200`](https://github.com/inspect-js/is-symbol/commit/5e1b2008c910bcdabee299a1ac599143ea07c3f9) +- Only apps should have lockfiles. [`a191ff5`](https://github.com/inspect-js/is-symbol/commit/a191ff5f0320fc16db42fdaa40f0c21d4326255e) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`97c87ef`](https://github.com/inspect-js/is-symbol/commit/97c87ef52b966f211e231092a54ef6ed05c99a26) +- Test on `io.js` `v2.2` [`42560e4`](https://github.com/inspect-js/is-symbol/commit/42560e466e17cbbb9fa71c0121f4bbbcf266c887) +- [Dev Deps] Update `tape`, `eslint` [`149b2f2`](https://github.com/inspect-js/is-symbol/commit/149b2f20bde92b2da12ccfeb8988beb2dc95c37c) +- [Tests] fix test messages [`28bd1ed`](https://github.com/inspect-js/is-symbol/commit/28bd1eda310590e13ada19cbd718c85c25d8a0c5) +- Test up to `io.js` `v3.0` [`c0dcc98`](https://github.com/inspect-js/is-symbol/commit/c0dcc98313d17151ec043e5452df306618be865e) +- `node` now supports Symbols now. [`d1853ad`](https://github.com/inspect-js/is-symbol/commit/d1853adf6369ab9d4c4516bdb032c2e42f52f90a) +- [Dev Deps] update `tape` [`f7a6575`](https://github.com/inspect-js/is-symbol/commit/f7a6575fbdef13abcc412c63d22b56943ed85969) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`aae9c6a`](https://github.com/inspect-js/is-symbol/commit/aae9c6a724578659976ea74e11ec9fe35608607b) +- Test on `io.js` `v2.4` [`ab8f449`](https://github.com/inspect-js/is-symbol/commit/ab8f4492115270cc00a479915b02ac1bac75dfed) +- Test on `io.js` `v2.3` [`58ce871`](https://github.com/inspect-js/is-symbol/commit/58ce871674e857955b333aa057eeecd68b40e988) + +## [v1.0.1](https://github.com/inspect-js/is-symbol/compare/v1.0.0...v1.0.1) - 2015-01-26 + +### Commits + +- Correct package description. [`f4d15b9`](https://github.com/inspect-js/is-symbol/commit/f4d15b928b4b754b097a84f7c3ceac73c486aceb) + +## v1.0.0 - 2015-01-24 + +### Commits + +- Dotfiles. [`5d9a744`](https://github.com/inspect-js/is-symbol/commit/5d9a7441f724630070e9bd74a995191cafa1064b) +- Tests. [`8af5663`](https://github.com/inspect-js/is-symbol/commit/8af56631950dcee48b36f517837273193a6ba119) +- `make release` [`6293446`](https://github.com/inspect-js/is-symbol/commit/629344654a72e7fc8059607d6a86c64b002c3e5d) +- package.json [`7d4082c`](https://github.com/inspect-js/is-symbol/commit/7d4082ca9502118e70d24f526704d45a1a7f2067) +- Initial commit [`cbb179f`](https://github.com/inspect-js/is-symbol/commit/cbb179f677bd3dcb56ac5e3f0a7a9af503fd8952) +- Read me. [`099a775`](https://github.com/inspect-js/is-symbol/commit/099a775e7e751706283ae1cab7a8635c094773a9) +- Implementation. [`cb51248`](https://github.com/inspect-js/is-symbol/commit/cb51248eedaf55e0b8ad7dacdab179db2d76e96e) diff --git a/node_modules/is-symbol/LICENSE b/node_modules/is-symbol/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/is-symbol/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-symbol/README.md b/node_modules/is-symbol/README.md new file mode 100644 index 0000000..5432594 --- /dev/null +++ b/node_modules/is-symbol/README.md @@ -0,0 +1,45 @@ +# is-symbol [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this an ES6 Symbol value? + +## Example + +```js +var isSymbol = require('is-symbol'); +assert(!isSymbol(function () {})); +assert(!isSymbol(null)); +assert(!isSymbol(function* () { yield 42; return Infinity; }); + +assert(isSymbol(Symbol.iterator)); +assert(isSymbol(Symbol('foo'))); +assert(isSymbol(Symbol.for('foo'))); +assert(isSymbol(Object(Symbol('foo')))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-symbol +[2]: https://versionbadg.es/inspect-js/is-symbol.svg +[5]: https://david-dm.org/inspect-js/is-symbol.svg +[6]: https://david-dm.org/inspect-js/is-symbol +[7]: https://david-dm.org/inspect-js/is-symbol/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-symbol#info=devDependencies +[11]: https://nodei.co/npm/is-symbol.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-symbol.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-symbol.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-symbol +[codecov-image]: https://codecov.io/gh/inspect-js/is-symbol/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-symbol/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-symbol +[actions-url]: https://github.com/inspect-js/is-symbol/actions diff --git a/node_modules/is-symbol/index.js b/node_modules/is-symbol/index.js new file mode 100644 index 0000000..3d653e2 --- /dev/null +++ b/node_modules/is-symbol/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var toStr = Object.prototype.toString; +var hasSymbols = require('has-symbols')(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && value; + }; +} diff --git a/node_modules/is-symbol/package.json b/node_modules/is-symbol/package.json new file mode 100644 index 0000000..4472b17 --- /dev/null +++ b/node_modules/is-symbol/package.json @@ -0,0 +1,77 @@ +{ + "name": "is-symbol", + "version": "1.0.4", + "description": "Determine if a value is an ES6 Symbol or not.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx aud --production", + "lint": "eslint .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-symbol.git" + }, + "keywords": [ + "symbol", + "es6", + "is", + "Symbol" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-symbol/issues" + }, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.2.1", + "eslint": "^7.26.0", + "nyc": "^10.3.2", + "object-inspect": "^1.10.3", + "safe-publish-latest": "^1.1.4", + "tape": "^5.2.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-symbol/test/index.js b/node_modules/is-symbol/test/index.js new file mode 100644 index 0000000..e01f035 --- /dev/null +++ b/node_modules/is-symbol/test/index.js @@ -0,0 +1,92 @@ +'use strict'; + +var test = require('tape'); +var isSymbol = require('../index'); + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +var hasSymbols = require('has-symbols')(); +var inspect = require('object-inspect'); +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +test('non-symbol values', function (t) { + var nonSymbols = [ + true, + false, + Object(true), + Object(false), + null, + undefined, + {}, + [], + /a/g, + 'string', + 42, + new Date(), + function () {}, + NaN + ]; + t.plan(nonSymbols.length); + forEach(nonSymbols, function (nonSymbol) { + t.equal(false, isSymbol(nonSymbol), debug(nonSymbol, 'is not a symbol')); + }); + t.end(); +}); + +test('faked symbol values', function (t) { + t.test('real symbol valueOf', { skip: !hasSymbols }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + st.equal(false, isSymbol(fakeSymbol), 'object with valueOf returning a symbol is not a symbol'); + st.end(); + }); + + t.test('faked @@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + fakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(fakeSymbol), 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol'); + var notSoFakeSymbol = { valueOf: function () { return 42; } }; + notSoFakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(notSoFakeSymbol), 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol'); + st.end(); + }); + + var fakeSymbolString = { toString: function () { return 'Symbol(foo)'; } }; + t.equal(false, isSymbol(fakeSymbolString), 'object with toString returning Symbol(foo) is not a symbol'); + + t.end(); +}); + +test('Symbol support', { skip: !hasSymbols }, function (t) { + t.test('well-known Symbols', function (st) { + var isWellKnown = function filterer(name) { + return name !== 'for' && name !== 'keyFor' && !(name in filterer); + }; + var wellKnownSymbols = Object.getOwnPropertyNames(Symbol).filter(isWellKnown); + wellKnownSymbols.forEach(function (name) { + var sym = Symbol[name]; + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.test('user-created symbols', function (st) { + var symbols = [ + Symbol(), + Symbol('foo'), + Symbol['for']('foo'), + Object(Symbol('object')) + ]; + symbols.forEach(function (sym) { + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.end(); +}); + diff --git a/node_modules/is-typed-array/.editorconfig b/node_modules/is-typed-array/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/is-typed-array/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-typed-array/.eslintrc b/node_modules/is-typed-array/.eslintrc new file mode 100644 index 0000000..34a6262 --- /dev/null +++ b/node_modules/is-typed-array/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "globalThis": false + }, + + "rules": { + "max-statements-per-line": [2, { "max": 2 }] + }, +} diff --git a/node_modules/is-typed-array/.github/FUNDING.yml b/node_modules/is-typed-array/.github/FUNDING.yml new file mode 100644 index 0000000..7dd24b9 --- /dev/null +++ b/node_modules/is-typed-array/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-typed-array +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-typed-array/.nycrc b/node_modules/is-typed-array/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-typed-array/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-typed-array/CHANGELOG.md b/node_modules/is-typed-array/CHANGELOG.md new file mode 100644 index 0000000..9a799d4 --- /dev/null +++ b/node_modules/is-typed-array/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.13](https://github.com/inspect-js/is-typed-array/compare/v1.1.12...v1.1.13) - 2024-02-01 + +### Commits + +- [patch] add types [`8a8a679`](https://github.com/inspect-js/is-typed-array/commit/8a8a679937d1c4b970c98556460cef2b7fa0bffb) +- [Dev Deps] update `aud`, `has-tostringtag`, `npmignore`, `object-inspect`, `tape` [`8146b60`](https://github.com/inspect-js/is-typed-array/commit/8146b6019a24f502e66e2c224ce5bea8df9f39bc) +- [actions] optimize finishers [`34f875a`](https://github.com/inspect-js/is-typed-array/commit/34f875ace16c4900d6b0ef4688e9e3eb7d502715) +- [Deps] update `which-typed-array` [`19c974f`](https://github.com/inspect-js/is-typed-array/commit/19c974f4bbd93ffc45cb8638b86688bc00f1420b) +- [meta] add `sideEffects` flag [`0b68e5e`](https://github.com/inspect-js/is-typed-array/commit/0b68e5e58684b79110a82a0a51df8beb7574d6a2) + +## [v1.1.12](https://github.com/inspect-js/is-typed-array/compare/v1.1.11...v1.1.12) - 2023-07-17 + +### Commits + +- [Refactor] use `which-typed-array` for all internals [`7619405`](https://github.com/inspect-js/is-typed-array/commit/761940532de595f6721fed101b02814dcfa7fe4e) + +## [v1.1.11](https://github.com/inspect-js/is-typed-array/compare/v1.1.10...v1.1.11) - 2023-07-17 + +### Commits + +- [Fix] `node < v0.6` lacks proper Object toString behavior [`c94b90d`](https://github.com/inspect-js/is-typed-array/commit/c94b90dc6bc457783d6f8cc208415a49da0933b7) +- [Robustness] use `call-bind` [`573b00b`](https://github.com/inspect-js/is-typed-array/commit/573b00b8deec42ac1ac262415e442ea0b7e1c96b) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`c88c2d4`](https://github.com/inspect-js/is-typed-array/commit/c88c2d479976110478fa4038fe8921251c06a163) + +## [v1.1.10](https://github.com/inspect-js/is-typed-array/compare/v1.1.9...v1.1.10) - 2022-11-02 + +### Commits + +- [meta] add `auto-changelog` [`cf6d86b`](https://github.com/inspect-js/is-typed-array/commit/cf6d86bf2f693eca357439d4d12e76d641f91f92) +- [actions] update rebase action to use reusable workflow [`8da51a5`](https://github.com/inspect-js/is-typed-array/commit/8da51a5dce6d2442ae31ccbc2be136f2e04d6bef) +- [Dev Deps] update `aud`, `is-callable`, `object-inspect`, `tape` [`554e3de`](https://github.com/inspect-js/is-typed-array/commit/554e3deec59dec926d0badc628e589ab363e465b) +- [Refactor] use `gopd` instead of an `es-abstract` helper` [`cdaa465`](https://github.com/inspect-js/is-typed-array/commit/cdaa465d5f94bfc9e32475e31209e1c2458a9603) +- [Deps] update `es-abstract` [`677ae4b`](https://github.com/inspect-js/is-typed-array/commit/677ae4b3c8323b59d6650a9254ab945045c33f79) + + + +1.1.9 / 2022-05-13 +================= + * [Refactor] use `foreach` instead of `for-each` + * [readme] markdown URL cleanup + * [Deps] update `es-abstract` + * [meta] use `npmignore` to autogenerate an npmignore file + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` + * [actions] reuse common workflows + * [actions] update codecov uploader + +1.1.8 / 2021-08-30 +================= + * [Refactor] use `globalThis` if available (#53) + * [Deps] update `available-typed-arrays` + * [Dev Deps] update `@ljharb/eslint-config` + +1.1.7 / 2021-08-07 +================= + * [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString + * [Dev Deps] update `is-callable`, `tape` + +1.1.6 / 2021-08-05 +================= + * [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams + * [readme] add actions and codecov badges + * [meta] use `prepublishOnly` script for npm 7+ + * [Deps] update `available-typed-arrays`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + +1.1.5 / 2021-02-14 +================= + * [meta] do not publish github action workflow files or nyc output + * [Deps] update `call-bind`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `is-callable`, `tape` + +1.1.4 / 2020-12-05 +================= + * [readme] fix repo URLs, remove defunct badges + * [Deps] update `available-typed-arrays`, `es-abstract`; use `call-bind` where applicable + * [meta] gitignore nyc output + * [meta] only audit prod deps + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `make-arrow-function`, `make-generator-function`, `object-inspect`, `tape`; add `aud` + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + +1.1.3 / 2020-01-24 +================= + * [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols` + +1.1.2 / 2020-01-20 +================= + * [Fix] in envs without Symbol.toStringTag, dc8a8cc made arrays return `true` + * [Tests] add `evalmd` to `prelint` + +1.1.1 / 2020-01-18 +================= + * [Robustness] don’t rely on Array.prototype.indexOf existing + * [meta] remove unused Makefile and associated utilities + * [meta] add `funding` field; create FUNDING.yml + * [actions] add automatic rebasing / merge commit blocking + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `replace`, `semver`, `tape`; add `safe-publish-latest` + * [Tests] use shared travis-ci configs + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + +1.1.0 / 2019-02-16 +================= + * [New] add `BigInt64Array` and `BigUint64Array` + * [Refactor] use an array instead of an object for storing Typed Array names + * [meta] ignore `test.html` + * [Tests] up to `node` `v11.10`, `v10.15`, `v8.15`, `v7.10`, `v6.16`, `v5.10`, `v4.9` + * [Tests] remove `jscs` + * [Tests] use `npm audit` instead of `nsp` + * [Dev Deps] update `eslint`,` @ljharb/eslint-config`, `is-callable`, `tape`, `replace`, `semver` + * [Dev Deps] remove unused eccheck script + dep + +1.0.4 / 2016-03-19 +================= + * [Fix] `Symbol.toStringTag` is on the super-`[[Prototype]]` of Float32Array, not the `[[Prototype]]` (#3) + * [Tests] up to `node` `v5.9`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable` + +1.0.3 / 2015-10-13 +================= + * [Deps] Add missing `foreach` dependency (#1) + +1.0.2 / 2015-10-05 +================= + * [Deps] Remove unneeded "isarray" dependency + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + +1.0.1 / 2015-10-02 +================= + * Rerelease: avoid instanceof and the constructor property; work cross-realm; work with Symbol.toStringTag. + +1.0.0 / 2015-05-06 +================= + * Initial release. diff --git a/node_modules/is-typed-array/LICENSE b/node_modules/is-typed-array/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/is-typed-array/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-typed-array/README.md b/node_modules/is-typed-array/README.md new file mode 100644 index 0000000..5075257 --- /dev/null +++ b/node_modules/is-typed-array/README.md @@ -0,0 +1,70 @@ +# is-typed-array [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var isTypedArray = require('is-typed-array'); +var assert = require('assert'); + +assert.equal(false, isTypedArray(undefined)); +assert.equal(false, isTypedArray(null)); +assert.equal(false, isTypedArray(false)); +assert.equal(false, isTypedArray(true)); +assert.equal(false, isTypedArray([])); +assert.equal(false, isTypedArray({})); +assert.equal(false, isTypedArray(/a/g)); +assert.equal(false, isTypedArray(new RegExp('a', 'g'))); +assert.equal(false, isTypedArray(new Date())); +assert.equal(false, isTypedArray(42)); +assert.equal(false, isTypedArray(NaN)); +assert.equal(false, isTypedArray(Infinity)); +assert.equal(false, isTypedArray(new Number(42))); +assert.equal(false, isTypedArray('foo')); +assert.equal(false, isTypedArray(Object('foo'))); +assert.equal(false, isTypedArray(function () {})); +assert.equal(false, isTypedArray(function* () {})); +assert.equal(false, isTypedArray(x => x * x)); +assert.equal(false, isTypedArray([])); + +assert.ok(isTypedArray(new Int8Array())); +assert.ok(isTypedArray(new Uint8Array())); +assert.ok(isTypedArray(new Uint8ClampedArray())); +assert.ok(isTypedArray(new Int16Array())); +assert.ok(isTypedArray(new Uint16Array())); +assert.ok(isTypedArray(new Int32Array())); +assert.ok(isTypedArray(new Uint32Array())); +assert.ok(isTypedArray(new Float32Array())); +assert.ok(isTypedArray(new Float64Array())); +assert.ok(isTypedArray(new BigInt64Array())); +assert.ok(isTypedArray(new BigUint64Array())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-typed-array +[npm-version-svg]: https://versionbadg.es/inspect-js/is-typed-array.svg +[deps-svg]: https://david-dm.org/inspect-js/is-typed-array.svg +[deps-url]: https://david-dm.org/inspect-js/is-typed-array +[dev-deps-svg]: https://david-dm.org/inspect-js/is-typed-array/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-typed-array#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-typed-array.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-typed-array.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-typed-array.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-typed-array +[codecov-image]: https://codecov.io/gh/inspect-js/is-typed-array/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-typed-array/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-typed-array +[actions-url]: https://github.com/inspect-js/is-typed-array/actions diff --git a/node_modules/is-typed-array/index.d.ts b/node_modules/is-typed-array/index.d.ts new file mode 100644 index 0000000..b2f48c6 --- /dev/null +++ b/node_modules/is-typed-array/index.d.ts @@ -0,0 +1,16 @@ +type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; + +declare function isTypedArray(value: unknown): value is TypedArray; + +export = isTypedArray; \ No newline at end of file diff --git a/node_modules/is-typed-array/index.js b/node_modules/is-typed-array/index.js new file mode 100644 index 0000000..6e38c53 --- /dev/null +++ b/node_modules/is-typed-array/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var whichTypedArray = require('which-typed-array'); + +/** @type {import('.')} */ +module.exports = function isTypedArray(value) { + return !!whichTypedArray(value); +}; diff --git a/node_modules/is-typed-array/package.json b/node_modules/is-typed-array/package.json new file mode 100644 index 0000000..8032573 --- /dev/null +++ b/node_modules/is-typed-array/package.json @@ -0,0 +1,127 @@ +{ + "name": "is-typed-array", + "version": "1.1.13", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.", + "license": "MIT", + "main": "index.js", + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run --silent lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc tape test", + "test:harmony": "nyc node --harmony --es-staging test", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-typed-array.git" + }, + "keywords": [ + "array", + "TypedArray", + "typed array", + "is", + "typed", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "ES6", + "toStringTag", + "Symbol.toStringTag", + "@@toStringTag" + ], + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/for-each": "^0.3.3", + "@types/is-callable": "^1.1.2", + "@types/make-arrow-function": "^1.2.2", + "@types/make-generator-function": "^2.0.3", + "@types/node": "^20.11.14", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.1", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.1.10" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-typed-array/test/index.js b/node_modules/is-typed-array/test/index.js new file mode 100644 index 0000000..c96e397 --- /dev/null +++ b/node_modules/is-typed-array/test/index.js @@ -0,0 +1,111 @@ +'use strict'; + +var test = require('tape'); +var isTypedArray = require('../'); +var isCallable = require('is-callable'); +var hasToStringTag = require('has-tostringtag/shams')(); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + // @ts-expect-error Expected 1 arguments, but got 0.ts(2554) + st.notOk(isTypedArray(), 'undefined is not typed array'); + st.notOk(isTypedArray(null), 'null is not typed array'); + st.notOk(isTypedArray(false), 'false is not typed array'); + st.notOk(isTypedArray(true), 'true is not typed array'); + st.end(); + }); + + t.notOk(isTypedArray({}), 'object is not typed array'); + t.notOk(isTypedArray(/a/g), 'regex literal is not typed array'); + t.notOk(isTypedArray(new RegExp('a', 'g')), 'regex object is not typed array'); + t.notOk(isTypedArray(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.notOk(isTypedArray(42), 'number is not typed array'); + st.notOk(isTypedArray(Object(42)), 'number object is not typed array'); + st.notOk(isTypedArray(NaN), 'NaN is not typed array'); + st.notOk(isTypedArray(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.notOk(isTypedArray('foo'), 'string primitive is not typed array'); + st.notOk(isTypedArray(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.notOk(isTypedArray(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.notOk(isTypedArray(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.notOk(isTypedArray(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + forEach(typedArrayNames, function (typedArray) { + // @ts-expect-error + if (typeof global[typedArray] === 'function') { + // @ts-expect-error + var fakeTypedArray = []; + // @ts-expect-error + fakeTypedArray[Symbol.toStringTag] = typedArray; + // @ts-expect-error + t.notOk(isTypedArray(fakeTypedArray), 'faked ' + typedArray + ' is not typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); + +test('non-Typed Arrays', function (t) { + t.notOk(isTypedArray([]), '[] is not typed array'); + t.end(); +}); + +/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor} TypedArrayConstructor */ + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + // @ts-expect-error + /** @type {TypedArrayConstructor} */ var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(10); + t.ok(isTypedArray(arr), 'new ' + typedArray + '(10) is typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/is-typed-array/tsconfig.json b/node_modules/is-typed-array/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/is-typed-array/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/is-weakref/.eslintignore b/node_modules/is-weakref/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/is-weakref/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-weakref/.eslintrc b/node_modules/is-weakref/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/is-weakref/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/is-weakref/.github/FUNDING.yml b/node_modules/is-weakref/.github/FUNDING.yml new file mode 100644 index 0000000..a9ccddf --- /dev/null +++ b/node_modules/is-weakref/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-weakref +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-weakref/.nycrc b/node_modules/is-weakref/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-weakref/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-weakref/CHANGELOG.md b/node_modules/is-weakref/CHANGELOG.md new file mode 100644 index 0000000..573938d --- /dev/null +++ b/node_modules/is-weakref/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/is-weakref/compare/v1.0.1...v1.0.2) - 2021-12-10 + +### Commits + +- [actions] reuse common workflows [`2375b1f`](https://github.com/inspect-js/is-weakref/commit/2375b1f9798b08c7af98481bbb38b4105835dacf) +- [meta] do not publish workflow files [`4c1be42`](https://github.com/inspect-js/is-weakref/commit/4c1be423afacabf2f3aa9e8bf02f668bdeaf3a20) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7ec78ce`](https://github.com/inspect-js/is-weakref/commit/7ec78ce58c7553469eee97ae82fe147dfccde611) +- [readme] update URLs [`6306f09`](https://github.com/inspect-js/is-weakref/commit/6306f09a7df388150fb1d0b855b6f9e60165a457) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`7a1601e`](https://github.com/inspect-js/is-weakref/commit/7a1601e93ae50a791751a96d33073f5e65f3d3c9) +- [readme] add actions and codecov badges [`67ecd14`](https://github.com/inspect-js/is-weakref/commit/67ecd14b8b0192456932d1d54838accbf90ff5c0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`1a5013b`](https://github.com/inspect-js/is-weakref/commit/1a5013bddcb9edc23025571810f9a2eebda53683) +- [actions] update codecov uploader [`b57b037`](https://github.com/inspect-js/is-weakref/commit/b57b037a547f3ecfa3d3f079a8015ec005c7181b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`da49017`](https://github.com/inspect-js/is-weakref/commit/da49017800d628c9bcd2f094d49783d6ee649c50) +- [meta] simplify "exports" [`9b88835`](https://github.com/inspect-js/is-weakref/commit/9b8883585506c135a3fcb9f55d0944a13b4eb3e6) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`c7e77f4`](https://github.com/inspect-js/is-weakref/commit/c7e77f495308f3385adfaa1f4ac78a2632e0bcde) +- [Dev Deps] update `eslint` [`417b29e`](https://github.com/inspect-js/is-weakref/commit/417b29e7ceacebe24aef15422544443f4b59e181) +- [meta] add `safe-publish-latest`; use `prepublishOnly` script for npm 7+ [`b1b99f4`](https://github.com/inspect-js/is-weakref/commit/b1b99f45e0977d10f8472e9272e48a696145c2b1) +- [Deps] update `call-bind` [`aea342e`](https://github.com/inspect-js/is-weakref/commit/aea342e9e301deeb938e62b92a37cf991c5f7dbc) +- [actions] update workflows [`786c2d3`](https://github.com/inspect-js/is-weakref/commit/786c2d3dd4486acec09786220d3dd9fd48e70e93) + +## [v1.0.1](https://github.com/inspect-js/is-weakref/compare/v1.0.0...v1.0.1) - 2020-12-04 + +### Commits + +- [Tests] migrate tests to Github Actions [`05b4faa`](https://github.com/inspect-js/is-weakref/commit/05b4faa167c67f42c792e35c07adcb6b87e7dea0) +- [Tests] run `nyc` on all tests [`8df2e4b`](https://github.com/inspect-js/is-weakref/commit/8df2e4bd66bb6b7d55f389f28e6bb167fe1deb5a) +- [actions] add "Allow Edits" workflow [`4a716b8`](https://github.com/inspect-js/is-weakref/commit/4a716b8fcc025fe889a0f09ccaee7a9f748b1c66) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect` [`be23cf3`](https://github.com/inspect-js/is-weakref/commit/be23cf305f46db8b1c8a26d1c74b096fdba00056) +- [Refactor] use `call-bind` instead of `es-abstract` [`a933a96`](https://github.com/inspect-js/is-weakref/commit/a933a9643ddf7cddfd9f9f3cf44d675cc4c86ce5) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4473ed2`](https://github.com/inspect-js/is-weakref/commit/4473ed2e73fed47cd2fa42b8d9cac17e941d2c08) +- [readme] remove travis badge [`bd3bfcd`](https://github.com/inspect-js/is-weakref/commit/bd3bfcd2c187099d2215232a7621fb960e1e2807) + +## v1.0.0 - 2020-08-01 + +### Commits + +- Initial commit [`dd86394`](https://github.com/inspect-js/is-weakref/commit/dd86394d7da000724c6e17c79077879c381e9ea3) +- readme [`f4defca`](https://github.com/inspect-js/is-weakref/commit/f4defcac48d1d99b019b596ab26bd868de1adfe9) +- Tests [`13d8139`](https://github.com/inspect-js/is-weakref/commit/13d8139dedf424239daf357261c39d3f8c33d662) +- npm init [`55a2bb7`](https://github.com/inspect-js/is-weakref/commit/55a2bb7c53b893396a51da969e352702cafe9a0e) +- Implementation [`1ec84e3`](https://github.com/inspect-js/is-weakref/commit/1ec84e36de4315d44c8da540faa27836832bb0f3) +- [meta] add auto-changelog [`ab9ce44`](https://github.com/inspect-js/is-weakref/commit/ab9ce44be717312c5221bf3d2f3f6d2dd8c6ac88) +- [actions] add automatic rebasing / merge commit blocking [`3d3f4d5`](https://github.com/inspect-js/is-weakref/commit/3d3f4d54bed6e455b2a0d0f20c87d454bf78af26) +- [meta] add "funding"; create `FUNDING.yml` [`f35ef3d`](https://github.com/inspect-js/is-weakref/commit/f35ef3de16eb06447acf3c39bdc164ba0e7bdf45) +- [Tests] add `npm run lint` [`af2123d`](https://github.com/inspect-js/is-weakref/commit/af2123d4754c14f7befa66ba01e1d72858723651) +- [Tests] use shared travis-ci configs [`042b4de`](https://github.com/inspect-js/is-weakref/commit/042b4dec08d882ae9137f4ad05ae24a1457da0f8) +- Only apps should have lockfiles [`fcae604`](https://github.com/inspect-js/is-weakref/commit/fcae604cb1422faae9311dd4219032895c0a9a2e) diff --git a/node_modules/is-weakref/LICENSE b/node_modules/is-weakref/LICENSE new file mode 100644 index 0000000..707437b --- /dev/null +++ b/node_modules/is-weakref/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-weakref/README.md b/node_modules/is-weakref/README.md new file mode 100644 index 0000000..abbb978 --- /dev/null +++ b/node_modules/is-weakref/README.md @@ -0,0 +1,52 @@ +# is-weakref [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isWeakRef = require('is-weakref'); +assert(!isWeakRef(function () {})); +assert(!isWeakRef(null)); +assert(!isWeakRef(function* () { yield 42; return Infinity; }); +assert(!isWeakRef(Symbol('foo'))); +assert(!isWeakRef(1n)); +assert(!isWeakRef(Object(1n))); + +assert(!isWeakRef(new Set())); +assert(!isWeakRef(new WeakSet())); +assert(!isWeakRef(new Map())); +assert(!isWeakRef(new WeakMap())); + +assert(isWeakRef(new WeakRef({}))); + +class MyWeakRef extends WeakRef {} +assert(isWeakRef(new MyWeakRef({}))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-weakref +[npm-version-svg]: https://versionbadg.es/inspect-js/is-weakref.svg +[deps-svg]: https://david-dm.org/inspect-js/is-weakref.svg +[deps-url]: https://david-dm.org/inspect-js/is-weakref +[dev-deps-svg]: https://david-dm.org/inspect-js/is-weakref/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-weakref#info=devDependencies +[license-image]: https://img.shields.io/npm/l/is-weakref.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-weakref.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-weakref +[codecov-image]: https://codecov.io/gh/inspect-js/is-weakref/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-weakref/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-weakref +[actions-url]: https://github.com/inspect-js/is-weakref/actions diff --git a/node_modules/is-weakref/index.js b/node_modules/is-weakref/index.js new file mode 100644 index 0000000..90769f8 --- /dev/null +++ b/node_modules/is-weakref/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $deref = callBound('WeakRef.prototype.deref', true); + +module.exports = typeof WeakRef === 'undefined' + ? function isWeakRef(value) { // eslint-disable-line no-unused-vars + return false; + } + : function isWeakRef(value) { + if (!value || typeof value !== 'object') { + return false; + } + try { + $deref(value); + return true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/is-weakref/package.json b/node_modules/is-weakref/package.json new file mode 100644 index 0000000..2d2a6e2 --- /dev/null +++ b/node_modules/is-weakref/package.json @@ -0,0 +1,63 @@ +{ + "name": "is-weakref", + "version": "1.0.2", + "description": "Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-weakref.git" + }, + "keywords": [ + "weakref", + "weak", + "ref", + "finalization", + "finalization registry" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-weakref/issues" + }, + "homepage": "https://github.com/inspect-js/is-weakref#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.0.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.4.1", + "for-each": "^0.3.3", + "nyc": "^10.3.2", + "object-inspect": "^1.11.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.3.2" + }, + "dependencies": { + "call-bind": "^1.0.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-weakref/test/index.js b/node_modules/is-weakref/test/index.js new file mode 100644 index 0000000..c1c5b6f --- /dev/null +++ b/node_modules/is-weakref/test/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); + +var isWeakRef = require('..'); + +test('isWeakRef', function (t) { + t.equal(typeof isWeakRef, 'function', 'is a function'); + + var nonWeakRefs = [undefined, null, true, false, 42, 0, Infinity, NaN, /a/g, function () {}, {}, []]; + forEach(nonWeakRefs, function (nonWeakRef) { + t.equal(isWeakRef(nonWeakRef), false, inspect(nonWeakRef) + ' is not a WeakRef'); + }); + + t.test('actual WeakRefs', { skip: typeof WeakRef === 'undefined' }, function (st) { + var ref = new WeakRef({}); + + st.equal(isWeakRef(ref), true, inspect(ref) + ' is a WeakRef'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-windows/LICENSE b/node_modules/is-windows/LICENSE new file mode 100644 index 0000000..f8de063 --- /dev/null +++ b/node_modules/is-windows/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-windows/README.md b/node_modules/is-windows/README.md new file mode 100644 index 0000000..485bfde --- /dev/null +++ b/node_modules/is-windows/README.md @@ -0,0 +1,95 @@ +# is-windows [![NPM version](https://img.shields.io/npm/v/is-windows.svg?style=flat)](https://www.npmjs.com/package/is-windows) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![NPM total downloads](https://img.shields.io/npm/dt/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-windows.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-windows) + +> Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-windows +``` + +## Heads up! + +As of `v0.2.0` this module always returns a function. + +## Node.js usage + +```js +var isWindows = require('is-windows'); + +console.log(isWindows()); +//=> returns true if the platform is windows +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [window-size](https://www.npmjs.com/package/window-size): Reliable way to get the height and width of terminal/console, since it's not calculated or… [more](https://github.com/jonschlinkert/window-size) | [homepage](https://github.com/jonschlinkert/window-size "Reliable way to get the height and width of terminal/console, since it's not calculated or updated the same way on all platforms, environments and node.js versions.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 11 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [SimenB](https://github.com/SimenB) | +| 1 | [gucong3000](https://github.com/gucong3000) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 14, 2018._ \ No newline at end of file diff --git a/node_modules/is-windows/index.js b/node_modules/is-windows/index.js new file mode 100644 index 0000000..55d43e0 --- /dev/null +++ b/node_modules/is-windows/index.js @@ -0,0 +1,27 @@ +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +(function(factory) { + if (exports && typeof exports === 'object' && typeof module !== 'undefined') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof window !== 'undefined') { + window.isWindows = factory(); + } else if (typeof global !== 'undefined') { + global.isWindows = factory(); + } else if (typeof self !== 'undefined') { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } +})(function() { + 'use strict'; + return function isWindows() { + return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; +}); diff --git a/node_modules/is-windows/package.json b/node_modules/is-windows/package.json new file mode 100644 index 0000000..fca09f9 --- /dev/null +++ b/node_modules/is-windows/package.json @@ -0,0 +1,71 @@ +{ + "name": "is-windows", + "description": "Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/is-windows", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Simen Bekkhus (https://github.com/SimenB)", + "刘祺 (gucong.co.cc)" + ], + "repository": "jonschlinkert/is-windows", + "bugs": { + "url": "https://github.com/jonschlinkert/is-windows/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "check", + "cywin", + "is", + "is-windows", + "nix", + "operating system", + "os", + "platform", + "process", + "unix", + "win", + "win32", + "windows" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-absolute", + "is-glob", + "is-relative", + "isobject", + "window-size" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/is-wsl/index.js b/node_modules/is-wsl/index.js new file mode 100644 index 0000000..ade6cda --- /dev/null +++ b/node_modules/is-wsl/index.js @@ -0,0 +1,25 @@ +'use strict'; +const os = require('os'); +const fs = require('fs'); + +const isWsl = () => { + if (process.platform !== 'linux') { + return false; + } + + if (os.release().includes('Microsoft')) { + return true; + } + + try { + return fs.readFileSync('/proc/version', 'utf8').includes('Microsoft'); + } catch (err) { + return false; + } +}; + +if (process.env.__IS_WSL_TEST__) { + module.exports = isWsl; +} else { + module.exports = isWsl(); +} diff --git a/node_modules/is-wsl/license b/node_modules/is-wsl/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-wsl/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-wsl/package.json b/node_modules/is-wsl/package.json new file mode 100644 index 0000000..5596140 --- /dev/null +++ b/node_modules/is-wsl/package.json @@ -0,0 +1,40 @@ +{ + "name": "is-wsl", + "version": "1.1.0", + "description": "Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)", + "license": "MIT", + "repository": "sindresorhus/is-wsl", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "check", + "wsl", + "windows", + "subsystem", + "linux", + "detect", + "bash", + "process", + "console", + "terminal", + "is" + ], + "devDependencies": { + "ava": "*", + "clear-require": "^2.0.0", + "proxyquire": "^1.7.11", + "xo": "*" + } +} diff --git a/node_modules/is-wsl/readme.md b/node_modules/is-wsl/readme.md new file mode 100644 index 0000000..7ab40c5 --- /dev/null +++ b/node_modules/is-wsl/readme.md @@ -0,0 +1,28 @@ +# is-wsl [![Build Status](https://travis-ci.org/sindresorhus/is-wsl.svg?branch=master)](https://travis-ci.org/sindresorhus/is-wsl) + +> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows) + +Can be useful if you need to work around unimplemented or buggy features in WSL. + + +## Install + +``` +$ npm install --save is-wsl +``` + + +## Usage + +```js +const isWsl = require('is-wsl'); + +// When running inside Windows Subsystem for Linux +console.log(isWsl); +//=> true +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isarray/.npmignore b/node_modules/isarray/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/isarray/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/isarray/.travis.yml b/node_modules/isarray/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/isarray/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/isarray/Makefile b/node_modules/isarray/Makefile new file mode 100644 index 0000000..787d56e --- /dev/null +++ b/node_modules/isarray/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test.js + +.PHONY: test + diff --git a/node_modules/isarray/README.md b/node_modules/isarray/README.md new file mode 100644 index 0000000..16d2c59 --- /dev/null +++ b/node_modules/isarray/README.md @@ -0,0 +1,60 @@ + +# isarray + +`Array#isArray` for older browsers. + +[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) +[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) + +[![browser support](https://ci.testling.com/juliangruber/isarray.png) +](https://ci.testling.com/juliangruber/isarray) + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/isarray/component.json b/node_modules/isarray/component.json new file mode 100644 index 0000000..9e31b68 --- /dev/null +++ b/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/node_modules/isarray/index.js b/node_modules/isarray/index.js new file mode 100644 index 0000000..a57f634 --- /dev/null +++ b/node_modules/isarray/index.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; diff --git a/node_modules/isarray/package.json b/node_modules/isarray/package.json new file mode 100644 index 0000000..1a4317a --- /dev/null +++ b/node_modules/isarray/package.json @@ -0,0 +1,45 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "1.0.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tape": "~2.13.4" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "scripts": { + "test": "tape test.js" + } +} diff --git a/node_modules/isarray/test.js b/node_modules/isarray/test.js new file mode 100644 index 0000000..e0c3444 --- /dev/null +++ b/node_modules/isarray/test.js @@ -0,0 +1,20 @@ +var isArray = require('./'); +var test = require('tape'); + +test('is array', function(t){ + t.ok(isArray([])); + t.notOk(isArray({})); + t.notOk(isArray(null)); + t.notOk(isArray(false)); + + var obj = {}; + obj[0] = true; + t.notOk(isArray(obj)); + + var arr = []; + arr.foo = 'bar'; + t.ok(isArray(arr)); + + t.end(); +}); + diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore new file mode 100644 index 0000000..c1cb757 --- /dev/null +++ b/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/isexe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 0000000..35769e8 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 0000000..553fb32 --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 0000000..1995ea4 --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 0000000..e452689 --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,31 @@ +{ + "name": "isexe", + "version": "2.0.0", + "description": "Minimal module to check if a file is executable.", + "main": "index.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "keywords": [], + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "homepage": "https://github.com/isaacs/isexe#readme" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 0000000..d926df6 --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 0000000..3499673 --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/isobject/LICENSE b/node_modules/isobject/LICENSE new file mode 100644 index 0000000..943e71d --- /dev/null +++ b/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/isobject/README.md b/node_modules/isobject/README.md new file mode 100644 index 0000000..d01feaa --- /dev/null +++ b/node_modules/isobject/README.md @@ -0,0 +1,122 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or null. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save isobject +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` +Install with [bower](https://bower.io/) + +```sh +$ bower install isobject +``` + +## Usage + +```js +var isObject = require('isobject'); +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## About + +### Related projects + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 29 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [magnudae](https://github.com/magnudae) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 30, 2017._ \ No newline at end of file diff --git a/node_modules/isobject/index.d.ts b/node_modules/isobject/index.d.ts new file mode 100644 index 0000000..55f81c2 --- /dev/null +++ b/node_modules/isobject/index.d.ts @@ -0,0 +1,5 @@ +export = isObject; + +declare function isObject(val: any): boolean; + +declare namespace isObject {} diff --git a/node_modules/isobject/index.js b/node_modules/isobject/index.js new file mode 100644 index 0000000..2d59958 --- /dev/null +++ b/node_modules/isobject/index.js @@ -0,0 +1,12 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/isobject/package.json b/node_modules/isobject/package.json new file mode 100644 index 0000000..62aa8c1 --- /dev/null +++ b/node_modules/isobject/package.json @@ -0,0 +1,74 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "(https://github.com/LeSuisse)", + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Magnús Dæhlen (https://github.com/magnudae)", + "Tom MacWright (https://macwright.org)" + ], + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.d.ts", + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": {}, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/json-parse-better-errors/CHANGELOG.md b/node_modules/json-parse-better-errors/CHANGELOG.md new file mode 100644 index 0000000..b1d212d --- /dev/null +++ b/node_modules/json-parse-better-errors/CHANGELOG.md @@ -0,0 +1,46 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +
+## [1.0.2](https://github.com/zkat/json-parse-better-errors/compare/v1.0.1...v1.0.2) (2018-03-30) + + +### Bug Fixes + +* **messages:** More friendly messages for non-string ([#1](https://github.com/zkat/json-parse-better-errors/issues/1)) ([a476d42](https://github.com/zkat/json-parse-better-errors/commit/a476d42)) + + + + +## [1.0.1](https://github.com/zkat/json-parse-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16) + + +### Bug Fixes + +* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/zkat/json-parse-better-errors/commit/efe2958)) + + + + +# 1.0.0 (2017-08-15) + + +### Features + +* **init:** Initial Commit ([562c977](https://github.com/zkat/json-parse-better-errors/commit/562c977)) + + +### BREAKING CHANGES + +* **init:** This is the first commit! + + + + +# 0.1.0 (2017-08-15) + + +### Features + +* **init:** Initial Commit ([9dd1a19](https://github.com/zkat/json-parse-better-errors/commit/9dd1a19)) diff --git a/node_modules/json-parse-better-errors/LICENSE.md b/node_modules/json-parse-better-errors/LICENSE.md new file mode 100644 index 0000000..c51842c --- /dev/null +++ b/node_modules/json-parse-better-errors/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2017 Kat Marchán + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/json-parse-better-errors/README.md b/node_modules/json-parse-better-errors/README.md new file mode 100644 index 0000000..a1f0f0a --- /dev/null +++ b/node_modules/json-parse-better-errors/README.md @@ -0,0 +1,46 @@ +# json-parse-better-errors [![npm version](https://img.shields.io/npm/v/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![license](https://img.shields.io/npm/l/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![Travis](https://img.shields.io/travis/zkat/json-parse-better-errors.svg)](https://travis-ci.org/zkat/json-parse-better-errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/json-parse-better-errors?svg=true)](https://ci.appveyor.com/project/zkat/json-parse-better-errors) [![Coverage Status](https://coveralls.io/repos/github/zkat/json-parse-better-errors/badge.svg?branch=latest)](https://coveralls.io/github/zkat/json-parse-better-errors?branch=latest) + +[`json-parse-better-errors`](https://github.com/zkat/json-parse-better-errors) is a Node.js library for +getting nicer errors out of `JSON.parse()`, including context and position of the parse errors. + +## Install + +`$ npm install --save json-parse-better-errors` + +## Table of Contents + +* [Example](#example) +* [Features](#features) +* [Contributing](#contributing) +* [API](#api) + * [`parse`](#parse) + +### Example + +```javascript +const parseJson = require('json-parse-better-errors') + +parseJson('"foo"') +parseJson('garbage') // more useful error message +``` + +### Features + +* Like JSON.parse, but the errors are better. + +### Contributing + +The npm team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear. + +All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. + +Please refer to the [Changelog](CHANGELOG.md) for project history details, too. + +Happy hacking! + +### API + +#### `> parse(txt, ?reviver, ?context=20)` + +Works just like `JSON.parse`, but will include a bit more information when an +error happens. diff --git a/node_modules/json-parse-better-errors/index.js b/node_modules/json-parse-better-errors/index.js new file mode 100644 index 0000000..14644c2 --- /dev/null +++ b/node_modules/json-parse-better-errors/index.js @@ -0,0 +1,38 @@ +'use strict' + +module.exports = parseJson +function parseJson (txt, reviver, context) { + context = context || 20 + try { + return JSON.parse(txt, reviver) + } catch (e) { + if (typeof txt !== 'string') { + const isEmptyArray = Array.isArray(txt) && txt.length === 0 + const errorMessage = 'Cannot parse ' + + (isEmptyArray ? 'an empty array' : String(txt)) + throw new TypeError(errorMessage) + } + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context + const end = errIdx + context >= txt.length + ? txt.length + : errIdx + context + e.message += ` while parsing near '${ + start === 0 ? '' : '...' + }${txt.slice(start, end)}${ + end === txt.length ? '' : '...' + }'` + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'` + } + throw e + } +} diff --git a/node_modules/json-parse-better-errors/package.json b/node_modules/json-parse-better-errors/package.json new file mode 100644 index 0000000..c4c2c20 --- /dev/null +++ b/node_modules/json-parse-better-errors/package.json @@ -0,0 +1,45 @@ +{ + "name": "json-parse-better-errors", + "version": "1.0.2", + "description": "JSON.parse with context information on error", + "main": "index.js", + "files": [ + "*.js" + ], + "scripts": { + "prerelease": "npm t", + "postrelease": "npm publish && git push --follow-tags", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --coverage test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "repository": "https://github.com/zkat/json-parse-better-errors", + "keywords": [ + "JSON", + "parser" + ], + "author": { + "name": "Kat Marchán", + "email": "kzm@zkat.tech", + "twitter": "maybekatz" + }, + "license": "MIT", + "devDependencies": { + "nyc": "^10.3.2", + "standard": "^9.0.2", + "standard-version": "^4.1.0", + "tap": "^10.3.3", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "config": { + "nyc": { + "exclude": [ + "node_modules/**", + "test/**" + ] + } + } +} diff --git a/node_modules/kind-of/LICENSE b/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/kind-of/README.md b/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json new file mode 100644 index 0000000..5de879e --- /dev/null +++ b/node_modules/kind-of/package.json @@ -0,0 +1,90 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "3.2.2", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/live-server/.editorconfig b/node_modules/live-server/.editorconfig new file mode 100644 index 0000000..1b431d0 --- /dev/null +++ b/node_modules/live-server/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[{package,bower}.json] +indent_style = space +indent_size = 2 diff --git a/node_modules/live-server/.github/CONTRIBUTING.md b/node_modules/live-server/.github/CONTRIBUTING.md new file mode 100644 index 0000000..3e4019c --- /dev/null +++ b/node_modules/live-server/.github/CONTRIBUTING.md @@ -0,0 +1,19 @@ +Contributing Guidelines +======================= + +When implementing a new feature or a bugfix, consider these points: + +* Is this thing useful to other people, or is it just catering for an obscure corner case resulting from e.g. weirdness in personal dev environment? +* Should the thing be live-server's responsibility at all, or is it better served by other tools? +* Am I introducing unnecessary dependencies when the same thing could easily be done using normal JavaScript / node.js features? +* Does the naming (e.g. command line parameters) make sense and uses same style as other similar ones? +* Does my code adhere to the project's coding style (observable from surrounding code)? +* Can backwards compatibility be preserved? + +A few guiding principles: keep the app simple and small, focusing on what it's meant to provide: live reloading development web server. Avoid extra dependencies and the need to do configuration when possible and it makes sense. Minimize bloat. + +If you are adding a feature, think about if it could be an extenral middleware instead, possible bundled with `live-server` in its `middleware` folder. + +**New features should come with test cases!** + +**Run `npm test` to check that you are not introducing new bugs or style issues!** diff --git a/node_modules/live-server/.github/ISSUE_TEMPLATE.md b/node_modules/live-server/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..37fde91 --- /dev/null +++ b/node_modules/live-server/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ +###### Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting + +## Issue description + +## Software details + +* Command line used for launching `live-server`: +* OS: +* Browser (if browser related): +* Node.js version: +* `live-server` version: diff --git a/node_modules/live-server/.travis.yml b/node_modules/live-server/.travis.yml new file mode 100644 index 0000000..15dc198 --- /dev/null +++ b/node_modules/live-server/.travis.yml @@ -0,0 +1,5 @@ +sudo: false +language: node_js +node_js: + - "node" + - "lts/*" diff --git a/node_modules/live-server/README.md b/node_modules/live-server/README.md new file mode 100644 index 0000000..558c073 --- /dev/null +++ b/node_modules/live-server/README.md @@ -0,0 +1,274 @@ +[![view on npm](http://img.shields.io/npm/v/live-server.svg)](https://www.npmjs.org/package/live-server) +[![npm module downloads per month](http://img.shields.io/npm/dm/live-server.svg)](https://www.npmjs.org/package/live-server) +[![build status](https://travis-ci.org/tapio/live-server.svg)](https://travis-ci.org/tapio/live-server) + +Live Server +=========== + +This is a little development server with live reload capability. Use it for hacking your HTML/JavaScript/CSS files, but not for deploying the final site. + +There are two reasons for using this: + +1. AJAX requests don't work with the `file://` protocol due to security restrictions, i.e. you need a server if your site fetches content through JavaScript. +2. Having the page reload automatically after changes to files can accelerate development. + +You don't need to install any browser plugins or manually add code snippets to your pages for the reload functionality to work, see "How it works" section below for more information. If you don't want/need the live reload, you should probably use something even simpler, like the following Python-based one-liner: + + python -m SimpleHTTPServer + + +Installation +------------ + +You need node.js and npm. You should probably install this globally. + +**Npm way** + + npm install -g live-server + +**Manual way** + + git clone https://github.com/tapio/live-server + cd live-server + npm install # Local dependencies if you want to hack + npm install -g # Install globally + + +Usage from command line +----------------------- + +Issue the command `live-server` in your project's directory. Alternatively you can add the path to serve as a command line parameter. + +This will automatically launch the default browser. When you make a change to any file, the browser will reload the page - unless it was a CSS file in which case the changes are applied without a reload. + +Command line parameters: + +* `--port=NUMBER` - select port to use, default: PORT env var or 8080 +* `--host=ADDRESS` - select host address to bind to, default: IP env var or 0.0.0.0 ("any address") +* `--no-browser` - suppress automatic web browser launching +* `--browser=BROWSER` - specify browser to use instead of system default +* `--quiet | -q` - suppress logging +* `--verbose | -V` - more logging (logs all requests, shows all listening IPv4 interfaces, etc.) +* `--open=PATH` - launch browser to PATH instead of server root +* `--watch=PATH` - comma-separated string of paths to exclusively watch for changes (default: watch everything) +* `--ignore=PATH` - comma-separated string of paths to ignore ([anymatch](https://github.com/es128/anymatch)-compatible definition) +* `--ignorePattern=RGXP` - Regular expression of files to ignore (ie `.*\.jade`) (**DEPRECATED** in favor of `--ignore`) +* `--no-css-inject` - reload page on CSS change, rather than injecting changed CSS +* `--middleware=PATH` - path to .js file exporting a middleware function to add; can be a name without path nor extension to reference bundled middlewares in `middleware` folder +* `--entry-file=PATH` - serve this file (server root relative) in place of missing files (useful for single page apps) +* `--mount=ROUTE:PATH` - serve the paths contents under the defined route (multiple definitions possible) +* `--spa` - translate requests from /abc to /#/abc (handy for Single Page Apps) +* `--wait=MILLISECONDS` - (default 100ms) wait for all changes, before reloading +* `--htpasswd=PATH` - Enables http-auth expecting htpasswd file located at PATH +* `--cors` - Enables CORS for any origin (reflects request origin, requests with credentials are supported) +* `--https=PATH` - PATH to a HTTPS configuration module +* `--https-module=MODULE_NAME` - Custom HTTPS module (e.g. `spdy`) +* `--proxy=ROUTE:URL` - proxy all requests for ROUTE to URL +* `--help | -h` - display terse usage hint and exit +* `--version | -v` - display version and exit + +Default options: + +If a file `~/.live-server.json` exists it will be loaded and used as default options for live-server on the command line. See "Usage from node" for option names. + + +Usage from node +--------------- + +```javascript +var liveServer = require("live-server"); + +var params = { + port: 8181, // Set the server port. Defaults to 8080. + host: "0.0.0.0", // Set the address to bind to. Defaults to 0.0.0.0 or process.env.IP. + root: "/public", // Set root directory that's being served. Defaults to cwd. + open: false, // When false, it won't load your browser by default. + ignore: 'scss,my/templates', // comma-separated string for paths to ignore + file: "index.html", // When set, serve this file (server root relative) for every 404 (useful for single-page applications) + wait: 1000, // Waits for all changes, before reloading. Defaults to 0 sec. + mount: [['/components', './node_modules']], // Mount a directory to a route. + logLevel: 2, // 0 = errors only, 1 = some, 2 = lots + middleware: [function(req, res, next) { next(); }] // Takes an array of Connect-compatible middleware that are injected into the server middleware stack +}; +liveServer.start(params); +``` + +HTTPS +--------------- + +In order to enable HTTPS support, you'll need to create a configuration module. +The module must export an object that will be used to configure a HTTPS server. +The keys are the same as the keys in `options` for [tls.createServer](https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener). + +For example: +```javascript +var fs = require("fs"); + +module.exports = { + cert: fs.readFileSync(__dirname + "/server.cert"), + key: fs.readFileSync(__dirname + "/server.key"), + passphrase: "12345" +}; +``` + +If using the node API, you can also directly pass a configuration object instead of a path to the module. + +HTTP/2 +--------------- + +To get HTTP/2 support one can provide a custom HTTPS module via `--https-module` CLI parameter (`httpsModule` option for Node.js script). **Be sure to install the module first.** +HTTP/2 unencrypted mode is not supported by browsers, thus not supported by `live-server`. See [this question](https://http2.github.io/faq/#does-http2-require-encryption) and [can I use page on HTTP/2](http://caniuse.com/#search=http2) for more details. + +For example from CLI(bash): + + live-server \ + --https=path/to/https.conf.js \ + --https-module=spdy \ + my-app-folder/ + +Troubleshooting +--------------- + +* No reload on changes + * Open your browser's console: there should be a message at the top stating that live reload is enabled. Note that you will need a browser that supports WebSockets. If there are errors, deal with them. If it's still not working, [file an issue](https://github.com/tapio/live-server/issues). +* Error: watch ENOSPC + * See [this suggested solution](http://stackoverflow.com/questions/22475849/node-js-error-enospc/32600959#32600959). +* Reload works but changes are missing or outdated + * Try using `--wait=MS` option. Where `MS` is time in milliseconds to wait before issuing a reload. + +How it works +------------ + +The server is a simple node app that serves the working directory and its subdirectories. It also watches the files for changes and when that happens, it sends a message through a web socket connection to the browser instructing it to reload. In order for the client side to support this, the server injects a small piece of JavaScript code to each requested html file. This script establishes the web socket connection and listens to the reload requests. CSS files can be refreshed without a full page reload by finding the referenced stylesheets from the DOM and tricking the browser to fetch and parse them again. + + +Contributing +------------ + +We welcome contributions! See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details. + + +Version history +--------------- + +* v1.2.2 + - Fix dependency problem +* v1.2.1 + - `--https-module=MODULE_NAME` to specify custom HTTPS module (e.g. `spdy`) (@pavel) + - `--no-css-inject` to reload page on css change instead of injecting the changes (@kylecordes) + - Dependencies updated to get rid of vulnerabilities in deps +* v1.2.0 + - Add `--middleware` parameter to use external middlewares + - `middleware` API parameter now also accepts strings similar to `--middleware` + - Changed file watcher to improve speed (@pavel) + - `--ignore` now accepts regexps and globs, `--ignorePattern` deprecated (@pavel) + - Added `--verbose` cli option (logLevel 3) (@pavel) + - Logs all requests, displays warning when can't inject html file, displays all listening IPv4 interfaces... + - HTTPS configuration now also accepts a plain object (@pavel) + - Move `--spa` to a bundled middleware file + - New bundled `spa-no-assets` middleware that works like `spa` but ignores requests with extension + - Allow multiple `--open` arguments (@PirtleShell) + - Inject to `head` if `body` not found (@pmd1991) + - Update dependencies +* v1.1.0 + - Proxy support (@pavel) + - Middleware support (@achandrasekar) + - Dependency updates (@tapio, @rahatarmanahmed) + - Using Travis CI +* v1.0.0 + - HTTPS support (@pavel) + - HTTP Basic authentication support (@hey-johnnypark) + - CORS support (@pavel) + - Support mounting single files (@pavel) + - `--spa` cli option for single page apps, translates requests from /abc to /#/abc (@evanplaice) + - Check `IP` env var for default host (@dotnetCarpenter) + - Fix `ignorePattern` from config file (@cyfersystems) + - Fix test running for Windows (@peterhull90) +* v0.9.2 + - Updated most dependencies to latest versions + - `--quiet` now silences warning about injection failure + - Giving explicit `--watch` paths now disables adding mounted paths to watching +* v0.9.1 + - `--ignorePattern=RGXP` exclude files from watching by regexp (@psi-4ward) + - `--watch=PATH` cli option to only watch given paths +* v0.9.0 + - `--mount=ROUTE:PATH` cli option to specify alternative routes to paths (@pmentz) + - `--browser=BROWSER` cli option to specify browser to use (@sakiv) + - Improved error reporting + - Basic support for injecting the reload code to SVG files (@dotnetCarpenter, @tapio) + - LiveServer.shutdown() function to close down the server and file watchers + - If host parameter is given, use it for browser URL instead of resolved IP + - Initial testing framework (@harrytruong, @evanplaice, @tapio) +* v0.8.2 + - Load initial settings from `~/.live-server.json` if exists (@mikker) + - Allow `--port=0` to select random port (@viqueen) + - Fix injecting when file extension is not lower case (@gusgard) + - Fail gracefully if browser does not support WebSockets (@mattymaloney) + - Switched to a more maintained browser opening library +* v0.8.1 + - Add `--version / -v` command line flags to display version + - Add `--host` cli option to mirror the API parameter + - Once again use 127.0.0.1 instead of 0.0.0.0 as the browser URL +* v0.8.0 + - Support multiple clients simultaneously (@dvv) + - Pick a random available port if the default is in use (@oliverzy, @harrytruong) + - Fix Chrome sometimes not applying CSS changes (@harrytruong) + - `--ignore=PATH` cli option to not watch given server root relative paths (@richardgoater) + - `--entry-file=PATH` cli option to specify file to use when request is not found (@izeau) + - `--wait=MSECS` cli option to wait specified time before reloading (@leolower, @harrytruong) +* v0.7.1 + - Fix hang caused by trying to inject into fragment html files without `` + - `logLevel` parameter in library to control amount of console spam + - `--quiet` cli option to suppress console spam + - `--open=PATH` cli option to launch browser in specified path instead of root (@richardgoater) + - Library's `noBrowser: true` option is deprecated in favor of `open: false` +* v0.7.0 + - API BREAKAGE: LiveServer library now takes parameters in an object + - Add possibility to specify host to the lib + - Only inject to host page when working with web components (e.g. Polymer) (@davej) + - Open browser to 127.0.0.1, as 0.0.0.0 has issues + - `--no-browser` command line flag to suppress browser launch + - `--help` command line flag to display usage +* v0.6.4 + - Allow specifying port from the command line: `live-server --port=3000` (@Pomax) + - Don't inject script as the first thing so that DOCTYPE remains valid (@wmira) + - Be more explicit with listening to all interfaces (@inadarei) +* v0.6.3 + - Fix multiple _cacheOverride parameters polluting css requests + - Don't create global variables in the injected script +* v0.6.2 + - Fix a deprecation warning from `send` +* v0.6.1 + - Republish to fix npm troubles +* v0.6.0 + - Support for using as node library (@dpgraham) +* v0.5.0 + - Watching was broken with new versions of `watchr` > 2.3.3 + - Added some logging to console +* v0.4.0 + - Allow specifying directory to serve from command line +* v0.3.0 + - Directory listings +* v0.2.0 + - On-the-fly CSS refresh (no page reload) + - Refactoring +* v0.1.1 + - Documentation and meta tweaks +* v0.1.0 + - Initial release + + +License +------- + +Uses MIT licensed code from [Connect](https://github.com/senchalabs/connect/) and [Roots](https://github.com/jenius/roots). + +(MIT License) + +Copyright (c) 2012 Tapio Vierros + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/live-server/index.js b/node_modules/live-server/index.js new file mode 100644 index 0000000..77a2a7e --- /dev/null +++ b/node_modules/live-server/index.js @@ -0,0 +1,399 @@ +#!/usr/bin/env node +var fs = require('fs'), + connect = require('connect'), + serveIndex = require('serve-index'), + logger = require('morgan'), + WebSocket = require('faye-websocket'), + path = require('path'), + url = require('url'), + http = require('http'), + send = require('send'), + open = require('opn'), + es = require("event-stream"), + os = require('os'), + chokidar = require('chokidar'); +require('colors'); + +var INJECTED_CODE = fs.readFileSync(path.join(__dirname, "injected.html"), "utf8"); + +var LiveServer = { + server: null, + watcher: null, + logLevel: 2 +}; + +function escape(html){ + return String(html) + .replace(/&(?!\w+;)/g, '&') + .replace(/
/g, '>') + .replace(/"/g, '"'); +} + +// Based on connect.static(), but streamlined and with added code injecter +function staticServer(root) { + var isFile = false; + try { // For supporting mounting files instead of just directories + isFile = fs.statSync(root).isFile(); + } catch (e) { + if (e.code !== "ENOENT") throw e; + } + return function(req, res, next) { + if (req.method !== "GET" && req.method !== "HEAD") return next(); + var reqpath = isFile ? "" : url.parse(req.url).pathname; + var hasNoOrigin = !req.headers.origin; + var injectCandidates = [ new RegExp("", "i"), new RegExp(""), new RegExp("", "i")]; + var injectTag = null; + + function directory() { + var pathname = url.parse(req.originalUrl).pathname; + res.statusCode = 301; + res.setHeader('Location', pathname + '/'); + res.end('Redirecting to ' + escape(pathname) + '/'); + } + + function file(filepath /*, stat*/) { + var x = path.extname(filepath).toLocaleLowerCase(), match, + possibleExtensions = [ "", ".html", ".htm", ".xhtml", ".php", ".svg" ]; + if (hasNoOrigin && (possibleExtensions.indexOf(x) > -1)) { + // TODO: Sync file read here is not nice, but we need to determine if the html should be injected or not + var contents = fs.readFileSync(filepath, "utf8"); + for (var i = 0; i < injectCandidates.length; ++i) { + match = injectCandidates[i].exec(contents); + if (match) { + injectTag = match[0]; + break; + } + } + if (injectTag === null && LiveServer.logLevel >= 3) { + console.warn("Failed to inject refresh script!".yellow, + "Couldn't find any of the tags ", injectCandidates, "from", filepath); + } + } + } + + function error(err) { + if (err.status === 404) return next(); + next(err); + } + + function inject(stream) { + if (injectTag) { + // We need to modify the length given to browser + var len = INJECTED_CODE.length + res.getHeader('Content-Length'); + res.setHeader('Content-Length', len); + var originalPipe = stream.pipe; + stream.pipe = function(resp) { + originalPipe.call(stream, es.replace(new RegExp(injectTag, "i"), INJECTED_CODE + injectTag)).pipe(resp); + }; + } + } + + send(req, reqpath, { root: root }) + .on('error', error) + .on('directory', directory) + .on('file', file) + .on('stream', inject) + .pipe(res); + }; +} + +/** + * Rewrite request URL and pass it back to the static handler. + * @param staticHandler {function} Next handler + * @param file {string} Path to the entry point file + */ +function entryPoint(staticHandler, file) { + if (!file) return function(req, res, next) { next(); }; + + return function(req, res, next) { + req.url = "/" + file; + staticHandler(req, res, next); + }; +} + +/** + * Start a live server with parameters given as an object + * @param host {string} Address to bind to (default: 0.0.0.0) + * @param port {number} Port number (default: 8080) + * @param root {string} Path to root directory (default: cwd) + * @param watch {array} Paths to exclusively watch for changes + * @param ignore {array} Paths to ignore when watching files for changes + * @param ignorePattern {regexp} Ignore files by RegExp + * @param noCssInject Don't inject CSS changes, just reload as with any other file change + * @param open {(string|string[])} Subpath(s) to open in browser, use false to suppress launch (default: server root) + * @param mount {array} Mount directories onto a route, e.g. [['/components', './node_modules']]. + * @param logLevel {number} 0 = errors only, 1 = some, 2 = lots + * @param file {string} Path to the entry point file + * @param wait {number} Server will wait for all changes, before reloading + * @param htpasswd {string} Path to htpasswd file to enable HTTP Basic authentication + * @param middleware {array} Append middleware to stack, e.g. [function(req, res, next) { next(); }]. + */ +LiveServer.start = function(options) { + options = options || {}; + var host = options.host || '0.0.0.0'; + var port = options.port !== undefined ? options.port : 8080; // 0 means random + var root = options.root || process.cwd(); + var mount = options.mount || []; + var watchPaths = options.watch || [root]; + LiveServer.logLevel = options.logLevel === undefined ? 2 : options.logLevel; + var openPath = (options.open === undefined || options.open === true) ? + "" : ((options.open === null || options.open === false) ? null : options.open); + if (options.noBrowser) openPath = null; // Backwards compatibility with 0.7.0 + var file = options.file; + var staticServerHandler = staticServer(root); + var wait = options.wait === undefined ? 100 : options.wait; + var browser = options.browser || null; + var htpasswd = options.htpasswd || null; + var cors = options.cors || false; + var https = options.https || null; + var proxy = options.proxy || []; + var middleware = options.middleware || []; + var noCssInject = options.noCssInject; + var httpsModule = options.httpsModule; + + if (httpsModule) { + try { + require.resolve(httpsModule); + } catch (e) { + console.error(("HTTPS module \"" + httpsModule + "\" you've provided was not found.").red); + console.error("Did you do", "\"npm install " + httpsModule + "\"?"); + return; + } + } else { + httpsModule = "https"; + } + + // Setup a web server + var app = connect(); + + // Add logger. Level 2 logs only errors + if (LiveServer.logLevel === 2) { + app.use(logger('dev', { + skip: function (req, res) { return res.statusCode < 400; } + })); + // Level 2 or above logs all requests + } else if (LiveServer.logLevel > 2) { + app.use(logger('dev')); + } + if (options.spa) { + middleware.push("spa"); + } + // Add middleware + middleware.map(function(mw) { + if (typeof mw === "string") { + var ext = path.extname(mw).toLocaleLowerCase(); + if (ext !== ".js") { + mw = require(path.join(__dirname, "middleware", mw + ".js")); + } else { + mw = require(mw); + } + } + app.use(mw); + }); + + // Use http-auth if configured + if (htpasswd !== null) { + var auth = require('http-auth'); + var basic = auth.basic({ + realm: "Please authorize", + file: htpasswd + }); + app.use(auth.connect(basic)); + } + if (cors) { + app.use(require("cors")({ + origin: true, // reflecting request origin + credentials: true // allowing requests with credentials + })); + } + mount.forEach(function(mountRule) { + var mountPath = path.resolve(process.cwd(), mountRule[1]); + if (!options.watch) // Auto add mount paths to wathing but only if exclusive path option is not given + watchPaths.push(mountPath); + app.use(mountRule[0], staticServer(mountPath)); + if (LiveServer.logLevel >= 1) + console.log('Mapping %s to "%s"', mountRule[0], mountPath); + }); + proxy.forEach(function(proxyRule) { + var proxyOpts = url.parse(proxyRule[1]); + proxyOpts.via = true; + proxyOpts.preserveHost = true; + app.use(proxyRule[0], require('proxy-middleware')(proxyOpts)); + if (LiveServer.logLevel >= 1) + console.log('Mapping %s to "%s"', proxyRule[0], proxyRule[1]); + }); + app.use(staticServerHandler) // Custom static server + .use(entryPoint(staticServerHandler, file)) + .use(serveIndex(root, { icons: true })); + + var server, protocol; + if (https !== null) { + var httpsConfig = https; + if (typeof https === "string") { + httpsConfig = require(path.resolve(process.cwd(), https)); + } + server = require(httpsModule).createServer(httpsConfig, app); + protocol = "https"; + } else { + server = http.createServer(app); + protocol = "http"; + } + + // Handle server startup errors + server.addListener('error', function(e) { + if (e.code === 'EADDRINUSE') { + var serveURL = protocol + '://' + host + ':' + port; + console.log('%s is already in use. Trying another port.'.yellow, serveURL); + setTimeout(function() { + server.listen(0, host); + }, 1000); + } else { + console.error(e.toString().red); + LiveServer.shutdown(); + } + }); + + // Handle successful server + server.addListener('listening', function(/*e*/) { + LiveServer.server = server; + + var address = server.address(); + var serveHost = address.address === "0.0.0.0" ? "127.0.0.1" : address.address; + var openHost = host === "0.0.0.0" ? "127.0.0.1" : host; + + var serveURL = protocol + '://' + serveHost + ':' + address.port; + var openURL = protocol + '://' + openHost + ':' + address.port; + + var serveURLs = [ serveURL ]; + if (LiveServer.logLevel > 2 && address.address === "0.0.0.0") { + var ifaces = os.networkInterfaces(); + serveURLs = Object.keys(ifaces) + .map(function(iface) { + return ifaces[iface]; + }) + // flatten address data, use only IPv4 + .reduce(function(data, addresses) { + addresses.filter(function(addr) { + return addr.family === "IPv4"; + }).forEach(function(addr) { + data.push(addr); + }); + return data; + }, []) + .map(function(addr) { + return protocol + "://" + addr.address + ":" + address.port; + }); + } + + // Output + if (LiveServer.logLevel >= 1) { + if (serveURL === openURL) + if (serveURLs.length === 1) { + console.log(("Serving \"%s\" at %s").green, root, serveURLs[0]); + } else { + console.log(("Serving \"%s\" at\n\t%s").green, root, serveURLs.join("\n\t")); + } + else + console.log(("Serving \"%s\" at %s (%s)").green, root, openURL, serveURL); + } + + // Launch browser + if (openPath !== null) + if (typeof openPath === "object") { + openPath.forEach(function(p) { + open(openURL + p, {app: browser}); + }); + } else { + open(openURL + openPath, {app: browser}); + } + }); + + // Setup server to listen at port + server.listen(port, host); + + // WebSocket + var clients = []; + server.addListener('upgrade', function(request, socket, head) { + var ws = new WebSocket(request, socket, head); + ws.onopen = function() { ws.send('connected'); }; + + if (wait > 0) { + (function() { + var wssend = ws.send; + var waitTimeout; + ws.send = function() { + var args = arguments; + if (waitTimeout) clearTimeout(waitTimeout); + waitTimeout = setTimeout(function(){ + wssend.apply(ws, args); + }, wait); + }; + })(); + } + + ws.onclose = function() { + clients = clients.filter(function (x) { + return x !== ws; + }); + }; + + clients.push(ws); + }); + + var ignored = [ + function(testPath) { // Always ignore dotfiles (important e.g. because editor hidden temp files) + return testPath !== "." && /(^[.#]|(?:__|~)$)/.test(path.basename(testPath)); + } + ]; + if (options.ignore) { + ignored = ignored.concat(options.ignore); + } + if (options.ignorePattern) { + ignored.push(options.ignorePattern); + } + // Setup file watcher + LiveServer.watcher = chokidar.watch(watchPaths, { + ignored: ignored, + ignoreInitial: true + }); + function handleChange(changePath) { + var cssChange = path.extname(changePath) === ".css" && !noCssInject; + if (LiveServer.logLevel >= 1) { + if (cssChange) + console.log("CSS change detected".magenta, changePath); + else console.log("Change detected".cyan, changePath); + } + clients.forEach(function(ws) { + if (ws) + ws.send(cssChange ? 'refreshcss' : 'reload'); + }); + } + LiveServer.watcher + .on("change", handleChange) + .on("add", handleChange) + .on("unlink", handleChange) + .on("addDir", handleChange) + .on("unlinkDir", handleChange) + .on("ready", function () { + if (LiveServer.logLevel >= 1) + console.log("Ready for changes".cyan); + }) + .on("error", function (err) { + console.log("ERROR:".red, err); + }); + + return server; +}; + +LiveServer.shutdown = function() { + var watcher = LiveServer.watcher; + if (watcher) { + watcher.close(); + } + var server = LiveServer.server; + if (server) + server.close(); +}; + +module.exports = LiveServer; diff --git a/node_modules/live-server/injected.html b/node_modules/live-server/injected.html new file mode 100644 index 0000000..59b7695 --- /dev/null +++ b/node_modules/live-server/injected.html @@ -0,0 +1,31 @@ + + diff --git a/node_modules/live-server/live-server.js b/node_modules/live-server/live-server.js new file mode 100644 index 0000000..9eac8f1 --- /dev/null +++ b/node_modules/live-server/live-server.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +var path = require('path'); +var fs = require('fs'); +var assign = require('object-assign'); +var liveServer = require("./index"); + +var opts = { + host: process.env.IP, + port: process.env.PORT, + open: true, + mount: [], + proxy: [], + middleware: [], + logLevel: 2, +}; + +var homeDir = process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; +var configPath = path.join(homeDir, '.live-server.json'); +if (fs.existsSync(configPath)) { + var userConfig = fs.readFileSync(configPath, 'utf8'); + assign(opts, JSON.parse(userConfig)); + if (opts.ignorePattern) opts.ignorePattern = new RegExp(opts.ignorePattern); +} + +for (var i = process.argv.length - 1; i >= 2; --i) { + var arg = process.argv[i]; + if (arg.indexOf("--port=") > -1) { + var portString = arg.substring(7); + var portNumber = parseInt(portString, 10); + if (portNumber === +portString) { + opts.port = portNumber; + process.argv.splice(i, 1); + } + } + else if (arg.indexOf("--host=") > -1) { + opts.host = arg.substring(7); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--open=") > -1) { + var open = arg.substring(7); + if (open.indexOf('/') !== 0) { + open = '/' + open; + } + switch (typeof opts.open) { + case "boolean": + opts.open = open; + break; + case "string": + opts.open = [opts.open, open]; + break; + case "object": + opts.open.push(open); + break; + } + process.argv.splice(i, 1); + } + else if (arg.indexOf("--watch=") > -1) { + // Will be modified later when cwd is known + opts.watch = arg.substring(8).split(","); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--ignore=") > -1) { + // Will be modified later when cwd is known + opts.ignore = arg.substring(9).split(","); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--ignorePattern=") > -1) { + opts.ignorePattern = new RegExp(arg.substring(16)); + process.argv.splice(i, 1); + } + else if (arg === "--no-css-inject") { + opts.noCssInject = true; + process.argv.splice(i, 1); + } + else if (arg === "--no-browser") { + opts.open = false; + process.argv.splice(i, 1); + } + else if (arg.indexOf("--browser=") > -1) { + opts.browser = arg.substring(10).split(","); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--entry-file=") > -1) { + var file = arg.substring(13); + if (file.length) { + opts.file = file; + process.argv.splice(i, 1); + } + } + else if (arg === "--spa") { + opts.middleware.push("spa"); + process.argv.splice(i, 1); + } + else if (arg === "--quiet" || arg === "-q") { + opts.logLevel = 0; + process.argv.splice(i, 1); + } + else if (arg === "--verbose" || arg === "-V") { + opts.logLevel = 3; + process.argv.splice(i, 1); + } + else if (arg.indexOf("--mount=") > -1) { + // e.g. "--mount=/components:./node_modules" will be ['/components', '/node_modules'] + // split only on the first ":", as the path may contain ":" as well (e.g. C:\file.txt) + var match = arg.substring(8).match(/([^:]+):(.+)$/); + match[2] = path.resolve(process.cwd(), match[2]); + opts.mount.push([ match[1], match[2] ]); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--wait=") > -1) { + var waitString = arg.substring(7); + var waitNumber = parseInt(waitString, 10); + if (waitNumber === +waitString) { + opts.wait = waitNumber; + process.argv.splice(i, 1); + } + } + else if (arg === "--version" || arg === "-v") { + var packageJson = require('./package.json'); + console.log(packageJson.name, packageJson.version); + process.exit(); + } + else if (arg.indexOf("--htpasswd=") > -1) { + opts.htpasswd = arg.substring(11); + process.argv.splice(i, 1); + } + else if (arg === "--cors") { + opts.cors = true; + process.argv.splice(i, 1); + } + else if (arg.indexOf("--https=") > -1) { + opts.https = arg.substring(8); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--https-module=") > -1) { + opts.httpsModule = arg.substring(15); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--proxy=") > -1) { + // split only on the first ":", as the URL will contain ":" as well + var match = arg.substring(8).match(/([^:]+):(.+)$/); + opts.proxy.push([ match[1], match[2] ]); + process.argv.splice(i, 1); + } + else if (arg.indexOf("--middleware=") > -1) { + opts.middleware.push(arg.substring(13)); + process.argv.splice(i, 1); + } + else if (arg === "--help" || arg === "-h") { + console.log('Usage: live-server [-v|--version] [-h|--help] [-q|--quiet] [--port=PORT] [--host=HOST] [--open=PATH] [--no-browser] [--browser=BROWSER] [--ignore=PATH] [--ignorePattern=RGXP] [--no-css-inject] [--entry-file=PATH] [--spa] [--mount=ROUTE:PATH] [--wait=MILLISECONDS] [--htpasswd=PATH] [--cors] [--https=PATH] [--https-module=MODULE_NAME] [--proxy=PATH] [PATH]'); + process.exit(); + } + else if (arg === "--test") { + // Hidden param for tests to exit automatically + setTimeout(liveServer.shutdown, 500); + process.argv.splice(i, 1); + } +} + +// Patch paths +var dir = opts.root = process.argv[2] || ""; + +if (opts.watch) { + opts.watch = opts.watch.map(function(relativePath) { + return path.join(dir, relativePath); + }); +} +if (opts.ignore) { + opts.ignore = opts.ignore.map(function(relativePath) { + return path.join(dir, relativePath); + }); +} + +liveServer.start(opts); diff --git a/node_modules/live-server/middleware/example.js b/node_modules/live-server/middleware/example.js new file mode 100644 index 0000000..cd5fd7a --- /dev/null +++ b/node_modules/live-server/middleware/example.js @@ -0,0 +1,5 @@ +module.exports = function(req, res, next) { + res.statusCode = 202; + next(); +} + diff --git a/node_modules/live-server/middleware/spa-ignore-assets.js b/node_modules/live-server/middleware/spa-ignore-assets.js new file mode 100644 index 0000000..ead9e9c --- /dev/null +++ b/node_modules/live-server/middleware/spa-ignore-assets.js @@ -0,0 +1,14 @@ +// Single Page Apps - redirect to /#/ except when a file extension is given +var path = require('path'); +module.exports = function(req, res, next) { + if (req.method !== "GET" && req.method !== "HEAD") + next(); + if (req.url !== '/' && path.extname(req.url) === '') { + var route = req.url; + req.url = '/'; + res.statusCode = 302; + res.setHeader('Location', req.url + '#' + route); + res.end(); + } + else next(); +} diff --git a/node_modules/live-server/middleware/spa.js b/node_modules/live-server/middleware/spa.js new file mode 100644 index 0000000..6326e4b --- /dev/null +++ b/node_modules/live-server/middleware/spa.js @@ -0,0 +1,13 @@ +// Single Page Apps - redirect to /#/ +module.exports = function(req, res, next) { + if (req.method !== "GET" && req.method !== "HEAD") + next(); + if (req.url !== '/') { + var route = req.url; + req.url = '/'; + res.statusCode = 302; + res.setHeader('Location', req.url + '#' + route); + res.end(); + } + else next(); +} diff --git a/node_modules/live-server/node_modules/chokidar/CHANGELOG.md b/node_modules/live-server/node_modules/chokidar/CHANGELOG.md new file mode 100644 index 0000000..43a37c8 --- /dev/null +++ b/node_modules/live-server/node_modules/chokidar/CHANGELOG.md @@ -0,0 +1,317 @@ +# Chokidar 2.1.5 (Mar 22, 2019) +* Revert 2.1.3 atomic writing changes. + +# Chokidar 2.1.4 (Mar 22, 2019) +* Improve TypeScript type definitions for `on` method. + +# Chokidar 2.1.3 (Mar 22, 2019) +* Improve atomic writes handling + +# Chokidar 2.1.2 (Feb 18, 2019) +* Add TypeScript type definitions +* More fixes for accessTime behavior (#800) + +# Chokidar 2.1.1 (Feb 8, 2019) +* Handle simultaneous change of LastAccessTime and ModifiedTime (#793) + +# Chokidar 2.1.0 (Feb 5, 2019) +* Ignore accessTime updates caused by read operations (#762). +* Updated dependencies. Removed `lodash.debounce`. + +# Chokidar 2.0.4 (Jun 18, 2018) +* Prevent watcher.close() from crashing (#730). + +# Chokidar 2.0.3 (Mar 22, 2018) +* Fixes an issue that using fd = 0 is not closed in case +Windows is used and a `EPERM` error is triggered. + +# Chokidar 2.0.2 (Feb 14, 2018) +* Allow semver range updates for upath dependency + +# Chokidar 2.0.1 (Feb 8, 2018) + * Fix #668 glob issue on Windows when using `ignore` and `cwd`. Thanks @remy! + * Fix #546 possible uncaught exception when using `awaitWriteFinish`. + Thanks @dsagal! + +# Chokidar 2.0.0 (Dec 29, 2017) +* Breaking: Upgrade globbing dependencies which require globs to be more strict and always use POSIX-style slashes because Windows-style slashes are used as escape sequences +* Update tests to work with upgraded globbing dependencies +* Add ability to log FSEvents require error by setting `CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR` env +* Fix for handling braces in globs +* Add node 8 & 9 to CI configs +* Allow node 0.10 failures on Windows + +# Chokidar 1.7.0 (May 8, 2017) +* Add `disableGlobbing` option +* Add ability to force interval value by setting CHOKIDAR_INTERVAL env + variable +* Fix issue with `.close()` being called before `ready` + +# Chokidar 1.6.0 (Jun 22, 2016) +* Added ability for force `usePolling` mode by setting `CHOKIDAR_USEPOLLING` + env variable + +# Chokidar 1.5.2 (Jun 7, 2016) +* Fix missing `addDir` events when using `cwd` and `alwaysStat` options +* Fix missing `add` events for files within a renamed directory + +# Chokidar 1.5.1 (May 20, 2016) +* To help prevent exhaustion of FSEvents system limitations, consolidate watch + instances to the common parent upon detection of separate watch instances on + many siblings + +# Chokidar 1.5.0 (May 10, 2016) +* Make debounce delay setting used with `atomic: true` user-customizable +* Fixes and improvements to `awaitWriteFinish` features + +# Chokidar 1.4.3 (Feb 26, 2016) +* Update async-each dependency to ^1.0.0 + +# Chokidar 1.4.2 (Dec 30, 2015) +* Now correctly emitting `stats` with `awaitWriteFinish` option. + +# Chokidar 1.4.1 (Dec 9, 2015) +* The watcher could now be correctly subclassed with ES6 class syntax. + +# Chokidar 1.4.0 (Dec 3, 2015) +* Add `.getWatched()` method, exposing all file system entries being watched +* Apply `awaitWriteFinish` methodology to `change` events (in addition to `add`) +* Fix handling of symlinks within glob paths (#293) +* Fix `addDir` and `unlinkDir` events under globs (#337, #401) +* Fix issues with `.unwatch()` (#374, #403) + +# Chokidar 1.3.0 (Nov 18, 2015) +* Improve `awaitWriteFinish` option behavior +* Fix some `cwd` option behavior on Windows +* `awaitWriteFinish` and `cwd` are now compatible +* Fix some race conditions. +* #379: Recreating deleted directory doesn't trigger event +* When adding a previously-deleted file, emit 'add', not 'change' + +# Chokidar 1.2.0 (Oct 1, 2015) +* Allow nested arrays of paths to be provided to `.watch()` and `.add()` +* Add `awaitWriteFinish` option + +# Chokidar 1.1.0 (Sep 23, 2015) +* Dependency updates including fsevents@1.0.0, improving installation + +# Chokidar 1.0.6 (Sep 18, 2015) +* Fix issue with `.unwatch()` method and relative paths + +# Chokidar 1.0.5 (Jul 20, 2015) +* Fix regression with regexes/fns using in `ignored` + +# Chokidar 1.0.4 (Jul 15, 2015) +* Fix bug with `ignored` files/globs while `cwd` option is set + +# Chokidar 1.0.3 (Jun 4, 2015) +* Fix race issue with `alwaysStat` option and removed files + +# Chokidar 1.0.2 (May 30, 2015) +* Fix bug with absolute paths and ENAMETOOLONG error + +# Chokidar 1.0.1 (Apr 8, 2015) +* Fix bug with `.close()` method in `fs.watch` mode with `persistent: false` + option + +# Chokidar 1.0.0 (Apr 7, 2015) +* Glob support! Use globs in `watch`, `add`, and `unwatch` methods +* Comprehensive symlink support +* New `unwatch` method to turn off watching of previously watched paths +* More flexible `ignored` option allowing regex, function, glob, or array + courtesy of [anymatch](https://github.com/es128/anymatch) +* New `cwd` option to set base dir from which relative paths are derived +* New `depth` option for limiting recursion +* New `alwaysStat` option to ensure + [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) gets passed + with every add/change event +* New `ready` event emitted when initial fs tree scan is done and watcher is + ready for changes +* New `raw` event exposing data and events from the lower-level watch modules +* New `followSymlinks` option to impact whether symlinks' targets or the symlink + files themselves are watched +* New `atomic` option for normalizing artifacts from text editors that use + atomic write methods +* Ensured watcher's stability with lots of bugfixes. + +# Chokidar 0.12.6 (Jan 6, 2015) +* Fix bug which breaks `persistent: false` mode when change events occur + +# Chokidar 0.12.5 (Dec 17, 2014) +* Fix bug with matching parent path detection for fsevents instance sharing +* Fix bug with ignored watch path in nodefs modes + +# Chokidar 0.12.4 (Dec 14, 2014) +* Fix bug in `fs.watch` mode that caused watcher to leak into `cwd` +* Fix bug preventing ready event when there are symlinks to ignored paths + +# Chokidar 0.12.3 (Dec 13, 2014) +* Fix handling of special files such as named pipes and sockets + +# Chokidar 0.12.2 (Dec 12, 2014) +* Fix recursive symlink handling and some other path resolution problems + +# Chokidar 0.12.1 (Dec 10, 2014) +* Fix a case where file symlinks were not followed properly + +# Chokidar 0.12.0 (Dec 8, 2014) +* Symlink support + * Add `followSymlinks` option, which defaults to `true` +* Change default watch mode on Linux to non-polling `fs.watch` +* Add `atomic` option to normalize events from editors using atomic writes + * Particularly Vim and Sublime +* Add `raw` event which exposes data from the underlying watch method + +# Chokidar 0.11.1 (Nov 19, 2014) +* Fix a bug where an error is thrown when `fs.watch` instantiation fails + +# Chokidar 0.11.0 (Nov 16, 2014) +* Add a `ready` event, which is emitted after initial file scan completes +* Fix issue with options keys passed in defined as `undefined` +* Rename some internal `FSWatcher` properties to indicate they're private + +# Chokidar 0.10.9 (Nov 15, 2014) +* Fix some leftover issues from adding watcher reuse + +# Chokidar 0.10.8 (Nov 14, 2014) +* Remove accidentally committed/published `console.log` statement. +* Sry 'bout that :crying_cat_face: + +# Chokidar 0.10.7 (Nov 14, 2014) +* Apply watcher reuse methodology to `fs.watch` and `fs.watchFile` as well + +# Chokidar 0.10.6 (Nov 12, 2014) +* More efficient creation/reuse of FSEvents instances to avoid system limits +* Reduce simultaneous FSEvents instances allowed in a process +* Handle errors thrown by `fs.watch` upon invocation + +# Chokidar 0.10.5 (Nov 6, 2014) +* Limit number of simultaneous FSEvents instances (fall back to other methods) +* Prevent some cases of EMFILE errors during initialization +* Fix ignored files emitting events in some fsevents-mode circumstances + +# Chokidar 0.10.4 (Nov 5, 2014) +* Bump fsevents dependency to ~0.3.1 + * Should resolve build warnings and `npm rebuild` on non-Macs + +# Chokidar 0.10.3 (Oct 28, 2014) +* Fix removed dir emitting as `unlink` instead of `unlinkDir` +* Fix issues with file changing to dir or vice versa (gh-165) +* Fix handling of `ignored` option in fsevents mode + +# Chokidar 0.10.2 (Oct 23, 2014) +* Improve individual file watching +* Fix fsevents keeping process alive when `persistent: false` + +# Chokidar 0.10.1 (19 October 2014) +* Improve handling of text editor atomic writes + +# Chokidar 0.10.0 (Oct 18, 2014) +* Many stability and consistency improvements +* Resolve many cases of duplicate or wrong events +* Correct for fsevents inconsistencies +* Standardize handling of errors and relative paths +* Fix issues with watching `./` + +# Chokidar 0.9.0 (Sep 25, 2014) +* Updated fsevents to 0.3 +* Update per-system defaults +* Fix issues with closing chokidar instance +* Fix duplicate change events on win32 + +# Chokidar 0.8.2 (Mar 26, 2014) +* Fixed npm issues related to fsevents dep. +* Updated fsevents to 0.2. + +# Chokidar 0.8.1 (Dec 16, 2013) +* Optional deps are now truly optional on windows and + linux. +* Rewritten in JS, again. +* Fixed some FSEvents-related bugs. + +# Chokidar 0.8.0 (Nov 29, 2013) +* Added ultra-fast low-CPU OS X file watching with FSEvents. + It is enabled by default. +* Added `addDir` and `unlinkDir` events. +* Polling is now disabled by default on all platforms. + +# Chokidar 0.7.1 (Nov 18, 2013) +* `Watcher#close` now also removes all event listeners. + +# Chokidar 0.7.0 (Oct 22, 2013) +* When `options.ignored` is two-argument function, it will + also be called after stating the FS, with `stats` argument. +* `unlink` is no longer emitted on directories. + +# Chokidar 0.6.3 (Aug 12, 2013) +* Added `usePolling` option (default: `true`). + When `false`, chokidar will use `fs.watch` as backend. + `fs.watch` is much faster, but not like super reliable. + +# Chokidar 0.6.2 (Mar 19, 2013) +* Fixed watching initially empty directories with `ignoreInitial` option. + +# Chokidar 0.6.1 (Mar 19, 2013) +* Added node.js 0.10 support. + +# Chokidar 0.6.0 (Mar 10, 2013) +* File attributes (stat()) are now passed to `add` and `change` events as second + arguments. +* Changed default polling interval for binary files to 300ms. + +# Chokidar 0.5.3 (Jan 13, 2013) +* Removed emitting of `change` events before `unlink`. + +# Chokidar 0.5.2 (Jan 13, 2013) +* Removed postinstall script to prevent various npm bugs. + +# Chokidar 0.5.1 (Jan 6, 2013) +* When starting to watch non-existing paths, chokidar will no longer throw + ENOENT error. +* Fixed bug with absolute path. + +# Chokidar 0.5.0 (Dec 9, 2012) +* Added a bunch of new options: + * `ignoreInitial` that allows to ignore initial `add` events. + * `ignorePermissionErrors` that allows to ignore ENOENT etc perm errors. + * `interval` and `binaryInterval` that allow to change default + fs polling intervals. + +# Chokidar 0.4.0 (Jul 26, 2012) +* Added `all` event that receives two args (event name and path) that combines + `add`, `change` and `unlink` events. +* Switched to `fs.watchFile` on node.js 0.8 on windows. +* Files are now correctly unwatched after unlink. + +# Chokidar 0.3.0 (Jun 24, 2012) +* `unlink` event are no longer emitted for directories, for consistency with + `add`. + +# Chokidar 0.2.6 (Jun 8, 2012) +* Prevented creating of duplicate 'add' events. + +# Chokidar 0.2.5 (Jun 8, 2012) +* Fixed a bug when new files in new directories hadn't been added. + +# Chokidar 0.2.4 (Jun 7, 2012) +* Fixed a bug when unlinked files emitted events after unlink. + +# Chokidar 0.2.3 (May 12, 2012) +* Fixed watching of files on windows. + +# Chokidar 0.2.2 (May 4, 2012) +* Fixed watcher signature. + +# Chokidar 0.2.1 (May 4, 2012) +* Fixed invalid API bug when using `watch()`. + +# Chokidar 0.2.0 (May 4, 2012) +* Rewritten in js. + +# Chokidar 0.1.1 (Apr 26, 2012) +* Changed api to `chokidar.watch()`. +* Fixed compilation on windows. + +# Chokidar 0.1.0 (Apr 20, 2012) +* Initial release, extracted from + [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66) diff --git a/node_modules/live-server/node_modules/chokidar/README.md b/node_modules/live-server/node_modules/chokidar/README.md new file mode 100644 index 0000000..ab66c17 --- /dev/null +++ b/node_modules/live-server/node_modules/chokidar/README.md @@ -0,0 +1,294 @@ +# Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Mac/Linux Build Status](https://img.shields.io/travis/paulmillr/chokidar/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/paulmillr/chokidar) [![Windows Build status](https://img.shields.io/appveyor/ci/paulmillr/chokidar/master.svg?label=Windows)](https://ci.appveyor.com/project/paulmillr/chokidar/branch/master) [![Coverage Status](https://coveralls.io/repos/paulmillr/chokidar/badge.svg)](https://coveralls.io/r/paulmillr/chokidar) + +> A neat wrapper around node.js fs.watch / fs.watchFile / FSEvents. + +[![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/chokidar) + +## Why? +Node.js `fs.watch`: + +* Doesn't report filenames on MacOS. +* Doesn't report events at all when using editors like Sublime on MacOS. +* Often reports events twice. +* Emits most changes as `rename`. +* Has [a lot of other issues](https://github.com/nodejs/node/search?q=fs.watch&type=Issues) +* Does not provide an easy way to recursively watch file trees. + +Node.js `fs.watchFile`: + +* Almost as bad at event handling. +* Also does not provide any recursive watching. +* Results in high CPU utilization. + +Chokidar resolves these problems. + +Initially made for **[Brunch](http://brunch.io)** (an ultra-swift web app build tool), it is now used in +[gulp](https://github.com/gulpjs/gulp/), +[karma](http://karma-runner.github.io), +[PM2](https://github.com/Unitech/PM2), +[browserify](http://browserify.org/), +[webpack](http://webpack.github.io/), +[BrowserSync](http://www.browsersync.io/), +[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode), +and [many others](https://www.npmjs.org/browse/depended/chokidar/). +It has proven itself in production environments. + +## How? +Chokidar does still rely on the Node.js core `fs` module, but when using +`fs.watch` and `fs.watchFile` for watching, it normalizes the events it +receives, often checking for truth by getting file stats and/or dir contents. + +On MacOS, chokidar by default uses a native extension exposing the Darwin +`FSEvents` API. This provides very efficient recursive watching compared with +implementations like `kqueue` available on most \*nix platforms. Chokidar still +does have to do some work to normalize the events received that way as well. + +On other platforms, the `fs.watch`-based implementation is the default, which +avoids polling and keeps CPU usage down. Be advised that chokidar will initiate +watchers recursively for everything within scope of the paths that have been +specified, so be judicious about not wasting system resources by watching much +more than needed. + +## Getting started +Install with npm: + +```sh +npm install chokidar +``` + +Then `require` and use it in your code: + +```javascript +var chokidar = require('chokidar'); + +// One-liner for current directory, ignores .dotfiles +chokidar.watch('.', {ignored: /(^|[\/\\])\../}).on('all', (event, path) => { + console.log(event, path); +}); +``` + +```javascript +// Example of a more typical implementation structure: + +// Initialize watcher. +var watcher = chokidar.watch('file, dir, glob, or array', { + ignored: /(^|[\/\\])\../, + persistent: true +}); + +// Something to use when events are received. +var log = console.log.bind(console); +// Add event listeners. +watcher + .on('add', path => log(`File ${path} has been added`)) + .on('change', path => log(`File ${path} has been changed`)) + .on('unlink', path => log(`File ${path} has been removed`)); + +// More possible events. +watcher + .on('addDir', path => log(`Directory ${path} has been added`)) + .on('unlinkDir', path => log(`Directory ${path} has been removed`)) + .on('error', error => log(`Watcher error: ${error}`)) + .on('ready', () => log('Initial scan complete. Ready for changes')) + .on('raw', (event, path, details) => { + log('Raw event info:', event, path, details); + }); + +// 'add', 'addDir' and 'change' events also receive stat() results as second +// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats +watcher.on('change', (path, stats) => { + if (stats) console.log(`File ${path} changed size to ${stats.size}`); +}); + +// Watch new files. +watcher.add('new-file'); +watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); + +// Get list of actual paths being watched on the filesystem +var watchedPaths = watcher.getWatched(); + +// Un-watch some files. +watcher.unwatch('new-file*'); + +// Stop watching. +watcher.close(); + +// Full list of options. See below for descriptions. (do not use this example) +chokidar.watch('file', { + persistent: true, + + ignored: '*.txt', + ignoreInitial: false, + followSymlinks: true, + cwd: '.', + disableGlobbing: false, + + usePolling: true, + interval: 100, + binaryInterval: 300, + alwaysStat: false, + depth: 99, + awaitWriteFinish: { + stabilityThreshold: 2000, + pollInterval: 100 + }, + + ignorePermissionErrors: false, + atomic: true // or a custom 'atomicity delay', in milliseconds (default 100) +}); + +``` + +## API + +`chokidar.watch(paths, [options])` + +* `paths` (string or array of strings). Paths to files, dirs to be watched +recursively, or glob patterns. +* `options` (object) Options object as defined below: + +#### Persistence + +* `persistent` (default: `true`). Indicates whether the process +should continue to run as long as files are being watched. If set to +`false` when using `fsevents` to watch, no more events will be emitted +after `ready`, even if the process continues to run. + +#### Path filtering + +* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition) +Defines files/paths to be ignored. The whole relative or absolute path is +tested, not just filename. If a function with two arguments is provided, it +gets called twice per path - once with a single argument (the path), second +time with two arguments (the path and the +[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) +object of that path). +* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while +instantiating the watching as chokidar discovers these file paths (before the `ready` event). +* `followSymlinks` (default: `true`). When `false`, only the +symlinks themselves will be watched for changes instead of following +the link references and bubbling events through the link's path. +* `cwd` (no default). The base directory from which watch `paths` are to be +derived. Paths emitted with events will be relative to this. +* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as +literal path names, even if they look like globs. + +#### Performance + +* `usePolling` (default: `false`). +Whether to use fs.watchFile (backed by polling), or fs.watch. If polling +leads to high CPU utilization, consider setting this to `false`. It is +typically necessary to **set this to `true` to successfully watch files over +a network**, and it may be necessary to successfully watch files in other +non-standard situations. Setting to `true` explicitly on MacOS overrides the +`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable +to true (1) or false (0) in order to override this option. +* _Polling-specific settings_ (effective when `usePolling: true`) + * `interval` (default: `100`). Interval of file system polling. You may also + set the CHOKIDAR_INTERVAL env variable to override this option. + * `binaryInterval` (default: `300`). Interval of file system + polling for binary files. + ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) +* `useFsEvents` (default: `true` on MacOS). Whether to use the +`fsevents` watching interface if available. When set to `true` explicitly +and `fsevents` is available this supercedes the `usePolling` setting. When +set to `false` on MacOS, `usePolling: true` becomes the default. +* `alwaysStat` (default: `false`). If relying upon the +[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) +object that may get passed with `add`, `addDir`, and `change` events, set +this to `true` to ensure it is provided even in cases where it wasn't +already available from the underlying watch events. +* `depth` (default: `undefined`). If set, limits how many levels of +subdirectories will be traversed. +* `awaitWriteFinish` (default: `false`). +By default, the `add` event will fire when a file first appears on disk, before +the entire file has been written. Furthermore, in some cases some `change` +events will be emitted while the file is being written. In some cases, +especially when watching for large files there will be a need to wait for the +write operation to finish before responding to a file creation or modification. +Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, +holding its `add` and `change` events until the size does not change for a +configurable amount of time. The appropriate duration setting is heavily +dependent on the OS and hardware. For accurate detection this parameter should +be relatively high, making file watching much less responsive. +Use with caution. + * *`options.awaitWriteFinish` can be set to an object in order to adjust + timing params:* + * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in + milliseconds for a file size to remain constant before emitting its event. + * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval. + +#### Errors +* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files +that don't have read permissions if possible. If watching fails due to `EPERM` +or `EACCES` with this set to `true`, the errors will be suppressed silently. +* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`). +Automatically filters out artifacts that occur when using editors that use +"atomic writes" instead of writing directly to the source file. If a file is +re-added within 100 ms of being deleted, Chokidar emits a `change` event +rather than `unlink` then `add`. If the default of 100 ms does not work well +for you, you can override it by setting `atomic` to a custom value, in +milliseconds. + +### Methods & Events + +`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`: + +* `.add(path / paths)`: Add files, directories, or glob patterns for tracking. +Takes an array of strings or just one string. +* `.on(event, callback)`: Listen for an FS event. +Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`, +`raw`, `error`. +Additionally `all` is available which gets emitted with the underlying event +name and path for every event other than `ready`, `raw`, and `error`. +* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns. +Takes an array of strings or just one string. +* `.close()`: Removes all listeners from watched files. +* `.getWatched()`: Returns an object representing all the paths on the file +system being watched by this `FSWatcher` instance. The object's keys are all the +directories (using absolute paths unless the `cwd` option was used), and the +values are arrays of the names of the items contained in each directory. + +## CLI + +If you need a CLI interface for your file watching, check out +[chokidar-cli](https://github.com/kimmobrunfeldt/chokidar-cli), allowing you to +execute a command on each change, or get a stdio stream of change events. + +## Install Troubleshooting + +* `npm WARN optional dep failed, continuing fsevents@n.n.n` + * This message is normal part of how `npm` handles optional dependencies and is + not indicative of a problem. Even if accompanied by other related error messages, + Chokidar should function properly. + +* `ERR! stack Error: Python executable "python" is v3.4.1, which is not supported by gyp.` + * You should be able to resolve this by installing python 2.7 and running: + `npm config set python python2.7` + +* `gyp ERR! stack Error: not found: make` + * On Mac, install the XCode command-line tools + +## License + +The MIT License (MIT) + +Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com) & Elan Shanker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/live-server/node_modules/chokidar/index.js b/node_modules/live-server/node_modules/chokidar/index.js new file mode 100644 index 0000000..c5257ac --- /dev/null +++ b/node_modules/live-server/node_modules/chokidar/index.js @@ -0,0 +1,747 @@ +'use strict'; +var EventEmitter = require('events').EventEmitter; +var fs = require('fs'); +var sysPath = require('path'); +var asyncEach = require('async-each'); +var anymatch = require('anymatch'); +var globParent = require('glob-parent'); +var isGlob = require('is-glob'); +var isAbsolute = require('path-is-absolute'); +var inherits = require('inherits'); +var braces = require('braces'); +var normalizePath = require('normalize-path'); +var upath = require('upath'); + +var NodeFsHandler = require('./lib/nodefs-handler'); +var FsEventsHandler = require('./lib/fsevents-handler'); + +var arrify = function(value) { + if (value == null) return []; + return Array.isArray(value) ? value : [value]; +}; + +var flatten = function(list, result) { + if (result == null) result = []; + list.forEach(function(item) { + if (Array.isArray(item)) { + flatten(item, result); + } else { + result.push(item); + } + }); + return result; +}; + +// Little isString util for use in Array#every. +var isString = function(thing) { + return typeof thing === 'string'; +}; + +// Public: Main class. +// Watches files & directories for changes. +// +// * _opts - object, chokidar options hash +// +// Emitted events: +// `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` +// +// Examples +// +// var watcher = new FSWatcher() +// .add(directories) +// .on('add', path => console.log('File', path, 'was added')) +// .on('change', path => console.log('File', path, 'was changed')) +// .on('unlink', path => console.log('File', path, 'was removed')) +// .on('all', (event, path) => console.log(path, ' emitted ', event)) +// +function FSWatcher(_opts) { + EventEmitter.call(this); + var opts = {}; + // in case _opts that is passed in is a frozen object + if (_opts) for (var opt in _opts) opts[opt] = _opts[opt]; + this._watched = Object.create(null); + this._closers = Object.create(null); + this._ignoredPaths = Object.create(null); + Object.defineProperty(this, '_globIgnored', { + get: function() { return Object.keys(this._ignoredPaths); } + }); + this.closed = false; + this._throttled = Object.create(null); + this._symlinkPaths = Object.create(null); + + function undef(key) { + return opts[key] === undefined; + } + + // Set up default options. + if (undef('persistent')) opts.persistent = true; + if (undef('ignoreInitial')) opts.ignoreInitial = false; + if (undef('ignorePermissionErrors')) opts.ignorePermissionErrors = false; + if (undef('interval')) opts.interval = 100; + if (undef('binaryInterval')) opts.binaryInterval = 300; + if (undef('disableGlobbing')) opts.disableGlobbing = false; + this.enableBinaryInterval = opts.binaryInterval !== opts.interval; + + // Enable fsevents on OS X when polling isn't explicitly enabled. + if (undef('useFsEvents')) opts.useFsEvents = !opts.usePolling; + + // If we can't use fsevents, ensure the options reflect it's disabled. + if (!FsEventsHandler.canUse()) opts.useFsEvents = false; + + // Use polling on Mac if not using fsevents. + // Other platforms use non-polling fs.watch. + if (undef('usePolling') && !opts.useFsEvents) { + opts.usePolling = process.platform === 'darwin'; + } + + // Global override (useful for end-developers that need to force polling for all + // instances of chokidar, regardless of usage/dependency depth) + var envPoll = process.env.CHOKIDAR_USEPOLLING; + if (envPoll !== undefined) { + var envLower = envPoll.toLowerCase(); + + if (envLower === 'false' || envLower === '0') { + opts.usePolling = false; + } else if (envLower === 'true' || envLower === '1') { + opts.usePolling = true; + } else { + opts.usePolling = !!envLower + } + } + var envInterval = process.env.CHOKIDAR_INTERVAL; + if (envInterval) { + opts.interval = parseInt(envInterval); + } + + // Editor atomic write normalization enabled by default with fs.watch + if (undef('atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; + if (opts.atomic) this._pendingUnlinks = Object.create(null); + + if (undef('followSymlinks')) opts.followSymlinks = true; + + if (undef('awaitWriteFinish')) opts.awaitWriteFinish = false; + if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; + var awf = opts.awaitWriteFinish; + if (awf) { + if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; + if (!awf.pollInterval) awf.pollInterval = 100; + + this._pendingWrites = Object.create(null); + } + if (opts.ignored) opts.ignored = arrify(opts.ignored); + + this._isntIgnored = function(path, stat) { + return !this._isIgnored(path, stat); + }.bind(this); + + var readyCalls = 0; + this._emitReady = function() { + if (++readyCalls >= this._readyCount) { + this._emitReady = Function.prototype; + this._readyEmitted = true; + // use process.nextTick to allow time for listener to be bound + process.nextTick(this.emit.bind(this, 'ready')); + } + }.bind(this); + + this.options = opts; + + // You’re frozen when your heart’s not open. + Object.freeze(opts); +} + +inherits(FSWatcher, EventEmitter); + +// Common helpers +// -------------- + +// Private method: Normalize and emit events +// +// * event - string, type of event +// * path - string, file or directory path +// * val[1..3] - arguments to be passed with event +// +// Returns the error if defined, otherwise the value of the +// FSWatcher instance's `closed` flag +FSWatcher.prototype._emit = function(event, path, val1, val2, val3) { + if (this.options.cwd) path = sysPath.relative(this.options.cwd, path); + var args = [event, path]; + if (val3 !== undefined) args.push(val1, val2, val3); + else if (val2 !== undefined) args.push(val1, val2); + else if (val1 !== undefined) args.push(val1); + + var awf = this.options.awaitWriteFinish; + if (awf && this._pendingWrites[path]) { + this._pendingWrites[path].lastChange = new Date(); + return this; + } + + if (this.options.atomic) { + if (event === 'unlink') { + this._pendingUnlinks[path] = args; + setTimeout(function() { + Object.keys(this._pendingUnlinks).forEach(function(path) { + this.emit.apply(this, this._pendingUnlinks[path]); + this.emit.apply(this, ['all'].concat(this._pendingUnlinks[path])); + delete this._pendingUnlinks[path]; + }.bind(this)); + }.bind(this), typeof this.options.atomic === "number" + ? this.options.atomic + : 100); + return this; + } else if (event === 'add' && this._pendingUnlinks[path]) { + event = args[0] = 'change'; + delete this._pendingUnlinks[path]; + } + } + + var emitEvent = function() { + this.emit.apply(this, args); + if (event !== 'error') this.emit.apply(this, ['all'].concat(args)); + }.bind(this); + + if (awf && (event === 'add' || event === 'change') && this._readyEmitted) { + var awfEmit = function(err, stats) { + if (err) { + event = args[0] = 'error'; + args[1] = err; + emitEvent(); + } else if (stats) { + // if stats doesn't exist the file must have been deleted + if (args.length > 2) { + args[2] = stats; + } else { + args.push(stats); + } + emitEvent(); + } + }; + + this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); + return this; + } + + if (event === 'change') { + if (!this._throttle('change', path, 50)) return this; + } + + if ( + this.options.alwaysStat && val1 === undefined && + (event === 'add' || event === 'addDir' || event === 'change') + ) { + var fullPath = this.options.cwd ? sysPath.join(this.options.cwd, path) : path; + fs.stat(fullPath, function(error, stats) { + // Suppress event when fs.stat fails, to avoid sending undefined 'stat' + if (error || !stats) return; + + args.push(stats); + emitEvent(); + }); + } else { + emitEvent(); + } + + return this; +}; + +// Private method: Common handler for errors +// +// * error - object, Error instance +// +// Returns the error if defined, otherwise the value of the +// FSWatcher instance's `closed` flag +FSWatcher.prototype._handleError = function(error) { + var code = error && error.code; + var ipe = this.options.ignorePermissionErrors; + if (error && + code !== 'ENOENT' && + code !== 'ENOTDIR' && + (!ipe || (code !== 'EPERM' && code !== 'EACCES')) + ) this.emit('error', error); + return error || this.closed; +}; + +// Private method: Helper utility for throttling +// +// * action - string, type of action being throttled +// * path - string, path being acted upon +// * timeout - int, duration of time to suppress duplicate actions +// +// Returns throttle tracking object or false if action should be suppressed +FSWatcher.prototype._throttle = function(action, path, timeout) { + if (!(action in this._throttled)) { + this._throttled[action] = Object.create(null); + } + var throttled = this._throttled[action]; + if (path in throttled) { + throttled[path].count++; + return false; + } + function clear() { + var count = throttled[path] ? throttled[path].count : 0; + delete throttled[path]; + clearTimeout(timeoutObject); + return count; + } + var timeoutObject = setTimeout(clear, timeout); + throttled[path] = {timeoutObject: timeoutObject, clear: clear, count: 0}; + return throttled[path]; +}; + +// Private method: Awaits write operation to finish +// +// * path - string, path being acted upon +// * threshold - int, time in milliseconds a file size must be fixed before +// acknowledging write operation is finished +// * awfEmit - function, to be called when ready for event to be emitted +// Polls a newly created file for size variations. When files size does not +// change for 'threshold' milliseconds calls callback. +FSWatcher.prototype._awaitWriteFinish = function(path, threshold, event, awfEmit) { + var timeoutHandler; + + var fullPath = path; + if (this.options.cwd && !isAbsolute(path)) { + fullPath = sysPath.join(this.options.cwd, path); + } + + var now = new Date(); + + var awaitWriteFinish = (function (prevStat) { + fs.stat(fullPath, function(err, curStat) { + if (err || !(path in this._pendingWrites)) { + if (err && err.code !== 'ENOENT') awfEmit(err); + return; + } + + var now = new Date(); + + if (prevStat && curStat.size != prevStat.size) { + this._pendingWrites[path].lastChange = now; + } + + if (now - this._pendingWrites[path].lastChange >= threshold) { + delete this._pendingWrites[path]; + awfEmit(null, curStat); + } else { + timeoutHandler = setTimeout( + awaitWriteFinish.bind(this, curStat), + this.options.awaitWriteFinish.pollInterval + ); + } + }.bind(this)); + }.bind(this)); + + if (!(path in this._pendingWrites)) { + this._pendingWrites[path] = { + lastChange: now, + cancelWait: function() { + delete this._pendingWrites[path]; + clearTimeout(timeoutHandler); + return event; + }.bind(this) + }; + timeoutHandler = setTimeout( + awaitWriteFinish.bind(this), + this.options.awaitWriteFinish.pollInterval + ); + } +}; + +// Private method: Determines whether user has asked to ignore this path +// +// * path - string, path to file or directory +// * stats - object, result of fs.stat +// +// Returns boolean +var dotRe = /\..*\.(sw[px])$|\~$|\.subl.*\.tmp/; +FSWatcher.prototype._isIgnored = function(path, stats) { + if (this.options.atomic && dotRe.test(path)) return true; + + if (!this._userIgnored) { + var cwd = this.options.cwd; + var ignored = this.options.ignored; + if (cwd && ignored) { + ignored = ignored.map(function (path) { + if (typeof path !== 'string') return path; + return upath.normalize(isAbsolute(path) ? path : sysPath.join(cwd, path)); + }); + } + var paths = arrify(ignored) + .filter(function(path) { + return typeof path === 'string' && !isGlob(path); + }).map(function(path) { + return path + '/**'; + }); + this._userIgnored = anymatch( + this._globIgnored.concat(ignored).concat(paths) + ); + } + + return this._userIgnored([path, stats]); +}; + +// Private method: Provides a set of common helpers and properties relating to +// symlink and glob handling +// +// * path - string, file, directory, or glob pattern being watched +// * depth - int, at any depth > 0, this isn't a glob +// +// Returns object containing helpers for this path +var replacerRe = /^\.[\/\\]/; +FSWatcher.prototype._getWatchHelpers = function(path, depth) { + path = path.replace(replacerRe, ''); + var watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path); + var fullWatchPath = sysPath.resolve(watchPath); + var hasGlob = watchPath !== path; + var globFilter = hasGlob ? anymatch(path) : false; + var follow = this.options.followSymlinks; + var globSymlink = hasGlob && follow ? null : false; + + var checkGlobSymlink = function(entry) { + // only need to resolve once + // first entry should always have entry.parentDir === '' + if (globSymlink == null) { + globSymlink = entry.fullParentDir === fullWatchPath ? false : { + realPath: entry.fullParentDir, + linkPath: fullWatchPath + }; + } + + if (globSymlink) { + return entry.fullPath.replace(globSymlink.realPath, globSymlink.linkPath); + } + + return entry.fullPath; + }; + + var entryPath = function(entry) { + return sysPath.join(watchPath, + sysPath.relative(watchPath, checkGlobSymlink(entry)) + ); + }; + + var filterPath = function(entry) { + if (entry.stat && entry.stat.isSymbolicLink()) return filterDir(entry); + var resolvedPath = entryPath(entry); + return (!hasGlob || globFilter(resolvedPath)) && + this._isntIgnored(resolvedPath, entry.stat) && + (this.options.ignorePermissionErrors || + this._hasReadPermissions(entry.stat)); + }.bind(this); + + var getDirParts = function(path) { + if (!hasGlob) return false; + var parts = []; + var expandedPath = braces.expand(path); + expandedPath.forEach(function(path) { + parts.push(sysPath.relative(watchPath, path).split(/[\/\\]/)); + }); + return parts; + }; + + var dirParts = getDirParts(path); + if (dirParts) { + dirParts.forEach(function(parts) { + if (parts.length > 1) parts.pop(); + }); + } + var unmatchedGlob; + + var filterDir = function(entry) { + if (hasGlob) { + var entryParts = getDirParts(checkGlobSymlink(entry)); + var globstar = false; + unmatchedGlob = !dirParts.some(function(parts) { + return parts.every(function(part, i) { + if (part === '**') globstar = true; + return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i]); + }); + }); + } + return !unmatchedGlob && this._isntIgnored(entryPath(entry), entry.stat); + }.bind(this); + + return { + followSymlinks: follow, + statMethod: follow ? 'stat' : 'lstat', + path: path, + watchPath: watchPath, + entryPath: entryPath, + hasGlob: hasGlob, + globFilter: globFilter, + filterPath: filterPath, + filterDir: filterDir + }; +}; + +// Directory helpers +// ----------------- + +// Private method: Provides directory tracking objects +// +// * directory - string, path of the directory +// +// Returns the directory's tracking object +FSWatcher.prototype._getWatchedDir = function(directory) { + var dir = sysPath.resolve(directory); + var watcherRemove = this._remove.bind(this); + if (!(dir in this._watched)) this._watched[dir] = { + _items: Object.create(null), + add: function(item) { + if (item !== '.' && item !== '..') this._items[item] = true; + }, + remove: function(item) { + delete this._items[item]; + if (!this.children().length) { + fs.readdir(dir, function(err) { + if (err) watcherRemove(sysPath.dirname(dir), sysPath.basename(dir)); + }); + } + }, + has: function(item) {return item in this._items;}, + children: function() {return Object.keys(this._items);} + }; + return this._watched[dir]; +}; + +// File helpers +// ------------ + +// Private method: Check for read permissions +// Based on this answer on SO: http://stackoverflow.com/a/11781404/1358405 +// +// * stats - object, result of fs.stat +// +// Returns boolean +FSWatcher.prototype._hasReadPermissions = function(stats) { + return Boolean(4 & parseInt(((stats && stats.mode) & 0x1ff).toString(8)[0], 10)); +}; + +// Private method: Handles emitting unlink events for +// files and directories, and via recursion, for +// files and directories within directories that are unlinked +// +// * directory - string, directory within which the following item is located +// * item - string, base path of item/directory +// +// Returns nothing +FSWatcher.prototype._remove = function(directory, item) { + // if what is being deleted is a directory, get that directory's paths + // for recursive deleting and cleaning of watched object + // if it is not a directory, nestedDirectoryChildren will be empty array + var path = sysPath.join(directory, item); + var fullPath = sysPath.resolve(path); + var isDirectory = this._watched[path] || this._watched[fullPath]; + + // prevent duplicate handling in case of arriving here nearly simultaneously + // via multiple paths (such as _handleFile and _handleDir) + if (!this._throttle('remove', path, 100)) return; + + // if the only watched file is removed, watch for its return + var watchedDirs = Object.keys(this._watched); + if (!isDirectory && !this.options.useFsEvents && watchedDirs.length === 1) { + this.add(directory, item, true); + } + + // This will create a new entry in the watched object in either case + // so we got to do the directory check beforehand + var nestedDirectoryChildren = this._getWatchedDir(path).children(); + + // Recursively remove children directories / files. + nestedDirectoryChildren.forEach(function(nestedItem) { + this._remove(path, nestedItem); + }, this); + + // Check if item was on the watched list and remove it + var parent = this._getWatchedDir(directory); + var wasTracked = parent.has(item); + parent.remove(item); + + // If we wait for this file to be fully written, cancel the wait. + var relPath = path; + if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path); + if (this.options.awaitWriteFinish && this._pendingWrites[relPath]) { + var event = this._pendingWrites[relPath].cancelWait(); + if (event === 'add') return; + } + + // The Entry will either be a directory that just got removed + // or a bogus entry to a file, in either case we have to remove it + delete this._watched[path]; + delete this._watched[fullPath]; + var eventName = isDirectory ? 'unlinkDir' : 'unlink'; + if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); + + // Avoid conflicts if we later create another file with the same name + if (!this.options.useFsEvents) { + this._closePath(path); + } +}; + +FSWatcher.prototype._closePath = function(path) { + if (!this._closers[path]) return; + this._closers[path].forEach(function(closer) { + closer(); + }); + delete this._closers[path]; + this._getWatchedDir(sysPath.dirname(path)).remove(sysPath.basename(path)); +} + +// Public method: Adds paths to be watched on an existing FSWatcher instance + +// * paths - string or array of strings, file/directory paths and/or globs +// * _origAdd - private boolean, for handling non-existent paths to be watched +// * _internal - private boolean, indicates a non-user add + +// Returns an instance of FSWatcher for chaining. +FSWatcher.prototype.add = function(paths, _origAdd, _internal) { + var disableGlobbing = this.options.disableGlobbing; + var cwd = this.options.cwd; + this.closed = false; + paths = flatten(arrify(paths)); + + if (!paths.every(isString)) { + throw new TypeError('Non-string provided as watch path: ' + paths); + } + + if (cwd) paths = paths.map(function(path) { + var absPath; + if (isAbsolute(path)) { + absPath = path; + } else if (path[0] === '!') { + absPath = '!' + sysPath.join(cwd, path.substring(1)); + } else { + absPath = sysPath.join(cwd, path); + } + + // Check `path` instead of `absPath` because the cwd portion can't be a glob + if (disableGlobbing || !isGlob(path)) { + return absPath; + } else { + return normalizePath(absPath); + } + }); + + // set aside negated glob strings + paths = paths.filter(function(path) { + if (path[0] === '!') { + this._ignoredPaths[path.substring(1)] = true; + } else { + // if a path is being added that was previously ignored, stop ignoring it + delete this._ignoredPaths[path]; + delete this._ignoredPaths[path + '/**']; + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = null; + + return true; + } + }, this); + + if (this.options.useFsEvents && FsEventsHandler.canUse()) { + if (!this._readyCount) this._readyCount = paths.length; + if (this.options.persistent) this._readyCount *= 2; + paths.forEach(this._addToFsEvents, this); + } else { + if (!this._readyCount) this._readyCount = 0; + this._readyCount += paths.length; + asyncEach(paths, function(path, next) { + this._addToNodeFs(path, !_internal, 0, 0, _origAdd, function(err, res) { + if (res) this._emitReady(); + next(err, res); + }.bind(this)); + }.bind(this), function(error, results) { + results.forEach(function(item) { + if (!item || this.closed) return; + this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); + }, this); + }.bind(this)); + } + + return this; +}; + +// Public method: Close watchers or start ignoring events from specified paths. + +// * paths - string or array of strings, file/directory paths and/or globs + +// Returns instance of FSWatcher for chaining. +FSWatcher.prototype.unwatch = function(paths) { + if (this.closed) return this; + paths = flatten(arrify(paths)); + + paths.forEach(function(path) { + // convert to absolute path unless relative path already matches + if (!isAbsolute(path) && !this._closers[path]) { + if (this.options.cwd) path = sysPath.join(this.options.cwd, path); + path = sysPath.resolve(path); + } + + this._closePath(path); + + this._ignoredPaths[path] = true; + if (path in this._watched) { + this._ignoredPaths[path + '/**'] = true; + } + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = null; + }, this); + + return this; +}; + +// Public method: Close watchers and remove all listeners from watched paths. + +// Returns instance of FSWatcher for chaining. +FSWatcher.prototype.close = function() { + if (this.closed) return this; + + this.closed = true; + Object.keys(this._closers).forEach(function(watchPath) { + this._closers[watchPath].forEach(function(closer) { + closer(); + }); + delete this._closers[watchPath]; + }, this); + this._watched = Object.create(null); + + this.removeAllListeners(); + return this; +}; + +// Public method: Expose list of watched paths + +// Returns object w/ dir paths as keys and arrays of contained paths as values. +FSWatcher.prototype.getWatched = function() { + var watchList = {}; + Object.keys(this._watched).forEach(function(dir) { + var key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; + watchList[key || '.'] = Object.keys(this._watched[dir]._items).sort(); + }.bind(this)); + return watchList; +}; + +// Attach watch handler prototype methods +function importHandler(handler) { + Object.keys(handler.prototype).forEach(function(method) { + FSWatcher.prototype[method] = handler.prototype[method]; + }); +} +importHandler(NodeFsHandler); +if (FsEventsHandler.canUse()) importHandler(FsEventsHandler); + +// Export FSWatcher class +exports.FSWatcher = FSWatcher; + +// Public function: Instantiates watcher with paths to be tracked. + +// * paths - string or array of strings, file/directory paths and/or globs +// * options - object, chokidar options + +// Returns an instance of FSWatcher for chaining. +exports.watch = function(paths, options) { + return new FSWatcher(options).add(paths); +}; diff --git a/node_modules/live-server/node_modules/chokidar/lib/fsevents-handler.js b/node_modules/live-server/node_modules/chokidar/lib/fsevents-handler.js new file mode 100644 index 0000000..c85ba60 --- /dev/null +++ b/node_modules/live-server/node_modules/chokidar/lib/fsevents-handler.js @@ -0,0 +1,412 @@ +'use strict'; + +var fs = require('fs'); +var sysPath = require('path'); +var readdirp = require('readdirp'); +var fsevents; +try { fsevents = require('fsevents'); } catch (error) { + if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error) +} + +// fsevents instance helper functions + +// object to hold per-process fsevents instances +// (may be shared across chokidar FSWatcher instances) +var FSEventsWatchers = Object.create(null); + +// Threshold of duplicate path prefixes at which to start +// consolidating going forward +var consolidateThreshhold = 10; + +// Private function: Instantiates the fsevents interface + +// * path - string, path to be watched +// * callback - function, called when fsevents is bound and ready + +// Returns new fsevents instance +function createFSEventsInstance(path, callback) { + return (new fsevents(path)).on('fsevent', callback).start(); +} + +// Private function: Instantiates the fsevents interface or binds listeners +// to an existing one covering the same file tree + +// * path - string, path to be watched +// * realPath - string, real path (in case of symlinks) +// * listener - function, called when fsevents emits events +// * rawEmitter - function, passes data to listeners of the 'raw' event + +// Returns close function +function setFSEventsListener(path, realPath, listener, rawEmitter) { + var watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path; + var watchContainer; + var parentPath = sysPath.dirname(watchPath); + + // If we've accumulated a substantial number of paths that + // could have been consolidated by watching one directory + // above the current one, create a watcher on the parent + // path instead, so that we do consolidate going forward. + if (couldConsolidate(parentPath)) { + watchPath = parentPath; + } + + var resolvedPath = sysPath.resolve(path); + var hasSymlink = resolvedPath !== realPath; + function filteredListener(fullPath, flags, info) { + if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); + if ( + fullPath === resolvedPath || + !fullPath.indexOf(resolvedPath + sysPath.sep) + ) listener(fullPath, flags, info); + } + + // check if there is already a watcher on a parent path + // modifies `watchPath` to the parent path when it finds a match + function watchedParent() { + return Object.keys(FSEventsWatchers).some(function(watchedPath) { + // condition is met when indexOf returns 0 + if (!realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep)) { + watchPath = watchedPath; + return true; + } + }); + } + + if (watchPath in FSEventsWatchers || watchedParent()) { + watchContainer = FSEventsWatchers[watchPath]; + watchContainer.listeners.push(filteredListener); + } else { + watchContainer = FSEventsWatchers[watchPath] = { + listeners: [filteredListener], + rawEmitters: [rawEmitter], + watcher: createFSEventsInstance(watchPath, function(fullPath, flags) { + var info = fsevents.getInfo(fullPath, flags); + watchContainer.listeners.forEach(function(listener) { + listener(fullPath, flags, info); + }); + watchContainer.rawEmitters.forEach(function(emitter) { + emitter(info.event, fullPath, info); + }); + }) + }; + } + var listenerIndex = watchContainer.listeners.length - 1; + + // removes this instance's listeners and closes the underlying fsevents + // instance if there are no more listeners left + return function close() { + delete watchContainer.listeners[listenerIndex]; + delete watchContainer.rawEmitters[listenerIndex]; + if (!Object.keys(watchContainer.listeners).length) { + watchContainer.watcher.stop(); + delete FSEventsWatchers[watchPath]; + } + }; +} + +// Decide whether or not we should start a new higher-level +// parent watcher +function couldConsolidate(path) { + var keys = Object.keys(FSEventsWatchers); + var count = 0; + + for (var i = 0, len = keys.length; i < len; ++i) { + var watchPath = keys[i]; + if (watchPath.indexOf(path) === 0) { + count++; + if (count >= consolidateThreshhold) { + return true; + } + } + } + + return false; +} + +function isConstructor(obj) { + return obj.prototype !== undefined && obj.prototype.constructor !== undefined; +} + +// returns boolean indicating whether fsevents can be used +function canUse() { + return fsevents && Object.keys(FSEventsWatchers).length < 128 && isConstructor(fsevents); +} + +// determines subdirectory traversal levels from root to path +function depth(path, root) { + var i = 0; + while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++; + return i; +} + +// fake constructor for attaching fsevents-specific prototype methods that +// will be copied to FSWatcher's prototype +function FsEventsHandler() {} + +// Private method: Handle symlinks encountered during directory scan + +// * watchPath - string, file/dir path to be watched with fsevents +// * realPath - string, real path (in case of symlinks) +// * transform - function, path transformer +// * globFilter - function, path filter in case a glob pattern was provided + +// Returns close function for the watcher instance +FsEventsHandler.prototype._watchWithFsEvents = +function(watchPath, realPath, transform, globFilter) { + if (this._isIgnored(watchPath)) return; + var watchCallback = function(fullPath, flags, info) { + if ( + this.options.depth !== undefined && + depth(fullPath, realPath) > this.options.depth + ) return; + var path = transform(sysPath.join( + watchPath, sysPath.relative(watchPath, fullPath) + )); + if (globFilter && !globFilter(path)) return; + // ensure directories are tracked + var parent = sysPath.dirname(path); + var item = sysPath.basename(path); + var watchedDir = this._getWatchedDir( + info.type === 'directory' ? path : parent + ); + var checkIgnored = function(stats) { + if (this._isIgnored(path, stats)) { + this._ignoredPaths[path] = true; + if (stats && stats.isDirectory()) { + this._ignoredPaths[path + '/**/*'] = true; + } + return true; + } else { + delete this._ignoredPaths[path]; + delete this._ignoredPaths[path + '/**/*']; + } + }.bind(this); + + var handleEvent = function(event) { + if (checkIgnored()) return; + + if (event === 'unlink') { + // suppress unlink events on never before seen files + if (info.type === 'directory' || watchedDir.has(item)) { + this._remove(parent, item); + } + } else { + if (event === 'add') { + // track new directories + if (info.type === 'directory') this._getWatchedDir(path); + + if (info.type === 'symlink' && this.options.followSymlinks) { + // push symlinks back to the top of the stack to get handled + var curDepth = this.options.depth === undefined ? + undefined : depth(fullPath, realPath) + 1; + return this._addToFsEvents(path, false, true, curDepth); + } else { + // track new paths + // (other than symlinks being followed, which will be tracked soon) + this._getWatchedDir(parent).add(item); + } + } + var eventName = info.type === 'directory' ? event + 'Dir' : event; + this._emit(eventName, path); + if (eventName === 'addDir') this._addToFsEvents(path, false, true); + } + }.bind(this); + + function addOrChange() { + handleEvent(watchedDir.has(item) ? 'change' : 'add'); + } + function checkFd() { + fs.open(path, 'r', function(error, fd) { + if (error) { + error.code !== 'EACCES' ? + handleEvent('unlink') : addOrChange(); + } else { + fs.close(fd, function(err) { + err && err.code !== 'EACCES' ? + handleEvent('unlink') : addOrChange(); + }); + } + }); + } + // correct for wrong events emitted + var wrongEventFlags = [ + 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 + ]; + if (wrongEventFlags.indexOf(flags) !== -1 || info.event === 'unknown') { + if (typeof this.options.ignored === 'function') { + fs.stat(path, function(error, stats) { + if (checkIgnored(stats)) return; + stats ? addOrChange() : handleEvent('unlink'); + }); + } else { + checkFd(); + } + } else { + switch (info.event) { + case 'created': + case 'modified': + return addOrChange(); + case 'deleted': + case 'moved': + return checkFd(); + } + } + }.bind(this); + + var closer = setFSEventsListener( + watchPath, + realPath, + watchCallback, + this.emit.bind(this, 'raw') + ); + + this._emitReady(); + return closer; +}; + +// Private method: Handle symlinks encountered during directory scan + +// * linkPath - string, path to symlink +// * fullPath - string, absolute path to the symlink +// * transform - function, pre-existing path transformer +// * curDepth - int, level of subdirectories traversed to where symlink is + +// Returns nothing +FsEventsHandler.prototype._handleFsEventsSymlink = +function(linkPath, fullPath, transform, curDepth) { + // don't follow the same symlink more than once + if (this._symlinkPaths[fullPath]) return; + else this._symlinkPaths[fullPath] = true; + + this._readyCount++; + + fs.realpath(linkPath, function(error, linkTarget) { + if (this._handleError(error) || this._isIgnored(linkTarget)) { + return this._emitReady(); + } + + this._readyCount++; + + // add the linkTarget for watching with a wrapper for transform + // that causes emitted paths to incorporate the link's path + this._addToFsEvents(linkTarget || linkPath, function(path) { + var dotSlash = '.' + sysPath.sep; + var aliasedPath = linkPath; + if (linkTarget && linkTarget !== dotSlash) { + aliasedPath = path.replace(linkTarget, linkPath); + } else if (path !== dotSlash) { + aliasedPath = sysPath.join(linkPath, path); + } + return transform(aliasedPath); + }, false, curDepth); + }.bind(this)); +}; + +// Private method: Handle added path with fsevents + +// * path - string, file/directory path or glob pattern +// * transform - function, converts working path to what the user expects +// * forceAdd - boolean, ensure add is emitted +// * priorDepth - int, level of subdirectories already traversed + +// Returns nothing +FsEventsHandler.prototype._addToFsEvents = +function(path, transform, forceAdd, priorDepth) { + + // applies transform if provided, otherwise returns same value + var processPath = typeof transform === 'function' ? + transform : function(val) { return val; }; + + var emitAdd = function(newPath, stats) { + var pp = processPath(newPath); + var isDir = stats.isDirectory(); + var dirObj = this._getWatchedDir(sysPath.dirname(pp)); + var base = sysPath.basename(pp); + + // ensure empty dirs get tracked + if (isDir) this._getWatchedDir(pp); + + if (dirObj.has(base)) return; + dirObj.add(base); + + if (!this.options.ignoreInitial || forceAdd === true) { + this._emit(isDir ? 'addDir' : 'add', pp, stats); + } + }.bind(this); + + var wh = this._getWatchHelpers(path); + + // evaluate what is at the path we're being asked to watch + fs[wh.statMethod](wh.watchPath, function(error, stats) { + if (this._handleError(error) || this._isIgnored(wh.watchPath, stats)) { + this._emitReady(); + return this._emitReady(); + } + + if (stats.isDirectory()) { + // emit addDir unless this is a glob parent + if (!wh.globFilter) emitAdd(processPath(path), stats); + + // don't recurse further if it would exceed depth setting + if (priorDepth && priorDepth > this.options.depth) return; + + // scan the contents of the dir + readdirp({ + root: wh.watchPath, + entryType: 'all', + fileFilter: wh.filterPath, + directoryFilter: wh.filterDir, + lstat: true, + depth: this.options.depth - (priorDepth || 0) + }).on('data', function(entry) { + // need to check filterPath on dirs b/c filterDir is less restrictive + if (entry.stat.isDirectory() && !wh.filterPath(entry)) return; + + var joinedPath = sysPath.join(wh.watchPath, entry.path); + var fullPath = entry.fullPath; + + if (wh.followSymlinks && entry.stat.isSymbolicLink()) { + // preserve the current depth here since it can't be derived from + // real paths past the symlink + var curDepth = this.options.depth === undefined ? + undefined : depth(joinedPath, sysPath.resolve(wh.watchPath)) + 1; + + this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); + } else { + emitAdd(joinedPath, entry.stat); + } + }.bind(this)).on('error', function() { + // Ignore readdirp errors + }).on('end', this._emitReady); + } else { + emitAdd(wh.watchPath, stats); + this._emitReady(); + } + }.bind(this)); + + if (this.options.persistent && forceAdd !== true) { + var initWatch = function(error, realPath) { + if (this.closed) return; + var closer = this._watchWithFsEvents( + wh.watchPath, + sysPath.resolve(realPath || wh.watchPath), + processPath, + wh.globFilter + ); + if (closer) { + this._closers[path] = this._closers[path] || []; + this._closers[path].push(closer); + } + }.bind(this); + + if (typeof transform === 'function') { + // realpath has already been resolved + initWatch(); + } else { + fs.realpath(wh.watchPath, initWatch); + } + } +}; + +module.exports = FsEventsHandler; +module.exports.canUse = canUse; diff --git a/node_modules/live-server/node_modules/chokidar/lib/nodefs-handler.js b/node_modules/live-server/node_modules/chokidar/lib/nodefs-handler.js new file mode 100644 index 0000000..4f49ac2 --- /dev/null +++ b/node_modules/live-server/node_modules/chokidar/lib/nodefs-handler.js @@ -0,0 +1,506 @@ +'use strict'; + +var fs = require('fs'); +var sysPath = require('path'); +var readdirp = require('readdirp'); +var isBinaryPath = require('is-binary-path'); + +// fs.watch helpers + +// object to hold per-process fs.watch instances +// (may be shared across chokidar FSWatcher instances) +var FsWatchInstances = Object.create(null); + + +// Private function: Instantiates the fs.watch interface + +// * path - string, path to be watched +// * options - object, options to be passed to fs.watch +// * listener - function, main event handler +// * errHandler - function, handler which emits info about errors +// * emitRaw - function, handler which emits raw event data + +// Returns new fsevents instance +function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { + var handleEvent = function(rawEvent, evPath) { + listener(path); + emitRaw(rawEvent, evPath, {watchedPath: path}); + + // emit based on events occurring for files from a directory's watcher in + // case the file's watcher misses it (and rely on throttling to de-dupe) + if (evPath && path !== evPath) { + fsWatchBroadcast( + sysPath.resolve(path, evPath), 'listeners', sysPath.join(path, evPath) + ); + } + }; + try { + return fs.watch(path, options, handleEvent); + } catch (error) { + errHandler(error); + } +} + +// Private function: Helper for passing fs.watch event data to a +// collection of listeners + +// * fullPath - string, absolute path bound to the fs.watch instance +// * type - string, listener type +// * val[1..3] - arguments to be passed to listeners + +// Returns nothing +function fsWatchBroadcast(fullPath, type, val1, val2, val3) { + if (!FsWatchInstances[fullPath]) return; + FsWatchInstances[fullPath][type].forEach(function(listener) { + listener(val1, val2, val3); + }); +} + +// Private function: Instantiates the fs.watch interface or binds listeners +// to an existing one covering the same file system entry + +// * path - string, path to be watched +// * fullPath - string, absolute path +// * options - object, options to be passed to fs.watch +// * handlers - object, container for event listener functions + +// Returns close function +function setFsWatchListener(path, fullPath, options, handlers) { + var listener = handlers.listener; + var errHandler = handlers.errHandler; + var rawEmitter = handlers.rawEmitter; + var container = FsWatchInstances[fullPath]; + var watcher; + if (!options.persistent) { + watcher = createFsWatchInstance( + path, options, listener, errHandler, rawEmitter + ); + return watcher.close.bind(watcher); + } + if (!container) { + watcher = createFsWatchInstance( + path, + options, + fsWatchBroadcast.bind(null, fullPath, 'listeners'), + errHandler, // no need to use broadcast here + fsWatchBroadcast.bind(null, fullPath, 'rawEmitters') + ); + if (!watcher) return; + var broadcastErr = fsWatchBroadcast.bind(null, fullPath, 'errHandlers'); + watcher.on('error', function(error) { + container.watcherUnusable = true; // documented since Node 10.4.1 + // Workaround for https://github.com/joyent/node/issues/4337 + if (process.platform === 'win32' && error.code === 'EPERM') { + fs.open(path, 'r', function(err, fd) { + if (!err) fs.close(fd, function(err) { + if (!err) broadcastErr(error); + }); + }); + } else { + broadcastErr(error); + } + }); + container = FsWatchInstances[fullPath] = { + listeners: [listener], + errHandlers: [errHandler], + rawEmitters: [rawEmitter], + watcher: watcher + }; + } else { + container.listeners.push(listener); + container.errHandlers.push(errHandler); + container.rawEmitters.push(rawEmitter); + } + var listenerIndex = container.listeners.length - 1; + + // removes this instance's listeners and closes the underlying fs.watch + // instance if there are no more listeners left + return function close() { + delete container.listeners[listenerIndex]; + delete container.errHandlers[listenerIndex]; + delete container.rawEmitters[listenerIndex]; + if (!Object.keys(container.listeners).length) { + if (!container.watcherUnusable) { // check to protect against issue #730 + container.watcher.close(); + } + delete FsWatchInstances[fullPath]; + } + }; +} + +// fs.watchFile helpers + +// object to hold per-process fs.watchFile instances +// (may be shared across chokidar FSWatcher instances) +var FsWatchFileInstances = Object.create(null); + +// Private function: Instantiates the fs.watchFile interface or binds listeners +// to an existing one covering the same file system entry + +// * path - string, path to be watched +// * fullPath - string, absolute path +// * options - object, options to be passed to fs.watchFile +// * handlers - object, container for event listener functions + +// Returns close function +function setFsWatchFileListener(path, fullPath, options, handlers) { + var listener = handlers.listener; + var rawEmitter = handlers.rawEmitter; + var container = FsWatchFileInstances[fullPath]; + var listeners = []; + var rawEmitters = []; + if ( + container && ( + container.options.persistent < options.persistent || + container.options.interval > options.interval + ) + ) { + // "Upgrade" the watcher to persistence or a quicker interval. + // This creates some unlikely edge case issues if the user mixes + // settings in a very weird way, but solving for those cases + // doesn't seem worthwhile for the added complexity. + listeners = container.listeners; + rawEmitters = container.rawEmitters; + fs.unwatchFile(fullPath); + container = false; + } + if (!container) { + listeners.push(listener); + rawEmitters.push(rawEmitter); + container = FsWatchFileInstances[fullPath] = { + listeners: listeners, + rawEmitters: rawEmitters, + options: options, + watcher: fs.watchFile(fullPath, options, function(curr, prev) { + container.rawEmitters.forEach(function(rawEmitter) { + rawEmitter('change', fullPath, {curr: curr, prev: prev}); + }); + var currmtime = curr.mtime.getTime(); + if (curr.size !== prev.size || currmtime > prev.mtime.getTime() || currmtime === 0) { + container.listeners.forEach(function(listener) { + listener(path, curr); + }); + } + }) + }; + } else { + container.listeners.push(listener); + container.rawEmitters.push(rawEmitter); + } + var listenerIndex = container.listeners.length - 1; + + // removes this instance's listeners and closes the underlying fs.watchFile + // instance if there are no more listeners left + return function close() { + delete container.listeners[listenerIndex]; + delete container.rawEmitters[listenerIndex]; + if (!Object.keys(container.listeners).length) { + fs.unwatchFile(fullPath); + delete FsWatchFileInstances[fullPath]; + } + }; +} + +// fake constructor for attaching nodefs-specific prototype methods that +// will be copied to FSWatcher's prototype +function NodeFsHandler() {} + +// Private method: Watch file for changes with fs.watchFile or fs.watch. + +// * path - string, path to file or directory. +// * listener - function, to be executed on fs change. + +// Returns close function for the watcher instance +NodeFsHandler.prototype._watchWithNodeFs = +function(path, listener) { + var directory = sysPath.dirname(path); + var basename = sysPath.basename(path); + var parent = this._getWatchedDir(directory); + parent.add(basename); + var absolutePath = sysPath.resolve(path); + var options = {persistent: this.options.persistent}; + if (!listener) listener = Function.prototype; // empty function + + var closer; + if (this.options.usePolling) { + options.interval = this.enableBinaryInterval && isBinaryPath(basename) ? + this.options.binaryInterval : this.options.interval; + closer = setFsWatchFileListener(path, absolutePath, options, { + listener: listener, + rawEmitter: this.emit.bind(this, 'raw') + }); + } else { + closer = setFsWatchListener(path, absolutePath, options, { + listener: listener, + errHandler: this._handleError.bind(this), + rawEmitter: this.emit.bind(this, 'raw') + }); + } + return closer; +}; + +// Private method: Watch a file and emit add event if warranted + +// * file - string, the file's path +// * stats - object, result of fs.stat +// * initialAdd - boolean, was the file added at watch instantiation? +// * callback - function, called when done processing as a newly seen file + +// Returns close function for the watcher instance +NodeFsHandler.prototype._handleFile = +function(file, stats, initialAdd, callback) { + var dirname = sysPath.dirname(file); + var basename = sysPath.basename(file); + var parent = this._getWatchedDir(dirname); + // stats is always present + var prevStats = stats; + + // if the file is already being watched, do nothing + if (parent.has(basename)) return callback(); + + // kick off the watcher + var closer = this._watchWithNodeFs(file, function(path, newStats) { + if (!this._throttle('watch', file, 5)) return; + if (!newStats || newStats && newStats.mtime.getTime() === 0) { + fs.stat(file, function(error, newStats) { + // Fix issues where mtime is null but file is still present + if (error) { + this._remove(dirname, basename); + } else { + // Check that change event was not fired because of changed only accessTime. + var at = newStats.atime.getTime(); + var mt = newStats.mtime.getTime(); + if (!at || at <= mt || mt !== prevStats.mtime.getTime()) { + this._emit('change', file, newStats); + } + prevStats = newStats; + } + }.bind(this)); + // add is about to be emitted if file not already tracked in parent + } else if (parent.has(basename)) { + // Check that change event was not fired because of changed only accessTime. + var at = newStats.atime.getTime(); + var mt = newStats.mtime.getTime(); + if (!at || at <= mt || mt !== prevStats.mtime.getTime()) { + this._emit('change', file, newStats); + } + prevStats = newStats; + } + }.bind(this)); + + // emit an add event if we're supposed to + if (!(initialAdd && this.options.ignoreInitial)) { + if (!this._throttle('add', file, 0)) return; + this._emit('add', file, stats); + } + + if (callback) callback(); + return closer; +}; + +// Private method: Handle symlinks encountered while reading a dir + +// * entry - object, entry object returned by readdirp +// * directory - string, path of the directory being read +// * path - string, path of this item +// * item - string, basename of this item + +// Returns true if no more processing is needed for this entry. +NodeFsHandler.prototype._handleSymlink = +function(entry, directory, path, item) { + var full = entry.fullPath; + var dir = this._getWatchedDir(directory); + + if (!this.options.followSymlinks) { + // watch symlink directly (don't follow) and detect changes + this._readyCount++; + fs.realpath(path, function(error, linkPath) { + if (dir.has(item)) { + if (this._symlinkPaths[full] !== linkPath) { + this._symlinkPaths[full] = linkPath; + this._emit('change', path, entry.stat); + } + } else { + dir.add(item); + this._symlinkPaths[full] = linkPath; + this._emit('add', path, entry.stat); + } + this._emitReady(); + }.bind(this)); + return true; + } + + // don't follow the same symlink more than once + if (this._symlinkPaths[full]) return true; + else this._symlinkPaths[full] = true; +}; + +// Private method: Read directory to add / remove files from `@watched` list +// and re-read it on change. + +// * dir - string, fs path. +// * stats - object, result of fs.stat +// * initialAdd - boolean, was the file added at watch instantiation? +// * depth - int, depth relative to user-supplied path +// * target - string, child path actually targeted for watch +// * wh - object, common watch helpers for this path +// * callback - function, called when dir scan is complete + +// Returns close function for the watcher instance +NodeFsHandler.prototype._handleDir = +function(dir, stats, initialAdd, depth, target, wh, callback) { + var parentDir = this._getWatchedDir(sysPath.dirname(dir)); + var tracked = parentDir.has(sysPath.basename(dir)); + if (!(initialAdd && this.options.ignoreInitial) && !target && !tracked) { + if (!wh.hasGlob || wh.globFilter(dir)) this._emit('addDir', dir, stats); + } + + // ensure dir is tracked (harmless if redundant) + parentDir.add(sysPath.basename(dir)); + this._getWatchedDir(dir); + + var read = function(directory, initialAdd, done) { + // Normalize the directory name on Windows + directory = sysPath.join(directory, ''); + + if (!wh.hasGlob) { + var throttler = this._throttle('readdir', directory, 1000); + if (!throttler) return; + } + + var previous = this._getWatchedDir(wh.path); + var current = []; + + readdirp({ + root: directory, + entryType: 'all', + fileFilter: wh.filterPath, + directoryFilter: wh.filterDir, + depth: 0, + lstat: true + }).on('data', function(entry) { + var item = entry.path; + var path = sysPath.join(directory, item); + current.push(item); + + if (entry.stat.isSymbolicLink() && + this._handleSymlink(entry, directory, path, item)) return; + + // Files that present in current directory snapshot + // but absent in previous are added to watch list and + // emit `add` event. + if (item === target || !target && !previous.has(item)) { + this._readyCount++; + + // ensure relativeness of path is preserved in case of watcher reuse + path = sysPath.join(dir, sysPath.relative(dir, path)); + + this._addToNodeFs(path, initialAdd, wh, depth + 1); + } + }.bind(this)).on('end', function() { + var wasThrottled = throttler ? throttler.clear() : false; + if (done) done(); + + // Files that absent in current directory snapshot + // but present in previous emit `remove` event + // and are removed from @watched[directory]. + previous.children().filter(function(item) { + return item !== directory && + current.indexOf(item) === -1 && + // in case of intersecting globs; + // a path may have been filtered out of this readdir, but + // shouldn't be removed because it matches a different glob + (!wh.hasGlob || wh.filterPath({ + fullPath: sysPath.resolve(directory, item) + })); + }).forEach(function(item) { + this._remove(directory, item); + }, this); + + // one more time for any missed in case changes came in extremely quickly + if (wasThrottled) read(directory, false); + }.bind(this)).on('error', this._handleError.bind(this)); + }.bind(this); + + var closer; + + if (this.options.depth == null || depth <= this.options.depth) { + if (!target) read(dir, initialAdd, callback); + closer = this._watchWithNodeFs(dir, function(dirPath, stats) { + // if current directory is removed, do nothing + if (stats && stats.mtime.getTime() === 0) return; + + read(dirPath, false); + }); + } else { + callback(); + } + return closer; +}; + +// Private method: Handle added file, directory, or glob pattern. +// Delegates call to _handleFile / _handleDir after checks. + +// * path - string, path to file or directory. +// * initialAdd - boolean, was the file added at watch instantiation? +// * depth - int, depth relative to user-supplied path +// * target - string, child path actually targeted for watch +// * callback - function, indicates whether the path was found or not + +// Returns nothing +NodeFsHandler.prototype._addToNodeFs = +function(path, initialAdd, priorWh, depth, target, callback) { + if (!callback) callback = Function.prototype; + var ready = this._emitReady; + if (this._isIgnored(path) || this.closed) { + ready(); + return callback(null, false); + } + + var wh = this._getWatchHelpers(path, depth); + if (!wh.hasGlob && priorWh) { + wh.hasGlob = priorWh.hasGlob; + wh.globFilter = priorWh.globFilter; + wh.filterPath = priorWh.filterPath; + wh.filterDir = priorWh.filterDir; + } + + // evaluate what is at the path we're being asked to watch + fs[wh.statMethod](wh.watchPath, function(error, stats) { + if (this._handleError(error)) return callback(null, path); + if (this._isIgnored(wh.watchPath, stats)) { + ready(); + return callback(null, false); + } + + var initDir = function(dir, target) { + return this._handleDir(dir, stats, initialAdd, depth, target, wh, ready); + }.bind(this); + + var closer; + if (stats.isDirectory()) { + closer = initDir(wh.watchPath, target); + } else if (stats.isSymbolicLink()) { + var parent = sysPath.dirname(wh.watchPath); + this._getWatchedDir(parent).add(wh.watchPath); + this._emit('add', wh.watchPath, stats); + closer = initDir(parent, path); + + // preserve this symlink's target path + fs.realpath(path, function(error, targetPath) { + this._symlinkPaths[sysPath.resolve(path)] = targetPath; + ready(); + }.bind(this)); + } else { + closer = this._handleFile(wh.watchPath, stats, initialAdd, ready); + } + + if (closer) { + this._closers[path] = this._closers[path] || []; + this._closers[path].push(closer); + } + callback(null, false); + }.bind(this)); +}; + +module.exports = NodeFsHandler; diff --git a/node_modules/live-server/node_modules/chokidar/package.json b/node_modules/live-server/node_modules/chokidar/package.json new file mode 100644 index 0000000..566311a --- /dev/null +++ b/node_modules/live-server/node_modules/chokidar/package.json @@ -0,0 +1,63 @@ +{ + "name": "chokidar", + "description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", + "version": "2.1.8", + "keywords": [ + "fs", + "watch", + "watchFile", + "watcher", + "watching", + "file", + "fsevents" + ], + "types": "./types/index.d.ts", + "homepage": "https://github.com/paulmillr/chokidar", + "author": "Paul Miller (https://paulmillr.com), Elan Shanker", + "repository": { + "type": "git", + "url": "https://github.com/paulmillr/chokidar.git" + }, + "bugs": { + "url": "https://github.com/paulmillr/chokidar/issues" + }, + "license": "MIT", + "scripts": { + "test": "nyc mocha --exit", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "dtslint": "dtslint types" + }, + "files": [ + "index.js", + "lib/", + "types/index.d.ts" + ], + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + }, + "devDependencies": { + "@types/node": "^11.9.4", + "chai": "^3.2.0", + "coveralls": "^3.0.1", + "dtslint": "0.4.1", + "graceful-fs": "4.1.4", + "mocha": "^5.2.0", + "nyc": "^11.8.0", + "rimraf": "^2.4.3", + "sinon": "^1.10.3", + "sinon-chai": "^2.6.0" + } +} diff --git a/node_modules/live-server/node_modules/chokidar/types/index.d.ts b/node_modules/live-server/node_modules/chokidar/types/index.d.ts new file mode 100644 index 0000000..9d3043f --- /dev/null +++ b/node_modules/live-server/node_modules/chokidar/types/index.d.ts @@ -0,0 +1,191 @@ +// TypeScript Version: 3.0 + +/// + +import * as fs from "fs"; +import { EventEmitter } from "events"; + +/** + * The object's keys are all the directories (using absolute paths unless the `cwd` option was + * used), and the values are arrays of the names of the items contained in each directory. + */ +export interface WatchedPaths { + [directory: string]: string[]; +} + +export class FSWatcher extends EventEmitter implements fs.FSWatcher { + /** + * Constructs a new FSWatcher instance with optional WatchOptions parameter. + */ + constructor(options?: WatchOptions); + + /** + * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one + * string. + */ + add(paths: string | string[]): void; + + /** + * Stop watching files, directories, or glob patterns. Takes an array of strings or just one + * string. + */ + unwatch(paths: string | string[]): void; + + /** + * Returns an object representing all the paths on the file system being watched by this + * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless + * the `cwd` option was used), and the values are arrays of the names of the items contained in + * each directory. + */ + getWatched(): WatchedPaths; + + /** + * Removes all listeners from watched files. + */ + close(): void; + + on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this; + + on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this; + + /** + * Error occured + */ + on(event: 'error', listener: (error: Error) => void): this; + + /** + * Exposes the native Node `fs.FSWatcher events` + */ + on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this; + + /** + * Fires when the initial scan is complete + */ + on(event: 'ready', listener: () => void): this; + + on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; +} + +export interface WatchOptions { + /** + * Indicates whether the process should continue to run as long as files are being watched. If + * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, + * even if the process continues to run. + */ + persistent?: boolean; + + /** + * ([anymatch](https://github.com/es128/anymatch)-compatible definition) Defines files/paths to + * be ignored. The whole relative or absolute path is tested, not just filename. If a function + * with two arguments is provided, it gets called twice per path - once with a single argument + * (the path), second time with two arguments (the path and the + * [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). + */ + ignored?: any; + + /** + * If set to `false` then `add`/`addDir` events are also emitted for matching paths while + * instantiating the watching as chokidar discovers these file paths (before the `ready` event). + */ + ignoreInitial?: boolean; + + /** + * When `false`, only the symlinks themselves will be watched for changes instead of following + * the link references and bubbling events through the link's path. + */ + followSymlinks?: boolean; + + /** + * The base directory from which watch `paths` are to be derived. Paths emitted with events will + * be relative to this. + */ + cwd?: string; + + /** + * If set to true then the strings passed to .watch() and .add() are treated as literal path + * names, even if they look like globs. Default: false. + */ + disableGlobbing?: boolean; + + /** + * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU + * utilization, consider setting this to `false`. It is typically necessary to **set this to + * `true` to successfully watch files over a network**, and it may be necessary to successfully + * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides + * the `useFsEvents` default. + */ + usePolling?: boolean; + + /** + * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly + * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on + * OS X, `usePolling: true` becomes the default. + */ + useFsEvents?: boolean; + + /** + * If relying upon the [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object that + * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is + * provided even in cases where it wasn't already available from the underlying watch events. + */ + alwaysStat?: boolean; + + /** + * If set, limits how many levels of subdirectories will be traversed. + */ + depth?: number; + + /** + * Interval of file system polling. + */ + interval?: number; + + /** + * Interval of file system polling for binary files. ([see list of binary extensions](https://gi + * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) + */ + binaryInterval?: number; + + /** + * Indicates whether to watch files that don't have read permissions if possible. If watching + * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed + * silently. + */ + ignorePermissionErrors?: boolean; + + /** + * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts + * that occur when using editors that use "atomic writes" instead of writing directly to the + * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` + * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, + * you can override it by setting `atomic` to a custom value, in milliseconds. + */ + atomic?: boolean | number; + + /** + * can be set to an object in order to adjust timing params: + */ + awaitWriteFinish?: AwaitWriteFinishOptions | boolean; +} + +export interface AwaitWriteFinishOptions { + /** + * Amount of time in milliseconds for a file size to remain constant before emitting its event. + */ + stabilityThreshold?: number; + + /** + * File size polling interval. + */ + pollInterval?: number; +} + +/** + * produces an instance of `FSWatcher`. + */ +export function watch( + paths: string | string[], + options?: WatchOptions +): FSWatcher; diff --git a/node_modules/live-server/node_modules/readdirp/LICENSE b/node_modules/live-server/node_modules/readdirp/LICENSE new file mode 100644 index 0000000..8a63b80 --- /dev/null +++ b/node_modules/live-server/node_modules/readdirp/LICENSE @@ -0,0 +1,20 @@ +This software is released under the MIT license: + +Copyright (c) 2012-2015 Thorsten Lorenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/live-server/node_modules/readdirp/README.md b/node_modules/live-server/node_modules/readdirp/README.md new file mode 100644 index 0000000..431f402 --- /dev/null +++ b/node_modules/live-server/node_modules/readdirp/README.md @@ -0,0 +1,204 @@ +# readdirp [![Build Status](https://secure.travis-ci.org/thlorenz/readdirp.svg)](http://travis-ci.org/thlorenz/readdirp) + +[![NPM](https://nodei.co/npm/readdirp.png?downloads=true&stars=true)](https://nodei.co/npm/readdirp/) + +Recursive version of [fs.readdir](http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback). Exposes a **stream api**. + +```javascript +var readdirp = require('readdirp') + , path = require('path') + , es = require('event-stream'); + +// print out all JavaScript files along with their size + +var stream = readdirp({ root: path.join(__dirname), fileFilter: '*.js' }); +stream + .on('warn', function (err) { + console.error('non-fatal error', err); + // optionally call stream.destroy() here in order to abort and cause 'close' to be emitted + }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(es.mapSync(function (entry) { + return { path: entry.path, size: entry.stat.size }; + })) + .pipe(es.stringify()) + .pipe(process.stdout); +``` + +Meant to be one of the recursive versions of [fs](http://nodejs.org/docs/latest/api/fs.html) functions, e.g., like [mkdirp](https://github.com/substack/node-mkdirp). + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Installation](#installation) +- [API](#api) + - [entry stream](#entry-stream) + - [options](#options) + - [entry info](#entry-info) + - [Filters](#filters) + - [Callback API](#callback-api) + - [allProcessed ](#allprocessed) + - [fileProcessed](#fileprocessed) +- [More Examples](#more-examples) + - [stream api](#stream-api) + - [stream api pipe](#stream-api-pipe) + - [grep](#grep) + - [using callback api](#using-callback-api) + - [tests](#tests) + + +# Installation + + npm install readdirp + +# API + +***var entryStream = readdirp (options)*** + +Reads given root recursively and returns a `stream` of [entry info](#entry-info)s. + +## entry stream + +Behaves as follows: + +- `emit('data')` passes an [entry info](#entry-info) whenever one is found +- `emit('warn')` passes a non-fatal `Error` that prevents a file/directory from being processed (i.e., if it is + inaccessible to the user) +- `emit('error')` passes a fatal `Error` which also ends the stream (i.e., when illegal options where passed) +- `emit('end')` called when all entries were found and no more will be emitted (i.e., we are done) +- `emit('close')` called when the stream is destroyed via `stream.destroy()` (which could be useful if you want to + manually abort even on a non fatal error) - at that point the stream is no longer `readable` and no more entries, + warning or errors are emitted +- to learn more about streams, consult the very detailed + [nodejs streams documentation](http://nodejs.org/api/stream.html) or the + [stream-handbook](https://github.com/substack/stream-handbook) + + +## options + +- **root**: path in which to start reading and recursing into subdirectories + +- **fileFilter**: filter to include/exclude files found (see [Filters](#filters) for more) + +- **directoryFilter**: filter to include/exclude directories found and to recurse into (see [Filters](#filters) for more) + +- **depth**: depth at which to stop recursing even if more subdirectories are found + +- **entryType**: determines if data events on the stream should be emitted for `'files'`, `'directories'`, `'both'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. Defaults to `'files'`. + +- **lstat**: if `true`, readdirp uses `fs.lstat` instead of `fs.stat` in order to stat files and includes symlink entries in the stream along with files. + +## entry info + +Has the following properties: + +- **parentDir** : directory in which entry was found (relative to given root) +- **fullParentDir** : full path to parent directory +- **name** : name of the file/directory +- **path** : path to the file/directory (relative to given root) +- **fullPath** : full path to the file/directory found +- **stat** : built in [stat object](http://nodejs.org/docs/v0.4.9/api/fs.html#fs.Stats) +- **Example**: (assuming root was `/User/dev/readdirp`) + + parentDir : 'test/bed/root_dir1', + fullParentDir : '/User/dev/readdirp/test/bed/root_dir1', + name : 'root_dir1_subdir1', + path : 'test/bed/root_dir1/root_dir1_subdir1', + fullPath : '/User/dev/readdirp/test/bed/root_dir1/root_dir1_subdir1', + stat : [ ... ] + +## Filters + +There are three different ways to specify filters for files and directories respectively. + +- **function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + +- **glob string**: a string (e.g., `*.js`) which is matched using [minimatch](https://github.com/isaacs/minimatch), so go there for more + information. + + Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. + + Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + +- **array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + + `[ '*.json', '*.js' ]` includes all JavaScript and Json files. + + + `[ '!.git', '!node_modules' ]` includes all directories except the '.git' and 'node_modules'. + +Directories that do not pass a filter will not be recursed into. + +## Callback API + +Although the stream api is recommended, readdirp also exposes a callback based api. + +***readdirp (options, callback1 [, callback2])*** + +If callback2 is given, callback1 functions as the **fileProcessed** callback, and callback2 as the **allProcessed** callback. + +If only callback1 is given, it functions as the **allProcessed** callback. + +### allProcessed + +- function with err and res parameters, e.g., `function (err, res) { ... }` +- **err**: array of errors that occurred during the operation, **res may still be present, even if errors occurred** +- **res**: collection of file/directory [entry infos](#entry-info) + +### fileProcessed + +- function with [entry info](#entry-info) parameter e.g., `function (entryInfo) { ... }` + + +# More Examples + +`on('error', ..)`, `on('warn', ..)` and `on('end', ..)` handling omitted for brevity + +```javascript +var readdirp = require('readdirp'); + +// Glob file filter +readdirp({ root: './test/bed', fileFilter: '*.js' }) + .on('data', function (entry) { + // do something with each JavaScript file entry + }); + +// Combined glob file filters +readdirp({ root: './test/bed', fileFilter: [ '*.js', '*.json' ] }) + .on('data', function (entry) { + // do something with each JavaScript and Json file entry + }); + +// Combined negated directory filters +readdirp({ root: './test/bed', directoryFilter: [ '!.git', '!*modules' ] }) + .on('data', function (entry) { + // do something with each file entry found outside '.git' or any modules directory + }); + +// Function directory filter +readdirp({ root: './test/bed', directoryFilter: function (di) { return di.name.length === 9; } }) + .on('data', function (entry) { + // do something with each file entry found inside directories whose name has length 9 + }); + +// Limiting depth +readdirp({ root: './test/bed', depth: 1 }) + .on('data', function (entry) { + // do something with each file entry found up to 1 subdirectory deep + }); + +// callback api +readdirp({ root: '.' }, function(fileInfo) { + // do something with file entry here + }, function (err, res) { + // all done, move on or do final step for all file entries here +}); +``` + +Try more examples by following [instructions](https://github.com/paulmillr/readdirp/blob/master/examples/Readme.md) +on how to get going. + +## tests + +The [readdirp tests](https://github.com/paulmillr/readdirp/blob/master/test/readdirp.js) also will give you a good idea on +how things work. + diff --git a/node_modules/live-server/node_modules/readdirp/package.json b/node_modules/live-server/node_modules/readdirp/package.json new file mode 100644 index 0000000..39314a2 --- /dev/null +++ b/node_modules/live-server/node_modules/readdirp/package.json @@ -0,0 +1,50 @@ +{ + "author": "Thorsten Lorenz (thlorenz.com)", + "name": "readdirp", + "description": "Recursive version of fs.readdir with streaming api.", + "version": "2.2.1", + "homepage": "https://github.com/paulmillr/readdirp", + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "readdirp.js", + "stream-api.js" + ], + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "main": "readdirp.js", + "scripts": { + "test-main": "(cd test && set -e; for t in ./*.js; do node $t; done)", + "test-0.10": "nave use 0.10 npm run test-main", + "test-0.12": "nave use 0.12 npm run test-main", + "test-4": "nave use 4.4 npm run test-main", + "test-6": "nave use 6.2 npm run test-main", + "test-all": "npm run test-main && npm run test-0.10 && npm run test-0.12 && npm run test-4 && npm run test-6", + "test": "npm run test-main" + }, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "devDependencies": { + "nave": "^0.5.1", + "proxyquire": "^1.7.9", + "tap": "1.3.2", + "through2": "^2.0.0" + }, + "license": "MIT" +} diff --git a/node_modules/live-server/node_modules/readdirp/readdirp.js b/node_modules/live-server/node_modules/readdirp/readdirp.js new file mode 100644 index 0000000..863bd17 --- /dev/null +++ b/node_modules/live-server/node_modules/readdirp/readdirp.js @@ -0,0 +1,294 @@ +'use strict'; + +var fs = require('graceful-fs') + , path = require('path') + , micromatch = require('micromatch').isMatch + , toString = Object.prototype.toString + ; + + +// Standard helpers +function isFunction (obj) { + return toString.call(obj) === '[object Function]'; +} + +function isString (obj) { + return toString.call(obj) === '[object String]'; +} + +function isUndefined (obj) { + return obj === void 0; +} + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param { Object } opts Options to specify root (start directory), filters and recursion depth + * @param { function } callback1 When callback2 is given calls back for each processed file - function (fileInfo) { ... }, + * when callback2 is not given, it behaves like explained in callback2 + * @param { function } callback2 Calls back once all files have been processed with an array of errors and file infos + * function (err, fileInfos) { ... } + */ +function readdir(opts, callback1, callback2) { + var stream + , handleError + , handleFatalError + , errors = [] + , readdirResult = { + directories: [] + , files: [] + } + , fileProcessed + , allProcessed + , realRoot + , aborted = false + , paused = false + ; + + // If no callbacks were given we will use a streaming interface + if (isUndefined(callback1)) { + var api = require('./stream-api')(); + stream = api.stream; + callback1 = api.processEntry; + callback2 = api.done; + handleError = api.handleError; + handleFatalError = api.handleFatalError; + + stream.on('close', function () { aborted = true; }); + stream.on('pause', function () { paused = true; }); + stream.on('resume', function () { paused = false; }); + } else { + handleError = function (err) { errors.push(err); }; + handleFatalError = function (err) { + handleError(err); + allProcessed(errors, null); + }; + } + + if (isUndefined(opts)){ + handleFatalError(new Error ( + 'Need to pass at least one argument: opts! \n' + + 'https://github.com/paulmillr/readdirp#options' + ) + ); + return stream; + } + + opts.root = opts.root || '.'; + opts.fileFilter = opts.fileFilter || function() { return true; }; + opts.directoryFilter = opts.directoryFilter || function() { return true; }; + opts.depth = typeof opts.depth === 'undefined' ? 999999999 : opts.depth; + opts.entryType = opts.entryType || 'files'; + + var statfn = opts.lstat === true ? fs.lstat.bind(fs) : fs.stat.bind(fs); + + if (isUndefined(callback2)) { + fileProcessed = function() { }; + allProcessed = callback1; + } else { + fileProcessed = callback1; + allProcessed = callback2; + } + + function normalizeFilter (filter) { + + if (isUndefined(filter)) return undefined; + + function isNegated (filters) { + + function negated(f) { + return f.indexOf('!') === 0; + } + + var some = filters.some(negated); + if (!some) { + return false; + } else { + if (filters.every(negated)) { + return true; + } else { + // if we detect illegal filters, bail out immediately + throw new Error( + 'Cannot mix negated with non negated glob filters: ' + filters + '\n' + + 'https://github.com/paulmillr/readdirp#filters' + ); + } + } + } + + // Turn all filters into a function + if (isFunction(filter)) { + + return filter; + + } else if (isString(filter)) { + + return function (entryInfo) { + return micromatch(entryInfo.name, filter.trim()); + }; + + } else if (filter && Array.isArray(filter)) { + + if (filter) filter = filter.map(function (f) { + return f.trim(); + }); + + return isNegated(filter) ? + // use AND to concat multiple negated filters + function (entryInfo) { + return filter.every(function (f) { + return micromatch(entryInfo.name, f); + }); + } + : + // use OR to concat multiple inclusive filters + function (entryInfo) { + return filter.some(function (f) { + return micromatch(entryInfo.name, f); + }); + }; + } + } + + function processDir(currentDir, entries, callProcessed) { + if (aborted) return; + var total = entries.length + , processed = 0 + , entryInfos = [] + ; + + fs.realpath(currentDir, function(err, realCurrentDir) { + if (aborted) return; + if (err) { + handleError(err); + callProcessed(entryInfos); + return; + } + + var relDir = path.relative(realRoot, realCurrentDir); + + if (entries.length === 0) { + callProcessed([]); + } else { + entries.forEach(function (entry) { + + var fullPath = path.join(realCurrentDir, entry) + , relPath = path.join(relDir, entry); + + statfn(fullPath, function (err, stat) { + if (err) { + handleError(err); + } else { + entryInfos.push({ + name : entry + , path : relPath // relative to root + , fullPath : fullPath + + , parentDir : relDir // relative to root + , fullParentDir : realCurrentDir + + , stat : stat + }); + } + processed++; + if (processed === total) callProcessed(entryInfos); + }); + }); + } + }); + } + + function readdirRec(currentDir, depth, callCurrentDirProcessed) { + var args = arguments; + if (aborted) return; + if (paused) { + setImmediate(function () { + readdirRec.apply(null, args); + }) + return; + } + + fs.readdir(currentDir, function (err, entries) { + if (err) { + handleError(err); + callCurrentDirProcessed(); + return; + } + + processDir(currentDir, entries, function(entryInfos) { + + var subdirs = entryInfos + .filter(function (ei) { return ei.stat.isDirectory() && opts.directoryFilter(ei); }); + + subdirs.forEach(function (di) { + if(opts.entryType === 'directories' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(di); + } + readdirResult.directories.push(di); + }); + + entryInfos + .filter(function(ei) { + var isCorrectType = opts.entryType === 'all' ? + !ei.stat.isDirectory() : ei.stat.isFile() || ei.stat.isSymbolicLink(); + return isCorrectType && opts.fileFilter(ei); + }) + .forEach(function (fi) { + if(opts.entryType === 'files' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(fi); + } + readdirResult.files.push(fi); + }); + + var pendingSubdirs = subdirs.length; + + // Be done if no more subfolders exist or we reached the maximum desired depth + if(pendingSubdirs === 0 || depth === opts.depth) { + callCurrentDirProcessed(); + } else { + // recurse into subdirs, keeping track of which ones are done + // and call back once all are processed + subdirs.forEach(function (subdir) { + readdirRec(subdir.fullPath, depth + 1, function () { + pendingSubdirs = pendingSubdirs - 1; + if(pendingSubdirs === 0) { + callCurrentDirProcessed(); + } + }); + }); + } + }); + }); + } + + // Validate and normalize filters + try { + opts.fileFilter = normalizeFilter(opts.fileFilter); + opts.directoryFilter = normalizeFilter(opts.directoryFilter); + } catch (err) { + // if we detect illegal filters, bail out immediately + handleFatalError(err); + return stream; + } + + // If filters were valid get on with the show + fs.realpath(opts.root, function(err, res) { + if (err) { + handleFatalError(err); + return stream; + } + + realRoot = res; + readdirRec(opts.root, 0, function () { + // All errors are collected into the errors array + if (errors.length > 0) { + allProcessed(errors, readdirResult); + } else { + allProcessed(null, readdirResult); + } + }); + }); + + return stream; +} + +module.exports = readdir; diff --git a/node_modules/live-server/node_modules/readdirp/stream-api.js b/node_modules/live-server/node_modules/readdirp/stream-api.js new file mode 100644 index 0000000..bffd1a9 --- /dev/null +++ b/node_modules/live-server/node_modules/readdirp/stream-api.js @@ -0,0 +1,98 @@ +'use strict'; + +var stream = require('readable-stream'); +var util = require('util'); + +var Readable = stream.Readable; + +module.exports = ReaddirpReadable; + +util.inherits(ReaddirpReadable, Readable); + +function ReaddirpReadable (opts) { + if (!(this instanceof ReaddirpReadable)) return new ReaddirpReadable(opts); + + opts = opts || {}; + + opts.objectMode = true; + Readable.call(this, opts); + + // backpressure not implemented at this point + this.highWaterMark = Infinity; + + this._destroyed = false; + this._paused = false; + this._warnings = []; + this._errors = []; + + this._pauseResumeErrors(); +} + +var proto = ReaddirpReadable.prototype; + +proto._pauseResumeErrors = function () { + var self = this; + self.on('pause', function () { self._paused = true }); + self.on('resume', function () { + if (self._destroyed) return; + self._paused = false; + + self._warnings.forEach(function (err) { self.emit('warn', err) }); + self._warnings.length = 0; + + self._errors.forEach(function (err) { self.emit('error', err) }); + self._errors.length = 0; + }) +} + +// called for each entry +proto._processEntry = function (entry) { + if (this._destroyed) return; + this.push(entry); +} + +proto._read = function () { } + +proto.destroy = function () { + // when stream is destroyed it will emit nothing further, not even errors or warnings + this.push(null); + this.readable = false; + this._destroyed = true; + this.emit('close'); +} + +proto._done = function () { + this.push(null); +} + +// we emit errors and warnings async since we may handle errors like invalid args +// within the initial event loop before any event listeners subscribed +proto._handleError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._warnings.push(err); + if (!self._destroyed) self.emit('warn', err); + }); +} + +proto._handleFatalError = function (err) { + var self = this; + setImmediate(function () { + if (self._paused) return self._errors.push(err); + if (!self._destroyed) self.emit('error', err); + }); +} + +function createStreamAPI () { + var stream = new ReaddirpReadable(); + + return { + stream : stream + , processEntry : stream._processEntry.bind(stream) + , done : stream._done.bind(stream) + , handleError : stream._handleError.bind(stream) + , handleFatalError : stream._handleFatalError.bind(stream) + }; +} + +module.exports = createStreamAPI; diff --git a/node_modules/live-server/package.json b/node_modules/live-server/package.json new file mode 100644 index 0000000..cae825c --- /dev/null +++ b/node_modules/live-server/package.json @@ -0,0 +1,66 @@ +{ + "name": "live-server", + "version": "1.2.2", + "description": "simple development http server with live reload capability", + "keywords": [ + "front-end", + "development", + "tool", + "server", + "http", + "cli" + ], + "author": "Tapio Vierros", + "dependencies": { + "chokidar": "^2.0.4", + "colors": "1.4.0", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + }, + "devDependencies": { + "eslint": "^5.9.0", + "jshint": "^2.9.6", + "mocha": "^5.2.0", + "supertest": "^3.3.0" + }, + "scripts": { + "lint": "eslint live-server.js index.js", + "hint": "jshint live-server.js index.js", + "test": "mocha test --exit && npm run lint" + }, + "bin": { + "live-server": "./live-server.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/tapio/live-server.git" + }, + "engines": { + "node": ">=0.10.0" + }, + "preferGlobal": true, + "license": "MIT", + "eslintConfig": { + "env": { + "node": true + }, + "rules": { + "quotes": 0, + "curly": 0, + "strict": 0, + "no-process-exit": 0, + "eqeqeq": 1, + "no-unused-vars": 1, + "no-shadow": 1 + } + } +} diff --git a/node_modules/live-server/test/acceptance.js b/node_modules/live-server/test/acceptance.js new file mode 100644 index 0000000..e4eabbb --- /dev/null +++ b/node_modules/live-server/test/acceptance.js @@ -0,0 +1,67 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false +}); + +describe('basic functional tests', function(){ + it('should respond with index.html', function(done){ + request(liveServer) + .get('/') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/hello world/i) + .expect(200, done); + }); + it('should have injected script', function(done){ + request(liveServer) + .get('/') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/ + + + diff --git a/node_modules/live-server/test/htpasswd.js b/node_modules/live-server/test/htpasswd.js new file mode 100644 index 0000000..c606e49 --- /dev/null +++ b/node_modules/live-server/test/htpasswd.js @@ -0,0 +1,28 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + htpasswd: path.join(__dirname, "data", "htpasswd-test") +}); + +describe('htpasswd tests', function() { + it('should respond with 401 since no password is given', function(done) { + request(liveServer) + .get('/') + .expect(401, done); + }); + it('should respond with 401 since wrong password is given', function(done) { + request(liveServer) + .get('/') + .auth("test", "not-real-password") + .expect(401, done); + }); + it('should respond with 200 since correct password is given', function(done) { + request(liveServer) + .get('/') + .auth("test", "test") + .expect(200, done); + }); +}); diff --git a/node_modules/live-server/test/https.js b/node_modules/live-server/test/https.js new file mode 100644 index 0000000..9b4bd71 --- /dev/null +++ b/node_modules/live-server/test/https.js @@ -0,0 +1,48 @@ +var request = require('supertest'); +var path = require('path'); +// accept self-signed certificates +process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; + +function tests(liveServer) { + it('should reply with a correct index file', function(done) { + request(liveServer) + .get('/index.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/Hello world/i) + .expect(200, done); + }); + it('should support head request', function(done) { + request(liveServer) + .head('/index.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(200, done); + }); +} + +describe('https tests with external module', function() { + var opts = { + root: path.join(__dirname, 'data'), + port: 0, + open: false, + https: path.join(__dirname, 'conf/https.conf.js') + }; + var liveServer = require("..").start(opts); + tests(liveServer); + after(function () { + liveServer.close() + }); +}); + +describe('https tests with object', function() { + var opts = { + root: path.join(__dirname, 'data'), + port: 0, + open: false, + https: require(path.join(__dirname, 'conf/https.conf.js')) + }; + var liveServer = require("..").start(opts); + tests(liveServer); + after(function () { + liveServer.close() + }); +}); diff --git a/node_modules/live-server/test/middleware.js b/node_modules/live-server/test/middleware.js new file mode 100644 index 0000000..acaecd8 --- /dev/null +++ b/node_modules/live-server/test/middleware.js @@ -0,0 +1,43 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer1 = require('..').start({ + root: path.join(__dirname, 'data'), + port: 0, + open: false, + middleware: [ + function setStatus(req, res, next) { + res.statusCode = 201; + next(); + } + ] +}); +var liveServer2 = require('..').start({ + root: path.join(__dirname, 'data'), + port: 0, + open: false, + middleware: [ "example" ] +}); +var liveServer3 = require('..').start({ + root: path.join(__dirname, 'data'), + port: 0, + open: false, + middleware: [ path.join(__dirname, 'data', 'middleware.js') ] +}); + +describe('middleware tests', function() { + it("should respond with middleware function's status code", function(done) { + request(liveServer1) + .get('/') + .expect(201, done); + }); + it("should respond with built-in middleware's status code", function(done) { + request(liveServer2) + .get('/') + .expect(202, done); + }); + it("should respond with external middleware's status code", function(done) { + request(liveServer3) + .get('/') + .expect(203, done); + }); +}); diff --git a/node_modules/live-server/test/mount.js b/node_modules/live-server/test/mount.js new file mode 100644 index 0000000..3660bd7 --- /dev/null +++ b/node_modules/live-server/test/mount.js @@ -0,0 +1,30 @@ +var request = require('supertest'); +var path = require('path'); +var liveServer = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + mount: [ + [ "/mounted", path.join(__dirname, "data", "sub") ], + [ "/style", path.join(__dirname, "data", "style.css") ] + ] +}); + +describe('mount tests', function() { + it('should respond with sub.html', function(done) { + request(liveServer) + .get('/mounted/sub.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/Subdirectory/i) + .expect(200, done); + }); + it('should respond with style.css', function(done) { + request(liveServer) + .get('/style') + .expect('Content-Type', 'text/css; charset=UTF-8') + .expect(/color/i) + .expect(200, done); + }); +}); + + diff --git a/node_modules/live-server/test/proxy.js b/node_modules/live-server/test/proxy.js new file mode 100644 index 0000000..473e628 --- /dev/null +++ b/node_modules/live-server/test/proxy.js @@ -0,0 +1,28 @@ +var request = require('supertest'); +var path = require('path'); +var port = 40200; +var server1 = require('..').start({ + root: path.join(__dirname, "data"), + port: port, + open: false +}); +var server2 = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + proxy: [ + ["/server1", "http://localhost:" + port] + ] +}); + +describe('proxy tests', function() { + it('should respond with proxied content', function(done) { + request(server2) + .get('/server1/index.html') + .expect('Content-Type', 'text/html; charset=UTF-8') + .expect(/Hello world/i) + .expect(200, done); + }); +}); + + diff --git a/node_modules/live-server/test/spa.js b/node_modules/live-server/test/spa.js new file mode 100644 index 0000000..eb41f48 --- /dev/null +++ b/node_modules/live-server/test/spa.js @@ -0,0 +1,40 @@ +var request = require('supertest'); +var path = require('path'); +var liveServerSpa = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + middleware: [ "spa" ] +}); +var liveServerSpaIgnoreAssets = require('..').start({ + root: path.join(__dirname, "data"), + port: 0, + open: false, + middleware: [ "spa-ignore-assets" ] +}); + +describe('spa tests', function(){ + it('spa should redirect', function(done){ + request(liveServerSpa) + .get('/api') + .expect('Location', /\/#\//) + .expect(302, done); + }); + it('spa should redirect everything', function(done){ + request(liveServerSpa) + .get('/style.css') + .expect('Location', /\/#\//) + .expect(302, done); + }); + it('spa-ignore-assets should redirect something', function(done){ + request(liveServerSpaIgnoreAssets) + .get('/api') + .expect('Location', /\/#\//) + .expect(302, done); + }); + it('spa-ignore-assets should not redirect .css', function(done){ + request(liveServerSpaIgnoreAssets) + .get('/style.css') + .expect(200, done); + }); +}); diff --git a/node_modules/load-json-file/index.js b/node_modules/load-json-file/index.js new file mode 100644 index 0000000..b2767e3 --- /dev/null +++ b/node_modules/load-json-file/index.js @@ -0,0 +1,11 @@ +'use strict'; +const path = require('path'); +const fs = require('graceful-fs'); +const stripBom = require('strip-bom'); +const parseJson = require('parse-json'); +const pify = require('pify'); + +const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp)); + +module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp)); +module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp); diff --git a/node_modules/load-json-file/license b/node_modules/load-json-file/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/load-json-file/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/load-json-file/package.json b/node_modules/load-json-file/package.json new file mode 100644 index 0000000..8bfb1c6 --- /dev/null +++ b/node_modules/load-json-file/package.json @@ -0,0 +1,43 @@ +{ + "name": "load-json-file", + "version": "4.0.0", + "description": "Read and parse a JSON file", + "license": "MIT", + "repository": "sindresorhus/load-json-file", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "read", + "json", + "parse", + "file", + "fs", + "graceful", + "load" + ], + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "esnext": true + } +} diff --git a/node_modules/load-json-file/readme.md b/node_modules/load-json-file/readme.md new file mode 100644 index 0000000..3319c26 --- /dev/null +++ b/node_modules/load-json-file/readme.md @@ -0,0 +1,45 @@ +# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file) + +> Read and parse a JSON file + +[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json). + + +## Install + +``` +$ npm install --save load-json-file +``` + + +## Usage + +```js +const loadJsonFile = require('load-json-file'); + +loadJsonFile('foo.json').then(json => { + console.log(json); + //=> {foo: true} +}); +``` + + +## API + +### loadJsonFile(filepath) + +Returns a promise for the parsed JSON. + +### loadJsonFile.sync(filepath) + +Returns the parsed JSON. + + +## Related + +- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/map-cache/LICENSE b/node_modules/map-cache/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/map-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/map-cache/README.md b/node_modules/map-cache/README.md new file mode 100644 index 0000000..6260b29 --- /dev/null +++ b/node_modules/map-cache/README.md @@ -0,0 +1,145 @@ +# map-cache [![NPM version](https://img.shields.io/npm/v/map-cache.svg?style=flat)](https://www.npmjs.com/package/map-cache) [![NPM downloads](https://img.shields.io/npm/dm/map-cache.svg?style=flat)](https://npmjs.org/package/map-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/map-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/map-cache) + +Basic cache object for storing key-value pairs. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install map-cache --save +``` + +Based on MapCache in Lo-dash v3.0. [MIT License](https://github.com/lodash/lodash/blob/master/LICENSE.txt) + +## Usage + +```js +var MapCache = require('map-cache'); +var mapCache = new MapCache(); +``` + +## API + +### [MapCache](index.js#L28) + +Creates a cache object to store key/value pairs. + +**Example** + +```js +var cache = new MapCache(); +``` + +### [.set](index.js#L45) + +Adds `value` to `key` on the cache. + +**Params** + +* `key` **{String}**: The key of the value to cache. +* `value` **{any}**: The value to cache. +* `returns` **{Object}**: Returns the `Cache` object for chaining. + +**Example** + +```js +cache.set('foo', 'bar'); +``` + +### [.get](index.js#L65) + +Gets the cached value for `key`. + +**Params** + +* `key` **{String}**: The key of the value to get. +* `returns` **{any}**: Returns the cached value. + +**Example** + +```js +cache.get('foo'); +//=> 'bar' +``` + +### [.has](index.js#L82) + +Checks if a cached value for `key` exists. + +**Params** + +* `key` **{String}**: The key of the entry to check. +* `returns` **{Boolean}**: Returns `true` if an entry for `key` exists, else `false`. + +**Example** + +```js +cache.has('foo'); +//=> true +``` + +### [.del](index.js#L98) + +Removes `key` and its value from the cache. + +**Params** + +* `key` **{String}**: The key of the value to remove. +* `returns` **{Boolean}**: Returns `true` if the entry was removed successfully, else `false`. + +**Example** + +```js +cache.del('foo'); +``` + +## Related projects + +You might also be interested in these projects: + +* [cache-base](https://www.npmjs.com/package/cache-base): Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects. | [homepage](https://github.com/jonschlinkert/cache-base) +* [config-cache](https://www.npmjs.com/package/config-cache): General purpose JavaScript object storage methods. | [homepage](https://github.com/jonschlinkert/config-cache) +* [option-cache](https://www.npmjs.com/package/option-cache): Simple API for managing options in JavaScript applications. | [homepage](https://github.com/jonschlinkert/option-cache) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/map-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 10, 2016._ \ No newline at end of file diff --git a/node_modules/map-cache/index.js b/node_modules/map-cache/index.js new file mode 100644 index 0000000..f86842f --- /dev/null +++ b/node_modules/map-cache/index.js @@ -0,0 +1,100 @@ +/*! + * map-cache + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var hasOwn = Object.prototype.hasOwnProperty; + +/** + * Expose `MapCache` + */ + +module.exports = MapCache; + +/** + * Creates a cache object to store key/value pairs. + * + * ```js + * var cache = new MapCache(); + * ``` + * + * @api public + */ + +function MapCache(data) { + this.__data__ = data || {}; +} + +/** + * Adds `value` to `key` on the cache. + * + * ```js + * cache.set('foo', 'bar'); + * ``` + * + * @param {String} `key` The key of the value to cache. + * @param {*} `value` The value to cache. + * @returns {Object} Returns the `Cache` object for chaining. + * @api public + */ + +MapCache.prototype.set = function mapSet(key, value) { + if (key !== '__proto__') { + this.__data__[key] = value; + } + return this; +}; + +/** + * Gets the cached value for `key`. + * + * ```js + * cache.get('foo'); + * //=> 'bar' + * ``` + * + * @param {String} `key` The key of the value to get. + * @returns {*} Returns the cached value. + * @api public + */ + +MapCache.prototype.get = function mapGet(key) { + return key === '__proto__' ? undefined : this.__data__[key]; +}; + +/** + * Checks if a cached value for `key` exists. + * + * ```js + * cache.has('foo'); + * //=> true + * ``` + * + * @param {String} `key` The key of the entry to check. + * @returns {Boolean} Returns `true` if an entry for `key` exists, else `false`. + * @api public + */ + +MapCache.prototype.has = function mapHas(key) { + return key !== '__proto__' && hasOwn.call(this.__data__, key); +}; + +/** + * Removes `key` and its value from the cache. + * + * ```js + * cache.del('foo'); + * ``` + * @title .del + * @param {String} `key` The key of the value to remove. + * @returns {Boolean} Returns `true` if the entry was removed successfully, else `false`. + * @api public + */ + +MapCache.prototype.del = function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; +}; diff --git a/node_modules/map-cache/package.json b/node_modules/map-cache/package.json new file mode 100644 index 0000000..8bf0af2 --- /dev/null +++ b/node_modules/map-cache/package.json @@ -0,0 +1,59 @@ +{ + "name": "map-cache", + "description": "Basic cache object for storing key-value pairs.", + "version": "0.2.2", + "homepage": "https://github.com/jonschlinkert/map-cache", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/map-cache", + "bugs": { + "url": "https://github.com/jonschlinkert/map-cache/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "should": "^8.3.1" + }, + "keywords": [ + "cache", + "get", + "has", + "object", + "set", + "storage", + "store" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "config-cache", + "option-cache", + "cache-base" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/map-stream/.npmignore b/node_modules/map-stream/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/map-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/map-stream/.travis.yml b/node_modules/map-stream/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/node_modules/map-stream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/node_modules/map-stream/LICENCE b/node_modules/map-stream/LICENCE new file mode 100644 index 0000000..171dd97 --- /dev/null +++ b/node_modules/map-stream/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/map-stream/examples/pretty.js b/node_modules/map-stream/examples/pretty.js new file mode 100644 index 0000000..ab07398 --- /dev/null +++ b/node_modules/map-stream/examples/pretty.js @@ -0,0 +1,26 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var map = require('..') //load map-stream + var es = require('event-stream') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + map(function (data, callback) { //turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/node_modules/map-stream/index.js b/node_modules/map-stream/index.js new file mode 100644 index 0000000..09ae829 --- /dev/null +++ b/node_modules/map-stream/index.js @@ -0,0 +1,145 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var Stream = require('stream').Stream + + +//create an event stream and apply function to each .write +//emitting each response as data +//unless it's an empty callback + +module.exports = function (mapper, opts) { + + var stream = new Stream() + , self = this + , inputs = 0 + , outputs = 0 + , ended = false + , paused = false + , destroyed = false + , lastWritten = 0 + , inNext = false + + this.opts = opts || {}; + var errorEventName = this.opts.failures ? 'failure' : 'error'; + + // Items that are not ready to be written yet (because they would come out of + // order) get stuck in a queue for later. + var writeQueue = {} + + stream.writable = true + stream.readable = true + + function queueData (data, number) { + var nextToWrite = lastWritten + 1 + + if (number === nextToWrite) { + // If it's next, and its not undefined write it + if (data !== undefined) { + stream.emit.apply(stream, ['data', data]) + } + lastWritten ++ + nextToWrite ++ + } else { + // Otherwise queue it for later. + writeQueue[number] = data + } + + // If the next value is in the queue, write it + if (writeQueue.hasOwnProperty(nextToWrite)) { + var dataToWrite = writeQueue[nextToWrite] + delete writeQueue[nextToWrite] + return queueData(dataToWrite, nextToWrite) + } + + outputs ++ + if(inputs === outputs) { + if(paused) paused = false, stream.emit('drain') //written all the incoming events + if(ended) end() + } + } + + function next (err, data, number) { + if(destroyed) return + inNext = true + + if (!err || self.opts.failures) { + queueData(data, number) + } + + if (err) { + stream.emit.apply(stream, [ errorEventName, err ]); + } + + inNext = false; + } + + // Wrap the mapper function by calling its callback with the order number of + // the item in the stream. + function wrappedMapper (input, number, callback) { + return mapper.call(null, input, function(err, data){ + callback(err, data, number) + }) + } + + stream.write = function (data) { + if(ended) throw new Error('map stream is not writable') + inNext = false + inputs ++ + + try { + //catch sync errors and handle them like async errors + var written = wrappedMapper(data, inputs, next) + paused = (written === false) + return !paused + } catch (err) { + //if the callback has been called syncronously, and the error + //has occured in an listener, throw it again. + if(inNext) + throw err + next(err) + return !paused + } + } + + function end (data) { + //if end was called with args, write it, + ended = true //write will emit 'end' if ended is true + stream.writable = false + if(data !== undefined) { + return queueData(data, inputs) + } else if (inputs == outputs) { //wait for processing + stream.readable = false, stream.emit('end'), stream.destroy() + } + } + + stream.end = function (data) { + if(ended) return + end() + } + + stream.destroy = function () { + ended = destroyed = true + stream.writable = stream.readable = paused = false + process.nextTick(function () { + stream.emit('close') + }) + } + stream.pause = function () { + paused = true + } + + stream.resume = function () { + paused = false + } + + return stream +} + + + + diff --git a/node_modules/map-stream/package.json b/node_modules/map-stream/package.json new file mode 100644 index 0000000..cb6b7f3 --- /dev/null +++ b/node_modules/map-stream/package.json @@ -0,0 +1,24 @@ +{ + "name": "map-stream", + "version": "0.1.0", + "description": "construct pipes of streams of events", + "homepage": "http://github.com/dominictarr/map-stream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/map-stream.git" + }, + "dependencies": { + }, + "devDependencies": { + "asynct": "*", + "it-is": "1", + "ubelt": "~2.9", + "stream-spec": "~0.2", + "event-stream": "~2.1", + "from": "0.0.2" + }, + "scripts": { + "test": "asynct test/" + }, + "author": "Dominic Tarr (http://dominictarr.com)" +} diff --git a/node_modules/map-stream/readme.markdown b/node_modules/map-stream/readme.markdown new file mode 100644 index 0000000..1897158 --- /dev/null +++ b/node_modules/map-stream/readme.markdown @@ -0,0 +1,37 @@ +# MapStream + +Refactored out of [event-stream](https://github.com/dominictarr/event-stream) + +##map (asyncFunction[, options]) + +Create a through stream from an asyncronous function. + +``` js +var map = require('map-stream') + +map(function (data, callback) { + //transform data + // ... + callback(null, data) +}) + +``` + +Each map MUST call the callback. It may callback with data, with an error or with no arguments, + + * `callback()` drop this data. + this makes the map work like `filter`, + note:`callback(null,null)` is not the same, and will emit `null` + + * `callback(null, newData)` turn data into newData + + * `callback(error)` emit an error for this item. + +>Note: if a callback is not called, `map` will think that it is still being processed, +>every call must be answered or the stream will not know when to end. +> +>Also, if the callback is called more than once, every call but the first will be ignored. + +##Options + + * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`) diff --git a/node_modules/map-stream/test/simple-map.asynct.js b/node_modules/map-stream/test/simple-map.asynct.js new file mode 100644 index 0000000..2b9a292 --- /dev/null +++ b/node_modules/map-stream/test/simple-map.asynct.js @@ -0,0 +1,318 @@ +'use strict'; + +var map = require('../') + , it = require('it-is') + , u = require('ubelt') + , spec = require('stream-spec') + , from = require('from') + , Stream = require('stream') + , es = require('event-stream') + +//REFACTOR THIS TEST TO USE es.readArray and es.writeArray + +function writeArray(array, stream) { + + array.forEach( function (j) { + stream.write(j) + }) + stream.end() + +} + +function readStream(stream, done) { + + var array = [] + stream.on('data', function (data) { + array.push(data) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +//call sink on each write, +//and complete when finished. + +function pauseStream (prob, delay) { + var pauseIf = ( + 'number' == typeof prob + ? function () { + return Math.random() < prob + } + : 'function' == typeof prob + ? prob + : 0.1 + ) + var delayer = ( + !delay + ? process.nextTick + : 'number' == typeof delay + ? function (next) { setTimeout(next, delay) } + : delay + ) + + return es.through(function (data) { + if(!this.paused && pauseIf()) { + console.log('PAUSE STREAM PAUSING') + this.pause() + var self = this + delayer(function () { + console.log('PAUSE STREAM RESUMING') + self.resume() + }) + } + console.log("emit ('data', " + data + ')') + this.emit('data', data) + }) +} + +exports ['simple map applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + + var doubler = map(function (data, cb) { + cb(null, data * 2) + }) + + spec(doubler).through().validateOnExit() + + //a map is only a middle man, so it is both readable and writable + + it(doubler).has({ + readable: true, + writable: true, + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) +// process.nextTick(x.validate) + test.done() + }) + + writeArray(input, doubler) + +} + +exports ['stream comes back in the correct order'] = function (test) { + var input = [3, 2, 1] + + var delayer = map(function(data, cb){ + setTimeout(function () { + cb(null, data) + }, 100 * data) + }) + + readStream(delayer, function (err, output) { + it(output).deepEqual(input) + test.done() + }) + + writeArray(input, delayer) +} + +exports ['continues on error event with failures `true`'] = function (test) { + var input = [1, 2, 3] + + var delayer = map(function(data, cb){ + cb(new Error('Something gone wrong'), data) + }, { failures: true }) + + readStream(delayer, function (err, output) { + it(output).deepEqual(input) + test.done() + }) + + writeArray(input, delayer) +} + +exports['pipe two maps together'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + function dd (data, cb) { + cb(null, data * 2) + } + var doubler1 = map(dd), doubler2 = map(dd) + + doubler1.pipe(doubler2) + + spec(doubler1).through().validateOnExit() + spec(doubler2).through().validateOnExit() + + readStream(doubler2, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 4 + })) + test.done() + }) + + writeArray(input, doubler1) + +} + +//next: +// +// test pause, resume and drian. +// + +// then make a pipe joiner: +// +// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) +// +// will return a single stream that write goes to the first + +exports ['map will not call end until the callback'] = function (test) { + + var ticker = map(function (data, cb) { + process.nextTick(function () { + cb(null, data * 2) + }) + }) + + spec(ticker).through().validateOnExit() + + ticker.write('x') + ticker.end() + + ticker.on('end', function () { + test.done() + }) +} + +exports ['emit failures with opts.failures === `ture`'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function () { + throw err + }, { failures: true }) + + mapper.on('failure', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['emit error thrown'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function () { + throw err + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['emit error calledback'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + map(function (data, callback) { + callback(err) + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['do not emit drain if not paused'] = function (test) { + + var maps = map(function (data, callback) { + u.delay(callback)(null, 1) + return true + }) + + spec(maps).through().pausable().validateOnExit() + + maps.on('drain', function () { + it(false).ok('should not emit drain unless the stream is paused') + }) + + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + setTimeout(function () {maps.end()},10) + maps.on('end', test.done) +} + +exports ['emits drain if paused, when all '] = function (test) { + var active = 0 + var drained = false + var maps = map(function (data, callback) { + active ++ + u.delay(function () { + active -- + callback(null, 1) + })() + console.log('WRITE', false) + return false + }) + + spec(maps).through().validateOnExit() + + maps.on('drain', function () { + drained = true + it(active).equal(0, 'should emit drain when all maps are done') + }) + + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + + process.nextTick(function () {maps.end()},10) + + maps.on('end', function () { + console.log('end') + it(drained).ok('shoud have emitted drain before end') + test.done() + }) + +} + +exports ['map applied to a stream with filtering'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = map(function (data, callback) { + if (data % 2) + callback(null, data * 2) + else + callback() + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.filter(function (j) { + return j % 2 + }).map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + + diff --git a/node_modules/map-visit/LICENSE b/node_modules/map-visit/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/node_modules/map-visit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/map-visit/README.md b/node_modules/map-visit/README.md new file mode 100644 index 0000000..5ab02d4 --- /dev/null +++ b/node_modules/map-visit/README.md @@ -0,0 +1,155 @@ +# map-visit [![NPM version](https://img.shields.io/npm/v/map-visit.svg?style=flat)](https://www.npmjs.com/package/map-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![NPM total downloads](https://img.shields.io/npm/dt/map-visit.svg?style=flat)](https://npmjs.org/package/map-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/map-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/map-visit) + +> Map `visit` over an array of objects. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save map-visit +``` + +## Usage + +```js +var mapVisit = require('map-visit'); +``` + +## What does this do? + +**Assign/Merge/Extend vs. Visit** + +Let's say you want to add a `set` method to your application that will: + +* set key-value pairs on a `data` object +* extend objects onto the `data` object +* extend arrays of objects onto the data object + +**Example using `extend`** + +Here is one way to accomplish this using Lo-Dash's `extend` (comparable to `Object.assign`): + +```js +var _ = require('lodash'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + _.extend.apply(_, [obj.data].concat(key)); + } else if (typeof key === 'object') { + _.extend(obj.data, key); + } else { + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }} +``` + +The above approach works fine for most use cases. However, **if you also want to emit an event** each time a property is added to the `data` object, or you want more control over what happens as the object is extended, a better approach would be to use `visit`. + +**Example using `visit`** + +In this approach: + +* when an array is passed to `set`, the `mapVisit` library calls the `set` method on each object in the array. +* when an object is passed, `visit` calls `set` on each property in the object. + +As a result, the `data` event will be emitted every time a property is added to `data` (events are just an example, you can use this approach to perform any necessary logic every time the method is called). + +```js +var mapVisit = require('map-visit'); +var visit = require('object-visit'); + +var obj = { + data: {}, + set: function (key, value) { + if (Array.isArray(key)) { + mapVisit(obj, 'set', key); + } else if (typeof key === 'object') { + visit(obj, 'set', key); + } else { + // simulate an event-emitter + console.log('emit', key, value); + obj.data[key] = value; + } + } +}; + +obj.set('a', 'a'); +obj.set([{b: 'b'}, {c: 'c'}]); +obj.set({d: {e: 'f'}}); +obj.set({g: 'h', i: 'j', k: 'l'}); + +console.log(obj.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }, g: 'h', i: 'j', k: 'l'} + +// events would look something like: +// emit a a +// emit b b +// emit c c +// emit d { e: 'f' } +// emit g h +// emit i j +// emit k l +``` + +## About + +### Related projects + +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [object-visit](https://www.npmjs.com/package/object-visit): Call a specified method on each value in the given object. | [homepage](https://github.com/jonschlinkert/object-visit "Call a specified method on each value in the given object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 15 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [doowb](https://github.com/doowb) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 09, 2017._ \ No newline at end of file diff --git a/node_modules/map-visit/index.js b/node_modules/map-visit/index.js new file mode 100644 index 0000000..bc54ccc --- /dev/null +++ b/node_modules/map-visit/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var util = require('util'); +var visit = require('object-visit'); + +/** + * Map `visit` over an array of objects. + * + * @param {Object} `collection` The context in which to invoke `method` + * @param {String} `method` Name of the method to call on `collection` + * @param {Object} `arr` Array of objects. + */ + +module.exports = function mapVisit(collection, method, val) { + if (isObject(val)) { + return visit.apply(null, arguments); + } + + if (!Array.isArray(val)) { + throw new TypeError('expected an array: ' + util.inspect(val)); + } + + var args = [].slice.call(arguments, 3); + + for (var i = 0; i < val.length; i++) { + var ele = val[i]; + if (isObject(ele)) { + visit.apply(null, [collection, method, ele].concat(args)); + } else { + collection[method].apply(collection, [ele].concat(args)); + } + } +}; + +function isObject(val) { + return val && (typeof val === 'function' || (!Array.isArray(val) && typeof val === 'object')); +} diff --git a/node_modules/map-visit/package.json b/node_modules/map-visit/package.json new file mode 100644 index 0000000..e8d0f41 --- /dev/null +++ b/node_modules/map-visit/package.json @@ -0,0 +1,74 @@ +{ + "name": "map-visit", + "description": "Map `visit` over an array of objects.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/map-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/map-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/map-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "object-visit": "^1.0.0" + }, + "devDependencies": { + "clone-deep": "^0.2.4", + "extend-shallow": "^2.0.1", + "gulp-format-md": "^0.1.12", + "lodash": "^4.17.4", + "mocha": "^3.2.0" + }, + "keywords": [ + "array", + "arrays", + "function", + "helper", + "invoke", + "key", + "map", + "method", + "object", + "objects", + "value", + "visit", + "visitor" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "collection-visit", + "object-visit" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/node_modules/memorystream/.npmignore b/node_modules/memorystream/.npmignore new file mode 100644 index 0000000..dba2495 --- /dev/null +++ b/node_modules/memorystream/.npmignore @@ -0,0 +1,8 @@ +.project +.settings +.settings/* +.gitignore +node_modules/ +.travis.yml +test-case/ +.git/ \ No newline at end of file diff --git a/node_modules/memorystream/Gruntfile.js b/node_modules/memorystream/Gruntfile.js new file mode 100644 index 0000000..2f6fa43 --- /dev/null +++ b/node_modules/memorystream/Gruntfile.js @@ -0,0 +1,23 @@ +module.exports = function(grunt) { + + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-mocha-test'); + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + jshint: { + options: { + node: true + }, + main : ["index.js"] + }, + mochaTest: { + options: { + reporter: 'spec' + }, + src: ['test/*.test.js'] + } + }); + + grunt.registerTask('default', ['jshint:main', 'mochaTest']); +}; \ No newline at end of file diff --git a/node_modules/memorystream/LICENSE b/node_modules/memorystream/LICENSE new file mode 100644 index 0000000..5860a88 --- /dev/null +++ b/node_modules/memorystream/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011 Dmitry Nizovtsev + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/memorystream/README.md b/node_modules/memorystream/README.md new file mode 100644 index 0000000..1abe8b6 --- /dev/null +++ b/node_modules/memorystream/README.md @@ -0,0 +1,93 @@ +[![Build Status](https://travis-ci.org/JSBizon/node-memorystream.svg?branch=master)](https://travis-ci.org/JSBizon/node-memorystream) + +# Introduction +node-memorystream - this module allow create streams in memory. It can be used for emulating file streams, filtering/mutating data between one stream and another, buffering incoming data, being the gap between two data/network streams of variable rates, etc. MemoryStream support read/write states or only read state or only write state. The API is meant to follow node's Stream implementation. +Module supports streams for node > 0.10 now. + + +Original module is here git://github.com/ollym/memstream.git was remade and improved. + +## Installation +If you have npm installed, you can simply type: + + npm install memorystream + +Or you can clone this repository using the git command: + + git clone git://github.com/JSBizon/node-memorystream.git + +## Usage +Some examples how to use memorystream module. + +#### Basic I/O Operation +In this example I illustrate the basic I/O operations of the memory stream. + + var MemoryStream = require('memorystream'); + var memStream = new MemoryStream(['Hello',' ']); + + var data = ''; + memStream.on('data', function(chunk) { + data += chunk.toString(); + }); + + memStream.write('World'); + + memStream.on('end', function() { + // outputs 'Hello World!' + console.log(data); + }); + memStream.end('!'); + +#### Piping +In this example I'm piping all data from the memory stream to the process's stdout stream. + + var MemoryStream = require('memorystream'); + var memStream = new MemoryStream(); + memStream.pipe(process.stdout, { end: false }); + + memStream.write('Hello World!'); + +In this example I'm piping all data from the response stream to the memory stream. + + var http = require('http'), + MemoryStream = require('memorystream'); + + var options = { + host: 'google.com' + }; + var memStream = new MemoryStream(null, { + readable : false + }); + + var req = http.get(options, function(res) { + res.pipe(memStream); + res.on('end', function() { + console.log(memStream.toString()); + }); + }); + +#### Delayed Response +In the example below, we first pause the stream before writing the data to it. The stream is then resumed after 1 second, and the data is written to the console. + + var MemoryStream = require('memorystream'); + + var memStream = new MemoryStream('Hello'); + var data = ''; + memStream.on('data', function(chunk) { + data += chunk; + }); + + memStream.pause(); + memStream.write('World!'); + + setTimeout(function() { + memStream.resume(); + }, 1000); + +## Documentation +The memory stream adopts all the same methods and events as node's Stream implementation. +Documentation is [available here](http://github.com/JSBizon/node-memorystream/wiki/API/ "Documentation"). + + + + \ No newline at end of file diff --git a/node_modules/memorystream/index.js b/node_modules/memorystream/index.js new file mode 100644 index 0000000..38d46ca --- /dev/null +++ b/node_modules/memorystream/index.js @@ -0,0 +1,209 @@ +'use strict'; + +var STREAM = require('stream'), + UTIL = require('util'), + StringDecoder = require('string_decoder').StringDecoder; + +function MemoryReadableStream(data, options) { + if (!(this instanceof MemoryReadableStream)) + return new MemoryReadableStream(data, options); + MemoryReadableStream.super_.call(this, options); + this.init(data, options); +} +UTIL.inherits(MemoryReadableStream, STREAM.Readable); + + +function MemoryWritableStream(data, options) { + if (!(this instanceof MemoryWritableStream)) + return new MemoryWritableStream(data, options); + MemoryWritableStream.super_.call(this, options); + this.init(data, options); +} +UTIL.inherits(MemoryWritableStream, STREAM.Writable); + + +function MemoryDuplexStream(data, options) { + if (!(this instanceof MemoryDuplexStream)) + return new MemoryDuplexStream(data, options); + MemoryDuplexStream.super_.call(this, options); + this.init(data, options); +} +UTIL.inherits(MemoryDuplexStream, STREAM.Duplex); + + +MemoryReadableStream.prototype.init = +MemoryWritableStream.prototype.init = +MemoryDuplexStream.prototype.init = function init (data, options) { + var self = this; + this.queue = []; + + if (data) { + if (!Array.isArray(data)) { + data = [ data ]; + } + + data.forEach(function (chunk) { + if (!(chunk instanceof Buffer)) { + chunk = new Buffer(chunk); + } + self.queue.push(chunk); + }); + + } + + options = options || {}; + + this.maxbufsize = options.hasOwnProperty('maxbufsize') ? options.maxbufsize + : null; + this.bufoverflow = options.hasOwnProperty('bufoverflow') ? options.bufoverflow + : null; + this.frequence = options.hasOwnProperty('frequence') ? options.frequence + : null; +}; + +function MemoryStream (data, options) { + if (!(this instanceof MemoryStream)) + return new MemoryStream(data, options); + + options = options || {}; + + var readable = options.hasOwnProperty('readable') ? options.readable : true, + writable = options.hasOwnProperty('writable') ? options.writable : true; + + if (readable && writable) { + return new MemoryDuplexStream(data, options); + } else if (readable) { + return new MemoryReadableStream(data, options); + } else if (writable) { + return new MemoryWritableStream(data, options); + } else { + throw new Error("Unknown stream type Readable, Writable or Duplex "); + } +} + + +MemoryStream.createReadStream = function (data, options) { + options = options || {}; + options.readable = true; + options.writable = false; + + return new MemoryStream(data, options); +}; + + +MemoryStream.createWriteStream = function (data, options) { + options = options || {}; + options.readable = false; + options.writable = true; + + return new MemoryStream(data, options); +}; + + +MemoryReadableStream.prototype._read = +MemoryDuplexStream.prototype._read = function _read (n) { + var self = this, + frequence = self.frequence || 0, + wait_data = this instanceof STREAM.Duplex && ! this._writableState.finished ? true : false; + if ( ! this.queue.length && ! wait_data) { + this.push(null);// finish stream + } else if (this.queue.length) { + setTimeout(function () { + if (self.queue.length) { + var chunk = self.queue.shift(); + if (chunk && ! self._readableState.ended) { + if ( ! self.push(chunk) ) { + self.queue.unshift(chunk); + } + } + } + }, frequence); + } +}; + + +MemoryWritableStream.prototype._write = +MemoryDuplexStream.prototype._write = function _write (chunk, encoding, cb) { + var decoder = null; + try { + decoder = this.decodeStrings && encoding ? new StringDecoder(encoding) : null; + } catch (err){ + return cb(err); + } + + var decoded_chunk = decoder ? decoder.write(chunk) : chunk, + queue_size = this._getQueueSize(), + chunk_size = decoded_chunk.length; + + if (this.maxbufsize && (queue_size + chunk_size) > this.maxbufsize ) { + if (this.bufoverflow) { + return cb("Buffer overflowed (" + this.bufoverflow + "/" + queue_size + ")"); + } else { + return cb(); + } + } + + if (this instanceof STREAM.Duplex) { + while (this.queue.length) { + this.push(this.queue.shift()); + } + this.push(decoded_chunk); + } else { + this.queue.push(decoded_chunk); + } + cb(); +}; + + +MemoryDuplexStream.prototype.end = function (chunk, encoding, cb) { + var self = this; + return MemoryDuplexStream.super_.prototype.end.call(this, chunk, encoding, function () { + self.push(null);//finish readble stream too + if (cb) cb(); + }); +}; + + +MemoryReadableStream.prototype._getQueueSize = +MemoryWritableStream.prototype._getQueueSize = +MemoryDuplexStream.prototype._getQueueSize = function () { + var queuesize = 0, i; + for (i = 0; i < this.queue.length; i++) { + queuesize += Array.isArray(this.queue[i]) ? this.queue[i][0].length + : this.queue[i].length; + } + return queuesize; +}; + + +MemoryWritableStream.prototype.toString = +MemoryDuplexStream.prototype.toString = +MemoryReadableStream.prototype.toString = +MemoryWritableStream.prototype.getAll = +MemoryDuplexStream.prototype.getAll = +MemoryReadableStream.prototype.getAll = function () { + var self = this, + ret = ''; + this.queue.forEach(function (data) { + ret += data; + }); + return ret; +}; + + +MemoryWritableStream.prototype.toBuffer = +MemoryDuplexStream.prototype.toBuffer = +MemoryReadableStream.prototype.toBuffer = function () { + var buffer = new Buffer(this._getQueueSize()), + currentOffset = 0; + + this.queue.forEach(function (data) { + var data_buffer = data instanceof Buffer ? data : new Buffer(data); + data_buffer.copy(buffer, currentOffset); + currentOffset += data.length; + }); + return buffer; +}; + + +module.exports = MemoryStream; diff --git a/node_modules/memorystream/package.json b/node_modules/memorystream/package.json new file mode 100644 index 0000000..0d08c69 --- /dev/null +++ b/node_modules/memorystream/package.json @@ -0,0 +1,39 @@ +{ + "name": "memorystream", + "description": "This is lightweight memory stream module for node.js.", + "version": "0.3.1", + "keywords": [ + "memory", + "test", + "stream", + "tools", + "streams", + "buffer" + ], + "scripts": { + "test": "grunt" + }, + "devDependencies" : { + "expect.js" : "~0.2.0", + "mocha" : "~1.20.0", + "grunt": "~0.4", + "grunt-cli": "~0.1.13", + "grunt-mocha-test" : "~0.12.2", + "grunt-contrib-jshint" : "~0.10.0", + "q": "~1.0.1" + }, + "author": "Dmitry Nizovtsev (https://github.com/JSBizon)", + "contributors": [ + { "name": "Dmitry Nizovtsev", "email": "dmitryp3@gmail.com" } + ], + "repository" : { + "type" : "git", + "url" : "https://github.com/JSBizon/node-memorystream.git" + }, + "homepage": "https://github.com/JSBizon/node-memorystream", + "engines": { "node": ">= 0.10.0" }, + "licenses": [ { + "type": "MIT", + "url" : "http://github.com/JSBizon/node-memorystream/raw/master/LICENSE" + } ] +} \ No newline at end of file diff --git a/node_modules/memorystream/test/example.js b/node_modules/memorystream/test/example.js new file mode 100644 index 0000000..7d94369 --- /dev/null +++ b/node_modules/memorystream/test/example.js @@ -0,0 +1,18 @@ +var http = require('http'), + MemoryStream = require('../index'), + util = require('util'); + +var options = { + host: 'google.com' +}; +var memStream = new MemoryStream(null,{ + readable : false +}); + +var req = http.request(options, function(res) { + util.pump(res, memStream); + res.on('end',function(){ + console.log(memStream.toString()); + }); +}); +req.end(); diff --git a/node_modules/memorystream/test/memorystream.test.js b/node_modules/memorystream/test/memorystream.test.js new file mode 100644 index 0000000..2b80b50 --- /dev/null +++ b/node_modules/memorystream/test/memorystream.test.js @@ -0,0 +1,333 @@ +var MemoryStream = require('../index.js'), + expect = require('expect.js'), + STREAM = require('stream'), + Q = require('q'), + FS = require('fs'); + +describe('Test memory streams', function() { + + var writeToStream = function (mem_stream, test_data, frequency) { + var result = Q(), + i = 0; + + frequency = frequency || 0; + + test_data.forEach(function (chunk) { + var f = Q.nfbind(function (chunk,n, cb) { + setTimeout(function () { + if (n >= (test_data.length - 1) ) { + mem_stream.end(chunk); + } else { + mem_stream.write(chunk, cb); + } + }, frequency); + }, chunk ,i++); + result = result.then(function() { return f(); }); + }); + + result.done(); + }; + + var writeToStream2 = function (mem_stream, test_data) { + var i; + for (i = 0; i < test_data.length ; i++) { + setTimeout((function(n) { + return function () { + if (n >= (test_data.length - 1) ) { + mem_stream.end(test_data[n]); + } else { + mem_stream.write(test_data[n]); + } + } + })(i), i * 2); + } + }; + + describe("constructor", function() { + it('should have a MemoryStream class', function () { + expect(MemoryStream).to.be.ok(); + }); + + it('should create Readable stream', function () { + var memory_stream = new MemoryStream([], {writable : false}); + expect(memory_stream).to.be.ok(); + expect(memory_stream).to.be.a(STREAM.Readable); + + memory_stream = MemoryStream.createReadStream([]); + expect(memory_stream).to.be.a(STREAM.Readable); + }); + + it('should create Writable stream', function () { + var memory_stream = new MemoryStream([], {readable : false}); + expect(memory_stream).to.be.ok(); + expect(memory_stream).to.be.a(STREAM.Writable); + + memory_stream = MemoryStream.createWriteStream([]); + expect(memory_stream).to.be.a(STREAM.Writable); + }); + + it('should create Duplex stream', function () { + var memory_stream = new MemoryStream([]); + expect(memory_stream).to.be.ok(); + expect(memory_stream).to.be.a(STREAM.Duplex); + }); + + }); + + describe("readable stream", function () { + var test_data = 'abcdefghijklmnopqrstuvwxyz', + frequence = 50; + + it("should read data from stream", function (done) { + var mem_stream = MemoryStream.createReadStream(test_data.split('')); + + var data = '', chunks = 0; + mem_stream.on('data',function(chunk){ + data += chunk; + ++chunks; + }); + + mem_stream.on('end',function () { + expect(chunks).to.be(test_data.length); + expect(data).to.be(test_data); + done(); + }); + }); + + it("should read data from stream with frequency", function (done) { + + var mem_stream = new MemoryStream(test_data.split(''), { + writable : false, + frequence: frequence + }); + + var start_time = Date.now(); + + var data = ''; + mem_stream.on('data',function(chunk){ + data += chunk; + }); + + mem_stream.on('end',function(){ + var execution_time = Date.now() - start_time; + + expect(data).to.be(test_data); + expect(execution_time >= frequence * test_data.length).to.be(true); + + done(); + }); + }); + + it("should read data pause/resume", function (done) { + var mem_stream = MemoryStream.createReadStream(test_data.split('')); + + var start_time = Date.now(); + + var data = '', chunks = 0; + mem_stream.on('data',function(chunk){ + data += chunk; + ++chunks; + + if (! (chunks % 10) ) { + mem_stream.pause(); + setTimeout(function () { + mem_stream.resume(); + },frequence); + } + }); + + mem_stream.on('end',function() { + var execution_time = Date.now() - start_time; + + expect(data).to.be(test_data); + expect(execution_time >= frequence).to.be(true); + + done(); + }); + }); + + }); + + describe("writable stream", function () { + var test_data = 'abcdefghijklmnopqrstuvwxyz'; + + it("should write data to Writable", function (done) { + var mem_stream = MemoryStream.createWriteStream(), + i = 0; + + writeToStream(mem_stream, test_data.split('')); + + mem_stream.on('finish',function () { + expect(mem_stream.toString()).to.be(test_data); + done(); + }); + + }); + + it("should not write data to readable stream", function (done) { + var mem_stream = new MemoryStream([], {writable : false}); + expect(function () { + mem_stream.write("test"); + }).to.throwError(); + + expect(function () { + mem_stream.end("test"); + }).to.throwError(); + + done(); + }); + + it("#toString", function (done) { + var mem_stream = new MemoryStream(null, {readable : false}); + writeToStream(mem_stream, test_data.split('')); + + mem_stream.on('finish',function () { + expect(mem_stream.toString()).to.be(test_data); + done(); + }); + }); + + it("#toBuffer", function (done) { + var mem_stream = new MemoryStream(null, {readable : false}); + writeToStream(mem_stream, test_data.split('')); + + mem_stream.on('finish',function () { + expect(mem_stream.toBuffer().toString('utf-8')).to.be(test_data); + done(); + }); + }); + + it("#toBuffer all data in one buffer", function (done) { + var i = 0, + mem_stream = new MemoryStream(null, {readable : false}), + arr_test_data = [], + str_test_data = ''; + for (i = 0; i < 20; i++) { + var b = new Buffer([i]); + arr_test_data.push(b); + str_test_data += b.toString('hex'); + } + + writeToStream(mem_stream, arr_test_data, 10); + + mem_stream.on('finish',function () { + expect(mem_stream.toBuffer().toString('hex')).to.be(str_test_data); + done(); + }); + + }); + + it("not write data to the overflowed buffer", function (done) { + var mem_stream = new MemoryStream('data1'.split(''), { + readable : false, + maxbufsize : 10 + }); + + mem_stream.write('data2', function (err) { + expect(err).to.not.be.ok(); + expect(mem_stream.toString()).to.be('data1data2'); + mem_stream.write('data3', function (err) { + expect(err).to.not.be.ok(); + expect(mem_stream.toString()).to.be('data1data2'); + done(); + }); + }); + }); + + it("should process error for overflowed buffer", function (done) { + var mem_stream = new MemoryStream('data1'.split(''), { + readable : false, + maxbufsize : 10, + bufoverflow : true + }); + + mem_stream.write('data2', function (err) { + expect(err).to.not.be.ok(); + expect(mem_stream.toString()).to.be('data1data2'); + mem_stream.write('data3', function (err) { + expect(err).to.be.ok(); + expect(mem_stream.toString()).to.be('data1data2'); + done(); + }); + + }); + + mem_stream.on('error', function () { + }); + + }); + }); + + describe("duplex stream", function () { + var test_data = 'abcdefghijklmnopqrstuvwxyz'; + + it("should write/read",function (done) { + var mem_stream = new MemoryStream(); + + var data = ''; + mem_stream.on('data',function(chunk){ + data += chunk; + }); + + writeToStream(mem_stream, test_data.split('')); + + mem_stream.on('end', function () { + expect(data).to.be(test_data); + done(); + }); + }); + + it("should write/read data with init buffer", function (done) { + + var l = Math.floor(test_data.length / 2); + + var test_data1 = test_data.substr(0, l), + test_data2 = test_data.substr(l); + + var mem_stream = new MemoryStream(test_data1.split('')); + + var data = ''; + mem_stream.on('data',function(chunk){ + data += chunk; + }); + + writeToStream2(mem_stream, test_data2); + + mem_stream.on('end', function() { + expect(data).to.be(test_data); + done(); + }); + + }); + + + it("should piping data", function (done) { + var src_mem_stream = MemoryStream.createReadStream(test_data.split(''), {frequency : 25}); + var dst_mem_stream = MemoryStream.createWriteStream(); + + src_mem_stream.pipe(dst_mem_stream); + + dst_mem_stream.on('finish',function(){ + expect(dst_mem_stream.toString()).to.be(test_data); + done(); + }); + + + }); + + it("should readable/piping data", function (done) { + var src_mem_stream = MemoryStream.createReadStream(test_data.split(''), {frequency : 25}); + var dst_mem_stream = MemoryStream.createWriteStream(); + + src_mem_stream.once('readable', function () { + src_mem_stream.pipe(dst_mem_stream); + }); + + dst_mem_stream.on('finish',function(){ + expect(dst_mem_stream.toString()).to.be(test_data); + done(); + }); + }); + + }); +}); diff --git a/node_modules/micromatch/CHANGELOG.md b/node_modules/micromatch/CHANGELOG.md new file mode 100644 index 0000000..9d8e5ed --- /dev/null +++ b/node_modules/micromatch/CHANGELOG.md @@ -0,0 +1,37 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [3.0.0] - 2017-04-11 + +TODO. There should be no breaking changes. Please report any regressions. I will [reformat these release notes](https://github.com/micromatch/micromatch/pull/76) and add them to the changelog as soon as I have a chance. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + + +[Unreleased]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + diff --git a/node_modules/micromatch/LICENSE b/node_modules/micromatch/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/node_modules/micromatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/micromatch/README.md b/node_modules/micromatch/README.md new file mode 100644 index 0000000..5dfa149 --- /dev/null +++ b/node_modules/micromatch/README.md @@ -0,0 +1,1150 @@ +# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/micromatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/micromatch) + +> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
+Details + +- [Install](#install) +- [Quickstart](#quickstart) +- [Why use micromatch?](#why-use-micromatch) + * [Matching features](#matching-features) +- [Switching to micromatch](#switching-to-micromatch) + * [From minimatch](#from-minimatch) + * [From multimatch](#from-multimatch) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nobrace](#optionsnobrace) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noext](#optionsnoext) + * [options.nonegate](#optionsnonegate) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Extended globbing](#extended-globbing) + * [extglobs](#extglobs) + * [braces](#braces) + * [regex character classes](#regex-character-classes) + * [regex groups](#regex-groups) + * [POSIX bracket expressions](#posix-bracket-expressions) +- [Notes](#notes) + * [Bash 4.3 parity](#bash-43-parity) + * [Backslashes](#backslashes) +- [Contributing](#contributing) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Latest results](#latest-results) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save micromatch +``` + +## Quickstart + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); +``` + +The [main export](#micromatch) takes a list of strings and one or more glob patterns: + +```js +console.log(mm(['foo', 'bar', 'qux'], ['f*', 'b*'])); +//=> ['foo', 'bar'] +``` + +Use [.isMatch()](#ismatch) to get true/false: + +```js +console.log(mm.isMatch('foo', 'f*')); +//=> true +``` + +[Switching](#switching-to-micromatch) from minimatch and multimatch is easy! + +## Why use micromatch? + +> micromatch is a [drop-in replacement](#switching-to-micromatch) for minimatch and multimatch + +* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* Micromatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which provides granular control over the entire conversion process in a way that is easy to understand, reason about, and maintain. +* More consistently accurate matching [than minimatch](https://github.com/yarnpkg/yarn/pull/3339), with more than 36,000 [test assertions](./test) to prove it. +* More complete support for the Bash 4.3 specification than minimatch and multimatch. In fact, micromatch passes _all of the spec tests_ from bash, including some that bash still fails. +* [Faster matching](#benchmarks), from a combination of optimized glob patterns, faster algorithms, and regex caching. +* [Micromatch is safer](https://github.com/micromatch/braces#braces-is-safe), and is not subject to DoS with brace patterns, like minimatch and multimatch. +* More reliable windows support than minimatch and multimatch. + +### Matching features + +* Support for multiple glob patterns (no need for wrappers like multimatch) +* Wildcards (`**`, `*.js`) +* Negation (`'!a/*.js'`, `'*!(b).js']`) +* [extglobs](https://github.com/micromatch/extglob) (`+(x|y)`, `!(a|b)`) +* [POSIX character classes](https://github.com/micromatch/expand-brackets) (`[[:alpha:][:digit:]]`) +* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`) +* regex character classes (`foo-[1-5].js`) +* regex logical "or" (`foo/(abc|xyz).js`) + +You can mix and match these features to create whatever patterns you need! + +## Switching to micromatch + +There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information. + +### From minimatch + +Use [mm.isMatch()](#ismatch) instead of `minimatch()`: + +```js +mm.isMatch('foo', 'b*'); +//=> false +``` + +Use [mm.match()](#match) instead of `minimatch.match()`: + +```js +mm.match(['foo', 'bar'], 'b*'); +//=> 'bar' +``` + +### From multimatch + +Same signature: + +```js +mm(['foo', 'bar', 'baz'], ['f*', '*z']); +//=> ['foo', 'baz'] +``` + +## API + +### [micromatch](index.js#L41) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm(list, patterns[, options]); + +console.log(mm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L93) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var mm = require('micromatch'); +mm.match(list, pattern[, options]); + +console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L154) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.isMatch(string, pattern[, options]); + +console.log(mm.isMatch('a.a', '*.a')); +//=> true +console.log(mm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L192) + +Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.some(list, patterns[, options]); + +console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L228) + +Returns true if every string in the given `list` matches any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.every(list, patterns[, options]); + +console.log(mm.every('foo.js', ['foo.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L260) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.any(string, patterns[, options]); + +console.log(mm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(mm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L308) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var mm = require('micromatch'); +mm.all(string, patterns[, options]); + +console.log(mm.all('foo.js', ['foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(mm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L340) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.not(list, patterns[, options]); + +console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L376) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var mm = require('micromatch'); +mm.contains(string, pattern[, options]); + +console.log(mm.contains('aa/bb/cc', '*b')); +//=> true +console.log(mm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L432) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var mm = require('micromatch'); +mm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(mm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L461) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var mm = require('micromatch'); +mm.matcher(pattern[, options]); + +var isMatch = mm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L536) + +Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var mm = require('micromatch'); +mm.capture(pattern, string[, options]); + +console.log(mm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(mm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L571) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var mm = require('micromatch'); +mm.makeRe(pattern[, options]); + +console.log(mm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.braces](index.js#L618) + +Expand the given brace `pattern`. + +**Params** + +* `pattern` **{String}**: String with brace pattern to expand. +* `options` **{Object}**: Any [options](#options) to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options. +* `returns` **{Array}** + +**Example** + +```js +var mm = require('micromatch'); +console.log(mm.braces('foo/{a,b}/bar')); +//=> ['foo/(a|b)/bar'] + +console.log(mm.braces('foo/{a,b}/bar', {expand: true})); +//=> ['foo/(a|b)/bar'] +``` + +### [.create](index.js#L685) + +Parses the given glob `pattern` and returns an array of abstract syntax trees (ASTs), with the compiled `output` and optional source `map` on each AST. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var mm = require('micromatch'); +mm.create(pattern[, options]); + +console.log(mm.create('abc/*.js')); +// [{ options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 }] +``` + +### [.parse](index.js#L732) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var mm = require('micromatch'); +mm.parse(pattern[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L780) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var mm = require('micromatch'); +mm.compile(ast[, options]); + +var ast = mm.parse('a/{b,c}/d'); +console.log(mm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L801) + +Clear the regex cache. + +**Example** + +```js +mm.clearCache(); +``` + +## Options + +* [basename](#optionsbasename) +* [bash](#optionsbash) +* [cache](#optionscache) +* [dot](#optionsdot) +* [failglob](#optionsfailglob) +* [ignore](#optionsignore) +* [matchBase](#optionsmatchBase) +* [nobrace](#optionsnobrace) +* [nocase](#optionsnocase) +* [nodupes](#optionsnodupes) +* [noext](#optionsnoext) +* [noglobstar](#optionsnoglobstar) +* [nonull](#optionsnonull) +* [nullglob](#optionsnullglob) +* [snapdragon](#optionssnapdragon) +* [sourcemap](#optionssourcemap) +* [unescape](#optionsunescape) +* [unixify](#optionsunixify) + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +**Type**: `Boolean` + +**Default**: `false` + +**Example** + +```js +mm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +**Type**: `Boolean` + +**Default**: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(mm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(mm(files, '[a-c]*', {bash: false})); +``` + +### options.cache + +Disable regex and function memoization. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +**Type**: `Boolean` + +**Default**: `false` + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.ignore + +String or array of glob patterns to match files to ignore. + +**Type**: `String|Array` + +**Default**: `undefined` + +### options.matchBase + +Alias for [options.basename](#options-basename). + +### options.nobrace + +Disable expansion of brace patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nobrace`. + +**Type**: `Boolean` + +**Default**: `undefined` + +See [braces](https://github.com/micromatch/braces) for more information about extended brace expansion. + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.nodupes + +Remove duplicate elements from the result array. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +mm.match(['a/b/c', 'a/b/c'], 'a/b/c'); +//=> ['a/b/c', 'a/b/c'] + +mm.match(['a/b/c', 'a/b/c'], 'a/b/c', {nodupes: true}); +//=> ['abc'] +``` + +### options.noext + +Disable extglob support, so that extglobs are regarded as literal characters. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Examples** + +```js +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)'); +//=> ['a/b', 'a/!(z)'] + +mm(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)', {noext: true}); +//=> ['a/!(z)'] (matches only as literal characters) +``` + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.noglobstar + +Disable matching with globstars (`**`). + +**Type**: `Boolean` + +**Default**: `undefined` + +```js +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +mm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +**Type**: `Boolean` + +**Default**: `undefined` + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon), to customize parsers or compilers. + +**Type**: `Object` + +**Default**: `undefined` + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +_(Note that sourcemaps are currently not enabled for brace patterns)_ + +**Examples** + +``` js +var mm = require('micromatch'); +var pattern = '*(*(of*(a)x)z)'; + +var res = mm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = mm.parse('abc/**/*.js'); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } + +var ast = mm.parse(pattern); +var res = mm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,CAAE,CAAE,EAAE,CAAE,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC', +// sourcesContent: [ '*(*(of*(a)x)z)' ] } +``` + +### options.unescape + +Remove backslashes from returned matches. + +**Type**: `Boolean` + +**Default**: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +mm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +mm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +**Type**: `Boolean` + +**Default**: `true` on windows, `false` everywhere else + +**Example** + +```js +mm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +mm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +## Extended globbing + +Micromatch also supports extended globbing features. + +### extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern)` | `(pattern)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern)` | `(pattern)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern)` | `(pattern)+` | Matches one or more occurrences of the given patterns | +| `@(pattern)` | `(pattern)` * | Matches one of the given patterns | +| `!(pattern)` | N/A (equivalent regex is much more complicated) | Matches anything except one of the given patterns | + +* Note that `@` isn't a RegEx character. + +Powered by [extglob](https://github.com/micromatch/extglob). Visit that library for the full range of options or to report extglob related issues. + +### braces + +Brace patterns can be used to match specific ranges or sets of characters. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Visit [braces](https://github.com/micromatch/braces) to see the full range of features and options related to brace expansion, or to create brace matching or expansion related issues. + +### regex character classes + +Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +### regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parens can be nested, so patterns like `((a|b)|c)/b` will work. Although brace expansion might be friendlier to use, depending on preference. + +### POSIX bracket expressions + +POSIX brackets are intended to be more user-friendly than regex character classes. This of course is in the eye of the beholder. + +**Example** + +```js +mm.isMatch('a1', '[[:alpha:][:digit:]]'); +//=> true + +mm.isMatch('a1', '[[:alpha:][:alpha:]]'); +//=> false +``` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about bracket expressions. + +*** + +## Notes + +### Bash 4.3 parity + +Whenever possible matching behavior is based on behavior Bash 4.3, which is mostly consistent with minimatch. + +However, it's suprising how many edge cases and rabbit holes there are with glob matching, and since there is no real glob specification, and micromatch is more accurate than both Bash and minimatch, there are cases where best-guesses were made for behavior. In a few cases where Bash had no answers, we used wildmatch (used by git) as a fallback. + +### Backslashes + +There is an important, notable difference between minimatch and micromatch _in regards to how backslashes are handled_ in glob patterns. + +* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows. This is consistent with bash behavior. +* Minimatch converts all backslashes to forward slashes, which means you can't use backslashes to escape any characters in your glob patterns. + +We made this decision for micromatch for a couple of reasons: + +* consistency with bash conventions. +* glob patterns are not filepaths. They are a type of [regular language](https://en.wikipedia.org/wiki/Regular_language) that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine. + +**A note about joining paths to globs** + +Note that when you pass something like `path.join('foo', '*')` to micromatch, you are creating a filepath and expecting it to still work as a glob pattern. This causes problems on windows, since the `path.sep` is `\\`. + +In other words, since `\\` is reserved as an escape character in globs, on windows `path.join('foo', '*')` would result in `foo\\*`, which tells micromatch to match `*` as a literal character. This is the same behavior as bash. + +## Contributing + +All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started. + +**Bug reports** + +Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please: + +* [research existing issues first](../../issues) (open and closed) +* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern +* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js +* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated. + +**Platform issues** + +It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm run benchmark +``` + +### Latest results + +As of February 18, 2018 (longer bars are better): + +```sh +# braces-globstar-large-list (485691 bytes) + micromatch ██████████████████████████████████████████████████ (517 ops/sec ±0.49%) + minimatch █ (18.92 ops/sec ±0.54%) + multimatch █ (18.94 ops/sec ±0.62%) + + micromatch is faster by an avg. of 2,733% + +# braces-multiple (3362 bytes) + micromatch ██████████████████████████████████████████████████ (33,625 ops/sec ±0.45%) + minimatch (2.92 ops/sec ±3.26%) + multimatch (2.90 ops/sec ±2.76%) + + micromatch is faster by an avg. of 1,156,935% + +# braces-range (727 bytes) + micromatch █████████████████████████████████████████████████ (155,220 ops/sec ±0.56%) + minimatch ██████ (20,186 ops/sec ±1.27%) + multimatch ██████ (19,809 ops/sec ±0.60%) + + micromatch is faster by an avg. of 776% + +# braces-set (2858 bytes) + micromatch █████████████████████████████████████████████████ (24,354 ops/sec ±0.92%) + minimatch █████ (2,566 ops/sec ±0.56%) + multimatch ████ (2,431 ops/sec ±1.25%) + + micromatch is faster by an avg. of 975% + +# globstar-large-list (485686 bytes) + micromatch █████████████████████████████████████████████████ (504 ops/sec ±0.45%) + minimatch ███ (33.36 ops/sec ±1.08%) + multimatch ███ (33.19 ops/sec ±1.35%) + + micromatch is faster by an avg. of 1,514% + +# globstar-long-list (90647 bytes) + micromatch ██████████████████████████████████████████████████ (2,694 ops/sec ±1.08%) + minimatch ████████████████ (870 ops/sec ±1.09%) + multimatch ████████████████ (862 ops/sec ±0.84%) + + micromatch is faster by an avg. of 311% + +# globstar-short-list (182 bytes) + micromatch ██████████████████████████████████████████████████ (328,921 ops/sec ±1.06%) + minimatch █████████ (64,808 ops/sec ±1.42%) + multimatch ████████ (57,991 ops/sec ±2.11%) + + micromatch is faster by an avg. of 536% + +# no-glob (701 bytes) + micromatch █████████████████████████████████████████████████ (415,935 ops/sec ±0.36%) + minimatch ███████████ (92,730 ops/sec ±1.44%) + multimatch █████████ (81,958 ops/sec ±2.13%) + + micromatch is faster by an avg. of 476% + +# star-basename-long (12339 bytes) + micromatch █████████████████████████████████████████████████ (7,963 ops/sec ±0.36%) + minimatch ███████████████████████████████ (5,072 ops/sec ±0.83%) + multimatch ███████████████████████████████ (5,028 ops/sec ±0.40%) + + micromatch is faster by an avg. of 158% + +# star-basename-short (349 bytes) + micromatch ██████████████████████████████████████████████████ (269,552 ops/sec ±0.70%) + minimatch ██████████████████████ (122,457 ops/sec ±1.39%) + multimatch ████████████████████ (110,788 ops/sec ±1.99%) + + micromatch is faster by an avg. of 231% + +# star-folder-long (19207 bytes) + micromatch █████████████████████████████████████████████████ (3,806 ops/sec ±0.38%) + minimatch ████████████████████████████ (2,204 ops/sec ±0.32%) + multimatch ██████████████████████████ (2,020 ops/sec ±1.07%) + + micromatch is faster by an avg. of 180% + +# star-folder-short (551 bytes) + micromatch ██████████████████████████████████████████████████ (249,077 ops/sec ±0.40%) + minimatch ███████████ (59,431 ops/sec ±1.67%) + multimatch ███████████ (55,569 ops/sec ±1.43%) + + micromatch is faster by an avg. of 433% +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 457 | [jonschlinkert](https://github.com/jonschlinkert) | +| 12 | [es128](https://github.com/es128) | +| 8 | [doowb](https://github.com/doowb) | +| 3 | [paulmillr](https://github.com/paulmillr) | +| 2 | [TrySound](https://github.com/TrySound) | +| 2 | [MartinKolarik](https://github.com/MartinKolarik) | +| 2 | [charlike-old](https://github.com/charlike-old) | +| 1 | [amilajack](https://github.com/amilajack) | +| 1 | [mrmlnc](https://github.com/mrmlnc) | +| 1 | [devongovett](https://github.com/devongovett) | +| 1 | [DianeLooney](https://github.com/DianeLooney) | +| 1 | [UltCombo](https://github.com/UltCombo) | +| 1 | [tomByrer](https://github.com/tomByrer) | +| 1 | [fidian](https://github.com/fidian) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 18, 2018._ \ No newline at end of file diff --git a/node_modules/micromatch/index.js b/node_modules/micromatch/index.js new file mode 100644 index 0000000..fe02f2c --- /dev/null +++ b/node_modules/micromatch/index.js @@ -0,0 +1,877 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var braces = require('braces'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var mm = require('micromatch'); + * mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function micromatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return micromatch.match(list, patterns[0], options); + } + + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, micromatch.match(list, pattern.slice(1), options)); + } else { + keep.push.apply(keep, micromatch.match(list, pattern, options)); + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var mm = require('micromatch'); + * mm.match(list, pattern[, options]); + * + * console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +micromatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, micromatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = micromatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.isMatch(string, pattern[, options]); + * + * console.log(mm.isMatch('a.a', '*.a')); + * //=> true + * console.log(mm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +micromatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, micromatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the strings in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length === 1) { + return true; + } + } + return false; +}; + +/** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + for (var i = 0; i < list.length; i++) { + if (micromatch(list[i], patterns, options).length !== 1) { + return false; + } + } + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var mm = require('micromatch'); + * mm.any(string, patterns[, options]); + * + * console.log(mm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(mm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (micromatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * var mm = require('micromatch'); + * mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + if (typeof patterns === 'string') { + patterns = [patterns]; + } + for (var i = 0; i < patterns.length; i++) { + if (!micromatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var mm = require('micromatch'); + * mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +micromatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + var unixify = utils.unixify(opts); + list = utils.arrayify(list).map(unixify); + + var matches = utils.diff(list, micromatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, micromatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +micromatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (isEmptyString(str) || isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return micromatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +micromatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var mm = require('micromatch'); + * mm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +micromatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = micromatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var mm = require('micromatch'); + * mm.matcher(pattern[, options]); + * + * var isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +micromatch.matcher = function matcher(pattern, options) { + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = micromatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (micromatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + var fn = test(re); + Object.defineProperty(fn, 'result', { + configurable: true, + enumerable: false, + value: re.result + }); + return fn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * var mm = require('micromatch'); + * mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +micromatch.capture = function(pattern, str, options) { + var re = micromatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var mm = require('micromatch'); + * mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +micromatch.makeRe = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var result = micromatch.create(pattern, options); + var ast_array = []; + var output = result.map(function(obj) { + obj.ast.state = obj.state; + ast_array.push(obj.ast); + return obj.output; + }); + + var regex = toRegex(output.join('|'), options); + Object.defineProperty(regex, 'result', { + configurable: true, + enumerable: false, + value: ast_array + }); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Expand the given brace `pattern`. + * + * ```js + * var mm = require('micromatch'); + * console.log(mm.braces('foo/{a,b}/bar')); + * //=> ['foo/(a|b)/bar'] + * + * console.log(mm.braces('foo/{a,b}/bar', {expand: true})); + * //=> ['foo/(a|b)/bar'] + * ``` + * @param {String} `pattern` String with brace pattern to expand. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + +micromatch.braces = function(pattern, options) { + if (typeof pattern !== 'string' && !Array.isArray(pattern)) { + throw new TypeError('expected pattern to be an array or string'); + } + + function expand() { + if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { + return utils.arrayify(pattern); + } + return braces(pattern, options); + } + + return memoize('braces', pattern, options, expand); +}; + +/** + * Proxy to the [micromatch.braces](#method), for parity with + * minimatch. + */ + +micromatch.braceExpand = function(pattern, options) { + var opts = extend({}, options, {expand: true}); + return micromatch.braces(pattern, opts); +}; + +/** + * Parses the given glob `pattern` and returns an array of abstract syntax + * trees (ASTs), with the compiled `output` and optional source `map` on + * each AST. + * + * ```js + * var mm = require('micromatch'); + * mm.create(pattern[, options]); + * + * console.log(mm.create('abc/*.js')); + * // [{ options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 }] + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +micromatch.create = function(pattern, options) { + return memoize('create', pattern, options, function() { + function create(str, opts) { + return micromatch.compile(micromatch.parse(str, opts), opts); + } + + pattern = micromatch.braces(pattern, options); + var len = pattern.length; + var idx = -1; + var res = []; + + while (++idx < len) { + res.push(create(pattern[idx], options)); + } + return res; + }); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.parse(pattern[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +micromatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var mm = require('micromatch'); + * mm.compile(ast[, options]); + * + * var ast = mm.parse('a/{b,c}/d'); + * console.log(mm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +micromatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = micromatch.parse(ast, options); + } + + return memoize('compile', ast.input, options, function() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + }); +}; + +/** + * Clear the regex cache. + * + * ```js + * mm.clearCache(); + * ``` + * @api public + */ + +micromatch.clearCache = function() { + micromatch.cache.caches = {}; +}; + +/** + * Returns true if the given value is effectively an empty string + */ + +function isEmptyString(val) { + return String(val) === '' || String(val) === './'; +} + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `micromatch` + */ + +micromatch.compilers = compilers; +micromatch.parsers = parsers; +micromatch.caches = cache.caches; + +/** + * Expose `micromatch` + * @type {Function} + */ + +module.exports = micromatch; diff --git a/node_modules/micromatch/lib/.DS_Store b/node_modules/micromatch/lib/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/node_modules/micromatch/lib/.DS_Store differ diff --git a/node_modules/micromatch/lib/cache.js b/node_modules/micromatch/lib/cache.js new file mode 100644 index 0000000..fffc4c1 --- /dev/null +++ b/node_modules/micromatch/lib/cache.js @@ -0,0 +1 @@ +module.exports = new (require('fragment-cache'))(); diff --git a/node_modules/micromatch/lib/compilers.js b/node_modules/micromatch/lib/compilers.js new file mode 100644 index 0000000..85cda4f --- /dev/null +++ b/node_modules/micromatch/lib/compilers.js @@ -0,0 +1,77 @@ +'use strict'; + +var nanomatch = require('nanomatch'); +var extglob = require('extglob'); + +module.exports = function(snapdragon) { + var compilers = snapdragon.compiler.compilers; + var opts = snapdragon.options; + + // register nanomatch compilers + snapdragon.use(nanomatch.compilers); + + // get references to some specific nanomatch compilers before they + // are overridden by the extglob and/or custom compilers + var escape = compilers.escape; + var qmark = compilers.qmark; + var slash = compilers.slash; + var star = compilers.star; + var text = compilers.text; + var plus = compilers.plus; + var dot = compilers.dot; + + // register extglob compilers or escape exglobs if disabled + if (opts.extglob === false || opts.noext === true) { + snapdragon.compiler.use(escapeExtglobs); + } else { + snapdragon.use(extglob.compilers); + } + + snapdragon.use(function() { + this.options.star = this.options.star || function(/*node*/) { + return '[^\\\\/]*?'; + }; + }); + + // custom micromatch compilers + snapdragon.compiler + + // reset referenced compiler + .set('dot', dot) + .set('escape', escape) + .set('plus', plus) + .set('slash', slash) + .set('qmark', qmark) + .set('star', star) + .set('text', text); +}; + +function escapeExtglobs(compiler) { + compiler.set('paren', function(node) { + var val = ''; + visit(node, function(tok) { + if (tok.val) val += (/^\W/.test(tok.val) ? '\\' : '') + tok.val; + }); + return this.emit(val, node); + }); + + /** + * Visit `node` with the given `fn` + */ + + function visit(node, fn) { + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + + /** + * Map visit over array of `nodes`. + */ + + function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } + } +} diff --git a/node_modules/micromatch/lib/parsers.js b/node_modules/micromatch/lib/parsers.js new file mode 100644 index 0000000..f80498c --- /dev/null +++ b/node_modules/micromatch/lib/parsers.js @@ -0,0 +1,83 @@ +'use strict'; + +var extglob = require('extglob'); +var nanomatch = require('nanomatch'); +var regexNot = require('regex-not'); +var toRegex = require('to-regex'); +var not; + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var TEXT = '([!@*?+]?\\(|\\)|\\[:?(?=.*?:?\\])|:?\\]|[*+?!^$.\\\\/])+'; +var createNotRegex = function(opts) { + return not || (not = textRegex(TEXT)); +}; + +/** + * Parsers + */ + +module.exports = function(snapdragon) { + var parsers = snapdragon.parser.parsers; + + // register nanomatch parsers + snapdragon.use(nanomatch.parsers); + + // get references to some specific nanomatch parsers before they + // are overridden by the extglob and/or parsers + var escape = parsers.escape; + var slash = parsers.slash; + var qmark = parsers.qmark; + var plus = parsers.plus; + var star = parsers.star; + var dot = parsers.dot; + + // register extglob parsers + snapdragon.use(extglob.parsers); + + // custom micromatch parsers + snapdragon.parser + .use(function() { + // override "notRegex" created in nanomatch parser + this.notRegex = /^\!+(?!\()/; + }) + // reset the referenced parsers + .capture('escape', escape) + .capture('slash', slash) + .capture('qmark', qmark) + .capture('star', star) + .capture('plus', plus) + .capture('dot', dot) + + /** + * Override `text` parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(createNotRegex(this.options)); + if (!m || !m[0]) return; + + // escape regex boundary characters and simple brackets + var val = m[0].replace(/([[\]^$])/g, '\\$1'); + + return pos({ + type: 'text', + val: val + }); + }); +}; + +/** + * Create text regex + */ + +function textRegex(pattern) { + var notStr = regexNot.create(pattern, {contains: true, strictClose: false}); + var prefix = '(?:[\\^]|\\\\|'; + return toRegex(prefix + notStr + ')', {strictClose: false}); +} diff --git a/node_modules/micromatch/lib/utils.js b/node_modules/micromatch/lib/utils.js new file mode 100644 index 0000000..f0ba917 --- /dev/null +++ b/node_modules/micromatch/lib/utils.js @@ -0,0 +1,309 @@ +'use strict'; + +var utils = module.exports; +var path = require('path'); + +/** + * Module dependencies + */ + +var Snapdragon = require('snapdragon'); +utils.define = require('define-property'); +utils.diff = require('arr-diff'); +utils.extend = require('extend-shallow'); +utils.pick = require('object.pick'); +utils.typeOf = require('kind-of'); +utils.unique = require('array-unique'); + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || process.platform === 'win32'; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (utils.typeOf(options) !== 'object') { + return pattern; + } + var val = pattern; + var keys = Object.keys(options); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + val += ';' + key + '=' + String(options[key]); + } + return val; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str); +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\\/\s]/g, '\\$&'); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) !== '.') { + return str; + } + var ch = str.charAt(1); + if (utils.isSlash(ch)) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(path.basename(filepath)); + }; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + options = options || {}; + return function(filepath) { + if (utils.isWindows() || options.unixify === true) { + filepath = utils.toPosixPath(filepath); + } + if (options.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (options.unescape === true) { + filepath = utils.unescape(filepath); + } + return filepath; + }; +}; diff --git a/node_modules/micromatch/node_modules/extend-shallow/LICENSE b/node_modules/micromatch/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/micromatch/node_modules/extend-shallow/README.md b/node_modules/micromatch/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/extend-shallow/index.js b/node_modules/micromatch/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/micromatch/node_modules/extend-shallow/package.json b/node_modules/micromatch/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/micromatch/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/micromatch/node_modules/is-extendable/LICENSE b/node_modules/micromatch/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/is-extendable/README.md b/node_modules/micromatch/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/is-extendable/index.d.ts b/node_modules/micromatch/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/micromatch/node_modules/is-extendable/index.js b/node_modules/micromatch/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/micromatch/node_modules/is-extendable/package.json b/node_modules/micromatch/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/micromatch/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md b/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/kind-of/LICENSE b/node_modules/micromatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/micromatch/node_modules/kind-of/README.md b/node_modules/micromatch/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/micromatch/node_modules/kind-of/index.js b/node_modules/micromatch/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/micromatch/node_modules/kind-of/package.json b/node_modules/micromatch/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/micromatch/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/micromatch/package.json b/node_modules/micromatch/package.json new file mode 100644 index 0000000..4475155 --- /dev/null +++ b/node_modules/micromatch/package.json @@ -0,0 +1,147 @@ +{ + "name": "micromatch", + "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.", + "version": "3.1.10", + "homepage": "https://github.com/micromatch/micromatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Amila Welihinda (amilajack.com)", + "Bogdan Chadkin (https://github.com/TrySound)", + "Brian Woodward (https://twitter.com/doowb)", + "Devon Govett (http://badassjs.com)", + "Elan Shanker (https://github.com/es128)", + "Fabrício Matté (https://ultcombo.js.org)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Martin Kolárik (https://kolarik.sk)", + "Olsten Larck (https://i.am.charlike.online)", + "Paul Miller (paulmillr.com)", + "Tom Byrer (https://github.com/tomByrer)", + "Tyler Akins (http://rumkin.com)", + "(https://github.com/DianeLooney)" + ], + "repository": "micromatch/micromatch", + "bugs": { + "url": "https://github.com/micromatch/micromatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "gulp-unused": "^0.2.1", + "is-windows": "^1.0.2", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "./benchmark/helper.js" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "extglob", + "fill-range", + "nanomatch" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "expand-brackets", + "extglob", + "glob-object", + "minimatch", + "multimatch", + "snapdragon" + ] + } +} diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md new file mode 100644 index 0000000..7436f64 --- /dev/null +++ b/node_modules/mime-db/HISTORY.md @@ -0,0 +1,507 @@ +1.52.0 / 2022-02-21 +=================== + + * Add extensions from IANA for more `image/*` types + * Add extension `.asc` to `application/pgp-keys` + * Add extensions to various XML types + * Add new upstream MIME types + +1.51.0 / 2021-11-08 +=================== + + * Add new upstream MIME types + * Mark `image/vnd.microsoft.icon` as compressible + * Mark `image/vnd.ms-dds` as compressible + +1.50.0 / 2021-09-15 +=================== + + * Add deprecated iWorks mime types and extensions + * Add new upstream MIME types + +1.49.0 / 2021-07-26 +=================== + + * Add extension `.trig` to `application/trig` + * Add new upstream MIME types + +1.48.0 / 2021-05-30 +=================== + + * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + * Add new upstream MIME types + * Mark `text/yaml` as compressible + +1.47.0 / 2021-04-01 +=================== + + * Add new upstream MIME types + * Remove ambigious extensions from IANA for `application/*+xml` types + * Update primary extension to `.es` for `application/ecmascript` + +1.46.0 / 2021-02-13 +=================== + + * Add extension `.amr` to `audio/amr` + * Add extension `.m4s` to `video/iso.segment` + * Add extension `.opus` to `audio/ogg` + * Add new upstream MIME types + +1.45.0 / 2020-09-22 +=================== + + * Add `application/ubjson` with extension `.ubj` + * Add `image/avif` with extension `.avif` + * Add `image/ktx2` with extension `.ktx2` + * Add extension `.dbf` to `application/vnd.dbf` + * Add extension `.rar` to `application/vnd.rar` + * Add extension `.td` to `application/urc-targetdesc+xml` + * Add new upstream MIME types + * Fix extension of `application/vnd.apple.keynote` to be `.key` + +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/node_modules/mime-db/LICENSE b/node_modules/mime-db/LICENSE new file mode 100644 index 0000000..0751cb1 --- /dev/null +++ b/node_modules/mime-db/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015-2022 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md new file mode 100644 index 0000000..5a8fcfe --- /dev/null +++ b/node_modules/mime-db/README.md @@ -0,0 +1,100 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a large database of mime types and information about them. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + +```js +var db = require('mime-db') + +// grab data on .js files +var data = db['application/javascript'] +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom-types.json` or +`src/custom-suffix.json`. + +The `src/custom-types.json` file is a JSON object with the MIME type as the +keys and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +### Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci +[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json new file mode 100644 index 0000000..eb9c42c --- /dev/null +++ b/node_modules/mime-db/db.json @@ -0,0 +1,8519 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpphal+json": { + "source": "iana", + "compressible": true + }, + "application/3gpphalforms+json": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/ace+cbor": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/at+jwt": { + "source": "iana" + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/captive+json": { + "source": "iana", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/city+json": { + "source": "iana", + "compressible": true + }, + "application/clr": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cpl"] + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dash-patch+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["es","ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/elm+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/elm+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/express": { + "source": "iana", + "extensions": ["exp"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/jscalendar+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpf"] + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/missing-blocks+cbor-seq": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/oauth-authz-req+jwt": { + "source": "iana" + }, + "application/oblivious-dns-message": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/opc-nodeset+xml": { + "source": "iana", + "compressible": true + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p21": { + "source": "iana" + }, + "application/p21+zip": { + "source": "iana", + "compressible": false + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana", + "extensions": ["asc"] + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.cyn": { + "source": "iana", + "charset": "7-BIT" + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sarif+json": { + "source": "iana", + "compressible": true + }, + "application/sarif-external-properties+json": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spdx+json": { + "source": "iana", + "compressible": true + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/token-introspection+jwt": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana", + "extensions": ["trig"] + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ubjson": { + "compressible": false, + "extensions": ["ubj"] + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["td"] + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gnas": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gtpc": { + "source": "iana" + }, + "application/vnd.3gpp.interworking-data": { + "source": "iana" + }, + "application/vnd.3gpp.lpp": { + "source": "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ngap": { + "source": "iana" + }, + "application/vnd.3gpp.pfcp": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + "source": "iana" + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-cmtable": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.age": { + "source": "iana", + "extensions": ["age"] + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.arrow.file": { + "source": "iana" + }, + "application/vnd.apache.arrow.stream": { + "source": "iana" + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["key"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.cryptomator.encrypted": { + "source": "iana" + }, + "application/vnd.cryptomator.vault": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.cyclonedx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cyclonedx+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.d3m-dataset": { + "source": "iana" + }, + "application/vnd.d3m-problem": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana", + "extensions": ["dbf"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.eclipse.ditto+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eu.kasparian.car+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.slides": { + "source": "iana" + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hl7cda+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hl7v2+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana", + "extensions": ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxar.archive.3tz+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nebumind.line": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+cbor": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.opentimestamps.ots": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana", + "extensions": ["rar"] + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.resilient.logic": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.seis+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.sycle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syft+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veritone.aion+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.dpp": { + "source": "iana" + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "source": "iana", + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wif"] + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + "extensions": ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + "extensions": ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + "extensions": ["pages"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsl","xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana", + "extensions": ["amr"] + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx","opus"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/scip": { + "source": "iana" + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sofa": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/tsvcis": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana", + "extensions": ["avci"] + }, + "image/avcs": { + "source": "iana", + "extensions": ["avcs"] + }, + "image/avif": { + "source": "iana", + "compressible": false, + "extensions": ["avif"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/ktx2": { + "source": "iana", + "extensions": ["ktx2"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "compressible": true, + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "compressible": true, + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.pco.b16": { + "source": "iana", + "extensions": ["b16"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/e57": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/step": { + "source": "iana" + }, + "model/step+xml": { + "source": "iana", + "compressible": true, + "extensions": ["stpx"] + }, + "model/step+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpz"] + }, + "model/step-xml+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpxz"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.pytha.pyox": { + "source": "iana" + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.sap.vds": { + "source": "iana", + "extensions": ["vds"] + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/cql": { + "source": "iana" + }, + "text/cql-expression": { + "source": "iana" + }, + "text/cql-identifier": { + "source": "iana" + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fhirpath": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/gff3": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shaclc": { + "source": "iana" + }, + "text/shex": { + "source": "iana", + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/spdx": { + "source": "iana", + "extensions": ["spdx"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + "source": "iana", + "extensions": ["ged"] + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hans": { + "source": "iana" + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "compressible": true, + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/av1": { + "source": "iana" + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/ffv1": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana", + "extensions": ["m4s"] + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/jxsv": { + "source": "iana" + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/scip": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/vp9": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js new file mode 100644 index 0000000..ec2be30 --- /dev/null +++ b/node_modules/mime-db/index.js @@ -0,0 +1,12 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json new file mode 100644 index 0000000..32c14b8 --- /dev/null +++ b/node_modules/mime-db/package.json @@ -0,0 +1,60 @@ +{ + "name": "mime-db", + "description": "Media Type Database", + "version": "1.52.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)", + "Robert Kieffer (http://github.com/broofa)" + ], + "license": "MIT", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "repository": "jshttp/mime-db", + "devDependencies": { + "bluebird": "3.7.2", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "4.16.3", + "eslint": "7.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.1.1", + "eslint-plugin-standard": "4.1.0", + "gnode": "0.1.2", + "media-typer": "1.1.0", + "mocha": "9.2.1", + "nyc": "15.1.0", + "raw-body": "2.5.0", + "stream-to-array": "2.3.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md new file mode 100644 index 0000000..c5043b7 --- /dev/null +++ b/node_modules/mime-types/HISTORY.md @@ -0,0 +1,397 @@ +2.1.35 / 2022-03-12 +=================== + + * deps: mime-db@1.52.0 + - Add extensions from IANA for more `image/*` types + - Add extension `.asc` to `application/pgp-keys` + - Add extensions to various XML types + - Add new upstream MIME types + +2.1.34 / 2021-11-08 +=================== + + * deps: mime-db@1.51.0 + - Add new upstream MIME types + +2.1.33 / 2021-10-01 +=================== + + * deps: mime-db@1.50.0 + - Add deprecated iWorks mime types and extensions + - Add new upstream MIME types + +2.1.32 / 2021-07-27 +=================== + + * deps: mime-db@1.49.0 + - Add extension `.trig` to `application/trig` + - Add new upstream MIME types + +2.1.31 / 2021-06-01 +=================== + + * deps: mime-db@1.48.0 + - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + - Add new upstream MIME types + +2.1.30 / 2021-04-02 +=================== + + * deps: mime-db@1.47.0 + - Add extension `.amr` to `audio/amr` + - Remove ambigious extensions from IANA for `application/*+xml` types + - Update primary extension to `.es` for `application/ecmascript` + +2.1.29 / 2021-02-17 +=================== + + * deps: mime-db@1.46.0 + - Add extension `.amr` to `audio/amr` + - Add extension `.m4s` to `video/iso.segment` + - Add extension `.opus` to `audio/ogg` + - Add new upstream MIME types + +2.1.28 / 2021-01-01 +=================== + + * deps: mime-db@1.45.0 + - Add `application/ubjson` with extension `.ubj` + - Add `image/avif` with extension `.avif` + - Add `image/ktx2` with extension `.ktx2` + - Add extension `.dbf` to `application/vnd.dbf` + - Add extension `.rar` to `application/vnd.rar` + - Add extension `.td` to `application/urc-targetdesc+xml` + - Add new upstream MIME types + - Fix extension of `application/vnd.apple.keynote` to be `.key` + +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md new file mode 100644 index 0000000..48d2fb4 --- /dev/null +++ b/node_modules/mime-types/README.md @@ -0,0 +1,113 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci +[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js new file mode 100644 index 0000000..b9f34d5 --- /dev/null +++ b/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json new file mode 100644 index 0000000..bbef696 --- /dev/null +++ b/node_modules/mime-types/package.json @@ -0,0 +1,44 @@ +{ + "name": "mime-types", + "description": "The ultimate javascript content-type utility.", + "version": "2.1.35", + "contributors": [ + "Douglas Christopher Wilson ", + "Jeremiah Senkpiel (https://searchbeam.jit.su)", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "mime", + "types" + ], + "repository": "jshttp/mime-types", + "dependencies": { + "mime-db": "1.52.0" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.2", + "nyc": "15.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/mime/.npmignore b/node_modules/mime/.npmignore new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/mime/CHANGELOG.md b/node_modules/mime/CHANGELOG.md new file mode 100644 index 0000000..f127535 --- /dev/null +++ b/node_modules/mime/CHANGELOG.md @@ -0,0 +1,164 @@ +# Changelog + +## v1.6.0 (24/11/2017) +*No changelog for this release.* + +--- + +## v2.0.4 (24/11/2017) +- [**closed**] Switch to mime-score module for resolving extension contention issues. [#182](https://github.com/broofa/node-mime/issues/182) +- [**closed**] Update mime-db to 1.31.0 in v1.x branch [#181](https://github.com/broofa/node-mime/issues/181) + +--- + +## v1.5.0 (22/11/2017) +- [**closed**] need ES5 version ready in npm package [#179](https://github.com/broofa/node-mime/issues/179) +- [**closed**] mime-db no trace of iWork - pages / numbers / etc. [#178](https://github.com/broofa/node-mime/issues/178) +- [**closed**] How it works in brownser ? [#176](https://github.com/broofa/node-mime/issues/176) +- [**closed**] Missing `./Mime` [#175](https://github.com/broofa/node-mime/issues/175) +- [**closed**] Vulnerable Regular Expression [#167](https://github.com/broofa/node-mime/issues/167) + +--- + +## v2.0.3 (25/09/2017) +*No changelog for this release.* + +--- + +## v1.4.1 (25/09/2017) +- [**closed**] Issue when bundling with webpack [#172](https://github.com/broofa/node-mime/issues/172) + +--- + +## v2.0.2 (15/09/2017) +- [**V2**] fs.readFileSync is not a function [#165](https://github.com/broofa/node-mime/issues/165) +- [**closed**] The extension for video/quicktime should map to .mov, not .qt [#164](https://github.com/broofa/node-mime/issues/164) +- [**V2**] [v2 Feedback request] Mime class API [#163](https://github.com/broofa/node-mime/issues/163) +- [**V2**] [v2 Feedback request] Resolving conflicts over extensions [#162](https://github.com/broofa/node-mime/issues/162) +- [**V2**] Allow callers to load module with official, full, or no defined types. [#161](https://github.com/broofa/node-mime/issues/161) +- [**V2**] Use "facets" to resolve extension conflicts [#160](https://github.com/broofa/node-mime/issues/160) +- [**V2**] Remove fs and path dependencies [#152](https://github.com/broofa/node-mime/issues/152) +- [**V2**] Default content-type should not be application/octet-stream [#139](https://github.com/broofa/node-mime/issues/139) +- [**V2**] reset mime-types [#124](https://github.com/broofa/node-mime/issues/124) +- [**V2**] Extensionless paths should return null or false [#113](https://github.com/broofa/node-mime/issues/113) + +--- + +## v2.0.1 (14/09/2017) +- [**closed**] Changelog for v2.0 does not mention breaking changes [#171](https://github.com/broofa/node-mime/issues/171) +- [**closed**] MIME breaking with 'class' declaration as it is without 'use strict mode' [#170](https://github.com/broofa/node-mime/issues/170) + +--- + +## v2.0.0 (12/09/2017) +- [**closed**] woff and woff2 [#168](https://github.com/broofa/node-mime/issues/168) + +--- + +## v1.4.0 (28/08/2017) +- [**closed**] support for ac3 voc files [#159](https://github.com/broofa/node-mime/issues/159) +- [**closed**] Help understanding change from application/xml to text/xml [#158](https://github.com/broofa/node-mime/issues/158) +- [**closed**] no longer able to override mimetype [#157](https://github.com/broofa/node-mime/issues/157) +- [**closed**] application/vnd.adobe.photoshop [#147](https://github.com/broofa/node-mime/issues/147) +- [**closed**] Directories should appear as something other than application/octet-stream [#135](https://github.com/broofa/node-mime/issues/135) +- [**closed**] requested features [#131](https://github.com/broofa/node-mime/issues/131) +- [**closed**] Make types.json loading optional? [#129](https://github.com/broofa/node-mime/issues/129) +- [**closed**] Cannot find module './types.json' [#120](https://github.com/broofa/node-mime/issues/120) +- [**V2**] .wav files show up as "audio/x-wav" instead of "audio/x-wave" [#118](https://github.com/broofa/node-mime/issues/118) +- [**closed**] Don't be a pain in the ass for node community [#108](https://github.com/broofa/node-mime/issues/108) +- [**closed**] don't make default_type global [#78](https://github.com/broofa/node-mime/issues/78) +- [**closed**] mime.extension() fails if the content-type is parameterized [#74](https://github.com/broofa/node-mime/issues/74) + +--- + +## v1.3.6 (11/05/2017) +- [**closed**] .md should be text/markdown as of March 2016 [#154](https://github.com/broofa/node-mime/issues/154) +- [**closed**] Error while installing mime [#153](https://github.com/broofa/node-mime/issues/153) +- [**closed**] application/manifest+json [#149](https://github.com/broofa/node-mime/issues/149) +- [**closed**] Dynamic adaptive streaming over HTTP (DASH) file extension typo [#141](https://github.com/broofa/node-mime/issues/141) +- [**closed**] charsets image/png undefined [#140](https://github.com/broofa/node-mime/issues/140) +- [**closed**] Mime-db dependency out of date [#130](https://github.com/broofa/node-mime/issues/130) +- [**closed**] how to support plist? [#126](https://github.com/broofa/node-mime/issues/126) +- [**closed**] how does .types file format look like? [#123](https://github.com/broofa/node-mime/issues/123) +- [**closed**] Feature: support for expanding MIME patterns [#121](https://github.com/broofa/node-mime/issues/121) +- [**closed**] DEBUG_MIME doesn't work [#117](https://github.com/broofa/node-mime/issues/117) + +--- + +## v1.3.4 (06/02/2015) +*No changelog for this release.* + +--- + +## v1.3.3 (06/02/2015) +*No changelog for this release.* + +--- + +## v1.3.1 (05/02/2015) +- [**closed**] Consider adding support for Handlebars .hbs file ending [#111](https://github.com/broofa/node-mime/issues/111) +- [**closed**] Consider adding support for hjson. [#110](https://github.com/broofa/node-mime/issues/110) +- [**closed**] Add mime type for Opus audio files [#94](https://github.com/broofa/node-mime/issues/94) +- [**closed**] Consider making the `Requesting New Types` information more visible [#77](https://github.com/broofa/node-mime/issues/77) + +--- + +## v1.3.0 (05/02/2015) +- [**closed**] Add common name? [#114](https://github.com/broofa/node-mime/issues/114) +- [**closed**] application/x-yaml [#104](https://github.com/broofa/node-mime/issues/104) +- [**closed**] Add mime type for WOFF file format 2.0 [#102](https://github.com/broofa/node-mime/issues/102) +- [**closed**] application/x-msi for .msi [#99](https://github.com/broofa/node-mime/issues/99) +- [**closed**] Add mimetype for gettext translation files [#98](https://github.com/broofa/node-mime/issues/98) +- [**closed**] collaborators [#88](https://github.com/broofa/node-mime/issues/88) +- [**closed**] getting errot in installation of mime module...any1 can help? [#87](https://github.com/broofa/node-mime/issues/87) +- [**closed**] should application/json's charset be utf8? [#86](https://github.com/broofa/node-mime/issues/86) +- [**closed**] Add "license" and "licenses" to package.json [#81](https://github.com/broofa/node-mime/issues/81) +- [**closed**] lookup with extension-less file on Windows returns wrong type [#68](https://github.com/broofa/node-mime/issues/68) + +--- + +## v1.2.11 (15/08/2013) +- [**closed**] Update mime.types [#65](https://github.com/broofa/node-mime/issues/65) +- [**closed**] Publish a new version [#63](https://github.com/broofa/node-mime/issues/63) +- [**closed**] README should state upfront that "application/octet-stream" is default for unknown extension [#55](https://github.com/broofa/node-mime/issues/55) +- [**closed**] Suggested improvement to the charset API [#52](https://github.com/broofa/node-mime/issues/52) + +--- + +## v1.2.10 (25/07/2013) +- [**closed**] Mime type for woff files should be application/font-woff and not application/x-font-woff [#62](https://github.com/broofa/node-mime/issues/62) +- [**closed**] node.types in conflict with mime.types [#51](https://github.com/broofa/node-mime/issues/51) + +--- + +## v1.2.9 (17/01/2013) +- [**closed**] Please update "mime" NPM [#49](https://github.com/broofa/node-mime/issues/49) +- [**closed**] Please add semicolon [#46](https://github.com/broofa/node-mime/issues/46) +- [**closed**] parse full mime types [#43](https://github.com/broofa/node-mime/issues/43) + +--- + +## v1.2.8 (10/01/2013) +- [**closed**] /js directory mime is application/javascript. Is it correct? [#47](https://github.com/broofa/node-mime/issues/47) +- [**closed**] Add mime types for lua code. [#45](https://github.com/broofa/node-mime/issues/45) + +--- + +## v1.2.7 (19/10/2012) +- [**closed**] cannot install 1.2.7 via npm [#41](https://github.com/broofa/node-mime/issues/41) +- [**closed**] Transfer ownership to @broofa [#36](https://github.com/broofa/node-mime/issues/36) +- [**closed**] it's wrong to set charset to UTF-8 for text [#30](https://github.com/broofa/node-mime/issues/30) +- [**closed**] Allow multiple instances of MIME types container [#27](https://github.com/broofa/node-mime/issues/27) + +--- + +## v1.2.5 (16/02/2012) +- [**closed**] When looking up a types, check hasOwnProperty [#23](https://github.com/broofa/node-mime/issues/23) +- [**closed**] Bump version to 1.2.2 [#18](https://github.com/broofa/node-mime/issues/18) +- [**closed**] No license [#16](https://github.com/broofa/node-mime/issues/16) +- [**closed**] Some types missing that are used by html5/css3 [#13](https://github.com/broofa/node-mime/issues/13) +- [**closed**] npm install fails for 1.2.1 [#12](https://github.com/broofa/node-mime/issues/12) +- [**closed**] image/pjpeg + image/x-png [#10](https://github.com/broofa/node-mime/issues/10) +- [**closed**] symlink [#8](https://github.com/broofa/node-mime/issues/8) +- [**closed**] gzip [#2](https://github.com/broofa/node-mime/issues/2) +- [**closed**] ALL CAPS filenames return incorrect mime type [#1](https://github.com/broofa/node-mime/issues/1) diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE new file mode 100644 index 0000000..d3f46f7 --- /dev/null +++ b/node_modules/mime/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/mime/README.md b/node_modules/mime/README.md new file mode 100644 index 0000000..506fbe5 --- /dev/null +++ b/node_modules/mime/README.md @@ -0,0 +1,90 @@ +# mime + +Comprehensive MIME type mapping API based on mime-db module. + +## Install + +Install with [npm](http://github.com/isaacs/npm): + + npm install mime + +## Contributing / Testing + + npm run test + +## Command Line + + mime [path_string] + +E.g. + + > mime scripts/jquery.js + application/javascript + +## API - Queries + +### mime.lookup(path) +Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. + +```js +var mime = require('mime'); + +mime.lookup('/path/to/file.txt'); // => 'text/plain' +mime.lookup('file.txt'); // => 'text/plain' +mime.lookup('.TXT'); // => 'text/plain' +mime.lookup('htm'); // => 'text/html' +``` + +### mime.default_type +Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) + +### mime.extension(type) +Get the default extension for `type` + +```js +mime.extension('text/html'); // => 'html' +mime.extension('application/octet-stream'); // => 'bin' +``` + +### mime.charsets.lookup() + +Map mime-type to charset + +```js +mime.charsets.lookup('text/plain'); // => 'UTF-8' +``` + +(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) + +## API - Defining Custom Types + +Custom type mappings can be added on a per-project basis via the following APIs. + +### mime.define() + +Add custom mime/extension mappings + +```js +mime.define({ + 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], + 'application/x-my-type': ['x-mt', 'x-mtt'], + // etc ... +}); + +mime.lookup('x-sft'); // => 'text/x-some-format' +``` + +The first entry in the extensions array is returned by `mime.extension()`. E.g. + +```js +mime.extension('text/x-some-format'); // => 'x-sf' +``` + +### mime.load(filepath) + +Load mappings from an Apache ".types" format file + +```js +mime.load('./my_project.types'); +``` +The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/mime/cli.js b/node_modules/mime/cli.js new file mode 100644 index 0000000..20b1ffe --- /dev/null +++ b/node_modules/mime/cli.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var mime = require('./mime.js'); +var file = process.argv[2]; +var type = mime.lookup(file); + +process.stdout.write(type + '\n'); + diff --git a/node_modules/mime/mime.js b/node_modules/mime/mime.js new file mode 100644 index 0000000..d7efbde --- /dev/null +++ b/node_modules/mime/mime.js @@ -0,0 +1,108 @@ +var path = require('path'); +var fs = require('fs'); + +function Mime() { + // Map of extension -> mime type + this.types = Object.create(null); + + // Map of mime type -> extension + this.extensions = Object.create(null); +} + +/** + * Define mimetype -> extension mappings. Each key is a mime-type that maps + * to an array of extensions associated with the type. The first extension is + * used as the default extension for the type. + * + * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); + * + * @param map (Object) type definitions + */ +Mime.prototype.define = function (map) { + for (var type in map) { + var exts = map[type]; + for (var i = 0; i < exts.length; i++) { + if (process.env.DEBUG_MIME && this.types[exts[i]]) { + console.warn((this._loading || "define()").replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + + this.types[exts[i]] + ' to ' + type); + } + + this.types[exts[i]] = type; + } + + // Default extension is the first one we encounter + if (!this.extensions[type]) { + this.extensions[type] = exts[0]; + } + } +}; + +/** + * Load an Apache2-style ".types" file + * + * This may be called multiple times (it's expected). Where files declare + * overlapping types/extensions, the last file wins. + * + * @param file (String) path of file to load. + */ +Mime.prototype.load = function(file) { + this._loading = file; + // Read file and split into lines + var map = {}, + content = fs.readFileSync(file, 'ascii'), + lines = content.split(/[\r\n]+/); + + lines.forEach(function(line) { + // Clean up whitespace/comments, and split into fields + var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); + map[fields.shift()] = fields; + }); + + this.define(map); + + this._loading = null; +}; + +/** + * Lookup a mime type based on extension + */ +Mime.prototype.lookup = function(path, fallback) { + var ext = path.replace(/^.*[\.\/\\]/, '').toLowerCase(); + + return this.types[ext] || fallback || this.default_type; +}; + +/** + * Return file extension associated with a mime type + */ +Mime.prototype.extension = function(mimeType) { + var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); + return this.extensions[type]; +}; + +// Default instance +var mime = new Mime(); + +// Define built-in types +mime.define(require('./types.json')); + +// Default type +mime.default_type = mime.lookup('bin'); + +// +// Additional API specific to the default instance +// + +mime.Mime = Mime; + +/** + * Lookup a charset based on mime type. + */ +mime.charsets = { + lookup: function(mimeType, fallback) { + // Assume text types are utf8 + return (/^text\/|^application\/(javascript|json)/).test(mimeType) ? 'UTF-8' : fallback; + } +}; + +module.exports = mime; diff --git a/node_modules/mime/package.json b/node_modules/mime/package.json new file mode 100644 index 0000000..6bd24bc --- /dev/null +++ b/node_modules/mime/package.json @@ -0,0 +1,44 @@ +{ + "author": { + "name": "Robert Kieffer", + "url": "http://github.com/broofa", + "email": "robert@broofa.com" + }, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + }, + "contributors": [ + { + "name": "Benjamin Thomas", + "url": "http://github.com/bentomas", + "email": "benjamin@benjaminthomas.org" + } + ], + "description": "A comprehensive library for mime-type mapping", + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "github-release-notes": "0.13.1", + "mime-db": "1.31.0", + "mime-score": "1.1.0" + }, + "scripts": { + "prepare": "node src/build.js", + "changelog": "gren changelog --tags=all --generate --override", + "test": "node src/test.js" + }, + "keywords": [ + "util", + "mime" + ], + "main": "mime.js", + "name": "mime", + "repository": { + "url": "https://github.com/broofa/node-mime", + "type": "git" + }, + "version": "1.6.0" +} diff --git a/node_modules/mime/src/build.js b/node_modules/mime/src/build.js new file mode 100644 index 0000000..4928e48 --- /dev/null +++ b/node_modules/mime/src/build.js @@ -0,0 +1,53 @@ +#!/usr/bin/env node + +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const mimeScore = require('mime-score'); + +let db = require('mime-db'); +let chalk = require('chalk'); + +const STANDARD_FACET_SCORE = 900; + +const byExtension = {}; + +// Clear out any conflict extensions in mime-db +for (let type in db) { + let entry = db[type]; + entry.type = type; + + if (!entry.extensions) continue; + + entry.extensions.forEach(ext => { + if (ext in byExtension) { + const e0 = entry; + const e1 = byExtension[ext]; + e0.pri = mimeScore(e0.type, e0.source); + e1.pri = mimeScore(e1.type, e1.source); + + let drop = e0.pri < e1.pri ? e0 : e1; + let keep = e0.pri >= e1.pri ? e0 : e1; + drop.extensions = drop.extensions.filter(e => e !== ext); + + console.log(`${ext}: Keeping ${chalk.green(keep.type)} (${keep.pri}), dropping ${chalk.red(drop.type)} (${drop.pri})`); + } + byExtension[ext] = entry; + }); +} + +function writeTypesFile(types, path) { + fs.writeFileSync(path, JSON.stringify(types)); +} + +// Segregate into standard and non-standard types based on facet per +// https://tools.ietf.org/html/rfc6838#section-3.1 +const types = {}; + +Object.keys(db).sort().forEach(k => { + const entry = db[k]; + types[entry.type] = entry.extensions; +}); + +writeTypesFile(types, path.join(__dirname, '..', 'types.json')); diff --git a/node_modules/mime/src/test.js b/node_modules/mime/src/test.js new file mode 100644 index 0000000..42958a2 --- /dev/null +++ b/node_modules/mime/src/test.js @@ -0,0 +1,60 @@ +/** + * Usage: node test.js + */ + +var mime = require('../mime'); +var assert = require('assert'); +var path = require('path'); + +// +// Test mime lookups +// + +assert.equal('text/plain', mime.lookup('text.txt')); // normal file +assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase +assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file +assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file +assert.equal('text/plain', mime.lookup('.txt')); // nameless +assert.equal('text/plain', mime.lookup('txt')); // extension-only +assert.equal('text/plain', mime.lookup('/txt')); // extension-less () +assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less +assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized +assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default + +// +// Test extensions +// + +assert.equal('txt', mime.extension(mime.types.text)); +assert.equal('html', mime.extension(mime.types.htm)); +assert.equal('bin', mime.extension('application/octet-stream')); +assert.equal('bin', mime.extension('application/octet-stream ')); +assert.equal('html', mime.extension(' text/html; charset=UTF-8')); +assert.equal('html', mime.extension('text/html; charset=UTF-8 ')); +assert.equal('html', mime.extension('text/html; charset=UTF-8')); +assert.equal('html', mime.extension('text/html ; charset=UTF-8')); +assert.equal('html', mime.extension('text/html;charset=UTF-8')); +assert.equal('html', mime.extension('text/Html;charset=UTF-8')); +assert.equal(undefined, mime.extension('unrecognized')); + +// +// Test node.types lookups +// + +assert.equal('font/woff', mime.lookup('file.woff')); +assert.equal('application/octet-stream', mime.lookup('file.buffer')); +// TODO: Uncomment once #157 is resolved +// assert.equal('audio/mp4', mime.lookup('file.m4a')); +assert.equal('font/otf', mime.lookup('file.otf')); + +// +// Test charsets +// + +assert.equal('UTF-8', mime.charsets.lookup('text/plain')); +assert.equal('UTF-8', mime.charsets.lookup(mime.types.js)); +assert.equal('UTF-8', mime.charsets.lookup(mime.types.json)); +assert.equal(undefined, mime.charsets.lookup(mime.types.bin)); +assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); + +console.log('\nAll tests passed'); diff --git a/node_modules/mime/types.json b/node_modules/mime/types.json new file mode 100644 index 0000000..bec78ab --- /dev/null +++ b/node_modules/mime/types.json @@ -0,0 +1 @@ +{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]} \ No newline at end of file diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md new file mode 100644 index 0000000..33ede1d --- /dev/null +++ b/node_modules/minimatch/README.md @@ -0,0 +1,230 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + +### partial + +Compare a partial path to a pattern. As long as the parts of the path that +are present are not contradicted by the pattern, it will be treated as a +match. This is useful in applications where you're walking through a +folder structure, and don't yet have the full path, but want to ensure that +you do not walk down paths that can never be a match. + +For example, + +```js +minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d +minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d +minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a +``` + +### allowWindowsEscape + +Windows path separator `\` is by default converted to `/`, which +prohibits the usage of `\` as a escape character. This flag skips that +behavior and allows using the escape character. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000..fda45ad --- /dev/null +++ b/node_modules/minimatch/minimatch.js @@ -0,0 +1,947 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = (function () { try { return require('path') } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + + var options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json new file mode 100644 index 0000000..566efdf --- /dev/null +++ b/node_modules/minimatch/package.json @@ -0,0 +1,33 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.1.2", + "publishConfig": { + "tag": "v3-legacy" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "devDependencies": { + "tap": "^15.1.6" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ] +} diff --git a/node_modules/mixin-deep/LICENSE b/node_modules/mixin-deep/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/mixin-deep/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/mixin-deep/README.md b/node_modules/mixin-deep/README.md new file mode 100644 index 0000000..111bde0 --- /dev/null +++ b/node_modules/mixin-deep/README.md @@ -0,0 +1,80 @@ +# mixin-deep [![NPM version](https://img.shields.io/npm/v/mixin-deep.svg?style=flat)](https://www.npmjs.com/package/mixin-deep) [![NPM monthly downloads](https://img.shields.io/npm/dm/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![NPM total downloads](https://img.shields.io/npm/dt/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/mixin-deep.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/mixin-deep) + +> Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save mixin-deep +``` + +## Usage + +```js +var mixinDeep = require('mixin-deep'); + +mixinDeep({a: {aa: 'aa'}}, {a: {bb: 'bb'}}, {a: {cc: 'cc'}}); +//=> { a: { aa: 'aa', bb: 'bb', cc: 'cc' } } +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [defaults-deep](https://www.npmjs.com/package/defaults-deep): Like `extend` but recursively copies only the missing properties/values to the target object. | [homepage](https://github.com/jonschlinkert/defaults-deep "Like `extend` but recursively copies only the missing properties/values to the target object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://github.com/jonschlinkert/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object "Mixin the own and inherited properties of other objects onto the first object. Pass an empty object as the first arg to shallow clone.") + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 09, 2017._ \ No newline at end of file diff --git a/node_modules/mixin-deep/index.js b/node_modules/mixin-deep/index.js new file mode 100644 index 0000000..47face2 --- /dev/null +++ b/node_modules/mixin-deep/index.js @@ -0,0 +1,64 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var forIn = require('for-in'); + +function mixinDeep(target, objects) { + var len = arguments.length, i = 0; + while (++i < len) { + var obj = arguments[i]; + if (isObject(obj)) { + forIn(obj, copy, target); + } + } + return target; +} + +/** + * Copy properties from the source object to the + * target object. + * + * @param {*} `val` + * @param {String} `key` + */ + +function copy(val, key) { + if (!isValidKey(key)) { + return; + } + + var obj = this[key]; + if (isObject(val) && isObject(obj)) { + mixinDeep(obj, val); + } else { + this[key] = val; + } +} + +/** + * Returns true if `val` is an object or function. + * + * @param {any} val + * @return {Boolean} + */ + +function isObject(val) { + return isExtendable(val) && !Array.isArray(val); +} + +/** + * Returns true if `key` is a valid key to use when extending objects. + * + * @param {String} `key` + * @return {Boolean} + */ + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +}; + +/** + * Expose `mixinDeep` + */ + +module.exports = mixinDeep; diff --git a/node_modules/mixin-deep/node_modules/is-extendable/LICENSE b/node_modules/mixin-deep/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/mixin-deep/node_modules/is-extendable/README.md b/node_modules/mixin-deep/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts b/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/mixin-deep/node_modules/is-extendable/index.js b/node_modules/mixin-deep/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/mixin-deep/node_modules/is-extendable/package.json b/node_modules/mixin-deep/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/mixin-deep/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/mixin-deep/package.json b/node_modules/mixin-deep/package.json new file mode 100644 index 0000000..0581c46 --- /dev/null +++ b/node_modules/mixin-deep/package.json @@ -0,0 +1,65 @@ +{ + "name": "mixin-deep", + "description": "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.", + "version": "1.3.2", + "homepage": "https://github.com/jonschlinkert/mixin-deep", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/mixin-deep", + "bugs": { + "url": "https://github.com/jonschlinkert/mixin-deep/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3", + "should": "^13.1.3" + }, + "keywords": [ + "deep", + "extend", + "key", + "keys", + "merge", + "mixin", + "object", + "prop", + "properties", + "util", + "values" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "defaults-deep", + "extend-shallow", + "merge-deep", + "mixin-object" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/morgan/HISTORY.md b/node_modules/morgan/HISTORY.md new file mode 100644 index 0000000..436db47 --- /dev/null +++ b/node_modules/morgan/HISTORY.md @@ -0,0 +1,215 @@ +1.10.0 / 2020-03-20 +=================== + + * Add `:total-time` token + * Fix trailing space in colored status code for `dev` format + * deps: basic-auth@~2.0.1 + - deps: safe-buffer@5.1.2 + * deps: depd@~2.0.0 + - Replace internal `eval` usage with `Function` constructor + - Use instance methods on `process` to check for listeners + * deps: on-headers@~1.0.2 + - Fix `res.writeHead` patch missing return value + +1.9.1 / 2018-09-10 +================== + + * Fix using special characters in format + * deps: depd@~1.1.2 + - perf: remove argument reassignment + +1.9.0 / 2017-09-26 +================== + + * Use `res.headersSent` when available + * deps: basic-auth@~2.0.0 + - Use `safe-buffer` for improved Buffer API + * deps: debug@2.6.9 + * deps: depd@~1.1.1 + - Remove unnecessary `Buffer` loading + +1.8.2 / 2017-05-23 +================== + + * deps: debug@2.6.8 + - Fix `DEBUG_MAX_ARRAY_LENGTH` + - deps: ms@2.0.0 + +1.8.1 / 2017-02-04 +================== + + * deps: debug@2.6.1 + - Fix deprecation messages in WebStorm and other editors + - Undeprecate `DEBUG_FD` set to `1` or `2` + +1.8.0 / 2017-02-04 +================== + + * Fix sending unnecessary `undefined` argument to token functions + * deps: basic-auth@~1.1.0 + * deps: debug@2.6.0 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + * perf: enable strict mode in compiled functions + +1.7.0 / 2016-02-18 +================== + + * Add `digits` argument to `response-time` token + * deps: depd@~1.1.0 + - Enable strict mode in more places + - Support web browser loading + * deps: on-headers@~1.0.1 + - perf: enable strict mode + +1.6.1 / 2015-07-03 +================== + + * deps: basic-auth@~1.0.3 + +1.6.0 / 2015-06-12 +================== + + * Add `morgan.compile(format)` export + * Do not color 1xx status codes in `dev` format + * Fix `response-time` token to not include response latency + * Fix `status` token incorrectly displaying before response in `dev` format + * Fix token return values to be `undefined` or a string + * Improve representation of multiple headers in `req` and `res` tokens + * Use `res.getHeader` in `res` token + * deps: basic-auth@~1.0.2 + - perf: enable strict mode + - perf: hoist regular expression + - perf: parse with regular expressions + - perf: remove argument reassignment + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * pref: enable strict mode + * pref: reduce function closure scopes + * pref: remove dynamic compile on every request for `dev` format + * pref: remove an argument reassignment + * pref: skip function call without `skip` option + +1.5.3 / 2015-05-10 +================== + + * deps: basic-auth@~1.0.1 + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: on-finished@~2.2.1 + - Fix `isFinished(req)` when data buffered + +1.5.2 / 2015-03-15 +================== + + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + +1.5.1 / 2014-12-31 +================== + + * deps: debug@~2.1.1 + * deps: on-finished@~2.2.0 + +1.5.0 / 2014-11-06 +================== + + * Add multiple date formats + - `clf` for the common log format + - `iso` for the common ISO 8601 date time format + - `web` for the common RFC 1123 date time format + * Deprecate `buffer` option + * Fix date format in `common` and `combined` formats + * Fix token arguments to accept values with `"` + +1.4.1 / 2014-10-22 +================== + + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + +1.4.0 / 2014-10-16 +================== + + * Add `debug` messages + * deps: depd@~1.0.0 + +1.3.2 / 2014-09-27 +================== + + * Fix `req.ip` integration when `immediate: false` + +1.3.1 / 2014-09-14 +================== + + * Remove un-used `bytes` dependency + * deps: depd@0.4.5 + +1.3.0 / 2014-09-01 +================== + + * Assert if `format` is not a function or string + +1.2.3 / 2014-08-16 +================== + + * deps: on-finished@2.1.0 + +1.2.2 / 2014-07-27 +================== + + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + +1.2.1 / 2014-07-26 +================== + + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + +1.2.0 / 2014-07-19 +================== + + * Add `:remote-user` token + * Add `combined` log format + * Add `common` log format + * Add `morgan(format, options)` function signature + * Deprecate `default` format -- use `combined` format instead + * Deprecate not providing a format + * Remove non-standard grey color from `dev` format + +1.1.1 / 2014-05-20 +================== + + * simplify method to get remote address + +1.1.0 / 2014-05-18 +================== + + * "dev" format will use same tokens as other formats + * `:response-time` token is now empty when immediate used + * `:response-time` token is now monotonic + * `:response-time` token has precision to 1 μs + * fix `:status` + immediate output in node.js 0.8 + * improve `buffer` option to prevent indefinite event loop holding + * deps: bytes@1.0.0 + - add negative support + +1.0.1 / 2014-05-04 +================== + + * Make buffer unique per morgan instance + * deps: bytes@0.3.0 + * added terabyte support + +1.0.0 / 2014-02-08 +================== + + * Initial release diff --git a/node_modules/morgan/LICENSE b/node_modules/morgan/LICENSE new file mode 100644 index 0000000..3fefed9 --- /dev/null +++ b/node_modules/morgan/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/morgan/README.md b/node_modules/morgan/README.md new file mode 100644 index 0000000..fc1c4b4 --- /dev/null +++ b/node_modules/morgan/README.md @@ -0,0 +1,417 @@ +# morgan + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP request logger middleware for node.js + +> Named after [Dexter](http://en.wikipedia.org/wiki/Dexter_Morgan), a show you should not watch until completion. + +## API + + + +```js +var morgan = require('morgan') +``` + +### morgan(format, options) + +Create a new morgan logger middleware function using the given `format` and `options`. +The `format` argument may be a string of a predefined name (see below for the names), +a string of a format string, or a function that will produce a log entry. + +The `format` function will be called with three arguments `tokens`, `req`, and `res`, +where `tokens` is an object with all defined tokens, `req` is the HTTP request and `res` +is the HTTP response. The function is expected to return a string that will be the log +line, or `undefined` / `null` to skip logging. + +#### Using a predefined format string + + + +```js +morgan('tiny') +``` + +#### Using format string of predefined tokens + + + +```js +morgan(':method :url :status :res[content-length] - :response-time ms') +``` + +#### Using a custom format function + + + +``` js +morgan(function (tokens, req, res) { + return [ + tokens.method(req, res), + tokens.url(req, res), + tokens.status(req, res), + tokens.res(req, res, 'content-length'), '-', + tokens['response-time'](req, res), 'ms' + ].join(' ') +}) +``` + +#### Options + +Morgan accepts these properties in the options object. + +##### immediate + +Write log line on request instead of response. This means that a requests will +be logged even if the server crashes, _but data from the response (like the +response code, content length, etc.) cannot be logged_. + +##### skip + +Function to determine if logging is skipped, defaults to `false`. This function +will be called as `skip(req, res)`. + + + +```js +// EXAMPLE: only log error responses +morgan('combined', { + skip: function (req, res) { return res.statusCode < 400 } +}) +``` + +##### stream + +Output stream for writing log lines, defaults to `process.stdout`. + +#### Predefined Formats + +There are various pre-defined formats provided: + +##### combined + +Standard Apache combined log output. + +``` +:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent" +``` + +##### common + +Standard Apache common log output. + +``` +:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] +``` + +##### dev + +Concise output colored by response status for development use. The `:status` +token will be colored green for success codes, red for server error codes, +yellow for client error codes, cyan for redirection codes, and uncolored +for information codes. + +``` +:method :url :status :response-time ms - :res[content-length] +``` + +##### short + +Shorter than default, also including response time. + +``` +:remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms +``` + +##### tiny + +The minimal output. + +``` +:method :url :status :res[content-length] - :response-time ms +``` + +#### Tokens + +##### Creating new tokens + +To define a token, simply invoke `morgan.token()` with the name and a callback function. +This callback function is expected to return a string value. The value returned is then +available as ":type" in this case: + + + +```js +morgan.token('type', function (req, res) { return req.headers['content-type'] }) +``` + +Calling `morgan.token()` using the same name as an existing token will overwrite that +token definition. + +The token function is expected to be called with the arguments `req` and `res`, representing +the HTTP request and HTTP response. Additionally, the token can accept further arguments of +it's choosing to customize behavior. + +##### :date[format] + +The current date and time in UTC. The available formats are: + + - `clf` for the common log format (`"10/Oct/2000:13:55:36 +0000"`) + - `iso` for the common ISO 8601 date time format (`2000-10-10T13:55:36.000Z`) + - `web` for the common RFC 1123 date time format (`Tue, 10 Oct 2000 13:55:36 GMT`) + +If no format is given, then the default is `web`. + +##### :http-version + +The HTTP version of the request. + +##### :method + +The HTTP method of the request. + +##### :referrer + +The Referrer header of the request. This will use the standard mis-spelled Referer header if exists, otherwise Referrer. + +##### :remote-addr + +The remote address of the request. This will use `req.ip`, otherwise the standard `req.connection.remoteAddress` value (socket address). + +##### :remote-user + +The user authenticated as part of Basic auth for the request. + +##### :req[header] + +The given `header` of the request. If the header is not present, the +value will be displayed as `"-"` in the log. + +##### :res[header] + +The given `header` of the response. If the header is not present, the +value will be displayed as `"-"` in the log. + +##### :response-time[digits] + +The time between the request coming into `morgan` and when the response +headers are written, in milliseconds. + +The `digits` argument is a number that specifies the number of digits to +include on the number, defaulting to `3`, which provides microsecond precision. + +##### :status + +The status code of the response. + +If the request/response cycle completes before a response was sent to the +client (for example, the TCP socket closed prematurely by a client aborting +the request), then the status will be empty (displayed as `"-"` in the log). + +##### :total-time[digits] + +The time between the request coming into `morgan` and when the response +has finished being written out to the connection, in milliseconds. + +The `digits` argument is a number that specifies the number of digits to +include on the number, defaulting to `3`, which provides microsecond precision. + +##### :url + +The URL of the request. This will use `req.originalUrl` if exists, otherwise `req.url`. + +##### :user-agent + +The contents of the User-Agent header of the request. + +### morgan.compile(format) + +Compile a format string into a `format` function for use by `morgan`. A format string +is a string that represents a single log line and can utilize token syntax. +Tokens are references by `:token-name`. If tokens accept arguments, they can +be passed using `[]`, for example: `:token-name[pretty]` would pass the string +`'pretty'` as an argument to the token `token-name`. + +The function returned from `morgan.compile` takes three arguments `tokens`, `req`, and +`res`, where `tokens` is object with all defined tokens, `req` is the HTTP request and +`res` is the HTTP response. The function will return a string that will be the log line, +or `undefined` / `null` to skip logging. + +Normally formats are defined using `morgan.format(name, format)`, but for certain +advanced uses, this compile function is directly available. + +## Examples + +### express/connect + +Simple app that will log all request in the Apache combined format to STDOUT + +```js +var express = require('express') +var morgan = require('morgan') + +var app = express() + +app.use(morgan('combined')) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +### vanilla http server + +Simple app that will log all request in the Apache combined format to STDOUT + +```js +var finalhandler = require('finalhandler') +var http = require('http') +var morgan = require('morgan') + +// create "middleware" +var logger = morgan('combined') + +http.createServer(function (req, res) { + var done = finalhandler(req, res) + logger(req, res, function (err) { + if (err) return done(err) + + // respond to request + res.setHeader('content-type', 'text/plain') + res.end('hello, world!') + }) +}) +``` + +### write logs to a file + +#### single file + +Simple app that will log all requests in the Apache combined format to the file +`access.log`. + +```js +var express = require('express') +var fs = require('fs') +var morgan = require('morgan') +var path = require('path') + +var app = express() + +// create a write stream (in append mode) +var accessLogStream = fs.createWriteStream(path.join(__dirname, 'access.log'), { flags: 'a' }) + +// setup the logger +app.use(morgan('combined', { stream: accessLogStream })) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +#### log file rotation + +Simple app that will log all requests in the Apache combined format to one log +file per day in the `log/` directory using the +[rotating-file-stream module](https://www.npmjs.com/package/rotating-file-stream). + +```js +var express = require('express') +var morgan = require('morgan') +var path = require('path') +var rfs = require('rotating-file-stream') // version 2.x + +var app = express() + +// create a rotating write stream +var accessLogStream = rfs.createStream('access.log', { + interval: '1d', // rotate daily + path: path.join(__dirname, 'log') +}) + +// setup the logger +app.use(morgan('combined', { stream: accessLogStream })) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +### split / dual logging + +The `morgan` middleware can be used as many times as needed, enabling +combinations like: + + * Log entry on request and one on response + * Log all requests to file, but errors to console + * ... and more! + +Sample app that will log all requests to a file using Apache format, but +error responses are logged to the console: + +```js +var express = require('express') +var fs = require('fs') +var morgan = require('morgan') +var path = require('path') + +var app = express() + +// log only 4xx and 5xx responses to console +app.use(morgan('dev', { + skip: function (req, res) { return res.statusCode < 400 } +})) + +// log all requests to access.log +app.use(morgan('common', { + stream: fs.createWriteStream(path.join(__dirname, 'access.log'), { flags: 'a' }) +})) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) +``` + +### use custom token formats + +Sample app that will use custom token formats. This adds an ID to all requests and displays it using the `:id` token. + +```js +var express = require('express') +var morgan = require('morgan') +var uuid = require('node-uuid') + +morgan.token('id', function getId (req) { + return req.id +}) + +var app = express() + +app.use(assignId) +app.use(morgan(':id :method :url :response-time')) + +app.get('/', function (req, res) { + res.send('hello, world!') +}) + +function assignId (req, res, next) { + req.id = uuid.v4() + next() +} +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/morgan/master +[coveralls-url]: https://coveralls.io/r/expressjs/morgan?branch=master +[npm-downloads-image]: https://badgen.net/npm/dm/morgan +[npm-url]: https://npmjs.org/package/morgan +[npm-version-image]: https://badgen.net/npm/v/morgan +[travis-image]: https://badgen.net/travis/expressjs/morgan/master +[travis-url]: https://travis-ci.org/expressjs/morgan diff --git a/node_modules/morgan/index.js b/node_modules/morgan/index.js new file mode 100644 index 0000000..b33c4f2 --- /dev/null +++ b/node_modules/morgan/index.js @@ -0,0 +1,544 @@ +/*! + * morgan + * Copyright(c) 2010 Sencha Inc. + * Copyright(c) 2011 TJ Holowaychuk + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = morgan +module.exports.compile = compile +module.exports.format = format +module.exports.token = token + +/** + * Module dependencies. + * @private + */ + +var auth = require('basic-auth') +var debug = require('debug')('morgan') +var deprecate = require('depd')('morgan') +var onFinished = require('on-finished') +var onHeaders = require('on-headers') + +/** + * Array of CLF month names. + * @private + */ + +var CLF_MONTH = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' +] + +/** + * Default log buffer duration. + * @private + */ + +var DEFAULT_BUFFER_DURATION = 1000 + +/** + * Create a logger middleware. + * + * @public + * @param {String|Function} format + * @param {Object} [options] + * @return {Function} middleware + */ + +function morgan (format, options) { + var fmt = format + var opts = options || {} + + if (format && typeof format === 'object') { + opts = format + fmt = opts.format || 'default' + + // smart deprecation message + deprecate('morgan(options): use morgan(' + (typeof fmt === 'string' ? JSON.stringify(fmt) : 'format') + ', options) instead') + } + + if (fmt === undefined) { + deprecate('undefined format: specify a format') + } + + // output on request instead of response + var immediate = opts.immediate + + // check if log entry should be skipped + var skip = opts.skip || false + + // format function + var formatLine = typeof fmt !== 'function' + ? getFormatFunction(fmt) + : fmt + + // stream + var buffer = opts.buffer + var stream = opts.stream || process.stdout + + // buffering support + if (buffer) { + deprecate('buffer option') + + // flush interval + var interval = typeof buffer !== 'number' + ? DEFAULT_BUFFER_DURATION + : buffer + + // swap the stream + stream = createBufferStream(stream, interval) + } + + return function logger (req, res, next) { + // request data + req._startAt = undefined + req._startTime = undefined + req._remoteAddress = getip(req) + + // response data + res._startAt = undefined + res._startTime = undefined + + // record request start + recordStartTime.call(req) + + function logRequest () { + if (skip !== false && skip(req, res)) { + debug('skip request') + return + } + + var line = formatLine(morgan, req, res) + + if (line == null) { + debug('skip line') + return + } + + debug('log request') + stream.write(line + '\n') + }; + + if (immediate) { + // immediate log + logRequest() + } else { + // record response start + onHeaders(res, recordStartTime) + + // log when response finished + onFinished(res, logRequest) + } + + next() + } +} + +/** + * Apache combined log format. + */ + +morgan.format('combined', ':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"') + +/** + * Apache common log format. + */ + +morgan.format('common', ':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length]') + +/** + * Default format. + */ + +morgan.format('default', ':remote-addr - :remote-user [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"') +deprecate.property(morgan, 'default', 'default format: use combined format') + +/** + * Short format. + */ + +morgan.format('short', ':remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms') + +/** + * Tiny format. + */ + +morgan.format('tiny', ':method :url :status :res[content-length] - :response-time ms') + +/** + * dev (colored) + */ + +morgan.format('dev', function developmentFormatLine (tokens, req, res) { + // get the status code if response written + var status = headersSent(res) + ? res.statusCode + : undefined + + // get status color + var color = status >= 500 ? 31 // red + : status >= 400 ? 33 // yellow + : status >= 300 ? 36 // cyan + : status >= 200 ? 32 // green + : 0 // no color + + // get colored function + var fn = developmentFormatLine[color] + + if (!fn) { + // compile + fn = developmentFormatLine[color] = compile('\x1b[0m:method :url \x1b[' + + color + 'm:status\x1b[0m :response-time ms - :res[content-length]\x1b[0m') + } + + return fn(tokens, req, res) +}) + +/** + * request url + */ + +morgan.token('url', function getUrlToken (req) { + return req.originalUrl || req.url +}) + +/** + * request method + */ + +morgan.token('method', function getMethodToken (req) { + return req.method +}) + +/** + * response time in milliseconds + */ + +morgan.token('response-time', function getResponseTimeToken (req, res, digits) { + if (!req._startAt || !res._startAt) { + // missing request and/or response start time + return + } + + // calculate diff + var ms = (res._startAt[0] - req._startAt[0]) * 1e3 + + (res._startAt[1] - req._startAt[1]) * 1e-6 + + // return truncated value + return ms.toFixed(digits === undefined ? 3 : digits) +}) + +/** + * total time in milliseconds + */ + +morgan.token('total-time', function getTotalTimeToken (req, res, digits) { + if (!req._startAt || !res._startAt) { + // missing request and/or response start time + return + } + + // time elapsed from request start + var elapsed = process.hrtime(req._startAt) + + // cover to milliseconds + var ms = (elapsed[0] * 1e3) + (elapsed[1] * 1e-6) + + // return truncated value + return ms.toFixed(digits === undefined ? 3 : digits) +}) + +/** + * current date + */ + +morgan.token('date', function getDateToken (req, res, format) { + var date = new Date() + + switch (format || 'web') { + case 'clf': + return clfdate(date) + case 'iso': + return date.toISOString() + case 'web': + return date.toUTCString() + } +}) + +/** + * response status code + */ + +morgan.token('status', function getStatusToken (req, res) { + return headersSent(res) + ? String(res.statusCode) + : undefined +}) + +/** + * normalized referrer + */ + +morgan.token('referrer', function getReferrerToken (req) { + return req.headers.referer || req.headers.referrer +}) + +/** + * remote address + */ + +morgan.token('remote-addr', getip) + +/** + * remote user + */ + +morgan.token('remote-user', function getRemoteUserToken (req) { + // parse basic credentials + var credentials = auth(req) + + // return username + return credentials + ? credentials.name + : undefined +}) + +/** + * HTTP version + */ + +morgan.token('http-version', function getHttpVersionToken (req) { + return req.httpVersionMajor + '.' + req.httpVersionMinor +}) + +/** + * UA string + */ + +morgan.token('user-agent', function getUserAgentToken (req) { + return req.headers['user-agent'] +}) + +/** + * request header + */ + +morgan.token('req', function getRequestToken (req, res, field) { + // get header + var header = req.headers[field.toLowerCase()] + + return Array.isArray(header) + ? header.join(', ') + : header +}) + +/** + * response header + */ + +morgan.token('res', function getResponseHeader (req, res, field) { + if (!headersSent(res)) { + return undefined + } + + // get header + var header = res.getHeader(field) + + return Array.isArray(header) + ? header.join(', ') + : header +}) + +/** + * Format a Date in the common log format. + * + * @private + * @param {Date} dateTime + * @return {string} + */ + +function clfdate (dateTime) { + var date = dateTime.getUTCDate() + var hour = dateTime.getUTCHours() + var mins = dateTime.getUTCMinutes() + var secs = dateTime.getUTCSeconds() + var year = dateTime.getUTCFullYear() + + var month = CLF_MONTH[dateTime.getUTCMonth()] + + return pad2(date) + '/' + month + '/' + year + + ':' + pad2(hour) + ':' + pad2(mins) + ':' + pad2(secs) + + ' +0000' +} + +/** + * Compile a format string into a function. + * + * @param {string} format + * @return {function} + * @public + */ + +function compile (format) { + if (typeof format !== 'string') { + throw new TypeError('argument format must be a string') + } + + var fmt = String(JSON.stringify(format)) + var js = ' "use strict"\n return ' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function (_, name, arg) { + var tokenArguments = 'req, res' + var tokenFunction = 'tokens[' + String(JSON.stringify(name)) + ']' + + if (arg !== undefined) { + tokenArguments += ', ' + String(JSON.stringify(arg)) + } + + return '" +\n (' + tokenFunction + '(' + tokenArguments + ') || "-") + "' + }) + + // eslint-disable-next-line no-new-func + return new Function('tokens, req, res', js) +} + +/** + * Create a basic buffering stream. + * + * @param {object} stream + * @param {number} interval + * @public + */ + +function createBufferStream (stream, interval) { + var buf = [] + var timer = null + + // flush function + function flush () { + timer = null + stream.write(buf.join('')) + buf.length = 0 + } + + // write function + function write (str) { + if (timer === null) { + timer = setTimeout(flush, interval) + } + + buf.push(str) + } + + // return a minimal "stream" + return { write: write } +} + +/** + * Define a format with the given name. + * + * @param {string} name + * @param {string|function} fmt + * @public + */ + +function format (name, fmt) { + morgan[name] = fmt + return this +} + +/** + * Lookup and compile a named format function. + * + * @param {string} name + * @return {function} + * @public + */ + +function getFormatFunction (name) { + // lookup format + var fmt = morgan[name] || name || morgan.default + + // return compiled format + return typeof fmt !== 'function' + ? compile(fmt) + : fmt +} + +/** + * Get request IP address. + * + * @private + * @param {IncomingMessage} req + * @return {string} + */ + +function getip (req) { + return req.ip || + req._remoteAddress || + (req.connection && req.connection.remoteAddress) || + undefined +} + +/** + * Determine if the response headers have been sent. + * + * @param {object} res + * @returns {boolean} + * @private + */ + +function headersSent (res) { + // istanbul ignore next: node.js 0.8 support + return typeof res.headersSent !== 'boolean' + ? Boolean(res._header) + : res.headersSent +} + +/** + * Pad number to two digits. + * + * @private + * @param {number} num + * @return {string} + */ + +function pad2 (num) { + var str = String(num) + + // istanbul ignore next: num is current datetime + return (str.length === 1 ? '0' : '') + str +} + +/** + * Record the start time. + * @private + */ + +function recordStartTime () { + this._startAt = process.hrtime() + this._startTime = new Date() +} + +/** + * Define a token function with the given name, + * and callback fn(req, res). + * + * @param {string} name + * @param {function} fn + * @public + */ + +function token (name, fn) { + morgan[name] = fn + return this +} diff --git a/node_modules/morgan/package.json b/node_modules/morgan/package.json new file mode 100644 index 0000000..b25a647 --- /dev/null +++ b/node_modules/morgan/package.json @@ -0,0 +1,52 @@ +{ + "name": "morgan", + "description": "HTTP request logger middleware for node.js", + "version": "1.10.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "express", + "http", + "logger", + "middleware" + ], + "repository": "expressjs/morgan", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "devDependencies": { + "eslint": "6.8.0", + "eslint-config-standard": "14.1.0", + "eslint-plugin-import": "2.20.1", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "9.2.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "mocha": "7.1.1", + "nyc": "15.0.0", + "split": "1.0.1", + "supertest": "4.0.2" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8.0" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --check-leaks --reporter spec --bail", + "test-ci": "nyc --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js new file mode 100644 index 0000000..6a522b1 --- /dev/null +++ b/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json new file mode 100644 index 0000000..6a31c81 --- /dev/null +++ b/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md new file mode 100644 index 0000000..84a9974 --- /dev/null +++ b/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/node_modules/nanomatch/CHANGELOG.md b/node_modules/nanomatch/CHANGELOG.md new file mode 100644 index 0000000..8c3aead --- /dev/null +++ b/node_modules/nanomatch/CHANGELOG.md @@ -0,0 +1,57 @@ +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog][]_): + +- `added`: for new features +- `changed`: for changes in existing functionality +- `deprecated`: for once-stable features removed in upcoming releases +- `removed`: for deprecated features removed in this release +- `fixed`: for any bug fixes +- `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0] - 2017-04-11 + +**Fixed** + +- adds support for unclosed quotes + +**Added** + +- adds support for `options.noglobstar` + +### [1.0.4] - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3] - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +- More windows path edge cases + +**Added** + +- Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1] - 2016-12-12 + +**Added** + +- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0] - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +[Unreleased]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...HEAD +[0.2.0]: https://github.com/jonschlinkert/nanomatch/compare/0.1.0...0.2.0 + +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/nanomatch/LICENSE b/node_modules/nanomatch/LICENSE new file mode 100644 index 0000000..7c9987b --- /dev/null +++ b/node_modules/nanomatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/nanomatch/README.md b/node_modules/nanomatch/README.md new file mode 100644 index 0000000..bdd35a9 --- /dev/null +++ b/node_modules/nanomatch/README.md @@ -0,0 +1,1148 @@ +# nanomatch [![NPM version](https://img.shields.io/npm/v/nanomatch.svg?style=flat)](https://www.npmjs.com/package/nanomatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![NPM total downloads](https://img.shields.io/npm/dt/nanomatch.svg?style=flat)](https://npmjs.org/package/nanomatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/nanomatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/nanomatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/nanomatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/nanomatch) + +> Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces) + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Table of Contents + +
+Details + +- [Install](#install) +- [What is nanomatch?](#what-is-nanomatch) +- [Getting started](#getting-started) + * [Installing nanomatch](#installing-nanomatch) + * [Usage](#usage) +- [Documentation](#documentation) + * [Escaping](#escaping) +- [API](#api) +- [Options](#options) + * [options.basename](#optionsbasename) + * [options.bash](#optionsbash) + * [options.cache](#optionscache) + * [options.dot](#optionsdot) + * [options.failglob](#optionsfailglob) + * [options.ignore](#optionsignore) + * [options.matchBase](#optionsmatchbase) + * [options.nocase](#optionsnocase) + * [options.nodupes](#optionsnodupes) + * [options.noglobstar](#optionsnoglobstar) + * [options.nonegate](#optionsnonegate) + * [options.nonull](#optionsnonull) + * [options.nullglob](#optionsnullglob) + * [options.slash](#optionsslash) + * [options.star](#optionsstar) + * [options.snapdragon](#optionssnapdragon) + * [options.sourcemap](#optionssourcemap) + * [options.unescape](#optionsunescape) + * [options.unixify](#optionsunixify) +- [Features](#features) +- [Bash expansion libs](#bash-expansion-libs) +- [Benchmarks](#benchmarks) + * [Running benchmarks](#running-benchmarks) + * [Nanomatch vs. Minimatch vs. Multimatch](#nanomatch-vs-minimatch-vs-multimatch) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save nanomatch +``` + +
+Release history + +## History + +### key + +Changelog entries are classified using the following labels _(from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog)_): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes +* `bumped`: updated dependencies, only minor or higher will be listed. + +### [1.1.0](https://github.com/micromatch/nanomatch/compare/1.0.4...1.1.0) - 2017-04-11 + +**Fixed** + +* adds support for unclosed quotes + +**Added** + +* adds support for `options.noglobstar` + +### [1.0.4](https://github.com/micromatch/nanomatch/compare/1.0.3...1.0.4) - 2017-04-06 + +Housekeeping updates. Adds documentation section about escaping, cleans up utils. + +### [1.0.3](https://github.com/micromatch/nanomatch/compare/1.0.1...1.0.3) - 2017-04-06 + +This release includes fixes for windows path edge cases and other improvements for stricter adherence to bash spec. + +**Fixed** + +* More windows path edge cases + +**Added** + +* Support for bash-like quoted strings for escaping sequences of characters, such as `foo/"**"/bar` where `**` should be matched literally and not evaluated as special characters. + +### [1.0.1](https://github.com/micromatch/nanomatch/compare/1.0.0...1.0.1) - 2016-12-12 + +**Added** + +* Support for windows path edge cases where backslashes are used in brackets or other unusual combinations. + +### [1.0.0](https://github.com/micromatch/nanomatch/compare/0.1.0...1.0.0) - 2016-12-12 + +Stable release. + +### [0.1.0] - 2016-10-08 + +First release. + +
+ +## What is nanomatch? + +Nanomatch is a fast and accurate glob matcher with full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +**Learn more** + +* [Getting started](#getting-started): learn how to install and begin using nanomatch +* [Features](#features): jump to info about supported patterns, and a glob matching reference +* [API documentation](#api): jump to available options and methods +* [Unit tests](test): visit unit tests. there is no better way to learn a code library than spending time the unit tests. Nanomatch has 36,000 unit tests - go become a glob matching ninja! + +
+How is this different? + +**Speed and accuracy** + +Nanomatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which results in: + +* Granular control over the entire conversion process in a way that is easy to understand, reason about, and customize. +* Faster matching, from a combination of optimized glob patterns and (optional) caching. +* Much greater accuracy than minimatch. In fact, nanomatch passes _all of the spec tests_ from bash, including some that bash still fails. However, since there is no real specification for globs, if you encounter a pattern that yields unexpected match results [after researching previous issues](../../issues), [please let us know](../../issues/new). + +**Basic globbing only** + +Nanomatch supports [basic globbing only](#features), which is limited to `*`, `**`, `?` and regex-like brackets. + +If you need support for the other [bash "expansion" types](#bash-expansion-libs) (in addition to the wildcard matching provided by nanomatch), consider using [micromatch](https://github.com/micromatch/micromatch) instead. _(micromatch >=3.0.0 uses the nanomatch parser and compiler for basic glob matching)_ + +
+ +## Getting started + +### Installing nanomatch + +**Install with [yarn](https://yarnpkg.com/)** + +```sh +$ yarn add nanomatch +``` + +**Install with [npm](https://npmjs.com)** + +```sh +$ npm install nanomatch +``` + +### Usage + +Add nanomatch to your project using node's `require()` system: + +```js +var nanomatch = require('nanomatch'); + +// the main export is a function that takes an array of strings to match +// and a string or array of patterns to use for matching +nanomatch(list, patterns[, options]); +``` + +**Params** + +* `list` **{String|Array}**: List of strings to perform matches against. This is often a list of file paths. +* `patterns` **{String|Array}**: One or more [glob paterns](#features) to use for matching. +* `options` **{Object}**: Any [supported options](#options) may be passed + +**Examples** + +```js +var nm = require('nanomatch'); +console.log(nm(['a', 'b/b', 'c/c/c'], '*')); +//=> ['a'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '*/*')); +//=> ['b/b'] + +console.log(nm(['a', 'b/b', 'c/c/c'], '**')); +//=> ['a', 'b/b', 'c/c/c'] +``` + +See the [API documentation](#api) for available methods and [options](https://github.com/einaros/options.js). + +## Documentation + +### Escaping + +_Backslashes and quotes_ can be used to escape characters, forcing nanomatch to regard those characters as a literal characters. + +**Backslashes** + +Use backslashes to escape single characters. For example, the following pattern would match `foo/*/bar` exactly: + +```js +'foo/\*/bar' +``` + +The following pattern would match `foo/` followed by a literal `*`, followed by zero or more of any characters besides `/`, followed by `/bar`. + +```js +'foo/\**/bar' +``` + +**Quoted strings** + +Use single or double quotes to escape sequences of characters. For example, the following patterns would match `foo/**/bar` exactly: + +```js +'foo/"**"/bar' +'foo/\'**\'/bar' +"foo/'**'/bar" +``` + +**Matching literal quotes** + +If you need to match quotes literally, you can escape them as well. For example, the following will match `foo/"*"/bar`, `foo/"a"/bar`, `foo/"b"/bar`, or `foo/"c"/bar`: + +```js +'foo/\\"*\\"/bar' +``` + +And the following will match `foo/'*'/bar`, `foo/'a'/bar`, `foo/'b'/bar`, or `foo/'c'/bar`: + +```js +'foo/\\\'*\\\'/bar' +``` + +## API + +### [nanomatch](index.js#L40) + +The main function takes a list of strings and one or more glob patterns to use for matching. + +**Params** + +* `list` **{Array}**: A list of strings to match +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm(list, patterns[, options]); + +console.log(nm(['a.js', 'a.txt'], ['*.js'])); +//=> [ 'a.js' ] +``` + +### [.match](index.js#L106) + +Similar to the main function, but `pattern` must be a string. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var nm = require('nanomatch'); +nm.match(list, pattern[, options]); + +console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); +//=> ['a.a', 'a.aa'] +``` + +### [.isMatch](index.js#L167) + +Returns true if the specified `string` matches the given glob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the string matches the glob pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.isMatch(string, pattern[, options]); + +console.log(nm.isMatch('a.a', '*.a')); +//=> true +console.log(nm.isMatch('a.b', '*.a')); +//=> false +``` + +### [.some](index.js#L205) + +Returns true if some of the elements in the given `list` match any of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.some(list, patterns[, options]); + +console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// true +console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.every](index.js#L243) + +Returns true if every element in the given `list` matches at least one of the given glob `patterns`. + +**Params** + +* `list` **{String|Array}**: The string or array of strings to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.every(list, patterns[, options]); + +console.log(nm.every('foo.js', ['foo.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); +// true +console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); +// false +console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); +// false +``` + +### [.any](index.js#L277) + +Returns true if **any** of the given glob `patterns` match the specified `string`. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.any(string, patterns[, options]); + +console.log(nm.any('a.a', ['b.*', '*.a'])); +//=> true +console.log(nm.any('a.a', 'b.*')); +//=> false +``` + +### [.all](index.js#L325) + +Returns true if **all** of the given `patterns` match the specified string. + +**Params** + +* `str` **{String|Array}**: The string to test. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if any patterns match `str` + +**Example** + +```js +var nm = require('nanomatch'); +nm.all(string, patterns[, options]); + +console.log(nm.all('foo.js', ['foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', '!foo.js'])); +// false + +console.log(nm.all('foo.js', ['*.js', 'foo.js'])); +// true + +console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); +// true +``` + +### [.not](index.js#L359) + +Returns a list of strings that _**do not match any**_ of the given `patterns`. + +**Params** + +* `list` **{Array}**: Array of strings to match. +* `patterns` **{String|Array}**: One or more glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.not(list, patterns[, options]); + +console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); +//=> ['b.b', 'c.c'] +``` + +### [.contains](index.js#L394) + +Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `patterns` **{String|Array}**: Glob pattern to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var nm = require('nanomatch'); +nm.contains(string, pattern[, options]); + +console.log(nm.contains('aa/bb/cc', '*b')); +//=> true +console.log(nm.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matchKeys](index.js#L450) + +Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. + +**Params** + +* `object` **{Object}**: The object with keys to filter. +* `patterns` **{String|Array}**: One or more glob patterns to use for matching. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Object}**: Returns an object with only keys that match the given patterns. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matchKeys(object, patterns[, options]); + +var obj = { aa: 'a', ab: 'b', ac: 'c' }; +console.log(nm.matchKeys(obj, '*b')); +//=> { ab: 'b' } +``` + +### [.matcher](index.js#L479) + +Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. + +**Params** + +* `pattern` **{String}**: Glob pattern +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{Function}**: Returns a matcher function. + +**Example** + +```js +var nm = require('nanomatch'); +nm.matcher(pattern[, options]); + +var isMatch = nm.matcher('*.!(*a)'); +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.capture](index.js#L560) + +Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var nm = require('nanomatch'); +nm.capture(pattern, string[, options]); + +console.log(nm.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(nm.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L595) + +Create a regular expression from the given glob `pattern`. + +**Params** + +* `pattern` **{String}**: A glob pattern to convert to regex. +* `options` **{Object}**: See available [options](#options) for changing how matches are performed. +* `returns` **{RegExp}**: Returns a regex created from the given pattern. + +**Example** + +```js +var nm = require('nanomatch'); +nm.makeRe(pattern[, options]); + +console.log(nm.makeRe('*.js')); +//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ +``` + +### [.create](index.js#L658) + +Parses the given glob `pattern` and returns an object with the compiled `output` and optional source `map`. + +**Params** + +* `pattern` **{String}**: Glob pattern to parse and compile. +* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed. +* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map. + +**Example** + +```js +var nm = require('nanomatch'); +nm.create(pattern[, options]); + +console.log(nm.create('abc/*.js')); +// { options: { source: 'string', sourcemap: true }, +// state: {}, +// compilers: +// { ... }, +// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', +// ast: +// { type: 'root', +// errors: [], +// nodes: +// [ ... ], +// dot: false, +// input: 'abc/*.js' }, +// parsingErrors: [], +// map: +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] }, +// position: { line: 1, column: 28 }, +// content: {}, +// files: {}, +// idx: 6 } +``` + +### [.parse](index.js#L697) + +Parse the given `str` with the given `options`. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an AST + +**Example** + +```js +var nm = require('nanomatch'); +nm.parse(pattern[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(ast); +// { type: 'root', +// errors: [], +// input: 'a/{b,c}/d', +// nodes: +// [ { type: 'bos', val: '' }, +// { type: 'text', val: 'a/' }, +// { type: 'brace', +// nodes: +// [ { type: 'brace.open', val: '{' }, +// { type: 'text', val: 'b,c' }, +// { type: 'brace.close', val: '}' } ] }, +// { type: 'text', val: '/d' }, +// { type: 'eos', val: '' } ] } +``` + +### [.compile](index.js#L745) + +Compile the given `ast` or string with the given `options`. + +**Params** + +* `ast` **{Object|String}** +* `options` **{Object}** +* `returns` **{Object}**: Returns an object that has an `output` property with the compiled string. + +**Example** + +```js +var nm = require('nanomatch'); +nm.compile(ast[, options]); + +var ast = nm.parse('a/{b,c}/d'); +console.log(nm.compile(ast)); +// { options: { source: 'string' }, +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// brace: [Function], +// 'brace.open': [Function], +// text: [Function], +// 'brace.close': [Function] }, +// output: [ 'a/(b|c)/d' ], +// ast: +// { ... }, +// parsingErrors: [] } +``` + +### [.clearCache](index.js#L768) + +Clear the regex cache. + +**Example** + +```js +nm.clearCache(); +``` + +## Options + +
+basename + +### options.basename + +Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. + +Type: `boolean` + +Default: `false` + +**Example** + +```js +nm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +nm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +
+ +
+bash + +### options.bash + +Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as an other star. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +var files = ['abc', 'ajz']; +console.log(nm(files, '[a-c]*')); +//=> ['abc', 'ajz'] + +console.log(nm(files, '[a-c]*', {bash: false})); +``` + +
+ +
+cache + +### options.cache + +Disable regex and function memoization. + +Type: `boolean` + +Default: `undefined` + +
+ +
+dot + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`. + +Type: `boolean` + +Default: `false` + +
+ +
+failglob + +### options.failglob + +Similar to the `--failglob` behavior in Bash, throws an error when no matches are found. + +Type: `boolean` + +Default: `undefined` + +
+ +
+ignore + +### options.ignore + +String or array of glob patterns to match files to ignore. + +Type: `String|Array` + +Default: `undefined` + +
+ +
+matchBase + +### options.matchBase + +Alias for [options.basename](#options-basename). + +
+ +
+nocase + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `boolean` + +Default: `undefined` + +
+ +
+nodupes + +### options.nodupes + +Remove duplicate elements from the result array. + +Type: `boolean` + +Default: `true` (enabled by default) + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +nm.match(['a/b/c', 'a/b/c'], '**'); +//=> ['abc'] + +nm.match(['a/b/c', 'a/b/c'], '**', {nodupes: false}); +//=> ['a/b/c', 'a/b/c'] +``` + +
+ +
+nonegate + +### options.noglobstar + +Disable matching with globstars (`**`). + +Type: `boolean` + +Default: `undefined` + +```js +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); +//=> ['a/b', 'a/b/c', 'a/b/c/d'] + +nm(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); +//=> ['a/b'] +``` + +
+ +
+nonegate + +### options.nonegate + +Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. + +Type: `boolean` + +Default: `undefined` + +
+ +
+nonull + +### options.nonull + +Alias for [options.nullglob](#options-nullglob). + +
+ +
+nullglob + +### options.nullglob + +If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. + +Type: `boolean` + +Default: `undefined` + +
+ +
+slash + +### options.slash + +Customize the slash character(s) to use for matching. + +Type: `string|function` + +Default: `[/\\]` (forward slash and backslash) + +
+ +
+star + +### options.star + +Customize the star character(s) to use for matching. It's not recommended that you modify this unless you have advanced knowledge of the compiler and matching rules. + +Type: `string|function` + +Default: `[^/\\]*?` + +
+ +
+snapdragon + +### options.snapdragon + +Pass your own instance of [snapdragon](https://github.com/jonschlinkert/snapdragon) to customize parsers or compilers. + +Type: `object` + +Default: `undefined` + +
+ +
+snapdragon + +### options.sourcemap + +Generate a source map by enabling the `sourcemap` option with the `.parse`, `.compile`, or `.create` methods. + +**Examples** + +```js +var nm = require('nanomatch'); + +var res = nm.create('abc/*.js', {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/*.js' ] } + +var ast = nm.parse('abc/**/*.js'); +var res = nm.compile(ast, {sourcemap: true}); +console.log(res.map); +// { version: 3, +// sources: [ 'string' ], +// names: [], +// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE', +// sourcesContent: [ 'abc/**/*.js' ] } +``` + +
+ +
+unescape + +### options.unescape + +Remove backslashes from returned matches. + +Type: `boolean` + +Default: `undefined` + +**Example** + +In this example we want to match a literal `*`: + +```js +nm.match(['abc', 'a\\*c'], 'a\\*c'); +//=> ['a\\*c'] + +nm.match(['abc', 'a\\*c'], 'a\\*c', {unescape: true}); +//=> ['a*c'] +``` + +
+ +
+unixify + +### options.unixify + +Convert path separators on returned files to posix/unix-style forward slashes. + +Type: `boolean` + +Default: `true` + +**Example** + +```js +nm.match(['a\\b\\c'], 'a/**'); +//=> ['a/b/c'] + +nm.match(['a\\b\\c'], {unixify: false}); +//=> ['a\\b\\c'] +``` + +
+ +## Features + +Nanomatch has full support for standard Bash glob features, including the following "metacharacters": `*`, `**`, `?` and `[...]`. + +Here are some examples of how they work: + +| **Pattern** | **Description** | +| --- | --- | +| `*` | Matches any string except for `/`, leading `.`, or `/.` inside a path | +| `**` | Matches any string including `/`, but not a leading `.` or `/.` inside a path. More than two stars (e.g. `***` is treated the same as one star, and `**` loses its special meaning | when it's not the only thing in a path segment, per Bash specifications) | +| `foo*` | Matches any string beginning with `foo` | +| `*bar*` | Matches any string containing `bar` (beginning, middle or end) | +| `*.min.js` | Matches any string ending with `.min.js` | +| `[abc]*.js` | Matches any string beginning with `a`, `b`, or `c` and ending with `.js` | +| `abc?` | Matches `abcd` or `abcz` but not `abcde` | + +The exceptions noted for `*` apply to all patterns that contain a `*`. + +**Not supported** + +The following extended-globbing features are not supported: + +* [brace expansion](https://github.com/jonschlinkert/braces) (e.g. `{a,b,c}`) +* [extglobs](https://github.com/jonschlinkert/extglob) (e.g. `@(a|!(c|d))`) +* [POSIX brackets](https://github.com/jonschlinkert/expand-brackets) (e.g. `[[:alpha:][:digit:]]`) + +If you need any of these features consider using [micromatch](https://github.com/micromatch/micromatch) instead. + +## Bash expansion libs + +Nanomatch is part of a suite of libraries aimed at bringing the power and expressiveness of [Bash's](https://www.gnu.org/software/bash/) matching and expansion capabilities to JavaScript, _and - as you can see by the [benchmarks](#benchmarks) - without sacrificing speed_. + +| **Related library** | **Matching Type** | **Example** | **Description** | +| --- | --- | --- | --- | +| `nanomatch` (you are here) | Wildcards | `*` | [Filename expansion](https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html#Filename-Expansion), also referred to as globbing and pathname expansion, allows the use of [wildcards](#features) for matching. | +| [expand-tilde](https://github.com/jonschlinkert/expand-tilde) | Tildes | `~` | [Tilde expansion](https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html#Tilde-Expansion) converts the leading tilde in a file path to the user home directory. | +| [braces](https://github.com/jonschlinkert/braces) | Braces | `{a,b,c}` | [Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) | +| [expand-brackets](https://github.com/jonschlinkert/expand-brackets) | Brackets | `[[:alpha:]]` | [POSIX character classes](https://www.gnu.org/software/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html) (also referred to as POSIX brackets, or POSIX character classes) | +| [extglob](https://github.com/jonschlinkert/extglob) | Parens | `!(a\ | b)` | [Extglobs](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html#Pattern-Matching) | +| [micromatch](https://github.com/micromatch/micromatch) | All | all | Micromatch is built on top of the other libraries. | + +There are many resources available on the web if you want to dive deeper into how these features work in Bash. + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && node benchmark +``` + +### Nanomatch vs. Minimatch vs. Multimatch + +```bash +# globstar-basic (182 bytes) + minimatch x 69,512 ops/sec ±1.92% (88 runs sampled) + multimatch x 63,376 ops/sec ±1.41% (89 runs sampled) + nanomatch x 432,451 ops/sec ±0.92% (88 runs sampled) + + fastest is nanomatch (by 651% avg) + +# large-list-globstar (485686 bytes) + minimatch x 34.02 ops/sec ±1.42% (59 runs sampled) + multimatch x 33.58 ops/sec ±1.97% (58 runs sampled) + nanomatch x 483 ops/sec ±1.06% (86 runs sampled) + + fastest is nanomatch (by 1429% avg) + +# long-list-globstar (194085 bytes) + minimatch x 383 ops/sec ±0.74% (90 runs sampled) + multimatch x 378 ops/sec ±0.59% (89 runs sampled) + nanomatch x 990 ops/sec ±1.14% (85 runs sampled) + + fastest is nanomatch (by 260% avg) + +# negation-basic (132 bytes) + minimatch x 242,145 ops/sec ±1.17% (89 runs sampled) + multimatch x 76,403 ops/sec ±0.78% (92 runs sampled) + nanomatch x 537,253 ops/sec ±1.44% (86 runs sampled) + + fastest is nanomatch (by 337% avg) + +# not-glob-basic (93 bytes) + minimatch x 252,402 ops/sec ±1.33% (89 runs sampled) + multimatch x 209,954 ops/sec ±1.30% (90 runs sampled) + nanomatch x 1,716,468 ops/sec ±1.13% (86 runs sampled) + + fastest is nanomatch (by 742% avg) + +# star-basic (93 bytes) + minimatch x 182,780 ops/sec ±1.41% (91 runs sampled) + multimatch x 153,210 ops/sec ±0.72% (89 runs sampled) + nanomatch x 599,621 ops/sec ±1.22% (90 runs sampled) + + fastest is nanomatch (by 357% avg) + +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob "Returns true if a string has an extglob.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 164 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [devongovett](https://github.com/devongovett) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 18, 2018._ \ No newline at end of file diff --git a/node_modules/nanomatch/index.js b/node_modules/nanomatch/index.js new file mode 100644 index 0000000..dddc612 --- /dev/null +++ b/node_modules/nanomatch/index.js @@ -0,0 +1,838 @@ +'use strict'; + +/** + * Module dependencies + */ + +var util = require('util'); +var toRegex = require('to-regex'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var cache = require('./lib/cache'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * The main function takes a list of strings and one or more + * glob patterns to use for matching. + * + * ```js + * var nm = require('nanomatch'); + * nm(list, patterns[, options]); + * + * console.log(nm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {Array} `list` A list of strings to match + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + +function nanomatch(list, patterns, options) { + patterns = utils.arrayify(patterns); + list = utils.arrayify(list); + + var len = patterns.length; + if (list.length === 0 || len === 0) { + return []; + } + + if (len === 1) { + return nanomatch.match(list, patterns[0], options); + } + + var negated = false; + var omit = []; + var keep = []; + var idx = -1; + + while (++idx < len) { + var pattern = patterns[idx]; + + if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, nanomatch.match(list, pattern.slice(1), options)); + negated = true; + } else { + keep.push.apply(keep, nanomatch.match(list, pattern, options)); + } + } + + // minimatch.match parity + if (negated && keep.length === 0) { + if (options && options.unixify === false) { + keep = list.slice(); + } else { + var unixify = utils.unixify(options); + for (var i = 0; i < list.length; i++) { + keep.push(unixify(list[i])); + } + } + } + + var matches = utils.diff(keep, omit); + if (!options || options.nodupes !== false) { + return utils.unique(matches); + } + + return matches; +} + +/** + * Similar to the main function, but `pattern` must be a string. + * + * ```js + * var nm = require('nanomatch'); + * nm.match(list, pattern[, options]); + * + * console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a')); + * //=> ['a.a', 'a.aa'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of matches + * @api public + */ + +nanomatch.match = function(list, pattern, options) { + if (Array.isArray(pattern)) { + throw new TypeError('expected pattern to be a string'); + } + + var unixify = utils.unixify(options); + var isMatch = memoize('match', pattern, options, nanomatch.matcher); + var matches = []; + + list = utils.arrayify(list); + var len = list.length; + var idx = -1; + + while (++idx < len) { + var ele = list[idx]; + if (ele === pattern || isMatch(ele)) { + matches.push(utils.value(ele, unixify, options)); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return utils.unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [options.unescape ? utils.unescape(pattern) : pattern]; + } + } + + // if `opts.ignore` was defined, diff ignored list + if (options.ignore) { + matches = nanomatch.not(matches, options.ignore, options); + } + + return options.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.isMatch(string, pattern[, options]); + * + * console.log(nm.isMatch('a.a', '*.a')); + * //=> true + * console.log(nm.isMatch('a.b', '*.a')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the string matches the glob pattern. + * @api public + */ + +nanomatch.isMatch = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(pattern)) { + return false; + } + + var equals = utils.equalsPattern(options); + if (equals(str)) { + return true; + } + + var isMatch = memoize('isMatch', pattern, options, nanomatch.matcher); + return isMatch(str); +}; + +/** + * Returns true if some of the elements in the given `list` match any of the + * given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.some(list, patterns[, options]); + * + * console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(nm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.some = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length === 1) { + return true; + } + } + + return false; +}; + +/** + * Returns true if every element in the given `list` matches + * at least one of the given glob `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.every(list, patterns[, options]); + * + * console.log(nm.every('foo.js', ['foo.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(nm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.every = function(list, patterns, options) { + if (typeof list === 'string') { + list = [list]; + } + + for (var i = 0; i < list.length; i++) { + if (nanomatch(list[i], patterns, options).length !== 1) { + return false; + } + } + + return true; +}; + +/** + * Returns true if **any** of the given glob `patterns` + * match the specified `string`. + * + * ```js + * var nm = require('nanomatch'); + * nm.any(string, patterns[, options]); + * + * console.log(nm.any('a.a', ['b.*', '*.a'])); + * //=> true + * console.log(nm.any('a.a', 'b.*')); + * //=> false + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.any = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (nanomatch.isMatch(str, patterns[i], options)) { + return true; + } + } + return false; +}; + +/** + * Returns true if **all** of the given `patterns` + * match the specified string. + * + * ```js + * var nm = require('nanomatch'); + * nm.all(string, patterns[, options]); + * + * console.log(nm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(nm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +nanomatch.all = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + patterns = [patterns]; + } + + for (var i = 0; i < patterns.length; i++) { + if (!nanomatch.isMatch(str, patterns[i], options)) { + return false; + } + } + return true; +}; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * var nm = require('nanomatch'); + * nm.not(list, patterns[, options]); + * + * console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +nanomatch.not = function(list, patterns, options) { + var opts = extend({}, options); + var ignore = opts.ignore; + delete opts.ignore; + + list = utils.arrayify(list); + + var matches = utils.diff(list, nanomatch(list, patterns, opts)); + if (ignore) { + matches = utils.diff(matches, nanomatch(list, ignore)); + } + + return opts.nodupes !== false ? utils.unique(matches) : matches; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var nm = require('nanomatch'); + * nm.contains(string, pattern[, options]); + * + * console.log(nm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(nm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +nanomatch.contains = function(str, patterns, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string: "' + util.inspect(str) + '"'); + } + + if (typeof patterns === 'string') { + if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) { + return false; + } + + var equals = utils.equalsPattern(patterns, options); + if (equals(str)) { + return true; + } + var contains = utils.containsPattern(patterns, options); + if (contains(str)) { + return true; + } + } + + var opts = extend({}, options, {contains: true}); + return nanomatch.any(str, patterns, opts); +}; + +/** + * Returns true if the given pattern and options should enable + * the `matchBase` option. + * @return {Boolean} + * @api private + */ + +nanomatch.matchBase = function(pattern, options) { + if (pattern && pattern.indexOf('/') !== -1 || !options) return false; + return options.basename === true || options.matchBase === true; +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * var nm = require('nanomatch'); + * nm.matchKeys(object, patterns[, options]); + * + * var obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(nm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +nanomatch.matchKeys = function(obj, patterns, options) { + if (!utils.isObject(obj)) { + throw new TypeError('expected the first argument to be an object'); + } + var keys = nanomatch(Object.keys(obj), patterns, options); + return utils.pick(obj, keys); +}; + +/** + * Returns a memoized matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * var nm = require('nanomatch'); + * nm.matcher(pattern[, options]); + * + * var isMatch = nm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {Function} Returns a matcher function. + * @api public + */ + +nanomatch.matcher = function matcher(pattern, options) { + if (utils.isEmptyString(pattern)) { + return function() { + return false; + }; + } + + if (Array.isArray(pattern)) { + return compose(pattern, options, matcher); + } + + // if pattern is a regex + if (pattern instanceof RegExp) { + return test(pattern); + } + + // if pattern is invalid + if (!utils.isString(pattern)) { + throw new TypeError('expected pattern to be an array, string or regex'); + } + + // if pattern is a non-glob string + if (!utils.hasSpecialChars(pattern)) { + if (options && options.nocase === true) { + pattern = pattern.toLowerCase(); + } + return utils.matchPath(pattern, options); + } + + // if pattern is a glob string + var re = nanomatch.makeRe(pattern, options); + + // if `options.matchBase` or `options.basename` is defined + if (nanomatch.matchBase(pattern, options)) { + return utils.matchBasename(re, options); + } + + function test(regex) { + var equals = utils.equalsPattern(options); + var unixify = utils.unixify(options); + + return function(str) { + if (equals(str)) { + return true; + } + + if (regex.test(unixify(str))) { + return true; + } + return false; + }; + } + + // create matcher function + var matcherFn = test(re); + // set result object from compiler on matcher function, + // as a non-enumerable property. useful for debugging + utils.define(matcherFn, 'result', re.result); + return matcherFn; +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or + * `null` if the pattern did not match. + * + * ```js + * var nm = require('nanomatch'); + * nm.capture(pattern, string[, options]); + * + * console.log(nm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(nm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +nanomatch.capture = function(pattern, str, options) { + var re = nanomatch.makeRe(pattern, extend({capture: true}, options)); + var unixify = utils.unixify(options); + + function match() { + return function(string) { + var match = re.exec(unixify(string)); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * var nm = require('nanomatch'); + * nm.makeRe(pattern[, options]); + * + * console.log(nm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` See available [options](#options) for changing how matches are performed. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +nanomatch.makeRe = function(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var opts = utils.extend({wrap: false}, options); + var result = nanomatch.create(pattern, opts); + var regex = toRegex(result.output, opts); + utils.define(regex, 'result', result); + return regex; + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parses the given glob `pattern` and returns an object with the compiled `output` + * and optional source `map`. + * + * ```js + * var nm = require('nanomatch'); + * nm.create(pattern[, options]); + * + * console.log(nm.create('abc/*.js')); + * // { options: { source: 'string', sourcemap: true }, + * // state: {}, + * // compilers: + * // { ... }, + * // output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: + * // [ ... ], + * // dot: false, + * // input: 'abc/*.js' }, + * // parsingErrors: [], + * // map: + * // { version: 3, + * // sources: [ 'string' ], + * // names: [], + * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE', + * // sourcesContent: [ 'abc/*.js' ] }, + * // position: { line: 1, column: 28 }, + * // content: {}, + * // files: {}, + * // idx: 6 } + * ``` + * @param {String} `pattern` Glob pattern to parse and compile. + * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed. + * @return {Object} Returns an object with the parsed AST, compiled string and optional source map. + * @api public + */ + +nanomatch.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + function create() { + return nanomatch.compile(nanomatch.parse(pattern, options), options); + } + return memoize('create', pattern, options, create); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.parse(pattern[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +nanomatch.parse = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + function parse() { + var snapdragon = utils.instantiate(null, options); + parsers(snapdragon, options); + + var ast = snapdragon.parse(pattern, options); + utils.define(ast, 'snapdragon', snapdragon); + ast.input = pattern; + return ast; + } + + return memoize('parse', pattern, options, parse); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var nm = require('nanomatch'); + * nm.compile(ast[, options]); + * + * var ast = nm.parse('a/{b,c}/d'); + * console.log(nm.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +nanomatch.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = nanomatch.parse(ast, options); + } + + function compile() { + var snapdragon = utils.instantiate(ast, options); + compilers(snapdragon, options); + return snapdragon.compile(ast, options); + } + + return memoize('compile', ast.input, options, compile); +}; + +/** + * Clear the regex cache. + * + * ```js + * nm.clearCache(); + * ``` + * @api public + */ + +nanomatch.clearCache = function() { + nanomatch.cache.__data__ = {}; +}; + +/** + * Compose a matcher function with the given patterns. + * This allows matcher functions to be compiled once and + * called multiple times. + */ + +function compose(patterns, options, matcher) { + var matchers; + + return memoize('compose', String(patterns), options, function() { + return function(file) { + // delay composition until it's invoked the first time, + // after that it won't be called again + if (!matchers) { + matchers = []; + for (var i = 0; i < patterns.length; i++) { + matchers.push(matcher(patterns[i], options)); + } + } + + var len = matchers.length; + while (len--) { + if (matchers[len](file) === true) { + return true; + } + } + return false; + }; + }); +} + +/** + * Memoize a generated regex or function. A unique key is generated + * from the `type` (usually method name), the `pattern`, and + * user-defined options. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + '=' + pattern, options); + + if (options && options.cache === false) { + return fn(pattern, options); + } + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + cache.set(type, key, val); + return val; +} + +/** + * Expose compiler, parser and cache on `nanomatch` + */ + +nanomatch.compilers = compilers; +nanomatch.parsers = parsers; +nanomatch.cache = cache; + +/** + * Expose `nanomatch` + * @type {Function} + */ + +module.exports = nanomatch; diff --git a/node_modules/nanomatch/lib/cache.js b/node_modules/nanomatch/lib/cache.js new file mode 100644 index 0000000..fffc4c1 --- /dev/null +++ b/node_modules/nanomatch/lib/cache.js @@ -0,0 +1 @@ +module.exports = new (require('fragment-cache'))(); diff --git a/node_modules/nanomatch/lib/compilers.js b/node_modules/nanomatch/lib/compilers.js new file mode 100644 index 0000000..d7a786e --- /dev/null +++ b/node_modules/nanomatch/lib/compilers.js @@ -0,0 +1,339 @@ +'use strict'; + +/** +* Nanomatch compilers +*/ + +module.exports = function(nanomatch, options) { + function slash() { + if (options && typeof options.slash === 'string') { + return options.slash; + } + if (options && typeof options.slash === 'function') { + return options.slash.call(nanomatch); + } + return '\\\\/'; + } + + function star() { + if (options && typeof options.star === 'string') { + return options.star; + } + if (options && typeof options.star === 'function') { + return options.star.call(nanomatch); + } + return '[^' + slash() + ']*?'; + } + + var ast = nanomatch.ast = nanomatch.parser.ast; + ast.state = nanomatch.parser.state; + nanomatch.compiler.state = ast.state; + nanomatch.compiler + + /** + * Negation / escaping + */ + + .set('not', function(node) { + var prev = this.prev(); + if (this.options.nonegate === true || prev.type !== 'bos') { + return this.emit('\\' + node.val, node); + } + return this.emit(node.val, node); + }) + .set('escape', function(node) { + if (this.options.unescape && /^[-\w_.]/.test(node.val)) { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + .set('quoted', function(node) { + return this.emit(node.val, node); + }) + + /** + * Regex + */ + + .set('dollar', function(node) { + if (node.parent.type === 'bracket') { + return this.emit(node.val, node); + } + return this.emit('\\' + node.val, node); + }) + + /** + * Dot: "." + */ + + .set('dot', function(node) { + if (node.dotfiles === true) this.dotfiles = true; + return this.emit('\\' + node.val, node); + }) + + /** + * Slashes: "/" and "\" + */ + + .set('backslash', function(node) { + return this.emit(node.val, node); + }) + .set('slash', function(node, nodes, i) { + var val = '[' + slash() + ']'; + var parent = node.parent; + var prev = this.prev(); + + // set "node.hasSlash" to true on all ancestor parens nodes + while (parent.type === 'paren' && !parent.hasSlash) { + parent.hasSlash = true; + parent = parent.parent; + } + + if (prev.addQmark) { + val += '?'; + } + + // word boundary + if (node.rest.slice(0, 2) === '\\b') { + return this.emit(val, node); + } + + // globstars + if (node.parsed === '**' || node.parsed === './**') { + this.output = '(?:' + this.output; + return this.emit(val + ')?', node); + } + + // negation + if (node.parsed === '!**' && this.options.nonegate !== true) { + return this.emit(val + '?\\b', node); + } + return this.emit(val, node); + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + var val = node.val; + + if (node.escaped === true) { + inner = inner.replace(/\\?(\W)/g, '\\$1'); + negated = ''; + } + + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + val = open + negated + inner + close; + return this.emit(val, node); + }) + + /** + * Square: "[.]" (only matches a single character in brackets) + */ + + .set('square', function(node) { + var val = (/^\W/.test(node.val) ? '\\' : '') + node.val; + return this.emit(val, node); + }) + + /** + * Question mark: "?" + */ + + .set('qmark', function(node) { + var prev = this.prev(); + // don't use "slash" variable so that we always avoid + // matching backslashes and slashes with a qmark + var val = '[^.\\\\/]'; + if (this.options.dot || (prev.type !== 'bos' && prev.type !== 'slash')) { + val = '[^\\\\/]'; + } + + if (node.parsed.slice(-1) === '(') { + var ch = node.rest.charAt(0); + if (ch === '!' || ch === '=' || ch === ':') { + return this.emit(node.val, node); + } + } + + if (node.val.length > 1) { + val += '{' + node.val.length + '}'; + } + return this.emit(val, node); + }) + + /** + * Plus + */ + + .set('plus', function(node) { + var prev = node.parsed.slice(-1); + if (prev === ']' || prev === ')') { + return this.emit(node.val, node); + } + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + var ch = this.output.slice(-1); + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * globstar: '**' + */ + + .set('globstar', function(node, nodes, i) { + if (!this.output) { + this.state.leadingGlobstar = true; + } + + var prev = this.prev(); + var before = this.prev(2); + var next = this.next(); + var after = this.next(2); + var type = prev.type; + var val = node.val; + + if (prev.type === 'slash' && next.type === 'slash') { + if (before.type === 'text') { + this.output += '?'; + + if (after.type !== 'text') { + this.output += '\\b'; + } + } + } + + var parsed = node.parsed; + if (parsed.charAt(0) === '!') { + parsed = parsed.slice(1); + } + + var isInside = node.isInside.paren || node.isInside.brace; + if (parsed && type !== 'slash' && type !== 'bos' && !isInside) { + val = star(); + } else { + val = this.options.dot !== true + ? '(?:(?!(?:[' + slash() + ']|^)\\.).)*?' + : '(?:(?!(?:[' + slash() + ']|^)(?:\\.{1,2})($|[' + slash() + ']))(?!\\.{2}).)*?'; + } + + if ((type === 'slash' || type === 'bos') && this.options.dot !== true) { + val = '(?!\\.)' + val; + } + + if (prev.type === 'slash' && next.type === 'slash' && before.type !== 'text') { + if (after.type === 'text' || after.type === 'star') { + node.addQmark = true; + } + } + + if (this.options.capture) { + val = '(' + val + ')'; + } + + return this.emit(val, node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node, nodes, i) { + var prior = nodes[i - 2] || {}; + var prev = this.prev(); + var next = this.next(); + var type = prev.type; + + function isStart(n) { + return n.type === 'bos' || n.type === 'slash'; + } + + if (this.output === '' && this.options.contains !== true) { + this.output = '(?![' + slash() + '])'; + } + + if (type === 'bracket' && this.options.bash === false) { + var str = next && next.type === 'bracket' ? star() : '*?'; + if (!prev.nodes || prev.nodes[1].type !== 'posix') { + return this.emit(str, node); + } + } + + var prefix = !this.dotfiles && type !== 'text' && type !== 'escape' + ? (this.options.dot ? '(?!(?:^|[' + slash() + '])\\.{1,2}(?:$|[' + slash() + ']))' : '(?!\\.)') + : ''; + + if (isStart(prev) || (isStart(prior) && type === 'not')) { + if (prefix !== '(?!\\.)') { + prefix += '(?!(\\.{2}|\\.[' + slash() + ']))(?=.)'; + } else { + prefix += '(?=.)'; + } + } else if (prefix === '(?!\\.)') { + prefix = ''; + } + + if (prev.type === 'not' && prior.type === 'bos' && this.options.dot === true) { + this.output = '(?!\\.)' + this.output; + } + + var output = prefix + star(); + if (this.options.capture) { + output = '(' + output + ')'; + } + + return this.emit(output, node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val, node); + }) + + /** + * End-of-string + */ + + .set('eos', function(node) { + var prev = this.prev(); + var val = node.val; + + this.output = '(?:\\.[' + slash() + '](?=.))?' + this.output; + if (this.state.metachar && prev.type !== 'qmark' && prev.type !== 'slash') { + val += (this.options.contains ? '[' + slash() + ']?' : '(?:[' + slash() + ']|$)'); + } + + return this.emit(val, node); + }); + + /** + * Allow custom compilers to be passed on options + */ + + if (options && typeof options.compilers === 'function') { + options.compilers(nanomatch.compiler); + } +}; + diff --git a/node_modules/nanomatch/lib/parsers.js b/node_modules/nanomatch/lib/parsers.js new file mode 100644 index 0000000..f87df8f --- /dev/null +++ b/node_modules/nanomatch/lib/parsers.js @@ -0,0 +1,386 @@ +'use strict'; + +var regexNot = require('regex-not'); +var toRegex = require('to-regex'); + +/** + * Characters to use in negation regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var cached; +var NOT_REGEX = '[\\[!*+?$^"\'.\\\\/]+'; +var not = createTextRegex(NOT_REGEX); + +/** + * Nanomatch parsers + */ + +module.exports = function(nanomatch, options) { + var parser = nanomatch.parser; + var opts = parser.options; + + parser.state = { + slashes: 0, + paths: [] + }; + + parser.ast.state = parser.state; + parser + + /** + * Beginning-of-string + */ + + .capture('prefix', function() { + if (this.parsed) return; + var m = this.match(/^\.[\\/]/); + if (!m) return; + this.state.strictOpen = !!this.options.strictOpen; + this.state.addPrefix = true; + }) + + /** + * Escape: "\\." + */ + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^(?:\\(.)|([$^]))/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[2] || m[1] + }); + }) + + /** + * Quoted strings + */ + + .capture('quoted', function() { + var pos = this.position(); + var m = this.match(/^["']/); + if (!m) return; + + var quote = m[0]; + if (this.input.indexOf(quote) === -1) { + return pos({ + type: 'escape', + val: quote + }); + } + + var tok = advanceTo(this.input, quote); + this.consume(tok.len); + + return pos({ + type: 'quoted', + val: tok.esc + }); + }) + + /** + * Negations: "!" + */ + + .capture('not', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(this.notRegex || /^!+/); + if (!m) return; + var val = m[0]; + + var isNegated = (val.length % 2) === 1; + if (parsed === '' && !isNegated) { + val = ''; + } + + // if nothing has been parsed, we know `!` is at the start, + // so we need to wrap the result in a negation regex + if (parsed === '' && isNegated && this.options.nonegate !== true) { + this.bos.val = '(?!^(?:'; + this.append = ')$).*'; + val = ''; + } + return pos({ + type: 'not', + val: val + }); + }) + + /** + * Dot: "." + */ + + .capture('dot', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\.+/); + if (!m) return; + + var val = m[0]; + this.state.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/'); + + return pos({ + type: 'dot', + dotfiles: this.state.dot, + val: val + }); + }) + + /** + * Plus: "+" + */ + + .capture('plus', /^\+(?!\()/) + + /** + * Question mark: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + + this.state.metachar = true; + this.state.qmark = true; + + return pos({ + type: 'qmark', + parsed: parsed, + val: m[0] + }); + }) + + /** + * Globstar: "**" + */ + + .capture('globstar', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\*{2}(?![*(])(?=[,)/]|$)/); + if (!m) return; + + var type = opts.noglobstar !== true ? 'globstar' : 'star'; + var node = pos({type: type, parsed: parsed}); + this.state.metachar = true; + + while (this.input.slice(0, 4) === '/**/') { + this.input = this.input.slice(3); + } + + node.isInside = { + brace: this.isInside('brace'), + paren: this.isInside('paren') + }; + + if (type === 'globstar') { + this.state.globstar = true; + node.val = '**'; + + } else { + this.state.star = true; + node.val = '*'; + } + + return node; + }) + + /** + * Star: "*" + */ + + .capture('star', function() { + var pos = this.position(); + var starRe = /^(?:\*(?![*(])|[*]{3,}(?!\()|[*]{2}(?![(/]|$)|\*(?=\*\())/; + var m = this.match(starRe); + if (!m) return; + + this.state.metachar = true; + this.state.star = true; + return pos({ + type: 'star', + val: m[0] + }); + }) + + /** + * Slash: "/" + */ + + .capture('slash', function() { + var pos = this.position(); + var m = this.match(/^\//); + if (!m) return; + + this.state.slashes++; + return pos({ + type: 'slash', + val: m[0] + }); + }) + + /** + * Backslash: "\\" + */ + + .capture('backslash', function() { + var pos = this.position(); + var m = this.match(/^\\(?![*+?(){}[\]'"])/); + if (!m) return; + + var val = m[0]; + + if (this.isInside('bracket')) { + val = '\\'; + } else if (val.length > 1) { + val = '\\\\'; + } + + return pos({ + type: 'backslash', + val: val + }); + }) + + /** + * Square: "[.]" + */ + + .capture('square', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\[([^!^\\])\]/); + if (!m) return; + + return pos({ + type: 'square', + val: m[1] + }); + }) + + /** + * Brackets: "[...]" (basic, this can be overridden by other parsers) + */ + + .capture('bracket', function() { + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]+|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = (m[2] || '').replace(/\\\\+/, '\\\\'); + var close = m[3] || ''; + + if (m[2] && inner.length < m[2].length) { + val = val.replace(/\\\\+/, '\\\\'); + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + }); + }) + + /** + * Text + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }); + + /** + * Allow custom parsers to be passed on options + */ + + if (options && typeof options.parsers === 'function') { + options.parsers(nanomatch.parser); + } +}; + +/** + * Advance to the next non-escaped character + */ + +function advanceTo(input, endChar) { + var ch = input.charAt(0); + var tok = { len: 1, val: '', esc: '' }; + var idx = 0; + + function advance() { + if (ch !== '\\') { + tok.esc += '\\' + ch; + tok.val += ch; + } + + ch = input.charAt(++idx); + tok.len++; + + if (ch === '\\') { + advance(); + advance(); + } + } + + while (ch && ch !== endChar) { + advance(); + } + return tok; +} + +/** + * Create text regex + */ + +function createTextRegex(pattern) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re = toRegex('^(?:[*]\\((?=.)|' + not + ')', opts); + return (cached = re); +} + +/** + * Expose negation string + */ + +module.exports.not = NOT_REGEX; diff --git a/node_modules/nanomatch/lib/utils.js b/node_modules/nanomatch/lib/utils.js new file mode 100644 index 0000000..0cf1501 --- /dev/null +++ b/node_modules/nanomatch/lib/utils.js @@ -0,0 +1,379 @@ +'use strict'; + +var utils = module.exports; +var path = require('path'); + +/** + * Module dependencies + */ + +var isWindows = require('is-windows')(); +var Snapdragon = require('snapdragon'); +utils.define = require('define-property'); +utils.diff = require('arr-diff'); +utils.extend = require('extend-shallow'); +utils.pick = require('object.pick'); +utils.typeOf = require('kind-of'); +utils.unique = require('array-unique'); + +/** + * Returns true if the given value is effectively an empty string + */ + +utils.isEmptyString = function(val) { + return String(val) === '' || String(val) === './'; +}; + +/** + * Returns true if the platform is windows, or `path.sep` is `\\`. + * This is defined as a function to allow `path.sep` to be set in unit tests, + * or by the user, if there is a reason to do so. + * @return {Boolean} + */ + +utils.isWindows = function() { + return path.sep === '\\' || isWindows === true; +}; + +/** + * Return the last element from an array + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Get the `Snapdragon` instance to use + */ + +utils.instantiate = function(ast, options) { + var snapdragon; + // if an instance was created by `.parse`, use that instance + if (utils.typeOf(ast) === 'object' && ast.snapdragon) { + snapdragon = ast.snapdragon; + // if the user supplies an instance on options, use that instance + } else if (utils.typeOf(options) === 'object' && options.snapdragon) { + snapdragon = options.snapdragon; + // create a new instance + } else { + snapdragon = new Snapdragon(options); + } + + utils.define(snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.call(this, str, options); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strictErrors !== true) { + var open = last.nodes[0]; + var inner = last.nodes[1]; + if (last.type === 'bracket') { + if (inner.val.charAt(0) === '[') { + inner.val = '\\' + inner.val; + } + + } else { + open.val = '\\' + open.val; + var sibling = open.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); + + return snapdragon; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + if (typeof options === 'undefined') { + return pattern; + } + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isString = function(val) { + return typeof val === 'string'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isRegex = function(val) { + return utils.typeOf(val) === 'regexp'; +}; + +/** + * Return true if `val` is a non-empty string + */ + +utils.isObject = function(val) { + return utils.typeOf(val) === 'object'; +}; + +/** + * Escape regex characters in the given string + */ + +utils.escapeRegex = function(str) { + return str.replace(/[-[\]{}()^$|*+?.\\/\s]/g, '\\$&'); +}; + +/** + * Combines duplicate characters in the provided `input` string. + * @param {String} `input` + * @returns {String} + */ + +utils.combineDupes = function(input, patterns) { + patterns = utils.arrayify(patterns).join('|').split('|'); + patterns = patterns.map(function(s) { + return s.replace(/\\?([+*\\/])/g, '\\$1'); + }); + var substr = patterns.join('|'); + var regex = new RegExp('(' + substr + ')(?=\\1)', 'g'); + return input.replace(regex, ''); +}; + +/** + * Returns true if the given `str` has special characters + */ + +utils.hasSpecialChars = function(str) { + return /(?:(?:(^|\/)[!.])|[*?+()|[\]{}]|[+@]\()/.test(str); +}; + +/** + * Normalize slashes in the given filepath. + * + * @param {String} `filepath` + * @return {String} + */ + +utils.toPosixPath = function(str) { + return str.replace(/\\+/g, '/'); +}; + +/** + * Strip backslashes before special characters in a string. + * + * @param {String} `str` + * @return {String} + */ + +utils.unescape = function(str) { + return utils.toPosixPath(str.replace(/\\(?=[*+?!.])/g, '')); +}; + +/** + * Strip the drive letter from a windows filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripDrive = function(fp) { + return utils.isWindows() ? fp.replace(/^[a-z]:[\\/]+?/i, '/') : fp; +}; + +/** + * Strip the prefix from a filepath + * @param {String} `fp` + * @return {String} + */ + +utils.stripPrefix = function(str) { + if (str.charAt(0) === '.' && (str.charAt(1) === '/' || str.charAt(1) === '\\')) { + return str.slice(2); + } + return str; +}; + +/** + * Returns true if `str` is a common character that doesn't need + * to be processed to be used for matching. + * @param {String} `str` + * @return {Boolean} + */ + +utils.isSimpleChar = function(str) { + return str.trim() === '' || str === '.'; +}; + +/** + * Returns true if the given str is an escaped or + * unescaped path character + */ + +utils.isSlash = function(str) { + return str === '/' || str === '\\/' || str === '\\' || str === '\\\\'; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function(pattern, options) { + return (options && options.contains) + ? utils.containsPattern(pattern, options) + : utils.equalsPattern(pattern, options); +}; + +/** + * Returns true if the given (original) filepath or unixified path are equal + * to the given pattern. + */ + +utils._equals = function(filepath, unixPath, pattern) { + return pattern === filepath || pattern === unixPath; +}; + +/** + * Returns true if the given (original) filepath or unixified path contain + * the given pattern. + */ + +utils._contains = function(filepath, unixPath, pattern) { + return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.equalsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function fn(filepath) { + var equal = utils._equals(filepath, unixify(filepath), pattern); + if (equal === true || options.nocase !== true) { + return equal; + } + var lower = filepath.toLowerCase(); + return utils._equals(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.containsPattern = function(pattern, options) { + var unixify = utils.unixify(options); + options = options || {}; + + return function(filepath) { + var contains = utils._contains(filepath, unixify(filepath), pattern); + if (contains === true || options.nocase !== true) { + return contains; + } + var lower = filepath.toLowerCase(); + return utils._contains(lower, unixify(lower), pattern); + }; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` Matching regex + * @return {Function} + */ + +utils.matchBasename = function(re) { + return function(filepath) { + return re.test(filepath) || re.test(path.basename(filepath)); + }; +}; + +/** + * Returns the given value unchanced. + * @return {any} + */ + +utils.identity = function(val) { + return val; +}; + +/** + * Determines the filepath to return based on the provided options. + * @return {any} + */ + +utils.value = function(str, unixify, options) { + if (options && options.unixify === false) { + return str; + } + if (options && typeof options.unixify === 'function') { + return options.unixify(str); + } + return unixify(str); +}; + +/** + * Returns a function that normalizes slashes in a string to forward + * slashes, strips `./` from beginning of paths, and optionally unescapes + * special characters. + * @return {Function} + */ + +utils.unixify = function(options) { + var opts = options || {}; + return function(filepath) { + if (opts.stripPrefix !== false) { + filepath = utils.stripPrefix(filepath); + } + if (opts.unescape === true) { + filepath = utils.unescape(filepath); + } + if (opts.unixify === true || utils.isWindows()) { + filepath = utils.toPosixPath(filepath); + } + return filepath; + }; +}; diff --git a/node_modules/nanomatch/node_modules/extend-shallow/LICENSE b/node_modules/nanomatch/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/nanomatch/node_modules/extend-shallow/README.md b/node_modules/nanomatch/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/extend-shallow/index.js b/node_modules/nanomatch/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/nanomatch/node_modules/extend-shallow/package.json b/node_modules/nanomatch/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/nanomatch/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/nanomatch/node_modules/is-extendable/LICENSE b/node_modules/nanomatch/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/is-extendable/README.md b/node_modules/nanomatch/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/is-extendable/index.d.ts b/node_modules/nanomatch/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/nanomatch/node_modules/is-extendable/index.js b/node_modules/nanomatch/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/nanomatch/node_modules/is-extendable/package.json b/node_modules/nanomatch/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/nanomatch/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md b/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..01687d5 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,160 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/kind-of/LICENSE b/node_modules/nanomatch/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/nanomatch/node_modules/kind-of/README.md b/node_modules/nanomatch/node_modules/kind-of/README.md new file mode 100644 index 0000000..0411dc5 --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/README.md @@ -0,0 +1,367 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/nanomatch/node_modules/kind-of/index.js b/node_modules/nanomatch/node_modules/kind-of/index.js new file mode 100644 index 0000000..dfa799b --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/nanomatch/node_modules/kind-of/package.json b/node_modules/nanomatch/node_modules/kind-of/package.json new file mode 100644 index 0000000..5820cad --- /dev/null +++ b/node_modules/nanomatch/node_modules/kind-of/package.json @@ -0,0 +1,88 @@ +{ + "name": "kind-of", + "description": "Get the native type of a value.", + "version": "6.0.3", + "homepage": "https://github.com/jonschlinkert/kind-of", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "David Fox-Powell (https://dtothefp.github.io/me)", + "James (https://twitter.com/aretecode)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Ken Sheedlo (kensheedlo.com)", + "laggingreflex (https://github.com/laggingreflex)", + "Miguel Mota (https://miguelmota.com)", + "Peter deHaan (http://about.me/peterdehaan)", + "tunnckoCore (https://i.am.charlike.online)" + ], + "repository": "jonschlinkert/kind-of", + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha", + "prepublish": "browserify -o browser.js -e index.js -s index --bare" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + } +} diff --git a/node_modules/nanomatch/package.json b/node_modules/nanomatch/package.json new file mode 100644 index 0000000..0a85f0a --- /dev/null +++ b/node_modules/nanomatch/package.json @@ -0,0 +1,134 @@ +{ + "name": "nanomatch", + "description": "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)", + "version": "1.2.13", + "homepage": "https://github.com/micromatch/nanomatch", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Devon Govett (http://badassjs.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/nanomatch", + "bugs": { + "url": "https://github.com/micromatch/nanomatch/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^5.0.0", + "helper-changelog": "^0.3.0", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "multimatch": "^2.1.0" + }, + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "micromatch", + "minimatch", + "multimatch", + "nanomatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "lintDeps": { + "dependencies": { + "options": { + "lock": { + "snapdragon": "^0.8.1" + } + } + }, + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**" + ] + } + } + } + }, + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "helpers": [ + "helper-changelog" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extglob", + "is-extglob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "expand-brackets", + "expand-tilde", + "glob-object", + "micromatch", + "minimatch", + "options", + "snapdragon" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/negotiator/HISTORY.md b/node_modules/negotiator/HISTORY.md new file mode 100644 index 0000000..a9a5449 --- /dev/null +++ b/node_modules/negotiator/HISTORY.md @@ -0,0 +1,108 @@ +0.6.3 / 2022-01-22 +================== + + * Revert "Lazy-load modules from main entry point" + +0.6.2 / 2019-04-29 +================== + + * Fix sorting charset, encoding, and language with extra parameters + +0.6.1 / 2016-05-02 +================== + + * perf: improve `Accept` parsing speed + * perf: improve `Accept-Charset` parsing speed + * perf: improve `Accept-Encoding` parsing speed + * perf: improve `Accept-Language` parsing speed + +0.6.0 / 2015-09-29 +================== + + * Fix including type extensions in parameters in `Accept` parsing + * Fix parsing `Accept` parameters with quoted equals + * Fix parsing `Accept` parameters with quoted semicolons + * Lazy-load modules from main entry point + * perf: delay type concatenation until needed + * perf: enable strict mode + * perf: hoist regular expressions + * perf: remove closures getting spec properties + * perf: remove a closure from media type parsing + * perf: remove property delete from media type parsing + +0.5.3 / 2015-05-10 +================== + + * Fix media type parameter matching to be case-insensitive + +0.5.2 / 2015-05-06 +================== + + * Fix comparing media types with quoted values + * Fix splitting media types with quoted commas + +0.5.1 / 2015-02-14 +================== + + * Fix preference sorting to be stable for long acceptable lists + +0.5.0 / 2014-12-18 +================== + + * Fix list return order when large accepted list + * Fix missing identity encoding when q=0 exists + * Remove dynamic building of Negotiator class + +0.4.9 / 2014-10-14 +================== + + * Fix error when media type has invalid parameter + +0.4.8 / 2014-09-28 +================== + + * Fix all negotiations to be case-insensitive + * Stable sort preferences of same quality according to client order + * Support Node.js 0.6 + +0.4.7 / 2014-06-24 +================== + + * Handle invalid provided languages + * Handle invalid provided media types + +0.4.6 / 2014-06-11 +================== + + * Order by specificity when quality is the same + +0.4.5 / 2014-05-29 +================== + + * Fix regression in empty header handling + +0.4.4 / 2014-05-29 +================== + + * Fix behaviors when headers are not present + +0.4.3 / 2014-04-16 +================== + + * Handle slashes on media params correctly + +0.4.2 / 2014-02-28 +================== + + * Fix media type sorting + * Handle media types params strictly + +0.4.1 / 2014-01-16 +================== + + * Use most specific matches + +0.4.0 / 2014-01-09 +================== + + * Remove preferred prefix from methods diff --git a/node_modules/negotiator/LICENSE b/node_modules/negotiator/LICENSE new file mode 100644 index 0000000..ea6b9e2 --- /dev/null +++ b/node_modules/negotiator/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012-2014 Federico Romero +Copyright (c) 2012-2014 Isaac Z. Schlueter +Copyright (c) 2014-2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/negotiator/README.md b/node_modules/negotiator/README.md new file mode 100644 index 0000000..82915e5 --- /dev/null +++ b/node_modules/negotiator/README.md @@ -0,0 +1,203 @@ +# negotiator + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +An HTTP content negotiator for Node.js + +## Installation + +```sh +$ npm install negotiator +``` + +## API + +```js +var Negotiator = require('negotiator') +``` + +### Accept Negotiation + +```js +availableMediaTypes = ['text/html', 'text/plain', 'application/json'] + +// The negotiator constructor receives a request object +negotiator = new Negotiator(request) + +// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8' + +negotiator.mediaTypes() +// -> ['text/html', 'image/jpeg', 'application/*'] + +negotiator.mediaTypes(availableMediaTypes) +// -> ['text/html', 'application/json'] + +negotiator.mediaType(availableMediaTypes) +// -> 'text/html' +``` + +You can check a working example at `examples/accept.js`. + +#### Methods + +##### mediaType() + +Returns the most preferred media type from the client. + +##### mediaType(availableMediaType) + +Returns the most preferred media type from a list of available media types. + +##### mediaTypes() + +Returns an array of preferred media types ordered by the client preference. + +##### mediaTypes(availableMediaTypes) + +Returns an array of preferred media types ordered by priority from a list of +available media types. + +### Accept-Language Negotiation + +```js +negotiator = new Negotiator(request) + +availableLanguages = ['en', 'es', 'fr'] + +// Let's say Accept-Language header is 'en;q=0.8, es, pt' + +negotiator.languages() +// -> ['es', 'pt', 'en'] + +negotiator.languages(availableLanguages) +// -> ['es', 'en'] + +language = negotiator.language(availableLanguages) +// -> 'es' +``` + +You can check a working example at `examples/language.js`. + +#### Methods + +##### language() + +Returns the most preferred language from the client. + +##### language(availableLanguages) + +Returns the most preferred language from a list of available languages. + +##### languages() + +Returns an array of preferred languages ordered by the client preference. + +##### languages(availableLanguages) + +Returns an array of preferred languages ordered by priority from a list of +available languages. + +### Accept-Charset Negotiation + +```js +availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5'] + +negotiator = new Negotiator(request) + +// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2' + +negotiator.charsets() +// -> ['utf-8', 'iso-8859-1', 'utf-7'] + +negotiator.charsets(availableCharsets) +// -> ['utf-8', 'iso-8859-1'] + +negotiator.charset(availableCharsets) +// -> 'utf-8' +``` + +You can check a working example at `examples/charset.js`. + +#### Methods + +##### charset() + +Returns the most preferred charset from the client. + +##### charset(availableCharsets) + +Returns the most preferred charset from a list of available charsets. + +##### charsets() + +Returns an array of preferred charsets ordered by the client preference. + +##### charsets(availableCharsets) + +Returns an array of preferred charsets ordered by priority from a list of +available charsets. + +### Accept-Encoding Negotiation + +```js +availableEncodings = ['identity', 'gzip'] + +negotiator = new Negotiator(request) + +// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5' + +negotiator.encodings() +// -> ['gzip', 'identity', 'compress'] + +negotiator.encodings(availableEncodings) +// -> ['gzip', 'identity'] + +negotiator.encoding(availableEncodings) +// -> 'gzip' +``` + +You can check a working example at `examples/encoding.js`. + +#### Methods + +##### encoding() + +Returns the most preferred encoding from the client. + +##### encoding(availableEncodings) + +Returns the most preferred encoding from a list of available encodings. + +##### encodings() + +Returns an array of preferred encodings ordered by the client preference. + +##### encodings(availableEncodings) + +Returns an array of preferred encodings ordered by priority from a list of +available encodings. + +## See Also + +The [accepts](https://npmjs.org/package/accepts#readme) module builds on +this module and provides an alternative interface, mime type validation, +and more. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/negotiator.svg +[npm-url]: https://npmjs.org/package/negotiator +[node-version-image]: https://img.shields.io/node/v/negotiator.svg +[node-version-url]: https://nodejs.org/en/download/ +[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master +[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg +[downloads-url]: https://npmjs.org/package/negotiator +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/negotiator/ci/master?label=ci +[github-actions-ci-url]: https://github.com/jshttp/negotiator/actions/workflows/ci.yml diff --git a/node_modules/negotiator/index.js b/node_modules/negotiator/index.js new file mode 100644 index 0000000..4788264 --- /dev/null +++ b/node_modules/negotiator/index.js @@ -0,0 +1,82 @@ +/*! + * negotiator + * Copyright(c) 2012 Federico Romero + * Copyright(c) 2012-2014 Isaac Z. Schlueter + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +var preferredCharsets = require('./lib/charset') +var preferredEncodings = require('./lib/encoding') +var preferredLanguages = require('./lib/language') +var preferredMediaTypes = require('./lib/mediaType') + +/** + * Module exports. + * @public + */ + +module.exports = Negotiator; +module.exports.Negotiator = Negotiator; + +/** + * Create a Negotiator instance from a request. + * @param {object} request + * @public + */ + +function Negotiator(request) { + if (!(this instanceof Negotiator)) { + return new Negotiator(request); + } + + this.request = request; +} + +Negotiator.prototype.charset = function charset(available) { + var set = this.charsets(available); + return set && set[0]; +}; + +Negotiator.prototype.charsets = function charsets(available) { + return preferredCharsets(this.request.headers['accept-charset'], available); +}; + +Negotiator.prototype.encoding = function encoding(available) { + var set = this.encodings(available); + return set && set[0]; +}; + +Negotiator.prototype.encodings = function encodings(available) { + return preferredEncodings(this.request.headers['accept-encoding'], available); +}; + +Negotiator.prototype.language = function language(available) { + var set = this.languages(available); + return set && set[0]; +}; + +Negotiator.prototype.languages = function languages(available) { + return preferredLanguages(this.request.headers['accept-language'], available); +}; + +Negotiator.prototype.mediaType = function mediaType(available) { + var set = this.mediaTypes(available); + return set && set[0]; +}; + +Negotiator.prototype.mediaTypes = function mediaTypes(available) { + return preferredMediaTypes(this.request.headers.accept, available); +}; + +// Backwards compatibility +Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; +Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; +Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; +Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; +Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; +Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; +Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; +Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; diff --git a/node_modules/negotiator/lib/charset.js b/node_modules/negotiator/lib/charset.js new file mode 100644 index 0000000..cdd0148 --- /dev/null +++ b/node_modules/negotiator/lib/charset.js @@ -0,0 +1,169 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredCharsets; +module.exports.preferredCharsets = preferredCharsets; + +/** + * Module variables. + * @private + */ + +var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + +/** + * Parse the Accept-Charset header. + * @private + */ + +function parseAcceptCharset(accept) { + var accepts = accept.split(','); + + for (var i = 0, j = 0; i < accepts.length; i++) { + var charset = parseCharset(accepts[i].trim(), i); + + if (charset) { + accepts[j++] = charset; + } + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse a charset from the Accept-Charset header. + * @private + */ + +function parseCharset(str, i) { + var match = simpleCharsetRegExp.exec(str); + if (!match) return null; + + var charset = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(';') + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split('='); + if (p[0] === 'q') { + q = parseFloat(p[1]); + break; + } + } + } + + return { + charset: charset, + q: q, + i: i + }; +} + +/** + * Get the priority of a charset. + * @private + */ + +function getCharsetPriority(charset, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(charset, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the charset. + * @private + */ + +function specify(charset, spec, index) { + var s = 0; + if(spec.charset.toLowerCase() === charset.toLowerCase()){ + s |= 1; + } else if (spec.charset !== '*' ) { + return null + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s + } +} + +/** + * Get the preferred charsets from an Accept-Charset header. + * @public + */ + +function preferredCharsets(accept, provided) { + // RFC 2616 sec 14.2: no header = * + var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || ''); + + if (!provided) { + // sorted list of all charsets + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullCharset); + } + + var priorities = provided.map(function getPriority(type, index) { + return getCharsetPriority(type, accepts, index); + }); + + // sorted list of accepted charsets + return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full charset string. + * @private + */ + +function getFullCharset(spec) { + return spec.charset; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} diff --git a/node_modules/negotiator/lib/encoding.js b/node_modules/negotiator/lib/encoding.js new file mode 100644 index 0000000..8432cd7 --- /dev/null +++ b/node_modules/negotiator/lib/encoding.js @@ -0,0 +1,184 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredEncodings; +module.exports.preferredEncodings = preferredEncodings; + +/** + * Module variables. + * @private + */ + +var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + +/** + * Parse the Accept-Encoding header. + * @private + */ + +function parseAcceptEncoding(accept) { + var accepts = accept.split(','); + var hasIdentity = false; + var minQuality = 1; + + for (var i = 0, j = 0; i < accepts.length; i++) { + var encoding = parseEncoding(accepts[i].trim(), i); + + if (encoding) { + accepts[j++] = encoding; + hasIdentity = hasIdentity || specify('identity', encoding); + minQuality = Math.min(minQuality, encoding.q || 1); + } + } + + if (!hasIdentity) { + /* + * If identity doesn't explicitly appear in the accept-encoding header, + * it's added to the list of acceptable encoding with the lowest q + */ + accepts[j++] = { + encoding: 'identity', + q: minQuality, + i: i + }; + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse an encoding from the Accept-Encoding header. + * @private + */ + +function parseEncoding(str, i) { + var match = simpleEncodingRegExp.exec(str); + if (!match) return null; + + var encoding = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(';'); + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split('='); + if (p[0] === 'q') { + q = parseFloat(p[1]); + break; + } + } + } + + return { + encoding: encoding, + q: q, + i: i + }; +} + +/** + * Get the priority of an encoding. + * @private + */ + +function getEncodingPriority(encoding, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(encoding, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the encoding. + * @private + */ + +function specify(encoding, spec, index) { + var s = 0; + if(spec.encoding.toLowerCase() === encoding.toLowerCase()){ + s |= 1; + } else if (spec.encoding !== '*' ) { + return null + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s + } +}; + +/** + * Get the preferred encodings from an Accept-Encoding header. + * @public + */ + +function preferredEncodings(accept, provided) { + var accepts = parseAcceptEncoding(accept || ''); + + if (!provided) { + // sorted list of all encodings + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullEncoding); + } + + var priorities = provided.map(function getPriority(type, index) { + return getEncodingPriority(type, accepts, index); + }); + + // sorted list of accepted encodings + return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full encoding string. + * @private + */ + +function getFullEncoding(spec) { + return spec.encoding; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} diff --git a/node_modules/negotiator/lib/language.js b/node_modules/negotiator/lib/language.js new file mode 100644 index 0000000..a231672 --- /dev/null +++ b/node_modules/negotiator/lib/language.js @@ -0,0 +1,179 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredLanguages; +module.exports.preferredLanguages = preferredLanguages; + +/** + * Module variables. + * @private + */ + +var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/; + +/** + * Parse the Accept-Language header. + * @private + */ + +function parseAcceptLanguage(accept) { + var accepts = accept.split(','); + + for (var i = 0, j = 0; i < accepts.length; i++) { + var language = parseLanguage(accepts[i].trim(), i); + + if (language) { + accepts[j++] = language; + } + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse a language from the Accept-Language header. + * @private + */ + +function parseLanguage(str, i) { + var match = simpleLanguageRegExp.exec(str); + if (!match) return null; + + var prefix = match[1] + var suffix = match[2] + var full = prefix + + if (suffix) full += "-" + suffix; + + var q = 1; + if (match[3]) { + var params = match[3].split(';') + for (var j = 0; j < params.length; j++) { + var p = params[j].split('='); + if (p[0] === 'q') q = parseFloat(p[1]); + } + } + + return { + prefix: prefix, + suffix: suffix, + q: q, + i: i, + full: full + }; +} + +/** + * Get the priority of a language. + * @private + */ + +function getLanguagePriority(language, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(language, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the language. + * @private + */ + +function specify(language, spec, index) { + var p = parseLanguage(language) + if (!p) return null; + var s = 0; + if(spec.full.toLowerCase() === p.full.toLowerCase()){ + s |= 4; + } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { + s |= 2; + } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { + s |= 1; + } else if (spec.full !== '*' ) { + return null + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s + } +}; + +/** + * Get the preferred languages from an Accept-Language header. + * @public + */ + +function preferredLanguages(accept, provided) { + // RFC 2616 sec 14.4: no header = * + var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || ''); + + if (!provided) { + // sorted list of all languages + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullLanguage); + } + + var priorities = provided.map(function getPriority(type, index) { + return getLanguagePriority(type, accepts, index); + }); + + // sorted list of accepted languages + return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full language string. + * @private + */ + +function getFullLanguage(spec) { + return spec.full; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} diff --git a/node_modules/negotiator/lib/mediaType.js b/node_modules/negotiator/lib/mediaType.js new file mode 100644 index 0000000..67309dd --- /dev/null +++ b/node_modules/negotiator/lib/mediaType.js @@ -0,0 +1,294 @@ +/** + * negotiator + * Copyright(c) 2012 Isaac Z. Schlueter + * Copyright(c) 2014 Federico Romero + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = preferredMediaTypes; +module.exports.preferredMediaTypes = preferredMediaTypes; + +/** + * Module variables. + * @private + */ + +var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/; + +/** + * Parse the Accept header. + * @private + */ + +function parseAccept(accept) { + var accepts = splitMediaTypes(accept); + + for (var i = 0, j = 0; i < accepts.length; i++) { + var mediaType = parseMediaType(accepts[i].trim(), i); + + if (mediaType) { + accepts[j++] = mediaType; + } + } + + // trim accepts + accepts.length = j; + + return accepts; +} + +/** + * Parse a media type from the Accept header. + * @private + */ + +function parseMediaType(str, i) { + var match = simpleMediaTypeRegExp.exec(str); + if (!match) return null; + + var params = Object.create(null); + var q = 1; + var subtype = match[2]; + var type = match[1]; + + if (match[3]) { + var kvps = splitParameters(match[3]).map(splitKeyValuePair); + + for (var j = 0; j < kvps.length; j++) { + var pair = kvps[j]; + var key = pair[0].toLowerCase(); + var val = pair[1]; + + // get the value, unwrapping quotes + var value = val && val[0] === '"' && val[val.length - 1] === '"' + ? val.substr(1, val.length - 2) + : val; + + if (key === 'q') { + q = parseFloat(value); + break; + } + + // store parameter + params[key] = value; + } + } + + return { + type: type, + subtype: subtype, + params: params, + q: q, + i: i + }; +} + +/** + * Get the priority of a media type. + * @private + */ + +function getMediaTypePriority(type, accepted, index) { + var priority = {o: -1, q: 0, s: 0}; + + for (var i = 0; i < accepted.length; i++) { + var spec = specify(type, accepted[i], index); + + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + + return priority; +} + +/** + * Get the specificity of the media type. + * @private + */ + +function specify(type, spec, index) { + var p = parseMediaType(type); + var s = 0; + + if (!p) { + return null; + } + + if(spec.type.toLowerCase() == p.type.toLowerCase()) { + s |= 4 + } else if(spec.type != '*') { + return null; + } + + if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { + s |= 2 + } else if(spec.subtype != '*') { + return null; + } + + var keys = Object.keys(spec.params); + if (keys.length > 0) { + if (keys.every(function (k) { + return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase(); + })) { + s |= 1 + } else { + return null + } + } + + return { + i: index, + o: spec.i, + q: spec.q, + s: s, + } +} + +/** + * Get the preferred media types from an Accept header. + * @public + */ + +function preferredMediaTypes(accept, provided) { + // RFC 2616 sec 14.2: no header = */* + var accepts = parseAccept(accept === undefined ? '*/*' : accept || ''); + + if (!provided) { + // sorted list of all types + return accepts + .filter(isQuality) + .sort(compareSpecs) + .map(getFullType); + } + + var priorities = provided.map(function getPriority(type, index) { + return getMediaTypePriority(type, accepts, index); + }); + + // sorted list of accepted types + return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { + return provided[priorities.indexOf(priority)]; + }); +} + +/** + * Compare two specs. + * @private + */ + +function compareSpecs(a, b) { + return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; +} + +/** + * Get full type string. + * @private + */ + +function getFullType(spec) { + return spec.type + '/' + spec.subtype; +} + +/** + * Check if a spec has any quality. + * @private + */ + +function isQuality(spec) { + return spec.q > 0; +} + +/** + * Count the number of quotes in a string. + * @private + */ + +function quoteCount(string) { + var count = 0; + var index = 0; + + while ((index = string.indexOf('"', index)) !== -1) { + count++; + index++; + } + + return count; +} + +/** + * Split a key value pair. + * @private + */ + +function splitKeyValuePair(str) { + var index = str.indexOf('='); + var key; + var val; + + if (index === -1) { + key = str; + } else { + key = str.substr(0, index); + val = str.substr(index + 1); + } + + return [key, val]; +} + +/** + * Split an Accept header into media types. + * @private + */ + +function splitMediaTypes(accept) { + var accepts = accept.split(','); + + for (var i = 1, j = 0; i < accepts.length; i++) { + if (quoteCount(accepts[j]) % 2 == 0) { + accepts[++j] = accepts[i]; + } else { + accepts[j] += ',' + accepts[i]; + } + } + + // trim accepts + accepts.length = j + 1; + + return accepts; +} + +/** + * Split a string of parameters. + * @private + */ + +function splitParameters(str) { + var parameters = str.split(';'); + + for (var i = 1, j = 0; i < parameters.length; i++) { + if (quoteCount(parameters[j]) % 2 == 0) { + parameters[++j] = parameters[i]; + } else { + parameters[j] += ';' + parameters[i]; + } + } + + // trim parameters + parameters.length = j + 1; + + for (var i = 0; i < parameters.length; i++) { + parameters[i] = parameters[i].trim(); + } + + return parameters; +} diff --git a/node_modules/negotiator/package.json b/node_modules/negotiator/package.json new file mode 100644 index 0000000..297635f --- /dev/null +++ b/node_modules/negotiator/package.json @@ -0,0 +1,42 @@ +{ + "name": "negotiator", + "description": "HTTP content negotiation", + "version": "0.6.3", + "contributors": [ + "Douglas Christopher Wilson ", + "Federico Romero ", + "Isaac Z. Schlueter (http://blog.izs.me/)" + ], + "license": "MIT", + "keywords": [ + "http", + "content negotiation", + "accept", + "accept-language", + "accept-encoding", + "accept-charset" + ], + "repository": "jshttp/negotiator", + "devDependencies": { + "eslint": "7.32.0", + "eslint-plugin-markdown": "2.2.1", + "mocha": "9.1.3", + "nyc": "15.1.0" + }, + "files": [ + "lib/", + "HISTORY.md", + "LICENSE", + "index.js", + "README.md" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/nice-try/CHANGELOG.md b/node_modules/nice-try/CHANGELOG.md new file mode 100644 index 0000000..9e6baf2 --- /dev/null +++ b/node_modules/nice-try/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.0.5] - 2018-08-25 + +### Changed + +- Removed `prepublish` script from `package.json` + +## [1.0.4] - 2017-08-08 + +### New + +- Added a changelog + +### Changed + +- Ignore `yarn.lock` and `package-lock.json` files \ No newline at end of file diff --git a/node_modules/nice-try/LICENSE b/node_modules/nice-try/LICENSE new file mode 100644 index 0000000..681c8f5 --- /dev/null +++ b/node_modules/nice-try/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Tobias Reich + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/nice-try/README.md b/node_modules/nice-try/README.md new file mode 100644 index 0000000..5b83b78 --- /dev/null +++ b/node_modules/nice-try/README.md @@ -0,0 +1,32 @@ +# nice-try + +[![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/) + +A function that tries to execute a function and discards any error that occurs. + +## Install + +``` +npm install nice-try +``` + +## Usage + +```js +const niceTry = require('nice-try') + +niceTry(() => JSON.parse('true')) // true +niceTry(() => JSON.parse('truee')) // undefined +niceTry() // undefined +niceTry(true) // undefined +``` + +## API + +### Parameters + +- `fn` `{Function}` Function that might or might not throw an error. + +### Returns + +- `{?*}` Return-value of the function when no error occurred. \ No newline at end of file diff --git a/node_modules/nice-try/package.json b/node_modules/nice-try/package.json new file mode 100644 index 0000000..d3d8887 --- /dev/null +++ b/node_modules/nice-try/package.json @@ -0,0 +1,33 @@ +{ + "name": "nice-try", + "version": "1.0.5", + "authors": [ + "Tobias Reich " + ], + "description": "Tries to execute a function and discards any error that occurs", + "main": "src/index.js", + "keywords": [ + "try", + "catch", + "error" + ], + "license": "MIT", + "homepage": "https://github.com/electerious/nice-try", + "repository": { + "type": "git", + "url": "https://github.com/electerious/nice-try.git" + }, + "files": [ + "src" + ], + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "nyc node_modules/mocha/bin/_mocha" + }, + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.0", + "nyc": "^12.0.1", + "mocha": "^5.1.1" + } +} diff --git a/node_modules/nice-try/src/index.js b/node_modules/nice-try/src/index.js new file mode 100644 index 0000000..837506f --- /dev/null +++ b/node_modules/nice-try/src/index.js @@ -0,0 +1,12 @@ +'use strict' + +/** + * Tries to execute a function and discards any error that occurs. + * @param {Function} fn - Function that might or might not throw an error. + * @returns {?*} Return-value of the function when no error occurred. + */ +module.exports = function(fn) { + + try { return fn() } catch (e) {} + +} \ No newline at end of file diff --git a/node_modules/normalize-package-data/AUTHORS b/node_modules/normalize-package-data/AUTHORS new file mode 100644 index 0000000..66282ba --- /dev/null +++ b/node_modules/normalize-package-data/AUTHORS @@ -0,0 +1,4 @@ +# Names sorted by how much code was originally theirs. +Isaac Z. Schlueter +Meryn Stol +Robert Kowalski diff --git a/node_modules/normalize-package-data/LICENSE b/node_modules/normalize-package-data/LICENSE new file mode 100644 index 0000000..6ed662c --- /dev/null +++ b/node_modules/normalize-package-data/LICENSE @@ -0,0 +1,30 @@ +This package contains code originally written by Isaac Z. Schlueter. +Used with permission. + +Copyright (c) Meryn Stol ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md new file mode 100644 index 0000000..d2bd7bc --- /dev/null +++ b/node_modules/normalize-package-data/README.md @@ -0,0 +1,106 @@ +# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) + +normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. + +normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. + +## Installation + +``` +npm install normalize-package-data +``` + +## Usage + +Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData) +// packageData is now normalized +``` + +#### Strict mode + +You may activate strict validation by passing true as the second argument. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +normalizeData(packageData, true) +// packageData is now normalized +``` + +If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace. + +#### Warnings + +Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data. + +```javascript +normalizeData = require('normalize-package-data') +packageData = require("./package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, warnFn) +// packageData is now normalized. Any number of warnings may have been logged. +``` + +You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third. + +When `private` field is set to `true`, warnings will be suppressed. + +### Potential exceptions + +If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback. + +## What normalization (currently) entails + +* The value of `name` field gets trimmed (unless in strict mode). +* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver). +* If `name` and/or `version` fields are missing, they are set to empty strings. +* If `files` field is not an array, it will be removed. +* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value. +* If `man` field is a string, it will become an array with the original string as its sole member. +* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`. +* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties. +* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. +* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. +* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. +* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved. +* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. +* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git +* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. +* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. +* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. +* If `homepage` field is not a string, it will be removed. +* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. +* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. + +### Rules for name field + +If `name` field is given, the value of the name field must be a string. The string may not: + +* start with a period. +* contain the following characters: `/@\s+%` +* contain any characters that would need to be encoded for use in urls. +* resemble the word `node_modules` or `favicon.ico` (case doesn't matter). + +### Rules for version field + +If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). + +### Rules for license field + +The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license). + +## Credits + +This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. + +## License + +normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). +Copyright (c) 2013 Meryn Stol diff --git a/node_modules/normalize-package-data/lib/extract_description.js b/node_modules/normalize-package-data/lib/extract_description.js new file mode 100644 index 0000000..83f10aa --- /dev/null +++ b/node_modules/normalize-package-data/lib/extract_description.js @@ -0,0 +1,14 @@ +module.exports = extractDescription + +// Extracts description from contents of a readme file in markdown format +function extractDescription (d) { + if (!d) return; + if (d === "ERROR: No README data found!") return; + // the first block of text before the first heading + // that isn't the first line heading + d = d.trim().split('\n') + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); + var l = d.length + for (var e = s + 1; e < l && d[e].trim(); e ++); + return d.slice(s, e).join(' ').trim() +} diff --git a/node_modules/normalize-package-data/lib/fixer.js b/node_modules/normalize-package-data/lib/fixer.js new file mode 100644 index 0000000..27682e9 --- /dev/null +++ b/node_modules/normalize-package-data/lib/fixer.js @@ -0,0 +1,418 @@ +var semver = require("semver") +var validateLicense = require('validate-npm-package-license'); +var hostedGitInfo = require("hosted-git-info") +var isBuiltinModule = require("resolve").isCore +var depTypes = ["dependencies","devDependencies","optionalDependencies"] +var extractDescription = require("./extract_description") +var url = require("url") +var typos = require("./typos.json") + +var fixer = module.exports = { + // default warning function + warn: function() {}, + + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0] + } + if (!data.repository) return this.warn("missingRepository") + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + } + } + var r = data.repository.url || "" + if (r) { + var hosted = hostedGitInfo.fromUrl(r) + if (hosted) { + r = data.repository.url + = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() + } + } + + if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r) + } + } + +, fixTypos: function(data) { + Object.keys(typos.topLevel).forEach(function (d) { + if (data.hasOwnProperty(d)) { + this.warn("typo", d, typos.topLevel[d]) + } + }, this) + } + +, fixScriptsField: function(data) { + if (!data.scripts) return + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts") + delete data.scripts + return + } + Object.keys(data.scripts).forEach(function (k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript") + delete data.scripts[k] + } else if (typos.script[k] && !data.scripts[typos.script[k]]) { + this.warn("typo", k, typos.script[k], "scripts") + } + }, this) + } + +, fixFilesField: function(data) { + var files = data.files + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles") + delete data.files + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file) + return false + } else { + return true + } + }, this) + } + } + +, fixBinField: function(data) { + if (!data.bin) return; + if (typeof data.bin === "string") { + var b = {} + var match + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin + } else { + b[data.name] = data.bin + } + data.bin = b + } + } + +, fixManField: function(data) { + if (!data.man) return; + if (typeof data.man === "string") { + data.man = [ data.man ] + } + } +, fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies" + var bd = "bundleDependencies" + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies") + delete data[bd] + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd) { + if (!bd || typeof bd !== 'string') { + this.warn("nonStringBundleDependency", bd) + return false + } else { + if (!data.dependencies) { + data.dependencies = {} + } + if (!data.dependencies.hasOwnProperty(bd)) { + this.warn("nonDependencyBundleDependency", bd) + data.dependencies[bd] = "*" + } + return true + } + }, this) + } + } + +, fixDependencies: function(data, strict) { + var loose = !strict + objectifyDeps(data, this.warn) + addOptionalDepsToDeps(data, this.warn) + this.fixBundleDependenciesField(data) + + ;['dependencies','devDependencies'].forEach(function(deps) { + if (!(deps in data)) return + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps) + delete data[deps] + return + } + Object.keys(data[deps]).forEach(function (d) { + var r = data[deps][d] + if (typeof r !== 'string') { + this.warn("nonStringDependency", d, JSON.stringify(r)) + delete data[deps][d] + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]) + if (hosted) data[deps][d] = hosted.toString() + }, this) + }, this) + } + +, fixModulesField: function (data) { + if (data.modules) { + this.warn("deprecatedModules") + delete data.modules + } + } + +, fixKeywordsField: function (data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/) + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords + this.warn("nonArrayKeywords") + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false + } else { + return true + } + }, this) + } + } + +, fixVersionField: function(data, strict) { + // allow "loose" semver 1.0 versions in non-strict mode + // enforce strict semver 2.0 compliance in strict mode + var loose = !strict + if (!data.version) { + data.version = "" + return true + } + if (!semver.valid(data.version, loose)) { + throw new Error('Invalid version: "'+ data.version + '"') + } + data.version = semver.clean(data.version, loose) + return true + } + +, fixPeople: function(data) { + modifyPeople(data, unParsePerson) + modifyPeople(data, parsePerson) + } + +, fixNameField: function(data, options) { + if (typeof options === "boolean") options = {strict: options} + else if (typeof options === "undefined") options = {} + var strict = options.strict + if (!data.name && !strict) { + data.name = "" + return + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string.") + } + if (!strict) + data.name = data.name.trim() + ensureValidName(data.name, strict, options.allowLegacyCase) + if (isBuiltinModule(data.name)) + this.warn("conflictingName", data.name) + } + + +, fixDescriptionField: function (data) { + if (data.description && typeof data.description !== 'string') { + this.warn("nonStringDescription") + delete data.description + } + if (data.readme && !data.description) + data.description = extractDescription(data.readme) + if(data.description === undefined) delete data.description; + if (!data.description) this.warn("missingDescription") + } + +, fixReadmeField: function (data) { + if (!data.readme) { + this.warn("missingReadme") + data.readme = "ERROR: No README data found!" + } + } + +, fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if(hosted && hosted.bugs()) { + data.bugs = {url: hosted.bugs()} + } + } + else if(data.bugs) { + var emailRe = /^.+@.*\..+$/ + if(typeof data.bugs == "string") { + if(emailRe.test(data.bugs)) + data.bugs = {email:data.bugs} + else if(url.parse(data.bugs).protocol) + data.bugs = {url: data.bugs} + else + this.warn("nonEmailUrlBugsString") + } + else { + bugsTypos(data.bugs, this.warn) + var oldBugs = data.bugs + data.bugs = {} + if(oldBugs.url) { + if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) + data.bugs.url = oldBugs.url + else + this.warn("nonUrlBugsUrlField") + } + if(oldBugs.email) { + if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) + data.bugs.email = oldBugs.email + else + this.warn("nonEmailBugsEmailField") + } + } + if(!data.bugs.email && !data.bugs.url) { + delete data.bugs + this.warn("emptyNormalizedBugs") + } + } + } + +, fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted && hosted.docs()) data.homepage = hosted.docs() + } + if (!data.homepage) return + + if(typeof data.homepage !== "string") { + this.warn("nonUrlHomepage") + return delete data.homepage + } + if(!url.parse(data.homepage).protocol) { + data.homepage = "http://" + data.homepage + } + } + +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else{ + if ( + typeof(data.license) !== 'string' || + data.license.length < 1 || + data.license.trim() === '' + ) { + this.warn("invalidLicense") + } else { + if (!validateLicense(data.license).validForNewPackages) + this.warn("invalidLicense") + } + } + } +} + +function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== '@') return false + + var rest = spec.slice(1).split('/') + if (rest.length !== 2) return false + + return rest[0] && rest[1] && + rest[0] === encodeURIComponent(rest[0]) && + rest[1] === encodeURIComponent(rest[1]) +} + +function isCorrectlyEncodedName(spec) { + return !spec.match(/[\/@\s\+%:]/) && + spec === encodeURIComponent(spec) +} + +function ensureValidName (name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || + !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || + (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || + name.toLowerCase() === "node_modules" || + name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)) + } +} + +function modifyPeople (data, fn) { + if (data.author) data.author = fn(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(fn) + }) + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || "" + var u = person.url || person.web + var url = u ? (" ("+u+")") : "" + var e = person.email || person.mail + var email = e ? (" <"+e+">") : "" + return name+email+url +} + +function parsePerson (person) { + if (typeof person !== "string") return person + var name = person.match(/^([^\(<]+)/) + var url = person.match(/\(([^\)]+)\)/) + var email = person.match(/<([^>]+)>/) + var obj = {} + if (name && name[0].trim()) obj.name = name[0].trim() + if (email) obj.email = email[1]; + if (url) obj.url = url[1]; + return obj +} + +function addOptionalDepsToDeps (data, warn) { + var o = data.optionalDependencies + if (!o) return; + var d = data.dependencies || {} + Object.keys(o).forEach(function (k) { + d[k] = o[k] + }) + data.dependencies = d +} + +function depObjectify (deps, type, warn) { + if (!deps) return {} + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/) + } + if (!Array.isArray(deps)) return deps + warn("deprecatedArrayDependencies", type) + var o = {} + deps.filter(function (d) { + return typeof d === "string" + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/) + var dn = d.shift() + var dv = d.join("") + dv = dv.trim() + dv = dv.replace(/^@/, "") + o[dn] = dv + }) + return o +} + +function objectifyDeps (data, warn) { + depTypes.forEach(function (type) { + if (!data[type]) return; + data[type] = depObjectify(data[type], type, warn) + }) +} + +function bugsTypos(bugs, warn) { + if (!bugs) return + Object.keys(bugs).forEach(function (k) { + if (typos.bugs[k]) { + warn("typo", k, typos.bugs[k], "bugs") + bugs[typos.bugs[k]] = bugs[k] + delete bugs[k] + } + }) +} diff --git a/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/normalize-package-data/lib/make_warning.js new file mode 100644 index 0000000..4ac74ad --- /dev/null +++ b/node_modules/normalize-package-data/lib/make_warning.js @@ -0,0 +1,23 @@ +var util = require("util") +var messages = require("./warning_messages.json") + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + var warningName = args.shift() + if (warningName == "typo") { + return makeTypoWarning.apply(null,args) + } + else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" + args.unshift(msgTemplate) + return util.format.apply(null, args) + } +} + +function makeTypoWarning (providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']" + probableName = field + "['" + probableName + "']" + } + return util.format(messages.typo, providedName, probableName) +} diff --git a/node_modules/normalize-package-data/lib/normalize.js b/node_modules/normalize-package-data/lib/normalize.js new file mode 100644 index 0000000..bd1bfef --- /dev/null +++ b/node_modules/normalize-package-data/lib/normalize.js @@ -0,0 +1,39 @@ +module.exports = normalize + +var fixer = require("./fixer") +normalize.fixer = fixer + +var makeWarning = require("./make_warning") + +var fieldsToFix = ['name','version','description','repository','modules','scripts' + ,'files','bin','man','bugs','keywords','readme','homepage','license'] +var otherThingsToFix = ['dependencies','people', 'typos'] + +var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field" +}) +// two ways to do this in CoffeeScript on only one line, sub-70 chars: +// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" +// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) +thingsToFix = thingsToFix.concat(otherThingsToFix) + +function normalize (data, warn, strict) { + if(warn === true) warn = null, strict = true + if(!strict) strict = false + if(!warn || data.private) warn = function(msg) { /* noop */ } + + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && + !data.scripts.preinstall) { + data.gypfile = true + } + fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } + thingsToFix.forEach(function(thingName) { + fixer["fix" + ucFirst(thingName)](data, strict) + }) + data._id = data.name + "@" + data.version +} + +function ucFirst (string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} diff --git a/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/normalize-package-data/lib/safe_format.js new file mode 100644 index 0000000..b07f100 --- /dev/null +++ b/node_modules/normalize-package-data/lib/safe_format.js @@ -0,0 +1,9 @@ +var util = require('util') + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + args.forEach(function(arg) { + if (!arg) throw new TypeError('Bad arguments.') + }) + return util.format.apply(null, arguments) +} diff --git a/node_modules/normalize-package-data/lib/typos.json b/node_modules/normalize-package-data/lib/typos.json new file mode 100644 index 0000000..7f9dd28 --- /dev/null +++ b/node_modules/normalize-package-data/lib/typos.json @@ -0,0 +1,25 @@ +{ + "topLevel": { + "dependancies": "dependencies" + ,"dependecies": "dependencies" + ,"depdenencies": "dependencies" + ,"devEependencies": "devDependencies" + ,"depends": "dependencies" + ,"dev-dependencies": "devDependencies" + ,"devDependences": "devDependencies" + ,"devDepenencies": "devDependencies" + ,"devdependencies": "devDependencies" + ,"repostitory": "repository" + ,"repo": "repository" + ,"prefereGlobal": "preferGlobal" + ,"hompage": "homepage" + ,"hampage": "homepage" + ,"autohr": "author" + ,"autor": "author" + ,"contributers": "contributors" + ,"publicationConfig": "publishConfig" + ,"script": "scripts" + }, + "bugs": { "web": "url", "name": "url" }, + "script": { "server": "start", "tests": "test" } +} diff --git a/node_modules/normalize-package-data/lib/warning_messages.json b/node_modules/normalize-package-data/lib/warning_messages.json new file mode 100644 index 0000000..4890f50 --- /dev/null +++ b/node_modules/normalize-package-data/lib/warning_messages.json @@ -0,0 +1,30 @@ +{ + "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field" + ,"missingRepository": "No repository field." + ,"brokenGitUrl": "Probably broken git url: %s" + ,"nonObjectScripts": "scripts must be an object" + ,"nonStringScript": "script values must be string commands" + ,"nonArrayFiles": "Invalid 'files' member" + ,"invalidFilename": "Invalid filename in 'files' list: %s" + ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names" + ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s" + ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s" + ,"nonObjectDependencies": "%s field must be an object" + ,"nonStringDependency": "Invalid dependency: %s %s" + ,"deprecatedArrayDependencies": "specifying %s as array is deprecated" + ,"deprecatedModules": "modules field is deprecated" + ,"nonArrayKeywords": "keywords should be an array of strings" + ,"nonStringKeyword": "keywords should be an array of strings" + ,"conflictingName": "%s is also the name of a node core module." + ,"nonStringDescription": "'description' field should be a string" + ,"missingDescription": "No description" + ,"missingReadme": "No README data" + ,"missingLicense": "No license field." + ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}" + ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted." + ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted." + ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted." + ,"nonUrlHomepage": "homepage field must be a string url. Deleted." + ,"invalidLicense": "license should be a valid SPDX license expression" + ,"typo": "%s should probably be %s." +} diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json new file mode 100644 index 0000000..dea34bb --- /dev/null +++ b/node_modules/normalize-package-data/package.json @@ -0,0 +1,31 @@ +{ + "name": "normalize-package-data", + "version": "2.5.0", + "author": "Meryn Stol ", + "description": "Normalizes data that can be found in package.json files.", + "license": "BSD-2-Clause", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "main": "lib/normalize.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "devDependencies": { + "async": "^2.6.1", + "tap": "^12.4.0", + "underscore": "^1.8.3" + }, + "files": [ + "lib/*.js", + "lib/*.json", + "AUTHORS" + ] +} diff --git a/node_modules/normalize-path/LICENSE b/node_modules/normalize-path/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/normalize-path/README.md b/node_modules/normalize-path/README.md new file mode 100644 index 0000000..726d4d6 --- /dev/null +++ b/node_modules/normalize-path/README.md @@ -0,0 +1,127 @@ +# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save normalize-path +``` + +## Usage + +```js +const normalize = require('normalize-path'); + +console.log(normalize('\\foo\\bar\\baz\\')); +//=> '/foo/bar/baz' +``` + +**win32 namespaces** + +```js +console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt')); +//=> '//?/UNC/Server01/user/docs/Letter.txt' + +console.log(normalize('\\\\.\\CdRomX')); +//=> '//./CdRomX' +``` + +**Consecutive slashes** + +Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash. + +```js +console.log(normalize('.//foo//bar///////baz/')); +//=> './foo/bar/baz' +``` + +### Trailing slashes + +By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_: + +```js +console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/' +console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/' +``` + +## Release history + +### v3.0 + +No breaking changes in this release. + +* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library. +* a minor optimization was made to simplify how the trailing separator was handled + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +Other useful path-related libraries: + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 35 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [phated](https://github.com/phated) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._ \ No newline at end of file diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js new file mode 100644 index 0000000..6fac553 --- /dev/null +++ b/node_modules/normalize-path/index.js @@ -0,0 +1,35 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +module.exports = function(path, stripTrailing) { + if (typeof path !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path === '\\' || path === '/') return '/'; + + var len = path.length; + if (len <= 1) return path; + + // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + var prefix = ''; + if (len > 4 && path[3] === '\\') { + var ch = path[2]; + if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { + path = path.slice(2); + prefix = '//'; + } + } + + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + return prefix + segs.join('/'); +}; diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json new file mode 100644 index 0000000..ad61098 --- /dev/null +++ b/node_modules/normalize-path/package.json @@ -0,0 +1,77 @@ +{ + "name": "normalize-path", + "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", + "version": "3.0.0", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Blaine Bublitz (https://twitter.com/BlaineBublitz)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/normalize-path", + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "absolute", + "backslash", + "delimiter", + "file", + "file-path", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "relative", + "separator", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "description": "Other useful path-related libraries:", + "list": [ + "contains-path", + "is-absolute", + "is-relative", + "parse-filepath", + "path-ends-with", + "path-ends-with", + "unixify" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/npm-run-all/LICENSE b/node_modules/npm-run-all/LICENSE new file mode 100644 index 0000000..c39e694 --- /dev/null +++ b/node_modules/npm-run-all/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/npm-run-all/README.md b/node_modules/npm-run-all/README.md new file mode 100644 index 0000000..b80d787 --- /dev/null +++ b/node_modules/npm-run-all/README.md @@ -0,0 +1,91 @@ +| index | [npm-run-all] | [run-s] | [run-p] | [Node API] | +|-------|---------------|---------|---------|------------| + +# npm-run-all + +[![npm version](https://img.shields.io/npm/v/npm-run-all.svg)](https://www.npmjs.com/package/npm-run-all) +[![Downloads/month](https://img.shields.io/npm/dm/npm-run-all.svg)](http://www.npmtrends.com/npm-run-all) +[![Build Status](https://travis-ci.org/mysticatea/npm-run-all.svg?branch=master)](https://travis-ci.org/mysticatea/npm-run-all) +[![Build status](https://ci.appveyor.com/api/projects/status/v0owd44q1r7hceir/branch/master?svg=true)](https://ci.appveyor.com/project/mysticatea/npm-run-all/branch/master) +[![Coverage Status](https://codecov.io/gh/mysticatea/eslint-plugin-node/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/npm-run-all) +[![Dependency Status](https://david-dm.org/mysticatea/npm-run-all.svg)](https://david-dm.org/mysticatea/npm-run-all) + +A CLI tool to run multiple npm-scripts in parallel or sequential. + +## ⤴️ Motivation + +- **Simplify.** The official `npm run-script` command cannot run multiple scripts, so if we want to run multiple scripts, it's redundant a bit. Let's shorten it by glob-like patterns.
+ Before: `npm run clean && npm run build:css && npm run build:js && npm run build:html`
+ After: `npm-run-all clean build:*` +- **Cross platform.** We sometimes use `&` to run multiple command in parallel, but `cmd.exe` (`npm run-script` uses it by default) does not support the `&`. Half of Node.js users are using it on Windows, so the use of `&` might block contributions. `npm-run-all --parallel` works well on Windows as well. + +## 💿 Installation + +```bash +$ npm install npm-run-all --save-dev +# or +$ yarn add npm-run-all --dev +``` + +- It requires `Node@>=4`. + +## 📖 Usage + +### CLI Commands + +This `npm-run-all` package provides 3 CLI commands. + +- [npm-run-all] +- [run-s] +- [run-p] + +The main command is [npm-run-all]. +We can make complex plans with [npm-run-all] command. + +Both [run-s] and [run-p] are shorthand commands. +[run-s] is for sequential, [run-p] is for parallel. +We can make simple plans with those commands. + +#### Yarn Compatibility + +If a script is invoked with Yarn, `npm-run-all` will correctly use Yarn to execute the plan's child scripts. + +### Node API + +This `npm-run-all` package provides Node API. + +- [Node API] + +## 📰 Changelog + +- https://github.com/mysticatea/npm-run-all/releases + +## 🍻 Contributing + +Welcome♡ + +### Bug Reports or Feature Requests + +Please use GitHub Issues. + +### Correct Documents + +Please use GitHub Pull Requests. + +I'm not familiar with English, so I especially thank you for documents' corrections. + +### Implementing + +Please use GitHub Pull Requests. + +There are some npm-scripts to help developments. + +- **npm test** - Run tests and collect coverage. +- **npm run clean** - Delete temporary files. +- **npm run lint** - Run ESLint. +- **npm run watch** - Run tests (not collect coverage) on every file change. + +[npm-run-all]: docs/npm-run-all.md +[run-s]: docs/run-s.md +[run-p]: docs/run-p.md +[Node API]: docs/node-api.md diff --git a/node_modules/npm-run-all/bin/common/bootstrap.js b/node_modules/npm-run-all/bin/common/bootstrap.js new file mode 100644 index 0000000..e73b093 --- /dev/null +++ b/node_modules/npm-run-all/bin/common/bootstrap.js @@ -0,0 +1,51 @@ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ +/*eslint-disable no-process-exit */ + +module.exports = function bootstrap(name) { + const argv = process.argv.slice(2) + + switch (argv[0]) { + case undefined: + case "-h": + case "--help": + return require(`../${name}/help`)(process.stdout) + + case "-v": + case "--version": + return require("./version")(process.stdout) + + default: + // https://github.com/mysticatea/npm-run-all/issues/105 + // Avoid MaxListenersExceededWarnings. + process.stdout.setMaxListeners(0) + process.stderr.setMaxListeners(0) + process.stdin.setMaxListeners(0) + + // Main + return require(`../${name}/main`)( + argv, + process.stdout, + process.stderr + ).then( + () => { + // I'm not sure why, but maybe the process never exits + // on Git Bash (MINGW64) + process.exit(0) + }, + () => { + process.exit(1) + } + ) + } +} + +/*eslint-enable */ diff --git a/node_modules/npm-run-all/bin/common/parse-cli-args.js b/node_modules/npm-run-all/bin/common/parse-cli-args.js new file mode 100644 index 0000000..7f056fc --- /dev/null +++ b/node_modules/npm-run-all/bin/common/parse-cli-args.js @@ -0,0 +1,251 @@ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +/*eslint-disable no-process-env */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const OVERWRITE_OPTION = /^--([^:]+?):([^=]+?)(?:=(.+))?$/ +const CONFIG_OPTION = /^--([^=]+?)(?:=(.+))$/ +const PACKAGE_CONFIG_PATTERN = /^npm_package_config_(.+)$/ +const CONCAT_OPTIONS = /^-[clnprs]+$/ + +/** + * Overwrites a specified package config. + * + * @param {object} config - A config object to be overwritten. + * @param {string} packageName - A package name to overwrite. + * @param {string} variable - A variable name to overwrite. + * @param {string} value - A new value to overwrite. + * @returns {void} + */ +function overwriteConfig(config, packageName, variable, value) { + const scope = config[packageName] || (config[packageName] = {}) + scope[variable] = value +} + +/** + * Creates a package config object. + * This checks `process.env` and creates the default value. + * + * @returns {object} Created config object. + */ +function createPackageConfig() { + const retv = {} + const packageName = process.env.npm_package_name + if (!packageName) { + return retv + } + + for (const key of Object.keys(process.env)) { + const m = PACKAGE_CONFIG_PATTERN.exec(key) + if (m != null) { + overwriteConfig(retv, packageName, m[1], process.env[key]) + } + } + + return retv +} + +/** + * Adds a new group into a given list. + * + * @param {object[]} groups - A group list to add. + * @param {object} initialValues - A key-value map for the default of new value. + * @returns {void} + */ +function addGroup(groups, initialValues) { + groups.push(Object.assign( + { parallel: false, patterns: [] }, + initialValues || {} + )) +} + +/** + * ArgumentSet is values of parsed CLI arguments. + * This class provides the getter to get the last group. + */ +class ArgumentSet { + /** + * @param {object} initialValues - A key-value map for the default of new value. + * @param {object} options - A key-value map for the options. + */ + constructor(initialValues, options) { + this.config = {} + this.continueOnError = false + this.groups = [] + this.maxParallel = 0 + this.npmPath = null + this.packageConfig = createPackageConfig() + this.printLabel = false + this.printName = false + this.race = false + this.rest = [] + this.silent = process.env.npm_config_loglevel === "silent" + this.singleMode = Boolean(options && options.singleMode) + + addGroup(this.groups, initialValues) + } + + /** + * Gets the last group. + */ + get lastGroup() { + return this.groups[this.groups.length - 1] + } + + /** + * Gets "parallel" flag. + */ + get parallel() { + return this.groups.some(g => g.parallel) + } +} + +/** + * Parses CLI arguments. + * + * @param {ArgumentSet} set - The parsed CLI arguments. + * @param {string[]} args - CLI arguments. + * @returns {ArgumentSet} set itself. + */ +function parseCLIArgsCore(set, args) { // eslint-disable-line complexity + LOOP: + for (let i = 0; i < args.length; ++i) { + const arg = args[i] + + switch (arg) { + case "--": + set.rest = args.slice(1 + i) + break LOOP + + case "--color": + case "--no-color": + // do nothing. + break + + case "-c": + case "--continue-on-error": + set.continueOnError = true + break + + case "-l": + case "--print-label": + set.printLabel = true + break + + case "-n": + case "--print-name": + set.printName = true + break + + case "-r": + case "--race": + set.race = true + break + + case "--silent": + set.silent = true + break + + case "--max-parallel": + set.maxParallel = parseInt(args[++i], 10) + if (!Number.isFinite(set.maxParallel) || set.maxParallel <= 0) { + throw new Error(`Invalid Option: --max-parallel ${args[i]}`) + } + break + + case "-s": + case "--sequential": + case "--serial": + if (set.singleMode && arg === "-s") { + set.silent = true + break + } + if (set.singleMode) { + throw new Error(`Invalid Option: ${arg}`) + } + addGroup(set.groups) + break + + case "--aggregate-output": + set.aggregateOutput = true + break + + case "-p": + case "--parallel": + if (set.singleMode) { + throw new Error(`Invalid Option: ${arg}`) + } + addGroup(set.groups, { parallel: true }) + break + + case "--npm-path": + set.npmPath = args[++i] || null + break + + default: { + let matched = null + if ((matched = OVERWRITE_OPTION.exec(arg))) { + overwriteConfig( + set.packageConfig, + matched[1], + matched[2], + matched[3] || args[++i] + ) + } + else if ((matched = CONFIG_OPTION.exec(arg))) { + set.config[matched[1]] = matched[2] + } + else if (CONCAT_OPTIONS.test(arg)) { + parseCLIArgsCore( + set, + arg.slice(1).split("").map(c => `-${c}`) + ) + } + else if (arg[0] === "-") { + throw new Error(`Invalid Option: ${arg}`) + } + else { + set.lastGroup.patterns.push(arg) + } + + break + } + } + } + + if (!set.parallel && set.aggregateOutput) { + throw new Error("Invalid Option: --aggregate-output (without parallel)") + } + if (!set.parallel && set.race) { + const race = args.indexOf("--race") !== -1 ? "--race" : "-r" + throw new Error(`Invalid Option: ${race} (without parallel)`) + } + if (!set.parallel && set.maxParallel !== 0) { + throw new Error("Invalid Option: --max-parallel (without parallel)") + } + + return set +} + +/** + * Parses CLI arguments. + * + * @param {string[]} args - CLI arguments. + * @param {object} initialValues - A key-value map for the default of new value. + * @param {object} options - A key-value map for the options. + * @param {boolean} options.singleMode - The flag to be single group mode. + * @returns {ArgumentSet} The parsed CLI arguments. + */ +module.exports = function parseCLIArgs(args, initialValues, options) { + return parseCLIArgsCore(new ArgumentSet(initialValues, options), args) +} + +/*eslint-enable */ diff --git a/node_modules/npm-run-all/bin/common/version.js b/node_modules/npm-run-all/bin/common/version.js new file mode 100644 index 0000000..06afb8f --- /dev/null +++ b/node_modules/npm-run-all/bin/common/version.js @@ -0,0 +1,25 @@ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Print a version text. + * + * @param {stream.Writable} output - A writable stream to print. + * @returns {Promise} Always a fulfilled promise. + * @private + */ +module.exports = function printVersion(output) { + const version = require("../../package.json").version + + output.write(`v${version}\n`) + + return Promise.resolve(null) +} diff --git a/node_modules/npm-run-all/bin/npm-run-all/help.js b/node_modules/npm-run-all/bin/npm-run-all/help.js new file mode 100644 index 0000000..0300bfe --- /dev/null +++ b/node_modules/npm-run-all/bin/npm-run-all/help.js @@ -0,0 +1,71 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Print a help text. + * + * @param {stream.Writable} output - A writable stream to print. + * @returns {Promise} Always a fulfilled promise. + * @private + */ +module.exports = function printHelp(output) { + output.write(` +Usage: + $ npm-run-all [--help | -h | --version | -v] + $ npm-run-all [tasks] [OPTIONS] + + Run given npm-scripts in parallel or sequential. + + : A list of npm-scripts' names and Glob-like patterns. + +Options: + --aggregate-output - - - Avoid interleaving output by delaying printing of + each command's output until it has finished. + -c, --continue-on-error - Set the flag to continue executing + other/subsequent tasks even if a task threw an + error. 'npm-run-all' itself will exit with + non-zero code if one or more tasks threw error(s) + --max-parallel - Set the maximum number of parallelism. Default is + unlimited. + --npm-path - - - Set the path to npm. Default is the value of + environment variable npm_execpath. + If the variable is not defined, then it's "npm". + In this case, the "npm" command must be found in + environment variable PATH. + -l, --print-label - - - - Set the flag to print the task name as a prefix + on each line of output. Tools in tasks may stop + coloring their output if this option was given. + -n, --print-name - - - - Set the flag to print the task name before + running each task. + -p, --parallel - Run a group of tasks in parallel. + e.g. 'npm-run-all -p foo bar' is similar to + 'npm run foo & npm run bar'. + -r, --race - - - - - - - Set the flag to kill all tasks when a task + finished with zero. This option is valid only + with 'parallel' option. + -s, --sequential - Run a group of tasks sequentially. + --serial e.g. 'npm-run-all -s foo bar' is similar to + 'npm run foo && npm run bar'. + '--serial' is a synonym of '--sequential'. + --silent - - - - - - - - Set 'silent' to the log level of npm. + +Examples: + $ npm-run-all --serial clean lint build:** + $ npm-run-all --parallel watch:** + $ npm-run-all clean lint --parallel "build:** -- --watch" + $ npm-run-all -l -p start-server start-browser start-electron + +See Also: + https://github.com/mysticatea/npm-run-all#readme +`) + + return Promise.resolve(null) +} diff --git a/node_modules/npm-run-all/bin/npm-run-all/index.js b/node_modules/npm-run-all/bin/npm-run-all/index.js new file mode 100644 index 0000000..b405238 --- /dev/null +++ b/node_modules/npm-run-all/bin/npm-run-all/index.js @@ -0,0 +1,13 @@ +#!/usr/bin/env node +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Main +//------------------------------------------------------------------------------ + +require("../common/bootstrap")("npm-run-all") diff --git a/node_modules/npm-run-all/bin/npm-run-all/main.js b/node_modules/npm-run-all/bin/npm-run-all/main.js new file mode 100644 index 0000000..2782468 --- /dev/null +++ b/node_modules/npm-run-all/bin/npm-run-all/main.js @@ -0,0 +1,77 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const runAll = require("../../lib") +const parseCLIArgs = require("../common/parse-cli-args") + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Parses arguments, then run specified npm-scripts. + * + * @param {string[]} args - Arguments to parse. + * @param {stream.Writable} stdout - A writable stream to print logs. + * @param {stream.Writable} stderr - A writable stream to print errors. + * @returns {Promise} A promise which comes to be fulfilled when all npm-scripts are completed. + * @private + */ +module.exports = function npmRunAll(args, stdout, stderr) { + try { + const stdin = process.stdin + const argv = parseCLIArgs(args) + + const promise = argv.groups.reduce( + (prev, group) => { + if (group.patterns.length === 0) { + return prev + } + return prev.then(() => runAll( + group.patterns, + { + stdout, + stderr, + stdin, + parallel: group.parallel, + maxParallel: group.parallel ? argv.maxParallel : 1, + continueOnError: argv.continueOnError, + printLabel: argv.printLabel, + printName: argv.printName, + config: argv.config, + packageConfig: argv.packageConfig, + silent: argv.silent, + arguments: argv.rest, + race: group.parallel && argv.race, + npmPath: argv.npmPath, + aggregateOutput: group.parallel && argv.aggregateOutput, + } + )) + }, + Promise.resolve(null) + ) + + if (!argv.silent) { + promise.catch(err => { + //eslint-disable-next-line no-console + console.error("ERROR:", err.message) + }) + } + + return promise + } + catch (err) { + //eslint-disable-next-line no-console + console.error("ERROR:", err.message) + + return Promise.reject(err) + } +} diff --git a/node_modules/npm-run-all/bin/run-p/help.js b/node_modules/npm-run-all/bin/run-p/help.js new file mode 100644 index 0000000..873568f --- /dev/null +++ b/node_modules/npm-run-all/bin/run-p/help.js @@ -0,0 +1,66 @@ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Print a help text. + * + * @param {stream.Writable} output - A writable stream to print. + * @returns {Promise} Always a fulfilled promise. + * @private + */ +module.exports = function printHelp(output) { + output.write(` +Usage: + $ run-p [--help | -h | --version | -v] + $ run-p [OPTIONS] + + Run given npm-scripts in parallel. + + : A list of npm-scripts' names and Glob-like patterns. + +Options: + --aggregate-output - - - Avoid interleaving output by delaying printing of + each command's output until it has finished. + -c, --continue-on-error - Set the flag to continue executing other tasks + even if a task threw an error. 'run-p' itself + will exit with non-zero code if one or more tasks + threw error(s). + --max-parallel - Set the maximum number of parallelism. Default is + unlimited. + --npm-path - - - Set the path to npm. Default is the value of + environment variable npm_execpath. + If the variable is not defined, then it's "npm." + In this case, the "npm" command must be found in + environment variable PATH. + -l, --print-label - - - - Set the flag to print the task name as a prefix + on each line of output. Tools in tasks may stop + coloring their output if this option was given. + -n, --print-name - - - - Set the flag to print the task name before + running each task. + -r, --race - - - - - - - Set the flag to kill all tasks when a task + finished with zero. + -s, --silent - - - - - - Set 'silent' to the log level of npm. + + Shorthand aliases can be combined. + For example, '-clns' equals to '-c -l -n -s'. + +Examples: + $ run-p watch:** + $ run-p --print-label "build:** -- --watch" + $ run-p -sl "build:** -- --watch" + $ run-p start-server start-browser start-electron + +See Also: + https://github.com/mysticatea/npm-run-all#readme +`) + + return Promise.resolve(null) +} diff --git a/node_modules/npm-run-all/bin/run-p/index.js b/node_modules/npm-run-all/bin/run-p/index.js new file mode 100644 index 0000000..b7ca754 --- /dev/null +++ b/node_modules/npm-run-all/bin/run-p/index.js @@ -0,0 +1,13 @@ +#!/usr/bin/env node +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Main +//------------------------------------------------------------------------------ + +require("../common/bootstrap")("run-p") diff --git a/node_modules/npm-run-all/bin/run-p/main.js b/node_modules/npm-run-all/bin/run-p/main.js new file mode 100644 index 0000000..e44f2f2 --- /dev/null +++ b/node_modules/npm-run-all/bin/run-p/main.js @@ -0,0 +1,74 @@ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const runAll = require("../../lib") +const parseCLIArgs = require("../common/parse-cli-args") + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Parses arguments, then run specified npm-scripts. + * + * @param {string[]} args - Arguments to parse. + * @param {stream.Writable} stdout - A writable stream to print logs. + * @param {stream.Writable} stderr - A writable stream to print errors. + * @returns {Promise} A promise which comes to be fulfilled when all npm-scripts are completed. + * @private + */ +module.exports = function npmRunAll(args, stdout, stderr) { + try { + const stdin = process.stdin + const argv = parseCLIArgs(args, { parallel: true }, { singleMode: true }) + const group = argv.lastGroup + + if (group.patterns.length === 0) { + return Promise.resolve(null) + } + + const promise = runAll( + group.patterns, + { + stdout, + stderr, + stdin, + parallel: group.parallel, + maxParallel: argv.maxParallel, + continueOnError: argv.continueOnError, + printLabel: argv.printLabel, + printName: argv.printName, + config: argv.config, + packageConfig: argv.packageConfig, + silent: argv.silent, + arguments: argv.rest, + race: argv.race, + npmPath: argv.npmPath, + aggregateOutput: argv.aggregateOutput, + } + ) + + if (!argv.silent) { + promise.catch(err => { + //eslint-disable-next-line no-console + console.error("ERROR:", err.message) + }) + } + + return promise + } + catch (err) { + //eslint-disable-next-line no-console + console.error("ERROR:", err.message) + + return Promise.reject(err) + } +} diff --git a/node_modules/npm-run-all/bin/run-s/help.js b/node_modules/npm-run-all/bin/run-s/help.js new file mode 100644 index 0000000..6dfa6a1 --- /dev/null +++ b/node_modules/npm-run-all/bin/run-s/help.js @@ -0,0 +1,60 @@ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Print a help text. + * + * @param {stream.Writable} output - A writable stream to print. + * @returns {Promise} Always a fulfilled promise. + * @private + */ +module.exports = function printHelp(output) { + output.write(` +Usage: + $ run-s [--help | -h | --version | -v] + $ run-s [OPTIONS] + + Run given npm-scripts sequentially. + + : A list of npm-scripts' names and Glob-like patterns. + +Options: + -c, --continue-on-error - Set the flag to continue executing subsequent + tasks even if a task threw an error. 'run-s' + itself will exit with non-zero code if one or + more tasks threw error(s). + --npm-path - - - Set the path to npm. Default is the value of + environment variable npm_execpath. + If the variable is not defined, then it's "npm." + In this case, the "npm" command must be found in + environment variable PATH. + -l, --print-label - - - - Set the flag to print the task name as a prefix + on each line of output. Tools in tasks may stop + coloring their output if this option was given. + -n, --print-name - - - - Set the flag to print the task name before + running each task. + -s, --silent - - - - - - Set 'silent' to the log level of npm. + + Shorthand aliases can be combined. + For example, '-clns' equals to '-c -l -n -s'. + +Examples: + $ run-s build:** + $ run-s lint clean build:** + $ run-s --silent --print-name lint clean build:** + $ run-s -sn lint clean build:** + +See Also: + https://github.com/mysticatea/npm-run-all#readme +`) + + return Promise.resolve(null) +} diff --git a/node_modules/npm-run-all/bin/run-s/index.js b/node_modules/npm-run-all/bin/run-s/index.js new file mode 100644 index 0000000..f3cf012 --- /dev/null +++ b/node_modules/npm-run-all/bin/run-s/index.js @@ -0,0 +1,13 @@ +#!/usr/bin/env node +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Main +//------------------------------------------------------------------------------ + +require("../common/bootstrap")("run-s") diff --git a/node_modules/npm-run-all/bin/run-s/main.js b/node_modules/npm-run-all/bin/run-s/main.js new file mode 100644 index 0000000..d1bd6da --- /dev/null +++ b/node_modules/npm-run-all/bin/run-s/main.js @@ -0,0 +1,71 @@ +/** + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const runAll = require("../../lib") +const parseCLIArgs = require("../common/parse-cli-args") + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Parses arguments, then run specified npm-scripts. + * + * @param {string[]} args - Arguments to parse. + * @param {stream.Writable} stdout - A writable stream to print logs. + * @param {stream.Writable} stderr - A writable stream to print errors. + * @returns {Promise} A promise which comes to be fulfilled when all npm-scripts are completed. + * @private + */ +module.exports = function npmRunAll(args, stdout, stderr) { + try { + const stdin = process.stdin + const argv = parseCLIArgs(args, { parallel: false }, { singleMode: true }) + const group = argv.lastGroup + + if (group.patterns.length === 0) { + return Promise.resolve(null) + } + + const promise = runAll( + group.patterns, + { + stdout, + stderr, + stdin, + parallel: group.parallel, + continueOnError: argv.continueOnError, + printLabel: argv.printLabel, + printName: argv.printName, + config: argv.config, + packageConfig: argv.packageConfig, + silent: argv.silent, + arguments: argv.rest, + npmPath: argv.npmPath, + } + ) + + if (!argv.silent) { + promise.catch(err => { + //eslint-disable-next-line no-console + console.error("ERROR:", err.message) + }) + } + + return promise + } + catch (err) { + //eslint-disable-next-line no-console + console.error("ERROR:", err.message) + + return Promise.reject(err) + } +} diff --git a/node_modules/npm-run-all/docs/node-api.md b/node_modules/npm-run-all/docs/node-api.md new file mode 100644 index 0000000..37530e1 --- /dev/null +++ b/node_modules/npm-run-all/docs/node-api.md @@ -0,0 +1,117 @@ +| [index](../README.md) | [npm-run-all](npm-run-all.md) | [run-s](run-s.md) | [run-p](run-p.md) | Node API | +|-----------------------|-------------------------------|-------------------|-------------------|----------| + +# Node API + +A Node module to run given npm-scripts in parallel or sequential. + +```js +const runAll = require("npm-run-all"); + +runAll(["clean", "lint", "build:*"], {parallel: false}) + .then(() => { + console.log("done!"); + }) + .catch(err => { + console.log("failed!"); + }); + +runAll(["build:* -- --watch"], {parallel: true}) + .then(() => { + console.log("done!"); + }) + .catch(err => { + console.log("failed!"); + }); +``` + +## runAll + +``` +let promise = runAll(patterns, options); +``` + +Run npm-scripts. + +- **patterns** `string|string[]` -- Glob-like patterns for script names. +- **options** `object` + - **options.aggregateOutput** `boolean` -- + The flag to avoid interleaving output by delaying printing of each command's output until it has finished. + This option is valid only with `options.parallel` option. + Default is `false`. + - **options.arguments** `string[]` -- + An argument list to replace argument placeholders (such as `{1}`, `{2}`). If pattern text has `{1}`, it's replaced by `options.arguments[0]`. + Default is an empty array. + - **options.continueOnError** `boolean` -- + The flag to continue executing other/subsequent scripts even if a script threw an error. + Returned `Promise` object will be rejected if one or more scripts threw error(s). + Default is `false`. + - **options.parallel** `boolean` -- + The flag to run scripts in parallel. + Default is `false`. + - **options.maxParallel** `number` -- + The maximum number of parallelism. + This option is valid only with `options.parallel` option. + Default is `Number.POSITIVE_INFINITY`. + - **options.npmPath** `string` -- + The path to npm. + Default is `process.env.npm_execpath` or `"npm"`. + - **options.packageConfig** `object|null` -- + The map-like object to overwrite package configs. + Keys are package names. + Every value is a map-like object (Pairs of variable name and value). + e.g. `{"npm-run-all": {"test": 777, "test2": 333}}` + Default is `null`. + - **options.printLabel** `boolean` -- + Set the flag to print the task name as a prefix on each line of output. + Tools in scripts may stop coloring their output if this option is given. + Default is `false`. + - **options.printName** `boolean` -- + Set the flag to print the task name before running each task. + Default is `false`. + - **options.race** `boolean` -- + Set the flag to kill all npm-scripts when a npm-script finished with zero. + This option is valid only with `options.parallel` option. + Default is `false`. + - **options.silent** `boolean` -- + The flag to set `silent` to the log level of npm. + Default is `false`. + - **options.stdin** `stream.Readable|null` -- + The readable stream to send to the stdin of npm-scripts. + Default is nothing. + Set `process.stdin` in order to send from stdin. + - **options.stdout** `stream.Writable|null` -- + The writable stream to receive from the stdout of npm-scripts. + Default is nothing. + Set `process.stdout` in order to print to stdout. + - **options.stderr** `stream.Writable|null` -- + The writable stream to receive from the stderr of npm-scripts + Default is nothing. + Set `process.stderr` in order to print to stderr. + - **options.taskList** `string[]|null` -- + The string array of all script names. + If this is `null`, it reads from `package.json` in the current directory. + Default is `null`. + +`runAll` returns a promise that will becomes *fulfilled* when all scripts are completed. +The promise will become *rejected* when any of the scripts exit with a non-zero code. + +The promise gives `results` to the fulfilled handler. +`results` is an array of objects which have 2 properties: `name` and `code`. +The `name` property is the name of a npm-script. +The `code` property is the exit code of the npm-script. If the npm-script was not executed, the `code` property is `undefined`. + +```js +runAll(["clean", "lint", "build"]) + .then(results => { + console.log(`${results[0].name}: ${results[0].code}`); // clean: 0 + console.log(`${results[1].name}: ${results[1].code}`); // lint: 0 + console.log(`${results[2].name}: ${results[2].code}`); // build: 0 + }); +``` + +## About MaxListenersExceededWarning + +- If you use `options.stdin`, `options.stdout`, or `options.stderr` in parallel mode, please configure max listeners by [emitter.setMaxListeners(n)](https://nodejs.org/api/events.html#events_emitter_setmaxlisteners_n) properly. +- If you don't use those options and `process.stdXXX.isTTY` is `false`, please configure max listeners of the `process.stdXXX` properly. In that case, `npm-run-all` uses piping to connect to child processes.
+ On the other hand, if `process.stdXXX.isTTY` is `true`, `npm-run-all` uses `inherit` option, so the configuration is unnecessary. diff --git a/node_modules/npm-run-all/docs/npm-run-all.md b/node_modules/npm-run-all/docs/npm-run-all.md new file mode 100644 index 0000000..c6f1aaa --- /dev/null +++ b/node_modules/npm-run-all/docs/npm-run-all.md @@ -0,0 +1,192 @@ +| [index](../README.md) | npm-run-all | [run-s](run-s.md) | [run-p](run-p.md) | [Node API](node-api.md) | +|-----------------------|-------------|-------------------|-------------------|-------------------------| + +# `npm-run-all` command + +``` +Usage: + $ npm-run-all [--help | -h | --version | -v] + $ npm-run-all [tasks] [OPTIONS] + + Run given npm-scripts in parallel or sequential. + + : A list of npm-scripts' names and Glob-like patterns. + +Options: + --aggregate-output - - - Avoid interleaving output by delaying printing of + each command's output until it has finished. + -c, --continue-on-error - Set the flag to continue executing + other/subsequent tasks even if a task threw an + error. 'npm-run-all' itself will exit with + non-zero code if one or more tasks threw error(s) + --max-parallel - Set the maximum number of parallelism. Default is + unlimited. + --npm-path - - - Set the path to npm. Default is the value of + environment variable npm_execpath. + If the variable is not defined, then it's "npm." + In this case, the "npm" command must be found in + environment variable PATH. + -l, --print-label - - - - Set the flag to print the task name as a prefix + on each line of output. Tools in tasks may stop + coloring their output if this option was given. + -n, --print-name - - - - Set the flag to print the task name before + running each task. + -p, --parallel - Run a group of tasks in parallel. + e.g. 'npm-run-all -p foo bar' is similar to + 'npm run foo & npm run bar'. + -r, --race - - - - - - - Set the flag to kill all tasks when a task + finished with zero. This option is valid only + with 'parallel' option. + -s, --sequential - Run a group of tasks sequentially. + --serial e.g. 'npm-run-all -s foo bar' is similar to + 'npm run foo && npm run bar'. + '--serial' is a synonym of '--sequential'. + --silent - - - - - - - - Set 'silent' to the log level of npm. + +Examples: + $ npm-run-all --serial clean lint build:** + $ npm-run-all --parallel watch:** + $ npm-run-all clean lint --parallel "build:** -- --watch" + $ npm-run-all -l -p start-server start-browser start-electron +``` + +### npm-scripts + +It's `"scripts"` field of `package.json`. +For example: + +```json +{ + "scripts": { + "clean": "rimraf dist", + "lint": "eslint src", + "build": "babel src -o lib" + } +} +``` + +We can run a script with `npm run` command. +On the other hand, this `npm-run-all` command runs multiple scripts in parallel or sequential. + +### Run scripts sequentially + +``` +$ npm-run-all clean lint build +``` + +This is same as `npm run clean && npm run lint && npm run build`. + +**Note:** If a script exited with non zero code, the following scripts are not run. +If `--continue-on-error` option is given, this behavior will be disabled. + +### Run scripts in parallel + +``` +$ npm-run-all --parallel lint build +``` + +This is similar to `npm run lint & npm run build`. + +**Note1:** If a script exited with a non-zero code, the other scripts and those descendant processes are killed with `SIGTERM` (On Windows, with `taskkill.exe /F /T`). +If `--continue-on-error` option is given, this behavior will be disabled. + +**Note2:** `&` operator does not work on Windows' `cmd.exe`. But `npm-run-all --parallel` works fine there. + +### Run a mix of sequential and parallel scripts + +``` +$ npm-run-all clean lint --parallel watch:html watch:js +``` + +1. First, this runs `clean` and `lint` sequentially / serially. +2. Next, runs `watch:html` and `watch:js` in parallel. + +``` +$ npm-run-all a b --parallel c d --sequential e f --parallel g h i +``` +or + +``` +$ npm-run-all a b --parallel c d --serial e f --parallel g h i +``` + +1. First, runs `a` and `b` sequentially / serially. +2. Second, runs `c` and `d` in parallel. +3. Third, runs `e` and `f` sequentially / serially. +4. Lastly, runs `g`, `h`, and `i` in parallel. + +### Glob-like pattern matching for script names + +We can use [glob]-like patterns to specify npm-scripts. +The difference is one -- the separator is `:` instead of `/`. + +``` +$ npm-run-all --parallel watch:* +``` + +In this case, runs sub scripts of `watch`. For example: `watch:html`, `watch:js`. +But, doesn't run sub-sub scripts. For example: `watch:js:index`. + +``` +$ npm-run-all --parallel watch:** +``` + +If we use a globstar `**`, runs both sub scripts and sub-sub scripts. + +`npm-run-all` reads the actual npm-script list from `package.json` in the current directory, then filters the scripts by glob-like patterns, then runs those. + +### Run with arguments + +We can enclose a script name or a pattern in quotes to use arguments. +The following 2 commands are similar. + +``` +$ npm-run-all --parallel "build:* -- --watch" +$ npm run build:aaa -- --watch & npm run build:bbb -- --watch +``` + +When we use a pattern, arguments are forwarded to every matched script. + +### Argument placeholders + +We can use placeholders to give the arguments preceded by `--` to scripts. + +``` +$ npm-run-all build "start-server -- --port {1}" -- 8080 +``` + +This is useful to pass through arguments from `npm run` command. + +```json +{ + "scripts": { + "start": "npm-run-all build \"start-server -- --port {1}\" --" + } +} +``` + +``` +$ npm run start 8080 + +> example@0.0.0 start /path/to/package.json +> npm-run-all build "start-server -- --port {1}" -- "8080" +``` + +There are the following placeholders: + +- `{1}`, `{2}`, ... -- An argument. `{1}` is the 1st argument. `{2}` is the 2nd. +- `{@}` -- All arguments. +- `{*}` -- All arguments as combined. + +Those are similar to [Shell Parameters](http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters). But please note arguments are enclosed by double quotes automatically (similar to npm). + +### Known Limitations + +- If `--print-label` option is given, some tools in scripts might stop coloring their output. + Because some coloring library (e.g. [chalk]) will stop coloring if `process.stdout` is not a TTY. + `npm-run-all` changes the `process.stdout` of child processes to a pipe in order to add labels to the head of each line if `--print-label` option is given.
+ For example, [eslint] stops coloring under `npm-run-all --print-label`. But [eslint] has `--color` option to force coloring, we can use it. For anything [chalk] based you can set the environment variable `FORCE_COLOR=1` to produce colored output anyway. + +[glob]: https://www.npmjs.com/package/glob#glob-primer +[chalk]: https://www.npmjs.com/package/chalk +[eslint]: https://www.npmjs.com/package/eslint diff --git a/node_modules/npm-run-all/docs/run-p.md b/node_modules/npm-run-all/docs/run-p.md new file mode 100644 index 0000000..ce9d309 --- /dev/null +++ b/node_modules/npm-run-all/docs/run-p.md @@ -0,0 +1,156 @@ +| [index](../README.md) | [npm-run-all](npm-run-all.md) | [run-s](run-s.md) | run-p | [Node API](node-api.md) | +|-----------------------|-------------------------------|-------------------|-------|-------------------------| + +# `run-p` command + +A CLI command to run given npm-scripts in parallel. +This command is the shorthand of `npm-run-all -p`. + +``` +Usage: + $ run-p [--help | -h | --version | -v] + $ run-p [OPTIONS] + + Run given npm-scripts in parallel. + + : A list of npm-scripts' names and Glob-like patterns. + +Options: + --aggregate-output - - - Avoid interleaving output by delaying printing of + each command's output until it has finished. + -c, --continue-on-error - Set the flag to continue executing other tasks + even if a task threw an error. 'run-p' itself + will exit with non-zero code if one or more tasks + threw error(s). + --max-parallel - Set the maximum number of parallelism. Default is + unlimited. + --npm-path - - - Set the path to npm. Default is the value of + environment variable npm_execpath. + If the variable is not defined, then it's "npm." + In this case, the "npm" command must be found in + environment variable PATH. + -l, --print-label - - - - Set the flag to print the task name as a prefix + on each line of output. Tools in tasks may stop + coloring their output if this option was given. + -n, --print-name - - - - Set the flag to print the task name before + running each task. + -r, --race - - - - - - - Set the flag to kill all tasks when a task + finished with zero. + -s, --silent - - - - - - Set 'silent' to the log level of npm. + + Shorthand aliases can be combined. + For example, '-clns' equals to '-c -l -n -s'. + +Examples: + $ run-p watch:** + $ run-p --print-label "build:** -- --watch" + $ run-p -l "build:** -- --watch" + $ run-p start-server start-browser start-electron +``` + +### npm-scripts + +It's `"scripts"` field of `package.json`. +For example: + +```json +{ + "scripts": { + "clean": "rimraf dist", + "lint": "eslint src", + "build": "babel src -o lib" + } +} +``` + +We can run a script with `npm run` command. +On the other hand, this `run-p` command runs multiple scripts in parallel. + +The following 2 commands are similar. +The `run-p` command is shorter and **available on Windows**. + +``` +$ run-p lint build +$ npm run lint & npm run build +``` + +**Note1:** If a script exited with a non-zero code, the other scripts and those descendant processes are killed with `SIGTERM` (On Windows, with `taskkill.exe /F /T`). +If `--continue-on-error` option is given, this behavior will be disabled. + +**Note2:** `&` operator does not work on Windows' `cmd.exe`. But `run-p` works fine there. + +### Glob-like pattern matching for script names + +We can use [glob]-like patterns to specify npm-scripts. +The difference is one -- the separator is `:` instead of `/`. + +``` +$ run-p watch:* +``` + +In this case, runs sub scripts of `watch`. For example: `watch:html`, `watch:js`. +But, doesn't run sub-sub scripts. For example: `watch:js:index`. + +``` +$ run-p watch:** +``` + +If we use a globstar `**`, runs both sub scripts and sub-sub scripts. + +`run-p` reads the actual npm-script list from `package.json` in the current directory, then filters the scripts by glob-like patterns, then runs those. + +### Run with arguments + +We can enclose a script name or a pattern in quotes to use arguments. +The following 2 commands are similar. + +``` +$ run-p "build:* -- --watch" +$ npm run build:aaa -- --watch & npm run build:bbb -- --watch +``` + +When we use a pattern, arguments are forwarded to every matched script. + +### Argument placeholders + +We can use placeholders to give the arguments preceded by `--` to scripts. + +``` +$ run-p "start-server -- --port {1}" -- 8080 +``` + +This is useful to pass through arguments from `npm run` command. + +```json +{ + "scripts": { + "start": "run-p \"start-server -- --port {1}\" --" + } +} +``` + +``` +$ npm run start 8080 + +> example@0.0.0 start /path/to/package.json +> run-p "start-server -- --port {1}" -- "8080" +``` + +There are the following placeholders: + +- `{1}`, `{2}`, ... -- An argument. `{1}` is the 1st argument. `{2}` is the 2nd. +- `{@}` -- All arguments. +- `{*}` -- All arguments as combined. + +Those are similar to [Shell Parameters](http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters). But please note arguments are enclosed by double quotes automatically (similar to npm). + +### Known Limitations + +- If `--print-label` option is given, some tools in scripts might stop coloring their output. + Because some coloring library (e.g. [chalk]) will stop coloring if `process.stdout` is not a TTY. + `run-p` changes the `process.stdout` of child processes to a pipe in order to add labels to the head of each line if `--print-label` option is given.
+ For example, [eslint] stops coloring under `run-p --print-label`. But [eslint] has `--color` option to force coloring, we can use it. + +[glob]: https://www.npmjs.com/package/glob#glob-primer +[chalk]: https://www.npmjs.com/package/chalk +[eslint]: https://www.npmjs.com/package/eslint diff --git a/node_modules/npm-run-all/docs/run-s.md b/node_modules/npm-run-all/docs/run-s.md new file mode 100644 index 0000000..cf62681 --- /dev/null +++ b/node_modules/npm-run-all/docs/run-s.md @@ -0,0 +1,147 @@ +| [index](../README.md) | [npm-run-all](npm-run-all.md) | run-s | [run-p](run-p.md) | [Node API](node-api.md) | +|-----------------------|-------------------------------|-------|-------------------|-------------------------| + +# `run-s` command + +A CLI command to run given npm-scripts sequentially. +This command is the shorthand of `npm-run-all -s`. + +``` +Usage: + $ run-s [--help | -h | --version | -v] + $ run-s [OPTIONS] + + Run given npm-scripts sequentially. + + : A list of npm-scripts' names and Glob-like patterns. + +Options: + -c, --continue-on-error - Set the flag to continue executing subsequent + tasks even if a task threw an error. 'run-s' + itself will exit with non-zero code if one or + more tasks threw error(s). + --npm-path - - - Set the path to npm. Default is the value of + environment variable npm_execpath. + If the variable is not defined, then it's "npm." + In this case, the "npm" command must be found in + environment variable PATH. + -l, --print-label - - - - Set the flag to print the task name as a prefix + on each line of output. Tools in tasks may stop + coloring their output if this option was given. + -n, --print-name - - - - Set the flag to print the task name before + running each task. + -s, --silent - - - - - - Set 'silent' to the log level of npm. + + Shorthand aliases can be combined. + For example, '-clns' equals to '-c -l -n -s'. + +Examples: + $ run-s build:** + $ run-s lint clean build:** + $ run-s --silent --print-name lint clean build:** + $ run-s -sn lint clean build:** +``` + +### npm-scripts + +It's `"scripts"` field of `package.json`. +For example: + +```json +{ + "scripts": { + "clean": "rimraf dist", + "lint": "eslint src", + "build": "babel src -o lib" + } +} +``` + +We can run a script with `npm run` command. +On the other hand, this `run-s` command runs multiple scripts sequentially. + +The following 2 commands are the same. +The `run-s` command is shorter. + +``` +$ run-s clean lint build +$ npm run clean && npm run lint && npm run build +``` + +**Note:** If a script exited with a non-zero code, the following scripts are not run. + +### Glob-like pattern matching for script names + +We can use [glob]-like patterns to specify npm-scripts. +The difference is one -- the separator is `:` instead of `/`. + +``` +$ run-s build:* +``` + +In this case, runs sub scripts of `build`. For example: `build:html`, `build:js`. +But, doesn't run sub-sub scripts. For example: `build:js:index`. + +``` +$ run-s build:** +``` + +If we use a globstar `**`, runs both sub scripts and sub-sub scripts. + +`run-s` reads the actual npm-script list from `package.json` in the current directory, then filters the scripts by glob-like patterns, then runs those. + +### Run with arguments + +We can enclose a script name or a pattern in quotes to use arguments. +The following 2 commands are the same. + +``` +$ run-s start:server "delay 3000" start:client +$ npm run start:server && npm run delay 3000 && npm run start:client +``` + +When we use a pattern, arguments are forwarded to every matched script. + +### Argument placeholders + +We can use placeholders to give the arguments preceded by `--` to scripts. + +``` +$ run-s build "start-server -- --port {1}" -- 8080 +``` + +This is useful to pass through arguments from `npm run` command. + +```json +{ + "scripts": { + "start": "run-s build \"start-server -- --port {1}\" --" + } +} +``` + +``` +$ npm run start 8080 + +> example@0.0.0 start /path/to/package.json +> run-s build "start-server -- --port {1}" -- "8080" +``` + +There are the following placeholders: + +- `{1}`, `{2}`, ... -- An argument. `{1}` is the 1st argument. `{2}` is the 2nd. +- `{@}` -- All arguments. +- `{*}` -- All arguments as combined. + +Those are similar to [Shell Parameters](http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters). But please note arguments are enclosed by double quotes automatically (similar to npm). + +### Known Limitations + +- If `--print-label` option is given, some tools in scripts might stop coloring their output. + Because some coloring library (e.g. [chalk]) will stop coloring if `process.stdout` is not a TTY. + `run-s` changes the `process.stdout` of child processes to a pipe in order to add labels to the head of each line if `--print-label` option is given.
+ For example, [eslint] stops coloring under `run-s --print-label`. But [eslint] has `--color` option to force coloring, we can use it. + +[glob]: https://www.npmjs.com/package/glob#glob-primer +[chalk]: https://www.npmjs.com/package/chalk +[eslint]: https://www.npmjs.com/package/eslint diff --git a/node_modules/npm-run-all/lib/create-header.js b/node_modules/npm-run-all/lib/create-header.js new file mode 100644 index 0000000..cdf52df --- /dev/null +++ b/node_modules/npm-run-all/lib/create-header.js @@ -0,0 +1,48 @@ +/** + * @module create-header + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const ansiStyles = require("ansi-styles") + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Creates the header text for a given task. + * + * @param {string} nameAndArgs - A task name and arguments. + * @param {object} packageInfo - A package.json's information. + * @param {object} packageInfo.body - A package.json's JSON object. + * @param {string} packageInfo.path - A package.json's file path. + * @param {boolean} isTTY - The flag to color the header. + * @returns {string} The header of a given task. + */ +module.exports = function createHeader(nameAndArgs, packageInfo, isTTY) { + if (!packageInfo) { + return `\n> ${nameAndArgs}\n\n` + } + + const index = nameAndArgs.indexOf(" ") + const name = (index === -1) ? nameAndArgs : nameAndArgs.slice(0, index) + const args = (index === -1) ? "" : nameAndArgs.slice(index + 1) + const packageName = packageInfo.body.name + const packageVersion = packageInfo.body.version + const scriptBody = packageInfo.body.scripts[name] + const packagePath = packageInfo.path + const color = isTTY ? ansiStyles.gray : { open: "", close: "" } + + return ` +${color.open}> ${packageName}@${packageVersion} ${name} ${packagePath}${color.close} +${color.open}> ${scriptBody} ${args}${color.close} + +` +} diff --git a/node_modules/npm-run-all/lib/create-prefix-transform-stream.js b/node_modules/npm-run-all/lib/create-prefix-transform-stream.js new file mode 100644 index 0000000..cb2c360 --- /dev/null +++ b/node_modules/npm-run-all/lib/create-prefix-transform-stream.js @@ -0,0 +1,89 @@ +/** + * @module create-prefix-transform-stream + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const stream = require("stream") + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const ALL_BR = /\n/g + +/** + * The transform stream to insert a specific prefix. + * + * Several streams can exist for the same output stream. + * This stream will insert the prefix if the last output came from other instance. + * To do that, this stream is using a shared state object. + * + * @private + */ +class PrefixTransform extends stream.Transform { + /** + * @param {string} prefix - A prefix text to be inserted. + * @param {object} state - A state object. + * @param {string} state.lastPrefix - The last prefix which is printed. + * @param {boolean} state.lastIsLinebreak -The flag to check whether the last output is a line break or not. + */ + constructor(prefix, state) { + super() + + this.prefix = prefix + this.state = state + } + + /** + * Transforms the output chunk. + * + * @param {string|Buffer} chunk - A chunk to be transformed. + * @param {string} _encoding - The encoding of the chunk. + * @param {function} callback - A callback function that is called when done. + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + const prefix = this.prefix + const nPrefix = `\n${prefix}` + const state = this.state + const firstPrefix = + state.lastIsLinebreak ? prefix : + (state.lastPrefix !== prefix) ? "\n" : + /* otherwise */ "" + const prefixed = `${firstPrefix}${chunk}`.replace(ALL_BR, nPrefix) + const index = prefixed.indexOf(prefix, Math.max(0, prefixed.length - prefix.length)) + + state.lastPrefix = prefix + state.lastIsLinebreak = (index !== -1) + + callback(null, (index !== -1) ? prefixed.slice(0, index) : prefixed) + } +} + +//------------------------------------------------------------------------------ +// Public API +//------------------------------------------------------------------------------ + +/** + * Create a transform stream to insert the specific prefix. + * + * Several streams can exist for the same output stream. + * This stream will insert the prefix if the last output came from other instance. + * To do that, this stream is using a shared state object. + * + * @param {string} prefix - A prefix text to be inserted. + * @param {object} state - A state object. + * @param {string} state.lastPrefix - The last prefix which is printed. + * @param {boolean} state.lastIsLinebreak -The flag to check whether the last output is a line break or not. + * @returns {stream.Transform} The created transform stream. + */ +module.exports = function createPrefixTransform(prefix, state) { + return new PrefixTransform(prefix, state) +} diff --git a/node_modules/npm-run-all/lib/index.js b/node_modules/npm-run-all/lib/index.js new file mode 100644 index 0000000..e36a605 --- /dev/null +++ b/node_modules/npm-run-all/lib/index.js @@ -0,0 +1,287 @@ +/** + * @module index + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const shellQuote = require("shell-quote") +const matchTasks = require("./match-tasks") +const readPackageJson = require("./read-package-json") +const runTasks = require("./run-tasks") + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const ARGS_PATTERN = /\{(!)?([*@]|\d+)([^}]+)?}/g + +/** + * Converts a given value to an array. + * + * @param {string|string[]|null|undefined} x - A value to convert. + * @returns {string[]} An array. + */ +function toArray(x) { + if (x == null) { + return [] + } + return Array.isArray(x) ? x : [x] +} + +/** + * Replaces argument placeholders (such as `{1}`) by arguments. + * + * @param {string[]} patterns - Patterns to replace. + * @param {string[]} args - Arguments to replace. + * @returns {string[]} replaced + */ +function applyArguments(patterns, args) { + const defaults = Object.create(null) + + return patterns.map(pattern => pattern.replace(ARGS_PATTERN, (whole, indirectionMark, id, options) => { + if (indirectionMark != null) { + throw Error(`Invalid Placeholder: ${whole}`) + } + if (id === "@") { + return shellQuote.quote(args) + } + if (id === "*") { + return shellQuote.quote([args.join(" ")]) + } + + const position = parseInt(id, 10) + if (position >= 1 && position <= args.length) { + return shellQuote.quote([args[position - 1]]) + } + + // Address default values + if (options != null) { + const prefix = options.slice(0, 2) + + if (prefix === ":=") { + defaults[id] = shellQuote.quote([options.slice(2)]) + return defaults[id] + } + if (prefix === ":-") { + return shellQuote.quote([options.slice(2)]) + } + + throw Error(`Invalid Placeholder: ${whole}`) + } + if (defaults[id] != null) { + return defaults[id] + } + + return "" + })) +} + +/** + * Parse patterns. + * In parsing process, it replaces argument placeholders (such as `{1}`) by arguments. + * + * @param {string|string[]} patternOrPatterns - Patterns to run. + * A pattern is a npm-script name or a Glob-like pattern. + * @param {string[]} args - Arguments to replace placeholders. + * @returns {string[]} Parsed patterns. + */ +function parsePatterns(patternOrPatterns, args) { + const patterns = toArray(patternOrPatterns) + const hasPlaceholder = patterns.some(pattern => ARGS_PATTERN.test(pattern)) + + return hasPlaceholder ? applyArguments(patterns, args) : patterns +} + +/** + * Converts a given config object to an `--:=` style option array. + * + * @param {object|null} config - + * A map-like object to overwrite package configs. + * Keys are package names. + * Every value is a map-like object (Pairs of variable name and value). + * @returns {string[]} `--:=` style options. + */ +function toOverwriteOptions(config) { + const options = [] + + for (const packageName of Object.keys(config)) { + const packageConfig = config[packageName] + + for (const variableName of Object.keys(packageConfig)) { + const value = packageConfig[variableName] + + options.push(`--${packageName}:${variableName}=${value}`) + } + } + + return options +} + +/** + * Converts a given config object to an `--a=b` style option array. + * + * @param {object|null} config - + * A map-like object to set configs. + * @returns {string[]} `--a=b` style options. + */ +function toConfigOptions(config) { + return Object.keys(config).map(key => `--${key}=${config[key]}`) +} + +/** + * Gets the maximum length. + * + * @param {number} length - The current maximum length. + * @param {string} name - A name. + * @returns {number} The maximum length. + */ +function maxLength(length, name) { + return Math.max(name.length, length) +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Runs npm-scripts which are matched with given patterns. + * + * @param {string|string[]} patternOrPatterns - Patterns to run. + * A pattern is a npm-script name or a Glob-like pattern. + * @param {object|undefined} [options] Optional. + * @param {boolean} options.parallel - + * If this is `true`, run scripts in parallel. + * Otherwise, run scripts in sequencial. + * Default is `false`. + * @param {stream.Readable|null} options.stdin - + * A readable stream to send messages to stdin of child process. + * If this is `null`, ignores it. + * If this is `process.stdin`, inherits it. + * Otherwise, makes a pipe. + * Default is `null`. + * @param {stream.Writable|null} options.stdout - + * A writable stream to receive messages from stdout of child process. + * If this is `null`, cannot send. + * If this is `process.stdout`, inherits it. + * Otherwise, makes a pipe. + * Default is `null`. + * @param {stream.Writable|null} options.stderr - + * A writable stream to receive messages from stderr of child process. + * If this is `null`, cannot send. + * If this is `process.stderr`, inherits it. + * Otherwise, makes a pipe. + * Default is `null`. + * @param {string[]} options.taskList - + * Actual name list of npm-scripts. + * This function search npm-script names in this list. + * If this is `null`, this function reads `package.json` of current directly. + * @param {object|null} options.packageConfig - + * A map-like object to overwrite package configs. + * Keys are package names. + * Every value is a map-like object (Pairs of variable name and value). + * e.g. `{"npm-run-all": {"test": 777}}` + * Default is `null`. + * @param {boolean} options.silent - + * The flag to set `silent` to the log level of npm. + * Default is `false`. + * @param {boolean} options.continueOnError - + * The flag to ignore errors. + * Default is `false`. + * @param {boolean} options.printLabel - + * The flag to print task names at the head of each line. + * Default is `false`. + * @param {boolean} options.printName - + * The flag to print task names before running each task. + * Default is `false`. + * @param {number} options.maxParallel - + * The maximum number of parallelism. + * Default is unlimited. + * @param {string} options.npmPath - + * The path to npm. + * Default is `process.env.npm_execpath`. + * @returns {Promise} + * A promise object which becomes fullfilled when all npm-scripts are completed. + */ +module.exports = function npmRunAll(patternOrPatterns, options) { //eslint-disable-line complexity + const stdin = (options && options.stdin) || null + const stdout = (options && options.stdout) || null + const stderr = (options && options.stderr) || null + const taskList = (options && options.taskList) || null + const config = (options && options.config) || null + const packageConfig = (options && options.packageConfig) || null + const args = (options && options.arguments) || [] + const parallel = Boolean(options && options.parallel) + const silent = Boolean(options && options.silent) + const continueOnError = Boolean(options && options.continueOnError) + const printLabel = Boolean(options && options.printLabel) + const printName = Boolean(options && options.printName) + const race = Boolean(options && options.race) + const maxParallel = parallel ? ((options && options.maxParallel) || 0) : 1 + const aggregateOutput = Boolean(options && options.aggregateOutput) + const npmPath = options && options.npmPath + try { + const patterns = parsePatterns(patternOrPatterns, args) + if (patterns.length === 0) { + return Promise.resolve(null) + } + if (taskList != null && Array.isArray(taskList) === false) { + throw new Error("Invalid options.taskList") + } + if (typeof maxParallel !== "number" || !(maxParallel >= 0)) { + throw new Error("Invalid options.maxParallel") + } + if (!parallel && aggregateOutput) { + throw new Error("Invalid options.aggregateOutput; It requires options.parallel") + } + if (!parallel && race) { + throw new Error("Invalid options.race; It requires options.parallel") + } + + const prefixOptions = [].concat( + silent ? ["--silent"] : [], + packageConfig ? toOverwriteOptions(packageConfig) : [], + config ? toConfigOptions(config) : [] + ) + + return Promise.resolve() + .then(() => { + if (taskList != null) { + return { taskList, packageInfo: null } + } + return readPackageJson() + }) + .then(x => { + const tasks = matchTasks(x.taskList, patterns) + const labelWidth = tasks.reduce(maxLength, 0) + + return runTasks(tasks, { + stdin, + stdout, + stderr, + prefixOptions, + continueOnError, + labelState: { + enabled: printLabel, + width: labelWidth, + lastPrefix: null, + lastIsLinebreak: true, + }, + printName, + packageInfo: x.packageInfo, + race, + maxParallel, + npmPath, + aggregateOutput, + }) + }) + } + catch (err) { + return Promise.reject(new Error(err.message)) + } +} diff --git a/node_modules/npm-run-all/lib/match-tasks.js b/node_modules/npm-run-all/lib/match-tasks.js new file mode 100644 index 0000000..e3adb95 --- /dev/null +++ b/node_modules/npm-run-all/lib/match-tasks.js @@ -0,0 +1,128 @@ +/** + * @module match-tasks + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Minimatch = require("minimatch").Minimatch + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const COLON_OR_SLASH = /[:/]/g +const CONVERT_MAP = { ":": "/", "/": ":" } + +/** + * Swaps ":" and "/", in order to use ":" as the separator in minimatch. + * + * @param {string} s - A text to swap. + * @returns {string} The text which was swapped. + */ +function swapColonAndSlash(s) { + return s.replace(COLON_OR_SLASH, (matched) => CONVERT_MAP[matched]) +} + +/** + * Creates a filter from user-specified pattern text. + * + * The task name is the part until the first space. + * The rest part is the arguments for this task. + * + * @param {string} pattern - A pattern to create filter. + * @returns {{match: function, task: string, args: string}} The filter object of the pattern. + */ +function createFilter(pattern) { + const trimmed = pattern.trim() + const spacePos = trimmed.indexOf(" ") + const task = spacePos < 0 ? trimmed : trimmed.slice(0, spacePos) + const args = spacePos < 0 ? "" : trimmed.slice(spacePos) + const matcher = new Minimatch(swapColonAndSlash(task), { nonegate: true }) + const match = matcher.match.bind(matcher) + + return { match, task, args } +} + +/** + * The set to remove overlapped task. + */ +class TaskSet { + /** + * Creates a instance. + */ + constructor() { + this.result = [] + this.sourceMap = Object.create(null) + } + + /** + * Adds a command (a pattern) into this set if it's not overlapped. + * "Overlapped" is meaning that the command was added from a different source. + * + * @param {string} command - A pattern text to add. + * @param {string} source - A task name to check. + * @returns {void} + */ + add(command, source) { + const sourceList = this.sourceMap[command] || (this.sourceMap[command] = []) + if (sourceList.length === 0 || sourceList.indexOf(source) !== -1) { + this.result.push(command) + } + sourceList.push(source) + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Enumerates tasks which matches with given patterns. + * + * @param {string[]} taskList - A list of actual task names. + * @param {string[]} patterns - Pattern texts to match. + * @returns {string[]} Tasks which matches with the patterns. + * @private + */ +module.exports = function matchTasks(taskList, patterns) { + const filters = patterns.map(createFilter) + const candidates = taskList.map(swapColonAndSlash) + const taskSet = new TaskSet() + const unknownSet = Object.create(null) + + // Take tasks while keep the order of patterns. + for (const filter of filters) { + let found = false + + for (const candidate of candidates) { + if (filter.match(candidate)) { + found = true + taskSet.add( + swapColonAndSlash(candidate) + filter.args, + filter.task + ) + } + } + + // Built-in tasks should be allowed. + if (!found && (filter.task === "restart" || filter.task === "env")) { + taskSet.add(filter.task + filter.args, filter.task) + found = true + } + if (!found) { + unknownSet[filter.task] = true + } + } + + const unknownTasks = Object.keys(unknownSet) + if (unknownTasks.length > 0) { + throw new Error(`Task not found: "${unknownTasks.join("\", ")}"`) + } + return taskSet.result +} diff --git a/node_modules/npm-run-all/lib/npm-run-all-error.js b/node_modules/npm-run-all/lib/npm-run-all-error.js new file mode 100644 index 0000000..af08b09 --- /dev/null +++ b/node_modules/npm-run-all/lib/npm-run-all-error.js @@ -0,0 +1,47 @@ +/** + * @module npm-run-all-error + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Error object with some additional info. + */ +module.exports = class NpmRunAllError extends Error { + /** + * Constructor. + * + * @param {{name: string, code: number}} causeResult - + * The result item of the npm-script which causes an error. + * @param {Array.<{name: string, code: (number|undefined)}>} allResults - + * All result items of npm-scripts. + */ + constructor(causeResult, allResults) { + super(`"${causeResult.task}" exited with ${causeResult.code}.`) + + /** + * The name of a npm-script which exited with a non-zero code. + * @type {string} + */ + this.name = causeResult.name + + /** + * The code of a npm-script which exited with a non-zero code. + * This can be `undefined`. + * @type {number} + */ + this.code = causeResult.code + + /** + * All result items of npm-scripts. + * @type {Array.<{name: string, code: (number|undefined)}>} + */ + this.results = allResults + } +} diff --git a/node_modules/npm-run-all/lib/read-package-json.js b/node_modules/npm-run-all/lib/read-package-json.js new file mode 100644 index 0000000..1497ebf --- /dev/null +++ b/node_modules/npm-run-all/lib/read-package-json.js @@ -0,0 +1,31 @@ +/** + * @module read-package-json + * @author Toru Nagashima + * @copyright 2016 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const joinPath = require("path").join +const readPkg = require("read-pkg") + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Reads the package.json in the current directory. + * + * @returns {object} package.json's information. + */ +module.exports = function readPackageJson() { + const path = joinPath(process.cwd(), "package.json") + return readPkg(path).then(body => ({ + taskList: Object.keys(body.scripts || {}), + packageInfo: { path, body }, + })) +} diff --git a/node_modules/npm-run-all/lib/run-task.js b/node_modules/npm-run-all/lib/run-task.js new file mode 100644 index 0000000..8cabc03 --- /dev/null +++ b/node_modules/npm-run-all/lib/run-task.js @@ -0,0 +1,206 @@ +/** + * @module run-task + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const path = require("path") +const chalk = require("chalk") +const parseArgs = require("shell-quote").parse +const padEnd = require("string.prototype.padend") +const createHeader = require("./create-header") +const createPrefixTransform = require("./create-prefix-transform-stream") +const spawn = require("./spawn") + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const colors = [chalk.cyan, chalk.green, chalk.magenta, chalk.yellow, chalk.red] + +let colorIndex = 0 +const taskNamesToColors = new Map() + +/** + * Select a color from given task name. + * + * @param {string} taskName - The task name. + * @returns {function} A colorize function that provided by `chalk` + */ +function selectColor(taskName) { + let color = taskNamesToColors.get(taskName) + if (!color) { + color = colors[colorIndex] + colorIndex = (colorIndex + 1) % colors.length + taskNamesToColors.set(taskName, color) + } + return color +} + +/** + * Wraps stdout/stderr with a transform stream to add the task name as prefix. + * + * @param {string} taskName - The task name. + * @param {stream.Writable} source - An output stream to be wrapped. + * @param {object} labelState - An label state for the transform stream. + * @returns {stream.Writable} `source` or the created wrapped stream. + */ +function wrapLabeling(taskName, source, labelState) { + if (source == null || !labelState.enabled) { + return source + } + + const label = padEnd(taskName, labelState.width) + const color = source.isTTY ? selectColor(taskName) : (x) => x + const prefix = color(`[${label}] `) + const stream = createPrefixTransform(prefix, labelState) + + stream.pipe(source) + + return stream +} + +/** + * Converts a given stream to an option for `child_process.spawn`. + * + * @param {stream.Readable|stream.Writable|null} stream - An original stream to convert. + * @param {process.stdin|process.stdout|process.stderr} std - A standard stream for this option. + * @returns {string|stream.Readable|stream.Writable} An option for `child_process.spawn`. + */ +function detectStreamKind(stream, std) { + return ( + stream == null ? "ignore" : + // `|| !std.isTTY` is needed for the workaround of https://github.com/nodejs/node/issues/5620 + stream !== std || !std.isTTY ? "pipe" : + /* else */ stream + ) +} + +/** + * Ensure the output of shell-quote's `parse()` is acceptable input to npm-cli. + * + * The `parse()` method of shell-quote sometimes returns special objects in its + * output array, e.g. if it thinks some elements should be globbed. But npm-cli + * only accepts strings and will throw an error otherwise. + * + * See https://github.com/substack/node-shell-quote#parsecmd-env + * + * @param {object|string} arg - Item in the output of shell-quote's `parse()`. + * @returns {string} A valid argument for npm-cli. + */ +function cleanTaskArg(arg) { + return arg.pattern || arg.op || arg +} + +//------------------------------------------------------------------------------ +// Interface +//------------------------------------------------------------------------------ + +/** + * Run a npm-script of a given name. + * The return value is a promise which has an extra method: `abort()`. + * The `abort()` kills the child process to run the npm-script. + * + * @param {string} task - A npm-script name to run. + * @param {object} options - An option object. + * @param {stream.Readable|null} options.stdin - + * A readable stream to send messages to stdin of child process. + * If this is `null`, ignores it. + * If this is `process.stdin`, inherits it. + * Otherwise, makes a pipe. + * @param {stream.Writable|null} options.stdout - + * A writable stream to receive messages from stdout of child process. + * If this is `null`, cannot send. + * If this is `process.stdout`, inherits it. + * Otherwise, makes a pipe. + * @param {stream.Writable|null} options.stderr - + * A writable stream to receive messages from stderr of child process. + * If this is `null`, cannot send. + * If this is `process.stderr`, inherits it. + * Otherwise, makes a pipe. + * @param {string[]} options.prefixOptions - + * An array of options which are inserted before the task name. + * @param {object} options.labelState - A state object for printing labels. + * @param {boolean} options.printName - The flag to print task names before running each task. + * @returns {Promise} + * A promise object which becomes fullfilled when the npm-script is completed. + * This promise object has an extra method: `abort()`. + * @private + */ +module.exports = function runTask(task, options) { + let cp = null + const promise = new Promise((resolve, reject) => { + const stdin = options.stdin + const stdout = wrapLabeling(task, options.stdout, options.labelState) + const stderr = wrapLabeling(task, options.stderr, options.labelState) + const stdinKind = detectStreamKind(stdin, process.stdin) + const stdoutKind = detectStreamKind(stdout, process.stdout) + const stderrKind = detectStreamKind(stderr, process.stderr) + const spawnOptions = { stdio: [stdinKind, stdoutKind, stderrKind] } + + // Print task name. + if (options.printName && stdout != null) { + stdout.write(createHeader( + task, + options.packageInfo, + options.stdout.isTTY + )) + } + + // Execute. + const npmPath = options.npmPath || process.env.npm_execpath //eslint-disable-line no-process-env + const npmPathIsJs = typeof npmPath === "string" && /\.m?js/.test(path.extname(npmPath)) + const execPath = (npmPathIsJs ? process.execPath : npmPath || "npm") + const isYarn = path.basename(npmPath || "npm").startsWith("yarn") + const spawnArgs = ["run"] + + if (npmPathIsJs) { + spawnArgs.unshift(npmPath) + } + if (!isYarn) { + Array.prototype.push.apply(spawnArgs, options.prefixOptions) + } + else if (options.prefixOptions.indexOf("--silent") !== -1) { + spawnArgs.push("--silent") + } + Array.prototype.push.apply(spawnArgs, parseArgs(task).map(cleanTaskArg)) + + cp = spawn(execPath, spawnArgs, spawnOptions) + + // Piping stdio. + if (stdinKind === "pipe") { + stdin.pipe(cp.stdin) + } + if (stdoutKind === "pipe") { + cp.stdout.pipe(stdout, { end: false }) + } + if (stderrKind === "pipe") { + cp.stderr.pipe(stderr, { end: false }) + } + + // Register + cp.on("error", (err) => { + cp = null + reject(err) + }) + cp.on("close", (code) => { + cp = null + resolve({ task, code }) + }) + }) + + promise.abort = function abort() { + if (cp != null) { + cp.kill() + cp = null + } + } + + return promise +} diff --git a/node_modules/npm-run-all/lib/run-tasks.js b/node_modules/npm-run-all/lib/run-tasks.js new file mode 100644 index 0000000..64a4506 --- /dev/null +++ b/node_modules/npm-run-all/lib/run-tasks.js @@ -0,0 +1,177 @@ +/** + * @module run-tasks-in-parallel + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const MemoryStream = require("memorystream") +const NpmRunAllError = require("./npm-run-all-error") +const runTask = require("./run-task") + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Remove the given value from the array. + * @template T + * @param {T[]} array - The array to remove. + * @param {T} x - The item to be removed. + * @returns {void} + */ +function remove(array, x) { + const index = array.indexOf(x) + if (index !== -1) { + array.splice(index, 1) + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Run npm-scripts of given names in parallel. + * + * If a npm-script exited with a non-zero code, this aborts other all npm-scripts. + * + * @param {string} tasks - A list of npm-script name to run in parallel. + * @param {object} options - An option object. + * @returns {Promise} A promise object which becomes fullfilled when all npm-scripts are completed. + * @private + */ +module.exports = function runTasks(tasks, options) { + return new Promise((resolve, reject) => { + if (tasks.length === 0) { + resolve([]) + return + } + + const results = tasks.map(task => ({ name: task, code: undefined })) + const queue = tasks.map((task, index) => ({ name: task, index })) + const promises = [] + let error = null + let aborted = false + + /** + * Done. + * @returns {void} + */ + function done() { + if (error == null) { + resolve(results) + } + else { + reject(error) + } + } + + /** + * Aborts all tasks. + * @returns {void} + */ + function abort() { + if (aborted) { + return + } + aborted = true + + if (promises.length === 0) { + done() + } + else { + for (const p of promises) { + p.abort() + } + Promise.all(promises).then(done, reject) + } + } + + /** + * Runs a next task. + * @returns {void} + */ + function next() { + if (aborted) { + return + } + if (queue.length === 0) { + if (promises.length === 0) { + done() + } + return + } + + const originalOutputStream = options.stdout + const optionsClone = Object.assign({}, options) + const writer = new MemoryStream(null, { + readable: false, + }) + + if (options.aggregateOutput) { + optionsClone.stdout = writer + } + + const task = queue.shift() + const promise = runTask(task.name, optionsClone) + + promises.push(promise) + promise.then( + (result) => { + remove(promises, promise) + if (aborted) { + return + } + + if (options.aggregateOutput) { + originalOutputStream.write(writer.toString()) + } + + // Save the result. + results[task.index].code = result.code + + // Aborts all tasks if it's an error. + if (result.code) { + error = new NpmRunAllError(result, results) + if (!options.continueOnError) { + abort() + return + } + } + + // Aborts all tasks if options.race is true. + if (options.race && !result.code) { + abort() + return + } + + // Call the next task. + next() + }, + (thisError) => { + remove(promises, promise) + if (!options.continueOnError || options.race) { + error = thisError + abort() + return + } + next() + } + ) + } + + const max = options.maxParallel + const end = (typeof max === "number" && max > 0) + ? Math.min(tasks.length, max) + : tasks.length + for (let i = 0; i < end; ++i) { + next() + } + }) +} diff --git a/node_modules/npm-run-all/lib/spawn-posix.js b/node_modules/npm-run-all/lib/spawn-posix.js new file mode 100644 index 0000000..604bfef --- /dev/null +++ b/node_modules/npm-run-all/lib/spawn-posix.js @@ -0,0 +1,64 @@ +/** + * @module spawn-posix + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const crossSpawn = require("cross-spawn") +const getDescendentProcessInfo = require("pidtree") + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Kills the new process and its sub processes. + * @this ChildProcess + * @returns {void} + */ +function kill() { + getDescendentProcessInfo(this.pid, { root: true }, (err, pids) => { + if (err) { + return + } + + for (const pid of pids) { + try { + process.kill(pid) + } + catch (_err) { + // ignore. + } + } + }) +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Launches a new process with the given command. + * This is almost same as `child_process.spawn`. + * + * This returns a `ChildProcess` instance. + * `kill` method of the instance kills the new process and its sub processes. + * + * @param {string} command - The command to run. + * @param {string[]} args - List of string arguments. + * @param {object} options - Options. + * @returns {ChildProcess} A ChildProcess instance of new process. + * @private + */ +module.exports = function spawn(command, args, options) { + const child = crossSpawn(command, args, options) + child.kill = kill + + return child +} diff --git a/node_modules/npm-run-all/lib/spawn-win32.js b/node_modules/npm-run-all/lib/spawn-win32.js new file mode 100644 index 0000000..3743a1d --- /dev/null +++ b/node_modules/npm-run-all/lib/spawn-win32.js @@ -0,0 +1,50 @@ +/** + * @module spawn-win32 + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const crossSpawn = require("cross-spawn") + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Kills the new process and its sub processes forcibly. + * @this ChildProcess + * @returns {void} + */ +function kill() { + crossSpawn("taskkill", ["/F", "/T", "/PID", this.pid]) +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Launches a new process with the given command. + * This is almost same as `child_process.spawn`. + * + * This returns a `ChildProcess` instance. + * `kill` method of the instance kills the new process and its sub processes forcibly. + * + * @param {string} command - The command to run. + * @param {string[]} args - List of string arguments. + * @param {object} options - Options. + * @returns {ChildProcess} A ChildProcess instance of new process. + * @private + */ +module.exports = function spawn(command, args, options) { + const child = crossSpawn(command, args, options) + child.kill = kill + + return child +} diff --git a/node_modules/npm-run-all/lib/spawn.js b/node_modules/npm-run-all/lib/spawn.js new file mode 100644 index 0000000..1392817 --- /dev/null +++ b/node_modules/npm-run-all/lib/spawn.js @@ -0,0 +1,20 @@ +/** + * @module spawn + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +"use strict" + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Launches a new process with the given command. + * This is {@link ./spawn-posix.js:spawn} or {@link ./spawn-win32.js:spawn} + * @private + */ +module.exports = require( + process.platform === "win32" ? "./spawn-win32" : "./spawn-posix" +) diff --git a/node_modules/npm-run-all/package.json b/node_modules/npm-run-all/package.json new file mode 100644 index 0000000..f130b86 --- /dev/null +++ b/node_modules/npm-run-all/package.json @@ -0,0 +1,78 @@ +{ + "name": "npm-run-all", + "version": "4.1.5", + "description": "A CLI tool to run multiple npm-scripts in parallel or sequential.", + "bin": { + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js", + "npm-run-all": "bin/npm-run-all/index.js" + }, + "main": "lib/index.js", + "files": [ + "bin", + "lib", + "docs" + ], + "engines": { + "node": ">= 4" + }, + "scripts": { + "_mocha": "mocha \"test/*.js\" --timeout 120000", + "clean": "rimraf .nyc_output coverage jsdoc \"test-workspace/{build,test.txt}\"", + "docs": "jsdoc -c jsdoc.json", + "lint": "eslint bin lib scripts test \"test-workspace/tasks/*.js\"", + "pretest": "node scripts/make-slink.js && npm run lint", + "preversion": "npm test", + "postversion": "git push && git push --tags", + "test": "nyc --require babel-register npm run _mocha", + "watch": "npm run _mocha -- --require babel-register --watch --growl", + "codecov": "nyc report -r lcovonly && codecov" + }, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "devDependencies": { + "@types/node": "^4.9.1", + "babel-plugin-transform-async-to-generator": "^6.24.1", + "babel-preset-power-assert": "^2.0.0", + "babel-register": "^6.26.0", + "codecov": "^3.1.0", + "eslint": "^4.19.1", + "eslint-config-mysticatea": "^12.0.0", + "fs-extra": "^7.0.1", + "mocha": "^5.2.0", + "nyc": "^11.9.0", + "p-queue": "^2.4.2", + "power-assert": "^1.6.1", + "rimraf": "^2.6.2", + "yarn": "^1.12.3" + }, + "repository": "mysticatea/npm-run-all", + "keywords": [ + "cli", + "command", + "commandline", + "tool", + "npm", + "npm-scripts", + "run", + "sequential", + "serial", + "parallel", + "task" + ], + "author": "Toru Nagashima", + "license": "MIT", + "bugs": { + "url": "https://github.com/mysticatea/npm-run-all/issues" + }, + "homepage": "https://github.com/mysticatea/npm-run-all" +} diff --git a/node_modules/object-assign/index.js b/node_modules/object-assign/index.js new file mode 100644 index 0000000..0930cf8 --- /dev/null +++ b/node_modules/object-assign/index.js @@ -0,0 +1,90 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +'use strict'; +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; diff --git a/node_modules/object-assign/license b/node_modules/object-assign/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/object-assign/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json new file mode 100644 index 0000000..503eb1e --- /dev/null +++ b/node_modules/object-assign/package.json @@ -0,0 +1,42 @@ +{ + "name": "object-assign", + "version": "4.1.1", + "description": "ES2015 `Object.assign()` ponyfill", + "license": "MIT", + "repository": "sindresorhus/object-assign", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava", + "bench": "matcha bench.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "object", + "assign", + "extend", + "properties", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "prollyfill", + "polyfill", + "shim", + "browser" + ], + "devDependencies": { + "ava": "^0.16.0", + "lodash": "^4.16.4", + "matcha": "^0.7.0", + "xo": "^0.16.0" + } +} diff --git a/node_modules/object-assign/readme.md b/node_modules/object-assign/readme.md new file mode 100644 index 0000000..1be09d3 --- /dev/null +++ b/node_modules/object-assign/readme.md @@ -0,0 +1,61 @@ +# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) + +> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com) + + +## Use the built-in + +Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), +support `Object.assign()` :tada:. If you target only those environments, then by all +means, use `Object.assign()` instead of this package. + + +## Install + +``` +$ npm install --save object-assign +``` + + +## Usage + +```js +const objectAssign = require('object-assign'); + +objectAssign({foo: 0}, {bar: 1}); +//=> {foo: 0, bar: 1} + +// multiple sources +objectAssign({foo: 0}, {bar: 1}, {baz: 2}); +//=> {foo: 0, bar: 1, baz: 2} + +// overwrites equal keys +objectAssign({foo: 0}, {foo: 1}, {foo: 2}); +//=> {foo: 2} + +// ignores null and undefined sources +objectAssign({foo: 0}, null, {bar: 1}, undefined); +//=> {foo: 0, bar: 1} +``` + + +## API + +### objectAssign(target, [source, ...]) + +Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. + + +## Resources + +- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) + + +## Related + +- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/object-copy/LICENSE b/node_modules/object-copy/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/node_modules/object-copy/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/object-copy/index.js b/node_modules/object-copy/index.js new file mode 100644 index 0000000..f9faa22 --- /dev/null +++ b/node_modules/object-copy/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var typeOf = require('kind-of'); +var copyDescriptor = require('copy-descriptor'); +var define = require('define-property'); + +/** + * Copy static properties, prototype properties, and descriptors from one object to another. + * + * ```js + * function App() {} + * var proto = App.prototype; + * App.prototype.set = function() {}; + * App.prototype.get = function() {}; + * + * var obj = {}; + * copy(obj, proto); + * ``` + * @param {Object} `receiver` + * @param {Object} `provider` + * @param {String|Array} `omit` One or more properties to omit + * @return {Object} + * @api public + */ + +function copy(receiver, provider, omit) { + if (!isObject(receiver)) { + throw new TypeError('expected receiving object to be an object.'); + } + if (!isObject(provider)) { + throw new TypeError('expected providing object to be an object.'); + } + + var props = nativeKeys(provider); + var keys = Object.keys(provider); + var len = props.length; + omit = arrayify(omit); + + while (len--) { + var key = props[len]; + + if (has(keys, key)) { + define(receiver, key, provider[key]); + } else if (!(key in receiver) && !has(omit, key)) { + copyDescriptor(receiver, provider, key); + } + } +}; + +/** + * Return true if the given value is an object or function + */ + +function isObject(val) { + return typeOf(val) === 'object' || typeof val === 'function'; +} + +/** + * Returns true if an array has any of the given elements, or an + * object has any of the give keys. + * + * ```js + * has(['a', 'b', 'c'], 'c'); + * //=> true + * + * has(['a', 'b', 'c'], ['c', 'z']); + * //=> true + * + * has({a: 'b', c: 'd'}, ['c', 'z']); + * //=> true + * ``` + * @param {Object} `obj` + * @param {String|Array} `val` + * @return {Boolean} + */ + +function has(obj, val) { + val = arrayify(val); + var len = val.length; + + if (isObject(obj)) { + for (var key in obj) { + if (val.indexOf(key) > -1) { + return true; + } + } + + var keys = nativeKeys(obj); + return has(keys, val); + } + + if (Array.isArray(obj)) { + var arr = obj; + while (len--) { + if (arr.indexOf(val[len]) > -1) { + return true; + } + } + return false; + } + + throw new TypeError('expected an array or object.'); +} + +/** + * Cast the given value to an array. + * + * ```js + * arrayify('foo'); + * //=> ['foo'] + * + * arrayify(['foo']); + * //=> ['foo'] + * ``` + * + * @param {String|Array} `val` + * @return {Array} + */ + +function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +} + +/** + * Returns true if a value has a `contructor` + * + * ```js + * hasConstructor({}); + * //=> true + * + * hasConstructor(Object.create(null)); + * //=> false + * ``` + * @param {Object} `value` + * @return {Boolean} + */ + +function hasConstructor(val) { + return isObject(val) && typeof val.constructor !== 'undefined'; +} + +/** + * Get the native `ownPropertyNames` from the constructor of the + * given `object`. An empty array is returned if the object does + * not have a constructor. + * + * ```js + * nativeKeys({a: 'b', b: 'c', c: 'd'}) + * //=> ['a', 'b', 'c'] + * + * nativeKeys(function(){}) + * //=> ['length', 'caller'] + * ``` + * + * @param {Object} `obj` Object that has a `constructor`. + * @return {Array} Array of keys. + */ + +function nativeKeys(val) { + if (!hasConstructor(val)) return []; + return Object.getOwnPropertyNames(val); +} + +/** + * Expose `copy` + */ + +module.exports = copy; + +/** + * Expose `copy.has` for tests + */ + +module.exports.has = has; diff --git a/node_modules/object-copy/node_modules/define-property/LICENSE b/node_modules/object-copy/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/object-copy/node_modules/define-property/README.md b/node_modules/object-copy/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/node_modules/object-copy/node_modules/define-property/index.js b/node_modules/object-copy/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/object-copy/node_modules/define-property/package.json b/node_modules/object-copy/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/node_modules/object-copy/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/.editorconfig b/node_modules/object-copy/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/object-copy/node_modules/is-descriptor/.eslintrc b/node_modules/object-copy/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000..24e5090 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/.gitattributes b/node_modules/object-copy/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000..660957e --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..37535da --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object-copy/node_modules/is-descriptor/.nycrc b/node_modules/object-copy/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md b/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000..4963353 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/object-copy/node_modules/is-descriptor/LICENSE b/node_modules/object-copy/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/object-copy/node_modules/is-descriptor/README.md b/node_modules/object-copy/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..fd9ddcf --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/object-copy/node_modules/is-descriptor/index.js b/node_modules/object-copy/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9dd24d --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/node_modules/object-copy/node_modules/is-descriptor/package.json b/node_modules/object-copy/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..6d6ca8b --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/object-copy/node_modules/is-descriptor/test/index.js b/node_modules/object-copy/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000..0b74a35 --- /dev/null +++ b/node_modules/object-copy/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/object-copy/package.json b/node_modules/object-copy/package.json new file mode 100644 index 0000000..f02a96c --- /dev/null +++ b/node_modules/object-copy/package.json @@ -0,0 +1,47 @@ +{ + "name": "object-copy", + "description": "Copy static properties, prototype properties, and descriptors from one object to another.", + "version": "0.1.0", + "homepage": "https://github.com/jonschlinkert/object-copy", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-copy", + "bugs": { + "url": "https://github.com/jonschlinkert/object-copy/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "devDependencies": { + "gulp-format-md": "*", + "mocha": "*" + }, + "keywords": [ + "copy", + "object" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [] + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/object-inspect/.eslintrc b/node_modules/object-inspect/.eslintrc new file mode 100644 index 0000000..21f9039 --- /dev/null +++ b/node_modules/object-inspect/.eslintrc @@ -0,0 +1,53 @@ +{ + "root": true, + "extends": "@ljharb", + "rules": { + "complexity": 0, + "func-style": [2, "declaration"], + "indent": [2, 4], + "max-lines": 1, + "max-lines-per-function": 1, + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "no-param-reassign": 1, + "strict": 0, // TODO + }, + "overrides": [ + { + "files": ["test/**", "test-*", "example/**"], + "extends": "@ljharb/eslint-config/tests", + "rules": { + "id-length": 0, + }, + }, + { + "files": ["example/**"], + "rules": { + "no-console": 0, + }, + }, + { + "files": ["test/browser/**"], + "env": { + "browser": true, + }, + }, + { + "files": ["test/bigint*"], + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], + }, + }, + { + "files": "index.js", + "globals": { + "HTMLElement": false, + }, + "rules": { + "no-use-before-define": 1, + }, + }, + ], +} diff --git a/node_modules/object-inspect/.github/FUNDING.yml b/node_modules/object-inspect/.github/FUNDING.yml new file mode 100644 index 0000000..730276b --- /dev/null +++ b/node_modules/object-inspect/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/object-inspect +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object-inspect/.nycrc b/node_modules/object-inspect/.nycrc new file mode 100644 index 0000000..58a5db7 --- /dev/null +++ b/node_modules/object-inspect/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "instrumentation": false, + "sourceMap": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "example", + "test", + "test-core-js.js" + ] +} diff --git a/node_modules/object-inspect/CHANGELOG.md b/node_modules/object-inspect/CHANGELOG.md new file mode 100644 index 0000000..056fbcc --- /dev/null +++ b/node_modules/object-inspect/CHANGELOG.md @@ -0,0 +1,404 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.13.2](https://github.com/inspect-js/object-inspect/compare/v1.13.1...v1.13.2) - 2024-06-21 + +### Commits + +- [readme] update badges [`8a51e6b`](https://github.com/inspect-js/object-inspect/commit/8a51e6bedaf389ec40cc4659e9df53e8543d176e) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`ef05f58`](https://github.com/inspect-js/object-inspect/commit/ef05f58c9761a41416ab907299bf0fa79517014b) +- [Dev Deps] update `error-cause`, `has-tostringtag`, `tape` [`c0c6c26`](https://github.com/inspect-js/object-inspect/commit/c0c6c26c44cee6671f7c5d43d2b91d27c5c00d90) +- [Fix] Don't throw when `global` is not defined [`d4d0965`](https://github.com/inspect-js/object-inspect/commit/d4d096570f7dbd0e03266a96de11d05eb7b63e0f) +- [meta] add missing `engines.node` [`17a352a`](https://github.com/inspect-js/object-inspect/commit/17a352af6fe1ba6b70a19081674231eb1a50c940) +- [Dev Deps] update `globalthis` [`9c08884`](https://github.com/inspect-js/object-inspect/commit/9c08884aa662a149e2f11403f413927736b97da7) +- [Dev Deps] update `error-cause` [`6af352d`](https://github.com/inspect-js/object-inspect/commit/6af352d7c3929a4cc4c55768c27bf547a5e900f4) +- [Dev Deps] update `npmignore` [`94e617d`](https://github.com/inspect-js/object-inspect/commit/94e617d38831722562fa73dff4c895746861d267) +- [Dev Deps] update `mock-property` [`2ac24d7`](https://github.com/inspect-js/object-inspect/commit/2ac24d7e58cd388ad093c33249e413e05bbfd6c3) +- [Dev Deps] update `tape` [`46125e5`](https://github.com/inspect-js/object-inspect/commit/46125e58f1d1dcfb170ed3d1ea69da550ea8d77b) + +## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19 + +### Commits + +- [Fix] in IE 8, global can !== window despite them being prototypes of each other [`30d0859`](https://github.com/inspect-js/object-inspect/commit/30d0859dc4606cf75c2410edcd5d5c6355f8d372) + +## [v1.13.0](https://github.com/inspect-js/object-inspect/compare/v1.12.3...v1.13.0) - 2023-10-14 + +### Commits + +- [New] add special handling for the global object [`431bab2`](https://github.com/inspect-js/object-inspect/commit/431bab21a490ee51d35395966a504501e8c685da) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`fd4f619`](https://github.com/inspect-js/object-inspect/commit/fd4f6193562b4b0e95dcf5c0201b4e8cbbc4f58d) +- [Dev Deps] update `mock-property`, `tape` [`b453f6c`](https://github.com/inspect-js/object-inspect/commit/b453f6ceeebf8a1b738a1029754092e0367a4134) +- [Dev Deps] update `error-cause` [`e8ffc57`](https://github.com/inspect-js/object-inspect/commit/e8ffc577d73b92bb6a4b00c44f14e3319e374888) +- [Dev Deps] update `tape` [`054b8b9`](https://github.com/inspect-js/object-inspect/commit/054b8b9b98633284cf989e582450ebfbbe53503c) +- [Dev Deps] temporarily remove `aud` due to breaking change in transitive deps [`2476845`](https://github.com/inspect-js/object-inspect/commit/2476845e0678dd290c541c81cd3dec8420782c52) +- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` [`383fa5e`](https://github.com/inspect-js/object-inspect/commit/383fa5eebc0afd705cc778a4b49d8e26452e49a8) +- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 [`68c244c`](https://github.com/inspect-js/object-inspect/commit/68c244c5174cdd877e5dcb8ee90aa3f44b2f25be) + +## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12 + +### Commits + +- [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f) +- [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd) +- [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3) +- [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80) + +## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26 + +### Commits + +- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1) +- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c) +- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b) + +## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21 + +### Commits + +- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352) +- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91) +- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1) +- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37) + +## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18 + +### Commits + +- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11) +- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8) +- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36) +- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12) +- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d) + +## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05 + +### Commits + +- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf) +- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6) +- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874) +- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7) +- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f) + +## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12 + +### Commits + +- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120) +- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793) + +## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07 + +### Commits + +- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6) +- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611) + +## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5) + +## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91) + +## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17 + +### Commits + +- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7) +- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175) +- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab) +- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09) +- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd) +- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be) +- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223) +- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c) + +## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30 + +### Commits + +- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d) +- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284) +- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9) +- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff) +- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113) +- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210) +- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778) +- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc) +- [Tests] fix tests for node < 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456) +- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd) +- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f) +- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab) +- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca) +- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7) + +## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18 + +### Fixed + +- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27) + +### Commits + +- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e) +- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502) +- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d) +- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b) +- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6) +- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3) +- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711) +- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7) +- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a) +- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5) +- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d) +- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088) +- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0) + +## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10 + +### Commits + +- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b) +- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8) +- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6) +- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8) +- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306) +- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d) +- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace) +- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2) +- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81) +- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b) +- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b) +- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead) +- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd) +- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6) +- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2) +- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7) + +## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02 + +### Commits + +- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3) +- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f) +- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04) +- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf) +- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f) + +## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25 + +### Commits + +- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4) +- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759) +- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980) + +## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19 + +### Commits + +- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906) +- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3) + +## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24 + +### Commits + +- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70) +- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73) +- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df) +- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529) +- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3) +- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a) + +## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31 + +### Fixed + +- [Fix] Map/Set: work around core-js bug < v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9) + +### Commits + +- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9) +- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb) +- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185) +- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586) + +## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24 + +### Commits + +- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0) +- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7) +- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3) +- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6) +- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa) +- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264) +- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a) +- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301) +- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69) +- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9) +- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3) +- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261) +- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3) +- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27) +- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a) +- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0) + +## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09 + +### Fixed + +- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7) + +## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09 + +### Fixed + +- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6) + +### Commits + +- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432) + +## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14 + +### Merged + +- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4) + +### Fixed + +- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3) + +### Commits + +- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2) +- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c) + +## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07 + +### Commits + +- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3) +- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457) +- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82) + +## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19 + +### Commits + +- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4) +- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2) +- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a) + +## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05 + +### Commits + +- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299) +- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417) +- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f) +- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca) +- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a) +- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2) +- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b) +- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6) +- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9) +- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48) +- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9) +- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4) +- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75) +- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15) + +## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21 + +### Commits + +- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985) +- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c) + +## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04 + +### Commits + +- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05) + +## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04 + +### Commits + +- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b) + +## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04 + +### Commits + +- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a) +- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6) +- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943) +- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709) +- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79) +- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8) +- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5) +- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990) +- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058) +- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4) + +## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26 + +### Commits + +- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128) +- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5) + +## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26 + +### Commits + +- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998) +- fix for ie<9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613) +- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50) +- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3) + +## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26 + +### Commits + +- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b) + +## 0.0.0 - 2013-07-26 + +### Commits + +- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d) +- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f) +- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446) +- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59) +- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8) diff --git a/node_modules/object-inspect/LICENSE b/node_modules/object-inspect/LICENSE new file mode 100644 index 0000000..ca64cc1 --- /dev/null +++ b/node_modules/object-inspect/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/object-inspect/example/all.js b/node_modules/object-inspect/example/all.js new file mode 100644 index 0000000..2f3355c --- /dev/null +++ b/node_modules/object-inspect/example/all.js @@ -0,0 +1,23 @@ +'use strict'; + +var inspect = require('../'); +var Buffer = require('safer-buffer').Buffer; + +var holes = ['a', 'b']; +holes[4] = 'e'; +holes[6] = 'g'; + +var obj = { + a: 1, + b: [3, 4, undefined, null], + c: undefined, + d: null, + e: { + regex: /^x/i, + buf: Buffer.from('abc'), + holes: holes + }, + now: new Date() +}; +obj.self = obj; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/circular.js b/node_modules/object-inspect/example/circular.js new file mode 100644 index 0000000..487a7c1 --- /dev/null +++ b/node_modules/object-inspect/example/circular.js @@ -0,0 +1,6 @@ +'use strict'; + +var inspect = require('../'); +var obj = { a: 1, b: [3, 4] }; +obj.c = obj; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/fn.js b/node_modules/object-inspect/example/fn.js new file mode 100644 index 0000000..9b5db8d --- /dev/null +++ b/node_modules/object-inspect/example/fn.js @@ -0,0 +1,5 @@ +'use strict'; + +var inspect = require('../'); +var obj = [1, 2, function f(n) { return n + 5; }, 4]; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/inspect.js b/node_modules/object-inspect/example/inspect.js new file mode 100644 index 0000000..e2df7c9 --- /dev/null +++ b/node_modules/object-inspect/example/inspect.js @@ -0,0 +1,10 @@ +'use strict'; + +/* eslint-env browser */ +var inspect = require('../'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }])); diff --git a/node_modules/object-inspect/index.js b/node_modules/object-inspect/index.js new file mode 100644 index 0000000..eb89faf --- /dev/null +++ b/node_modules/object-inspect/index.js @@ -0,0 +1,527 @@ +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = require('./util.inspect'); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if ( + (typeof globalThis !== 'undefined' && obj === globalThis) + || (typeof global !== 'undefined' && obj === global) + ) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} diff --git a/node_modules/object-inspect/package-support.json b/node_modules/object-inspect/package-support.json new file mode 100644 index 0000000..5cc12d0 --- /dev/null +++ b/node_modules/object-inspect/package-support.json @@ -0,0 +1,20 @@ +{ + "versions": [ + { + "version": "*", + "target": { + "node": "all" + }, + "response": { + "type": "time-permitting" + }, + "backing": { + "npm-funding": true, + "donations": [ + "https://github.com/ljharb", + "https://tidelift.com/funding/github/npm/object-inspect" + ] + } + } + ] +} diff --git a/node_modules/object-inspect/package.json b/node_modules/object-inspect/package.json new file mode 100644 index 0000000..9974d21 --- /dev/null +++ b/node_modules/object-inspect/package.json @@ -0,0 +1,104 @@ +{ + "name": "object-inspect", + "version": "1.13.2", + "description": "string representations of objects in node and the browser", + "main": "index.js", + "sideEffects": false, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "@pkgjs/support": "^0.0.6", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "error-cause": "^1.0.8", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "glob": "=10.3.7", + "globalthis": "^1.0.4", + "has-symbols": "^1.0.3", + "has-tostringtag": "^1.0.2", + "in-publish": "^2.0.1", + "jackspeak": "=2.1.1", + "make-arrow-function": "^1.2.0", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "safer-buffer": "^2.1.2", + "string.prototype.repeat": "^1.0.0", + "tape": "^5.8.1" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "lint": "eslint --ext=js,mjs .", + "postlint": "npx @pkgjs/support validate", + "test": "npm run tests-only && npm run test:corejs", + "tests-only": "nyc tape 'test/*.js'", + "test:corejs": "nyc tape test-core-js.js 'test/*.js'", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": [ + "test/*.js", + "test/browser/*.js" + ], + "browsers": [ + "ie/6..latest", + "chrome/latest", + "firefox/latest", + "safari/latest", + "opera/latest", + "iphone/latest", + "ipad/latest", + "android/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/object-inspect.git" + }, + "homepage": "https://github.com/inspect-js/object-inspect", + "keywords": [ + "inspect", + "util.inspect", + "object", + "stringify", + "pretty" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "browser": { + "./util.inspect.js": false + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "./test-core-js.js" + ] + }, + "support": true, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/object-inspect/readme.markdown b/node_modules/object-inspect/readme.markdown new file mode 100644 index 0000000..f91617d --- /dev/null +++ b/node_modules/object-inspect/readme.markdown @@ -0,0 +1,84 @@ +# object-inspect [![Version Badge][npm-version-svg]][package-url] + +string representations of objects in node and the browser + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +# example + +## circular + +``` js +var inspect = require('object-inspect'); +var obj = { a: 1, b: [3,4] }; +obj.c = obj; +console.log(inspect(obj)); +``` + +## dom element + +``` js +var inspect = require('object-inspect'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); +``` + +output: + +``` +[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ] +``` + +# methods + +``` js +var inspect = require('object-inspect') +``` + +## var s = inspect(obj, opts={}) + +Return a string `s` with the string representation of `obj` up to a depth of `opts.depth`. + +Additional options: + - `quoteStyle`: must be "single" or "double", if present. Default `'single'` for strings, `'double'` for HTML elements. + - `maxStringLength`: must be `0`, a positive integer, `Infinity`, or `null`, if present. Default `Infinity`. + - `customInspect`: When `true`, a custom inspect method function will be invoked (either undere the `util.inspect.custom` symbol, or the `inspect` property). When the string `'symbol'`, only the symbol method will be invoked. Default `true`. + - `indent`: must be "\t", `null`, or a positive integer. Default `null`. + - `numericSeparator`: must be a boolean, if present. Default `false`. If `true`, all numbers will be printed with numeric separators (eg, `1234.5678` will be printed as `'1_234.567_8'`) + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install object-inspect +``` + +# license + +MIT + +[package-url]: https://npmjs.org/package/object-inspect +[npm-version-svg]: https://versionbadg.es/inspect-js/object-inspect.svg +[deps-svg]: https://david-dm.org/inspect-js/object-inspect.svg +[deps-url]: https://david-dm.org/inspect-js/object-inspect +[dev-deps-svg]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/object-inspect.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg +[downloads-url]: https://npm-stat.com/charts.html?package=object-inspect +[codecov-image]: https://codecov.io/gh/inspect-js/object-inspect/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/object-inspect/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/object-inspect +[actions-url]: https://github.com/inspect-js/object-inspect/actions diff --git a/node_modules/object-inspect/test-core-js.js b/node_modules/object-inspect/test-core-js.js new file mode 100644 index 0000000..e53c400 --- /dev/null +++ b/node_modules/object-inspect/test-core-js.js @@ -0,0 +1,26 @@ +'use strict'; + +require('core-js'); + +var inspect = require('./'); +var test = require('tape'); + +test('Maps', function (t) { + t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}'); + t.end(); +}); + +test('WeakMaps', function (t) { + t.equal(inspect(new WeakMap([[{}, 2]])), 'WeakMap { ? }'); + t.end(); +}); + +test('Sets', function (t) { + t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}'); + t.end(); +}); + +test('WeakSets', function (t) { + t.equal(inspect(new WeakSet([[1, 2]])), 'WeakSet { ? }'); + t.end(); +}); diff --git a/node_modules/object-inspect/test/bigint.js b/node_modules/object-inspect/test/bigint.js new file mode 100644 index 0000000..4ecc31d --- /dev/null +++ b/node_modules/object-inspect/test/bigint.js @@ -0,0 +1,58 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { + t.test('primitives', function (st) { + st.plan(3); + + st.equal(inspect(BigInt(-256)), '-256n'); + st.equal(inspect(BigInt(0)), '0n'); + st.equal(inspect(BigInt(256)), '256n'); + }); + + t.test('objects', function (st) { + st.plan(3); + + st.equal(inspect(Object(BigInt(-256))), 'Object(-256n)'); + st.equal(inspect(Object(BigInt(0))), 'Object(0n)'); + st.equal(inspect(Object(BigInt(256))), 'Object(256n)'); + }); + + t.test('syntactic primitives', function (st) { + st.plan(3); + + /* eslint-disable no-new-func */ + st.equal(inspect(Function('return -256n')()), '-256n'); + st.equal(inspect(Function('return 0n')()), '0n'); + st.equal(inspect(Function('return 256n')()), '256n'); + }); + + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { + st.plan(1); + + var faker = {}; + faker[Symbol.toStringTag] = 'BigInt'; + st.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'BigInt\' }', + 'object lying about being a BigInt inspects as an object' + ); + }); + + t.test('numericSeparator', function (st) { + st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false'); + st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true'); + + st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true'); + st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/browser/dom.js b/node_modules/object-inspect/test/browser/dom.js new file mode 100644 index 0000000..210c0b2 --- /dev/null +++ b/node_modules/object-inspect/test/browser/dom.js @@ -0,0 +1,15 @@ +var inspect = require('../../'); +var test = require('tape'); + +test('dom element', function (t) { + t.plan(1); + + var d = document.createElement('div'); + d.setAttribute('id', 'beep'); + d.innerHTML = 'woooiiiii'; + + t.equal( + inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]), + '[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]' + ); +}); diff --git a/node_modules/object-inspect/test/circular.js b/node_modules/object-inspect/test/circular.js new file mode 100644 index 0000000..5df4233 --- /dev/null +++ b/node_modules/object-inspect/test/circular.js @@ -0,0 +1,16 @@ +var inspect = require('../'); +var test = require('tape'); + +test('circular', function (t) { + t.plan(2); + var obj = { a: 1, b: [3, 4] }; + obj.c = obj; + t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); + + var double = {}; + double.a = [double]; + double.b = {}; + double.b.inner = double.b; + double.b.obj = double; + t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }'); +}); diff --git a/node_modules/object-inspect/test/deep.js b/node_modules/object-inspect/test/deep.js new file mode 100644 index 0000000..99ce32a --- /dev/null +++ b/node_modules/object-inspect/test/deep.js @@ -0,0 +1,12 @@ +var inspect = require('../'); +var test = require('tape'); + +test('deep', function (t) { + t.plan(4); + var obj = [[[[[[500]]]]]]; + t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]'); + t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]'); + t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]'); + + t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]'); +}); diff --git a/node_modules/object-inspect/test/element.js b/node_modules/object-inspect/test/element.js new file mode 100644 index 0000000..47fa9e2 --- /dev/null +++ b/node_modules/object-inspect/test/element.js @@ -0,0 +1,53 @@ +var inspect = require('../'); +var test = require('tape'); + +test('element', function (t) { + t.plan(3); + var elem = { + nodeName: 'div', + attributes: [{ name: 'class', value: 'row' }], + getAttribute: function (key) { return key; }, + childNodes: [] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); + t.deepEqual(inspect(obj, { quoteStyle: 'single' }), "[ 1,
, 3 ]"); + t.deepEqual(inspect(obj, { quoteStyle: 'double' }), '[ 1,
, 3 ]'); +}); + +test('element no attr', function (t) { + t.plan(1); + var elem = { + nodeName: 'div', + getAttribute: function (key) { return key; }, + childNodes: [] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); +}); + +test('element with contents', function (t) { + t.plan(1); + var elem = { + nodeName: 'div', + getAttribute: function (key) { return key; }, + childNodes: [{ nodeName: 'b' }] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
...
, 3 ]'); +}); + +test('element instance', function (t) { + t.plan(1); + var h = global.HTMLElement; + global.HTMLElement = function (name, attr) { + this.nodeName = name; + this.attributes = attr; + }; + global.HTMLElement.prototype.getAttribute = function () {}; + + var elem = new global.HTMLElement('div', []); + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); + global.HTMLElement = h; +}); diff --git a/node_modules/object-inspect/test/err.js b/node_modules/object-inspect/test/err.js new file mode 100644 index 0000000..cc1d884 --- /dev/null +++ b/node_modules/object-inspect/test/err.js @@ -0,0 +1,48 @@ +var test = require('tape'); +var ErrorWithCause = require('error-cause/Error'); + +var inspect = require('../'); + +test('type error', function (t) { + t.plan(1); + var aerr = new TypeError(); + aerr.foo = 555; + aerr.bar = [1, 2, 3]; + + var berr = new TypeError('tuv'); + berr.baz = 555; + + var cerr = new SyntaxError(); + cerr.message = 'whoa'; + cerr['a-b'] = 5; + + var withCause = new ErrorWithCause('foo', { cause: 'bar' }); + var withCausePlus = new ErrorWithCause('foo', { cause: 'bar' }); + withCausePlus.foo = 'bar'; + var withUndefinedCause = new ErrorWithCause('foo', { cause: undefined }); + var withEnumerableCause = new Error('foo'); + withEnumerableCause.cause = 'bar'; + + var obj = [ + new TypeError(), + new TypeError('xxx'), + aerr, + berr, + cerr, + withCause, + withCausePlus, + withUndefinedCause, + withEnumerableCause + ]; + t.equal(inspect(obj), '[ ' + [ + '[TypeError]', + '[TypeError: xxx]', + '{ [TypeError] foo: 555, bar: [ 1, 2, 3 ] }', + '{ [TypeError: tuv] baz: 555 }', + '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: \'bar\' }', + '{ [Error: foo] ' + ('cause' in Error.prototype ? '' : '[cause]: \'bar\', ') + 'foo: \'bar\' }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: undefined }', + '{ [Error: foo] cause: \'bar\' }' + ].join(', ') + ' ]'); +}); diff --git a/node_modules/object-inspect/test/fakes.js b/node_modules/object-inspect/test/fakes.js new file mode 100644 index 0000000..a65c08c --- /dev/null +++ b/node_modules/object-inspect/test/fakes.js @@ -0,0 +1,29 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); +var forEach = require('for-each'); + +test('fakes', { skip: !hasToStringTag }, function (t) { + forEach([ + 'Array', + 'Boolean', + 'Date', + 'Error', + 'Number', + 'RegExp', + 'String' + ], function (expected) { + var faker = {}; + faker[Symbol.toStringTag] = expected; + + t.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'' + expected + '\' }', + 'faker masquerading as ' + expected + ' is not shown as one' + ); + }); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/fn.js b/node_modules/object-inspect/test/fn.js new file mode 100644 index 0000000..de3ca62 --- /dev/null +++ b/node_modules/object-inspect/test/fn.js @@ -0,0 +1,76 @@ +var inspect = require('../'); +var test = require('tape'); +var arrow = require('make-arrow-function')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +test('function', function (t) { + t.plan(1); + var obj = [1, 2, function f(n) { return n; }, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function: f], 4 ]'); +}); + +test('function name', function (t) { + t.plan(1); + var f = (function () { + return function () {}; + }()); + f.toString = function toStr() { return 'function xxx () {}'; }; + var obj = [1, 2, f, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)] { toString: [Function: toStr] }, 4 ]'); +}); + +test('anon function', function (t) { + var f = (function () { + return function () {}; + }()); + var obj = [1, 2, f, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)], 4 ]'); + + t.end(); +}); + +test('arrow function', { skip: !arrow }, function (t) { + t.equal(inspect(arrow), '[Function (anonymous)]'); + + t.end(); +}); + +test('truly nameless function', { skip: !arrow || !functionsHaveConfigurableNames }, function (t) { + function f() {} + Object.defineProperty(f, 'name', { value: false }); + t.equal(f.name, false); + t.equal( + inspect(f), + '[Function: f]', + 'named function with falsy `.name` does not hide its original name' + ); + + function g() {} + Object.defineProperty(g, 'name', { value: true }); + t.equal(g.name, true); + t.equal( + inspect(g), + '[Function: true]', + 'named function with truthy `.name` hides its original name' + ); + + var anon = function () {}; // eslint-disable-line func-style + Object.defineProperty(anon, 'name', { value: null }); + t.equal(anon.name, null); + t.equal( + inspect(anon), + '[Function (anonymous)]', + 'anon function with falsy `.name` does not hide its anonymity' + ); + + var anon2 = function () {}; // eslint-disable-line func-style + Object.defineProperty(anon2, 'name', { value: 1 }); + t.equal(anon2.name, 1); + t.equal( + inspect(anon2), + '[Function: 1]', + 'anon function with truthy `.name` hides its anonymity' + ); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/global.js b/node_modules/object-inspect/test/global.js new file mode 100644 index 0000000..c57216a --- /dev/null +++ b/node_modules/object-inspect/test/global.js @@ -0,0 +1,17 @@ +'use strict'; + +var inspect = require('../'); + +var test = require('tape'); +var globalThis = require('globalthis')(); + +test('global object', function (t) { + /* eslint-env browser */ + var expected = typeof window === 'undefined' ? 'globalThis' : 'Window'; + t.equal( + inspect([globalThis]), + '[ { [object ' + expected + '] } ]' + ); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/has.js b/node_modules/object-inspect/test/has.js new file mode 100644 index 0000000..01800de --- /dev/null +++ b/node_modules/object-inspect/test/has.js @@ -0,0 +1,15 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var mockProperty = require('mock-property'); + +test('when Object#hasOwnProperty is deleted', function (t) { + t.plan(1); + var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays + + t.teardown(mockProperty(Array.prototype, 1, { value: 2 })); // this is needed to account for "in" vs "hasOwnProperty" + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); + + t.equal(inspect(arr), '[ 1, , 3 ]'); +}); diff --git a/node_modules/object-inspect/test/holes.js b/node_modules/object-inspect/test/holes.js new file mode 100644 index 0000000..87fc8c8 --- /dev/null +++ b/node_modules/object-inspect/test/holes.js @@ -0,0 +1,15 @@ +var test = require('tape'); +var inspect = require('../'); + +var xs = ['a', 'b']; +xs[5] = 'f'; +xs[7] = 'j'; +xs[8] = 'k'; + +test('holes', function (t) { + t.plan(1); + t.equal( + inspect(xs), + "[ 'a', 'b', , , , 'f', , 'j', 'k' ]" + ); +}); diff --git a/node_modules/object-inspect/test/indent-option.js b/node_modules/object-inspect/test/indent-option.js new file mode 100644 index 0000000..89d8fce --- /dev/null +++ b/node_modules/object-inspect/test/indent-option.js @@ -0,0 +1,271 @@ +var test = require('tape'); +var forEach = require('for-each'); + +var inspect = require('../'); + +test('bad indent options', function (t) { + forEach([ + undefined, + true, + false, + -1, + 1.2, + Infinity, + -Infinity, + NaN + ], function (indent) { + t['throws']( + function () { inspect('', { indent: indent }); }, + TypeError, + inspect(indent) + ' is invalid' + ); + }); + + t.end(); +}); + +test('simple object with indent', function (t) { + t.plan(2); + + var obj = { a: 1, b: 2 }; + + var expectedSpaces = [ + '{', + ' a: 1,', + ' b: 2', + '}' + ].join('\n'); + var expectedTabs = [ + '{', + ' a: 1,', + ' b: 2', + '}' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('two deep object with indent', function (t) { + t.plan(2); + + var obj = { a: 1, b: { c: 3, d: 4 } }; + + var expectedSpaces = [ + '{', + ' a: 1,', + ' b: {', + ' c: 3,', + ' d: 4', + ' }', + '}' + ].join('\n'); + var expectedTabs = [ + '{', + ' a: 1,', + ' b: {', + ' c: 3,', + ' d: 4', + ' }', + '}' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('simple array with all single line elements', function (t) { + t.plan(2); + + var obj = [1, 2, 3, 'asdf\nsdf']; + + var expected = '[ 1, 2, 3, \'asdf\\nsdf\' ]'; + + t.equal(inspect(obj, { indent: 2 }), expected, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expected, 'tabs'); +}); + +test('array with complex elements', function (t) { + t.plan(2); + + var obj = [1, { a: 1, b: { c: 1 } }, 'asdf\nsdf']; + + var expectedSpaces = [ + '[', + ' 1,', + ' {', + ' a: 1,', + ' b: {', + ' c: 1', + ' }', + ' },', + ' \'asdf\\nsdf\'', + ']' + ].join('\n'); + var expectedTabs = [ + '[', + ' 1,', + ' {', + ' a: 1,', + ' b: {', + ' c: 1', + ' }', + ' },', + ' \'asdf\\nsdf\'', + ']' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('values', function (t) { + t.plan(2); + var obj = [{}, [], { 'a-b': 5 }]; + + var expectedSpaces = [ + '[', + ' {},', + ' [],', + ' {', + ' \'a-b\': 5', + ' }', + ']' + ].join('\n'); + var expectedTabs = [ + '[', + ' {},', + ' [],', + ' {', + ' \'a-b\': 5', + ' }', + ']' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('Map', { skip: typeof Map !== 'function' }, function (t) { + var map = new Map(); + map.set({ a: 1 }, ['b']); + map.set(3, NaN); + + var expectedStringSpaces = [ + 'Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + '}' + ].join('\n'); + var expectedStringTabs = [ + 'Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + '}' + ].join('\n'); + var expectedStringTabsDoubleQuotes = [ + 'Map (2) {', + ' { a: 1 } => [ "b" ],', + ' 3 => NaN', + '}' + ].join('\n'); + + t.equal( + inspect(map, { indent: 2 }), + expectedStringSpaces, + 'Map keys are not indented (two)' + ); + t.equal( + inspect(map, { indent: '\t' }), + expectedStringTabs, + 'Map keys are not indented (tabs)' + ); + t.equal( + inspect(map, { indent: '\t', quoteStyle: 'double' }), + expectedStringTabsDoubleQuotes, + 'Map keys are not indented (tabs + double quotes)' + ); + + t.equal(inspect(new Map(), { indent: 2 }), 'Map (0) {}', 'empty Map should show as empty (two)'); + t.equal(inspect(new Map(), { indent: '\t' }), 'Map (0) {}', 'empty Map should show as empty (tabs)'); + + var nestedMap = new Map(); + nestedMap.set(nestedMap, map); + var expectedNestedSpaces = [ + 'Map (1) {', + ' [Circular] => Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + ' }', + '}' + ].join('\n'); + var expectedNestedTabs = [ + 'Map (1) {', + ' [Circular] => Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + ' }', + '}' + ].join('\n'); + t.equal(inspect(nestedMap, { indent: 2 }), expectedNestedSpaces, 'Map containing a Map should work (two)'); + t.equal(inspect(nestedMap, { indent: '\t' }), expectedNestedTabs, 'Map containing a Map should work (tabs)'); + + t.end(); +}); + +test('Set', { skip: typeof Set !== 'function' }, function (t) { + var set = new Set(); + set.add({ a: 1 }); + set.add(['b']); + var expectedStringSpaces = [ + 'Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + '}' + ].join('\n'); + var expectedStringTabs = [ + 'Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + '}' + ].join('\n'); + t.equal(inspect(set, { indent: 2 }), expectedStringSpaces, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (two)'); + t.equal(inspect(set, { indent: '\t' }), expectedStringTabs, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (tabs)'); + + t.equal(inspect(new Set(), { indent: 2 }), 'Set (0) {}', 'empty Set should show as empty (two)'); + t.equal(inspect(new Set(), { indent: '\t' }), 'Set (0) {}', 'empty Set should show as empty (tabs)'); + + var nestedSet = new Set(); + nestedSet.add(set); + nestedSet.add(nestedSet); + var expectedNestedSpaces = [ + 'Set (2) {', + ' Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + ' },', + ' [Circular]', + '}' + ].join('\n'); + var expectedNestedTabs = [ + 'Set (2) {', + ' Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + ' },', + ' [Circular]', + '}' + ].join('\n'); + t.equal(inspect(nestedSet, { indent: 2 }), expectedNestedSpaces, 'Set containing a Set should work (two)'); + t.equal(inspect(nestedSet, { indent: '\t' }), expectedNestedTabs, 'Set containing a Set should work (tabs)'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/inspect.js b/node_modules/object-inspect/test/inspect.js new file mode 100644 index 0000000..1abf81b --- /dev/null +++ b/node_modules/object-inspect/test/inspect.js @@ -0,0 +1,139 @@ +var test = require('tape'); +var hasSymbols = require('has-symbols/shams')(); +var utilInspect = require('../util.inspect'); +var repeat = require('string.prototype.repeat'); + +var inspect = require('..'); + +test('inspect', function (t) { + t.plan(5); + + var obj = [{ inspect: function xyzInspect() { return '!XYZ¡'; } }, []]; + var stringResult = '[ !XYZ¡, [] ]'; + var falseResult = '[ { inspect: [Function: xyzInspect] }, [] ]'; + + t.equal(inspect(obj), stringResult); + t.equal(inspect(obj, { customInspect: true }), stringResult); + t.equal(inspect(obj, { customInspect: 'symbol' }), falseResult); + t.equal(inspect(obj, { customInspect: false }), falseResult); + t['throws']( + function () { inspect(obj, { customInspect: 'not a boolean or "symbol"' }); }, + TypeError, + '`customInspect` must be a boolean or the string "symbol"' + ); +}); + +test('inspect custom symbol', { skip: !hasSymbols || !utilInspect || !utilInspect.custom }, function (t) { + t.plan(4); + + var obj = { inspect: function stringInspect() { return 'string'; } }; + obj[utilInspect.custom] = function custom() { return 'symbol'; }; + + var symbolResult = '[ symbol, [] ]'; + var stringResult = '[ string, [] ]'; + var falseResult = '[ { inspect: [Function: stringInspect]' + (utilInspect.custom ? ', [' + inspect(utilInspect.custom) + ']: [Function: custom]' : '') + ' }, [] ]'; + + var symbolStringFallback = utilInspect.custom ? symbolResult : stringResult; + var symbolFalseFallback = utilInspect.custom ? symbolResult : falseResult; + + t.equal(inspect([obj, []]), symbolStringFallback); + t.equal(inspect([obj, []], { customInspect: true }), symbolStringFallback); + t.equal(inspect([obj, []], { customInspect: 'symbol' }), symbolFalseFallback); + t.equal(inspect([obj, []], { customInspect: false }), falseResult); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + t.plan(2); + + var obj = { a: 1 }; + obj[Symbol('test')] = 2; + obj[Symbol.iterator] = 3; + Object.defineProperty(obj, Symbol('non-enum'), { + enumerable: false, + value: 4 + }); + + if (typeof Symbol.iterator === 'symbol') { + t.equal(inspect(obj), '{ a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }', 'object with symbols'); + t.equal(inspect([obj, []]), '[ { a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }, [] ]', 'object with symbols in array'); + } else { + // symbol sham key ordering is unreliable + t.match( + inspect(obj), + /^(?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 })$/, + 'object with symbols (nondeterministic symbol sham key ordering)' + ); + t.match( + inspect([obj, []]), + /^\[ (?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 }), \[\] \]$/, + 'object with symbols in array (nondeterministic symbol sham key ordering)' + ); + } +}); + +test('maxStringLength', function (t) { + t['throws']( + function () { inspect('', { maxStringLength: -1 }); }, + TypeError, + 'maxStringLength must be >= 0, or Infinity, not negative' + ); + + var str = repeat('a', 1e8); + + t.equal( + inspect([str], { maxStringLength: 10 }), + '[ \'aaaaaaaaaa\'... 99999990 more characters ]', + 'maxStringLength option limits output' + ); + + t.equal( + inspect(['f'], { maxStringLength: null }), + '[ \'\'... 1 more character ]', + 'maxStringLength option accepts `null`' + ); + + t.equal( + inspect([str], { maxStringLength: Infinity }), + '[ \'' + str + '\' ]', + 'maxStringLength option accepts ∞' + ); + + t.end(); +}); + +test('inspect options', { skip: !utilInspect.custom }, function (t) { + var obj = {}; + obj[utilInspect.custom] = function () { + return JSON.stringify(arguments); + }; + t.equal( + inspect(obj), + utilInspect(obj, { depth: 5 }), + 'custom symbols will use node\'s inspect' + ); + t.equal( + inspect(obj, { depth: 2 }), + utilInspect(obj, { depth: 2 }), + 'a reduced depth will be passed to node\'s inspect' + ); + t.equal( + inspect({ d1: obj }, { depth: 3 }), + '{ d1: ' + utilInspect(obj, { depth: 2 }) + ' }', + 'deep objects will receive a reduced depth' + ); + t.equal( + inspect({ d1: obj }, { depth: 1 }), + '{ d1: [Object] }', + 'unlike nodejs inspect, customInspect will not be used once the depth is exceeded.' + ); + t.end(); +}); + +test('inspect URL', { skip: typeof URL === 'undefined' }, function (t) { + t.match( + inspect(new URL('https://nodejs.org')), + /nodejs\.org/, // Different environments stringify it differently + 'url can be inspected' + ); + t.end(); +}); diff --git a/node_modules/object-inspect/test/lowbyte.js b/node_modules/object-inspect/test/lowbyte.js new file mode 100644 index 0000000..68a345d --- /dev/null +++ b/node_modules/object-inspect/test/lowbyte.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { x: 'a\r\nb', y: '\x05! \x1f \x12' }; + +test('interpolate low bytes', function (t) { + t.plan(1); + t.equal( + inspect(obj), + "{ x: 'a\\r\\nb', y: '\\x05! \\x1F \\x12' }" + ); +}); diff --git a/node_modules/object-inspect/test/number.js b/node_modules/object-inspect/test/number.js new file mode 100644 index 0000000..8f287e8 --- /dev/null +++ b/node_modules/object-inspect/test/number.js @@ -0,0 +1,58 @@ +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); + +var inspect = require('../'); + +test('negative zero', function (t) { + t.equal(inspect(0), '0', 'inspect(0) === "0"'); + t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"'); + + t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"'); + t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"'); + + t.end(); +}); + +test('numericSeparator', function (t) { + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { inspect(true, { numericSeparator: nonBoolean }); }, + TypeError, + inspect(nonBoolean) + ' is not a boolean' + ); + }); + + t.test('3 digit numbers', function (st) { + var failed = false; + for (var i = -999; i < 1000; i += 1) { + var actual = inspect(i); + var actualSepNo = inspect(i, { numericSeparator: false }); + var actualSepYes = inspect(i, { numericSeparator: true }); + var expected = String(i); + if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) { + failed = true; + t.equal(actual, expected); + t.equal(actualSepNo, expected); + t.equal(actualSepYes, expected); + } + } + + st.notOk(failed, 'all 3 digit numbers passed'); + + st.end(); + }); + + t.equal(inspect(1e3), '1000', '1000'); + t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false'); + t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true'); + t.equal(inspect(-1e3), '-1000', '-1000'); + t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false'); + t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true'); + + t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators'); + t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators'); + t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/quoteStyle.js b/node_modules/object-inspect/test/quoteStyle.js new file mode 100644 index 0000000..ae4d734 --- /dev/null +++ b/node_modules/object-inspect/test/quoteStyle.js @@ -0,0 +1,17 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); + +test('quoteStyle option', function (t) { + t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/toStringTag.js b/node_modules/object-inspect/test/toStringTag.js new file mode 100644 index 0000000..95f8270 --- /dev/null +++ b/node_modules/object-inspect/test/toStringTag.js @@ -0,0 +1,40 @@ +'use strict'; + +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); + +var inspect = require('../'); + +test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) { + t.plan(4); + + var obj = { a: 1 }; + t.equal(inspect(obj), '{ a: 1 }', 'object, no Symbol.toStringTag'); + + obj[Symbol.toStringTag] = 'foo'; + t.equal(inspect(obj), '{ a: 1, [Symbol(Symbol.toStringTag)]: \'foo\' }', 'object with Symbol.toStringTag'); + + t.test('null objects', { skip: 'toString' in { __proto__: null } }, function (st) { + st.plan(2); + + var dict = { __proto__: null, a: 1 }; + st.equal(inspect(dict), '[Object: null prototype] { a: 1 }', 'null object with Symbol.toStringTag'); + + dict[Symbol.toStringTag] = 'Dict'; + st.equal(inspect(dict), '[Dict: null prototype] { a: 1, [Symbol(Symbol.toStringTag)]: \'Dict\' }', 'null object with Symbol.toStringTag'); + }); + + t.test('instances', function (st) { + st.plan(4); + + function C() { + this.a = 1; + } + st.equal(Object.prototype.toString.call(new C()), '[object Object]', 'instance, no toStringTag, Object.prototype.toString'); + st.equal(inspect(new C()), 'C { a: 1 }', 'instance, no toStringTag'); + + C.prototype[Symbol.toStringTag] = 'Class!'; + st.equal(Object.prototype.toString.call(new C()), '[object Class!]', 'instance, with toStringTag, Object.prototype.toString'); + st.equal(inspect(new C()), 'C [Class!] { a: 1 }', 'instance, with toStringTag'); + }); +}); diff --git a/node_modules/object-inspect/test/undef.js b/node_modules/object-inspect/test/undef.js new file mode 100644 index 0000000..e3f4961 --- /dev/null +++ b/node_modules/object-inspect/test/undef.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { a: 1, b: [3, 4, undefined, null], c: undefined, d: null }; + +test('undef and null', function (t) { + t.plan(1); + t.equal( + inspect(obj), + '{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }' + ); +}); diff --git a/node_modules/object-inspect/test/values.js b/node_modules/object-inspect/test/values.js new file mode 100644 index 0000000..4832b9f --- /dev/null +++ b/node_modules/object-inspect/test/values.js @@ -0,0 +1,211 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var mockProperty = require('mock-property'); +var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('values', function (t) { + t.plan(1); + var obj = [{}, [], { 'a-b': 5 }]; + t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]'); +}); + +test('arrays with properties', function (t) { + t.plan(1); + var arr = [3]; + arr.foo = 'bar'; + var obj = [1, 2, arr]; + obj.baz = 'quux'; + obj.index = -1; + t.equal(inspect(obj), '[ 1, 2, [ 3, foo: \'bar\' ], baz: \'quux\', index: -1 ]'); +}); + +test('has', function (t) { + t.plan(1); + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); + + t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }'); +}); + +test('indexOf seen', function (t) { + t.plan(1); + var xs = [1, 2, 3, {}]; + xs.push(xs); + + var seen = []; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[ 1, 2, 3, {}, [Circular] ]' + ); +}); + +test('seen seen', function (t) { + t.plan(1); + var xs = [1, 2, 3]; + + var seen = [xs]; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[Circular]' + ); +}); + +test('seen seen seen', function (t) { + t.plan(1); + var xs = [1, 2, 3]; + + var seen = [5, xs]; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[Circular]' + ); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + var sym = Symbol('foo'); + t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"'); + if (typeof sym === 'symbol') { + // Symbol shams are incapable of differentiating boxed from unboxed symbols + t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"'); + } + + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { + st.plan(1); + + var faker = {}; + faker[Symbol.toStringTag] = 'Symbol'; + st.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'Symbol\' }', + 'object lying about being a Symbol inspects as an object' + ); + }); + + t.end(); +}); + +test('Map', { skip: typeof Map !== 'function' }, function (t) { + var map = new Map(); + map.set({ a: 1 }, ['b']); + map.set(3, NaN); + var expectedString = 'Map (2) {' + inspect({ a: 1 }) + ' => ' + inspect(['b']) + ', 3 => NaN}'; + t.equal(inspect(map), expectedString, 'new Map([[{ a: 1 }, ["b"]], [3, NaN]]) should show size and contents'); + t.equal(inspect(new Map()), 'Map (0) {}', 'empty Map should show as empty'); + + var nestedMap = new Map(); + nestedMap.set(nestedMap, map); + t.equal(inspect(nestedMap), 'Map (1) {[Circular] => ' + expectedString + '}', 'Map containing a Map should work'); + + t.end(); +}); + +test('WeakMap', { skip: typeof WeakMap !== 'function' }, function (t) { + var map = new WeakMap(); + map.set({ a: 1 }, ['b']); + var expectedString = 'WeakMap { ? }'; + t.equal(inspect(map), expectedString, 'new WeakMap([[{ a: 1 }, ["b"]]]) should not show size or contents'); + t.equal(inspect(new WeakMap()), 'WeakMap { ? }', 'empty WeakMap should not show as empty'); + + t.end(); +}); + +test('Set', { skip: typeof Set !== 'function' }, function (t) { + var set = new Set(); + set.add({ a: 1 }); + set.add(['b']); + var expectedString = 'Set (2) {' + inspect({ a: 1 }) + ', ' + inspect(['b']) + '}'; + t.equal(inspect(set), expectedString, 'new Set([{ a: 1 }, ["b"]]) should show size and contents'); + t.equal(inspect(new Set()), 'Set (0) {}', 'empty Set should show as empty'); + + var nestedSet = new Set(); + nestedSet.add(set); + nestedSet.add(nestedSet); + t.equal(inspect(nestedSet), 'Set (2) {' + expectedString + ', [Circular]}', 'Set containing a Set should work'); + + t.end(); +}); + +test('WeakSet', { skip: typeof WeakSet !== 'function' }, function (t) { + var map = new WeakSet(); + map.add({ a: 1 }); + var expectedString = 'WeakSet { ? }'; + t.equal(inspect(map), expectedString, 'new WeakSet([{ a: 1 }]) should not show size or contents'); + t.equal(inspect(new WeakSet()), 'WeakSet { ? }', 'empty WeakSet should not show as empty'); + + t.end(); +}); + +test('WeakRef', { skip: typeof WeakRef !== 'function' }, function (t) { + var ref = new WeakRef({ a: 1 }); + var expectedString = 'WeakRef { ? }'; + t.equal(inspect(ref), expectedString, 'new WeakRef({ a: 1 }) should not show contents'); + + t.end(); +}); + +test('FinalizationRegistry', { skip: typeof FinalizationRegistry !== 'function' }, function (t) { + var registry = new FinalizationRegistry(function () {}); + var expectedString = 'FinalizationRegistry [FinalizationRegistry] {}'; + t.equal(inspect(registry), expectedString, 'new FinalizationRegistry(function () {}) should work normallys'); + + t.end(); +}); + +test('Strings', function (t) { + var str = 'abc'; + + t.equal(inspect(str), "'" + str + "'", 'primitive string shows as such'); + t.equal(inspect(str, { quoteStyle: 'single' }), "'" + str + "'", 'primitive string shows as such, single quoted'); + t.equal(inspect(str, { quoteStyle: 'double' }), '"' + str + '"', 'primitive string shows as such, double quoted'); + t.equal(inspect(Object(str)), 'Object(' + inspect(str) + ')', 'String object shows as such'); + t.equal(inspect(Object(str), { quoteStyle: 'single' }), 'Object(' + inspect(str, { quoteStyle: 'single' }) + ')', 'String object shows as such, single quoted'); + t.equal(inspect(Object(str), { quoteStyle: 'double' }), 'Object(' + inspect(str, { quoteStyle: 'double' }) + ')', 'String object shows as such, double quoted'); + + t.end(); +}); + +test('Numbers', function (t) { + var num = 42; + + t.equal(inspect(num), String(num), 'primitive number shows as such'); + t.equal(inspect(Object(num)), 'Object(' + inspect(num) + ')', 'Number object shows as such'); + + t.end(); +}); + +test('Booleans', function (t) { + t.equal(inspect(true), String(true), 'primitive true shows as such'); + t.equal(inspect(Object(true)), 'Object(' + inspect(true) + ')', 'Boolean object true shows as such'); + + t.equal(inspect(false), String(false), 'primitive false shows as such'); + t.equal(inspect(Object(false)), 'Object(' + inspect(false) + ')', 'Boolean false object shows as such'); + + t.end(); +}); + +test('Date', function (t) { + var now = new Date(); + t.equal(inspect(now), String(now), 'Date shows properly'); + t.equal(inspect(new Date(NaN)), 'Invalid Date', 'Invalid Date shows properly'); + + t.end(); +}); + +test('RegExps', function (t) { + t.equal(inspect(/a/g), '/a/g', 'regex shows properly'); + t.equal(inspect(new RegExp('abc', 'i')), '/abc/i', 'new RegExp shows properly'); + + var match = 'abc abc'.match(/[ab]+/); + delete match.groups; // for node < 10 + t.equal(inspect(match), '[ \'ab\', index: 0, input: \'abc abc\' ]', 'RegExp match object shows properly'); + + t.end(); +}); diff --git a/node_modules/object-inspect/util.inspect.js b/node_modules/object-inspect/util.inspect.js new file mode 100644 index 0000000..7784fab --- /dev/null +++ b/node_modules/object-inspect/util.inspect.js @@ -0,0 +1 @@ +module.exports = require('util').inspect; diff --git a/node_modules/object-keys/.editorconfig b/node_modules/object-keys/.editorconfig new file mode 100644 index 0000000..eaa2141 --- /dev/null +++ b/node_modules/object-keys/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/object-keys/.eslintrc b/node_modules/object-keys/.eslintrc new file mode 100644 index 0000000..9a8d5b0 --- /dev/null +++ b/node_modules/object-keys/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 23], + "id-length": [2, { "min": 1, "max": 40 }], + "max-params": [2, 3], + "max-statements": [2, 23], + "max-statements-per-line": [2, { "max": 2 }], + "no-extra-parens": [1], + "no-invalid-this": [1], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "after"] + } +} diff --git a/node_modules/object-keys/.travis.yml b/node_modules/object-keys/.travis.yml new file mode 100644 index 0000000..94a6ce4 --- /dev/null +++ b/node_modules/object-keys/.travis.yml @@ -0,0 +1,277 @@ +language: node_js +os: + - linux +node_js: + - "11.8" + - "10.15" + - "9.11" + - "8.15" + - "7.10" + - "6.16" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "11.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "11.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.15" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.14" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true + - env: POSTTEST=true diff --git a/node_modules/object-keys/CHANGELOG.md b/node_modules/object-keys/CHANGELOG.md new file mode 100644 index 0000000..b7d92df --- /dev/null +++ b/node_modules/object-keys/CHANGELOG.md @@ -0,0 +1,232 @@ +1.1.1 / 2019-04-06 +================= + * [Fix] exclude deprecated Firefox keys (#53) + +1.1.0 / 2019-02-10 +================= + * [New] [Refactor] move full implementation to `implementation` entry point + * [Refactor] only evaluate the implementation if `Object.keys` is not present + * [Tests] up to `node` `v11.8`, `v10.15`, `v8.15`, `v6.16` + * [Tests] remove jscs + * [Tests] switch to `npm audit` from `nsp` + +1.0.12 / 2018-06-18 +================= + * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46) + +1.0.11 / 2016-07-05 +================= + * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32) + +1.0.10 / 2016-07-04 +================= + * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31) + * [Fix] In IE 6, `window.external` makes `Object.keys` throw + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] remove unused eccheck script + dep + +1.0.9 / 2015-10-19 +================= + * [Fix] Blacklist 'frame' property on window (#16, #17) + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` + +1.0.8 / 2015-10-14 +================= + * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327) + * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322) + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs` + +1.0.7 / 2015-07-18 +================= + * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8. + * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15) + * [Tests] Improve test output for automation equality bugfix + * [Tests] Test on `io.js` `v2.4` + +1.0.6 / 2015-07-09 +================= + * [Fix] Use an object lookup rather than ES5's `indexOf` (#14) + * [Tests] ES3 browsers don't have `Array.isArray` + * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs. + +1.0.5 / 2015-07-03 +================= + * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws + * [Tests] Test up to `io.js` `v2.3` + * [Dev Deps] Update `nsp`, `eslint` + +1.0.4 / 2015-05-23 +================= + * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments` + * Test on latest `node` and `io.js` + * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert` + +1.0.3 / 2015-01-06 +================= + * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance + +1.0.2 / 2014-12-28 +================= + * Update lots of dev dependencies + * Tweaks to README + * Make `object-keys` more robust against later environment tampering + +1.0.1 / 2014-09-03 +================= + * Update URLs and badges in README + +1.0.0 / 2014-08-26 +================= + * v1.0.0 + +0.6.1 / 2014-08-25 +================= + * v0.6.1 + * Updating dependencies (tape, covert, is) + * Update badges in readme + * Use separate var statements + +0.6.0 / 2014-04-23 +================= + * v0.6.0 + * Updating dependencies (tape, covert) + * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers + * Improve test matrix: test all node versions, but only latest two stables are a failure + * Remove internal foreach shim. + +0.5.1 / 2014-03-09 +================= + * 0.5.1 + * Updating dependencies (tape, covert, is) + * Removing forEach from the module (but keeping it in tests) + +0.5.0 / 2014-01-30 +================= + * 0.5.0 + * Explicitly returning the shim, instead of returning native Object.keys when present + * Adding a changelog. + * Cleaning up IIFE wrapping + * Testing on node 0.4 through 0.11 + +0.4.0 / 2013-08-14 +================== + + * v0.4.0 + * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function' + * If it's a string, make sure to use charAt instead of brackets. + * Only use Function#call if necessary. + * Making sure the context tests actually run. + * Better function detection + * Adding the android browser + * Fixing testling files + * Updating tape + * Removing the "is" dependency. + * Making an isArguments shim. + * Adding a local forEach shim and tests. + * Updating paths. + * Moving the shim test. + * v0.3.0 + +0.3.0 / 2013-05-18 +================== + + * README tweak. + * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5). + * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5) + * Updating readme. + * Updating dependencies. + * Giving credit to lodash. + * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2). + * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding node 0.10 to travis. + * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3) + * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2) + * Moving "indexof" and "is" to be dev dependencies. + * Making sure the shim works with functions. + * Flattening the tests. + +0.2.0 / 2013-05-10 +================== + + * v0.2.0 + * Object.keys should work with arrays. + +0.1.8 / 2013-05-10 +================== + + * v0.1.8 + * Upgrading dependencies. + * Using a simpler check. + * Fixing a bug in hasDontEnumBug browsers. + * Using the newest tape! + * Fixing this error test. + * "undefined" is probably a reserved word in ES3. + * Better test message. + +0.1.7 / 2013-04-17 +================== + + * Upgrading "is" once more. + * The key "null" is breaking some browsers. + +0.1.6 / 2013-04-17 +================== + + * v0.1.6 + * Upgrading "is" + +0.1.5 / 2013-04-14 +================== + + * Bumping version. + * Adding more testling browsers. + * Updating "is" + +0.1.4 / 2013-04-08 +================== + + * Using "is" instead of "is-extended". + +0.1.3 / 2013-04-07 +================== + + * Using "foreach" instead of my own shim. + * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug. + +0.1.2 / 2013-04-03 +================== + + * Adding dependency status; moving links to an index at the bottom. + * Upgrading is-extended; version 0.1.2 + * Adding an npm version badge. + +0.1.1 / 2013-04-01 +================== + + * Adding Travis CI. + * Bumping the version. + * Adding indexOf since IE sucks. + * Adding a forEach shim since older browsers don't have Array#forEach. + * Upgrading tape - 0.3.2 uses Array#map + * Using explicit end instead of plan. + * Can't test with Array.isArray in older browsers. + * Using is-extended. + * Fixing testling files. + * JSHint/JSLint-ing. + * Removing an unused object. + * Using strict mode. + +0.1.0 / 2013-03-30 +================== + + * Changing the exports should have meant a higher version bump. + * Oops, fixing the repo URL. + * Adding more tests. + * 0.0.2 + * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1) + * Move shim export to a separate file. diff --git a/node_modules/object-keys/LICENSE b/node_modules/object-keys/LICENSE new file mode 100644 index 0000000..28553fd --- /dev/null +++ b/node_modules/object-keys/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/object-keys/README.md b/node_modules/object-keys/README.md new file mode 100644 index 0000000..ed4c277 --- /dev/null +++ b/node_modules/object-keys/README.md @@ -0,0 +1,76 @@ +#object-keys [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable. + +Most common usage: +```js +var keys = Object.keys || require('object-keys'); +``` + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.deepEqual(keys(obj), ['a', 'b', 'c']); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is not present */ +delete Object.keys; +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is present */ +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, Object.keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +## Source +Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url]. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/object-keys +[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg +[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg +[travis-url]: https://travis-ci.org/ljharb/object-keys +[deps-svg]: https://david-dm.org/ljharb/object-keys.svg +[deps-url]: https://david-dm.org/ljharb/object-keys +[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/object-keys.png +[testling-url]: https://ci.testling.com/ljharb/object-keys +[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589 +[lodash-url]: https://github.com/lodash/lodash +[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object-keys.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object-keys + diff --git a/node_modules/object-keys/implementation.js b/node_modules/object-keys/implementation.js new file mode 100644 index 0000000..5b32986 --- /dev/null +++ b/node_modules/object-keys/implementation.js @@ -0,0 +1,122 @@ +'use strict'; + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = require('./isArguments'); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; diff --git a/node_modules/object-keys/index.js b/node_modules/object-keys/index.js new file mode 100644 index 0000000..a43807d --- /dev/null +++ b/node_modules/object-keys/index.js @@ -0,0 +1,32 @@ +'use strict'; + +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; diff --git a/node_modules/object-keys/isArguments.js b/node_modules/object-keys/isArguments.js new file mode 100644 index 0000000..f2a2a90 --- /dev/null +++ b/node_modules/object-keys/isArguments.js @@ -0,0 +1,17 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json new file mode 100644 index 0000000..99ea923 --- /dev/null +++ b/node_modules/object-keys/package.json @@ -0,0 +1,88 @@ +{ + "name": "object-keys", + "version": "1.1.1", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + { + "name": "Ivan Starkov", + "email": "istarkov@gmail.com" + }, + { + "name": "Gary Katsevman", + "email": "git@gkatsev.com" + } + ], + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent audit", + "tests-only": "node test/index.js", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "eslint .", + "preaudit": "npm install --package-lock --package-lock-only", + "audit": "npm audit", + "postaudit": "rm package-lock.json" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^13.1.1", + "covert": "^1.1.1", + "eslint": "^5.13.0", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.3.0", + "tape": "^4.9.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/object-keys/test/index.js b/node_modules/object-keys/test/index.js new file mode 100644 index 0000000..5402465 --- /dev/null +++ b/node_modules/object-keys/test/index.js @@ -0,0 +1,5 @@ +'use strict'; + +require('./isArguments'); + +require('./shim'); diff --git a/node_modules/object-visit/LICENSE b/node_modules/object-visit/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/object-visit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/object-visit/README.md b/node_modules/object-visit/README.md new file mode 100644 index 0000000..64015cb --- /dev/null +++ b/node_modules/object-visit/README.md @@ -0,0 +1,83 @@ +# object-visit [![NPM version](https://img.shields.io/npm/v/object-visit.svg?style=flat)](https://www.npmjs.com/package/object-visit) [![NPM monthly downloads](https://img.shields.io/npm/dm/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![NPM total downloads](https://img.shields.io/npm/dt/object-visit.svg?style=flat)](https://npmjs.org/package/object-visit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object-visit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object-visit) + +> Call a specified method on each value in the given object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object-visit +``` + +## Usage + +```js +var visit = require('object-visit'); + +var ctx = { + data: {}, + set: function (key, value) { + if (typeof key === 'object') { + visit(ctx, 'set', key); + } else { + ctx.data[key] = value; + } + } +}; + +ctx.set('a', 'a'); +ctx.set('b', 'b'); +ctx.set('c', 'c'); +ctx.set({d: {e: 'f'}}); + +console.log(ctx.data); +//=> {a: 'a', b: 'b', c: 'c', d: { e: 'f' }}; +``` + +## About + +### Related projects + +* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods "base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [collection-visit](https://www.npmjs.com/package/collection-visit): Visit a method over the items in an object, or map visit over the objects… [more](https://github.com/jonschlinkert/collection-visit) | [homepage](https://github.com/jonschlinkert/collection-visit "Visit a method over the items in an object, or map visit over the objects in an array.") +* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property "Define a non-enumerable property on an object.") +* [map-visit](https://www.npmjs.com/package/map-visit): Map `visit` over an array of objects. | [homepage](https://github.com/jonschlinkert/map-visit "Map `visit` over an array of objects.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 30, 2017._ \ No newline at end of file diff --git a/node_modules/object-visit/index.js b/node_modules/object-visit/index.js new file mode 100644 index 0000000..fcaeda9 --- /dev/null +++ b/node_modules/object-visit/index.js @@ -0,0 +1,33 @@ +/*! + * object-visit + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +module.exports = function visit(thisArg, method, target, val) { + if (!isObject(thisArg) && typeof thisArg !== 'function') { + throw new Error('object-visit expects `thisArg` to be an object.'); + } + + if (typeof method !== 'string') { + throw new Error('object-visit expects `method` name to be a string'); + } + + if (typeof thisArg[method] !== 'function') { + return thisArg; + } + + var args = [].slice.call(arguments, 3); + target = target || {}; + + for (var key in target) { + var arr = [key, target[key]].concat(args); + thisArg[method].apply(thisArg, arr); + } + return thisArg; +}; diff --git a/node_modules/object-visit/package.json b/node_modules/object-visit/package.json new file mode 100644 index 0000000..15fd0ff --- /dev/null +++ b/node_modules/object-visit/package.json @@ -0,0 +1,65 @@ +{ + "name": "object-visit", + "description": "Call a specified method on each value in the given object.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/object-visit", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object-visit", + "bugs": { + "url": "https://github.com/jonschlinkert/object-visit/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "mocha": "^3.2.0" + }, + "keywords": [ + "context", + "function", + "helper", + "key", + "method", + "object", + "value", + "visit", + "visitor" + ], + "verb": { + "related": { + "list": [ + "base-methods", + "collection-visit", + "define-property", + "map-visit" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/object.assign/.editorconfig b/node_modules/object.assign/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/object.assign/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/object.assign/.eslintrc b/node_modules/object.assign/.eslintrc new file mode 100644 index 0000000..1318516 --- /dev/null +++ b/node_modules/object.assign/.eslintrc @@ -0,0 +1,28 @@ +{ + "root": true, + + "extends": "@ljharb", + + "ignorePatterns": ["dist/"], + + "rules": { + "eqeqeq": [2, "allow-null"], + "id-length": [2, { "min": 1, "max": 30 }], + "max-statements": [2, 33], + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": [1, { "ignore": [0] }], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "no-invalid-this": 1, + "max-lines-per-function": 0, + "max-statements-per-line": [2, { "max": 3 }], + "no-magic-numbers": 0, + }, + }, + ], +} diff --git a/node_modules/object.assign/.github/FUNDING.yml b/node_modules/object.assign/.github/FUNDING.yml new file mode 100644 index 0000000..ef7fdbf --- /dev/null +++ b/node_modules/object.assign/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/object.assign +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object.assign/.nycrc b/node_modules/object.assign/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/object.assign/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/object.assign/CHANGELOG.md b/node_modules/object.assign/CHANGELOG.md new file mode 100644 index 0000000..8c3d666 --- /dev/null +++ b/node_modules/object.assign/CHANGELOG.md @@ -0,0 +1,233 @@ +4.1.5 / 2023-11-30 +================== + * [meta] republish without testing HTML file (#85) + * [Deps] update `call-bind`, `define-properties` + * [Dev Deps] use `hasown` instead of `has` + * [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `npmignore`, `mock-property`, `tape` + * [actions] update rebase action + +4.1.4 / 2022-08-16 +================== + * [meta] fix `npmignore` integration (#83) + +4.1.3 / 2022-08-05 +================== + * [Refactor] make steps closer to actual spec + * [Refactor] simplify object coercible check + * [readme] remove defunct badges, add coverage and actions badges + * [eslint] ignore coverage output + * [meta] use `npmignore` to autogenerate an npmignore file + * [meta] remove audit-level + * [Deps] update `call-bind`, `define-properties`, `has-symbols` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `ses`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] reuse common workflows + * [actions] update codecov uploader + * [Tests] add implementation tests + * [Tests] use `mock-property` + * [Tests] disable posttest pending `aud` handling `file:` deps + * [Tests] migrate remaining tests to Github Actions (#81) + * [Tests] gitignore coverage output + * [Tests] test node v1-v9 on Github Actions instead of travis; resume testing all minors (#80) + +4.1.2 / 2020-10-30 +================== + * [Refactor] use extracted `call-bind` instead of full `es-abstract` + * [Dev Deps] update `eslint`, `ses`, `browserify` + * [Tests] run tests in SES + * [Tests] ses-compat: show error stacks + +4.1.1 / 2020-09-11 +================== + * [Fix] avoid mutating `Object.assign` in modern engines + * [Refactor] use `callBind` from `es-abstract` instead of `function-bind` + * [Deps] update `has-symbols`, `object-keys`, `define-properties` + * [meta] add `funding` field, FUNDING.yml + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `browserify`, `covert`, `for-each`, `is`, `tape`, `functions-have-names`; add `aud`, `safe-publish-latest`; remove `jscs` + * [actions] add Require Allow Edits workflow + * [actions] add automatic rebasing / merge commit blocking + * [Tests] ses-compat - add test to ensure package initializes correctly after ses lockdown (#77) + * [Tests] Add passing test for a source of `window.location` (#68) + * [Tests] use shared travis-ci config + * [Tests] use `npx aud` instead of `npm audit` with hoops or `nsp` + * [Tests] use `functions-have-names` + +4.1.0 / 2017-12-21 +================== + * [New] add `auto` entry point (#52) + * [Refactor] Use `has-symbols` module + * [Deps] update `function-bind`, `object-keys` + * [Dev Deps] update `@es-shims/api`, `browserify`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is` + * [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +4.0.4 / 2016-07-04 +================== + * [Fix] Cache original `getOwnPropertySymbols`, and use that when `Object.getOwnPropertySymbols` is unavailable + * [Deps] update `object-keys` + * [Dev Deps] update `eslint`, `get-own-property-symbols`, `core-js`, `jscs`, `nsp`, `browserify`, `@ljharb/eslint-config`, `tape`, `@es-shims/api` + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] run sham tests on node 0.10 + * [Tests] use pretest/posttest for linting/security + +4.0.3 / 2015-10-21 +================== + * [Fix] Support core-js's Symbol sham (#17) + * [Fix] Ensure that properties removed or made non-enumerable during enumeration are not assigned (#16) + * [Fix] Avoid looking up keys and values more than once + * [Tests] Avoid using `reduce` so `npm run test:shams:corejs` passes in `node` `v0.8` ([core-js#122](https://github.com/zloirock/core-js/issues/122)) + * [Tests] Refactor to use my conventional structure that separates shimmed, implementation, and common tests + * [Tests] Create `npm run test:shams` and better organize tests for symbol shams + * [Tests] Remove `nsp` in favor of `requiresafe` + +4.0.2 / 2015-10-20 +================== + * [Fix] Ensure correct property enumeration order, particularly in v8 (#15) + * [Deps] update `object-keys`, `define-properties` + * [Dev Deps] update `browserify`, `is`, `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + +4.0.1 / 2015-08-16 +================== + * [Docs] Add `Symbol` note to readme + +4.0.0 / 2015-08-15 +================== + * [Breaking] Implement the [es-shim API](es-shims/api). + * [Robustness] Make implementation robust against later modification of environment methods. + * [Refactor] Move implementation to `implementation.js` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Deps] update `object-keys`, `define-properties` + * [Dev Deps] update `browserify`, `tape`, `eslint`, `jscs`, `browserify` + * [Tests] Add `npm run tests-only` + * [Tests] use my personal shared `eslint` config. + * [Tests] up to `io.js` `v3.0` + +3.0.1 / 2015-06-28 +================== + * Cache `Object` and `Array#push` to make the shim more robust. + * [Fix] Remove use of `Array#filter`, which isn't in ES3. + * [Deps] Update `object-keys`, `define-properties` + * [Dev Deps] Update `get-own-property-symbols`, `browserify`, `eslint`, `nsp` + * [Tests] Test up to `io.js` `v2.3` + * [Tests] Adding `Object.assign` tests for non-object targets, per https://github.com/paulmillr/es6-shim/issues/348 + +3.0.0 / 2015-05-20 +================== + * Attempt to feature-detect Symbols, even if `typeof Symbol() !== 'symbol'` (#12) + * Make a separate `hasSymbols` internal module + * Update `browserify`, `eslint` + +2.0.3 / 2015-06-28 +================== + * Cache `Object` and `Array#push` to make the shim more robust. + * [Fix] Remove use of `Array#filter`, which isn't in ES3 + * [Deps] Update `object-keys`, `define-properties` + * [Dev Deps] Update `browserify`, `nsp`, `eslint` + * [Tests] Test up to `io.js` `v2.3` + +2.0.2 / 2015-05-20 +================== + * Make sure `.shim` is non-enumerable. + * Refactor `.shim` implementation to use `define-properties` predicates, rather than `delete`ing the original. + * Update docs to match spec/implementation. (#11) + * Add `npm run eslint` + * Test up to `io.js` `v2.0` + * Update `jscs`, `browserify`, `covert` + +2.0.1 / 2015-04-12 +================== + * Make sure non-enumerable Symbols are excluded. + +2.0.0 / 2015-04-12 +================== + * Make sure the shim function overwrites a broken implementation with pending exceptions. + * Ensure shim is not enumerable using `define-properties` + * Ensure `Object.assign` includes symbols. + * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. + * Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. + * Add `npm run security` via `nsp` + * Update `browserify`, `jscs`, `tape`, `object-keys`, `is` + +1.1.1 / 2014-12-14 +================== + * Actually include the browser build in `npm` + +1.1.0 / 2014-12-14 +================== + * Add `npm run build`, and build an automatic-shimming browser distribution as part of the npm publish process. + * Update `is`, `jscs` + +1.0.3 / 2014-11-29 +================== + * Revert "optimize --production installs" + +1.0.2 / 2014-11-27 +================== + * Update `jscs`, `is`, `object-keys`, `tape` + * Add badges to README + * Name URLs in README + * Lock `covert` to `v1.0.0` + * Optimize --production installs + +1.0.1 / 2014-08-26 +================== + * Update `is`, `covert` + +1.0.0 / 2014-08-07 +================== + * Update `object-keys`, `tape` + +0.5.0 / 2014-07-31 +================== + * Object.assign no longer throws on null or undefined sources, per https://bugs.ecmascript.org/show_bug.cgi?id=3096 + +0.4.3 / 2014-07-30 +================== + * Don’t modify vars in the function signature, since it deoptimizes v8 + +0.4.2 / 2014-07-30 +================== + * Fixing the version number: v0.4.2 + +0.4.1 / 2014-07-19 +================== + * Revert "Use the native Object.keys if it’s available." + +0.4.0 / 2014-07-19 +================== + * Use the native Object.keys if it’s available. + * Fixes [#2](https://github.com/ljharb/object.assign/issues/2). + * Adding failing tests for [#2](https://github.com/ljharb/object.assign/issues/2). + * Fix indentation. + * Adding `npm run lint` + * Update `tape`, `covert` + * README: Use SVG badge for Travis [#1](https://github.com/ljharb/object.assign/issues/1) from mathiasbynens/patch-1 + +0.3.1 / 2014-04-10 +================== + * Object.assign does partially modify objects if it throws, per https://twitter.com/awbjs/status/454320863093862400 + +0.3.0 / 2014-04-10 +================== + * Update with newest ES6 behavior - Object.assign now takes a variable number of source objects. + * Update `tape` + * Make sure old and unstable nodes don’t fail Travis + +0.2.1 / 2014-03-16 +================== + * Let object-keys handle the fallback + * Update dependency badges + * Adding bower.json + +0.2.0 / 2014-03-16 +================== + * Use a for loop, because ES3 browsers don’t have "reduce" + +0.1.1 / 2014-03-14 +================== + * Updating readme + +0.1.0 / 2014-03-14 +================== + * Initial release. + diff --git a/node_modules/object.assign/LICENSE b/node_modules/object.assign/LICENSE new file mode 100644 index 0000000..ab29cbd --- /dev/null +++ b/node_modules/object.assign/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/object.assign/README.md b/node_modules/object.assign/README.md new file mode 100644 index 0000000..8e933fe --- /dev/null +++ b/node_modules/object.assign/README.md @@ -0,0 +1,136 @@ +# object.assign [![Version Badge][npm-version-svg]][npm-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][npm-url] + +An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. + +Takes a minimum of 2 arguments: `target` and `source`. +Takes a variable sized list of source arguments - at least 1, as many as you want. +Throws a TypeError if the `target` argument is `null` or `undefined`. + +Most common usage: +```js +var assign = require('object.assign').getPolyfill(); // returns native method if compliant + /* or */ +var assign = require('object.assign/polyfill')(); // returns native method if compliant +``` + +## Example + +```js +var assert = require('assert'); + +// Multiple sources! +var target = { a: true }; +var source1 = { b: true }; +var source2 = { c: true }; +var sourceN = { n: true }; + +var expected = { + a: true, + b: true, + c: true, + n: true +}; + +assign(target, source1, source2, sourceN); +assert.deepEqual(target, expected); // AWESOME! +``` + +```js +var target = { + a: true, + b: true, + c: true +}; +var source1 = { + c: false, + d: false +}; +var sourceN = { + e: false +}; + +var assigned = assign(target, source1, sourceN); +assert.equal(target, assigned); // returns the target object +assert.deepEqual(assigned, { + a: true, + b: true, + c: false, + d: false, + e: false +}); +``` + +```js +/* when Object.assign is not present */ +delete Object.assign; +var shimmedAssign = require('object.assign').shim(); + /* or */ +var shimmedAssign = require('object.assign/shim')(); + +assert.equal(shimmedAssign, assign); + +var target = { + a: true, + b: true, + c: true +}; +var source = { + c: false, + d: false, + e: false +}; + +var assigned = assign(target, source); +assert.deepEqual(Object.assign(target, source), assign(target, source)); +``` + +```js +/* when Object.assign is present */ +var shimmedAssign = require('object.assign').shim(); +assert.equal(shimmedAssign, Object.assign); + +var target = { + a: true, + b: true, + c: true +}; +var source = { + c: false, + d: false, + e: false +}; + +assert.deepEqual(Object.assign(target, source), assign(target, source)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[npm-url]: https://npmjs.org/package/object.assign +[npm-version-svg]: http://versionbadg.es/ljharb/object.assign.svg +[travis-svg]: https://travis-ci.org/ljharb/object.assign.svg +[travis-url]: https://travis-ci.org/ljharb/object.assign +[deps-svg]: https://david-dm.org/ljharb/object.assign.svg?theme=shields.io +[deps-url]: https://david-dm.org/ljharb/object.assign +[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io +[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object.assign.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object.assign +[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign +[actions-url]: https://github.com/ljharb/object.assign/actions diff --git a/node_modules/object.assign/auto.js b/node_modules/object.assign/auto.js new file mode 100644 index 0000000..8ebf606 --- /dev/null +++ b/node_modules/object.assign/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/object.assign/dist/browser.js b/node_modules/object.assign/dist/browser.js new file mode 100644 index 0000000..92d2826 --- /dev/null +++ b/node_modules/object.assign/dist/browser.js @@ -0,0 +1,1141 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + +},{"./":5,"get-intrinsic":10}],5:[function(require,module,exports){ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); +var setFunctionLength = require('set-function-length'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + +},{"function-bind":9,"get-intrinsic":10,"set-function-length":20}],6:[function(require,module,exports){ +'use strict'; + +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var gopd = require('gopd'); + +/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + +},{"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],7:[function(require,module,exports){ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = require('define-data-property'); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = require('has-property-descriptors')(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + +},{"define-data-property":6,"has-property-descriptors":12,"object-keys":18}],8:[function(require,module,exports){ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + +},{}],9:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; + +},{"./implementation":8}],10:[function(require,module,exports){ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); +var hasProto = require('has-proto')(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('hasown'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + +},{"function-bind":9,"has-proto":13,"has-symbols":14,"hasown":16}],11:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + +},{"get-intrinsic":10}],12:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + +},{"get-intrinsic":10}],13:[function(require,module,exports){ +'use strict'; + +var test = { + foo: {} +}; + +var $Object = Object; + +module.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); +}; + +},{}],14:[function(require,module,exports){ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + +},{"./shams":15}],15:[function(require,module,exports){ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + +},{}],16:[function(require,module,exports){ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); + +},{"function-bind":9}],17:[function(require,module,exports){ +'use strict'; + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = require('./isArguments'); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + +},{"./isArguments":19}],18:[function(require,module,exports){ +'use strict'; + +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + +},{"./implementation":17,"./isArguments":19}],19:[function(require,module,exports){ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + +},{}],20:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var gOPD = require('gopd'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $floor = GetIntrinsic('%Math.floor%'); + +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(fn, 'length', length, true, true); + } else { + define(fn, 'length', length); + } + } + return fn; +}; + +},{"define-data-property":6,"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],21:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +var lacksProperEnumerationOrder = function () { + if (!Object.assign) { + return false; + } + /* + * v8, specifically in node 4.x, has a bug with incorrect property enumeration order + * note: this does not detect the bug unless there's 20 characters + */ + var str = 'abcdefghijklmnopqrst'; + var letters = str.split(''); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ''; + for (var k in obj) { + actual += k; + } + return str !== actual; +}; + +var assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, 'xy'); + } catch (e) { + return thrower[1] === 'y'; + } + return false; +}; + +module.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; +}; + +},{"./implementation":2}],22:[function(require,module,exports){ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimAssign() { + var polyfill = getPolyfill(); + define( + Object, + { assign: polyfill }, + { assign: function () { return Object.assign !== polyfill; } } + ); + return polyfill; +}; + +},{"./polyfill":21,"define-properties":7}]},{},[1]); diff --git a/node_modules/object.assign/hasSymbols.js b/node_modules/object.assign/hasSymbols.js new file mode 100644 index 0000000..34841e0 --- /dev/null +++ b/node_modules/object.assign/hasSymbols.js @@ -0,0 +1,43 @@ +'use strict'; + +var keys = require('object-keys'); + +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + /* + * temp disabled per https://github.com/ljharb/object.assign/issues/17 + * if (sym instanceof Symbol) { return false; } + * temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + * if (!(symObj instanceof Symbol)) { return false; } + */ + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-unreachable-loop + if (keys(obj).length !== 0) { return false; } + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js new file mode 100644 index 0000000..7a85167 --- /dev/null +++ b/node_modules/object.assign/implementation.js @@ -0,0 +1,46 @@ +'use strict'; + +// modified from https://github.com/es-shims/es6-shim +var objectKeys = require('object-keys'); +var hasSymbols = require('has-symbols/shams')(); +var callBound = require('call-bind/callBound'); +var toObject = Object; +var $push = callBound('Array.prototype.push'); +var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; + +// eslint-disable-next-line no-unused-vars +module.exports = function assign(target, source1) { + if (target == null) { throw new TypeError('target must be an object'); } + var to = toObject(target); // step 1 + if (arguments.length === 1) { + return to; // step 2 + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); // step 3.a.i + + // step 3.a.ii: + var keys = objectKeys(from); + var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); + if (getSymbols) { + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key = syms[j]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); + } + } + } + + // step 3.a.iii: + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2 + var propValue = from[nextKey]; // step 3.a.iii.2.a + to[nextKey] = propValue; // step 3.a.iii.2.b + } + } + } + + return to; // step 4 +}; diff --git a/node_modules/object.assign/index.js b/node_modules/object.assign/index.js new file mode 100644 index 0000000..9b50603 --- /dev/null +++ b/node_modules/object.assign/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var polyfill = callBind.apply(getPolyfill()); +// eslint-disable-next-line no-unused-vars +var bound = function assign(target, source1) { + return polyfill(Object, arguments); +}; + +defineProperties(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json new file mode 100644 index 0000000..5559eb9 --- /dev/null +++ b/node_modules/object.assign/package.json @@ -0,0 +1,96 @@ +{ + "name": "object.assign", + "version": "4.1.5", + "author": "Jordan Harband", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint && es-shim-api --bound", + "test": "npm run tests-only && npm run test:ses", + "posttest": "aud --production", + "tests-only": "npm run test:implementation && npm run test:shim", + "test:native": "nyc node test/native", + "test:shim": "nyc node test/shimmed", + "test:implementation": "nyc node test", + "test:ses": "node test/ses-compat", + "lint": "eslint .", + "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", + "prepublishOnly": "safe-publish-latest && npm run build", + "prepublish": "not-in-publish || npm run prepublishOnly" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object.assign.git" + }, + "keywords": [ + "Object.assign", + "assign", + "ES6", + "extend", + "$.extend", + "jQuery", + "_.extend", + "Underscore", + "es-shim API", + "polyfill", + "shim" + ], + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "browserify": "^16.5.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "hasown": "^2.0.0", + "is": "^3.3.0", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "ses": "^0.11.1", + "tape": "^5.7.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "bower.json", + "browserShim.js", + "!dist/" + ] + } +} diff --git a/node_modules/object.assign/polyfill.js b/node_modules/object.assign/polyfill.js new file mode 100644 index 0000000..ca94aea --- /dev/null +++ b/node_modules/object.assign/polyfill.js @@ -0,0 +1,55 @@ +'use strict'; + +var implementation = require('./implementation'); + +var lacksProperEnumerationOrder = function () { + if (!Object.assign) { + return false; + } + /* + * v8, specifically in node 4.x, has a bug with incorrect property enumeration order + * note: this does not detect the bug unless there's 20 characters + */ + var str = 'abcdefghijklmnopqrst'; + var letters = str.split(''); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ''; + for (var k in obj) { + actual += k; + } + return str !== actual; +}; + +var assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, 'xy'); + } catch (e) { + return thrower[1] === 'y'; + } + return false; +}; + +module.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; +}; diff --git a/node_modules/object.assign/shim.js b/node_modules/object.assign/shim.js new file mode 100644 index 0000000..9f896ae --- /dev/null +++ b/node_modules/object.assign/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimAssign() { + var polyfill = getPolyfill(); + define( + Object, + { assign: polyfill }, + { assign: function () { return Object.assign !== polyfill; } } + ); + return polyfill; +}; diff --git a/node_modules/object.assign/test/implementation.js b/node_modules/object.assign/test/implementation.js new file mode 100644 index 0000000..05d7d7a --- /dev/null +++ b/node_modules/object.assign/test/implementation.js @@ -0,0 +1,19 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) { + st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation, Object), t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/index.js b/node_modules/object.assign/test/index.js new file mode 100644 index 0000000..776b2b3 --- /dev/null +++ b/node_modules/object.assign/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var assign = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { assign(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(assign, t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/native.js b/node_modules/object.assign/test/native.js new file mode 100644 index 0000000..49a70f7 --- /dev/null +++ b/node_modules/object.assign/test/native.js @@ -0,0 +1,49 @@ +'use strict'; + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('native', function (t) { + t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad object value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + // v8 in node 0.8 and 0.10 have non-enumerable string properties + var stringCharsAreEnumerable = isEnumerable.call('xy', 0); + t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: '2' }); + var error; + try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } + st.equal(error instanceof TypeError, true, 'error is TypeError'); + st.equal(thrower[1], '2', 'thrower[1] === "2"'); + + st.end(); + }); + + runTests(Object.assign, t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/ses-compat.js b/node_modules/object.assign/test/ses-compat.js new file mode 100644 index 0000000..9669eb9 --- /dev/null +++ b/node_modules/object.assign/test/ses-compat.js @@ -0,0 +1,12 @@ +'use strict'; + +/* globals lockdown */ + +// requiring ses exposes "lockdown" on the global +require('ses'); + +// lockdown freezes the primordials +lockdown({ errorTaming: 'unsafe' }); + +// initialize the module +require('./'); diff --git a/node_modules/object.assign/test/shimmed.js b/node_modules/object.assign/test/shimmed.js new file mode 100644 index 0000000..ee57758 --- /dev/null +++ b/node_modules/object.assign/test/shimmed.js @@ -0,0 +1,52 @@ +'use strict'; + +var assign = require('../'); +assign.shim(); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad object value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + // v8 in node 0.8 and 0.10 have non-enumerable string properties + var stringCharsAreEnumerable = isEnumerable.call('xy', 0); + t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { + /* + * Firefox 37 still has "pending exception" logic in its Object.assign implementation, + * which is 72% slower than our shim, and Firefox 40's native implementation. + */ + var thrower = Object.preventExtensions({ 1: '2' }); + var error; + try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } + st.equal(error instanceof TypeError, true, 'error is TypeError'); + st.equal(thrower[1], '2', 'thrower[1] === "2"'); + + st.end(); + }); + + runTests(Object.assign, t); + + t.end(); +}); diff --git a/node_modules/object.assign/test/tests.js b/node_modules/object.assign/test/tests.js new file mode 100644 index 0000000..eff2793 --- /dev/null +++ b/node_modules/object.assign/test/tests.js @@ -0,0 +1,232 @@ +'use strict'; + +var hasSymbols = require('has-symbols/shams')(); +var forEach = require('for-each'); +var hasOwn = require('hasown'); +var mockProperty = require('mock-property'); + +module.exports = function (assign, t) { + t.test('error cases', function (st) { + st['throws'](function () { assign(null); }, TypeError, 'target must be an object'); + st['throws'](function () { assign(undefined); }, TypeError, 'target must be an object'); + st['throws'](function () { assign(null, {}); }, TypeError, 'target must be an object'); + st['throws'](function () { assign(undefined, {}); }, TypeError, 'target must be an object'); + st.end(); + }); + + t.test('non-object target, no sources', function (st) { + var bool = assign(true); + st.equal(typeof bool, 'object', 'bool is object'); + st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); + + var number = assign(1); + st.equal(typeof number, 'object', 'number is object'); + st.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); + + var string = assign('1'); + st.equal(typeof string, 'object', 'number is object'); + st.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); + + st.end(); + }); + + t.test('non-object target, with sources', function (st) { + var signal = {}; + + st.test('boolean', function (st2) { + var bool = assign(true, { a: signal }); + st2.equal(typeof bool, 'object', 'bool is object'); + st2.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); + st2.equal(bool.a, signal, 'source properties copied'); + st2.end(); + }); + + st.test('number', function (st2) { + var number = assign(1, { a: signal }); + st2.equal(typeof number, 'object', 'number is object'); + st2.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); + st2.equal(number.a, signal, 'source properties copied'); + st2.end(); + }); + + st.test('string', function (st2) { + var string = assign('1', { a: signal }); + st2.equal(typeof string, 'object', 'number is object'); + st2.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); + st2.equal(string.a, signal, 'source properties copied'); + st2.end(); + }); + + st.end(); + }); + + t.test('non-object sources', function (st) { + st.deepEqual(assign({ a: 1 }, null, { b: 2 }), { a: 1, b: 2 }, 'ignores null source'); + st.deepEqual(assign({ a: 1 }, { b: 2 }, undefined), { a: 1, b: 2 }, 'ignores undefined source'); + st.end(); + }); + + t.test('returns the modified target object', function (st) { + var target = {}; + var returned = assign(target, { a: 1 }); + st.equal(returned, target, 'returned object is the same reference as the target object'); + st.end(); + }); + + t.test('has the right length', function (st) { + st.equal(assign.length, 2, 'length is 2 => 2 required arguments'); + st.end(); + }); + + t.test('merge two objects', function (st) { + var target = { a: 1 }; + var returned = assign(target, { b: 2 }); + st.deepEqual(returned, { a: 1, b: 2 }, 'returned object has properties from both'); + st.end(); + }); + + t.test('works with functions', function (st) { + var target = function () {}; + target.a = 1; + var returned = assign(target, { b: 2 }); + st.equal(target, returned, 'returned object is target'); + st.equal(returned.a, 1); + st.equal(returned.b, 2); + st.end(); + }); + + t.test('works with primitives', function (st) { + var target = 2; + var source = { b: 42 }; + var returned = assign(target, source); + st.equal(Object.prototype.toString.call(returned), '[object Number]', 'returned is object form of number primitive'); + st.equal(Number(returned), target, 'returned and target have same valueOf'); + st.equal(returned.b, source.b); + st.end(); + }); + + /* globals window */ + t.test('works with window.location', { skip: typeof window === 'undefined' }, function (st) { + var target = {}; + assign(target, window.location); + for (var prop in window.location) { + if (hasOwn(window.location, prop)) { + st.deepEqual(target[prop], window.location[prop], prop + ' is copied'); + } + } + st.end(); + }); + + t.test('merge N objects', function (st) { + var target = { a: 1 }; + var source1 = { b: 2 }; + var source2 = { c: 3 }; + var returned = assign(target, source1, source2); + st.deepEqual(returned, { a: 1, b: 2, c: 3 }, 'returned object has properties from all sources'); + st.end(); + }); + + t.test('only iterates over own keys', function (st) { + var Foo = function () {}; + Foo.prototype.bar = true; + var foo = new Foo(); + foo.baz = true; + var target = { a: 1 }; + var returned = assign(target, foo); + st.equal(returned, target, 'returned object is the same reference as the target object'); + st.deepEqual(target, { a: 1, baz: true }, 'returned object has only own properties from both'); + st.end(); + }); + + t.test('includes enumerable symbols, after keys', { skip: !hasSymbols }, function (st) { + var visited = []; + var obj = {}; + Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); + var symbol = Symbol('enumerable'); + Object.defineProperty(obj, symbol, { + enumerable: true, + get: function () { visited.push(symbol); return Infinity; } + }); + var nonEnumSymbol = Symbol('non-enumerable'); + Object.defineProperty(obj, nonEnumSymbol, { + enumerable: false, + get: function () { visited.push(nonEnumSymbol); return -Infinity; } + }); + var target = assign({}, obj); + st.deepEqual(visited, ['a', symbol], 'key is visited first, then symbol'); + st.equal(target.a, 42, 'target.a is 42'); + st.equal(target[symbol], Infinity, 'target[symbol] is Infinity'); + st.notEqual(target[nonEnumSymbol], -Infinity, 'target[nonEnumSymbol] is not -Infinity'); + st.end(); + }); + + t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) { + st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true })); + + var visited = []; + var obj = {}; + Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); + var keys = ['a']; + if (hasSymbols) { + var symbol = Symbol('sym'); + Object.defineProperty(obj, symbol, { + enumerable: true, + get: function () { visited.push(symbol); return Infinity; } + }); + keys.push(symbol); + } + var target = assign({}, obj); + st.deepEqual(visited, keys, 'assign visits expected keys'); + st.equal(target.a, 42, 'target.a is 42'); + + if (hasSymbols) { + st.equal(target[symbol], Infinity); + } + st.end(); + }); + + t.test('preserves correct property enumeration order', function (st) { + var str = 'abcdefghijklmnopqrst'; + var letters = {}; + forEach(str.split(''), function (letter) { + letters[letter] = letter; + }); + + var n = 5; + st.comment('run the next test ' + n + ' times'); + var object = assign({}, letters); + var actual = ''; + for (var k in object) { + actual += k; + } + for (var i = 0; i < n; ++i) { + st.equal(actual, str, 'property enumeration order should be followed'); + } + st.end(); + }); + + t.test('checks enumerability and existence, in case of modification during [[Get]]', { skip: !Object.defineProperty }, function (st) { + var targetBvalue = {}; + var targetCvalue = {}; + var target = { b: targetBvalue, c: targetCvalue }; + var source = {}; + Object.defineProperty(source, 'a', { + enumerable: true, + get: function () { + delete this.b; + Object.defineProperty(this, 'c', { enumerable: false }); + return 'a'; + } + }); + var sourceBvalue = {}; + var sourceCvalue = {}; + source.b = sourceBvalue; + source.c = sourceCvalue; + var result = assign(target, source); + st.equal(result, target, 'sanity check: result is === target'); + st.equal(result.b, targetBvalue, 'target key not overwritten by deleted source key'); + st.equal(result.c, targetCvalue, 'target key not overwritten by non-enumerable source key'); + + st.end(); + }); +}; diff --git a/node_modules/object.pick/LICENSE b/node_modules/object.pick/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/object.pick/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/object.pick/README.md b/node_modules/object.pick/README.md new file mode 100644 index 0000000..48f7453 --- /dev/null +++ b/node_modules/object.pick/README.md @@ -0,0 +1,76 @@ +# object.pick [![NPM version](https://img.shields.io/npm/v/object.pick.svg?style=flat)](https://www.npmjs.com/package/object.pick) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![NPM total downloads](https://img.shields.io/npm/dt/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.pick.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.pick) + +> Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore. + +You might also be interested in [object.omit](https://github.com/jonschlinkert/object.omit). + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save object.pick +``` + +## benchmarks + +This is the [fastest implementation](http://jsperf.com/pick-props) I tested. Pull requests welcome! + +## Usage + +```js +var pick = require('object.pick'); + +pick({a: 'a', b: 'b'}, 'a') +//=> {a: 'a'} + +pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b']) +//=> {a: 'a', b: 'b'} +``` + +## About + +### Related projects + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/object.pick/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 27, 2016._ \ No newline at end of file diff --git a/node_modules/object.pick/index.js b/node_modules/object.pick/index.js new file mode 100644 index 0000000..0ce0178 --- /dev/null +++ b/node_modules/object.pick/index.js @@ -0,0 +1,35 @@ +/*! + * object.pick + * + * Copyright (c) 2014-2015 Jon Schlinkert, contributors. + * Licensed under the MIT License + */ + +'use strict'; + +var isObject = require('isobject'); + +module.exports = function pick(obj, keys) { + if (!isObject(obj) && typeof obj !== 'function') { + return {}; + } + + var res = {}; + if (typeof keys === 'string') { + if (keys in obj) { + res[keys] = obj[keys]; + } + return res; + } + + var len = keys.length; + var idx = -1; + + while (++idx < len) { + var key = keys[idx]; + if (key in obj) { + res[key] = obj[key]; + } + } + return res; +}; diff --git a/node_modules/object.pick/package.json b/node_modules/object.pick/package.json new file mode 100644 index 0000000..b655dbe --- /dev/null +++ b/node_modules/object.pick/package.json @@ -0,0 +1,60 @@ +{ + "name": "object.pick", + "description": "Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore.", + "version": "1.3.0", + "homepage": "https://github.com/jonschlinkert/object.pick", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/object.pick", + "bugs": { + "url": "https://github.com/jonschlinkert/object.pick/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isobject": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.1.2", + "vinyl": "^2.0.0" + }, + "keywords": [ + "object", + "pick" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "extend-shallow", + "get-value", + "mixin-deep", + "set-value" + ], + "highlight": "object.omit" + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/on-finished/HISTORY.md b/node_modules/on-finished/HISTORY.md new file mode 100644 index 0000000..98ff0e9 --- /dev/null +++ b/node_modules/on-finished/HISTORY.md @@ -0,0 +1,88 @@ +2.3.0 / 2015-05-26 +================== + + * Add defined behavior for HTTP `CONNECT` requests + * Add defined behavior for HTTP `Upgrade` requests + * deps: ee-first@1.1.1 + +2.2.1 / 2015-04-22 +================== + + * Fix `isFinished(req)` when data buffered + +2.2.0 / 2014-12-22 +================== + + * Add message object to callback arguments + +2.1.1 / 2014-10-22 +================== + + * Fix handling of pipelined requests + +2.1.0 / 2014-08-16 +================== + + * Check if `socket` is detached + * Return `undefined` for `isFinished` if state unknown + +2.0.0 / 2014-08-16 +================== + + * Add `isFinished` function + * Move to `jshttp` organization + * Remove support for plain socket argument + * Rename to `on-finished` + * Support both `req` and `res` as arguments + * deps: ee-first@1.0.5 + +1.2.2 / 2014-06-10 +================== + + * Reduce listeners added to emitters + - avoids "event emitter leak" warnings when used multiple times on same request + +1.2.1 / 2014-06-08 +================== + + * Fix returned value when already finished + +1.2.0 / 2014-06-05 +================== + + * Call callback when called on already-finished socket + +1.1.4 / 2014-05-27 +================== + + * Support node.js 0.8 + +1.1.3 / 2014-04-30 +================== + + * Make sure errors passed as instanceof `Error` + +1.1.2 / 2014-04-18 +================== + + * Default the `socket` to passed-in object + +1.1.1 / 2014-01-16 +================== + + * Rename module to `finished` + +1.1.0 / 2013-12-25 +================== + + * Call callback when called on already-errored socket + +1.0.1 / 2013-12-20 +================== + + * Actually pass the error to the callback + +1.0.0 / 2013-12-20 +================== + + * Initial release diff --git a/node_modules/on-finished/LICENSE b/node_modules/on-finished/LICENSE new file mode 100644 index 0000000..5931fd2 --- /dev/null +++ b/node_modules/on-finished/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2013 Jonathan Ong +Copyright (c) 2014 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/on-finished/README.md b/node_modules/on-finished/README.md new file mode 100644 index 0000000..a0e1157 --- /dev/null +++ b/node_modules/on-finished/README.md @@ -0,0 +1,154 @@ +# on-finished + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Execute a callback when a HTTP request closes, finishes, or errors. + +## Install + +```sh +$ npm install on-finished +``` + +## API + +```js +var onFinished = require('on-finished') +``` + +### onFinished(res, listener) + +Attach a listener to listen for the response to finish. The listener will +be invoked only once when the response finished. If the response finished +to an error, the first argument will contain the error. If the response +has already finished, the listener will be invoked. + +Listening to the end of a response would be used to close things associated +with the response, like open files. + +Listener is invoked as `listener(err, res)`. + +```js +onFinished(res, function (err, res) { + // clean up open fds, etc. + // err contains the error is request error'd +}) +``` + +### onFinished(req, listener) + +Attach a listener to listen for the request to finish. The listener will +be invoked only once when the request finished. If the request finished +to an error, the first argument will contain the error. If the request +has already finished, the listener will be invoked. + +Listening to the end of a request would be used to know when to continue +after reading the data. + +Listener is invoked as `listener(err, req)`. + +```js +var data = '' + +req.setEncoding('utf8') +res.on('data', function (str) { + data += str +}) + +onFinished(req, function (err, req) { + // data is read unless there is err +}) +``` + +### onFinished.isFinished(res) + +Determine if `res` is already finished. This would be useful to check and +not even start certain operations if the response has already finished. + +### onFinished.isFinished(req) + +Determine if `req` is already finished. This would be useful to check and +not even start certain operations if the request has already finished. + +## Special Node.js requests + +### HTTP CONNECT method + +The meaning of the `CONNECT` method from RFC 7231, section 4.3.6: + +> The CONNECT method requests that the recipient establish a tunnel to +> the destination origin server identified by the request-target and, +> if successful, thereafter restrict its behavior to blind forwarding +> of packets, in both directions, until the tunnel is closed. Tunnels +> are commonly used to create an end-to-end virtual connection, through +> one or more proxies, which can then be secured using TLS (Transport +> Layer Security, [RFC5246]). + +In Node.js, these request objects come from the `'connect'` event on +the HTTP server. + +When this module is used on a HTTP `CONNECT` request, the request is +considered "finished" immediately, **due to limitations in the Node.js +interface**. This means if the `CONNECT` request contains a request entity, +the request will be considered "finished" even before it has been read. + +There is no such thing as a response object to a `CONNECT` request in +Node.js, so there is no support for for one. + +### HTTP Upgrade request + +The meaning of the `Upgrade` header from RFC 7230, section 6.1: + +> The "Upgrade" header field is intended to provide a simple mechanism +> for transitioning from HTTP/1.1 to some other protocol on the same +> connection. + +In Node.js, these request objects come from the `'upgrade'` event on +the HTTP server. + +When this module is used on a HTTP request with an `Upgrade` header, the +request is considered "finished" immediately, **due to limitations in the +Node.js interface**. This means if the `Upgrade` request contains a request +entity, the request will be considered "finished" even before it has been +read. + +There is no such thing as a response object to a `Upgrade` request in +Node.js, so there is no support for for one. + +## Example + +The following code ensures that file descriptors are always closed +once the response finishes. + +```js +var destroy = require('destroy') +var http = require('http') +var onFinished = require('on-finished') + +http.createServer(function onRequest(req, res) { + var stream = fs.createReadStream('package.json') + stream.pipe(res) + onFinished(res, function (err) { + destroy(stream) + }) +}) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/on-finished.svg +[npm-url]: https://npmjs.org/package/on-finished +[node-version-image]: https://img.shields.io/node/v/on-finished.svg +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/on-finished/master.svg +[travis-url]: https://travis-ci.org/jshttp/on-finished +[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master +[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg +[downloads-url]: https://npmjs.org/package/on-finished diff --git a/node_modules/on-finished/index.js b/node_modules/on-finished/index.js new file mode 100644 index 0000000..9abd98f --- /dev/null +++ b/node_modules/on-finished/index.js @@ -0,0 +1,196 @@ +/*! + * on-finished + * Copyright(c) 2013 Jonathan Ong + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = onFinished +module.exports.isFinished = isFinished + +/** + * Module dependencies. + * @private + */ + +var first = require('ee-first') + +/** + * Variables. + * @private + */ + +/* istanbul ignore next */ +var defer = typeof setImmediate === 'function' + ? setImmediate + : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) } + +/** + * Invoke callback when the response has finished, useful for + * cleaning up resources afterwards. + * + * @param {object} msg + * @param {function} listener + * @return {object} + * @public + */ + +function onFinished(msg, listener) { + if (isFinished(msg) !== false) { + defer(listener, null, msg) + return msg + } + + // attach the listener to the message + attachListener(msg, listener) + + return msg +} + +/** + * Determine if message is already finished. + * + * @param {object} msg + * @return {boolean} + * @public + */ + +function isFinished(msg) { + var socket = msg.socket + + if (typeof msg.finished === 'boolean') { + // OutgoingMessage + return Boolean(msg.finished || (socket && !socket.writable)) + } + + if (typeof msg.complete === 'boolean') { + // IncomingMessage + return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable)) + } + + // don't know + return undefined +} + +/** + * Attach a finished listener to the message. + * + * @param {object} msg + * @param {function} callback + * @private + */ + +function attachFinishedListener(msg, callback) { + var eeMsg + var eeSocket + var finished = false + + function onFinish(error) { + eeMsg.cancel() + eeSocket.cancel() + + finished = true + callback(error) + } + + // finished on first message event + eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish) + + function onSocket(socket) { + // remove listener + msg.removeListener('socket', onSocket) + + if (finished) return + if (eeMsg !== eeSocket) return + + // finished on first socket event + eeSocket = first([[socket, 'error', 'close']], onFinish) + } + + if (msg.socket) { + // socket already assigned + onSocket(msg.socket) + return + } + + // wait for socket to be assigned + msg.on('socket', onSocket) + + if (msg.socket === undefined) { + // node.js 0.8 patch + patchAssignSocket(msg, onSocket) + } +} + +/** + * Attach the listener to the message. + * + * @param {object} msg + * @return {function} + * @private + */ + +function attachListener(msg, listener) { + var attached = msg.__onFinished + + // create a private single listener with queue + if (!attached || !attached.queue) { + attached = msg.__onFinished = createListener(msg) + attachFinishedListener(msg, attached) + } + + attached.queue.push(listener) +} + +/** + * Create listener on message. + * + * @param {object} msg + * @return {function} + * @private + */ + +function createListener(msg) { + function listener(err) { + if (msg.__onFinished === listener) msg.__onFinished = null + if (!listener.queue) return + + var queue = listener.queue + listener.queue = null + + for (var i = 0; i < queue.length; i++) { + queue[i](err, msg) + } + } + + listener.queue = [] + + return listener +} + +/** + * Patch ServerResponse.prototype.assignSocket for node.js 0.8. + * + * @param {ServerResponse} res + * @param {function} callback + * @private + */ + +function patchAssignSocket(res, callback) { + var assignSocket = res.assignSocket + + if (typeof assignSocket !== 'function') return + + // res.on('socket', callback) is broken in 0.8 + res.assignSocket = function _assignSocket(socket) { + assignSocket.call(this, socket) + callback(socket) + } +} diff --git a/node_modules/on-finished/package.json b/node_modules/on-finished/package.json new file mode 100644 index 0000000..b9df1bd --- /dev/null +++ b/node_modules/on-finished/package.json @@ -0,0 +1,31 @@ +{ + "name": "on-finished", + "description": "Execute a callback when a request closes, finishes, or errors", + "version": "2.3.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "repository": "jshttp/on-finished", + "dependencies": { + "ee-first": "1.1.1" + }, + "devDependencies": { + "istanbul": "0.3.9", + "mocha": "2.2.5" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/on-headers/HISTORY.md b/node_modules/on-headers/HISTORY.md new file mode 100644 index 0000000..090598d --- /dev/null +++ b/node_modules/on-headers/HISTORY.md @@ -0,0 +1,21 @@ +1.0.2 / 2019-02-21 +================== + + * Fix `res.writeHead` patch missing return value + +1.0.1 / 2015-09-29 +================== + + * perf: enable strict mode + +1.0.0 / 2014-08-10 +================== + + * Honor `res.statusCode` change in `listener` + * Move to `jshttp` organization + * Prevent `arguments`-related de-opt + +0.0.0 / 2014-05-13 +================== + + * Initial implementation diff --git a/node_modules/on-headers/LICENSE b/node_modules/on-headers/LICENSE new file mode 100644 index 0000000..b7dce6c --- /dev/null +++ b/node_modules/on-headers/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/on-headers/README.md b/node_modules/on-headers/README.md new file mode 100644 index 0000000..ae84282 --- /dev/null +++ b/node_modules/on-headers/README.md @@ -0,0 +1,81 @@ +# on-headers + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Execute a listener when a response is about to write headers. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install on-headers +``` + +## API + + + +```js +var onHeaders = require('on-headers') +``` + +### onHeaders(res, listener) + +This will add the listener `listener` to fire when headers are emitted for `res`. +The listener is passed the `response` object as it's context (`this`). Headers are +considered to be emitted only once, right before they are sent to the client. + +When this is called multiple times on the same `res`, the `listener`s are fired +in the reverse order they were added. + +## Examples + +```js +var http = require('http') +var onHeaders = require('on-headers') + +http + .createServer(onRequest) + .listen(3000) + +function addPoweredBy () { + // set if not set by end of request + if (!this.getHeader('X-Powered-By')) { + this.setHeader('X-Powered-By', 'Node.js') + } +} + +function onRequest (req, res) { + onHeaders(res, addPoweredBy) + + res.setHeader('Content-Type', 'text/plain') + res.end('hello!') +} +``` + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/on-headers/master +[coveralls-url]: https://coveralls.io/r/jshttp/on-headers?branch=master +[node-version-image]: https://badgen.net/npm/node/on-headers +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/on-headers +[npm-url]: https://npmjs.org/package/on-headers +[npm-version-image]: https://badgen.net/npm/v/on-headers +[travis-image]: https://badgen.net/travis/jshttp/on-headers/master +[travis-url]: https://travis-ci.org/jshttp/on-headers diff --git a/node_modules/on-headers/index.js b/node_modules/on-headers/index.js new file mode 100644 index 0000000..7db6375 --- /dev/null +++ b/node_modules/on-headers/index.js @@ -0,0 +1,132 @@ +/*! + * on-headers + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = onHeaders + +/** + * Create a replacement writeHead method. + * + * @param {function} prevWriteHead + * @param {function} listener + * @private + */ + +function createWriteHead (prevWriteHead, listener) { + var fired = false + + // return function with core name and argument list + return function writeHead (statusCode) { + // set headers from arguments + var args = setWriteHeadHeaders.apply(this, arguments) + + // fire listener + if (!fired) { + fired = true + listener.call(this) + + // pass-along an updated status code + if (typeof args[0] === 'number' && this.statusCode !== args[0]) { + args[0] = this.statusCode + args.length = 1 + } + } + + return prevWriteHead.apply(this, args) + } +} + +/** + * Execute a listener when a response is about to write headers. + * + * @param {object} res + * @return {function} listener + * @public + */ + +function onHeaders (res, listener) { + if (!res) { + throw new TypeError('argument res is required') + } + + if (typeof listener !== 'function') { + throw new TypeError('argument listener must be a function') + } + + res.writeHead = createWriteHead(res.writeHead, listener) +} + +/** + * Set headers contained in array on the response object. + * + * @param {object} res + * @param {array} headers + * @private + */ + +function setHeadersFromArray (res, headers) { + for (var i = 0; i < headers.length; i++) { + res.setHeader(headers[i][0], headers[i][1]) + } +} + +/** + * Set headers contained in object on the response object. + * + * @param {object} res + * @param {object} headers + * @private + */ + +function setHeadersFromObject (res, headers) { + var keys = Object.keys(headers) + for (var i = 0; i < keys.length; i++) { + var k = keys[i] + if (k) res.setHeader(k, headers[k]) + } +} + +/** + * Set headers and other properties on the response object. + * + * @param {number} statusCode + * @private + */ + +function setWriteHeadHeaders (statusCode) { + var length = arguments.length + var headerIndex = length > 1 && typeof arguments[1] === 'string' + ? 2 + : 1 + + var headers = length >= headerIndex + 1 + ? arguments[headerIndex] + : undefined + + this.statusCode = statusCode + + if (Array.isArray(headers)) { + // handle array case + setHeadersFromArray(this, headers) + } else if (headers) { + // handle object case + setHeadersFromObject(this, headers) + } + + // copy leading arguments + var args = new Array(Math.min(length, headerIndex)) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + + return args +} diff --git a/node_modules/on-headers/package.json b/node_modules/on-headers/package.json new file mode 100644 index 0000000..1e9bf9e --- /dev/null +++ b/node_modules/on-headers/package.json @@ -0,0 +1,42 @@ +{ + "name": "on-headers", + "description": "Execute a listener when a response is about to write headers", + "version": "1.0.2", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "event", + "headers", + "http", + "onheaders" + ], + "repository": "jshttp/on-headers", + "devDependencies": { + "eslint": "5.14.1", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-markdown": "1.0.0", + "eslint-plugin-node": "8.0.1", + "eslint-plugin-promise": "4.0.1", + "eslint-plugin-standard": "4.0.0", + "istanbul": "0.4.5", + "mocha": "6.0.1", + "supertest": "3.4.2" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/opn/index.js b/node_modules/opn/index.js new file mode 100644 index 0000000..3daa162 --- /dev/null +++ b/node_modules/opn/index.js @@ -0,0 +1,113 @@ +'use strict'; +const {promisify} = require('util'); +const path = require('path'); +const childProcess = require('child_process'); +const isWsl = require('is-wsl'); + +const pExecFile = promisify(childProcess.execFile); + +// Convert a path from WSL format to Windows format: +// `/mnt/c/Program Files/Example/MyApp.exe` → `C:\Program Files\Example\MyApp.exe`` +const wslToWindowsPath = async path => { + const {stdout} = await pExecFile('wslpath', ['-w', path]); + return stdout.trim(); +}; + +module.exports = async (target, options) => { + if (typeof target !== 'string') { + throw new TypeError('Expected a `target`'); + } + + options = { + wait: false, + ...options + }; + + let command; + let appArguments = []; + const cliArguments = []; + const childProcessOptions = {}; + + if (Array.isArray(options.app)) { + appArguments = options.app.slice(1); + options.app = options.app[0]; + } + + if (process.platform === 'darwin') { + command = 'open'; + + if (options.wait) { + cliArguments.push('-W'); + } + + if (options.app) { + cliArguments.push('-a', options.app); + } + } else if (process.platform === 'win32' || isWsl) { + command = 'cmd' + (isWsl ? '.exe' : ''); + cliArguments.push('/c', 'start', '""', '/b'); + target = target.replace(/&/g, '^&'); + + if (options.wait) { + cliArguments.push('/wait'); + } + + if (options.app) { + if (isWsl && options.app.startsWith('/mnt/')) { + const windowsPath = await wslToWindowsPath(options.app); + options.app = windowsPath; + } + + cliArguments.push(options.app); + } + + if (appArguments.length > 0) { + cliArguments.push(...appArguments); + } + } else { + if (options.app) { + command = options.app; + } else { + const useSystemXdgOpen = process.versions.electron || process.platform === 'android'; + command = useSystemXdgOpen ? 'xdg-open' : path.join(__dirname, 'xdg-open'); + } + + if (appArguments.length > 0) { + cliArguments.push(...appArguments); + } + + if (!options.wait) { + // `xdg-open` will block the process unless stdio is ignored + // and it's detached from the parent even if it's unref'd. + childProcessOptions.stdio = 'ignore'; + childProcessOptions.detached = true; + } + } + + cliArguments.push(target); + + if (process.platform === 'darwin' && appArguments.length > 0) { + cliArguments.push('--args', ...appArguments); + } + + const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions); + + if (options.wait) { + return new Promise((resolve, reject) => { + subprocess.once('error', reject); + + subprocess.once('close', exitCode => { + if (exitCode > 0) { + reject(new Error(`Exited with code ${exitCode}`)); + return; + } + + resolve(subprocess); + }); + }); + } + + subprocess.unref(); + + return subprocess; +}; diff --git a/node_modules/opn/license b/node_modules/opn/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/opn/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/opn/package.json b/node_modules/opn/package.json new file mode 100644 index 0000000..2a2616a --- /dev/null +++ b/node_modules/opn/package.json @@ -0,0 +1,55 @@ +{ + "name": "opn", + "version": "6.0.0", + "description": "Open stuff like URLs, files, executables. Cross-platform.", + "license": "MIT", + "repository": "sindresorhus/open", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo" + }, + "files": [ + "index.js", + "xdg-open" + ], + "keywords": [ + "app", + "open", + "opener", + "opens", + "launch", + "start", + "xdg-open", + "xdg", + "default", + "cmd", + "browser", + "editor", + "executable", + "exe", + "url", + "urls", + "arguments", + "args", + "spawn", + "exec", + "child", + "process", + "website", + "file" + ], + "dependencies": { + "is-wsl": "^1.1.0" + }, + "devDependencies": { + "ava": "^1.4.0", + "xo": "^0.24.0" + } +} diff --git a/node_modules/opn/readme.md b/node_modules/opn/readme.md new file mode 100644 index 0000000..160b743 --- /dev/null +++ b/node_modules/opn/readme.md @@ -0,0 +1,98 @@ +# open + +> Open stuff like URLs, files, executables. Cross-platform. + +If need this for Electron, use [`shell.openItem()`](https://electronjs.org/docs/api/shell#shellopenitemfullpath) instead. + +Note: The original [`open` package](https://github.com/pwnall/node-open) was recently deprecated in favor of this package, and we got the name, so this package is now named `open` instead of `opn`. If you're upgrading from the original `open` package (`open@0.0.5` or lower), keep in mind that the API is different. + +#### Why? + +- Actively maintained. +- Supports app arguments. +- Safer as it uses `spawn` instead of `exec`. +- Fixes most of the open original `node-open` issues. +- Includes the latest [`xdg-open` script](http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=c55122295c2a480fa721a9614f0e2d42b2949c18) for Linux. +- Supports WSL paths to Windows apps under `/mnt/*`. + + +## Install + +``` +$ npm install open +``` + + +## Usage + +```js +const open = require('open'); + +// Opens the image in the default image viewer +(async () => { + await open('unicorn.png', {wait: true}); + console.log('The image viewer app closed'); + + // Opens the url in the default browser + await open('https://sindresorhus.com'); + + // Specify the app to open in + await open('https://sindresorhus.com', {app: 'firefox'}); + + // Specify app arguments + await open('https://sindresorhus.com', {app: ['google chrome', '--incognito']}); +})(); +``` + + +## API + +It uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms. + +### open(target, [options]) + +Returns a promise for the [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process. + +#### target + +Type: `string` + +The thing you want to open. Can be a URL, file, or executable. + +Opens in the default app for the file type. For example, URLs opens in your default browser. + +#### options + +Type: `Object` + +##### wait + +Type: `boolean`
+Default: `false` + +Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app. + +Note that it waits for the app to exit, not just for the window to close. + +On Windows, you have to explicitly specify an app for it to be able to wait. + +##### app + +Type: `string | string[]` + +Specify the app to open the `target` with, or an array with the app and app arguments. + +The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. + +You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome. + + +## Related + +- [opn-cli](https://github.com/sindresorhus/opn-cli) - CLI for this module +- [open-editor](https://github.com/sindresorhus/open-editor) - Open files in your editor at a specific line and column + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/opn/xdg-open b/node_modules/opn/xdg-open new file mode 100644 index 0000000..faaea7f --- /dev/null +++ b/node_modules/opn/xdg-open @@ -0,0 +1,1066 @@ +#!/bin/sh +#--------------------------------------------- +# xdg-open +# +# Utility script to open a URL in the registered default application. +# +# Refer to the usage() function below for usage. +# +# Copyright 2009-2010, Fathi Boudra +# Copyright 2009-2010, Rex Dieter +# Copyright 2006, Kevin Krammer +# Copyright 2006, Jeremy White +# +# LICENSE: +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +#--------------------------------------------- + +manualpage() +{ +cat << _MANUALPAGE +Name + + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +Description + + xdg-open opens a file or URL in the user's preferred + application. If a URL is provided the URL will be opened in the + user's preferred web browser. If a file is provided the file + will be opened in the preferred application for files of that + type. xdg-open supports file, ftp, http and https URLs. + + xdg-open is for use inside a desktop session only. It is not + recommended to use xdg-open as root. + +Options + + --help + Show command synopsis. + + --manual + Show this manual page. + + --version + Show the xdg-utils version information. + +Exit Codes + + An exit code of 0 indicates success while a non-zero exit code + indicates failure. The following failure codes can be returned: + + 1 + Error in command line syntax. + + 2 + One of the files passed on the command line did not + exist. + + 3 + A required tool could not be found. + + 4 + The action failed. + +See Also + + xdg-mime(1), xdg-settings(1), MIME applications associations + specification + +Examples + +xdg-open 'http://www.freedesktop.org/' + + Opens the freedesktop.org website in the user's default + browser. + +xdg-open /tmp/foobar.png + + Opens the PNG image file /tmp/foobar.png in the user's default + image viewing application. +_MANUALPAGE +} + +usage() +{ +cat << _USAGE + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +_USAGE +} + +#@xdg-utils-common@ + +#---------------------------------------------------------------------------- +# Common utility functions included in all XDG wrapper scripts +#---------------------------------------------------------------------------- + +DEBUG() +{ + [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; + [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; + shift + echo "$@" >&2 +} + +# This handles backslashes but not quote marks. +first_word() +{ + read first rest + echo "$first" +} + +#------------------------------------------------------------- +# map a binary to a .desktop file +binary_to_desktop_file() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + binary="`which "$1"`" + binary="`readlink -f "$binary"`" + base="`basename "$binary"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] || continue + [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do + [ -r "$file" ] || continue + # Check to make sure it's worth the processing. + grep -q "^Exec.*$base" "$file" || continue + # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). + grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue + command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + if [ x"`readlink -f "$command"`" = x"$binary" ]; then + # Fix any double slashes that got added path composition + echo "$file" | sed -e 's,//*,/,g' + return + fi + done + done +} + +#------------------------------------------------------------- +# map a .desktop file to a binary +desktop_file_to_binary() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + desktop="`basename "$1"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + # Check if desktop file contains - + if [ "${desktop#*-}" != "$desktop" ]; then + vendor=${desktop%-*} + app=${desktop#*-} + if [ -r $dir/applications/$vendor/$app ]; then + file_path=$dir/applications/$vendor/$app + elif [ -r $dir/applnk/$vendor/$app ]; then + file_path=$dir/applnk/$vendor/$app + fi + fi + if test -z "$file_path" ; then + for indir in "$dir"/applications/ "$dir"/applications/*/ "$dir"/applnk/ "$dir"/applnk/*/; do + file="$indir/$desktop" + if [ -r "$file" ]; then + file_path=$file + break + fi + done + fi + if [ -r "$file_path" ]; then + # Remove any arguments (%F, %f, %U, %u, etc.). + command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + readlink -f "$command" + return + fi + done +} + +#------------------------------------------------------------- +# Exit script on successfully completing the desired operation + +exit_success() +{ + if [ $# -gt 0 ]; then + echo "$@" + echo + fi + + exit 0 +} + + +#----------------------------------------- +# Exit script on malformed arguments, not enough arguments +# or missing required option. +# prints usage information + +exit_failure_syntax() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + echo "Try 'xdg-open --help' for more information." >&2 + else + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + fi + + exit 1 +} + +#------------------------------------------------------------- +# Exit script on missing file specified on command line + +exit_failure_file_missing() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 2 +} + +#------------------------------------------------------------- +# Exit script on failure to locate necessary tool applications + +exit_failure_operation_impossible() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 3 +} + +#------------------------------------------------------------- +# Exit script on failure returned by a tool application + +exit_failure_operation_failed() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 4 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to read a specified file + +exit_failure_file_permission_read() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 5 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to write a specified file + +exit_failure_file_permission_write() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 6 +} + +check_input_file() +{ + if [ ! -e "$1" ]; then + exit_failure_file_missing "file '$1' does not exist" + fi + if [ ! -r "$1" ]; then + exit_failure_file_permission_read "no permission to read file '$1'" + fi +} + +check_vendor_prefix() +{ + file_label="$2" + [ -n "$file_label" ] || file_label="filename" + file=`basename "$1"` + case "$file" in + [[:alpha:]]*-*) + return + ;; + esac + + echo "xdg-open: $file_label '$file' does not have a proper vendor prefix" >&2 + echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 + echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 + echo "Use --novendor to override or 'xdg-open --manual' for additional info." >&2 + exit 1 +} + +check_output_file() +{ + # if the file exists, check if it is writeable + # if it does not exists, check if we are allowed to write on the directory + if [ -e "$1" ]; then + if [ ! -w "$1" ]; then + exit_failure_file_permission_write "no permission to write to file '$1'" + fi + else + DIR=`dirname "$1"` + if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then + exit_failure_file_permission_write "no permission to create file '$1'" + fi + fi +} + +#---------------------------------------- +# Checks for shared commands, e.g. --help + +check_common_commands() +{ + while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + --help) + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + exit_success + ;; + + --manual) + manualpage + exit_success + ;; + + --version) + echo "xdg-open 1.1.3" + exit_success + ;; + esac + done +} + +check_common_commands "$@" + +[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; +if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then + # Be silent + xdg_redirect_output=" > /dev/null 2> /dev/null" +else + # All output to stderr + xdg_redirect_output=" >&2" +fi + +#-------------------------------------- +# Checks for known desktop environments +# set variable DE to the desktop environments name, lowercase + +detectDE() +{ + # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 + unset GREP_OPTIONS + + if [ -n "${XDG_CURRENT_DESKTOP}" ]; then + case "${XDG_CURRENT_DESKTOP}" in + # only recently added to menu-spec, pre-spec X- still in use + Cinnamon|X-Cinnamon) + DE=cinnamon; + ;; + ENLIGHTENMENT) + DE=enlightenment; + ;; + # GNOME, GNOME-Classic:GNOME, or GNOME-Flashback:GNOME + GNOME*) + DE=gnome; + ;; + KDE) + DE=kde; + ;; + # Deepin Desktop Environments + DEEPIN|Deepin|deepin) + DE=dde; + ;; + LXDE) + DE=lxde; + ;; + LXQt) + DE=lxqt; + ;; + MATE) + DE=mate; + ;; + XFCE) + DE=xfce + ;; + X-Generic) + DE=generic + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # classic fallbacks + if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; + elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; + elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; + elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; + elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; + elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce + elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; + elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt; + fi + fi + + if [ x"$DE" = x"" ]; then + # fallback to checking $DESKTOP_SESSION + case "$DESKTOP_SESSION" in + gnome) + DE=gnome; + ;; + LXDE|Lubuntu) + DE=lxde; + ;; + MATE) + DE=mate; + ;; + xfce|xfce4|'Xfce Session') + DE=xfce; + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # fallback to uname output for other platforms + case "$(uname 2>/dev/null)" in + CYGWIN*) + DE=cygwin; + ;; + Darwin) + DE=darwin; + ;; + esac + fi + + if [ x"$DE" = x"gnome" ]; then + # gnome-default-applications-properties is only available in GNOME 2.x + # but not in GNOME 3.x + which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" + fi + + if [ -f "$XDG_RUNTIME_DIR/flatpak-info" ]; then + DE="flatpak" + fi +} + +#---------------------------------------------------------------------------- +# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 +# It also always returns 1 in KDE 3.4 and earlier +# Simply return 0 in such case + +kfmclient_fix_exit_code() +{ + version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` + major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` + minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` + release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` + test "$major" -gt 3 && return $1 + test "$minor" -gt 5 && return $1 + test "$release" -gt 4 && return $1 + return 0 +} + +#---------------------------------------------------------------------------- +# Returns true if there is a graphical display attached. + +has_display() +{ + if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then + return 0 + else + return 1 + fi +} + +# This handles backslashes but not quote marks. +last_word() +{ + read first rest + echo "$rest" +} + +# Get the value of a key in a desktop file's Desktop Entry group. +# Example: Use get_key foo.desktop Exec +# to get the values of the Exec= key for the Desktop Entry group. +get_key() +{ + local file="${1}" + local key="${2}" + local desktop_entry="" + + IFS_="${IFS}" + IFS="" + while read line + do + case "$line" in + "[Desktop Entry]") + desktop_entry="y" + ;; + # Reset match flag for other groups + "["*) + desktop_entry="" + ;; + "${key}="*) + # Only match Desktop Entry group + if [ -n "${desktop_entry}" ] + then + echo "${line}" | cut -d= -f 2- + fi + esac + done < "${file}" + IFS="${IFS_}" +} + +# Returns true if argument is a file:// URL or path +is_file_url_or_path() +{ + if echo "$1" | grep -q '^file://' \ + || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:'; then + return 0 + else + return 1 + fi +} + +# If argument is a file URL, convert it to a (percent-decoded) path. +# If not, leave it as it is. +file_url_to_path() +{ + local file="$1" + if echo "$file" | grep -q '^file:///'; then + file=${file#file://} + file=${file%%#*} + file=$(echo "$file" | sed -r 's/\?.*$//') + local printf=printf + if [ -x /usr/bin/printf ]; then + printf=/usr/bin/printf + fi + file=$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')") + fi + echo "$file" +} + +open_cygwin() +{ + cygstart "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_darwin() +{ + open "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_kde() +{ + if [ -n "${KDE_SESSION_VERSION}" ]; then + case "${KDE_SESSION_VERSION}" in + 4) + kde-open "$1" + ;; + 5) + kde-open${KDE_SESSION_VERSION} "$1" + ;; + esac + else + kfmclient exec "$1" + kfmclient_fix_exit_code $? + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_dde() +{ + if dde-open -version >/dev/null 2>&1; then + dde-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome3() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif gnome-open --help 2>/dev/null 1>&2; then + gnome-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_mate() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif mate-open --help 2>/dev/null 1>&2; then + mate-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_xfce() +{ + if exo-open --help 2>/dev/null 1>&2; then + exo-open "$1" + elif gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_enlightenment() +{ + if enlightenment_open --help 2>/dev/null 1>&2; then + enlightenment_open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_flatpak() +{ + gdbus call --session \ + --dest org.freedesktop.portal.Desktop \ + --object-path /org/freedesktop/portal/desktop \ + --method org.freedesktop.portal.OpenURI.OpenURI \ + "" "$1" {} + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +#----------------------------------------- +# Recursively search .desktop file + +search_desktop_file() +{ + local default="$1" + local dir="$2" + local target="$3" + + local file="" + # look for both vendor-app.desktop, vendor/app.desktop + if [ -r "$dir/$default" ]; then + file="$dir/$default" + elif [ -r "$dir/`echo $default | sed -e 's|-|/|'`" ]; then + file="$dir/`echo $default | sed -e 's|-|/|'`" + fi + + if [ -r "$file" ] ; then + command="$(get_key "${file}" "Exec" | first_word)" + command_exec=`which $command 2>/dev/null` + icon="$(get_key "${file}" "Icon")" + # FIXME: Actually LC_MESSAGES should be used as described in + # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html + localised_name="$(get_key "${file}" "Name")" + set -- $(get_key "${file}" "Exec" | last_word) + # We need to replace any occurrence of "%f", "%F" and + # the like by the target file. We examine each + # argument and append the modified argument to the + # end then shift. + local args=$# + local replaced=0 + while [ $args -gt 0 ]; do + case $1 in + %[c]) + replaced=1 + arg="${localised_name}" + shift + set -- "$@" "$arg" + ;; + %[fFuU]) + replaced=1 + arg="$target" + shift + set -- "$@" "$arg" + ;; + %[i]) + replaced=1 + shift + set -- "$@" "--icon" "$icon" + ;; + *) + arg="$1" + shift + set -- "$@" "$arg" + ;; + esac + args=$(( $args - 1 )) + done + [ $replaced -eq 1 ] || set -- "$@" "$target" + "$command_exec" "$@" + + if [ $? -eq 0 ]; then + exit_success + fi + fi + + for d in $dir/*/; do + [ -d "$d" ] && search_desktop_file "$default" "$d" "$target" + done +} + + +open_generic_xdg_mime() +{ + filetype="$2" + default=`xdg-mime query default "$filetype"` + if [ -n "$default" ] ; then + xdg_user_dir="$XDG_DATA_HOME" + [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" + + xdg_system_dirs="$XDG_DATA_DIRS" + [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/ + +DEBUG 3 "$xdg_user_dir:$xdg_system_dirs" + for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do + search_desktop_file "$default" "$x/applications/" "$1" + done + fi +} + +open_generic_xdg_file_mime() +{ + filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"` + open_generic_xdg_mime "$1" "$filetype" +} + +open_generic_xdg_x_scheme_handler() +{ + scheme="`echo $1 | sed -n 's/\(^[[:alnum:]+\.-]*\):.*$/\1/p'`" + if [ -n $scheme ]; then + filetype="x-scheme-handler/$scheme" + open_generic_xdg_mime "$1" "$filetype" + fi +} + +has_single_argument() +{ + test $# = 1 +} + +open_envvar() +{ + local oldifs="$IFS" + local browser browser_with_arg + + IFS=":" + for browser in $BROWSER; do + IFS="$oldifs" + + if [ -z "$browser" ]; then + continue + fi + + if echo "$browser" | grep -q %s; then + # Avoid argument injection. + # See https://bugs.freedesktop.org/show_bug.cgi?id=103807 + # URIs don't have IFS characters spaces anyway. + has_single_argument $1 && $(printf "$browser" "$1") + else + $browser "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + fi + done +} + +open_generic() +{ + if is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + check_input_file "$file" + + if has_display; then + filetype=`xdg-mime query filetype "$file" | sed "s/;.*//"` + open_generic_xdg_mime "$file" "$filetype" + fi + + if which run-mailcap 2>/dev/null 1>&2; then + run-mailcap --action=view "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + + if has_display && mimeopen -v 2>/dev/null 1>&2; then + mimeopen -L -n "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + fi + + if has_display; then + open_generic_xdg_x_scheme_handler "$1" + fi + + if [ -n "$BROWSER" ]; then + open_envvar "$1" + fi + + # if BROWSER variable is not set, check some well known browsers instead + if [ x"$BROWSER" = x"" ]; then + BROWSER=www-browser:links2:elinks:links:lynx:w3m + if has_display; then + BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER + fi + fi + + open_envvar "$1" + + exit_failure_operation_impossible "no method available for opening '$1'" +} + +open_lxde() +{ + + # pcmanfm only knows how to handle file:// urls and filepaths, it seems. + if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + # handle relative paths + if ! echo "$file" | grep -q ^/; then + file="$(pwd)/$file" + fi + + pcmanfm "$file" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_lxqt() +{ + open_generic "$1" +} + +[ x"$1" != x"" ] || exit_failure_syntax + +url= +while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + -*) + exit_failure_syntax "unexpected option '$parm'" + ;; + + *) + if [ -n "$url" ] ; then + exit_failure_syntax "unexpected argument '$parm'" + fi + url="$parm" + ;; + esac +done + +if [ -z "${url}" ] ; then + exit_failure_syntax "file or URL argument missing" +fi + +detectDE + +if [ x"$DE" = x"" ]; then + DE=generic +fi + +DEBUG 2 "Selected DE $DE" + +# sanitize BROWSER (avoid caling ourselves in particular) +case "${BROWSER}" in + *:"xdg-open"|"xdg-open":*) + BROWSER=$(echo $BROWSER | sed -e 's|:xdg-open||g' -e 's|xdg-open:||g') + ;; + "xdg-open") + BROWSER= + ;; +esac + +case "$DE" in + kde) + open_kde "$url" + ;; + + dde) + open_dde "$url" + ;; + + gnome3|cinnamon) + open_gnome3 "$url" + ;; + + gnome) + open_gnome "$url" + ;; + + mate) + open_mate "$url" + ;; + + xfce) + open_xfce "$url" + ;; + + lxde) + open_lxde "$url" + ;; + + lxqt) + open_lxqt "$url" + ;; + + enlightenment) + open_enlightenment "$url" + ;; + + cygwin) + open_cygwin "$url" + ;; + + darwin) + open_darwin "$url" + ;; + + flatpak) + open_flatpak "$url" + ;; + + generic) + open_generic "$url" + ;; + + *) + exit_failure_operation_impossible "no method available for opening '$url'" + ;; +esac diff --git a/node_modules/parse-json/index.js b/node_modules/parse-json/index.js new file mode 100644 index 0000000..16f42b4 --- /dev/null +++ b/node_modules/parse-json/index.js @@ -0,0 +1,33 @@ +'use strict'; +const errorEx = require('error-ex'); +const fallback = require('json-parse-better-errors'); + +const JSONError = errorEx('JSONError', { + fileName: errorEx.append('in %s') +}); + +module.exports = (input, reviver, filename) => { + if (typeof reviver === 'string') { + filename = reviver; + reviver = null; + } + + try { + try { + return JSON.parse(input, reviver); + } catch (err) { + fallback(input, reviver); + + throw err; + } + } catch (err) { + err.message = err.message.replace(/\n/g, ''); + + const jsonErr = new JSONError(err); + if (filename) { + jsonErr.fileName = filename; + } + + throw jsonErr; + } +}; diff --git a/node_modules/parse-json/license b/node_modules/parse-json/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/parse-json/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/parse-json/package.json b/node_modules/parse-json/package.json new file mode 100644 index 0000000..7aca6ed --- /dev/null +++ b/node_modules/parse-json/package.json @@ -0,0 +1,43 @@ +{ + "name": "parse-json", + "version": "4.0.0", + "description": "Parse JSON with more helpful errors", + "license": "MIT", + "repository": "sindresorhus/parse-json", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "files": [ + "index.js", + "vendor" + ], + "keywords": [ + "parse", + "json", + "graceful", + "error", + "message", + "humanize", + "friendly", + "helpful", + "string", + "str" + ], + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "devDependencies": { + "ava": "*", + "nyc": "^11.2.1", + "xo": "*" + } +} diff --git a/node_modules/parse-json/readme.md b/node_modules/parse-json/readme.md new file mode 100644 index 0000000..2976e34 --- /dev/null +++ b/node_modules/parse-json/readme.md @@ -0,0 +1,83 @@ +# parse-json [![Build Status](https://travis-ci.org/sindresorhus/parse-json.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-json) + +> Parse JSON with more helpful errors + + +## Install + +``` +$ npm install parse-json +``` + + +## Usage + +```js +const parseJson = require('parse-json'); +const json = '{\n\t"foo": true,\n}'; + + +JSON.parse(json); +/* +undefined:3 +} +^ +SyntaxError: Unexpected token } +*/ + + +parseJson(json); +/* +JSONError: Trailing comma in object at 3:1 +} +^ +*/ + + +parseJson(json, 'foo.json'); +/* +JSONError: Trailing comma in object in foo.json:3:1 +} +^ +*/ + + +// You can also add the filename at a later point +try { + parseJson(json); +} catch (err) { + err.fileName = 'foo.json'; + throw err; +} +/* +JSONError: Trailing comma in object in foo.json:3:1 +} +^ +*/ +``` + +## API + +### parseJson(input, [reviver], [filename]) + +#### input + +Type: `string` + +#### reviver + +Type: `Function` + +Prescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter +) for more. + +#### filename + +Type: `string` + +Filename displayed in the error message. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/parseurl/HISTORY.md b/node_modules/parseurl/HISTORY.md new file mode 100644 index 0000000..8e40954 --- /dev/null +++ b/node_modules/parseurl/HISTORY.md @@ -0,0 +1,58 @@ +1.3.3 / 2019-04-15 +================== + + * Fix Node.js 0.8 return value inconsistencies + +1.3.2 / 2017-09-09 +================== + + * perf: reduce overhead for full URLs + * perf: unroll the "fast-path" `RegExp` + +1.3.1 / 2016-01-17 +================== + + * perf: enable strict mode + +1.3.0 / 2014-08-09 +================== + + * Add `parseurl.original` for parsing `req.originalUrl` with fallback + * Return `undefined` if `req.url` is `undefined` + +1.2.0 / 2014-07-21 +================== + + * Cache URLs based on original value + * Remove no-longer-needed URL mis-parse work-around + * Simplify the "fast-path" `RegExp` + +1.1.3 / 2014-07-08 +================== + + * Fix typo + +1.1.2 / 2014-07-08 +================== + + * Seriously fix Node.js 0.8 compatibility + +1.1.1 / 2014-07-08 +================== + + * Fix Node.js 0.8 compatibility + +1.1.0 / 2014-07-08 +================== + + * Incorporate URL href-only parse fast-path + +1.0.1 / 2014-03-08 +================== + + * Add missing `require` + +1.0.0 / 2014-03-08 +================== + + * Genesis from `connect` diff --git a/node_modules/parseurl/LICENSE b/node_modules/parseurl/LICENSE new file mode 100644 index 0000000..27653d3 --- /dev/null +++ b/node_modules/parseurl/LICENSE @@ -0,0 +1,24 @@ + +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/parseurl/README.md b/node_modules/parseurl/README.md new file mode 100644 index 0000000..443e716 --- /dev/null +++ b/node_modules/parseurl/README.md @@ -0,0 +1,133 @@ +# parseurl + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Parse a URL with memoization. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install parseurl +``` + +## API + +```js +var parseurl = require('parseurl') +``` + +### parseurl(req) + +Parse the URL of the given request object (looks at the `req.url` property) +and return the result. The result is the same as `url.parse` in Node.js core. +Calling this function multiple times on the same `req` where `req.url` does +not change will return a cached parsed object, rather than parsing again. + +### parseurl.original(req) + +Parse the original URL of the given request object and return the result. +This works by trying to parse `req.originalUrl` if it is a string, otherwise +parses `req.url`. The result is the same as `url.parse` in Node.js core. +Calling this function multiple times on the same `req` where `req.originalUrl` +does not change will return a cached parsed object, rather than parsing again. + +## Benchmark + +```bash +$ npm run-script bench + +> parseurl@1.3.3 bench nodejs-parseurl +> node benchmark/index.js + + http_parser@2.8.0 + node@10.6.0 + v8@6.7.288.46-node.13 + uv@1.21.0 + zlib@1.2.11 + ares@1.14.0 + modules@64 + nghttp2@1.32.0 + napi@3 + openssl@1.1.0h + icu@61.1 + unicode@10.0 + cldr@33.0 + tz@2018c + +> node benchmark/fullurl.js + + Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy" + + 4 tests completed. + + fasturl x 2,207,842 ops/sec ±3.76% (184 runs sampled) + nativeurl - legacy x 507,180 ops/sec ±0.82% (191 runs sampled) + nativeurl - whatwg x 290,044 ops/sec ±1.96% (189 runs sampled) + parseurl x 488,907 ops/sec ±2.13% (192 runs sampled) + +> node benchmark/pathquery.js + + Parsing URL "/foo/bar?user=tj&pet=fluffy" + + 4 tests completed. + + fasturl x 3,812,564 ops/sec ±3.15% (188 runs sampled) + nativeurl - legacy x 2,651,631 ops/sec ±1.68% (189 runs sampled) + nativeurl - whatwg x 161,837 ops/sec ±2.26% (189 runs sampled) + parseurl x 4,166,338 ops/sec ±2.23% (184 runs sampled) + +> node benchmark/samerequest.js + + Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object + + 4 tests completed. + + fasturl x 3,821,651 ops/sec ±2.42% (185 runs sampled) + nativeurl - legacy x 2,651,162 ops/sec ±1.90% (187 runs sampled) + nativeurl - whatwg x 175,166 ops/sec ±1.44% (188 runs sampled) + parseurl x 14,912,606 ops/sec ±3.59% (183 runs sampled) + +> node benchmark/simplepath.js + + Parsing URL "/foo/bar" + + 4 tests completed. + + fasturl x 12,421,765 ops/sec ±2.04% (191 runs sampled) + nativeurl - legacy x 7,546,036 ops/sec ±1.41% (188 runs sampled) + nativeurl - whatwg x 198,843 ops/sec ±1.83% (189 runs sampled) + parseurl x 24,244,006 ops/sec ±0.51% (194 runs sampled) + +> node benchmark/slash.js + + Parsing URL "/" + + 4 tests completed. + + fasturl x 17,159,456 ops/sec ±3.25% (188 runs sampled) + nativeurl - legacy x 11,635,097 ops/sec ±3.79% (184 runs sampled) + nativeurl - whatwg x 240,693 ops/sec ±0.83% (189 runs sampled) + parseurl x 42,279,067 ops/sec ±0.55% (190 runs sampled) +``` + +## License + + [MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/parseurl/master +[coveralls-url]: https://coveralls.io/r/pillarjs/parseurl?branch=master +[node-image]: https://badgen.net/npm/node/parseurl +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/parseurl +[npm-url]: https://npmjs.org/package/parseurl +[npm-version-image]: https://badgen.net/npm/v/parseurl +[travis-image]: https://badgen.net/travis/pillarjs/parseurl/master +[travis-url]: https://travis-ci.org/pillarjs/parseurl diff --git a/node_modules/parseurl/index.js b/node_modules/parseurl/index.js new file mode 100644 index 0000000..ece7223 --- /dev/null +++ b/node_modules/parseurl/index.js @@ -0,0 +1,158 @@ +/*! + * parseurl + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var url = require('url') +var parse = url.parse +var Url = url.Url + +/** + * Module exports. + * @public + */ + +module.exports = parseurl +module.exports.original = originalurl + +/** + * Parse the `req` url with memoization. + * + * @param {ServerRequest} req + * @return {Object} + * @public + */ + +function parseurl (req) { + var url = req.url + + if (url === undefined) { + // URL is undefined + return undefined + } + + var parsed = req._parsedUrl + + if (fresh(url, parsed)) { + // Return cached URL parse + return parsed + } + + // Parse the URL + parsed = fastparse(url) + parsed._raw = url + + return (req._parsedUrl = parsed) +}; + +/** + * Parse the `req` original url with fallback and memoization. + * + * @param {ServerRequest} req + * @return {Object} + * @public + */ + +function originalurl (req) { + var url = req.originalUrl + + if (typeof url !== 'string') { + // Fallback + return parseurl(req) + } + + var parsed = req._parsedOriginalUrl + + if (fresh(url, parsed)) { + // Return cached URL parse + return parsed + } + + // Parse the URL + parsed = fastparse(url) + parsed._raw = url + + return (req._parsedOriginalUrl = parsed) +}; + +/** + * Parse the `str` url with fast-path short-cut. + * + * @param {string} str + * @return {Object} + * @private + */ + +function fastparse (str) { + if (typeof str !== 'string' || str.charCodeAt(0) !== 0x2f /* / */) { + return parse(str) + } + + var pathname = str + var query = null + var search = null + + // This takes the regexp from https://github.com/joyent/node/pull/7878 + // Which is /^(\/[^?#\s]*)(\?[^#\s]*)?$/ + // And unrolls it into a for loop + for (var i = 1; i < str.length; i++) { + switch (str.charCodeAt(i)) { + case 0x3f: /* ? */ + if (search === null) { + pathname = str.substring(0, i) + query = str.substring(i + 1) + search = str.substring(i) + } + break + case 0x09: /* \t */ + case 0x0a: /* \n */ + case 0x0c: /* \f */ + case 0x0d: /* \r */ + case 0x20: /* */ + case 0x23: /* # */ + case 0xa0: + case 0xfeff: + return parse(str) + } + } + + var url = Url !== undefined + ? new Url() + : {} + + url.path = str + url.href = str + url.pathname = pathname + + if (search !== null) { + url.query = query + url.search = search + } + + return url +} + +/** + * Determine if parsed is still fresh for url. + * + * @param {string} url + * @param {object} parsedUrl + * @return {boolean} + * @private + */ + +function fresh (url, parsedUrl) { + return typeof parsedUrl === 'object' && + parsedUrl !== null && + (Url === undefined || parsedUrl instanceof Url) && + parsedUrl._raw === url +} diff --git a/node_modules/parseurl/package.json b/node_modules/parseurl/package.json new file mode 100644 index 0000000..6b443ca --- /dev/null +++ b/node_modules/parseurl/package.json @@ -0,0 +1,40 @@ +{ + "name": "parseurl", + "description": "parse a url with memoization", + "version": "1.3.3", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "repository": "pillarjs/parseurl", + "license": "MIT", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "5.16.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.17.1", + "eslint-plugin-node": "7.0.1", + "eslint-plugin-promise": "4.1.1", + "eslint-plugin-standard": "4.0.0", + "fast-url-parser": "1.1.3", + "istanbul": "0.4.5", + "mocha": "6.1.3" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint .", + "test": "mocha --check-leaks --bail --reporter spec test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/" + } +} diff --git a/node_modules/pascalcase/LICENSE b/node_modules/pascalcase/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/pascalcase/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/pascalcase/README.md b/node_modules/pascalcase/README.md new file mode 100644 index 0000000..fa3fd00 --- /dev/null +++ b/node_modules/pascalcase/README.md @@ -0,0 +1,80 @@ +# pascalcase [![NPM version](https://badge.fury.io/js/pascalcase.svg)](http://badge.fury.io/js/pascalcase) + +> Convert a string to pascal-case. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i pascalcase --save +``` + +## Usage + +```js +var pascalcase = require('pascalcase'); + +pascalcase('a'); +//=> 'A' + +pascalcase('foo bar baz'); +//=> 'FooBarBaz' + +pascalcase('foo_bar-baz'); +//=> 'FooBarBaz' + +pascalcase('foo.bar.baz'); +//=> 'FooBarBaz' + +pascalcase('foo/bar/baz'); +//=> 'FooBarBaz' + +pascalcase('foo[bar)baz'); +//=> 'FooBarBaz' + +pascalcase('#foo+bar*baz'); +//=> 'FooBarBaz' + +pascalcase('$foo~bar`baz'); +//=> 'FooBarBaz' + +pascalcase('_foo_bar-baz-'); +//=> 'FooBarBaz' +``` + +## Related projects + +* [justified](https://github.com/jonschlinkert/justified): Wrap words to a specified length and justified the text. +* [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. +* [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pascalcase/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 19, 2015._ \ No newline at end of file diff --git a/node_modules/pascalcase/index.js b/node_modules/pascalcase/index.js new file mode 100644 index 0000000..7e8159c --- /dev/null +++ b/node_modules/pascalcase/index.js @@ -0,0 +1,21 @@ +/*! + * pascalcase + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +function pascalcase(str) { + if (typeof str !== 'string') { + throw new TypeError('expected a string.'); + } + str = str.replace(/([A-Z])/g, ' $1'); + if (str.length === 1) { return str.toUpperCase(); } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + str = str.charAt(0).toUpperCase() + str.slice(1); + return str.replace(/[\W_]+(\w|$)/g, function (_, ch) { + return ch.toUpperCase(); + }); +} + +module.exports = pascalcase; diff --git a/node_modules/pascalcase/package.json b/node_modules/pascalcase/package.json new file mode 100644 index 0000000..0576d13 --- /dev/null +++ b/node_modules/pascalcase/package.json @@ -0,0 +1,46 @@ +{ + "name": "pascalcase", + "description": "Convert a string to pascal-case.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/pascalcase", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/pascalcase", + "bugs": { + "url": "https://github.com/jonschlinkert/pascalcase/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "keywords": [ + "camelcase", + "case", + "casing", + "pascal", + "pascal-case", + "pascalcase", + "string" + ], + "verb": { + "related": { + "list": [ + "pad-left", + "pad-right", + "word-wrap", + "repeat-string", + "justified" + ] + } + } +} \ No newline at end of file diff --git a/node_modules/path-dirname/index.js b/node_modules/path-dirname/index.js new file mode 100644 index 0000000..ed67817 --- /dev/null +++ b/node_modules/path-dirname/index.js @@ -0,0 +1,143 @@ +'use strict'; + +var path = require('path'); +var inspect = require('util').inspect; + +function assertPath(path) { + if (typeof path !== 'string') { + throw new TypeError('Path must be a string. Received ' + inspect(path)); + } +} + +function posix(path) { + assertPath(path); + if (path.length === 0) + return '.'; + var code = path.charCodeAt(0); + var hasRoot = (code === 47/*/*/); + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) + return hasRoot ? '/' : '.'; + if (hasRoot && end === 1) + return '//'; + return path.slice(0, end); +} + +function win32(path) { + assertPath(path); + var len = path.length; + if (len === 0) + return '.'; + var rootEnd = -1; + var end = -1; + var matchedSlash = true; + var offset = 0; + var code = path.charCodeAt(0); + + // Try to match a root + if (len > 1) { + if (code === 47/*/*/ || code === 92/*\*/) { + // Possible UNC root + + rootEnd = offset = 1; + + code = path.charCodeAt(1); + if (code === 47/*/*/ || code === 92/*\*/) { + // Matched double path separator at beginning + var j = 2; + var last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code !== 47/*/*/ && code !== 92/*\*/) + break; + } + if (j < len && j !== last) { + // Matched! + last = j; + // Match 1 or more non-path separators + for (; j < len; ++j) { + code = path.charCodeAt(j); + if (code === 47/*/*/ || code === 92/*\*/) + break; + } + if (j === len) { + // We matched a UNC root only + return path; + } + if (j !== last) { + // We matched a UNC root with leftovers + + // Offset by 1 to include the separator after the UNC root to + // treat it as a "normal root" on top of a (UNC) root + rootEnd = offset = j + 1; + } + } + } + } + } else if ((code >= 65/*A*/ && code <= 90/*Z*/) || + (code >= 97/*a*/ && code <= 122/*z*/)) { + // Possible device root + + code = path.charCodeAt(1); + if (path.charCodeAt(1) === 58/*:*/) { + rootEnd = offset = 2; + if (len > 2) { + code = path.charCodeAt(2); + if (code === 47/*/*/ || code === 92/*\*/) + rootEnd = offset = 3; + } + } + } + } else if (code === 47/*/*/ || code === 92/*\*/) { + return path[0]; + } + + for (var i = len - 1; i >= offset; --i) { + code = path.charCodeAt(i); + if (code === 47/*/*/ || code === 92/*\*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; + } + } + + if (end === -1) { + if (rootEnd === -1) + return '.'; + else + end = rootEnd; + } + return path.slice(0, end); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/node_modules/path-dirname/license b/node_modules/path-dirname/license new file mode 100644 index 0000000..1981663 --- /dev/null +++ b/node_modules/path-dirname/license @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) Elan Shanker and Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/node_modules/path-dirname/package.json b/node_modules/path-dirname/package.json new file mode 100644 index 0000000..eb78533 --- /dev/null +++ b/node_modules/path-dirname/package.json @@ -0,0 +1,29 @@ +{ + "name": "path-dirname", + "version": "1.0.2", + "description": "Node.js path.dirname() ponyfill", + "license": "MIT", + "repository": "es128/path-dirname", + "author": "Elan Shanker", + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "dirname", + "dir", + "path", + "paths", + "file", + "built-in", + "util", + "utils", + "core", + "stdlib", + "ponyfill", + "polyfill", + "shim" + ] +} diff --git a/node_modules/path-dirname/readme.md b/node_modules/path-dirname/readme.md new file mode 100644 index 0000000..652a562 --- /dev/null +++ b/node_modules/path-dirname/readme.md @@ -0,0 +1,53 @@ +# path-dirname [![Build Status](https://travis-ci.org/es128/path-dirname.svg?branch=master)](https://travis-ci.org/es128/path-dirname) + +> Node.js [`path.dirname()`](https://nodejs.org/api/path.html#path_path_dirname_path) [ponyfill](https://ponyfill.com) + +This was needed in order to expose `path.posix.dirname()` on Node.js v0.10 + +## Install + +``` +$ npm install --save path-dirname +``` + + +## Usage + +```js +const pathDirname = require('path-dirname'); + +pathDirname('/home/foo'); +//=> '/home' +pathDirname('C:\\Users\\foo'); +//=> 'C:\\Users' +pathDirname('foo'); +//=> '.' +pathDirname('foo/bar'); +//=> 'foo' + +//Using posix version for consistent output when dealing with glob escape chars +pathDirname.win32('C:\\Users\\foo/\\*bar'); +//=> 'C:\\Users\\foo/' +pathDirname.posix('C:\\Users\\foo/\\*bar'); +//=> 'C:\\Users\\foo' +``` + + +## API + +See the [`path.dirname()` docs](https://nodejs.org/api/path.html#path_path_dirname_path). + +### pathDirname(path) + +### pathDirname.posix(path) + +POSIX specific version. + +### pathDirname.win32(path) + +Windows specific version. + + +## License + +MIT diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js new file mode 100644 index 0000000..22aa6c3 --- /dev/null +++ b/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/node_modules/path-is-absolute/license b/node_modules/path-is-absolute/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json new file mode 100644 index 0000000..91196d5 --- /dev/null +++ b/node_modules/path-is-absolute/package.json @@ -0,0 +1,43 @@ +{ + "name": "path-is-absolute", + "version": "1.0.1", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": "sindresorhus/path-is-absolute", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "devDependencies": { + "xo": "^0.16.0" + } +} diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md new file mode 100644 index 0000000..8dbdf5f --- /dev/null +++ b/node_modules/path-is-absolute/readme.md @@ -0,0 +1,59 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +const pathIsAbsolute = require('path-is-absolute'); + +// Running on Linux +pathIsAbsolute('/home/foo'); +//=> true +pathIsAbsolute('C:/Users/foo'); +//=> false + +// Running on Windows +pathIsAbsolute('C:/Users/foo'); +//=> true +pathIsAbsolute('/home/foo'); +//=> false + +// Running on any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +POSIX specific version. + +### pathIsAbsolute.win32(path) + +Windows specific version. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-key/index.js b/node_modules/path-key/index.js new file mode 100644 index 0000000..62c8250 --- /dev/null +++ b/node_modules/path-key/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = opts => { + opts = opts || {}; + + const env = opts.env || process.env; + const platform = opts.platform || process.platform; + + if (platform !== 'win32') { + return 'PATH'; + } + + return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; +}; diff --git a/node_modules/path-key/license b/node_modules/path-key/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/path-key/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/path-key/package.json b/node_modules/path-key/package.json new file mode 100644 index 0000000..81e0e8b --- /dev/null +++ b/node_modules/path-key/package.json @@ -0,0 +1,39 @@ +{ + "name": "path-key", + "version": "2.0.1", + "description": "Get the PATH environment variable key cross-platform", + "license": "MIT", + "repository": "sindresorhus/path-key", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "key", + "environment", + "env", + "variable", + "var", + "get", + "cross-platform", + "windows" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "esnext": true + } +} diff --git a/node_modules/path-key/readme.md b/node_modules/path-key/readme.md new file mode 100644 index 0000000..cb5710a --- /dev/null +++ b/node_modules/path-key/readme.md @@ -0,0 +1,51 @@ +# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key) + +> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform + +It's usually `PATH`, but on Windows it can be any casing like `Path`... + + +## Install + +``` +$ npm install --save path-key +``` + + +## Usage + +```js +const pathKey = require('path-key'); + +const key = pathKey(); +//=> 'PATH' + +const PATH = process.env[key]; +//=> '/usr/local/bin:/usr/bin:/bin' +``` + + +## API + +### pathKey([options]) + +#### options + +##### env + +Type: `Object`
+Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env) + +Use a custom environment variables object. + +#### platform + +Type: `string`
+Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) + +Get the PATH key for a specific platform. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-parse/LICENSE b/node_modules/path-parse/LICENSE new file mode 100644 index 0000000..810f3db --- /dev/null +++ b/node_modules/path-parse/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Javier Blanco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/path-parse/README.md b/node_modules/path-parse/README.md new file mode 100644 index 0000000..05097f8 --- /dev/null +++ b/node_modules/path-parse/README.md @@ -0,0 +1,42 @@ +# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse) + +> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com). + +## Install + +``` +$ npm install --save path-parse +``` + +## Usage + +```js +var pathParse = require('path-parse'); + +pathParse('/home/user/dir/file.txt'); +//=> { +// root : "/", +// dir : "/home/user/dir", +// base : "file.txt", +// ext : ".txt", +// name : "file" +// } +``` + +## API + +See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs. + +### pathParse(path) + +### pathParse.posix(path) + +The Posix specific version. + +### pathParse.win32(path) + +The Windows specific version. + +## License + +MIT © [Javier Blanco](http://jbgutierrez.info) diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js new file mode 100644 index 0000000..f062d0a --- /dev/null +++ b/node_modules/path-parse/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var isWindows = process.platform === 'win32'; + +// Regex to split a windows path into into [dir, root, basename, name, ext] +var splitWindowsRe = + /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; + +var win32 = {}; + +function win32SplitPath(filename) { + return splitWindowsRe.exec(filename).slice(1); +} + +win32.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = win32SplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + return { + root: allParts[1], + dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3] + }; +}; + + + +// Split a filename into [dir, root, basename, name, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; +var posix = {}; + + +function posixSplitPath(filename) { + return splitPathRe.exec(filename).slice(1); +} + + +posix.parse = function(pathString) { + if (typeof pathString !== 'string') { + throw new TypeError( + "Parameter 'pathString' must be a string, not " + typeof pathString + ); + } + var allParts = posixSplitPath(pathString); + if (!allParts || allParts.length !== 5) { + throw new TypeError("Invalid path '" + pathString + "'"); + } + + return { + root: allParts[1], + dir: allParts[0].slice(0, -1), + base: allParts[2], + ext: allParts[4], + name: allParts[3], + }; +}; + + +if (isWindows) + module.exports = win32.parse; +else /* posix */ + module.exports = posix.parse; + +module.exports.posix = posix.parse; +module.exports.win32 = win32.parse; diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json new file mode 100644 index 0000000..36c23f8 --- /dev/null +++ b/node_modules/path-parse/package.json @@ -0,0 +1,33 @@ +{ + "name": "path-parse", + "version": "1.0.7", + "description": "Node.js path.parse() ponyfill", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/jbgutierrez/path-parse.git" + }, + "keywords": [ + "path", + "paths", + "file", + "dir", + "parse", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim" + ], + "author": "Javier Blanco ", + "license": "MIT", + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" + }, + "homepage": "https://github.com/jbgutierrez/path-parse#readme" +} diff --git a/node_modules/path-type/index.js b/node_modules/path-type/index.js new file mode 100644 index 0000000..6e0a1b7 --- /dev/null +++ b/node_modules/path-type/index.js @@ -0,0 +1,42 @@ +'use strict'; +const fs = require('fs'); +const pify = require('pify'); + +function type(fn, fn2, fp) { + if (typeof fp !== 'string') { + return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`)); + } + + return pify(fs[fn])(fp) + .then(stats => stats[fn2]()) + .catch(err => { + if (err.code === 'ENOENT') { + return false; + } + + throw err; + }); +} + +function typeSync(fn, fn2, fp) { + if (typeof fp !== 'string') { + throw new TypeError(`Expected a string, got ${typeof fp}`); + } + + try { + return fs[fn](fp)[fn2](); + } catch (err) { + if (err.code === 'ENOENT') { + return false; + } + + throw err; + } +} + +exports.file = type.bind(null, 'stat', 'isFile'); +exports.dir = type.bind(null, 'stat', 'isDirectory'); +exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink'); +exports.fileSync = typeSync.bind(null, 'statSync', 'isFile'); +exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); +exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); diff --git a/node_modules/path-type/license b/node_modules/path-type/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/path-type/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/path-type/package.json b/node_modules/path-type/package.json new file mode 100644 index 0000000..bdcb46e --- /dev/null +++ b/node_modules/path-type/package.json @@ -0,0 +1,45 @@ +{ + "name": "path-type", + "version": "3.0.0", + "description": "Check if a path is a file, directory, or symlink", + "license": "MIT", + "repository": "sindresorhus/path-type", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "fs", + "type", + "is", + "check", + "directory", + "dir", + "file", + "filepath", + "symlink", + "symbolic", + "link", + "stat", + "stats", + "filesystem" + ], + "dependencies": { + "pify": "^3.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/path-type/readme.md b/node_modules/path-type/readme.md new file mode 100644 index 0000000..ed2af8b --- /dev/null +++ b/node_modules/path-type/readme.md @@ -0,0 +1,42 @@ +# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type) + +> Check if a path is a file, directory, or symlink + + +## Install + +``` +$ npm install path-type +``` + + +## Usage + +```js +const pathType = require('path-type'); + +pathType.file('package.json').then(isFile => { + console.log(isFile); + //=> true +}) +``` + + +## API + +### .file(path) +### .dir(path) +### .symlink(path) + +Returns a `Promise` for a `boolean` of whether the path is the checked type. + +### .fileSync(path) +### .dirSync(path) +### .symlinkSync(path) + +Returns a `boolean` of whether the path is the checked type. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pause-stream/.npmignore b/node_modules/pause-stream/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/pause-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/pause-stream/LICENSE b/node_modules/pause-stream/LICENSE new file mode 100644 index 0000000..6a477d4 --- /dev/null +++ b/node_modules/pause-stream/LICENSE @@ -0,0 +1,231 @@ +Dual Licensed MIT and Apache 2 + +The MIT License + +Copyright (c) 2013 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + ----------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2013 Dominic Tarr + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/pause-stream/index.js b/node_modules/pause-stream/index.js new file mode 100644 index 0000000..0e0bf96 --- /dev/null +++ b/node_modules/pause-stream/index.js @@ -0,0 +1,3 @@ +//through@2 handles this by default! +module.exports = require('through') + diff --git a/node_modules/pause-stream/package.json b/node_modules/pause-stream/package.json new file mode 100644 index 0000000..2a22646 --- /dev/null +++ b/node_modules/pause-stream/package.json @@ -0,0 +1,35 @@ +{ + "name": "pause-stream", + "version": "0.0.11", + "description": "a ThroughStream that strictly buffers all readable events when paused.", + "main": "index.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "stream-tester": "0.0.2", + "stream-spec": "~0.2.0" + }, + "scripts": { + "test": "node test/index.js && node test/pause-end.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/pause-stream.git" + }, + "keywords": [ + "stream", + "pipe", + "pause", + "drain", + "buffer" + ], + "author": "Dominic Tarr (dominictarr.com)", + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } +} diff --git a/node_modules/pause-stream/readme.markdown b/node_modules/pause-stream/readme.markdown new file mode 100644 index 0000000..2366939 --- /dev/null +++ b/node_modules/pause-stream/readme.markdown @@ -0,0 +1,29 @@ +# PauseStream + +This is a `Stream` that will strictly buffer when paused. +Connect it to anything you need buffered. + +``` js + var ps = require('pause-stream')(); + + badlyBehavedStream.pipe(ps.pause()) + + aLittleLater(function (err, data) { + ps.pipe(createAnotherStream(data)) + ps.resume() + }) +``` + +`PauseStream` will buffer whenever paused. +it will buffer when yau have called `pause` manually. +but also when it's downstream `dest.write()===false`. +it will attempt to drain the buffer when you call resume +or the downstream emits `'drain'` + +`PauseStream` is tested using [stream-spec](https://github.com/dominictarr/stream-spec) +and [stream-tester](https://github.com/dominictarr/stream-tester) + +This is now the default case of +[through](https://github.com/dominictarr/through) + +https://github.com/dominictarr/pause-stream/commit/4a6fe3dc2c11091b1efbfde912e0473719ed9cc0 diff --git a/node_modules/pause-stream/test/index.js b/node_modules/pause-stream/test/index.js new file mode 100644 index 0000000..db8778d --- /dev/null +++ b/node_modules/pause-stream/test/index.js @@ -0,0 +1,17 @@ +var spec = require('stream-spec') +var tester = require('stream-tester') +var ps = require('..')() + +spec(ps) + .through({strict: false}) + .validateOnExit() + +var master = tester.createConsistent + +tester.createRandomStream(1000) //1k random numbers + .pipe(master = tester.createConsistentStream()) + .pipe(tester.createUnpauseStream()) + .pipe(ps) + .pipe(tester.createPauseStream()) + .pipe(master.createSlave()) + diff --git a/node_modules/pause-stream/test/pause-end.js b/node_modules/pause-stream/test/pause-end.js new file mode 100644 index 0000000..a6c27ef --- /dev/null +++ b/node_modules/pause-stream/test/pause-end.js @@ -0,0 +1,33 @@ + +var pause = require('..') +var assert = require('assert') + +var ps = pause() +var read = [], ended = false + +ps.on('data', function (i) { + read.push(i) +}) + +ps.on('end', function () { + ended = true +}) + +assert.deepEqual(read, []) + +ps.write(0) +ps.write(1) +ps.write(2) + +assert.deepEqual(read, [0, 1, 2]) + +ps.pause() + +assert.deepEqual(read, [0, 1, 2]) + +ps.end() +assert.equal(ended, false) +ps.resume() +assert.equal(ended, true) + + diff --git a/node_modules/pidtree/bin/pidtree.js b/node_modules/pidtree/bin/pidtree.js new file mode 100644 index 0000000..542876e --- /dev/null +++ b/node_modules/pidtree/bin/pidtree.js @@ -0,0 +1,128 @@ +#!/usr/bin/env node + +'use strict'; + +var os = require('os'); +var pidtree = require('..'); + +// The method startsWith is not defined on string objects in node 0.10 +// eslint-disable-next-line no-extend-native +String.prototype.startsWith = function(suffix) { + return this.substring(0, suffix.length) === suffix; +}; + +function help() { + var help = + ' Usage\n' + + ' $ pidtree \n' + + '\n' + + 'Options\n' + + ' --list To print the pids as a list.\n' + + '\n' + + 'Examples\n' + + ' $ pidtree\n' + + ' $ pidtree --list\n' + + ' $ pidtree 1\n' + + ' $ pidtree 1 --list\n'; + console.log(help); +} + +function list(ppid) { + pidtree(ppid === undefined ? -1 : ppid, function(err, list) { + if (err) { + console.error(err.message); + return; + } + + console.log(list.join(os.EOL)); + }); +} + +function tree(ppid) { + pidtree(ppid, {advanced: true}, function(err, list) { + if (err) { + console.error(err.message); + return; + } + + var parents = {}; // Hash Map of parents + var tree = {}; // Adiacency Hash Map + while (list.length > 0) { + var element = list.pop(); + if (tree[element.ppid]) { + tree[element.ppid].push(element.pid); + } else { + tree[element.ppid] = [element.pid]; + } + + if (ppid === -1) { + parents[element.pid] = element.ppid; + } + } + + var roots = [ppid]; + if (ppid === -1) { + // Get all the roots + roots = Object.keys(tree).filter(function(node) { + return parents[node] === undefined; + }); + } + + roots.forEach(function(root) { + print(tree, root); + }); + }); + + function print(tree, start) { + function printBranch(node, branch) { + var isGraphHead = branch.length === 0; + var children = tree[node] || []; + + var branchHead = ''; + if (!isGraphHead) { + branchHead = children.length > 0 ? '┬ ' : '─ '; + } + + console.log(branch + branchHead + node); + + var baseBranch = branch; + if (!isGraphHead) { + var isChildOfLastBranch = branch.slice(-2) === '└─'; + baseBranch = branch.slice(0, -2) + (isChildOfLastBranch ? ' ' : '| '); + } + + var nextBranch = baseBranch + '├─'; + var lastBranch = baseBranch + '└─'; + children.forEach(function(child, index) { + printBranch( + child, + children.length - 1 === index ? lastBranch : nextBranch + ); + }); + } + + printBranch(start, ''); + } +} + +function run() { + var flag; + var ppid; + for (var i = 2; i < process.argv.length; i++) { + if (process.argv[i].startsWith('--')) { + flag = process.argv[i]; + } else { + ppid = process.argv[i]; + } + } + + if (ppid === undefined) { + ppid = -1; + } + + if (flag === '--list') list(ppid); + else if (flag === undefined) tree(ppid); + else help(); +} + +run(); diff --git a/node_modules/pidtree/index.js b/node_modules/pidtree/index.js new file mode 100644 index 0000000..2e2a92e --- /dev/null +++ b/node_modules/pidtree/index.js @@ -0,0 +1,46 @@ +'use strict'; + +function pify(fn, arg1, arg2) { + return new Promise(function(resolve, reject) { + fn(arg1, arg2, function(err, data) { + if (err) return reject(err); + resolve(data); + }); + }); +} + +// The method startsWith is not defined on string objects in node 0.10 +// eslint-disable-next-line no-extend-native +String.prototype.startsWith = function(suffix) { + return this.substring(0, suffix.length) === suffix; +}; + +var pidtree = require('./lib/pidtree'); + +/** + * Get the list of children pids of the given pid. + * @public + * @param {Number|String} pid A PID. If -1 will return all the pids. + * @param {Object} [options] Optional options object. + * @param {Boolean} [options.root=false] Include the provided PID in the list. + * @param {Boolean} [options.advanced=false] Returns a list of objects in the + * format {pid: X, ppid: Y}. + * @param {Function} [callback=undefined] Called when the list is ready. If not + * provided a promise is returned instead. + * @returns {Promise.} Only when the callback is not provided. + */ +function list(pid, options, callback) { + if (typeof options === 'function') { + callback = options; + options = undefined; + } + + if (typeof callback === 'function') { + pidtree(pid, options, callback); + return; + } + + return pify(pidtree, pid, options); +} + +module.exports = list; diff --git a/node_modules/pidtree/lib/bin.js b/node_modules/pidtree/lib/bin.js new file mode 100644 index 0000000..1e917cc --- /dev/null +++ b/node_modules/pidtree/lib/bin.js @@ -0,0 +1,49 @@ +'use strict'; + +var spawn = require('child_process').spawn; + +/** + * Spawn a binary and read its stdout. + * @param {String} cmd The name of the binary to spawn. + * @param {String[]} args The arguments for the binary. + * @param {Object} [options] Optional option for the spawn function. + * @param {Function} done(err, stdout) + */ +function run(cmd, args, options, done) { + if (typeof options === 'function') { + done = options; + options = undefined; + } + + var executed = false; + var ch = spawn(cmd, args, options); + var stdout = ''; + var stderr = ''; + + ch.stdout.on('data', function(d) { + stdout += d.toString(); + }); + + ch.stderr.on('data', function(d) { + stderr += d.toString(); + }); + + ch.on('error', function(err) { + if (executed) return; + executed = true; + done(new Error(err)); + }); + + ch.on('close', function(code) { + if (executed) return; + executed = true; + + if (stderr) { + return done(new Error(stderr)); + } + + done(null, stdout, code); + }); +} + +module.exports = run; diff --git a/node_modules/pidtree/lib/get.js b/node_modules/pidtree/lib/get.js new file mode 100644 index 0000000..1793d54 --- /dev/null +++ b/node_modules/pidtree/lib/get.js @@ -0,0 +1,40 @@ +'use strict'; + +var os = require('os'); + +var platformToMethod = { + darwin: 'ps', + sunos: 'ps', + freebsd: 'ps', + netbsd: 'ps', + win: 'wmic', + linux: 'ps', + aix: 'ps' +}; + +var platform = os.platform(); +if (platform.startsWith('win')) { + platform = 'win'; +} + +var file = platformToMethod[platform]; + +/** + * Gets the list of all the pids of the system. + * @param {Function} callback Called when the list is ready. + */ +function get(callback) { + if (file === undefined) { + callback( + new Error( + os.platform() + + ' is not supported yet, please open an issue (https://github.com/simonepri/pidtree)' + ) + ); + } + + var list = require('./' + file); + list(callback); +} + +module.exports = get; diff --git a/node_modules/pidtree/lib/pidtree.js b/node_modules/pidtree/lib/pidtree.js new file mode 100644 index 0000000..52986b5 --- /dev/null +++ b/node_modules/pidtree/lib/pidtree.js @@ -0,0 +1,104 @@ +'use strict'; + +var getAll = require('./get'); + +/** + * Get the list of children and grandchildren pids of the given PID. + * @param {Number|String} PID A PID. If -1 will return all the pids. + * @param {Object} [options] Optional options object. + * @param {Boolean} [options.root=false] Include the provided PID in the list. + * @param {Boolean} [options.advanced=false] Returns a list of objects in the + * format {pid: X, ppid: Y}. + * @param {Function} callback(err, list) Called when the list is ready. + */ +function list(PID, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + + if (typeof options !== 'object') { + options = {}; + } + + PID = parseInt(PID, 10); + if (isNaN(PID) || PID < -1) { + callback(new TypeError('The pid provided is invalid')); + return; + } + + getAll(function(err, list) { + if (err) { + callback(err); + return; + } + + // If the user wants the whole list just return it + if (PID === -1) { + for (var i = 0; i < list.length; i++) { + list[i] = options.advanced + ? {ppid: list[i][0], pid: list[i][1]} + : (list[i] = list[i][1]); + } + + callback(null, list); + return; + } + + var root; + for (var l = 0; l < list.length; l++) { + if (list[l][1] === PID) { + root = options.advanced ? {ppid: list[l][0], pid: PID} : PID; + break; + } + + if (list[l][0] === PID) { + root = options.advanced ? {pid: PID} : PID; // Special pids like 0 on *nix + } + } + + if (!root) { + callback(new Error('No maching pid found')); + return; + } + + // Build the adiacency Hash Map (pid -> [children of pid]) + var tree = {}; + while (list.length > 0) { + var element = list.pop(); + if (tree[element[0]]) { + tree[element[0]].push(element[1]); + } else { + tree[element[0]] = [element[1]]; + } + } + + // Starting by the PID provided by the user, traverse the tree using the + // adiacency Hash Map until the whole subtree is visited. + // Each pid encountered while visiting is added to the pids array. + var idx = 0; + var pids = [root]; + while (idx < pids.length) { + var curpid = options.advanced ? pids[idx++].pid : pids[idx++]; + if (!tree[curpid]) continue; + var length = tree[curpid].length; + for (var j = 0; j < length; j++) { + pids.push( + options.advanced + ? {ppid: curpid, pid: tree[curpid][j]} + : tree[curpid][j] + ); + } + + delete tree[curpid]; + } + + if (!options.root) { + pids.shift(); // Remove root + } + + callback(null, pids); + }); +} + +module.exports = list; diff --git a/node_modules/pidtree/lib/ps.js b/node_modules/pidtree/lib/ps.js new file mode 100644 index 0000000..6d9bb5f --- /dev/null +++ b/node_modules/pidtree/lib/ps.js @@ -0,0 +1,47 @@ +'use strict'; + +var os = require('os'); +var bin = require('./bin'); + +/** + * Gets the list of all the pids of the system through the ps command. + * @param {Function} callback(err, list) + */ +function ps(callback) { + var args = ['-A', '-o', 'ppid,pid']; + + bin('ps', args, function(err, stdout, code) { + if (err) return callback(err); + if (code !== 0) { + return callback(new Error('pidtree ps command exited with code ' + code)); + } + + // Example of stdout + // + // PPID PID + // 1 430 + // 430 432 + // 1 727 + // 1 7166 + + try { + stdout = stdout.split(os.EOL); + + var list = []; + for (var i = 1; i < stdout.length; i++) { + stdout[i] = stdout[i].trim(); + if (!stdout[i]) continue; + stdout[i] = stdout[i].split(/\s+/); + stdout[i][0] = parseInt(stdout[i][0], 10); // PPID + stdout[i][1] = parseInt(stdout[i][1], 10); // PID + list.push(stdout[i]); + } + + callback(null, list); + } catch (error) { + callback(error); + } + }); +} + +module.exports = ps; diff --git a/node_modules/pidtree/lib/wmic.js b/node_modules/pidtree/lib/wmic.js new file mode 100644 index 0000000..0361728 --- /dev/null +++ b/node_modules/pidtree/lib/wmic.js @@ -0,0 +1,49 @@ +'use strict'; + +var os = require('os'); +var bin = require('./bin'); + +/** + * Gets the list of all the pids of the system through the wmic command. + * @param {Function} callback(err, list) + */ +function wmic(callback) { + var args = ['PROCESS', 'get', 'ParentProcessId,ProcessId']; + var options = {windowsHide: true, windowsVerbatimArguments: true}; + bin('wmic', args, options, function(err, stdout, code) { + if (err) { + callback(err); + return; + } + + if (code !== 0) { + callback(new Error('pidtree wmic command exited with code ' + code)); + return; + } + + // Example of stdout + // + // ParentProcessId ProcessId + // 0 777 + + try { + stdout = stdout.split(os.EOL); + + var list = []; + for (var i = 1; i < stdout.length; i++) { + stdout[i] = stdout[i].trim(); + if (!stdout[i]) continue; + stdout[i] = stdout[i].split(/\s+/); + stdout[i][0] = parseInt(stdout[i][0], 10); // PPID + stdout[i][1] = parseInt(stdout[i][1], 10); // PID + list.push(stdout[i]); + } + + callback(null, list); + } catch (error) { + callback(error); + } + }); +} + +module.exports = wmic; diff --git a/node_modules/pidtree/license b/node_modules/pidtree/license new file mode 100644 index 0000000..5582304 --- /dev/null +++ b/node_modules/pidtree/license @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Simone Primarosa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/pidtree/package.json b/node_modules/pidtree/package.json new file mode 100644 index 0000000..a722d0e --- /dev/null +++ b/node_modules/pidtree/package.json @@ -0,0 +1,87 @@ +{ + "name": "pidtree", + "version": "0.3.1", + "description": "Cross platform children list of a PID", + "license": "MIT", + "homepage": "http://github.com/simonepri/pidtree#readme", + "repository": "github:simonepri/pidtree", + "bugs": { + "url": "https://github.com/simonepri/pidtree/issues", + "email": "simonepri@outlook.com" + }, + "author": "Simone Primarosa (https://github.com/simonepri)", + "contributors": [ + "Simone Primarosa (https://github.com/simonepri)" + ], + "keywords": [ + "ps-tree", + "ps", + "tree", + "ppid", + "pid", + "pidtree", + "pgrep", + "list", + "all", + "system", + "process", + "processes" + ], + "main": "index.js", + "bin": { + "pidtree": "./bin/pidtree.js" + }, + "files": [ + "bin", + "lib", + "index.js" + ], + "engines": { + "node": ">=0.10" + }, + "scripts": { + "start": "node ./bin/pidtree.js", + "update": "npm-check -u", + "release": "np", + "lint": "xo", + "test": "nyc ava -m \"!*benchmark*\"", + "bench": "ava -m \"*benchmark*\"", + "coverage": "codecov" + }, + "devDependencies": { + "ava": "~0.25.0", + "codecov": "^3.6.5", + "mockery": "^2.1.0", + "np": "^2.20.1", + "npm-check": "^5.9.2", + "nyc": "^11.6.0", + "pify": "^3.0.0", + "string-to-stream": "^1.1.0", + "through": "^2.3.8", + "time-span": "^2.0.0", + "tree-kill": "^1.1.0", + "xo": "~0.20.3" + }, + "ava": { + "verbose": true + }, + "nyc": { + "reporter": [ + "lcovonly", + "text" + ] + }, + "xo": { + "prettier": true, + "space": true, + "rules": { + "prefer-destructuring": 0, + "prefer-arrow-callback": 0, + "no-var": 0, + "object-shorthand": 0, + "unicorn/no-for-loop": 0, + "unicorn/prefer-string-slice": 0, + "unicorn/string-content": 0 + } + } +} diff --git a/node_modules/pidtree/readme.md b/node_modules/pidtree/readme.md new file mode 100644 index 0000000..3608016 --- /dev/null +++ b/node_modules/pidtree/readme.md @@ -0,0 +1,189 @@ +

+ pidtree +

+

+ + + Mac/Linux Build Status + + + + Windows Build status + + + + Codecov Coverage report + + + + Known Vulnerabilities + + + + Dependency Status + + +
+ + + + XO Code Style used + + + + AVA Test Runner used + + + + Istanbul Test Coverage used + + + + NI Scaffolding System used + + + + NP Release System used + + +
+ + + + Latest version on npm + + + + Project license + +

+

+ 🚸 Cross platform children list of a PID. + +
+ + + Coded with ❤️ by Simone Primarosa. + +

+ +## Synopsis + +This package is really similar to [ps-tree][gh:ps-tree] but is faster, safer and +provides sub-children results. +Furthermore ps-tree is [unmaintained][gh:ps-tree-um]. + +Uuh, and a fancy [CLI](#cli) is also available! + +## Usage + +```js +var pidtree = require('pidtree') + +// Get childs of current process +pidtree(process.pid, function (err, pids) { + console.log(pids) + // => [] +}) + +// Include the given pid in the result array +pidtree(process.pid, {root: true}, function (err, pids) { + console.log(pids) + // => [727] +}) + +// Get all the processes of the System (-1 is a special value of this package) +pidtree(-1, function (err, pids) { + console.log(pids) + // => [530, 42, ..., 41241] +}) + +// Include PPID in the results +pidtree(1, {advanced: true}, function (err, pids) { + console.log(pids) + // => [{ppid: 1, pid: 530}, {ppid: 1, pid: 42}, ..., {ppid: 1, pid: 41241}] +}) + +// If no callback is given it returns a promise instead +const pids = await pidtree(1) +console.log(pids) +// => [141, 42, ..., 15242] +``` + +## Compatibility + +| Linux | FreeBSD | NetBSD | SunOS | macOS | Win | AIX | +| --- | --- | --- | --- | --- | --- | --- | +| ✅ | ❓ | ❓ | ❓ | ✅ | ✅ | ❓ | + +✅ = Working +❓ = Not tested but should work + +Please if your platform is not supported [file an issue][new issue]. + +## CLI + +pidtree cli +Show a tree of the processes inside your system inside your terminal. + +```bash +npx pidtree $PPID +``` +Just replace `$PPID` with one of the pids inside your system. + +Or don't pass anything if you want all the pids inside your system. + +```bash +npx pidtree +``` + +To display the output as a list, similar to the one produced from `pgrep -P $PID`, +pass the `--list` flag. + +```bash +npx pidtree --list +``` + +## API + + + +## pidtree(pid, [options], [callback]) ⇒ [Promise.<Array.<Object>>] +Get the list of children pids of the given pid. + +**Kind**: global function +**Returns**: Promise.<Array.<Object>> - Only when the callback is not provided. +**Access**: public + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| pid | Number \| String | | A pid. If -1 will return all the pids. | +| [options] | Object | | Optional options object. | +| [options.root] | Boolean | false | Include the provided pid in the list. Ignored if -1 is passed as pid. | +| [callback] | function | | Called when the list is ready. If not provided a promise is returned instead. | + +## Related + +- [pidusage][gh:pidusage] - +Cross-platform process cpu % and memory usage of a PID + +## Authors + +- **Simone Primarosa** - [simonepri][github:simonepri] + +See also the list of [contributors][contributors] who participated in this project. + +## License + +This project is licensed under the MIT License - see the [license][license] file for details. + + +[new issue]: https://github.com/simonepri/pidtree/issues/new +[license]: https://github.com/simonepri/pidtree/tree/master/license +[contributors]: https://github.com/simonepri/pidtree/contributors + +[github:simonepri]: https://github.com/simonepri + +[gh:pidusage]: https://github.com/soyuka/pidusage +[gh:ps-tree]: https://github.com/indexzero/ps-tree +[gh:ps-tree-um]: https://github.com/indexzero/ps-tree/issues/30 diff --git a/node_modules/pify/index.js b/node_modules/pify/index.js new file mode 100644 index 0000000..1dee43a --- /dev/null +++ b/node_modules/pify/index.js @@ -0,0 +1,84 @@ +'use strict'; + +const processFn = (fn, opts) => function () { + const P = opts.promiseModule; + const args = new Array(arguments.length); + + for (let i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P((resolve, reject) => { + if (opts.errorFirst) { + args.push(function (err, result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + if (err) { + results.unshift(err); + reject(results); + } else { + resolve(results); + } + } else if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + args.push(function (result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 0; i < arguments.length; i++) { + results[i] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + } + + fn.apply(this, args); + }); +}; + +module.exports = (obj, opts) => { + opts = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, opts); + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + let ret; + if (typeof obj === 'function') { + ret = function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, opts).apply(this, arguments); + }; + } else { + ret = Object.create(Object.getPrototypeOf(obj)); + } + + for (const key in obj) { // eslint-disable-line guard-for-in + const x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; + } + + return ret; +}; diff --git a/node_modules/pify/license b/node_modules/pify/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/pify/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json new file mode 100644 index 0000000..468d857 --- /dev/null +++ b/node_modules/pify/package.json @@ -0,0 +1,51 @@ +{ + "name": "pify", + "version": "3.0.0", + "description": "Promisify a callback-style function", + "license": "MIT", + "repository": "sindresorhus/pify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava && npm run optimization-test", + "optimization-test": "node --allow-natives-syntax optimization-test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "promises", + "promisify", + "all", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "await", + "es2015", + "bluebird" + ], + "devDependencies": { + "ava": "*", + "pinkie-promise": "^2.0.0", + "v8-natives": "^1.0.0", + "xo": "*" + } +} diff --git a/node_modules/pify/readme.md b/node_modules/pify/readme.md new file mode 100644 index 0000000..376ca4e --- /dev/null +++ b/node_modules/pify/readme.md @@ -0,0 +1,131 @@ +# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) + +> Promisify a callback-style function + + +## Install + +``` +$ npm install --save pify +``` + + +## Usage + +```js +const fs = require('fs'); +const pify = require('pify'); + +// Promisify a single function +pify(fs.readFile)('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); + +// Promisify all methods in a module +pify(fs).readFile('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); +``` + + +## API + +### pify(input, [options]) + +Returns a `Promise` wrapped version of the supplied function or module. + +#### input + +Type: `Function` `Object` + +Callback-style function or module whose methods you want to promisify. + +#### options + +##### multiArgs + +Type: `boolean`
+Default: `false` + +By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error. + +```js +const request = require('request'); +const pify = require('pify'); + +pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { + const [httpResponse, body] = result; +}); +``` + +##### include + +Type: `string[]` `RegExp[]` + +Methods in a module to promisify. Remaining methods will be left untouched. + +##### exclude + +Type: `string[]` `RegExp[]`
+Default: `[/.+(Sync|Stream)$/]` + +Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. + +##### excludeMain + +Type: `boolean`
+Default: `false` + +If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module. + +```js +const pify = require('pify'); + +function fn() { + return true; +} + +fn.method = (data, callback) => { + setImmediate(() => { + callback(null, data); + }); +}; + +// Promisify methods but not `fn()` +const promiseFn = pify(fn, {excludeMain: true}); + +if (promiseFn()) { + promiseFn.method('hi').then(data => { + console.log(data); + }); +} +``` + +##### errorFirst + +Type: `boolean`
+Default: `true` + +Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc. + +##### promiseModule + +Type: `Function` + +Custom promise module to use instead of the native one. + +Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. + + +## Related + +- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/posix-character-classes/LICENSE b/node_modules/posix-character-classes/LICENSE new file mode 100644 index 0000000..b11cb79 --- /dev/null +++ b/node_modules/posix-character-classes/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/posix-character-classes/README.md b/node_modules/posix-character-classes/README.md new file mode 100644 index 0000000..894ae23 --- /dev/null +++ b/node_modules/posix-character-classes/README.md @@ -0,0 +1,103 @@ +# posix-character-classes [![NPM version](https://img.shields.io/npm/v/posix-character-classes.svg?style=flat)](https://www.npmjs.com/package/posix-character-classes) [![NPM monthly downloads](https://img.shields.io/npm/dm/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![NPM total downloads](https://img.shields.io/npm/dt/posix-character-classes.svg?style=flat)](https://npmjs.org/package/posix-character-classes) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/posix-character-classes.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/posix-character-classes) + +> POSIX character classes for creating regular expressions. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save posix-character-classes +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add posix-character-classes +``` + +## Usage + +```js +var posix = require('posix-character-classes'); +console.log(posix.alpha); +//=> 'A-Za-z' +``` + +## POSIX Character classes + +The POSIX standard supports the following classes or categories of charactersh (note that classes must be defined within brackets)[1]: + +| **POSIX class** | **Equivalent to** | **Matches** | +| --- | --- | --- | +| `[:alnum:]` | `[A-Za-z0-9]` | digits, uppercase and lowercase letters | +| `[:alpha:]` | `[A-Za-z]` | upper- and lowercase letters | +| `[:ascii:]` | `[\x00-\x7F]` | ASCII characters | +| `[:blank:]` | `[ \t]` | space and TAB characters only | +| `[:cntrl:]` | `[\x00-\x1F\x7F]` | Control characters | +| `[:digit:]` | `[0-9]` | digits | +| `[:graph:]` | `[^[:cntrl:]]` | graphic characters (all characters which have graphic representation) | +| `[:lower:]` | `[a-z]` | lowercase letters | +| `[:print:]` | `[[:graph] ]` | graphic characters and space | +| `[:punct:]` | ``[-!"#$%&'()*+,./:;<=>?@[]^_`{ | }~]`` | all punctuation characters (all graphic characters except letters and digits) | +| `[:space:]` | `[ \t\n\r\f\v]` | all blank (whitespace) characters, including spaces, tabs, new lines, carriage returns, form feeds, and vertical tabs | +| `[:upper:]` | `[A-Z]` | uppercase letters | +| `[:word:]` | `[A-Za-z0-9_]` | word characters | +| `[:xdigit:]` | `[0-9A-Fa-f]` | hexadecimal digits | + +## Examples + +* `a[[:digit:]]b` matches `a0b`, `a1b`, ..., `a9b`. +* `a[:digit:]b` is invalid, character classes must be enclosed in brackets +* `[[:digit:]abc]` matches any digit, as well as `a`, `b`, and `c`. +* `[abc[:digit:]]` is the same as the previous, matching any digit, as well as `a`, `b`, and `c` +* `[^ABZ[:lower:]]` matches any character except lowercase letters, `A`, `B`, and `Z`. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ + +
+
+
    +
  1. table and examples are based on the WikiBooks page for [Regular Expressions/POSIX Basic Regular Expressions](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions), which is available under the [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/3.0/). + +
  2. +
+
\ No newline at end of file diff --git a/node_modules/posix-character-classes/index.js b/node_modules/posix-character-classes/index.js new file mode 100644 index 0000000..19f1c98 --- /dev/null +++ b/node_modules/posix-character-classes/index.js @@ -0,0 +1,22 @@ +'use strict'; + +/** + * POSIX character classes + */ + +module.exports = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; diff --git a/node_modules/posix-character-classes/package.json b/node_modules/posix-character-classes/package.json new file mode 100644 index 0000000..acce4ba --- /dev/null +++ b/node_modules/posix-character-classes/package.json @@ -0,0 +1,54 @@ +{ + "name": "posix-character-classes", + "description": "POSIX character classes for creating regular expressions.", + "version": "0.1.1", + "homepage": "https://github.com/jonschlinkert/posix-character-classes", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/posix-character-classes", + "bugs": { + "url": "https://github.com/jonschlinkert/posix-character-classes/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "character", + "classes", + "posix" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + }, + "related-list": [ + "micromatch", + "nanomatch", + "extglob", + "expand-brackets" + ] + } +} diff --git a/node_modules/possible-typed-array-names/.eslintrc b/node_modules/possible-typed-array-names/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/possible-typed-array-names/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/possible-typed-array-names/.github/FUNDING.yml b/node_modules/possible-typed-array-names/.github/FUNDING.yml new file mode 100644 index 0000000..7afce20 --- /dev/null +++ b/node_modules/possible-typed-array-names/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/possible-typed-array-names +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/possible-typed-array-names/CHANGELOG.md b/node_modules/possible-typed-array-names/CHANGELOG.md new file mode 100644 index 0000000..cae3fae --- /dev/null +++ b/node_modules/possible-typed-array-names/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2024-02-19 + +### Commits + +- Initial implementation, tests, readme, types [`c279f55`](https://github.com/ljharb/possible-typed-array-names/commit/c279f550021896afa50c1169b3111618a96cf898) +- Initial commit [`0f22bf2`](https://github.com/ljharb/possible-typed-array-names/commit/0f22bf24d16fc8ea29483ed7ed378afb3758a4df) +- npm init [`25d6cff`](https://github.com/ljharb/possible-typed-array-names/commit/25d6cffe4091921e4e210704dabed37ae3d7b261) +- Only apps should have lockfiles [`a1bd592`](https://github.com/ljharb/possible-typed-array-names/commit/a1bd592fa037430d401b1d6d26cfea2c2d6789db) diff --git a/node_modules/possible-typed-array-names/LICENSE b/node_modules/possible-typed-array-names/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/possible-typed-array-names/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/possible-typed-array-names/README.md b/node_modules/possible-typed-array-names/README.md new file mode 100644 index 0000000..7ebbf81 --- /dev/null +++ b/node_modules/possible-typed-array-names/README.md @@ -0,0 +1,48 @@ +# possible-typed-array-names [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A simple list of possible Typed Array names. + +## Example + +```js +const assert = require('assert'); + +const names = require('possible-typed-array-names'); + +assert(Array.isArray(names)); +assert(names.every(name => ( + typeof name === 'string' + && typeof globalThis[name] === 'function' + && globalThis[name].name === name +))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/possible-typed-array-names +[npm-version-svg]: https://versionbadg.es/ljharb/possible-typed-array-names.svg +[deps-svg]: https://david-dm.org/ljharb/possible-typed-array-names.svg +[deps-url]: https://david-dm.org/ljharb/possible-typed-array-names +[dev-deps-svg]: https://david-dm.org/ljharb/possible-typed-array-names/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/possible-typed-array-names#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/possible-typed-array-names.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/possible-typed-array-names.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/possible-typed-array-names.svg +[downloads-url]: https://npm-stat.com/charts.html?package=possible-typed-array-names +[codecov-image]: https://codecov.io/gh/ljharb/possible-typed-array-names/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/possible-typed-array-names/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/possible-typed-array-names +[actions-url]: https://github.com/ljharb/possible-typed-array-names/actions diff --git a/node_modules/possible-typed-array-names/index.d.ts b/node_modules/possible-typed-array-names/index.d.ts new file mode 100644 index 0000000..342584d --- /dev/null +++ b/node_modules/possible-typed-array-names/index.d.ts @@ -0,0 +1,15 @@ +declare const names: [ + 'Float32Array', + 'Float64Array', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +export = names; \ No newline at end of file diff --git a/node_modules/possible-typed-array-names/index.js b/node_modules/possible-typed-array-names/index.js new file mode 100644 index 0000000..f3c1199 --- /dev/null +++ b/node_modules/possible-typed-array-names/index.js @@ -0,0 +1,16 @@ +'use strict'; + +/** @type {import('.')} */ +module.exports = [ + 'Float32Array', + 'Float64Array', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'BigInt64Array', + 'BigUint64Array' +]; diff --git a/node_modules/possible-typed-array-names/package.json b/node_modules/possible-typed-array-names/package.json new file mode 100644 index 0000000..3b4b933 --- /dev/null +++ b/node_modules/possible-typed-array-names/package.json @@ -0,0 +1,83 @@ +{ + "name": "possible-typed-array-names", + "version": "1.0.0", + "description": "A simple list of possible Typed Array names.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/possible-typed-array-names.git" + }, + "keywords": [ + "typed", + "array", + "typedarray", + "Float32Array", + "Float64Array", + "Int8Array", + "Int16Array", + "Int32Array", + "Uint8Array", + "Uint8ClampedArray", + "Uint16Array", + "Uint32Array", + "BigInt64Array", + "BigUint64Array" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/possible-typed-array-names/issues" + }, + "homepage": "https://github.com/ljharb/possible-typed-array-names#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/possible-typed-array-names/test/index.js b/node_modules/possible-typed-array-names/test/index.js new file mode 100644 index 0000000..af59606 --- /dev/null +++ b/node_modules/possible-typed-array-names/test/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var test = require('tape'); + +var names = require('../'); + +test('typed array names', function (t) { + for (var i = 0; i < names.length; i++) { + t.equal(typeof names[i], 'string', 'is string'); + t.equal(names.indexOf(names[i]), i, 'is unique'); + + t.match(typeof global[names[i]], /^(?:function|undefined)$/, 'is a global function, or `undefined`'); + } + + t.end(); +}); diff --git a/node_modules/possible-typed-array-names/tsconfig.json b/node_modules/possible-typed-array-names/tsconfig.json new file mode 100644 index 0000000..99dfeb6 --- /dev/null +++ b/node_modules/possible-typed-array-names/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js new file mode 100644 index 0000000..3eecf11 --- /dev/null +++ b/node_modules/process-nextick-args/index.js @@ -0,0 +1,45 @@ +'use strict'; + +if (typeof process === 'undefined' || + !process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md new file mode 100644 index 0000000..c67e353 --- /dev/null +++ b/node_modules/process-nextick-args/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Calvin Metcalf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.** diff --git a/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json new file mode 100644 index 0000000..6070b72 --- /dev/null +++ b/node_modules/process-nextick-args/package.json @@ -0,0 +1,25 @@ +{ + "name": "process-nextick-args", + "version": "2.0.1", + "description": "process.nextTick but always with args", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/calvinmetcalf/process-nextick-args.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" + }, + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", + "devDependencies": { + "tap": "~0.2.6" + } +} diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md new file mode 100644 index 0000000..ecb432c --- /dev/null +++ b/node_modules/process-nextick-args/readme.md @@ -0,0 +1,18 @@ +process-nextick-args +===== + +[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) + +```bash +npm install --save process-nextick-args +``` + +Always be able to pass arguments to process.nextTick, no matter the platform + +```js +var pna = require('process-nextick-args'); + +pna.nextTick(function (a, b, c) { + console.log(a, b, c); +}, 'step', 3, 'profit'); +``` diff --git a/node_modules/proxy-middleware/.npmignore b/node_modules/proxy-middleware/.npmignore new file mode 100644 index 0000000..e216ae5 --- /dev/null +++ b/node_modules/proxy-middleware/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/test diff --git a/node_modules/proxy-middleware/.travis.yml b/node_modules/proxy-middleware/.travis.yml new file mode 100644 index 0000000..df63076 --- /dev/null +++ b/node_modules/proxy-middleware/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.10" + - "0.8" diff --git a/node_modules/proxy-middleware/LICENSE b/node_modules/proxy-middleware/LICENSE new file mode 100644 index 0000000..0bbb53e --- /dev/null +++ b/node_modules/proxy-middleware/LICENSE @@ -0,0 +1,23 @@ +The MIT License (Expat) + +Copyright (c) 2014 Andrew Kelley + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation files +(the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/proxy-middleware/README.md b/node_modules/proxy-middleware/README.md new file mode 100644 index 0000000..6bcb842 --- /dev/null +++ b/node_modules/proxy-middleware/README.md @@ -0,0 +1,40 @@ +[![Build Status](https://secure.travis-ci.org/andrewrk/node-proxy-middleware.png)](http://travis-ci.org/andrewrk/node-proxy-middleware) + +### Usage: + +```js +var connect = require('connect'); +var url = require('url'); +var proxy = require('proxy-middleware'); + +var app = connect(); +app.use('/api', proxy(url.parse('https://example.com/endpoint'))); +// now requests to '/api/x/y/z' are proxied to 'https://example.com/endpoint/x/y/z' + +//same as example above but also uses a short hand string only parameter +app.use('/api-string-only', proxy('https://example.com/endpoint')); +``` + +### Documentation: + +`proxyMiddleware(options)` + +`options` allows any options that are permitted on the [`http`](http://nodejs.org/api/http.html#http_http_request_options_callback) or [`https`](http://nodejs.org/api/https.html#https_https_request_options_callback) request options. + +Other options: +- `route`: you can pass the route for connect middleware within the options, as well. +- `via`: by default no [via header](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45) is added. If you pass `true` for this option the local hostname will be used for the via header. You can also pass a string for this option in which case that will be used for the via header. +- `cookieRewrite`: this option can be used to support cookies via the proxy by rewriting the cookie domain to that of the proxy server. By default cookie domains are not rewritten. The `cookieRewrite` option works as the `via` option - if you pass `true` the local hostname will be used, and if you pass a string that will be used as the rewritten cookie domain. +- `preserveHost`: When enabled, this option will pass the Host: line from the incoming request to the proxied host. Default: `false`. + +### Usage with route: + +```js +var proxyOptions = url.parse('https://example.com/endpoint'); +proxyOptions.route = '/api'; + +var middleWares = [proxy(proxyOptions) /*, ...*/]; + +// Grunt connect uses this method +connect(middleWares); +``` diff --git a/node_modules/proxy-middleware/index.js b/node_modules/proxy-middleware/index.js new file mode 100644 index 0000000..b8c573e --- /dev/null +++ b/node_modules/proxy-middleware/index.js @@ -0,0 +1,141 @@ +var os = require('os'); +var http = require('http'); +var https = require('https'); +var owns = {}.hasOwnProperty; + +module.exports = function proxyMiddleware(options) { + //enable ability to quickly pass a url for shorthand setup + if(typeof options === 'string'){ + options = require('url').parse(options); + } + + var httpLib = options.protocol === 'https:' ? https : http; + var request = httpLib.request; + + options = options || {}; + options.hostname = options.hostname; + options.port = options.port; + options.pathname = options.pathname || '/'; + + return function (req, resp, next) { + var url = req.url; + // You can pass the route within the options, as well + if (typeof options.route === 'string') { + if (url === options.route) { + url = ''; + } else if (url.slice(0, options.route.length) === options.route) { + url = url.slice(options.route.length); + } else { + return next(); + } + } + + //options for this request + var opts = extend({}, options); + if (url && url.charAt(0) === '?') { // prevent /api/resource/?offset=0 + if (options.pathname.length > 1 && options.pathname.charAt(options.pathname.length - 1) === '/') { + opts.path = options.pathname.substring(0, options.pathname.length - 1) + url; + } else { + opts.path = options.pathname + url; + } + } else if (url) { + opts.path = slashJoin(options.pathname, url); + } else { + opts.path = options.pathname; + } + opts.method = req.method; + opts.headers = options.headers ? merge(req.headers, options.headers) : req.headers; + + applyViaHeader(req.headers, opts, opts.headers); + + if (!options.preserveHost) { + // Forwarding the host breaks dotcloud + delete opts.headers.host; + } + + var myReq = request(opts, function (myRes) { + var statusCode = myRes.statusCode + , headers = myRes.headers + , location = headers.location; + // Fix the location + if (((statusCode > 300 && statusCode < 304) || statusCode === 201) && location && location.indexOf(options.href) > -1) { + // absoulte path + headers.location = location.replace(options.href, slashJoin('/', slashJoin((options.route || ''), ''))); + } + applyViaHeader(myRes.headers, opts, myRes.headers); + rewriteCookieHosts(myRes.headers, opts, myRes.headers, req); + resp.writeHead(myRes.statusCode, myRes.headers); + myRes.on('error', function (err) { + next(err); + }); + myRes.pipe(resp); + }); + myReq.on('error', function (err) { + next(err); + }); + if (!req.readable) { + myReq.end(); + } else { + req.pipe(myReq); + } + }; +}; + +function applyViaHeader(existingHeaders, opts, applyTo) { + if (!opts.via) return; + + var viaName = (true === opts.via) ? os.hostname() : opts.via; + var viaHeader = '1.1 ' + viaName; + if(existingHeaders.via) { + viaHeader = existingHeaders.via + ', ' + viaHeader; + } + + applyTo.via = viaHeader; +} + +function rewriteCookieHosts(existingHeaders, opts, applyTo, req) { + if (!opts.cookieRewrite || !owns.call(existingHeaders, 'set-cookie')) { + return; + } + + var existingCookies = existingHeaders['set-cookie'], + rewrittenCookies = [], + rewriteHostname = (true === opts.cookieRewrite) ? os.hostname() : opts.cookieRewrite; + + if (!Array.isArray(existingCookies)) { + existingCookies = [ existingCookies ]; + } + + for (var i = 0; i < existingCookies.length; i++) { + var rewrittenCookie = existingCookies[i].replace(/(Domain)=[a-z\.-_]*?(;|$)/gi, '$1=' + rewriteHostname + '$2'); + + if (!req.connection.encrypted) { + rewrittenCookie = rewrittenCookie.replace(/;\s*?(Secure)/i, ''); + } + rewrittenCookies.push(rewrittenCookie); + } + + applyTo['set-cookie'] = rewrittenCookies; +} + +function slashJoin(p1, p2) { + var trailing_slash = false; + + if (p1.length && p1[p1.length - 1] === '/') { trailing_slash = true; } + if (trailing_slash && p2.length && p2[0] === '/') {p2 = p2.substring(1); } + + return p1 + p2; +} + +function extend(obj, src) { + for (var key in src) if (owns.call(src, key)) obj[key] = src[key]; + return obj; +} + +//merges data without changing state in either argument +function merge(src1, src2) { + var merged = {}; + extend(merged, src1); + extend(merged, src2); + return merged; +} diff --git a/node_modules/proxy-middleware/package.json b/node_modules/proxy-middleware/package.json new file mode 100644 index 0000000..af7170e --- /dev/null +++ b/node_modules/proxy-middleware/package.json @@ -0,0 +1,31 @@ +{ + "name": "proxy-middleware", + "version": "0.15.0", + "description": "http(s) proxy as connect middleware", + "main": "index.js", + "scripts": { + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "https://github.com/andrewrk/connect-proxy" + }, + "keywords": [ + "connect", + "proxy", + "middleware", + "https", + "http", + "ssl" + ], + "author": "Andrew Kelley", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + }, + "devDependencies": { + "connect": "~3.3.5", + "mocha": "~2.2.5", + "serve-static": "~1.9.3" + } +} diff --git a/node_modules/range-parser/HISTORY.md b/node_modules/range-parser/HISTORY.md new file mode 100644 index 0000000..70a973d --- /dev/null +++ b/node_modules/range-parser/HISTORY.md @@ -0,0 +1,56 @@ +1.2.1 / 2019-05-10 +================== + + * Improve error when `str` is not a string + +1.2.0 / 2016-06-01 +================== + + * Add `combine` option to combine overlapping ranges + +1.1.0 / 2016-05-13 +================== + + * Fix incorrectly returning -1 when there is at least one valid range + * perf: remove internal function + +1.0.3 / 2015-10-29 +================== + + * perf: enable strict mode + +1.0.2 / 2014-09-08 +================== + + * Support Node.js 0.6 + +1.0.1 / 2014-09-07 +================== + + * Move repository to jshttp + +1.0.0 / 2013-12-11 +================== + + * Add repository to package.json + * Add MIT license + +0.0.4 / 2012-06-17 +================== + + * Change ret -1 for unsatisfiable and -2 when invalid + +0.0.3 / 2012-06-17 +================== + + * Fix last-byte-pos default to len - 1 + +0.0.2 / 2012-06-14 +================== + + * Add `.type` + +0.0.1 / 2012-06-11 +================== + + * Initial release diff --git a/node_modules/range-parser/LICENSE b/node_modules/range-parser/LICENSE new file mode 100644 index 0000000..3599954 --- /dev/null +++ b/node_modules/range-parser/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012-2014 TJ Holowaychuk +Copyright (c) 2015-2016 Douglas Christopher Wilson + +```js +var parseRange = require('range-parser') +``` + +### parseRange(size, header, options) + +Parse the given `header` string where `size` is the maximum size of the resource. +An array of ranges will be returned or negative numbers indicating an error parsing. + + * `-2` signals a malformed header string + * `-1` signals an unsatisfiable range + + + +```js +// parse header from request +var range = parseRange(size, req.headers.range) + +// the type of the range +if (range.type === 'bytes') { + // the ranges + range.forEach(function (r) { + // do something with r.start and r.end + }) +} +``` + +#### Options + +These properties are accepted in the options object. + +##### combine + +Specifies if overlapping & adjacent ranges should be combined, defaults to `false`. +When `true`, ranges will be combined and returned as if they were specified that +way in the header. + + + +```js +parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true }) +// => [ +// { start: 0, end: 10 }, +// { start: 50, end: 60 } +// ] +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/range-parser/master +[coveralls-url]: https://coveralls.io/r/jshttp/range-parser?branch=master +[node-image]: https://badgen.net/npm/node/range-parser +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/range-parser +[npm-url]: https://npmjs.org/package/range-parser +[npm-version-image]: https://badgen.net/npm/v/range-parser +[travis-image]: https://badgen.net/travis/jshttp/range-parser/master +[travis-url]: https://travis-ci.org/jshttp/range-parser diff --git a/node_modules/range-parser/index.js b/node_modules/range-parser/index.js new file mode 100644 index 0000000..b7dc5c0 --- /dev/null +++ b/node_modules/range-parser/index.js @@ -0,0 +1,162 @@ +/*! + * range-parser + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = rangeParser + +/** + * Parse "Range" header `str` relative to the given file `size`. + * + * @param {Number} size + * @param {String} str + * @param {Object} [options] + * @return {Array} + * @public + */ + +function rangeParser (size, str, options) { + if (typeof str !== 'string') { + throw new TypeError('argument str must be a string') + } + + var index = str.indexOf('=') + + if (index === -1) { + return -2 + } + + // split the range string + var arr = str.slice(index + 1).split(',') + var ranges = [] + + // add ranges type + ranges.type = str.slice(0, index) + + // parse all ranges + for (var i = 0; i < arr.length; i++) { + var range = arr[i].split('-') + var start = parseInt(range[0], 10) + var end = parseInt(range[1], 10) + + // -nnn + if (isNaN(start)) { + start = size - end + end = size - 1 + // nnn- + } else if (isNaN(end)) { + end = size - 1 + } + + // limit last-byte-pos to current length + if (end > size - 1) { + end = size - 1 + } + + // invalid or unsatisifiable + if (isNaN(start) || isNaN(end) || start > end || start < 0) { + continue + } + + // add range + ranges.push({ + start: start, + end: end + }) + } + + if (ranges.length < 1) { + // unsatisifiable + return -1 + } + + return options && options.combine + ? combineRanges(ranges) + : ranges +} + +/** + * Combine overlapping & adjacent ranges. + * @private + */ + +function combineRanges (ranges) { + var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart) + + for (var j = 0, i = 1; i < ordered.length; i++) { + var range = ordered[i] + var current = ordered[j] + + if (range.start > current.end + 1) { + // next range + ordered[++j] = range + } else if (range.end > current.end) { + // extend range + current.end = range.end + current.index = Math.min(current.index, range.index) + } + } + + // trim ordered array + ordered.length = j + 1 + + // generate combined range + var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex) + + // copy ranges type + combined.type = ranges.type + + return combined +} + +/** + * Map function to add index value to ranges. + * @private + */ + +function mapWithIndex (range, index) { + return { + start: range.start, + end: range.end, + index: index + } +} + +/** + * Map function to remove index value from ranges. + * @private + */ + +function mapWithoutIndex (range) { + return { + start: range.start, + end: range.end + } +} + +/** + * Sort function to sort ranges by index. + * @private + */ + +function sortByRangeIndex (a, b) { + return a.index - b.index +} + +/** + * Sort function to sort ranges by start position. + * @private + */ + +function sortByRangeStart (a, b) { + return a.start - b.start +} diff --git a/node_modules/range-parser/package.json b/node_modules/range-parser/package.json new file mode 100644 index 0000000..abea6d8 --- /dev/null +++ b/node_modules/range-parser/package.json @@ -0,0 +1,44 @@ +{ + "name": "range-parser", + "author": "TJ Holowaychuk (http://tjholowaychuk.com)", + "description": "Range header field string parser", + "version": "1.2.1", + "contributors": [ + "Douglas Christopher Wilson ", + "James Wyatt Cready ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "range", + "parser", + "http" + ], + "repository": "jshttp/range-parser", + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "5.16.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-markdown": "1.0.0", + "eslint-plugin-import": "2.17.2", + "eslint-plugin-node": "8.0.1", + "eslint-plugin-promise": "4.1.1", + "eslint-plugin-standard": "4.0.0", + "mocha": "6.1.4", + "nyc": "14.1.1" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test" + } +} diff --git a/node_modules/read-pkg/index.js b/node_modules/read-pkg/index.js new file mode 100644 index 0000000..dff948b --- /dev/null +++ b/node_modules/read-pkg/index.js @@ -0,0 +1,47 @@ +'use strict'; +const path = require('path'); +const loadJsonFile = require('load-json-file'); +const pathType = require('path-type'); + +module.exports = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + + return pathType.dir(fp) + .then(isDir => { + if (isDir) { + fp = path.join(fp, 'package.json'); + } + + return loadJsonFile(fp); + }) + .then(x => { + if (opts.normalize !== false) { + require('normalize-package-data')(x); + } + + return x; + }); +}; + +module.exports.sync = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; + + const x = loadJsonFile.sync(fp); + + if (opts.normalize !== false) { + require('normalize-package-data')(x); + } + + return x; +}; diff --git a/node_modules/read-pkg/license b/node_modules/read-pkg/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/read-pkg/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-pkg/package.json b/node_modules/read-pkg/package.json new file mode 100644 index 0000000..1a40fe0 --- /dev/null +++ b/node_modules/read-pkg/package.json @@ -0,0 +1,42 @@ +{ + "name": "read-pkg", + "version": "3.0.0", + "description": "Read a package.json file", + "license": "MIT", + "repository": "sindresorhus/read-pkg", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load", + "pkg", + "package", + "normalize" + ], + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/read-pkg/readme.md b/node_modules/read-pkg/readme.md new file mode 100644 index 0000000..6875067 --- /dev/null +++ b/node_modules/read-pkg/readme.md @@ -0,0 +1,79 @@ +# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg) + +> Read a package.json file + + +## Why + +- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) +- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) +- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) +- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) + + +## Install + +``` +$ npm install read-pkg +``` + + +## Usage + +```js +const readPkg = require('read-pkg'); + +readPkg().then(pkg => { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(__dirname).then(pkg => { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(path.join('unicorn', 'package.json')).then(pkg => { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); +``` + + +## API + +### readPkg([path], [options]) + +Returns a `Promise` for the parsed JSON. + +### readPkg.sync([path], [options]) + +Returns the parsed JSON. + +#### path + +Type: `string`
+Default: `process.cwd()` + +Path to a `package.json` file or its directory. + +#### options + +##### normalize + +Type: `boolean`
+Default: `true` + +[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. + + +## Related + +- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file +- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file +- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml new file mode 100644 index 0000000..f62cdac --- /dev/null +++ b/node_modules/readable-stream/.travis.yml @@ -0,0 +1,34 @@ +sudo: false +language: node_js +before_install: + - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: NPM_LEGACY=true + - node_js: '0.10' + env: NPM_LEGACY=true + - node_js: '0.11' + env: NPM_LEGACY=true + - node_js: '0.12' + env: NPM_LEGACY=true + - node_js: 1 + env: NPM_LEGACY=true + - node_js: 2 + env: NPM_LEGACY=true + - node_js: 3 + env: NPM_LEGACY=true + - node_js: 4 + - node_js: 5 + - node_js: 6 + - node_js: 7 + - node_js: 8 + - node_js: 9 +script: "npm run test" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 0000000..f478d58 --- /dev/null +++ b/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 0000000..16ffb93 --- /dev/null +++ b/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..2873b3b --- /dev/null +++ b/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md new file mode 100644 index 0000000..f1c5a93 --- /dev/null +++ b/node_modules/readable-stream/README.md @@ -0,0 +1,58 @@ +# readable-stream + +***Node-core v8.17.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.17.0/docs/api/stream.html). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 0000000..83275f1 --- /dev/null +++ b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/node_modules/readable-stream/duplex-browser.js b/node_modules/readable-stream/duplex-browser.js new file mode 100644 index 0000000..f8b2db8 --- /dev/null +++ b/node_modules/readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000..46924cb --- /dev/null +++ b/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..57003c3 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,131 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..612edb4 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,47 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..3af95cb --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1019 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var destroyImpl = require('./internal/streams/destroy'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, { hasUnpiped: false }); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..fcfc105 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,214 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..e1e897f --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,685 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = require('./internal/streams/destroy'); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 0000000..5e08097 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,78 @@ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 0000000..85a8214 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,84 @@ +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + pna.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, this, err); + } + } + + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + pna.nextTick(emitErrorNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, _this, err); + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 0000000..9332a3f --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 0000000..ce2ad5b --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json new file mode 100644 index 0000000..514c178 --- /dev/null +++ b/node_modules/readable-stream/package.json @@ -0,0 +1,52 @@ +{ + "name": "readable-stream", + "version": "2.3.8", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "devDependencies": { + "assert": "^1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "lolex": "^2.3.2", + "nyc": "^6.4.0", + "tap": "^0.7.0", + "tape": "^4.8.0" + }, + "scripts": { + "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT" +} diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000..ffd791d --- /dev/null +++ b/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js new file mode 100644 index 0000000..e503725 --- /dev/null +++ b/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..ec89ec5 --- /dev/null +++ b/node_modules/readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js new file mode 100644 index 0000000..b1baba2 --- /dev/null +++ b/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/node_modules/readable-stream/writable-browser.js b/node_modules/readable-stream/writable-browser.js new file mode 100644 index 0000000..ebdde6a --- /dev/null +++ b/node_modules/readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js new file mode 100644 index 0000000..3211a6f --- /dev/null +++ b/node_modules/readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} else { + module.exports = Writable +} diff --git a/node_modules/readdirp/LICENSE b/node_modules/readdirp/LICENSE new file mode 100644 index 0000000..037cbb4 --- /dev/null +++ b/node_modules/readdirp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/readdirp/README.md b/node_modules/readdirp/README.md new file mode 100644 index 0000000..7562027 --- /dev/null +++ b/node_modules/readdirp/README.md @@ -0,0 +1,122 @@ +# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](https://github.com/paulmillr/readdirp) + +Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**. + + +```sh +npm install readdirp +``` + +```javascript +// Use streams to achieve small RAM & CPU footprint. +// 1) Streams example with for-await. +import readdirp from 'readdirp'; +for await (const entry of readdirp('.')) { + const {path} = entry; + console.log(`${JSON.stringify({path})}`); +} + +// 2) Streams example, non for-await. +// Print out all JS files along with their size within the current folder & subfolders. +import readdirp from 'readdirp'; +readdirp('.', {fileFilter: '*.js', alwaysStat: true}) + .on('data', (entry) => { + const {path, stats: {size}} = entry; + console.log(`${JSON.stringify({path, size})}`); + }) + // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted + .on('warn', error => console.error('non-fatal error', error)) + .on('error', error => console.error('fatal error', error)) + .on('end', () => console.log('done')); + +// 3) Promise example. More RAM and CPU than streams / for-await. +import { readdirpPromise } from 'readdirp'; +const files = await readdirpPromise('.'); +console.log(files.map(file => file.path)); + +// Other options. +import readdirp from 'readdirp'; +readdirp('test', { + fileFilter: '*.js', + directoryFilter: ['!.git', '!*modules'], + // directoryFilter: (di) => di.basename.length === 9 + type: 'files_directories', + depth: 1 +}); +``` + +## API + +`const stream = readdirp(root[, options])` — **Stream API** + +- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo) +- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`). +- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir. +- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user. +- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed. +- `on('end')` — we are done. Called when all entries were found and no more will be emitted. +- `on('close')` — stream is destroyed via `stream.destroy()`. + Could be useful if you want to manually abort even on a non fatal error. + At that point the stream is no longer `readable` and no more entries, warning or errors are emitted +- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html) + or the [stream-handbook](https://github.com/substack/stream-handbook) + +`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo). + +First argument is awalys `root`, path in which to start reading and recursing into subdirectories. + +### options + +- `fileFilter: ["*.js"]`: filter to include or exclude files. A `Function`, string or Array of strings. + - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + - **string**: a string (e.g., `index.js`) + - **Array of strings**: +- `directoryFilter: ['.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into. +- `depth: 5`: depth at which to stop recursing even if more subdirectories are found +- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. +- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0. +- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat` + +### `EntryInfo` + +Has the following properties: + +- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root) +- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found +- `basename: 'react.js'`: name of the file/directory +- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false` +- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true` + +## Changelog + +- 4.0 (Aug 25, 2024) rewritten in typescript, producing hybrid common.js / esm module. + - Remove glob support and all dependencies + - Make sure you're using `let {readdirp} = require('readdirp')` in common.js +- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks. + Before, it could have entered infinite loop. +- 3.4 (Mar 19, 2020) adds support for directory-based symlinks. +- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping. +- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic. +- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions". +- 3.0 brings huge performance improvements and stream backpressure support. +- Upgrading 2.x to 3.x: + - Signature changed from `readdirp(options)` to `readdirp(root, options)` + - Replaced callback API with promise API. + - Renamed `entryType` option to `type` + - Renamed `entryType: 'both'` to `'files_directories'` + - `EntryInfo` + - Renamed `stat` to `stats` + - Emitted only when `alwaysStat: true` + - `dirent` is emitted instead of `stats` by default with `alwaysStat: false` + - Renamed `name` to `basename` + - Removed `parentDir` and `fullParentDir` properties +- Supported node.js versions: + - 4.x: node 14+ + - 3.x: node 8+ + - 2.x: node 0.6+ + +## License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller () + +MIT License, see [LICENSE](LICENSE) file. diff --git a/node_modules/readdirp/esm/index.d.ts b/node_modules/readdirp/esm/index.d.ts new file mode 100644 index 0000000..f5198c5 --- /dev/null +++ b/node_modules/readdirp/esm/index.d.ts @@ -0,0 +1,68 @@ +import type { Stats, Dirent } from 'fs'; +import { Readable } from 'stream'; +export type Path = string; +export interface EntryInfo { + path: string; + fullPath: string; + stats?: Stats; + dirent?: Dirent; + basename: string; +} +export type PathOrDirent = Dirent | Path; +export type Tester = (path: EntryInfo) => boolean; +export type Predicate = string[] | string | Tester; +declare function defaultOptions(): { + root: string; + fileFilter: (_path: EntryInfo) => boolean; + directoryFilter: (_path: EntryInfo) => boolean; + type: string; + lstat: boolean; + depth: number; + alwaysStat: boolean; + highWaterMark: number; +}; +export type ReaddirpOptions = ReturnType; +export interface DirEntry { + files: PathOrDirent[]; + depth: number; + path: Path; +} +export declare class ReaddirpStream extends Readable { + parents: any[]; + reading: boolean; + parent?: DirEntry; + _stat: Function; + _maxDepth: number; + _wantsDir: boolean; + _wantsFile: boolean; + _wantsEverything: boolean; + _root: Path; + _isDirent: boolean; + _statsProp: 'dirent' | 'stats'; + _rdOptions: { + encoding: 'utf8'; + withFileTypes: boolean; + }; + _fileFilter: Tester; + _directoryFilter: Tester; + constructor(options?: Partial); + _read(batch: number): Promise; + _exploreDir(path: Path, depth: number): Promise<{ + files: string[] | undefined; + depth: number; + path: string; + }>; + _formatEntry(dirent: PathOrDirent, path: Path): EntryInfo | undefined; + _onError(err: Error): void; + _getEntryType(entry: EntryInfo): Promise; + _includeAsFile(entry: EntryInfo): boolean | undefined; +} +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param root Root directory + * @param options Options to specify root (start directory), filters and recursion depth + */ +export declare const readdirp: (root: Path, options?: Partial) => ReaddirpStream; +export declare const readdirpPromise: (root: Path, options?: Partial) => Promise; +export default readdirp; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/readdirp/esm/index.d.ts.map b/node_modules/readdirp/esm/index.d.ts.map new file mode 100644 index 0000000..d6dbf7f --- /dev/null +++ b/node_modules/readdirp/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAQlC,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAC1B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;AACzC,MAAM,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC;AAClD,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnD,iBAAS,cAAc;;wBAGC,SAAS;6BACJ,SAAS;;;;;;EAOrC;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AA6BhE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAElB,KAAK,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,IAAI,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC/B,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;gBAEb,OAAO,GAAE,OAAO,CAAC,eAAe,CAAM;IAmC5C,KAAK,CAAC,KAAK,EAAE,MAAM;IAwDnB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM;;;;;IAU3C,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,SAAS;IAcrE,QAAQ,CAAC,GAAG,EAAE,KAAK;IAQb,aAAa,CAAC,KAAK,EAAE,SAAS;IAoCpC,cAAc,CAAC,KAAK,EAAE,SAAS;CAIhC;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,SAAU,IAAI,YAAW,OAAO,CAAC,eAAe,CAAC,mBAerE,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,IAAI,YAAW,OAAO,CAAC,eAAe,CAAC,qBAQ5E,CAAC;AAEF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/readdirp/esm/index.js b/node_modules/readdirp/esm/index.js new file mode 100644 index 0000000..edd709e --- /dev/null +++ b/node_modules/readdirp/esm/index.js @@ -0,0 +1,239 @@ +import { statSync, lstatSync } from 'fs'; +import { readdir, realpath } from 'fs/promises'; +import { Readable } from 'stream'; +import { resolve as pathResolve, relative as pathRelative, join as pathJoin, sep as pathSep, } from 'path'; +function defaultOptions() { + return { + root: '.', + fileFilter: (_path) => true, + directoryFilter: (_path) => true, + type: FILE_TYPE, + lstat: false, + depth: 2147483648, + alwaysStat: false, + highWaterMark: 4096, + }; +} +const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; +const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); +const FILE_TYPE = 'files'; +const DIR_TYPE = 'directories'; +const FILE_DIR_TYPE = 'files_directories'; +const EVERYTHING_TYPE = 'all'; +const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; +const DIR_TYPES = new Set([DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); +const FILE_TYPES = new Set([FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); +const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code); +const wantBigintFsStats = process.platform === 'win32'; +const emptyFn = (_path) => true; +const normalizeFilter = (filter) => { + if (filter === undefined) + return emptyFn; + if (typeof filter === 'function') + return filter; + if (typeof filter === 'string') { + const fl = filter.trim(); + return (entry) => entry.basename === fl; + } + if (Array.isArray(filter)) { + const trItems = filter.map((item) => item.trim()); + return (entry) => trItems.some((f) => entry.basename === f); + } + return emptyFn; +}; +export class ReaddirpStream extends Readable { + constructor(options = {}) { + super({ + objectMode: true, + autoDestroy: true, + highWaterMark: options.highWaterMark, + }); + const opts = { ...defaultOptions(), ...options }; + const { root, type } = opts; + this._fileFilter = normalizeFilter(opts.fileFilter); + this._directoryFilter = normalizeFilter(opts.directoryFilter); + const statMethod = opts.lstat ? lstatSync : statSync; + // Use bigint stats if it's windows and stat() supports options (node 10+). + if (wantBigintFsStats) { + this._stat = (path) => statMethod(path, { bigint: true }); + } + else { + this._stat = statMethod; + } + this._maxDepth = opts.depth; + this._wantsDir = DIR_TYPES.has(type); + this._wantsFile = FILE_TYPES.has(type); + this._wantsEverything = type === EVERYTHING_TYPE; + this._root = pathResolve(root); + this._isDirent = !opts.alwaysStat; + this._statsProp = this._isDirent ? 'dirent' : 'stats'; + this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; + // Launch stream with one parent, the root dir. + this.parents = [this._exploreDir(root, 1)]; + this.reading = false; + this.parent = undefined; + } + async _read(batch) { + if (this.reading) + return; + this.reading = true; + try { + while (!this.destroyed && batch > 0) { + const par = this.parent; + const fil = par && par.files; + if (fil && fil.length > 0) { + const { path, depth } = par; + const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path)); + for (const entry of slice) { + if (!entry) { + batch--; + return; + } + if (this.destroyed) + return; + const entryType = await this._getEntryType(entry); + if (entryType === 'directory' && this._directoryFilter(entry)) { + if (depth <= this._maxDepth) { + this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); + } + if (this._wantsDir) { + this.push(entry); + batch--; + } + } + else if ((entryType === 'file' || this._includeAsFile(entry)) && + this._fileFilter(entry)) { + if (this._wantsFile) { + this.push(entry); + batch--; + } + } + } + } + else { + const parent = this.parents.pop(); + if (!parent) { + this.push(null); + break; + } + this.parent = await parent; + if (this.destroyed) + return; + } + } + } + catch (error) { + this.destroy(error); + } + finally { + this.reading = false; + } + } + async _exploreDir(path, depth) { + let files; + try { + files = await readdir(path, this._rdOptions); + } + catch (error) { + this._onError(error); + } + return { files, depth, path }; + } + _formatEntry(dirent, path) { + let entry; + const basename = this._isDirent ? dirent.name : dirent; + try { + const fullPath = pathResolve(pathJoin(path, basename)); + entry = { path: pathRelative(this._root, fullPath), fullPath, basename }; + entry[this._statsProp] = this._isDirent ? dirent : this._stat(fullPath); + } + catch (err) { + this._onError(err); + return; + } + return entry; + } + _onError(err) { + if (isNormalFlowError(err) && !this.destroyed) { + this.emit('warn', err); + } + else { + this.destroy(err); + } + } + async _getEntryType(entry) { + // entry may be undefined, because a warning or an error were emitted + // and the statsProp is undefined + if (!entry && this._statsProp in entry) { + return ''; + } + const stats = entry[this._statsProp]; + if (stats.isFile()) + return 'file'; + if (stats.isDirectory()) + return 'directory'; + if (stats && stats.isSymbolicLink()) { + const full = entry.fullPath; + try { + const entryRealPath = await realpath(full); + const entryRealPathStats = lstatSync(entryRealPath); + if (entryRealPathStats.isFile()) { + return 'file'; + } + if (entryRealPathStats.isDirectory()) { + const len = entryRealPath.length; + if (full.startsWith(entryRealPath) && full.substr(len, 1) === pathSep) { + const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`); + // @ts-ignore + recursiveError.code = RECURSIVE_ERROR_CODE; + return this._onError(recursiveError); + } + return 'directory'; + } + } + catch (error) { + this._onError(error); + return ''; + } + } + } + _includeAsFile(entry) { + const stats = entry && entry[this._statsProp]; + return stats && this._wantsEverything && !stats.isDirectory(); + } +} +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param root Root directory + * @param options Options to specify root (start directory), filters and recursion depth + */ +export const readdirp = (root, options = {}) => { + // @ts-ignore + let type = options.entryType || options.type; + if (type === 'both') + type = FILE_DIR_TYPE; // backwards-compatibility + if (type) + options.type = type; + if (!root) { + throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); + } + else if (typeof root !== 'string') { + throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); + } + else if (type && !ALL_TYPES.includes(type)) { + throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); + } + options.root = root; + return new ReaddirpStream(options); +}; +export const readdirpPromise = (root, options = {}) => { + return new Promise((resolve, reject) => { + const files = []; + readdirp(root, options) + .on('data', (entry) => files.push(entry)) + .on('end', () => resolve(files)) + .on('error', (error) => reject(error)); + }); +}; +export default readdirp; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/readdirp/esm/index.js.map b/node_modules/readdirp/esm/index.js.map new file mode 100644 index 0000000..5dbf8b9 --- /dev/null +++ b/node_modules/readdirp/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,QAAQ,IAAI,YAAY,EACxB,IAAI,IAAI,QAAQ,EAChB,GAAG,IAAI,OAAO,GACf,MAAM,MAAM,CAAC;AAcd,SAAS,cAAc;IACrB,OAAO;QACL,IAAI,EAAE,GAAG;QACT,UAAU,EAAE,CAAC,KAAgB,EAAE,EAAE,CAAC,IAAI;QACtC,eAAe,EAAE,CAAC,KAAgB,EAAE,EAAE,CAAC,IAAI;QAC3C,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,aAAa,EAAE,IAAI;KACpB,CAAC;AACJ,CAAC;AAID,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC;AACjG,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,MAAM,QAAQ,GAAG,aAAa,CAAC;AAC/B,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAC1C,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AACxE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AACtE,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AAExE,MAAM,iBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7E,MAAM,iBAAiB,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AACvD,MAAM,OAAO,GAAG,CAAC,KAAgB,EAAE,EAAE,CAAC,IAAI,CAAC;AAC3C,MAAM,eAAe,GAAG,CAAC,MAA6B,EAAE,EAAE;IACxD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IACzC,IAAI,OAAO,MAAM,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC;IAChD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QACzB,OAAO,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,EAAE,CAAC;IACrD,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAClD,OAAO,CAAC,KAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAQF,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAiB1C,YAAY,UAAoC,EAAE;QAChD,KAAK,CAAC;YACJ,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,GAAG,cAAc,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;QACjD,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAE9D,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;QACrD,2EAA2E;QAC3E,IAAI,iBAAiB,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,GAAG,CAAC,IAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;QAC1B,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,gBAAgB,GAAG,IAAI,KAAK,eAAe,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;QACtD,IAAI,CAAC,UAAU,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;QAEtE,+CAA+C;QAC/C,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAa;QACvB,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;gBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;gBACxB,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC;gBAE7B,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC1B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC;oBAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;oBACpF,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;wBAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;4BACX,KAAK,EAAE,CAAC;4BACR,OAAO;wBACT,CAAC;wBACD,IAAI,IAAI,CAAC,SAAS;4BAAE,OAAO;wBAE3B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;wBAClD,IAAI,SAAS,KAAK,WAAW,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;4BAC9D,IAAI,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gCAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;4BACjE,CAAC;4BAED,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gCACnB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gCACjB,KAAK,EAAE,CAAC;4BACV,CAAC;wBACH,CAAC;6BAAM,IACL,CAAC,SAAS,KAAK,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;4BACpD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EACvB,CAAC;4BACD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gCACpB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gCACjB,KAAK,EAAE,CAAC;4BACV,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;oBAClC,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBAChB,MAAM;oBACR,CAAC;oBACD,IAAI,CAAC,MAAM,GAAG,MAAM,MAAM,CAAC;oBAC3B,IAAI,IAAI,CAAC,SAAS;wBAAE,OAAO;gBAC7B,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,KAAc,CAAC,CAAC;QAC/B,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAU,EAAE,KAAa;QACzC,IAAI,KAAK,CAAC;QACV,IAAI,CAAC;YACH,KAAK,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,UAAiB,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAChC,CAAC;IAED,YAAY,CAAC,MAAoB,EAAE,IAAU;QAC3C,IAAI,KAAgB,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAE,MAAiB,CAAC,IAAI,CAAC,CAAC,CAAE,MAAiB,CAAC;QAC/E,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;YACvD,KAAK,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC1E,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,QAAQ,CAAC,GAAY,CAAC,CAAC;YAC5B,OAAO;QACT,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ,CAAC,GAAU;QACjB,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAAgB;QAClC,qEAAqE;QACrE,iCAAiC;QACjC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,KAAK,EAAE,CAAC;YACvC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAE,CAAC;QACtC,IAAI,KAAK,CAAC,MAAM,EAAE;YAAE,OAAO,MAAM,CAAC;QAClC,IAAI,KAAK,CAAC,WAAW,EAAE;YAAE,OAAO,WAAW,CAAC;QAC5C,IAAI,KAAK,IAAI,KAAK,CAAC,cAAc,EAAE,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC;YAC5B,IAAI,CAAC;gBACH,MAAM,aAAa,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAC3C,MAAM,kBAAkB,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;gBACpD,IAAI,kBAAkB,CAAC,MAAM,EAAE,EAAE,CAAC;oBAChC,OAAO,MAAM,CAAC;gBAChB,CAAC;gBACD,IAAI,kBAAkB,CAAC,WAAW,EAAE,EAAE,CAAC;oBACrC,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC;oBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;wBACtE,MAAM,cAAc,GAAG,IAAI,KAAK,CAC9B,+BAA+B,IAAI,gBAAgB,aAAa,GAAG,CACpE,CAAC;wBACF,aAAa;wBACb,cAAc,CAAC,IAAI,GAAG,oBAAoB,CAAC;wBAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;oBACvC,CAAC;oBACD,OAAO,WAAW,CAAC;gBACrB,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC;IACH,CAAC;IAED,cAAc,CAAC,KAAgB;QAC7B,MAAM,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9C,OAAO,KAAK,IAAI,IAAI,CAAC,gBAAgB,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IAChE,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAU,EAAE,UAAoC,EAAE,EAAE,EAAE;IAC7E,aAAa;IACb,IAAI,IAAI,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAC7C,IAAI,IAAI,KAAK,MAAM;QAAE,IAAI,GAAG,aAAa,CAAC,CAAC,0BAA0B;IACrE,IAAI,IAAI;QAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,0EAA0E,CAAC,CAAC;IAClG,CAAC;SAAM,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,6CAA6C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAU,EAAE,UAAoC,EAAE,EAAE,EAAE;IACpF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,KAAK,GAAW,EAAE,CAAC;QACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;aACpB,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;aAC/B,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/readdirp/esm/package.json b/node_modules/readdirp/esm/package.json new file mode 100644 index 0000000..8769641 --- /dev/null +++ b/node_modules/readdirp/esm/package.json @@ -0,0 +1 @@ +{ "type": "module", "sideEffects": false } diff --git a/node_modules/readdirp/index.d.ts b/node_modules/readdirp/index.d.ts new file mode 100644 index 0000000..f5198c5 --- /dev/null +++ b/node_modules/readdirp/index.d.ts @@ -0,0 +1,68 @@ +import type { Stats, Dirent } from 'fs'; +import { Readable } from 'stream'; +export type Path = string; +export interface EntryInfo { + path: string; + fullPath: string; + stats?: Stats; + dirent?: Dirent; + basename: string; +} +export type PathOrDirent = Dirent | Path; +export type Tester = (path: EntryInfo) => boolean; +export type Predicate = string[] | string | Tester; +declare function defaultOptions(): { + root: string; + fileFilter: (_path: EntryInfo) => boolean; + directoryFilter: (_path: EntryInfo) => boolean; + type: string; + lstat: boolean; + depth: number; + alwaysStat: boolean; + highWaterMark: number; +}; +export type ReaddirpOptions = ReturnType; +export interface DirEntry { + files: PathOrDirent[]; + depth: number; + path: Path; +} +export declare class ReaddirpStream extends Readable { + parents: any[]; + reading: boolean; + parent?: DirEntry; + _stat: Function; + _maxDepth: number; + _wantsDir: boolean; + _wantsFile: boolean; + _wantsEverything: boolean; + _root: Path; + _isDirent: boolean; + _statsProp: 'dirent' | 'stats'; + _rdOptions: { + encoding: 'utf8'; + withFileTypes: boolean; + }; + _fileFilter: Tester; + _directoryFilter: Tester; + constructor(options?: Partial); + _read(batch: number): Promise; + _exploreDir(path: Path, depth: number): Promise<{ + files: string[] | undefined; + depth: number; + path: string; + }>; + _formatEntry(dirent: PathOrDirent, path: Path): EntryInfo | undefined; + _onError(err: Error): void; + _getEntryType(entry: EntryInfo): Promise; + _includeAsFile(entry: EntryInfo): boolean | undefined; +} +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param root Root directory + * @param options Options to specify root (start directory), filters and recursion depth + */ +export declare const readdirp: (root: Path, options?: Partial) => ReaddirpStream; +export declare const readdirpPromise: (root: Path, options?: Partial) => Promise; +export default readdirp; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/readdirp/index.d.ts.map b/node_modules/readdirp/index.d.ts.map new file mode 100644 index 0000000..6b19d67 --- /dev/null +++ b/node_modules/readdirp/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAQlC,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAC1B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;AACzC,MAAM,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC;AAClD,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnD,iBAAS,cAAc;;wBAGC,SAAS;6BACJ,SAAS;;;;;;EAOrC;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AA6BhE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAElB,KAAK,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,IAAI,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC/B,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;gBAEb,OAAO,GAAE,OAAO,CAAC,eAAe,CAAM;IAmC5C,KAAK,CAAC,KAAK,EAAE,MAAM;IAwDnB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM;;;;;IAU3C,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,SAAS;IAcrE,QAAQ,CAAC,GAAG,EAAE,KAAK;IAQb,aAAa,CAAC,KAAK,EAAE,SAAS;IAoCpC,cAAc,CAAC,KAAK,EAAE,SAAS;CAIhC;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,SAAU,IAAI,YAAW,OAAO,CAAC,eAAe,CAAC,mBAerE,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,IAAI,YAAW,OAAO,CAAC,eAAe,CAAC,qBAQ5E,CAAC;AAEF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/readdirp/index.js b/node_modules/readdirp/index.js new file mode 100644 index 0000000..d976cb0 --- /dev/null +++ b/node_modules/readdirp/index.js @@ -0,0 +1,245 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdirpPromise = exports.readdirp = exports.ReaddirpStream = void 0; +const fs_1 = require("fs"); +const promises_1 = require("fs/promises"); +const stream_1 = require("stream"); +const path_1 = require("path"); +function defaultOptions() { + return { + root: '.', + fileFilter: (_path) => true, + directoryFilter: (_path) => true, + type: FILE_TYPE, + lstat: false, + depth: 2147483648, + alwaysStat: false, + highWaterMark: 4096, + }; +} +const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; +const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); +const FILE_TYPE = 'files'; +const DIR_TYPE = 'directories'; +const FILE_DIR_TYPE = 'files_directories'; +const EVERYTHING_TYPE = 'all'; +const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; +const DIR_TYPES = new Set([DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); +const FILE_TYPES = new Set([FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); +const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code); +const wantBigintFsStats = process.platform === 'win32'; +const emptyFn = (_path) => true; +const normalizeFilter = (filter) => { + if (filter === undefined) + return emptyFn; + if (typeof filter === 'function') + return filter; + if (typeof filter === 'string') { + const fl = filter.trim(); + return (entry) => entry.basename === fl; + } + if (Array.isArray(filter)) { + const trItems = filter.map((item) => item.trim()); + return (entry) => trItems.some((f) => entry.basename === f); + } + return emptyFn; +}; +class ReaddirpStream extends stream_1.Readable { + constructor(options = {}) { + super({ + objectMode: true, + autoDestroy: true, + highWaterMark: options.highWaterMark, + }); + const opts = { ...defaultOptions(), ...options }; + const { root, type } = opts; + this._fileFilter = normalizeFilter(opts.fileFilter); + this._directoryFilter = normalizeFilter(opts.directoryFilter); + const statMethod = opts.lstat ? fs_1.lstatSync : fs_1.statSync; + // Use bigint stats if it's windows and stat() supports options (node 10+). + if (wantBigintFsStats) { + this._stat = (path) => statMethod(path, { bigint: true }); + } + else { + this._stat = statMethod; + } + this._maxDepth = opts.depth; + this._wantsDir = DIR_TYPES.has(type); + this._wantsFile = FILE_TYPES.has(type); + this._wantsEverything = type === EVERYTHING_TYPE; + this._root = (0, path_1.resolve)(root); + this._isDirent = !opts.alwaysStat; + this._statsProp = this._isDirent ? 'dirent' : 'stats'; + this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; + // Launch stream with one parent, the root dir. + this.parents = [this._exploreDir(root, 1)]; + this.reading = false; + this.parent = undefined; + } + async _read(batch) { + if (this.reading) + return; + this.reading = true; + try { + while (!this.destroyed && batch > 0) { + const par = this.parent; + const fil = par && par.files; + if (fil && fil.length > 0) { + const { path, depth } = par; + const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path)); + for (const entry of slice) { + if (!entry) { + batch--; + return; + } + if (this.destroyed) + return; + const entryType = await this._getEntryType(entry); + if (entryType === 'directory' && this._directoryFilter(entry)) { + if (depth <= this._maxDepth) { + this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); + } + if (this._wantsDir) { + this.push(entry); + batch--; + } + } + else if ((entryType === 'file' || this._includeAsFile(entry)) && + this._fileFilter(entry)) { + if (this._wantsFile) { + this.push(entry); + batch--; + } + } + } + } + else { + const parent = this.parents.pop(); + if (!parent) { + this.push(null); + break; + } + this.parent = await parent; + if (this.destroyed) + return; + } + } + } + catch (error) { + this.destroy(error); + } + finally { + this.reading = false; + } + } + async _exploreDir(path, depth) { + let files; + try { + files = await (0, promises_1.readdir)(path, this._rdOptions); + } + catch (error) { + this._onError(error); + } + return { files, depth, path }; + } + _formatEntry(dirent, path) { + let entry; + const basename = this._isDirent ? dirent.name : dirent; + try { + const fullPath = (0, path_1.resolve)((0, path_1.join)(path, basename)); + entry = { path: (0, path_1.relative)(this._root, fullPath), fullPath, basename }; + entry[this._statsProp] = this._isDirent ? dirent : this._stat(fullPath); + } + catch (err) { + this._onError(err); + return; + } + return entry; + } + _onError(err) { + if (isNormalFlowError(err) && !this.destroyed) { + this.emit('warn', err); + } + else { + this.destroy(err); + } + } + async _getEntryType(entry) { + // entry may be undefined, because a warning or an error were emitted + // and the statsProp is undefined + if (!entry && this._statsProp in entry) { + return ''; + } + const stats = entry[this._statsProp]; + if (stats.isFile()) + return 'file'; + if (stats.isDirectory()) + return 'directory'; + if (stats && stats.isSymbolicLink()) { + const full = entry.fullPath; + try { + const entryRealPath = await (0, promises_1.realpath)(full); + const entryRealPathStats = (0, fs_1.lstatSync)(entryRealPath); + if (entryRealPathStats.isFile()) { + return 'file'; + } + if (entryRealPathStats.isDirectory()) { + const len = entryRealPath.length; + if (full.startsWith(entryRealPath) && full.substr(len, 1) === path_1.sep) { + const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`); + // @ts-ignore + recursiveError.code = RECURSIVE_ERROR_CODE; + return this._onError(recursiveError); + } + return 'directory'; + } + } + catch (error) { + this._onError(error); + return ''; + } + } + } + _includeAsFile(entry) { + const stats = entry && entry[this._statsProp]; + return stats && this._wantsEverything && !stats.isDirectory(); + } +} +exports.ReaddirpStream = ReaddirpStream; +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param root Root directory + * @param options Options to specify root (start directory), filters and recursion depth + */ +const readdirp = (root, options = {}) => { + // @ts-ignore + let type = options.entryType || options.type; + if (type === 'both') + type = FILE_DIR_TYPE; // backwards-compatibility + if (type) + options.type = type; + if (!root) { + throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); + } + else if (typeof root !== 'string') { + throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); + } + else if (type && !ALL_TYPES.includes(type)) { + throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); + } + options.root = root; + return new ReaddirpStream(options); +}; +exports.readdirp = readdirp; +const readdirpPromise = (root, options = {}) => { + return new Promise((resolve, reject) => { + const files = []; + (0, exports.readdirp)(root, options) + .on('data', (entry) => files.push(entry)) + .on('end', () => resolve(files)) + .on('error', (error) => reject(error)); + }); +}; +exports.readdirpPromise = readdirpPromise; +exports.default = exports.readdirp; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/readdirp/index.js.map b/node_modules/readdirp/index.js.map new file mode 100644 index 0000000..73d58cf --- /dev/null +++ b/node_modules/readdirp/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,2BAAyC;AACzC,0CAAgD;AAChD,mCAAkC;AAClC,+BAKc;AAcd,SAAS,cAAc;IACrB,OAAO;QACL,IAAI,EAAE,GAAG;QACT,UAAU,EAAE,CAAC,KAAgB,EAAE,EAAE,CAAC,IAAI;QACtC,eAAe,EAAE,CAAC,KAAgB,EAAE,EAAE,CAAC,IAAI;QAC3C,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,KAAK;QACjB,aAAa,EAAE,IAAI;KACpB,CAAC;AACJ,CAAC;AAID,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC;AACjG,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,MAAM,QAAQ,GAAG,aAAa,CAAC;AAC/B,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAC1C,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AACxE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AACtE,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AAExE,MAAM,iBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7E,MAAM,iBAAiB,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AACvD,MAAM,OAAO,GAAG,CAAC,KAAgB,EAAE,EAAE,CAAC,IAAI,CAAC;AAC3C,MAAM,eAAe,GAAG,CAAC,MAA6B,EAAE,EAAE;IACxD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IACzC,IAAI,OAAO,MAAM,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC;IAChD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QACzB,OAAO,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,EAAE,CAAC;IACrD,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAClD,OAAO,CAAC,KAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAQF,MAAa,cAAe,SAAQ,iBAAQ;IAiB1C,YAAY,UAAoC,EAAE;QAChD,KAAK,CAAC;YACJ,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,GAAG,cAAc,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;QACjD,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAE9D,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,cAAS,CAAC,CAAC,CAAC,aAAQ,CAAC;QACrD,2EAA2E;QAC3E,IAAI,iBAAiB,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,GAAG,CAAC,IAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;QAC1B,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,gBAAgB,GAAG,IAAI,KAAK,eAAe,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,IAAA,cAAW,EAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;QACtD,IAAI,CAAC,UAAU,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;QAEtE,+CAA+C;QAC/C,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAa;QACvB,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;gBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;gBACxB,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC;gBAE7B,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC1B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC;oBAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;oBACpF,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;wBAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;4BACX,KAAK,EAAE,CAAC;4BACR,OAAO;wBACT,CAAC;wBACD,IAAI,IAAI,CAAC,SAAS;4BAAE,OAAO;wBAE3B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;wBAClD,IAAI,SAAS,KAAK,WAAW,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;4BAC9D,IAAI,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gCAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;4BACjE,CAAC;4BAED,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gCACnB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gCACjB,KAAK,EAAE,CAAC;4BACV,CAAC;wBACH,CAAC;6BAAM,IACL,CAAC,SAAS,KAAK,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;4BACpD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EACvB,CAAC;4BACD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gCACpB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gCACjB,KAAK,EAAE,CAAC;4BACV,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;oBAClC,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBAChB,MAAM;oBACR,CAAC;oBACD,IAAI,CAAC,MAAM,GAAG,MAAM,MAAM,CAAC;oBAC3B,IAAI,IAAI,CAAC,SAAS;wBAAE,OAAO;gBAC7B,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,KAAc,CAAC,CAAC;QAC/B,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAU,EAAE,KAAa;QACzC,IAAI,KAAK,CAAC;QACV,IAAI,CAAC;YACH,KAAK,GAAG,MAAM,IAAA,kBAAO,EAAC,IAAI,EAAE,IAAI,CAAC,UAAiB,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAChC,CAAC;IAED,YAAY,CAAC,MAAoB,EAAE,IAAU;QAC3C,IAAI,KAAgB,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAE,MAAiB,CAAC,IAAI,CAAC,CAAC,CAAE,MAAiB,CAAC;QAC/E,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAA,cAAW,EAAC,IAAA,WAAQ,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;YACvD,KAAK,GAAG,EAAE,IAAI,EAAE,IAAA,eAAY,EAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC1E,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,QAAQ,CAAC,GAAY,CAAC,CAAC;YAC5B,OAAO;QACT,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ,CAAC,GAAU;QACjB,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YAC9C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAAgB;QAClC,qEAAqE;QACrE,iCAAiC;QACjC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,KAAK,EAAE,CAAC;YACvC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAE,CAAC;QACtC,IAAI,KAAK,CAAC,MAAM,EAAE;YAAE,OAAO,MAAM,CAAC;QAClC,IAAI,KAAK,CAAC,WAAW,EAAE;YAAE,OAAO,WAAW,CAAC;QAC5C,IAAI,KAAK,IAAI,KAAK,CAAC,cAAc,EAAE,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC;YAC5B,IAAI,CAAC;gBACH,MAAM,aAAa,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAI,CAAC,CAAC;gBAC3C,MAAM,kBAAkB,GAAG,IAAA,cAAS,EAAC,aAAa,CAAC,CAAC;gBACpD,IAAI,kBAAkB,CAAC,MAAM,EAAE,EAAE,CAAC;oBAChC,OAAO,MAAM,CAAC;gBAChB,CAAC;gBACD,IAAI,kBAAkB,CAAC,WAAW,EAAE,EAAE,CAAC;oBACrC,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC;oBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,UAAO,EAAE,CAAC;wBACtE,MAAM,cAAc,GAAG,IAAI,KAAK,CAC9B,+BAA+B,IAAI,gBAAgB,aAAa,GAAG,CACpE,CAAC;wBACF,aAAa;wBACb,cAAc,CAAC,IAAI,GAAG,oBAAoB,CAAC;wBAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;oBACvC,CAAC;oBACD,OAAO,WAAW,CAAC;gBACrB,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC;IACH,CAAC;IAED,cAAc,CAAC,KAAgB;QAC7B,MAAM,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9C,OAAO,KAAK,IAAI,IAAI,CAAC,gBAAgB,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IAChE,CAAC;CACF;AApLD,wCAoLC;AAED;;;;GAIG;AACI,MAAM,QAAQ,GAAG,CAAC,IAAU,EAAE,UAAoC,EAAE,EAAE,EAAE;IAC7E,aAAa;IACb,IAAI,IAAI,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAC7C,IAAI,IAAI,KAAK,MAAM;QAAE,IAAI,GAAG,aAAa,CAAC,CAAC,0BAA0B;IACrE,IAAI,IAAI;QAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,0EAA0E,CAAC,CAAC;IAClG,CAAC;SAAM,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,6CAA6C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC;AAfW,QAAA,QAAQ,YAenB;AAEK,MAAM,eAAe,GAAG,CAAC,IAAU,EAAE,UAAoC,EAAE,EAAE,EAAE;IACpF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,KAAK,GAAW,EAAE,CAAC;QACzB,IAAA,gBAAQ,EAAC,IAAI,EAAE,OAAO,CAAC;aACpB,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;aAC/B,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AARW,QAAA,eAAe,mBAQ1B;AAEF,kBAAe,gBAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json new file mode 100644 index 0000000..03a7862 --- /dev/null +++ b/node_modules/readdirp/package.json @@ -0,0 +1,78 @@ +{ + "name": "readdirp", + "description": "Recursive version of fs.readdir with streaming API.", + "version": "4.0.1", + "homepage": "https://github.com/paulmillr/readdirp", + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/paulmillr/readdirp/issues" + }, + "author": "Thorsten Lorenz (thlorenz.com)", + "contributors": [ + "Thorsten Lorenz (thlorenz.com)", + "Paul Miller (https://paulmillr.com)" + ], + "engines": { + "node": ">= 14.16.0" + }, + "files": [ + "index.js", + "index.d.ts", + "index.d.ts.map", + "index.js.map", + "esm" + ], + "main": "./index.js", + "module": "./esm/index.js", + "types": "./index.d.ts", + "exports": { + ".": { + "import": "./esm/index.js", + "require": "./index.js" + } + }, + "sideEffects": false, + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json", + "nyc": "nyc", + "mocha": "mocha --exit", + "lint": "prettier --check index.ts", + "format": "prettier --write index.ts", + "test": "nyc npm run mocha" + }, + "devDependencies": { + "@paulmillr/jsbt": "0.2.1", + "@types/node": "20.14.8", + "chai": "4.3.4", + "chai-subset": "1.6.0", + "mocha": "10.7.3", + "nyc": "15.0.1", + "prettier": "3.1.1", + "rimraf": "6.0.1", + "typescript": "5.5.2" + }, + "nyc": { + "reporter": [ + "html", + "text" + ] + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } +} diff --git a/node_modules/regex-not/LICENSE b/node_modules/regex-not/LICENSE new file mode 100644 index 0000000..8ee09d9 --- /dev/null +++ b/node_modules/regex-not/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, 2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/regex-not/README.md b/node_modules/regex-not/README.md new file mode 100644 index 0000000..24d00e7 --- /dev/null +++ b/node_modules/regex-not/README.md @@ -0,0 +1,133 @@ +# regex-not [![NPM version](https://img.shields.io/npm/v/regex-not.svg?style=flat)](https://www.npmjs.com/package/regex-not) [![NPM monthly downloads](https://img.shields.io/npm/dm/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![NPM total downloads](https://img.shields.io/npm/dt/regex-not.svg?style=flat)](https://npmjs.org/package/regex-not) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/regex-not.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/regex-not) + +> Create a javascript regular expression for matching everything except for the given string. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save regex-not +``` + +## Usage + +```js +var not = require('regex-not'); +``` + +The main export is a function that takes a string an options object. + +```js +not(string[, options]); +``` + +**Example** + +```js +var not = require('regex-not'); +console.log(not('foo')); +//=> /^(?:(?!^(?:foo)$).)+$/ +``` + +**Strict matching** + +By default, the returned regex is for strictly (not) matching the exact given pattern (in other words, "match this string if it does NOT _exactly equal_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo')); //=> false +console.log(re.test('bar')); //=> true +console.log(re.test('foobar')); //=> true +console.log(re.test('barfoo')); //=> true +``` + +### .create + +Returns a string to allow you to create your own regex: + +```js +console.log(not.create('foo')); +//=> '(?:(?!^(?:foo)$).)+' +``` + +### Options + +**options.contains** + +You can relax strict matching by setting `options.contains` to true (in other words, "match this string if it does NOT _contain_ `foo`"): + +```js +var re = not('foo'); +console.log(re.test('foo', {contains: true})); //=> false +console.log(re.test('bar', {contains: true})); //=> true +console.log(re.test('foobar', {contains: true})); //=> false +console.log(re.test('barfoo', {contains: true})); //=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [regex-cache](https://www.npmjs.com/package/regex-cache): Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of… [more](https://github.com/jonschlinkert/regex-cache) | [homepage](https://github.com/jonschlinkert/regex-cache "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.") +* [to-regex](https://www.npmjs.com/package/to-regex): Generate a regex from a string or array of strings. | [homepage](https://github.com/jonschlinkert/to-regex "Generate a regex from a string or array of strings.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 9 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [EdwardBetts](https://github.com/EdwardBetts) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 19, 2018._ \ No newline at end of file diff --git a/node_modules/regex-not/index.js b/node_modules/regex-not/index.js new file mode 100644 index 0000000..02bfed4 --- /dev/null +++ b/node_modules/regex-not/index.js @@ -0,0 +1,72 @@ +'use strict'; + +var extend = require('extend-shallow'); +var safe = require('safe-regex'); + +/** + * The main export is a function that takes a `pattern` string and an `options` object. + * + * ```js + & var not = require('regex-not'); + & console.log(not('foo')); + & //=> /^(?:(?!^(?:foo)$).)*$/ + * ``` + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {RegExp} Converts the given `pattern` to a regex using the specified `options`. + * @api public + */ + +function toRegex(pattern, options) { + return new RegExp(toRegex.create(pattern, options)); +} + +/** + * Create a regex-compatible string from the given `pattern` and `options`. + * + * ```js + & var not = require('regex-not'); + & console.log(not.create('foo')); + & //=> '^(?:(?!^(?:foo)$).)*$' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +toRegex.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var opts = extend({}, options); + if (opts.contains === true) { + opts.strictNegate = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var endChar = opts.endChar ? opts.endChar : '+'; + var str = pattern; + + if (opts.strictNegate === false) { + str = '(?:(?!(?:' + pattern + ')).)' + endChar; + } else { + str = '(?:(?!^(?:' + pattern + ')$).)' + endChar; + } + + var res = open + str + close; + if (opts.safe === true && safe(res) === false) { + throw new Error('potentially unsafe regular expression: ' + res); + } + + return res; +}; + +/** + * Expose `toRegex` + */ + +module.exports = toRegex; diff --git a/node_modules/regex-not/node_modules/extend-shallow/LICENSE b/node_modules/regex-not/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/regex-not/node_modules/extend-shallow/README.md b/node_modules/regex-not/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/regex-not/node_modules/extend-shallow/index.js b/node_modules/regex-not/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/regex-not/node_modules/extend-shallow/package.json b/node_modules/regex-not/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/regex-not/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regex-not/node_modules/is-extendable/LICENSE b/node_modules/regex-not/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/regex-not/node_modules/is-extendable/README.md b/node_modules/regex-not/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/regex-not/node_modules/is-extendable/index.d.ts b/node_modules/regex-not/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/regex-not/node_modules/is-extendable/index.js b/node_modules/regex-not/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/regex-not/node_modules/is-extendable/package.json b/node_modules/regex-not/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/regex-not/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regex-not/package.json b/node_modules/regex-not/package.json new file mode 100644 index 0000000..0320d53 --- /dev/null +++ b/node_modules/regex-not/package.json @@ -0,0 +1,63 @@ +{ + "name": "regex-not", + "description": "Create a javascript regular expression for matching everything except for the given string.", + "version": "1.0.2", + "homepage": "https://github.com/jonschlinkert/regex-not", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/regex-not", + "bugs": { + "url": "https://github.com/jonschlinkert/regex-not/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "exec", + "match", + "negate", + "negation", + "not", + "regex", + "regular expression", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "regex-cache", + "to-regex" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/regexp.prototype.flags/.editorconfig b/node_modules/regexp.prototype.flags/.editorconfig new file mode 100644 index 0000000..eaa2141 --- /dev/null +++ b/node_modules/regexp.prototype.flags/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/regexp.prototype.flags/.eslintrc b/node_modules/regexp.prototype.flags/.eslintrc new file mode 100644 index 0000000..fb009ab --- /dev/null +++ b/node_modules/regexp.prototype.flags/.eslintrc @@ -0,0 +1,20 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": [2, "allow-null"], + "id-length": 0, + "no-invalid-this": "off", + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + }, + }, + ], +} diff --git a/node_modules/regexp.prototype.flags/.nycrc b/node_modules/regexp.prototype.flags/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/regexp.prototype.flags/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/regexp.prototype.flags/CHANGELOG.md b/node_modules/regexp.prototype.flags/CHANGELOG.md new file mode 100644 index 0000000..188507f --- /dev/null +++ b/node_modules/regexp.prototype.flags/CHANGELOG.md @@ -0,0 +1,224 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.5.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.5.1...v1.5.2) - 2024-02-11 + +### Commits + +- [Tests] increase coverage [`c692c88`](https://github.com/es-shims/RegExp.prototype.flags/commit/c692c88e073f6d17fc5b6b1c740ef1ecb433eb4b) +- [Dev Deps] use `hasown` instead of `has` [`fb5b350`](https://github.com/es-shims/RegExp.prototype.flags/commit/fb5b350122507e4bec68fb417a46f07d062caf77) +- [Dev Deps] update `aud`, `hasown`, `npmignore`, `tape` [`fd0ddd9`](https://github.com/es-shims/RegExp.prototype.flags/commit/fd0ddd9c837c0a8066de37a41eb4f83310f15a57) +- [Deps] update `call-bind`, `define-properties`, `set-function-name` [`ca53f66`](https://github.com/es-shims/RegExp.prototype.flags/commit/ca53f662549b2fbff61323a6d2aa9af15a6c836b) +- [Dev Deps] update `object-inspect`, `tape` [`4491680`](https://github.com/es-shims/RegExp.prototype.flags/commit/449168010d4d63a2cd854dcec9f37efacda19082) +- [Refactor] use `es-errors` [`1d03d22`](https://github.com/es-shims/RegExp.prototype.flags/commit/1d03d225327008aeb6b4b501a4720318d717621e) +- [Fix] properly check for a non-object receiver [`024d442`](https://github.com/es-shims/RegExp.prototype.flags/commit/024d4421edd8922f9acbac35afcfe69a8a3db6a9) +- [Deps] update `call-bind` [`f222ce0`](https://github.com/es-shims/RegExp.prototype.flags/commit/f222ce0925a7431d1d3dd113d803746f07e1175d) + +## [v1.5.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.5.0...v1.5.1) - 2023-09-12 + +### Commits + +- [Refactor] use `set-function-name` [`1384147`](https://github.com/es-shims/RegExp.prototype.flags/commit/13841474baf5700de8e3f65fae3670ad1b233483) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `available-regexp-flags`, `tape` [`07bf9a2`](https://github.com/es-shims/RegExp.prototype.flags/commit/07bf9a2c354cc41379b01fe5c383233adaaccf0e) +- [Dev Deps] add missing `npmignore` dep [`8ca9dfe`](https://github.com/es-shims/RegExp.prototype.flags/commit/8ca9dfe4da31ef74ee48a4dcf62692eebb8f8fdd) + +## [v1.5.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.3...v1.5.0) - 2023-04-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`f7438ad`](https://github.com/es-shims/RegExp.prototype.flags/commit/f7438ad3728128b99daaeb1d3133a40d906d3621) +- [New] add `unicodeSets`/`v` flag [`f922170`](https://github.com/es-shims/RegExp.prototype.flags/commit/f92217039c9c86a61421ce69594e93a546721397) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `available-regexp-flags`, `object-inspect`, `tape` [`1203078`](https://github.com/es-shims/RegExp.prototype.flags/commit/12030785e6beb1f06c406a4731714012d93867e2) +- [actions] update rebase action to use reusable workflow [`c562ea2`](https://github.com/es-shims/RegExp.prototype.flags/commit/c562ea20c27442ff30ce65091a313b5e49ae8515) +- [Dev Deps] update `aud`, `object-inspect`, `tape` [`f3ae811`](https://github.com/es-shims/RegExp.prototype.flags/commit/f3ae81109dd08b200dce8bd52c183bc44662c3b4) +- [Deps] update `define-properties`, `functions-have-names` [`2d0476e`](https://github.com/es-shims/RegExp.prototype.flags/commit/2d0476e5eba1e4a9b786f169f3be96c2f5a192b2) +- [Tests] use `for-each` instead of `foreach` [`d9f30da`](https://github.com/es-shims/RegExp.prototype.flags/commit/d9f30dab65ff0185a8688c6e62dc1fe650879cc0) +- [Deps] update `define-properties` [`81c1c20`](https://github.com/es-shims/RegExp.prototype.flags/commit/81c1c2012070c1f4480a9ab55bc0cff206152603) + +## [v1.4.3](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.2...v1.4.3) - 2022-04-14 + +### Commits + +- [Fix] when shimmed, name must be `get flags` [`fcefd00`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcefd0039177e9cbcb2ed842d353131ace7a3377) + +## [v1.4.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.1...v1.4.2) - 2022-04-12 + +### Commits + +- [Fix] ensure `hasIndices` is patched properly, and getter order is correct [`a1af45a`](https://github.com/es-shims/RegExp.prototype.flags/commit/a1af45a8a6f7305b097b83f96ee9fc45abb3e733) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`24f5a0c`](https://github.com/es-shims/RegExp.prototype.flags/commit/24f5a0c84f2e7d263ae0e2008def870afd6d5a4f) + +## [v1.4.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.0...v1.4.1) - 2022-01-13 + +### Commits + +- [Fix] `polyfill`: do not throw in a descriptorless environment [`e2d24e7`](https://github.com/es-shims/RegExp.prototype.flags/commit/e2d24e707a44d958a0b6d3a114effb2f2b475337) + +## [v1.4.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.2...v1.4.0) - 2022-01-13 + +### Commits + +- [Tests] use `available-regexp-flags` [`95af246`](https://github.com/es-shims/RegExp.prototype.flags/commit/95af2463f1373282087528f8566e20ffae26c3db) +- [New] add `hasIndices`/`d` flag [`89959ca`](https://github.com/es-shims/RegExp.prototype.flags/commit/89959ca1128ea48dcd0ec1416355264425fa3bc5) + +## [v1.3.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.1...v1.3.2) - 2022-01-13 + +### Commits + +- [actions] reuse common workflows [`6665b5d`](https://github.com/es-shims/RegExp.prototype.flags/commit/6665b5db7c45ce6b987d08ebaf6d2767eec95b94) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`babce94`](https://github.com/es-shims/RegExp.prototype.flags/commit/babce94b5ca96e93e74e384c0a01295943677a3f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `object-inspect`, `safe-publish-latest`, `tape` [`52132d9`](https://github.com/es-shims/RegExp.prototype.flags/commit/52132d9f3df904864d4cf3fd44892ee563aee524) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c16687c`](https://github.com/es-shims/RegExp.prototype.flags/commit/c16687c118d374d8997a8d885467507bf943b4bc) +- [actions] update codecov uploader [`0a3c904`](https://github.com/es-shims/RegExp.prototype.flags/commit/0a3c904a9fd1247b3b8e0fb6b451b3fbe97735bd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`3fce7f2`](https://github.com/es-shims/RegExp.prototype.flags/commit/3fce7f27c753440003675d03ae9a7ecfa6a74d30) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`75ca498`](https://github.com/es-shims/RegExp.prototype.flags/commit/75ca49889349fc42e51ea79b2ec7a1996fb3eb18) +- [actions] update workflows [`300f321`](https://github.com/es-shims/RegExp.prototype.flags/commit/300f321984526066656bec791f0bb3861b33cfbc) +- [meta] better `eccheck` command [`5f735ab`](https://github.com/es-shims/RegExp.prototype.flags/commit/5f735ab1b1c87dbd05c0096249160587f166cd51) +- [Dev Deps] update `eslint`, `tape` [`3059637`](https://github.com/es-shims/RegExp.prototype.flags/commit/3059637210eb5c9fa97160ec2f0aea1d1d724eb7) +- [actions] update workflows` [`dbd8ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/dbd8ab49fa2196dd74791107825c43e4481cdfd2) +- [meta] use `prepublishOnly` script for npm 7+ [`5cc8652`](https://github.com/es-shims/RegExp.prototype.flags/commit/5cc86524a41bf358b6701bcf46e480f0e3e470b4) +- [Fix] use polyfill, not implementation, in main export [`15ab4b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/15ab4b85f3904e48664e26394dc12765ed666da4) +- [meta] remove `audit-level` config, which breaks npm 7 installs [`1cb98ae`](https://github.com/es-shims/RegExp.prototype.flags/commit/1cb98aed731e73d11df5ed3b853b371d35a69f5a) + +## [v1.3.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.0...v1.3.1) - 2021-01-15 + +### Commits + +- [Tests] run `nyc` on all tests; use `tape` runner; add full es-shims test suite [`047a1e8`](https://github.com/es-shims/RegExp.prototype.flags/commit/047a1e8ff250220254b0e9598d962a56c8ec3ffc) +- [Tests] migrate tests to Github Actions [`e4e391f`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4e391fd3e6f057172994ad0c33ca128568c0b06) +- [meta] use `auto-changelog` for changelog [`afbcd06`](https://github.com/es-shims/RegExp.prototype.flags/commit/afbcd06402e97e975af797e2c1375e35e22e90f2) +- [actions] add Require Allow Edits workflow [`0db5d50`](https://github.com/es-shims/RegExp.prototype.flags/commit/0db5d50cdf59e3e5529024af4f8ce05829edc06d) +- [meta] do not publish github action workflow files [`53f2902`](https://github.com/es-shims/RegExp.prototype.flags/commit/53f29020e5a1f517e91b8cf226ed6bc97eadc090) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `aud` [`05f2a85`](https://github.com/es-shims/RegExp.prototype.flags/commit/05f2a851869069c7911176809028be8491465f86) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2a197b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a197b84916f094946c5cad56ef8e7bb7e8f12ac) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`e40bd37`](https://github.com/es-shims/RegExp.prototype.flags/commit/e40bd37de9bb756672832a6c994652965d09b9ae) +- [Refactor] use `call-bind` instead of `es-abstract` [`e6eac90`](https://github.com/es-shims/RegExp.prototype.flags/commit/e6eac9052ebdb4bc28cb83b5d3017a4ed74fe3f1) +- [Deps] update `es-abstract` [`f198075`](https://github.com/es-shims/RegExp.prototype.flags/commit/f198075d6fc075e0d98967af98a512742e6e7e4f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2d21727`](https://github.com/es-shims/RegExp.prototype.flags/commit/2d217275d78214b82c7f5cacca85ca2308df83f1) +- [Deps] update `es-abstract` [`7e7ddc6`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e7ddc66174256f6688a857b09c9a02bafcf4866) + +## [v1.3.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.2.0...v1.3.0) - 2019-12-14 + +### Commits + +- [Tests] remove `jscs` [`4a09ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a09ab467f62065a1718b0dcc50f7818b5400ab6) +- [Tests] use shared travis-ci configs [`8afa6a9`](https://github.com/es-shims/RegExp.prototype.flags/commit/8afa6a99fd35c19fb49ba630fd17159a5da2a34e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `has`, `tape` [`13a9fc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/13a9fc9d6bc2600681eb3f638668beccf80b843c) +- [Refactor] use `callBind` helper from `es-abstract` [`c3a3727`](https://github.com/es-shims/RegExp.prototype.flags/commit/c3a37276764d99c1e4f7e9467ad636fce8c92c58) +- [actions] add automatic rebasing / merge commit blocking [`51e3f93`](https://github.com/es-shims/RegExp.prototype.flags/commit/51e3f9366d15a07edaf532884948ce74b6827125) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`7e1ee50`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e1ee505df374867c2c04d500aa1c36265161b6f) +- [meta] add `funding` field [`c99cbec`](https://github.com/es-shims/RegExp.prototype.flags/commit/c99cbec1af9b0e0be42e82f164adacf2e1bdee16) +- [New] add `auto` entry point [`1e53e85`](https://github.com/es-shims/RegExp.prototype.flags/commit/1e53e854f663472e74dd0350e0c095df9c2b9c7b) +- [Tests] use `eclint` instead of `editorconfig-tools` [`8600bfe`](https://github.com/es-shims/RegExp.prototype.flags/commit/8600bfed42ab8d294463df482874c344fc079f82) +- [Deps] update `define-properties` [`ad221fa`](https://github.com/es-shims/RegExp.prototype.flags/commit/ad221fa2a26a9c2bc8d274b689cf7a626b58f4e9) + +## [v1.2.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.1...v1.2.0) - 2017-10-24 + +### Commits + +- [Tests] up to `node` `v8.8`, `v7.10`, `v6.11`, `v4.8`; improve matrix; use `nvm install-latest-npm` so new npm doesn’t break old node [`5a9653d`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a9653d1904eb8ad8baffe43cd065b6f36013e5a) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`; add `has` [`556de86`](https://github.com/es-shims/RegExp.prototype.flags/commit/556de8632bbe7a23279717f7d0b6ee841514fbe1) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`726772c`](https://github.com/es-shims/RegExp.prototype.flags/commit/726772c054a499ab7680823c4bd8fa9b048d9420) +- [New] add support for `dotAll` regex flag. [`fcbd64f`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcbd64f84fd974d98384bdb093bf25656eb72e8f) +- [Dev Deps] update `eslint`, `jscs`, `nsp`, `tape`, `@ljharb/eslint-config`, `@es-shims/api` [`0272934`](https://github.com/es-shims/RegExp.prototype.flags/commit/02729344addadc105b9c5e12d90cca85a75d16d6) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`e4cd264`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4cd264f4afa33ff865325b04791de95696e3ae4) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`baf5169`](https://github.com/es-shims/RegExp.prototype.flags/commit/baf51698ac00b31b6a4a6d5646a183a409ad1118) +- [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config` [`97cea15`](https://github.com/es-shims/RegExp.prototype.flags/commit/97cea152c20bb0e63e9c5111780f7b4af5d1a0e8) +- [Dev Deps] update `tape`, `discs`, `eslint`, `@ljharb/eslint-config` [`b6872f4`](https://github.com/es-shims/RegExp.prototype.flags/commit/b6872f44c833f6f7faf63881657208b6cd43ef49) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`14702cc`](https://github.com/es-shims/RegExp.prototype.flags/commit/14702ccd050029d4e6ea2e59d0912e6bfc16ffc0) +- [Dev Deps] update `jscs`, `@es-shims/api` [`cd060a6`](https://github.com/es-shims/RegExp.prototype.flags/commit/cd060a650db019be5244e1c1b77a29f6d79c89db) +- [Tests] up to `node` `v6.2`, `v5.11` [`14638bd`](https://github.com/es-shims/RegExp.prototype.flags/commit/14638bdbd62d6b6a7c89efb8ec57a7815032b4bb) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`b0a5ffb`](https://github.com/es-shims/RegExp.prototype.flags/commit/b0a5ffb25a76783053652e0d7f835e354f9b29b6) +- [Tests] npm run silently [`35804d4`](https://github.com/es-shims/RegExp.prototype.flags/commit/35804d45dd7f57faab923aaab914e6390813e700) +- [Tests] up to `node` `v5.9`, `v4.4` [`e0fe80d`](https://github.com/es-shims/RegExp.prototype.flags/commit/e0fe80d96783820444d6dea1e6b5739032a50c1b) +- [Tests] up to `node` `v5.7`, `v4.3` [`9739c42`](https://github.com/es-shims/RegExp.prototype.flags/commit/9739c422523571cc439d73a9ecaf5dc2e2643bec) +- [Dev Deps] update `jscs` [`4aa1699`](https://github.com/es-shims/RegExp.prototype.flags/commit/4aa1699a0582b7739f14c6cd8d5ae1a4515bd604) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `@ljharb/eslint-config` [`8bc5e6b`](https://github.com/es-shims/RegExp.prototype.flags/commit/8bc5e6ba5befc8f399e00f3c2d064519457fb57c) +- [Tests] fix npm upgrades on older nodes [`ae00bb9`](https://github.com/es-shims/RegExp.prototype.flags/commit/ae00bb9d979605f41fc598156b5c590923ac8184) +- Only apps should have lockfiles. [`6d14965`](https://github.com/es-shims/RegExp.prototype.flags/commit/6d1496550a962ea8525fb7b62dc4ac99d9513a6d) +- [Tests] use pretest/posttest for better organization [`0520cfd`](https://github.com/es-shims/RegExp.prototype.flags/commit/0520cfda23835fb5bff038a6e5cc530b0ce66985) +- [Tests] up to `node` `v5.5` [`810f62b`](https://github.com/es-shims/RegExp.prototype.flags/commit/810f62b6d2418e843b7c2c225841e9305dbc01ee) +- [Tests] on `node` `v5.3` [`f839662`](https://github.com/es-shims/RegExp.prototype.flags/commit/f839662887cbb1a5e472a9302185355b431c85c1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`78ecaa5`](https://github.com/es-shims/RegExp.prototype.flags/commit/78ecaa5b203a07f76505824f77ce1e5d60d8b0ca) +- [Tests] up to `node` `v5.2` [`c04d762`](https://github.com/es-shims/RegExp.prototype.flags/commit/c04d762a8c09ab544df14c14521f32dac3f67823) +- [Tests] up to `node` `v5.0` [`7c0d5b9`](https://github.com/es-shims/RegExp.prototype.flags/commit/7c0d5b944d9ba30f38227d0750109d582be254e2) +- [Tests] on `node` `v5.10` [`40ddafd`](https://github.com/es-shims/RegExp.prototype.flags/commit/40ddafd83e2e1c959ee8ba24cb296559f2545a0c) +- [Deps] update `define-properties` [`98ea89d`](https://github.com/es-shims/RegExp.prototype.flags/commit/98ea89dc9c41b81b84d4071105048687dab0660e) + +## [v1.1.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.0...v1.1.1) - 2015-08-16 + +### Commits + +- [Fix] cover the case where there is no descriptor on the prototype [`67014c3`](https://github.com/es-shims/RegExp.prototype.flags/commit/67014c35a93c76e28c4ab5cd3e5a54f7f40c2ddf) + +## [v1.1.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.1...v1.1.0) - 2015-08-16 + +### Commits + +- Update `jscs`, `eslint`; use my personal shared `eslint` config. [`37ca379`](https://github.com/es-shims/RegExp.prototype.flags/commit/37ca379bc72620fa6785b0a9ca791b160328c236) +- Update `eslint`, `tape`, `editorconfig-tools`, `nsp` [`cb92d6e`](https://github.com/es-shims/RegExp.prototype.flags/commit/cb92d6e8a8c1df5f00a226e11a78f38c6f7c3055) +- Implement the [es-shim API](es-shims/api). [`15eb821`](https://github.com/es-shims/RegExp.prototype.flags/commit/15eb821be2771e03a1341a08483513702118b45c) +- Refactoring to reduce complexity. [`aeb4785`](https://github.com/es-shims/RegExp.prototype.flags/commit/aeb47854f6b00355702104066c63f6eed38b5e81) +- Move implementation to `implementation.js` [`a698925`](https://github.com/es-shims/RegExp.prototype.flags/commit/a698925b4c1c78cd1ed4315b9deb5bb1707d5203) +- Update `eslint`, `jscs` [`277a4a1`](https://github.com/es-shims/RegExp.prototype.flags/commit/277a4a15e663eb823b63743b84645158b9bb9a43) +- Update `nsp`, `eslint` [`c9f3866`](https://github.com/es-shims/RegExp.prototype.flags/commit/c9f3866e25b52050f6bfe3fd0de8849de0271ea4) +- Update `tape`, `eslint` [`a08795b`](https://github.com/es-shims/RegExp.prototype.flags/commit/a08795b688b186fa5a2ec207358d81c16a07d30d) +- Make some things a bit more robust. [`450abb4`](https://github.com/es-shims/RegExp.prototype.flags/commit/450abb48974f10bfd2d9478e7ea1b9d87f004fb9) +- Update `eslint` [`25d898f`](https://github.com/es-shims/RegExp.prototype.flags/commit/25d898f62719b26fea5f9245be141103d4ec58cd) +- Test on latest two `io.js` versions. [`2e17ca3`](https://github.com/es-shims/RegExp.prototype.flags/commit/2e17ca304e12fb5071a091706a4d559b3eac968a) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`4a2a548`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a2a5480c50f30814000684462a8a3b44c87ae2e) +- Update `eslint` [`64df4e0`](https://github.com/es-shims/RegExp.prototype.flags/commit/64df4e0a2d0e2901b57652e30913db797dc0829b) +- Update `eslint` [`ac05ae5`](https://github.com/es-shims/RegExp.prototype.flags/commit/ac05ae509a4a70d107820a749ea6f02784fc41eb) +- Clean up `supportsDescriptors` check. [`e44d0de`](https://github.com/es-shims/RegExp.prototype.flags/commit/e44d0dec9c8415ff9a911b8806e1d245d6919a11) +- [Dev Deps] Update `jscs` [`8741758`](https://github.com/es-shims/RegExp.prototype.flags/commit/87417588f52f1176fc37d7c32221aa85f749aa34) +- Update `tape`, `jscs`, `nsp`, `eslint` [`db1f658`](https://github.com/es-shims/RegExp.prototype.flags/commit/db1f6584b18cc035ef3b5aec556f54e0ee8c639d) +- Test on `io.js` `v2.3` [`18c948f`](https://github.com/es-shims/RegExp.prototype.flags/commit/18c948f033c87ab2657a0395052cbec531c40900) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`c37e79f`](https://github.com/es-shims/RegExp.prototype.flags/commit/c37e79f380d87a226a6cdaa5f09f832f5dc21b7d) +- Update `tape`, `jscs`, `eslint` [`4b652bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/4b652bf5f2f0e36a15227d0b4048de91ee6c4433) +- [Dev Deps] Update `tape`, `eslint` [`29d4ac0`](https://github.com/es-shims/RegExp.prototype.flags/commit/29d4ac0bea16c6a9f611cb15baccd30449f30a91) +- Test up to `io.js` `v2.1` [`9f9e342`](https://github.com/es-shims/RegExp.prototype.flags/commit/9f9e34295ced1b288dea08e0a66dffd2bc03ff8b) +- Update `covert`, `jscs` [`c98f3b4`](https://github.com/es-shims/RegExp.prototype.flags/commit/c98f3b47f01f317e8a589486dfaee482c66b8b64) +- Update `jscs` [`9e5e220`](https://github.com/es-shims/RegExp.prototype.flags/commit/9e5e220be6ec5d5b9b658235287e35bded580b06) +- [Dev Deps] update `tape` [`cdd3af2`](https://github.com/es-shims/RegExp.prototype.flags/commit/cdd3af21507b01aa524f8b87f158dfc8a8153c85) +- [Dev Deps] update `tape` [`d42d0bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/d42d0bf28f8da2cb47fff49283a07a693f8cb626) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a5e7453`](https://github.com/es-shims/RegExp.prototype.flags/commit/a5e745375c01e9f90ff632c55a5b44b6ada38217) +- Update `tape` [`2a675ec`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a675ec707a9d89aea403d0b9a723ea531e50c2d) +- Test on `io.js` `v2.5` [`448cbdb`](https://github.com/es-shims/RegExp.prototype.flags/commit/448cbdb7df47e52677daea4e0c41e892ad8770e4) +- Test on `io.js` `v2.4` [`948e511`](https://github.com/es-shims/RegExp.prototype.flags/commit/948e51129c01147ffe4dedc3a7d4980128d0cf73) +- Test on `io.js` `v2.2` [`4793278`](https://github.com/es-shims/RegExp.prototype.flags/commit/4793278f5aca187e36b42b08fc1388d8021400e2) +- Update `eslint` [`0f463da`](https://github.com/es-shims/RegExp.prototype.flags/commit/0f463daa14a193ed94b16c46832074d63e861c91) +- Update `eslint` [`5a16967`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a16967db71bb8a24c81a27ee366f0b02b663e34) +- Test on `io.js` `v3.0` [`7ba8706`](https://github.com/es-shims/RegExp.prototype.flags/commit/7ba87064bc8520d34a9560bea8e366d70c93dbbb) +- Test on `iojs-v1.2` [`b521e09`](https://github.com/es-shims/RegExp.prototype.flags/commit/b521e099b7de48cfbdd6860265eb5e972d2859a5) + +## [v1.0.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.0...v1.0.1) - 2014-12-13 + +### Merged + +- Match the spec properly: throw when not an object; make getter generic. [`#3`](https://github.com/es-shims/RegExp.prototype.flags/pull/3) + +### Fixed + +- Match the spec properly [`#1`](https://github.com/es-shims/RegExp.prototype.flags/issues/1) + +### Commits + +- Speed up the “is object” check in case of `null` or `undefined` [`77137f9`](https://github.com/es-shims/RegExp.prototype.flags/commit/77137f99449c9b6583cdfda295a00b832dfd45f3) + +## v1.0.0 - 2014-12-10 + +### Commits + +- Adding dotfiles [`313812e`](https://github.com/es-shims/RegExp.prototype.flags/commit/313812e1d8ff42a13dbc8689f2e719324c46c9ca) +- Tests [`625a042`](https://github.com/es-shims/RegExp.prototype.flags/commit/625a042220a3152b49608fb6f187f67bff02b6fb) +- Add package.json [`8b98257`](https://github.com/es-shims/RegExp.prototype.flags/commit/8b98257f900d0a73c8eb3805b9b01999e05e880a) +- Adding the README [`884798b`](https://github.com/es-shims/RegExp.prototype.flags/commit/884798b710d5a85bc6d9a6879f509766e2e57c0e) +- Implementation. [`4186cc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/4186cc9d9a7533f78d88be976f0a8a2757604fc5) +- Adding LICENSE and CHANGELOG [`f87fa81`](https://github.com/es-shims/RegExp.prototype.flags/commit/f87fa8126cc6c39747fbe0dc6cb40ca0ff77fbbc) +- Fixing README URLs [`b821703`](https://github.com/es-shims/RegExp.prototype.flags/commit/b821703d5e5b01ee4f526f15c8e525645cf95ef7) +- Clean up dependencies; update `tape`, `jscs`, `nsp` [`0e13fc1`](https://github.com/es-shims/RegExp.prototype.flags/commit/0e13fc12df09f3a7ac30116ef13bba820c220730) +- Initial commit. [`8a9e35e`](https://github.com/es-shims/RegExp.prototype.flags/commit/8a9e35e15f65c9640e64ee14fab190a60993efaa) diff --git a/node_modules/regexp.prototype.flags/LICENSE b/node_modules/regexp.prototype.flags/LICENSE new file mode 100644 index 0000000..e5956a8 --- /dev/null +++ b/node_modules/regexp.prototype.flags/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (C) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/regexp.prototype.flags/README.md b/node_modules/regexp.prototype.flags/README.md new file mode 100644 index 0000000..77e151e --- /dev/null +++ b/node_modules/regexp.prototype.flags/README.md @@ -0,0 +1,54 @@ +RegExp.prototype.flags [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An ES6 spec-compliant `RegExp.prototype.flags` shim. Invoke its "shim" method to shim RegExp.prototype.flags if it is unavailable. +*Note*: `RegExp#flags` requires a true ES5 environment - specifically, one with ES5 getters. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags). + +Most common usage: +```js +var flags = require('regexp.prototype.flags'); + +assert(flags(/a/) === ''); +assert(flags(new RegExp('a') === ''); +assert(flags(/a/mig) === 'gim'); +assert(flags(new RegExp('a', 'mig')) === 'gim'); + +if (!RegExp.prototype.flags) { + flags.shim(); +} + +assert(flags(/a/) === /a/.flags); +assert(flags(new RegExp('a') === new RegExp('a').flags); +assert(flags(/a/mig) === /a/mig.flags); +assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/regexp.prototype.flags +[npm-version-svg]: http://versionbadg.es/es-shims/RegExp.prototype.flags.svg +[travis-svg]: https://travis-ci.org/es-shims/RegExp.prototype.flags.svg +[travis-url]: https://travis-ci.org/es-shims/RegExp.prototype.flags +[deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags.svg +[deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags +[dev-deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags#info=devDependencies +[testling-svg]: https://ci.testling.com/es-shims/RegExp.prototype.flags.png +[testling-url]: https://ci.testling.com/es-shims/RegExp.prototype.flags +[npm-badge-png]: https://nodei.co/npm/regexp.prototype.flags.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/regexp.prototype.flags.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/regexp.prototype.flags.svg +[downloads-url]: http://npm-stat.com/charts.html?package=regexp.prototype.flags diff --git a/node_modules/regexp.prototype.flags/auto.js b/node_modules/regexp.prototype.flags/auto.js new file mode 100644 index 0000000..8ebf606 --- /dev/null +++ b/node_modules/regexp.prototype.flags/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/regexp.prototype.flags/implementation.js b/node_modules/regexp.prototype.flags/implementation.js new file mode 100644 index 0000000..4005503 --- /dev/null +++ b/node_modules/regexp.prototype.flags/implementation.js @@ -0,0 +1,39 @@ +'use strict'; + +var setFunctionName = require('set-function-name'); +var $TypeError = require('es-errors/type'); + +var $Object = Object; + +module.exports = setFunctionName(function flags() { + if (this == null || this !== $Object(this)) { + throw new $TypeError('RegExp.prototype.flags getter called on non-object'); + } + var result = ''; + if (this.hasIndices) { + result += 'd'; + } + if (this.global) { + result += 'g'; + } + if (this.ignoreCase) { + result += 'i'; + } + if (this.multiline) { + result += 'm'; + } + if (this.dotAll) { + result += 's'; + } + if (this.unicode) { + result += 'u'; + } + if (this.unicodeSets) { + result += 'v'; + } + if (this.sticky) { + result += 'y'; + } + return result; +}, 'get flags', true); + diff --git a/node_modules/regexp.prototype.flags/index.js b/node_modules/regexp.prototype.flags/index.js new file mode 100644 index 0000000..d6054c7 --- /dev/null +++ b/node_modules/regexp.prototype.flags/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var flagsBound = callBind(getPolyfill()); + +define(flagsBound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = flagsBound; diff --git a/node_modules/regexp.prototype.flags/package.json b/node_modules/regexp.prototype.flags/package.json new file mode 100644 index 0000000..7fefe39 --- /dev/null +++ b/node_modules/regexp.prototype.flags/package.json @@ -0,0 +1,102 @@ +{ + "name": "regexp.prototype.flags", + "version": "1.5.2", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES6 spec-compliant RegExp.prototype.flags shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/RegExp.prototype.flags.git" + }, + "keywords": [ + "RegExp.prototype.flags", + "regex", + "regular expression", + "ES6", + "shim", + "flag", + "flags", + "regexp", + "RegExp#flags", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "available-regexp-flags": "^1.0.2", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "hasown": "^2.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/regexp.prototype.flags/polyfill.js b/node_modules/regexp.prototype.flags/polyfill.js new file mode 100644 index 0000000..2ea3dac --- /dev/null +++ b/node_modules/regexp.prototype.flags/polyfill.js @@ -0,0 +1,36 @@ +'use strict'; + +var implementation = require('./implementation'); + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var $gOPD = Object.getOwnPropertyDescriptor; + +module.exports = function getPolyfill() { + if (supportsDescriptors && (/a/mig).flags === 'gim') { + var descriptor = $gOPD(RegExp.prototype, 'flags'); + if ( + descriptor + && typeof descriptor.get === 'function' + && typeof RegExp.prototype.dotAll === 'boolean' + && typeof RegExp.prototype.hasIndices === 'boolean' + ) { + /* eslint getter-return: 0 */ + var calls = ''; + var o = {}; + Object.defineProperty(o, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(o, 'sticky', { + get: function () { + calls += 'y'; + } + }); + if (calls === 'dy') { + return descriptor.get; + } + } + } + return implementation; +}; diff --git a/node_modules/regexp.prototype.flags/shim.js b/node_modules/regexp.prototype.flags/shim.js new file mode 100644 index 0000000..3ec77c1 --- /dev/null +++ b/node_modules/regexp.prototype.flags/shim.js @@ -0,0 +1,26 @@ +'use strict'; + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var getPolyfill = require('./polyfill'); +var gOPD = Object.getOwnPropertyDescriptor; +var defineProperty = Object.defineProperty; +var TypeErr = TypeError; +var getProto = Object.getPrototypeOf; +var regex = /a/; + +module.exports = function shimFlags() { + if (!supportsDescriptors || !getProto) { + throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); + } + var polyfill = getPolyfill(); + var proto = getProto(regex); + var descriptor = gOPD(proto, 'flags'); + if (!descriptor || descriptor.get !== polyfill) { + defineProperty(proto, 'flags', { + configurable: true, + enumerable: false, + get: polyfill + }); + } + return polyfill; +}; diff --git a/node_modules/regexp.prototype.flags/test/implementation.js b/node_modules/regexp.prototype.flags/test/implementation.js new file mode 100644 index 0000000..1e3a714 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var flags = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { flags.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(flags), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/index.js b/node_modules/regexp.prototype.flags/test/index.js new file mode 100644 index 0000000..10d1071 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var flags = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { flags(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(flags, t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/shimmed.js b/node_modules/regexp.prototype.flags/test/shimmed.js new file mode 100644 index 0000000..059e0e1 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/shimmed.js @@ -0,0 +1,48 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); +var hasStrictMode = require('has-strict-mode')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'); + + t.equal(descriptor.get.length, 0, 'RegExp#flags getter has a length of 0'); + + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(descriptor.get.name, functionsHaveConfigurableNames ? 'get flags' : 'flags', 'RegExp#flags getter has name "get flags" (or "flags" if function names are not configurable)'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(RegExp.prototype, 'flags'), 'RegExp#flags is not enumerable'); + et.end(); + }); + + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + st['throws'](function () { return descriptor.get.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return descriptor.get.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + t.test('has the correct descriptor', function (st) { + st.equal(descriptor.configurable, true); + st.equal(descriptor.enumerable, false); + st.equal(typeof descriptor.get, 'function'); + st.equal(descriptor.set, undefined); + st.end(); + }); + + runTests(callBind(descriptor.get), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/tests.js b/node_modules/regexp.prototype.flags/test/tests.js new file mode 100644 index 0000000..fbe4194 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/tests.js @@ -0,0 +1,143 @@ +'use strict'; + +var hasOwn = require('hasown'); +var inspect = require('object-inspect'); +var supportsDescriptors = require('define-properties').supportsDescriptors; +var v = require('es-value-fixtures'); + +var forEach = require('for-each'); +var availableFlags = require('available-regexp-flags'); +var regexProperties = require('available-regexp-flags/properties'); + +var sortedFlags = availableFlags.slice().sort(function (a, b) { return a.localeCompare(b); }).join(''); + +var getRegexLiteral = function (stringRegex) { + try { + // eslint-disable-next-line no-new-func + return Function('return ' + stringRegex + ';')(); + } catch (e) { /**/ } + return null; +}; + +module.exports = function runTests(flags, t) { + forEach(v.primitives, function (nonObject) { + t['throws']( + function () { flags(nonObject); }, + TypeError, + 'throws when called with a non-object receiver: ' + inspect(nonObject) + ); + }); + + t.equal(flags(/a/g), 'g', 'flags(/a/g) !== "g"'); + t.equal(flags(/a/gmi), 'gim', 'flags(/a/gmi) !== "gim"'); + t.equal(flags(new RegExp('a', 'gmi')), 'gim', 'flags(new RegExp("a", "gmi")) !== "gim"'); + t.equal(flags(/a/), '', 'flags(/a/) !== ""'); + t.equal(flags(new RegExp('a')), '', 'flags(new RegExp("a")) !== ""'); + + forEach(availableFlags, function (flag) { + var property = regexProperties[flag]; + t.test(property + ' flag', function (st) { + st.equal(flags(getRegexLiteral('/a/' + flag)), flag, 'flags(/a/' + flag + ') !== ' + inspect(flag)); + st.equal(flags(new RegExp('a', flag)), flag, 'flags(new RegExp("a", ' + inspect(flag) + ')) !== ' + inspect(flag)); + st.end(); + }); + }); + + t.test('sorting', function (st) { + st.equal(flags(/a/gim), 'gim', 'flags(/a/gim) !== "gim"'); + st.equal(flags(/a/mig), 'gim', 'flags(/a/mig) !== "gim"'); + st.equal(flags(/a/mgi), 'gim', 'flags(/a/mgi) !== "gim"'); + if (hasOwn(RegExp.prototype, 'sticky')) { + st.equal(flags(getRegexLiteral('/a/gyim')), 'gimy', 'flags(/a/gyim) !== "gimy"'); + } + if (hasOwn(RegExp.prototype, 'unicode')) { + st.equal(flags(getRegexLiteral('/a/ugmi')), 'gimu', 'flags(/a/ugmi) !== "gimu"'); + } + if (hasOwn(RegExp.prototype, 'dotAll')) { + st.equal(flags(getRegexLiteral('/a/sgmi')), 'gims', 'flags(/a/sgmi) !== "gims"'); + } + + var randomFlags = availableFlags.slice().sort(function () { return Math.random() > 0.5 ? 1 : -1; }).join('').replace('v', ''); + st.equal( + flags(getRegexLiteral('/a/' + randomFlags)), + sortedFlags.replace('v', ''), + 'random: flags(/a/' + randomFlags + ') === ' + inspect(sortedFlags) + ); + + st.end(); + }); + + t.test('basic examples', function (st) { + st.equal(flags(/a/g), 'g', '(/a/g).flags !== "g"'); + st.equal(flags(/a/gmi), 'gim', '(/a/gmi).flags !== "gim"'); + st.equal(flags(new RegExp('a', 'gmi')), 'gim', 'new RegExp("a", "gmi").flags !== "gim"'); + st.equal(flags(/a/), '', '(/a/).flags !== ""'); + st.equal(flags(new RegExp('a')), '', 'new RegExp("a").flags !== ""'); + + st.end(); + }); + + t.test('generic flags', function (st) { + st.equal(flags({}), ''); + st.equal(flags({ ignoreCase: true }), 'i'); + st.equal(flags({ dotAll: 1, global: 0, sticky: 1, unicode: 1 }), 'suy'); + st.equal(flags({ __proto__: { multiline: true } }), 'm'); + + var obj = {}; + forEach(availableFlags, function (flag) { + if (flag !== 'v') { + obj[regexProperties[flag]] = true; + } + }); + st.equal(flags(obj), sortedFlags.replace('v', ''), 'an object with every available flag: ' + sortedFlags); + + st.end(); + }); + + t.test('getters', { skip: !supportsDescriptors }, function (st) { + /* eslint getter-return: 0 */ + var calls = ''; + var re = {}; + Object.defineProperty(re, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(re, 'global', { + get: function () { + calls += 'g'; + } + }); + Object.defineProperty(re, 'ignoreCase', { + get: function () { + calls += 'i'; + } + }); + Object.defineProperty(re, 'multiline', { + get: function () { + calls += 'm'; + } + }); + Object.defineProperty(re, 'dotAll', { + get: function () { + calls += 's'; + } + }); + Object.defineProperty(re, 'unicode', { + get: function () { + calls += 'u'; + } + }); + Object.defineProperty(re, 'sticky', { + get: function () { + calls += 'y'; + } + }); + + flags(re); + + st.equal(calls, 'dgimsuy', 'getters are called in expected order'); + + st.end(); + }); +}; diff --git a/node_modules/remove-trailing-separator/history.md b/node_modules/remove-trailing-separator/history.md new file mode 100644 index 0000000..e15e8a4 --- /dev/null +++ b/node_modules/remove-trailing-separator/history.md @@ -0,0 +1,17 @@ +## History + +### 1.1.0 - 16th Aug 2017 + +- [f4576e3](https://github.com/darsain/remove-trailing-separator/commit/f4576e3638c39b794998b533fffb27854dcbee01) Implement faster slash slicing + +### 1.0.2 - 07th Jun 2017 + +- [8e13ecb](https://github.com/darsain/remove-trailing-separator/commit/8e13ecbfd7b9f5fdf97c5d5ff923e4718b874e31) ES5 compatibility + +### 1.0.1 - 25th Sep 2016 + +- [b78606d](https://github.com/darsain/remove-trailing-separator/commit/af90b4e153a4527894741af6c7005acaeb78606d) Remove backslash only on win32 systems + +### 1.0.0 - 24th Sep 2016 + +Initial release. diff --git a/node_modules/remove-trailing-separator/index.js b/node_modules/remove-trailing-separator/index.js new file mode 100644 index 0000000..512306b --- /dev/null +++ b/node_modules/remove-trailing-separator/index.js @@ -0,0 +1,17 @@ +var isWin = process.platform === 'win32'; + +module.exports = function (str) { + var i = str.length - 1; + if (i < 2) { + return str; + } + while (isSeparator(str, i)) { + i--; + } + return str.substr(0, i + 1); +}; + +function isSeparator(str, i) { + var char = str[i]; + return i > 0 && (char === '/' || (isWin && char === '\\')); +} diff --git a/node_modules/remove-trailing-separator/license b/node_modules/remove-trailing-separator/license new file mode 100644 index 0000000..a169aff --- /dev/null +++ b/node_modules/remove-trailing-separator/license @@ -0,0 +1,3 @@ +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/remove-trailing-separator/package.json b/node_modules/remove-trailing-separator/package.json new file mode 100644 index 0000000..47ef27a --- /dev/null +++ b/node_modules/remove-trailing-separator/package.json @@ -0,0 +1,37 @@ +{ + "name": "remove-trailing-separator", + "version": "1.1.0", + "description": "Removes separators from the end of the string.", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "xo", + "pretest": "npm run lint", + "test": "nyc ava", + "report": "nyc report --reporter=html" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/darsain/remove-trailing-separator.git" + }, + "keywords": [ + "remove", + "strip", + "trailing", + "separator" + ], + "author": "darsain", + "license": "ISC", + "bugs": { + "url": "https://github.com/darsain/remove-trailing-separator/issues" + }, + "homepage": "https://github.com/darsain/remove-trailing-separator#readme", + "devDependencies": { + "ava": "^0.16.0", + "coveralls": "^2.11.14", + "nyc": "^8.3.0", + "xo": "^0.16.0" + } +} diff --git a/node_modules/remove-trailing-separator/readme.md b/node_modules/remove-trailing-separator/readme.md new file mode 100644 index 0000000..747086a --- /dev/null +++ b/node_modules/remove-trailing-separator/readme.md @@ -0,0 +1,51 @@ +# remove-trailing-separator + +[![NPM version][npm-img]][npm-url] [![Build Status: Linux][travis-img]][travis-url] [![Build Status: Windows][appveyor-img]][appveyor-url] [![Coverage Status][coveralls-img]][coveralls-url] + +Removes all separators from the end of a string. + +## Install + +``` +npm install remove-trailing-separator +``` + +## Examples + +```js +const removeTrailingSeparator = require('remove-trailing-separator'); + +removeTrailingSeparator('/foo/bar/') // '/foo/bar' +removeTrailingSeparator('/foo/bar///') // '/foo/bar' + +// leaves only/last separator +removeTrailingSeparator('/') // '/' +removeTrailingSeparator('///') // '/' + +// returns empty string +removeTrailingSeparator('') // '' +``` + +## Notable backslash, or win32 separator behavior + +`\` is considered a separator only on WIN32 systems. All POSIX compliant systems +see backslash as a valid file name character, so it would break POSIX compliance +to remove it there. + +In practice, this means that this code will return different things depending on +what system it runs on: + +```js +removeTrailingSeparator('\\foo\\') +// UNIX => '\\foo\\' +// WIN32 => '\\foo' +``` + +[npm-url]: https://npmjs.org/package/remove-trailing-separator +[npm-img]: https://badge.fury.io/js/remove-trailing-separator.svg +[travis-url]: https://travis-ci.org/darsain/remove-trailing-separator +[travis-img]: https://travis-ci.org/darsain/remove-trailing-separator.svg?branch=master +[appveyor-url]: https://ci.appveyor.com/project/darsain/remove-trailing-separator/branch/master +[appveyor-img]: https://ci.appveyor.com/api/projects/status/wvg9a93rrq95n2xl/branch/master?svg=true +[coveralls-url]: https://coveralls.io/github/darsain/remove-trailing-separator?branch=master +[coveralls-img]: https://coveralls.io/repos/github/darsain/remove-trailing-separator/badge.svg?branch=master diff --git a/node_modules/repeat-element/LICENSE b/node_modules/repeat-element/LICENSE new file mode 100644 index 0000000..7cccaf9 --- /dev/null +++ b/node_modules/repeat-element/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/repeat-element/README.md b/node_modules/repeat-element/README.md new file mode 100644 index 0000000..6006418 --- /dev/null +++ b/node_modules/repeat-element/README.md @@ -0,0 +1,99 @@ +# repeat-element [![NPM version](https://img.shields.io/npm/v/repeat-element.svg?style=flat)](https://www.npmjs.com/package/repeat-element) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-element.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-element) + +> Create an array by repeating the given value n times. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-element +``` + +## Usage + +```js +const repeat = require('repeat-element'); + +repeat('a', 5); +//=> ['a', 'a', 'a', 'a', 'a'] + +repeat('a', 1); +//=> ['a'] + +repeat('a', 0); +//=> [] + +repeat(null, 5) +//» [ null, null, null, null, null ] + +repeat({some: 'object'}, 5) +//» [ { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' } ] + +repeat(5, 5) +//» [ 5, 5, 5, 5, 5 ] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [LinusU](https://github.com/LinusU) | +| 1 | [architectcodes](https://github.com/architectcodes) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 19, 2018._ \ No newline at end of file diff --git a/node_modules/repeat-element/index.js b/node_modules/repeat-element/index.js new file mode 100644 index 0000000..dde8a27 --- /dev/null +++ b/node_modules/repeat-element/index.js @@ -0,0 +1,22 @@ +/*! + * repeat-element + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +module.exports = function repeat(ele, num) { + if (Array.prototype.fill) { + return new Array(num).fill(ele); + } + + var arr = new Array(num); + + for (var i = 0; i < num; i++) { + arr[i] = ele; + } + + return arr; +}; diff --git a/node_modules/repeat-element/package.json b/node_modules/repeat-element/package.json new file mode 100644 index 0000000..537055f --- /dev/null +++ b/node_modules/repeat-element/package.json @@ -0,0 +1,49 @@ +{ + "name": "repeat-element", + "description": "Create an array by repeating the given value n times.", + "version": "1.1.4", + "homepage": "https://github.com/jonschlinkert/repeat-element", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/repeat-element", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-element/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.4.1", + "glob": "^7.1.2", + "gulp-format-md": "^1.0.0", + "minimist": "^1.2.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "array", + "element", + "repeat", + "string" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/repeat-string/LICENSE b/node_modules/repeat-string/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/repeat-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/repeat-string/README.md b/node_modules/repeat-string/README.md new file mode 100644 index 0000000..aaa5e91 --- /dev/null +++ b/node_modules/repeat-string/README.md @@ -0,0 +1,136 @@ +# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg?style=flat)](https://www.npmjs.com/package/repeat-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-string) + +> Repeat the given string n times. Fastest implementation for repeating a string. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-string +``` + +## Usage + +### [repeat](index.js#L41) + +Repeat the given `string` the specified `number` of times. + +**Example:** + +**Example** + +```js +var repeat = require('repeat-string'); +repeat('A', 5); +//=> AAAAA +``` + +**Params** + +* `string` **{String}**: The string to repeat +* `number` **{Number}**: The number of times to repeat the string +* `returns` **{String}**: Repeated string + +## Benchmarks + +Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): + +```sh +# 2x +repeat-string █████████████████████████ (26,953,977 ops/sec) +repeating █████████ (9,855,695 ops/sec) +native ██████████████████ (19,453,895 ops/sec) + +# 3x +repeat-string █████████████████████████ (19,445,252 ops/sec) +repeating ███████████ (8,661,565 ops/sec) +native ████████████████████ (16,020,598 ops/sec) + +# 10x +repeat-string █████████████████████████ (23,792,521 ops/sec) +repeating █████████ (8,571,332 ops/sec) +native ███████████████ (14,582,955 ops/sec) + +# 50x +repeat-string █████████████████████████ (23,640,179 ops/sec) +repeating █████ (5,505,509 ops/sec) +native ██████████ (10,085,557 ops/sec) + +# 250x +repeat-string █████████████████████████ (23,489,618 ops/sec) +repeating ████ (3,962,937 ops/sec) +native ████████ (7,724,892 ops/sec) + +# 2000x +repeat-string █████████████████████████ (20,315,172 ops/sec) +repeating ████ (3,297,079 ops/sec) +native ███████ (6,203,331 ops/sec) + +# 20000x +repeat-string █████████████████████████ (23,382,915 ops/sec) +repeating ███ (2,980,058 ops/sec) +native █████ (5,578,808 ops/sec) +``` + +**Run the benchmarks** + +Install dev dependencies: + +```sh +npm i -d && node benchmark +``` + +## About + +### Related projects + +[repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 51 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [LinusU](https://github.com/LinusU) | +| 2 | [tbusser](https://github.com/tbusser) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wooorm](https://github.com/wooorm) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](http://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 23, 2016._ \ No newline at end of file diff --git a/node_modules/repeat-string/index.js b/node_modules/repeat-string/index.js new file mode 100644 index 0000000..4459afd --- /dev/null +++ b/node_modules/repeat-string/index.js @@ -0,0 +1,70 @@ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +module.exports = repeat; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat(str, num) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } else if (res.length >= max) { + return res.substr(0, max); + } + + while (max > res.length && num > 1) { + if (num & 1) { + res += str; + } + + num >>= 1; + str += str; + } + + res += str; + res = res.substr(0, max); + return res; +} diff --git a/node_modules/repeat-string/package.json b/node_modules/repeat-string/package.json new file mode 100644 index 0000000..09f8892 --- /dev/null +++ b/node_modules/repeat-string/package.json @@ -0,0 +1,77 @@ +{ + "name": "repeat-string", + "description": "Repeat the given string n times. Fastest implementation for repeating a string.", + "version": "1.6.1", + "homepage": "https://github.com/jonschlinkert/repeat-string", + "author": "Jon Schlinkert (http://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://github.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Linus Unnebäck (http://linus.unnebäck.se)", + "Thijs Busser (http://tbusser.net)", + "Titus (wooorm.com)" + ], + "repository": "jonschlinkert/repeat-string", + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-string/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^0.2.5", + "gulp-format-md": "^0.1.11", + "isobject": "^2.1.0", + "mocha": "^3.1.2", + "repeating": "^3.0.0", + "text-table": "^0.2.0", + "yargs-parser": "^4.0.2" + }, + "keywords": [ + "fast", + "fastest", + "fill", + "left", + "left-pad", + "multiple", + "pad", + "padding", + "repeat", + "repeating", + "repetition", + "right", + "right-pad", + "string", + "times" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "repeat-element" + ] + }, + "helpers": [ + "./benchmark/helper.js" + ], + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/resolve-url/.jshintrc b/node_modules/resolve-url/.jshintrc new file mode 100644 index 0000000..8703acd --- /dev/null +++ b/node_modules/resolve-url/.jshintrc @@ -0,0 +1,44 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": false, + "eqeqeq": true, + "es3": true, + "forin": true, + "immed": false, + "indent": false, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "noempty": true, + "nonew": false, + "plusplus": false, + "quotmark": false, + "undef": true, + "unused": "vars", + "strict": false, + "trailing": true, + "maxparams": 5, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": 100, + + "asi": true, + "expr": true, + "globalstrict": true, + "smarttabs": true, + "sub": true, + + "node": true, + "browser": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} diff --git a/node_modules/resolve-url/LICENSE b/node_modules/resolve-url/LICENSE new file mode 100644 index 0000000..0595be3 --- /dev/null +++ b/node_modules/resolve-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/resolve-url/bower.json b/node_modules/resolve-url/bower.json new file mode 100644 index 0000000..31aa6f4 --- /dev/null +++ b/node_modules/resolve-url/bower.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "authors": ["Simon Lydell"], + "license": "MIT", + "main": "resolve-url.js", + "keywords": [ + "resolve", + "url" + ], + "ignore": [ + ".*" + ] +} diff --git a/node_modules/resolve-url/changelog.md b/node_modules/resolve-url/changelog.md new file mode 100644 index 0000000..2a4a630 --- /dev/null +++ b/node_modules/resolve-url/changelog.md @@ -0,0 +1,15 @@ +### Version 0.2.1 (2014-02-25) ### + +- Fix edge case when (accidentally) supplying only one argument, and that + argument happens to be a falsy value such as `undefined` or `null`. + + +### Version 0.2.0 (2014-02-24) ### + +- Disallow passing 0 arguments. It’s weird and inconsistent between browsers. + (Backwards incompatible change.) + + +### Version 0.1.0 (2014-02-23) ### + +- Initial release. diff --git a/node_modules/resolve-url/component.json b/node_modules/resolve-url/component.json new file mode 100644 index 0000000..f37cf00 --- /dev/null +++ b/node_modules/resolve-url/component.json @@ -0,0 +1,15 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "license": "MIT", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "main": "resolve-url.js", + "repo": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": [ + "resolve-url.js" + ] +} diff --git a/node_modules/resolve-url/package.json b/node_modules/resolve-url/package.json new file mode 100644 index 0000000..9442366 --- /dev/null +++ b/node_modules/resolve-url/package.json @@ -0,0 +1,34 @@ +{ + "name": "resolve-url", + "version": "0.2.1", + "description": "Like Node.js’ `path.resolve`/`url.resolve` for the browser.", + "author": "Simon Lydell", + "license": "MIT", + "main": "resolve-url.js", + "repository": "lydell/resolve-url", + "keywords": [ + "resolve", + "url" + ], + "scripts": { + "test": "jshint resolve-url.js test/ && testling -u" + }, + "devDependencies": { + "testling": "~1.6.0", + "jshint": "~2.4.3", + "tape": "~2.5.0" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest", + "opera/12", + "opera/latest", + "safari/5", + "iphone/6", + "android-browser/4" + ] + } +} diff --git a/node_modules/resolve-url/readme.md b/node_modules/resolve-url/readme.md new file mode 100644 index 0000000..1f864e8 --- /dev/null +++ b/node_modules/resolve-url/readme.md @@ -0,0 +1,83 @@ +Overview +======== + +[![browser support](https://ci.testling.com/lydell/resolve-url.png)](https://ci.testling.com/lydell/resolve-url) + +Like Node.js’ [`path.resolve`]/[`url.resolve`] for the browser. + +```js +var resolveUrl = require("resolve-url") + +window.location +// https://example.com/articles/resolving-urls/edit + +resolveUrl("remove") +// https://example.com/articles/resolving-urls/remove + +resolveUrl("/static/scripts/app.js") +// https://example.com/static/scripts/app.js + +// Imagine /static/scripts/app.js contains `//# sourceMappingURL=../source-maps/app.js.map` +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map") +// https://example.com/static/source-maps/app.js.map + +resolveUrl("/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee") +// https://example.com/static/coffee/app.coffee + +resolveUrl("//cdn.example.com/jquery.js") +// https://cdn.example.com/jquery.js + +resolveUrl("http://foo.org/") +// http://foo.org/ +``` + + +Installation +============ + +- `npm install resolve-url` +- `bower install resolve-url` +- `component install lydell/resolve-url` + +Works with CommonJS, AMD and browser globals, through UMD. + + +Usage +===== + +### `resolveUrl(...urls)` ### + +Pass one or more urls. Resolves the last one to an absolute url, using the +previous ones and `window.location`. + +It’s like starting out on `window.location`, and then clicking links with the +urls as `href` attributes in order, from left to right. + +Unlike Node.js’ [`path.resolve`], this function always goes through all of the +arguments, from left to right. `path.resolve` goes from right to left and only +in the worst case goes through them all. Should that matter. + +Actually, the function is _really_ like clicking a lot of links in series: An +actual `` gets its `href` attribute set for each url! This means that the +url resolution of the browser is used, which makes this module really +light-weight. + +Also note that this functions deals with urls, not paths, so in that respect it +has more in common with Node.js’ [`url.resolve`]. But the arguments are more +like [`path.resolve`]. + +[`path.resolve`]: http://nodejs.org/api/path.html#path_path_resolve_from_to +[`url.resolve`]: http://nodejs.org/api/url.html#url_url_resolve_from_to + + +Tests +===== + +Run `npm test`, which lints the code and then gives you a link to open in a +browser of choice (using `testling`). + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/node_modules/resolve-url/resolve-url.js b/node_modules/resolve-url/resolve-url.js new file mode 100644 index 0000000..dc5c5b7 --- /dev/null +++ b/node_modules/resolve-url/resolve-url.js @@ -0,0 +1,47 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (typeof exports === "object") { + module.exports = factory() + } else { + root.resolveUrl = factory() + } +}(this, function() { + + function resolveUrl(/* ...urls */) { + var numUrls = arguments.length + + if (numUrls === 0) { + throw new Error("resolveUrl requires at least one argument; got none.") + } + + var base = document.createElement("base") + base.href = arguments[0] + + if (numUrls === 1) { + return base.href + } + + var head = document.getElementsByTagName("head")[0] + head.insertBefore(base, head.firstChild) + + var a = document.createElement("a") + var resolved + + for (var index = 1; index < numUrls; index++) { + a.href = arguments[index] + resolved = a.href + base.href = resolved + } + + head.removeChild(base) + + return resolved + } + + return resolveUrl + +})); diff --git a/node_modules/resolve-url/test/resolve-url.js b/node_modules/resolve-url/test/resolve-url.js new file mode 100644 index 0000000..7f135a7 --- /dev/null +++ b/node_modules/resolve-url/test/resolve-url.js @@ -0,0 +1,70 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var test = require("tape") + +var resolveUrl = require("../") + +"use strict" + +test("resolveUrl", function(t) { + + t.plan(7) + + t.equal(typeof resolveUrl, "function", "is a function") + + t.equal( + resolveUrl("https://example.com/"), + "https://example.com/" + ) + + var loc = "https://example.com/articles/resolving-urls/edit" + + t.equal( + resolveUrl(loc, "remove"), + "https://example.com/articles/resolving-urls/remove" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js"), + "https://example.com/static/scripts/app.js" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map"), + "https://example.com/static/source-maps/app.js.map" + ) + + t.equal( + resolveUrl(loc, "/static/scripts/app.js", "../source-maps/app.js.map", "../coffee/app.coffee"), + "https://example.com/static/coffee/app.coffee" + ) + + t.equal( + resolveUrl(loc, "//cdn.example.com/jquery.js"), + "https://cdn.example.com/jquery.js" + ) + +}) + +test("edge cases", function(t) { + + t.plan(4) + + t["throws"](resolveUrl, /at least one argument/, "throws with no arguments") + + var accidentallyUndefined + var result + t.doesNotThrow( + function() { result = resolveUrl(accidentallyUndefined) }, + "undefined is still an argument" + ) + t.ok(result.match(/\/undefined$/), "undefined is stringified") + + t.equal( + resolveUrl("http://foo.org/test", undefined, {}, ["a/b"], null), + "http://foo.org/a/null", + "arguments are stringified" + ) + +}) diff --git a/node_modules/resolve/.editorconfig b/node_modules/resolve/.editorconfig new file mode 100644 index 0000000..d63f0bb --- /dev/null +++ b/node_modules/resolve/.editorconfig @@ -0,0 +1,37 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 200 + +[*.js] +block_comment_start = /* +block_comment = * +block_comment_end = */ + +[*.yml] +indent_size = 1 + +[package.json] +indent_style = tab + +[lib/core.json] +indent_style = tab + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[{*.json,Makefile}] +max_line_length = off + +[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*] +indent_style = off +indent_size = off +max_line_length = off +insert_final_newline = off diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc new file mode 100644 index 0000000..ad05dd8 --- /dev/null +++ b/node_modules/resolve/.eslintrc @@ -0,0 +1,65 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "dot-notation": [2, { "allowKeywords": true }], + "func-name-matching": 0, + "func-style": 0, + "global-require": 1, + "id-length": [2, { "min": 1, "max": 40 }], + "max-lines": [2, 350], + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-shadow": 0, + "no-use-before-define": 0, + "sort-keys": 0, + }, + "overrides": [ + { + "files": "bin/**", + "rules": { + "no-process-exit": "off", + }, + }, + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, + { + "files": "test/resolver/nested_symlinks/mylib/*.js", + "rules": { + "no-throw-literal": 0, + }, + }, + { + "files": "test/**", + "parserOptions": { + "ecmaVersion": 5, + "allowReserved": false, + }, + "rules": { + "dot-notation": [2, { "allowPattern": "throws" }], + "max-lines": 0, + "max-lines-per-function": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + }, + }, + ], + + "ignorePatterns": [ + "./test/resolver/malformed_package_json/package.json", + ], +} diff --git a/node_modules/resolve/.github/FUNDING.yml b/node_modules/resolve/.github/FUNDING.yml new file mode 100644 index 0000000..d9c0595 --- /dev/null +++ b/node_modules/resolve/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/resolve +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE new file mode 100644 index 0000000..ff4fce2 --- /dev/null +++ b/node_modules/resolve/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/resolve/SECURITY.md b/node_modules/resolve/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/resolve/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/resolve/async.js b/node_modules/resolve/async.js new file mode 100644 index 0000000..f38c581 --- /dev/null +++ b/node_modules/resolve/async.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/async'); diff --git a/node_modules/resolve/bin/resolve b/node_modules/resolve/bin/resolve new file mode 100644 index 0000000..21d1a87 --- /dev/null +++ b/node_modules/resolve/bin/resolve @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +if ( + String(process.env.npm_lifecycle_script).slice(0, 8) !== 'resolve ' + && ( + !process.argv + || process.argv.length < 2 + || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino) + || (process.env.npm_lifecycle_event !== 'npx' && process.env._ && fs.realpathSync(path.resolve(process.env._)) !== __filename) + ) +) { + console.error('Error: `resolve` must be run directly as an executable'); + process.exit(1); +} + +var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag'); + +var preserveSymlinks = false; +for (var i = 2; i < process.argv.length; i += 1) { + if (process.argv[i].slice(0, 2) === '--') { + if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') { + preserveSymlinks = true; + } else if (process.argv[i].length > 2) { + console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, '')); + process.exit(2); + } + process.argv.splice(i, 1); + i -= 1; + if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax + } +} + +if (process.argv.length < 3) { + console.error('Error: `resolve` expects a specifier'); + process.exit(2); +} + +var resolve = require('../'); + +var result = resolve.sync(process.argv[2], { + basedir: process.cwd(), + preserveSymlinks: preserveSymlinks +}); + +console.log(result); diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js new file mode 100644 index 0000000..20e65dc --- /dev/null +++ b/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js new file mode 100644 index 0000000..54b2cc1 --- /dev/null +++ b/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js new file mode 100644 index 0000000..125d814 --- /dev/null +++ b/node_modules/resolve/index.js @@ -0,0 +1,6 @@ +var async = require('./lib/async'); +async.core = require('./lib/core'); +async.isCore = require('./lib/is-core'); +async.sync = require('./lib/sync'); + +module.exports = async; diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js new file mode 100644 index 0000000..60d2555 --- /dev/null +++ b/node_modules/resolve/lib/async.js @@ -0,0 +1,329 @@ +var fs = require('fs'); +var getHomedir = require('./homedir'); +var path = require('path'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); +var isCore = require('is-core-module'); + +var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultIsDir = function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); +}; + +var defaultRealpath = function realpath(x, cb) { + realpathFS(x, function (realpathErr, realPath) { + if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr); + else cb(null, realpathErr ? x : realPath); + }); +}; + +var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) { + if (opts && opts.preserveSymlinks === false) { + realpath(x, cb); + } else { + cb(null, x); + } +}; + +var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options; + if (typeof options === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + opts = normalizeOptions(x, opts); + + var isFile = opts.isFile || defaultIsFile; + var isDirectory = opts.isDirectory || defaultIsDir; + var readFile = opts.readFile || fs.readFile; + var realpath = opts.realpath || defaultRealpath; + var readPackage = opts.readPackage || defaultReadPackage; + if (opts.readFile && opts.readPackage) { + var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.'); + return process.nextTick(function () { + cb(conflictErr); + }); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = path.resolve(basedir); + + maybeRealpath( + realpath, + absoluteStart, + opts, + function (err, realStart) { + if (err) cb(err); + else init(realStart); + } + ); + + var res; + function init(basedir) { + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + res = path.resolve(basedir, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + if ((/\/$/).test(x) && res === basedir) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else if (includeCoreModules && isCore(x)) { + return cb(null, x); + } else loadNodeModules(x, basedir, function (err, n, pkg) { + if (err) cb(err); + else if (n) { + return maybeRealpath(realpath, n, opts, function (err, realN) { + if (err) { + cb(err); + } else { + cb(null, realN, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) { + maybeRealpath(realpath, d, opts, function (err, realD) { + if (err) { + cb(err); + } else { + cb(null, realD, pkg); + } + }); + } else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null); + + maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return loadpkg(path.dirname(dir), cb); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) { + if (unwrapErr) return cb(unwrapErr); + var pkgfile = path.join(pkgdir, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readPackage(readFile, pkgfile, function (err, pkgParam) { + if (err) return cb(err); + + var pkg = pkgParam; + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + return cb(mainError); + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + isDirectory(path.dirname(dir), isdir); + + function isdir(err, isdir) { + if (err) return cb(err); + if (!isdir) return processDirs(cb, dirs.slice(1)); + loadAsFile(dir, opts.package, onfile); + } + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(dir, opts.package, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + processDirs( + cb, + packageIterator ? packageIterator(x, start, thunk, opts) : thunk() + ); + } +}; diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js new file mode 100644 index 0000000..b14a280 --- /dev/null +++ b/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js new file mode 100644 index 0000000..57b048f --- /dev/null +++ b/node_modules/resolve/lib/core.js @@ -0,0 +1,12 @@ +'use strict'; + +var isCoreModule = require('is-core-module'); +var data = require('./core.json'); + +var core = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = isCoreModule(mod); + } +} +module.exports = core; diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json new file mode 100644 index 0000000..3cda693 --- /dev/null +++ b/node_modules/resolve/lib/core.json @@ -0,0 +1,158 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "smalloc": ">= 0.11.5 && < 3", + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "test/reporters": ">= 19.9 && < 20.2", + "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], + "node:wasi": [">= 18.17 && < 19", ">= 20"], + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/resolve/lib/homedir.js b/node_modules/resolve/lib/homedir.js new file mode 100644 index 0000000..5ffdf73 --- /dev/null +++ b/node_modules/resolve/lib/homedir.js @@ -0,0 +1,24 @@ +'use strict'; + +var os = require('os'); + +// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js + +module.exports = os.homedir || function homedir() { + var home = process.env.HOME; + var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; + + if (process.platform === 'win32') { + return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens + } + + return home || null; +}; diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js new file mode 100644 index 0000000..537f5c7 --- /dev/null +++ b/node_modules/resolve/lib/is-core.js @@ -0,0 +1,5 @@ +var isCoreModule = require('is-core-module'); + +module.exports = function isCore(x) { + return isCoreModule(x); +}; diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 0000000..1cff010 --- /dev/null +++ b/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,42 @@ +var path = require('path'); +var parse = path.parse || require('path-parse'); // eslint-disable-line global-require + +var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { + var prefix = '/'; + if ((/^([A-Za-z]:)/).test(absoluteStart)) { + prefix = ''; + } else if ((/^\\\\/).test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + return paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.resolve(prefix, aPath, moduleDir); + })); + }, []); +}; + +module.exports = function nodeModulesPaths(start, opts, request) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules']; + + if (opts && typeof opts.paths === 'function') { + return opts.paths( + request, + start, + function () { return getNodeModulesDirs(start, modules); }, + opts + ); + } + + var dirs = getNodeModulesDirs(start, modules); + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js new file mode 100644 index 0000000..4b56904 --- /dev/null +++ b/node_modules/resolve/lib/normalize-options.js @@ -0,0 +1,10 @@ +module.exports = function (x, opts) { + /** + * This file is purposefully a passthrough. It's expected that third-party + * environments will override it at runtime in order to inject special logic + * into `resolve` (by manipulating the options). One such example is the PnP + * code path in Yarn. + */ + + return opts || {}; +}; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js new file mode 100644 index 0000000..0b6cd58 --- /dev/null +++ b/node_modules/resolve/lib/sync.js @@ -0,0 +1,208 @@ +var isCore = require('is-core-module'); +var fs = require('fs'); +var path = require('path'); +var getHomedir = require('./homedir'); +var caller = require('./caller'); +var nodeModulesPaths = require('./node-modules-paths'); +var normalizeOptions = require('./normalize-options'); + +var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; + +var defaultIsFile = function isFile(file) { + try { + var stat = fs.statSync(file, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && (stat.isFile() || stat.isFIFO()); +}; + +var defaultIsDir = function isDirectory(dir) { + try { + var stat = fs.statSync(dir, { throwIfNoEntry: false }); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return !!stat && stat.isDirectory(); +}; + +var defaultRealpathSync = function realpathSync(x) { + try { + return realpathFS(x); + } catch (realpathErr) { + if (realpathErr.code !== 'ENOENT') { + throw realpathErr; + } + } + return x; +}; + +var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) { + if (opts && opts.preserveSymlinks === false) { + return realpathSync(x); + } + return x; +}; + +var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} +}; + +var getPackageCandidates = function getPackageCandidates(x, start, opts) { + var dirs = nodeModulesPaths(start, opts, x); + for (var i = 0; i < dirs.length; i++) { + dirs[i] = path.join(dirs[i], x); + } + return dirs; +}; + +module.exports = function resolveSync(x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = normalizeOptions(x, options); + + var isFile = opts.isFile || defaultIsFile; + var readFileSync = opts.readFileSync || fs.readFileSync; + var isDirectory = opts.isDirectory || defaultIsDir; + var realpathSync = opts.realpathSync || defaultRealpathSync; + var readPackageSync = opts.readPackageSync || defaultReadPackageSync; + if (opts.readFileSync && opts.readPackageSync) { + throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.'); + } + var packageIterator = opts.packageIterator; + + var extensions = opts.extensions || ['.js']; + var includeCoreModules = opts.includeCoreModules !== false; + var basedir = opts.basedir || path.dirname(caller()); + var parent = opts.filename || basedir; + + opts.paths = opts.paths || defaultPaths(); + + // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory + var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); + + if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) { + var res = path.resolve(absoluteStart, x); + if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return maybeRealpathSync(realpathSync, m, opts); + } else if (includeCoreModules && isCore(x)) { + return x; + } else { + var n = loadNodeModulesSync(x, absoluteStart); + if (n) return maybeRealpathSync(realpathSync, n, opts); + } + + var err = new Error("Cannot find module '" + x + "' from '" + parent + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + var pkg = loadpkg(path.dirname(x)); + + if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) { + var rfile = path.relative(pkg.dir, x); + var r = opts.pathFilter(pkg.pkg, x, rfile); + if (r) { + x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign + } + } + + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadpkg(dir) { + if (dir === '' || dir === '/') return; + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return; + } + if ((/[/\\]node_modules[/\\]*$/).test(dir)) return; + + var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json'); + + if (!isFile(pkgfile)) { + return loadpkg(path.dirname(dir)); + } + + var pkg = readPackageSync(readFileSync, pkgfile); + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment + } + + return { pkg: pkg, dir: dir }; + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json'); + if (isFile(pkgfile)) { + try { + var pkg = readPackageSync(readFileSync, pkgfile); + } catch (e) {} + + if (pkg && opts.packageFilter) { + // v2 will pass pkgfile + pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment + } + + if (pkg && pkg.main) { + if (typeof pkg.main !== 'string') { + var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string'); + mainError.code = 'INVALID_PACKAGE_MAIN'; + throw mainError; + } + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + try { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } catch (e) {} + } + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var thunk = function () { return getPackageCandidates(x, start, opts); }; + var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk(); + + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + if (isDirectory(path.dirname(dir))) { + var m = loadAsFileSync(dir); + if (m) return m; + var n = loadAsDirectorySync(dir); + if (n) return n; + } + } + } +}; diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json new file mode 100644 index 0000000..537388d --- /dev/null +++ b/node_modules/resolve/package.json @@ -0,0 +1,72 @@ +{ + "name": "resolve", + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "version": "1.22.8", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "bin": { + "resolve": "./bin/resolve" + }, + "main": "index.js", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && cp node_modules/is-core-module/core.json ./lib/ ||:", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "tests-only": "tape test/*.js", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "npm run test:multirepo && aud --production", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "array.prototype.map": "^1.0.6", + "aud": "^2.0.3", + "copy-dir": "^1.3.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.5", + "mv": "^2.1.1", + "npmignore": "^0.3.0", + "object-keys": "^1.1.1", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.1", + "tap": "0.4.13", + "tape": "^5.7.0", + "tmp": "^0.0.31" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "appveyor.yml", + "test/resolver/malformed_package_json" + ] + } +} diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown new file mode 100644 index 0000000..ad34d60 --- /dev/null +++ b/node_modules/resolve/readme.markdown @@ -0,0 +1,301 @@ +# resolve [![Version Badge][2]][1] + +implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +# example + +asynchronously resolve: + +```js +var resolve = require('resolve/async'); // or, require('resolve') +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +```js +var resolve = require('resolve/sync'); // or, `require('resolve').sync +var res = resolve('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +```js +var resolve = require('resolve'); +var async = require('resolve/async'); +var sync = require('resolve/sync'); +``` + +For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values: + +- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module +- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory +- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string) + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.isDirectory - function to asynchronously test whether a file exists and is a directory + +* opts.realpath - function to asynchronously resolve a potential symlink to its real path + +* `opts.readPackage(readFile, pkgfile, cb)` - function to asynchronously read and parse a package.json file + * readFile - the passed `opts.readFile` or `fs.readFile` if not specified + * pkgfile - path to package.json + * cb - callback + +* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * pkgfile - path to package.json + * dir - directory that contains package.json + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFile: fs.readFile, + isFile: function isFile(file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + isDirectory: function isDirectory(dir, cb) { + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }, + realpath: function realpath(file, cb) { + var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + realpath(file, function (realPathErr, realPath) { + if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr); + else cb(null, realPathErr ? file : realPath); + }); + }, + readPackage: function defaultReadPackage(readFile, pkgfile, cb) { + readFile(pkgfile, function (readFileErr, body) { + if (readFileErr) cb(readFileErr); + else { + try { + var pkg = JSON.parse(body); + cb(null, pkg); + } catch (jsonErr) { + cb(null); + } + } + }); + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search + +* opts.readFileSync - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.isDirectory - function to synchronously test whether a file exists and is a directory + +* opts.realpathSync - function to synchronously resolve a potential symlink to its real path + +* `opts.readPackageSync(readFileSync, pkgfile)` - function to synchronously read and parse a package.json file + * readFileSync - the passed `opts.readFileSync` or `fs.readFileSync` if not specified + * pkgfile - path to package.json + +* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field + * pkg - package data + * dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2) + +* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this) + + For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function + * request - the import specifier being resolved + * start - lookup path + * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this) + * request - the import specifier being resolved + * start - lookup path + * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution + * opts - the resolution options + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. +This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. +**Note:** this property is currently `true` by default but it will be changed to +`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. + +default `opts` values: + +```js +{ + paths: [], + basedir: __dirname, + extensions: ['.js'], + includeCoreModules: true, + readFileSync: fs.readFileSync, + isFile: function isFile(file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }, + isDirectory: function isDirectory(dir) { + try { + var stat = fs.statSync(dir); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isDirectory(); + }, + realpathSync: function realpathSync(file) { + try { + var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + return realpath(file); + } catch (realPathErr) { + if (realPathErr.code !== 'ENOENT') { + throw realPathErr; + } + } + return file; + }, + readPackageSync: function defaultReadPackageSync(readFileSync, pkgfile) { + var body = readFileSync(pkgfile); + try { + var pkg = JSON.parse(body); + return pkg; + } catch (jsonErr) {} + }, + moduleDirectory: 'node_modules', + preserveSymlinks: true +} +``` + +# install + +With [npm](https://npmjs.org) do: + +```sh +npm install resolve +``` + +# license + +MIT + +[1]: https://npmjs.org/package/resolve +[2]: https://versionbadg.es/browserify/resolve.svg +[5]: https://david-dm.org/browserify/resolve.svg +[6]: https://david-dm.org/browserify/resolve +[7]: https://david-dm.org/browserify/resolve/dev-status.svg +[8]: https://david-dm.org/browserify/resolve#info=devDependencies +[11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/resolve.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/resolve.svg +[downloads-url]: https://npm-stat.com/charts.html?package=resolve +[codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/browserify/resolve/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/resolve +[actions-url]: https://github.com/browserify/resolve/actions diff --git a/node_modules/resolve/sync.js b/node_modules/resolve/sync.js new file mode 100644 index 0000000..cd0ee04 --- /dev/null +++ b/node_modules/resolve/sync.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/sync'); diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js new file mode 100644 index 0000000..a477adc --- /dev/null +++ b/node_modules/resolve/test/core.js @@ -0,0 +1,88 @@ +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); + +var resolve = require('../'); + +var brokenNode = semver.satisfies(process.version, '11.11 - 11.13'); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(resolve.isCore('fs')); + st.ok(resolve.isCore('net')); + st.ok(resolve.isCore('http')); + + st.ok(!resolve.isCore('seq')); + st.ok(!resolve.isCore('../')); + + st.ok(!resolve.isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(resolve.core); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + // note: this must be require, not require.resolve, due to https://github.com/nodejs/node/issues/43274 + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + t.comment(mod + ': ' + resolve.core[mod]); + if (resolve.core[mod]) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else if (brokenNode) { + st.ok(true, 'this version of node is broken: attempting to require things that fail to resolve breaks "home_paths" tests'); + } else { + st.throws(requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !resolve.core.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) { + var libs = require('module').builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + return st.end(); + } + var blacklist = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (blacklist.indexOf(mod) === -1) { + st.ok(resolve.core[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + } + } + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js new file mode 100644 index 0000000..3080665 --- /dev/null +++ b/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = path.join(__dirname, '/dotdot/abc'); + + resolve('..', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'dotdot/index.js')); + }); + + resolve('.', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = path.join(__dirname, '/dotdot/abc'); + + var a = resolve.sync('..', { basedir: dir }); + t.equal(a, path.join(__dirname, 'dotdot/index.js')); + + var b = resolve.sync('.', { basedir: dir }); + t.equal(b, path.join(dir, 'index.js')); +}); diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 0000000..67f2534 --- /dev/null +++ b/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 0000000..643f9fc --- /dev/null +++ b/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever'; diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 0000000..5f2141a --- /dev/null +++ b/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,29 @@ +var test = require('tape'); +var path = require('path'); +var resolve = require('../'); + +test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(!!err, true); + }); +}); + +test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { + t.plan(2); + + var opts = { + basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), + preserveSymlinks: false + }; + + var module = './dotdot/abc'; + + resolve(module, opts, function (err, res) { + t.equal(err.code, 'MODULE_NOT_FOUND'); + t.equal(res, undefined); + }); +}); diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js new file mode 100644 index 0000000..8f8cccd --- /dev/null +++ b/node_modules/resolve/test/filter.js @@ -0,0 +1,34 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + resolve('./baz', { + basedir: dir, + packageFilter: function (pkg, pkgfile) { + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = [pkg, pkgfile]; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + var packageFile = packageFilterArgs[1]; + t.equal( + packageFile, + path.join(dir, 'baz/package.json'), + 'second packageFilter argument is "pkgfile"' + ); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js new file mode 100644 index 0000000..8a43b98 --- /dev/null +++ b/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,33 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + var dir = path.join(__dirname, 'resolver'); + var packageFilterArgs; + var res = resolve.sync('./baz', { + basedir: dir, + // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility + packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment + pkg.main = 'doom'; // eslint-disable-line no-param-reassign + packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef + return pkg; + } + }); + + t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); + + var packageData = packageFilterArgs[0]; + t.equal(packageData.main, 'doom', 'package "main" was altered'); + + if (!'is 1.x') { // eslint-disable-line no-constant-condition + var packageFile = packageFilterArgs[1]; + t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct'); + } + + var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition + // eslint-disable-next-line no-constant-condition + t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"'); + + t.end(); +}); diff --git a/node_modules/resolve/test/home_paths.js b/node_modules/resolve/test/home_paths.js new file mode 100644 index 0000000..3b8c9b3 --- /dev/null +++ b/node_modules/resolve/test/home_paths.js @@ -0,0 +1,127 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../async'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazPkg = { name: 'baz', main: 'quux.js' }; + var dotMainPkg = { main: 'index' }; + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + var dotSlashMainPkg = { main: 'index' }; + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('dot_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_main`'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + s2t.deepEqual(pkg, dotMainPkg); + }); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(3); + + resolve('dot_slash_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_slash_main`'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + s2t.deepEqual(pkg, dotSlashMainPkg); + }); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('baz', function (err, res, pkg) { + s2t.error(err, 'no error resolving `baz`'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + s2t.deepEqual(pkg, bazPkg); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/home_paths_sync.js b/node_modules/resolve/test/home_paths_sync.js new file mode 100644 index 0000000..5d2c56f --- /dev/null +++ b/node_modules/resolve/test/home_paths_sync.js @@ -0,0 +1,114 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../sync'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_main'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_slash_main'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('baz'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js new file mode 100644 index 0000000..6116275 --- /dev/null +++ b/node_modules/resolve/test/mock.js @@ -0,0 +1,315 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock from package', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, file)); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[file]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('symlinked', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + cb(null, resolved); + return; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + cb(null, path.join(dir, 'symlinked', base)); + } else { + cb(null, path.join(resolved, 'symlinked')); + } + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/symlinked/baz.js')); + t.equal(pkg, undefined); + }); +}); + +test('readPackage', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + isDirectory: function (dir, cb) { + cb(null, !!dirs[path.resolve(dir)]); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + }, + realpath: function (file, cb) { + cb(null, file); + } + }; + } + + t.test('with readFile', function (st) { + st.plan(3); + + resolve('bar', opts('/foo'), function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + st.equal(pkg && pkg.main, './baz.js'); + }); + }); + + var readPackage = function (readFile, file, cb) { + var barPackage = path.join('bar', 'package.json'); + if (file.slice(-barPackage.length) === barPackage) { + cb(null, { main: './something-else.js' }); + } else { + cb(null, JSON.parse(files[path.resolve(file)])); + } + }; + + t.test('with readPackage', function (st) { + st.plan(3); + + var options = opts('/foo'); + delete options.readFile; + options.readPackage = readPackage; + resolve('bar', options, function (err, res, pkg) { + st.error(err); + st.equal(res, path.resolve('/foo/node_modules/bar/something-else.js')); + st.equal(pkg && pkg.main, './something-else.js'); + }); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackage = readPackage; + resolve('bar', options, function (err) { + st.throws(function () { throw err; }, TypeError, 'errors when both readFile and readPackage are provided'); + }); + }); +}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js new file mode 100644 index 0000000..c5a7e2a --- /dev/null +++ b/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,214 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + + t.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); +}); + +test('symlinked', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep'; + + var dirs = {}; + dirs[path.resolve('/foo/bar')] = true; + dirs[path.resolve('/foo/bar/symlinked')] = true; + + function opts(basedir) { + return { + preserveSymlinks: false, + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + var resolved = path.resolve(file); + + if (resolved.indexOf('symlinked') >= 0) { + return resolved; + } + + var ext = path.extname(resolved); + + if (ext) { + var dir = path.dirname(resolved); + var base = path.basename(resolved); + return path.join(dir, 'symlinked', base); + } + return path.join(resolved, 'symlinked'); + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/symlinked/baz.js') + ); +}); + +test('readPackageSync', function (t) { + t.plan(3); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop'; + + var dirs = {}; + dirs[path.resolve('/foo')] = true; + dirs[path.resolve('/foo/node_modules')] = true; + + function opts(basedir, useReadPackage) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, path.resolve(file)); + }, + isDirectory: function (dir) { + return !!dirs[path.resolve(dir)]; + }, + readFileSync: useReadPackage ? null : function (file) { + return files[path.resolve(file)]; + }, + realpathSync: function (file) { + return file; + } + }; + } + t.test('with readFile', function (st) { + st.plan(1); + + st.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); + }); + + var readPackageSync = function (readFileSync, file) { + if (file.indexOf(path.join('bar', 'package.json')) >= 0) { + return { main: './something-else.js' }; + } + return JSON.parse(files[path.resolve(file)]); + }; + + t.test('with readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + delete options.readFileSync; + options.readPackageSync = readPackageSync; + + st.equal( + resolve.sync('bar', options), + path.resolve('/foo/node_modules/bar/something-else.js') + ); + }); + + t.test('with readFile and readPackage', function (st) { + st.plan(1); + + var options = opts('/foo'); + options.readPackageSync = readPackageSync; + st.throws( + function () { resolve.sync('bar', options); }, + TypeError, + 'errors when both readFile and readPackage are provided' + ); + }); +}); + diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js new file mode 100644 index 0000000..b50e5bb --- /dev/null +++ b/node_modules/resolve/test/module_dir.js @@ -0,0 +1,56 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('moduleDirectory strings', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'module_dir'); + var xopts = { + basedir: dir, + moduleDirectory: 'xmodules' + }; + resolve('aaa', xopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var yopts = { + basedir: dir, + moduleDirectory: 'ymodules' + }; + resolve('aaa', yopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); +}); + +test('moduleDirectory array', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'module_dir'); + var aopts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('aaa', aopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var bopts = { + basedir: dir, + moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] + }; + resolve('aaa', bopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); + + var copts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('bbb', copts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); + }); +}); diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js new file mode 100644 index 0000000..dd7cf7b --- /dev/null +++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x * 100; }; diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js new file mode 100644 index 0000000..ef2d4d4 --- /dev/null +++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x + 100; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js new file mode 100644 index 0000000..e8ba629 --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js @@ -0,0 +1 @@ +module.exports = function (n) { return n * 111; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json new file mode 100644 index 0000000..c13b8cf --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -0,0 +1,3 @@ +{ + "main": "main.js" +} diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js new file mode 100644 index 0000000..675441d --- /dev/null +++ b/node_modules/resolve/test/node-modules-paths.js @@ -0,0 +1,143 @@ +var test = require('tape'); +var path = require('path'); +var parse = path.parse || require('path-parse'); +var keys = require('object-keys'); + +var nodeModulesPaths = require('../lib/node-modules-paths'); + +var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { + var moduleDirs = [].concat(moduleDirectories || 'node_modules'); + if (paths) { + for (var k = 0; k < paths.length; ++k) { + moduleDirs.push(path.basename(paths[k])); + } + } + + var foundModuleDirs = {}; + var uniqueDirs = {}; + var parsedDirs = {}; + for (var i = 0; i < dirs.length; ++i) { + var parsed = parse(dirs[i]); + if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } + foundModuleDirs[parsed.base] += 1; + parsedDirs[parsed.dir] = true; + uniqueDirs[dirs[i]] = true; + } + t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); + var foundModuleDirNames = keys(foundModuleDirs); + t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found'); + t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); + + var counts = {}; + for (var j = 0; j < foundModuleDirNames.length; ++j) { + counts[foundModuleDirs[j]] = true; + } + t.equal(keys(counts).length, 1, 'all found module directories had the same count'); +}; + +test('node-modules-paths', function (t) { + t.test('no options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('empty options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, {}); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('with paths=array option', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var dirs = nodeModulesPaths(start, { paths: paths }); + + verifyDirs(t, start, dirs, null, paths); + + t.end(); + }); + + t.test('with paths=function option', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request)); + }; + + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg'); + + verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]); + + t.end(); + }); + + t.test('with paths=function skipping node modules resolution', function (t) { + var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) { + return []; + }; + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, { paths: paths }); + t.deepEqual(dirs, [], 'no node_modules was computed'); + t.end(); + }); + + t.test('with moduleDirectory option', function (t) { + var start = path.join(__dirname, 'resolver'); + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory); + + t.end(); + }); + + t.test('with 1 moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory, paths); + + t.end(); + }); + + t.test('with 1+ moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectories = ['not node modules', 'other modules']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + verifyDirs(t, start, dirs, moduleDirectories, paths); + + t.end(); + }); + + t.test('combine paths correctly on Windows', function (t) { + var start = 'C:\\Users\\username\\myProject\\src'; + var paths = []; + var moduleDirectories = ['node_modules', start]; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); + + t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) { + var start = '/Users/username/git/myProject/src'; + var paths = []; + var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir'); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js new file mode 100644 index 0000000..e463d6c --- /dev/null +++ b/node_modules/resolve/test/node_path.js @@ -0,0 +1,70 @@ +var fs = require('fs'); +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(8); + + var isDir = function (dir, cb) { + if (dir === '/node_path' || dir === 'node_path/x') { + return cb(null, true); + } + fs.stat(dir, function (err, stat) { + if (!err) { + return cb(null, stat.isDirectory()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + + resolve('aaa', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves'); + }); + + resolve('bbb', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves'); + }); + + resolve('ccc', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname, + isDirectory: isDir + }, function (err, res) { + t.error(err); + t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves'); + }); + + // ensure that relative paths still resolve against the regular `node_modules` correctly + resolve('tap', { + paths: [ + 'node_path' + ], + basedir: path.join(__dirname, 'node_path/x'), + isDirectory: isDir + }, function (err, res) { + var root = require('tap/package.json').main; // eslint-disable-line global-require + t.error(err); + t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); + }); +}); diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 0000000..ad70d0b --- /dev/null +++ b/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A'; diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 0000000..a64132e --- /dev/null +++ b/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C'; diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 0000000..4d0f32e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B'; diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 0000000..793315e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY'; diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js new file mode 100644 index 0000000..ef63c40 --- /dev/null +++ b/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js new file mode 100644 index 0000000..16519ae --- /dev/null +++ b/node_modules/resolve/test/pathfilter.js @@ -0,0 +1,75 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); + +var pathFilterFactory = function (t) { + return function (pkg, x, remainder) { + t.equal(pkg.version, '1.2.3'); + t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); + t.equal(remainder, 'ref'); + return 'alt'; + }; +}; + +test('#62: deep module references and the pathFilter', function (t) { + t.test('deep/ref.js', function (st) { + st.plan(3); + + resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { + if (err) st.fail(err); + + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + var res = resolve.sync('deep/ref', { basedir: resolverDir }); + st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + t.test('deep/deeper/ref', function (st) { + st.plan(4); + + resolve( + 'deep/deeper/ref', + { basedir: resolverDir }, + function (err, res, pkg) { + if (err) t.fail(err); + st.notEqual(pkg, undefined); + st.equal(pkg.version, '1.2.3'); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + } + ); + + var res = resolve.sync( + 'deep/deeper/ref', + { basedir: resolverDir } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + }); + + t.test('deep/ref alt', function (st) { + st.plan(8); + + var pathFilter = pathFilterFactory(st); + + var res = resolve.sync( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter } + ); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + + resolve( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter }, + function (err, res, pkg) { + if (err) st.fail(err); + st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + st.end(); + } + ); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js new file mode 100644 index 0000000..2febb59 --- /dev/null +++ b/node_modules/resolve/test/precedence.js @@ -0,0 +1,23 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('precedence', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'precedence/aaa'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg.name, 'resolve'); + }); +}); + +test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string + t.plan(1); + var dir = path.join(__dirname, 'precedence/bbb'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js new file mode 100644 index 0000000..b83a3e7 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa.js @@ -0,0 +1 @@ +module.exports = 'wtf'; diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js new file mode 100644 index 0000000..e0f8f6a --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'okok'; diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js new file mode 100644 index 0000000..93542a9 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/main.js @@ -0,0 +1 @@ +console.log(require('./')); diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js new file mode 100644 index 0000000..2298f47 --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb.js @@ -0,0 +1 @@ +module.exports = '>_<'; diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js new file mode 100644 index 0000000..716b81d --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb/main.js @@ -0,0 +1 @@ +console.log(require('./')); // should throw diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js new file mode 100644 index 0000000..df8211a --- /dev/null +++ b/node_modules/resolve/test/resolver.js @@ -0,0 +1,597 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); +var resolve = require('../'); +var async = require('../async'); + +test('`./async` entry point', function (t) { + t.equal(resolve, async, '`./async` entry point is the same as `main`'); + t.end(); +}); + +test('async foo', function (t) { + t.plan(12); + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg.main, 'resolver'); + }); + + resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + }); + + resolve('foo', { basedir: dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'"); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'resolver'); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg.main, 'bar'); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./baz', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + resolve('./grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, 'grux'); + }); + + resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'tiv'); + }); + + resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/quux'); + + resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo/index.js')); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + resolve('../grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(5); + var dir = path.join(__dirname, 'resolver'); + + resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup.coffee', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + // Test that filename is reported as the "from" value when passed. + resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'"); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'resolver'); + + resolve('./mug', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'mug.js')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, '/mug.coffee')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + t.equal(res, path.join(dir, '/mug.js')); + }); +}); + +test('other path', function (t) { + t.plan(6); + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/root.js')); + }); + + resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); + }); + + resolve('root', { basedir: dir }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('path iterator', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'baz/quux.js')); + t.equal(pkg && pkg.name, 'baz'); + }); +}); + +test('incorrect main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('missing index', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + resolve('./missing_index', { basedir: resolverDir }, function (err, res, pkg) { + t.ok(err instanceof Error); + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('missing main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./missing_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('null main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./null_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('main: false', function (t) { + t.plan(2); + + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + resolve('./false_main', { basedir: basedir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal( + res, + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + t.deepEqual(pkg, { + name: 'false_main', + main: false + }); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = path.join(__dirname, 'resolver/without_basedir'); + var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require + + tester(t, function (err, res, pkg) { + if (err) { + t.fail(err); + } else { + t.equal(res, path.join(dir, 'node_modules/mymodule.js')); + } + }); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo.js')); + }); + + resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); + + resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('async: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.plan(1); + resolve('./' + testFile, function (err, res, pkg) { + if (err) t.fail(err); + st.equal(res, __filename, 'sanity check'); + }); + }); + + t.test('with a fake directory', function (st) { + st.plan(4); + + resolve('./' + testFile + '/blah', function (err, res, pkg) { + st.ok(err, 'there is an error'); + st.notOk(res, 'no result'); + + st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + err && err.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + st.end(); + }); + }); + + t.end(); +}); + +test('async dot main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('async dot slash main', function (t) { + var start = new Date(); + t.plan(3); + resolve('./resolver/dot_slash_main', function (err, ret) { + t.notOk(err); + t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); + }); +}); + +test('not a directory', function (t) { + t.plan(6); + var path = './foo'; + resolve(path, { basedir: __filename }, function (err, res, pkg) { + t.ok(err, 'a non-directory errors'); + t.equal(arguments.length, 1); + t.equal(res, undefined); + t.equal(pkg, undefined); + + t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\''); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('non-string "main" field in package.json', function (t) { + t.plan(5); + + var dir = path.join(__dirname, 'resolver'); + resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + t.equal(res, undefined, 'res is undefined'); + t.equal(pkg, undefined, 'pkg is undefined'); + }); +}); + +test('browser field in package.json', function (t) { + t.plan(3); + + var dir = path.join(__dirname, 'resolver'); + resolve( + './browser_field', + { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }, + function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.equal(pkg && pkg.main, 'b'); + t.equal(pkg && pkg.browser, undefined); + } + ); +}); + +test('absolute paths', function (t) { + t.plan(4); + + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + resolve(__filename, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file resolves' + ); + }); + resolve(extensionless, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file resolves' + ); + }); + resolve(__filename, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file with a basedir resolves' + ); + }); + resolve(extensionless, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + }); +}); + +var malformedDir = path.join(__dirname, 'resolver/malformed_package_json'); +test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) { + /* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */ + t.plan( + (3 * 3) // 3 sets of 3 assertions in the final callback + + 2 // 1 readPackage call with malformed package.json + ); + + var basedir = malformedDir; + var expected = path.join(basedir, 'index.js'); + + resolve('./index.js', { basedir: basedir }, function (err, res, pkg) { + t.error(err, 'no error'); + t.equal(res, expected, 'malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument'); + }); + + resolve( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + }, + function (err, res, pkg) { + t.error(err, 'with packageFilter: no error'); + t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument'); + } + ); + + resolve( + './index.js', + { + basedir: basedir, + readPackage: function (readFile, pkgfile, cb) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + readFile(pkgfile, function (err, result) { + try { + cb(null, JSON.parse(result)); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error'); + cb(null); + } + }); + } + }, + function (err, res, pkg) { + t.error(err, 'with readPackage: no error'); + t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument'); + } + ); +}); diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 0000000..2f77720 --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,4 @@ +{ + "name": "baz", + "main": "quux.js" +} diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json new file mode 100644 index 0000000..bf406f0 --- /dev/null +++ b/node_modules/resolve/test/resolver/browser_field/package.json @@ -0,0 +1,5 @@ +{ + "name": "browser_field", + "main": "a", + "browser": "b" +} diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json new file mode 100644 index 0000000..d7f4fc8 --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "." +} diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json new file mode 100644 index 0000000..f51287b --- /dev/null +++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "./" +} diff --git a/node_modules/resolve/test/resolver/false_main/index.js b/node_modules/resolve/test/resolver/false_main/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/false_main/package.json b/node_modules/resolve/test/resolver/false_main/package.json new file mode 100644 index 0000000..a7416c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/false_main/package.json @@ -0,0 +1,4 @@ +{ + "name": "false_main", + "main": false +} diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 0000000..bc1fb0a --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 0000000..b718804 --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "wrong.js" +} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json new file mode 100644 index 0000000..0590748 --- /dev/null +++ b/node_modules/resolve/test/resolver/invalid_main/package.json @@ -0,0 +1,7 @@ +{ + "name": "invalid_main", + "main": [ + "why is this a thing", + "srsly omg wtf" + ] +} diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/resolve/test/resolver/multirepo/lerna.json new file mode 100644 index 0000000..d6707ca --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/lerna.json @@ -0,0 +1,6 @@ +{ + "packages": [ + "packages/*" + ], + "version": "0.0.0" +} diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json new file mode 100644 index 0000000..4391d39 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/package.json @@ -0,0 +1,20 @@ +{ + "name": "ljharb-monorepo-symlink-test", + "private": true, + "version": "0.0.0", + "description": "", + "main": "index.js", + "scripts": { + "postinstall": "lerna bootstrap", + "test": "node packages/package-a" + }, + "author": "", + "license": "MIT", + "dependencies": { + "jquery": "^3.3.1", + "resolve": "../../../" + }, + "devDependencies": { + "lerna": "^3.4.3" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js new file mode 100644 index 0000000..8875a32 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var assert = require('assert'); +var path = require('path'); +var resolve = require('resolve'); + +var basedir = __dirname + '/node_modules/@my-scope/package-b'; + +var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); + +/* + * preserveSymlinks === false + * will search NPM package from + * - packages/package-b/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); +assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); + +/* + * preserveSymlinks === true + * will search NPM package from + * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules + * - packages/package-a/node_modules/@my-scope/packages/node_modules + * - packages/package-a/node_modules/@my-scope/node_modules + * - packages/package-a/node_modules/node_modules + * - packages/package-a/node_modules + * - packages/node_modules + * - node_modules + */ +assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); +assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); + +console.log(' * all monorepo paths successfully resolved through symlinks'); diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json new file mode 100644 index 0000000..204de51 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-a", + "version": "0.0.0", + "private": true, + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-b": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json new file mode 100644 index 0000000..f57c3b5 --- /dev/null +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json @@ -0,0 +1,14 @@ +{ + "name": "@my-scope/package-b", + "private": true, + "version": "0.0.0", + "description": "", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1" + }, + "dependencies": { + "@my-scope/package-a": "^0.0.0" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js new file mode 100644 index 0000000..9b4846a --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js @@ -0,0 +1,26 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b; +var c; + +var test = function test() { + console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); + console.log(b, ': preserveSymlinks true'); + console.log(c, ': preserveSymlinks false'); + + if (a !== b && a !== c) { + throw 'async: no match'; + } + console.log('async: success! a matched either b or c\n'); +}; + +require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { + if (err) { throw err; } + b = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); +require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { + if (err) { throw err; } + c = result.replace(process.cwd(), '$CWD'); + if (b && c) { test(); } +}); + diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json new file mode 100644 index 0000000..acfe9e9 --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -0,0 +1,15 @@ +{ + "name": "mylib", + "version": "0.0.0", + "description": "", + "private": true, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "buffer": "*" + } +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js new file mode 100644 index 0000000..3283efc --- /dev/null +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js @@ -0,0 +1,12 @@ +var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); +var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); +var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); + +console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); +console.log(b, ': preserveSymlinks true'); +console.log(c, ': preserveSymlinks false'); + +if (a !== b && a !== c) { + throw 'sync: no match'; +} +console.log('sync: success! a matched either b or c\n'); diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js new file mode 100644 index 0000000..888cae3 --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js new file mode 100644 index 0000000..cb1c2c0 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/bar.js @@ -0,0 +1 @@ +module.exports = 'bar'; diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json new file mode 100644 index 0000000..8e1b585 --- /dev/null +++ b/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -0,0 +1,3 @@ +{ + "main": "bar.js" +} \ No newline at end of file diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 0000000..5b31975 --- /dev/null +++ b/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,5 @@ +var resolve = require('../../../'); + +module.exports = function (t, cb) { + resolve('mymodule', null, cb); +}; diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 0000000..a6df8ce --- /dev/null +++ b/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,730 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); + +var resolve = require('../'); +var sync = require('../sync'); + +var requireResolveSupportsPaths = require.resolve.length > 1 + && !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 + +var requireResolveDefaultPathsBroken = (/^v8\.9\.|^v9\.[01]\.0|^v9\.2\./).test(process.version); +// broken in node v8.9.x, v9.0, v9.1, v9.2.x. see https://github.com/nodejs/node/pull/17113 + +test('`./sync` entry point', function (t) { + t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`'); + t.end(); +}); + +test('foo', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: dir }), + require.resolve('./foo', { paths: [dir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + path.join(dir, 'foo.js'), + './foo.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + require.resolve('./foo.js', { paths: [dir] }), + './foo.js: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), + path.join(dir, 'foo.js') + ); + + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }); + + // Test that filename is reported as the "from" value when passed. + t.throws( + function () { + resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') }); + }, + { + name: 'Error', + message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'" + } + ); + + t.end(); +}); + +test('bar', function (t) { + var dir = path.join(__dirname, 'resolver'); + + var basedir = path.join(dir, 'bar'); + + t.equal( + resolve.sync('foo', { basedir: basedir }), + path.join(dir, 'bar/node_modules/foo/index.js'), + 'foo in bar' + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('foo', { basedir: basedir }), + require.resolve('foo', { paths: [basedir] }), + 'foo in bar: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('baz', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./baz', { basedir: dir }), + path.join(dir, 'baz/quux.js'), + './baz' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./baz', { basedir: dir }), + require.resolve('./baz', { paths: [dir] }), + './baz: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('biz', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + t.equal( + resolve.sync('./grux', { basedir: dir }), + path.join(dir, 'grux/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./grux', { basedir: dir }), + require.resolve('./grux', { paths: [dir] }), + './grux: resolve.sync === require.resolve' + ); + } + + var tivDir = path.join(dir, 'grux'); + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + path.join(dir, 'tiv/index.js') + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + require.resolve('tiv', { paths: [tivDir] }), + 'tiv: resolve.sync === require.resolve' + ); + } + + var gruxDir = path.join(dir, 'tiv'); + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + path.join(dir, 'grux/index.js') + ); + if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + require.resolve('grux', { paths: [gruxDir] }), + 'grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('normalize', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + t.equal( + resolve.sync('../grux', { basedir: dir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('../grux', { basedir: dir }), + require.resolve('../grux', { paths: [dir] }), + '../grux: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('cup', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'cup.coffee'), + './cup -> ./cup.coffee' + ); + + t.equal( + resolve.sync('./cup.coffee', { basedir: dir }), + path.join(dir, 'cup.coffee'), + './cup.coffee' + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js'] + }); + }); + + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }), + require.resolve('./cup.coffee', { paths: [dir] }), + './cup.coffee: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('mug', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./mug', { basedir: dir }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./mug', { basedir: dir }), + require.resolve('./mug', { paths: [dir] }), + './mug: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.coffee', '.js'] + }), + path.join(dir, 'mug.coffee'), + './mug -> ./mug.coffee' + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'mug.js'), + './mug -> ./mug.js' + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + t.equal( + resolve.sync('root', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/root.js') + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/lib/other-lib.js') + ); + + t.throws(function () { + resolve.sync('root', { basedir: dir }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir: dir, + paths: [otherDir] + }); + }); + + t.end(); +}); + +test('path iterator', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + var exactIterator = function (x, start, getPackageCandidates, opts) { + return [path.join(resolverDir, x)]; + }; + + t.equal( + resolve.sync('baz', { packageIterator: exactIterator }), + path.join(resolverDir, 'baz/quux.js') + ); + + t.end(); +}); + +test('incorrect main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + path.join(dir, 'index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + require.resolve('./incorrect_main', { paths: [resolverDir] }), + './incorrect_main: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('missing index', function (t) { + t.plan(requireResolveSupportsPaths ? 2 : 1); + + var resolverDir = path.join(__dirname, 'resolver'); + try { + resolve.sync('./missing_index', { basedir: resolverDir }); + t.fail('did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + require.resolve('./missing_index', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } +}); + +test('missing main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('null main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('main: false', function (t) { + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + require.resolve('./false_main', { paths: [basedir] }), + '`"main": false`: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +var stubStatSync = function stubStatSync(fn) { + var statSync = fs.statSync; + try { + fs.statSync = function () { + throw new EvalError('Unknown Error'); + }; + return fn(); + } finally { + fs.statSync = statSync; + } +}; + +test('#79 - re-throw non ENOENT errors from stat', function (t) { + var dir = path.join(__dirname, 'resolver'); + + stubStatSync(function () { + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }, /Unknown Error/); + }); + + t.end(); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names'); + + t.equal( + resolve.sync('./foo', { basedir: basedir }), + path.join(dir, 'same_names/foo.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: basedir }), + require.resolve('./foo', { paths: [basedir] }), + './foo: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js') + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + require.resolve('./foo/', { paths: [basedir] }), + './foo/: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names/foo'); + + t.equal( + resolve.sync('./', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + './' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./', { basedir: basedir }), + require.resolve('./', { paths: [basedir] }), + './: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync('.', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + '.' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('.', { basedir: basedir }), + require.resolve('.', { paths: [basedir] }), + '.: resolve.sync === require.resolve', + { todo: true } + ); + } + + t.end(); +}); + +test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.equal( + resolve.sync('./' + testFile), + __filename, + 'sanity check' + ); + st.equal( + resolve.sync('./' + testFile), + require.resolve('./' + testFile), + 'sanity check: resolve.sync === require.resolve' + ); + + st.end(); + }); + + t.test('with a fake directory', function (st) { + function run() { return resolve.sync('./' + testFile + '/blah'); } + + st.throws(run, 'throws an error'); + + try { + run(); + } catch (e) { + st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + e.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + } + + st.end(); + }); + + t.end(); +}); + +test('sync dot main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_main'), + path.join(__dirname, 'resolver/dot_main/index.js'), + './resolver/dot_main' + ); + t.equal( + resolve.sync('./resolver/dot_main'), + require.resolve('./resolver/dot_main'), + './resolver/dot_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('sync dot slash main', function (t) { + var start = new Date(); + + t.equal( + resolve.sync('./resolver/dot_slash_main'), + path.join(__dirname, 'resolver/dot_slash_main/index.js') + ); + t.equal( + resolve.sync('./resolver/dot_slash_main'), + require.resolve('./resolver/dot_slash_main'), + './resolver/dot_slash_main: resolve.sync === require.resolve' + ); + + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + + t.end(); +}); + +test('not a directory', function (t) { + var path = './foo'; + try { + resolve.sync(path, { basedir: __filename }); + t.fail(); + } catch (err) { + t.ok(err, 'a non-directory errors'); + t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'"); + t.equal(err && err.code, 'MODULE_NOT_FOUND'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('non-string "main" field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + try { + var result = resolve.sync('./invalid_main', { basedir: dir }); + t.equal(result, undefined, 'result should not exist'); + t.fail('should not get here'); + } catch (err) { + t.ok(err, 'errors on non-string main'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); + t.equal(err.code, 'INVALID_PACKAGE_MAIN'); + } + t.end(); +}); + +test('browser field in package.json', function (t) { + var dir = path.join(__dirname, 'resolver'); + var res = resolve.sync('./browser_field', { + basedir: dir, + packageFilter: function packageFilter(pkg) { + if (pkg.browser) { + pkg.main = pkg.browser; // eslint-disable-line no-param-reassign + delete pkg.browser; // eslint-disable-line no-param-reassign + } + return pkg; + } + }); + t.equal(res, path.join(dir, 'browser_field', 'b.js')); + t.end(); +}); + +test('absolute paths', function (t) { + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + t.equal( + resolve.sync(__filename), + __filename, + 'absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(extensionless), + __filename, + 'extensionless absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + __filename, + 'absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + require.resolve(__filename, { paths: [process.cwd()] }), + 'absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + require.resolve(extensionless, { paths: [process.cwd()] }), + 'extensionless absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +var malformedDir = path.join(__dirname, 'resolver/malformed_package_json'); +test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) { + t.plan(5 + (requireResolveSupportsPaths ? 1 : 0)); + + var basedir = malformedDir; + var expected = path.join(basedir, 'index.js'); + + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + expected, + 'malformed package.json is silently ignored' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + require.resolve('./index.js', { paths: [basedir] }), + 'malformed package.json: resolve.sync === require.resolve' + ); + } + + var res1 = resolve.sync( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + } + ); + + t.equal( + res1, + expected, + 'with packageFilter: malformed package.json is silently ignored' + ); + + var res2 = resolve.sync( + './index.js', + { + basedir: basedir, + readPackageSync: function (readFileSync, pkgfile) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + var result = String(readFileSync(pkgfile)); + try { + return JSON.parse(result); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error'); + } + } + } + ); + + t.equal( + res2, + expected, + 'with readPackageSync: malformed package.json is silently ignored' + ); +}); diff --git a/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js new file mode 100644 index 0000000..3a5f4fc --- /dev/null +++ b/node_modules/resolve/test/shadowed_core.js @@ -0,0 +1,54 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('shadowed core modules still return core module', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, 'util'); + }); +}); + +test('shadowed core modules still return core module [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, 'util'); +}); + +test('shadowed core modules return shadow when appending `/`', function (t) { + t.plan(2); + + resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow when appending `/` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) { + t.plan(2); + + resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); + }); +}); + +test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) { + t.plan(1); + + var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }); + + t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); +}); diff --git a/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js new file mode 100644 index 0000000..b7b8450 --- /dev/null +++ b/node_modules/resolve/test/subdirs.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('subdirs', function (t) { + t.plan(2); + + var dir = path.join(__dirname, '/subdirs'); + resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); + }); +}); diff --git a/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js new file mode 100644 index 0000000..35f881a --- /dev/null +++ b/node_modules/resolve/test/symlinks.js @@ -0,0 +1,176 @@ +var path = require('path'); +var fs = require('fs'); +var test = require('tape'); +var map = require('array.prototype.map'); +var resolve = require('../'); + +var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); +var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package'); +var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a'); +var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a'); +try { + fs.unlinkSync(symlinkDir); +} catch (err) {} +try { + fs.unlinkSync(packageDir); +} catch (err) {} +try { + fs.unlinkSync(modADir); +} catch (err) {} +try { + fs.unlinkSync(symlinkModADir); +} catch (err) {} + +try { + fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); +} +try { + fs.symlinkSync('../../package', packageDir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction'); +} +try { + fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir'); +} catch (err) { + // if fails then it is probably on Windows and lets try to create a junction + fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction'); +} + +test('symlink', function (t) { + t.plan(2); + + resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { + t.error(err); + t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); + }); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.plan(4); + + resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { + t.ok(err, 'there is an error'); + t.notOk(res, 'no result'); + + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + t.equal( + err && err.message, + 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', + 'can not find nonexistent module' + ); + }); +}); + +test('sync symlink', function (t) { + var start = new Date(); + t.doesNotThrow(function () { + t.equal( + resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), + path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js') + ); + }); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); +}); + +test('sync symlink when preserveSymlinks = true', function (t) { + t.throws(function () { + resolve.sync('foo', { basedir: symlinkDir }); + }, /Cannot find module 'foo'/); + t.end(); +}); + +test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false }); + + t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + t.end(); +}); + +test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) { + t.plan(2); + var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); + resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) { + t.notOk(err, 'no error'); + t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); + }); +}); + +test('packageFilter', function (t) { + function relative(x) { + return path.relative(__dirname, x); + } + + function testPackageFilter(preserveSymlinks) { + return function (st) { + st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition + + var destMain = 'symlinks/dest/node_modules/mod-a/index.js'; + var destPkg = 'symlinks/dest/node_modules/mod-a/package.json'; + var sourceMain = 'symlinks/source/node_modules/mod-a/index.js'; + var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json'; + var destDir = path.join(__dirname, 'symlinks', 'dest'); + + /* eslint multiline-comment-style: 0 */ + /* v2.x will restore these tests + var packageFilterPath = []; + var actualPath = resolve.sync('mod-a', { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile, dir) { + packageFilterPath.push(pkgfile); + } + }); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'sync: actual path is correct' + ); + st.deepEqual( + map(packageFilterPath, relative), + map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize), + 'sync: packageFilter pkgfile arg is correct' + ); + */ + + var asyncPackageFilterPath = []; + resolve( + 'mod-a', + { + basedir: destDir, + preserveSymlinks: preserveSymlinks, + packageFilter: function (pkg, pkgfile) { + asyncPackageFilterPath.push(pkgfile); + } + }, + function (err, actualPath) { + st.error(err, 'no error'); + st.equal( + relative(actualPath), + path.normalize(preserveSymlinks ? destMain : sourceMain), + 'async: actual path is correct' + ); + st.deepEqual( + map(asyncPackageFilterPath, relative), + map( + preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg], + path.normalize + ), + 'async: packageFilter pkgfile arg is correct' + ); + } + ); + }; + } + + t.test('preserveSymlinks: false', testPackageFilter(false)); + + t.test('preserveSymlinks: true', testPackageFilter(true)); + + t.end(); +}); diff --git a/node_modules/ret/LICENSE b/node_modules/ret/LICENSE new file mode 100644 index 0000000..b351ee8 --- /dev/null +++ b/node_modules/ret/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011 by Roly Fentanes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ret/README.md b/node_modules/ret/README.md new file mode 100644 index 0000000..28563e1 --- /dev/null +++ b/node_modules/ret/README.md @@ -0,0 +1,183 @@ +# Regular Expression Tokenizer + +Tokenizes strings that represent a regular expressions. + +[![Build Status](https://secure.travis-ci.org/fent/ret.js.svg)](http://travis-ci.org/fent/ret.js) +[![Dependency Status](https://david-dm.org/fent/ret.js.svg)](https://david-dm.org/fent/ret.js) +[![codecov](https://codecov.io/gh/fent/ret.js/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/ret.js) + +# Usage + +```js +var ret = require('ret'); + +var tokens = ret(/foo|bar/.source); +``` + +`tokens` will contain the following object + +```js +{ + "type": ret.types.ROOT + "options": [ + [ { "type": ret.types.CHAR, "value", 102 }, + { "type": ret.types.CHAR, "value", 111 }, + { "type": ret.types.CHAR, "value", 111 } ], + [ { "type": ret.types.CHAR, "value", 98 }, + { "type": ret.types.CHAR, "value", 97 }, + { "type": ret.types.CHAR, "value", 114 } ] + ] +} +``` + +# Token Types + +`ret.types` is a collection of the various token types exported by ret. + +### ROOT + +Only used in the root of the regexp. This is needed due to the posibility of the root containing a pipe `|` character. In that case, the token will have an `options` key that will be an array of arrays of tokens. If not, it will contain a `stack` key that is an array of tokens. + +```js +{ + "type": ret.types.ROOT, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.ROOT, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### GROUP + +Groups contain tokens that are inside of a parenthesis. If the group begins with `?` followed by another character, it's a special type of group. A ':' tells the group not to be remembered when `exec` is used. '=' means the previous token matches only if followed by this group, and '!' means the previous token matches only if NOT followed. + +Like root, it can contain an `options` key instead of `stack` if there is a pipe. + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "stack": [token1, token2...], +} +``` + +```js +{ + "type": ret.types.GROUP, + "remember" true, + "followedBy": false, + "notFollowedBy": false, + "options" [ + [token1, token2...], + [othertoken1, othertoken2...] + ... + ], +} +``` + +### POSITION + +`\b`, `\B`, `^`, and `$` specify positions in the regexp. + +```js +{ + "type": ret.types.POSITION, + "value": "^", +} +``` + +### SET + +Contains a key `set` specifying what tokens are allowed and a key `not` specifying if the set should be negated. A set can contain other sets, ranges, and characters. + +```js +{ + "type": ret.types.SET, + "set": [token1, token2...], + "not": false, +} +``` + +### RANGE + +Used in set tokens to specify a character range. `from` and `to` are character codes. + +```js +{ + "type": ret.types.RANGE, + "from": 97, + "to": 122, +} +``` + +### REPETITION + +```js +{ + "type": ret.types.REPETITION, + "min": 0, + "max": Infinity, + "value": token, +} +``` + +### REFERENCE + +References a group token. `value` is 1-9. + +```js +{ + "type": ret.types.REFERENCE, + "value": 1, +} +``` + +### CHAR + +Represents a single character token. `value` is the character code. This might seem a bit cluttering instead of concatenating characters together. But since repetition tokens only repeat the last token and not the last clause like the pipe, it's simpler to do it this way. + +```js +{ + "type": ret.types.CHAR, + "value": 123, +} +``` + +## Errors + +ret.js will throw errors if given a string with an invalid regular expression. All possible errors are + +* Invalid group. When a group with an immediate `?` character is followed by an invalid character. It can only be followed by `!`, `=`, or `:`. Example: `/(?_abc)/` +* Nothing to repeat. Thrown when a repetitional token is used as the first token in the current clause, as in right in the beginning of the regexp or group, or right after a pipe. Example: `/foo|?bar/`, `/{1,3}foo|bar/`, `/foo(+bar)/` +* Unmatched ). A group was not opened, but was closed. Example: `/hello)2u/` +* Unterminated group. A group was not closed. Example: `/(1(23)4/` +* Unterminated character class. A custom character set was not closed. Example: `/[abc/` + + +# Install + + npm install ret + + +# Tests + +Tests are written with [vows](http://vowsjs.org/) + +```bash +npm test +``` + +# License + +MIT diff --git a/node_modules/ret/lib/index.js b/node_modules/ret/lib/index.js new file mode 100644 index 0000000..0e151c3 --- /dev/null +++ b/node_modules/ret/lib/index.js @@ -0,0 +1,282 @@ +var util = require('./util'); +var types = require('./types'); +var sets = require('./sets'); +var positions = require('./positions'); + + +module.exports = function(regexpStr) { + var i = 0, l, c, + start = { type: types.ROOT, stack: []}, + + // Keep track of last clause/group and stack. + lastGroup = start, + last = start.stack, + groupStack = []; + + + var repeatErr = function(i) { + util.error(regexpStr, 'Nothing to repeat at column ' + (i - 1)); + }; + + // Decode a few escaped characters. + var str = util.strToChars(regexpStr); + l = str.length; + + // Iterate through each character in string. + while (i < l) { + c = str[i++]; + + switch (c) { + // Handle escaped characters, inclues a few sets. + case '\\': + c = str[i++]; + + switch (c) { + case 'b': + last.push(positions.wordBoundary()); + break; + + case 'B': + last.push(positions.nonWordBoundary()); + break; + + case 'w': + last.push(sets.words()); + break; + + case 'W': + last.push(sets.notWords()); + break; + + case 'd': + last.push(sets.ints()); + break; + + case 'D': + last.push(sets.notInts()); + break; + + case 's': + last.push(sets.whitespace()); + break; + + case 'S': + last.push(sets.notWhitespace()); + break; + + default: + // Check if c is integer. + // In which case it's a reference. + if (/\d/.test(c)) { + last.push({ type: types.REFERENCE, value: parseInt(c, 10) }); + + // Escaped character. + } else { + last.push({ type: types.CHAR, value: c.charCodeAt(0) }); + } + } + + break; + + + // Positionals. + case '^': + last.push(positions.begin()); + break; + + case '$': + last.push(positions.end()); + break; + + + // Handle custom sets. + case '[': + // Check if this class is 'anti' i.e. [^abc]. + var not; + if (str[i] === '^') { + not = true; + i++; + } else { + not = false; + } + + // Get all the characters in class. + var classTokens = util.tokenizeClass(str.slice(i), regexpStr); + + // Increase index by length of class. + i += classTokens[1]; + last.push({ + type: types.SET, + set: classTokens[0], + not: not, + }); + + break; + + + // Class of any character except \n. + case '.': + last.push(sets.anyChar()); + break; + + + // Push group onto stack. + case '(': + // Create group. + var group = { + type: types.GROUP, + stack: [], + remember: true, + }; + + c = str[i]; + + // If if this is a special kind of group. + if (c === '?') { + c = str[i + 1]; + i += 2; + + // Match if followed by. + if (c === '=') { + group.followedBy = true; + + // Match if not followed by. + } else if (c === '!') { + group.notFollowedBy = true; + + } else if (c !== ':') { + util.error(regexpStr, + 'Invalid group, character \'' + c + + '\' after \'?\' at column ' + (i - 1)); + } + + group.remember = false; + } + + // Insert subgroup into current group stack. + last.push(group); + + // Remember the current group for when the group closes. + groupStack.push(lastGroup); + + // Make this new group the current group. + lastGroup = group; + last = group.stack; + break; + + + // Pop group out of stack. + case ')': + if (groupStack.length === 0) { + util.error(regexpStr, 'Unmatched ) at column ' + (i - 1)); + } + lastGroup = groupStack.pop(); + + // Check if this group has a PIPE. + // To get back the correct last stack. + last = lastGroup.options ? + lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack; + break; + + + // Use pipe character to give more choices. + case '|': + // Create array where options are if this is the first PIPE + // in this clause. + if (!lastGroup.options) { + lastGroup.options = [lastGroup.stack]; + delete lastGroup.stack; + } + + // Create a new stack and add to options for rest of clause. + var stack = []; + lastGroup.options.push(stack); + last = stack; + break; + + + // Repetition. + // For every repetition, remove last element from last stack + // then insert back a RANGE object. + // This design is chosen because there could be more than + // one repetition symbols in a regex i.e. `a?+{2,3}`. + case '{': + var rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max; + if (rs !== null) { + if (last.length === 0) { + repeatErr(i); + } + min = parseInt(rs[1], 10); + max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; + i += rs[0].length; + + last.push({ + type: types.REPETITION, + min: min, + max: max, + value: last.pop(), + }); + } else { + last.push({ + type: types.CHAR, + value: 123, + }); + } + break; + + case '?': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: 1, + value: last.pop(), + }); + break; + + case '+': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 1, + max: Infinity, + value: last.pop(), + }); + break; + + case '*': + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: Infinity, + value: last.pop(), + }); + break; + + + // Default is a character that is not `\[](){}?+*^$`. + default: + last.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + } + + } + + // Check if any groups have not been closed. + if (groupStack.length !== 0) { + util.error(regexpStr, 'Unterminated group'); + } + + return start; +}; + +module.exports.types = types; diff --git a/node_modules/ret/lib/positions.js b/node_modules/ret/lib/positions.js new file mode 100644 index 0000000..80677ee --- /dev/null +++ b/node_modules/ret/lib/positions.js @@ -0,0 +1,17 @@ +var types = require('./types'); + +exports.wordBoundary = function() { + return { type: types.POSITION, value: 'b' }; +}; + +exports.nonWordBoundary = function() { + return { type: types.POSITION, value: 'B' }; +}; + +exports.begin = function() { + return { type: types.POSITION, value: '^' }; +}; + +exports.end = function() { + return { type: types.POSITION, value: '$' }; +}; diff --git a/node_modules/ret/lib/sets.js b/node_modules/ret/lib/sets.js new file mode 100644 index 0000000..5fb6be5 --- /dev/null +++ b/node_modules/ret/lib/sets.js @@ -0,0 +1,82 @@ +var types = require('./types'); + +var INTS = function() { + return [{ type: types.RANGE , from: 48, to: 57 }]; +}; + +var WORDS = function() { + return [ + { type: types.CHAR, value: 95 }, + { type: types.RANGE, from: 97, to: 122 }, + { type: types.RANGE, from: 65, to: 90 } + ].concat(INTS()); +}; + +var WHITESPACE = function() { + return [ + { type: types.CHAR, value: 9 }, + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 11 }, + { type: types.CHAR, value: 12 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 32 }, + { type: types.CHAR, value: 160 }, + { type: types.CHAR, value: 5760 }, + { type: types.CHAR, value: 6158 }, + { type: types.CHAR, value: 8192 }, + { type: types.CHAR, value: 8193 }, + { type: types.CHAR, value: 8194 }, + { type: types.CHAR, value: 8195 }, + { type: types.CHAR, value: 8196 }, + { type: types.CHAR, value: 8197 }, + { type: types.CHAR, value: 8198 }, + { type: types.CHAR, value: 8199 }, + { type: types.CHAR, value: 8200 }, + { type: types.CHAR, value: 8201 }, + { type: types.CHAR, value: 8202 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + { type: types.CHAR, value: 8239 }, + { type: types.CHAR, value: 8287 }, + { type: types.CHAR, value: 12288 }, + { type: types.CHAR, value: 65279 } + ]; +}; + +var NOTANYCHAR = function() { + return [ + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + ]; +}; + +// Predefined class objects. +exports.words = function() { + return { type: types.SET, set: WORDS(), not: false }; +}; + +exports.notWords = function() { + return { type: types.SET, set: WORDS(), not: true }; +}; + +exports.ints = function() { + return { type: types.SET, set: INTS(), not: false }; +}; + +exports.notInts = function() { + return { type: types.SET, set: INTS(), not: true }; +}; + +exports.whitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: false }; +}; + +exports.notWhitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: true }; +}; + +exports.anyChar = function() { + return { type: types.SET, set: NOTANYCHAR(), not: true }; +}; diff --git a/node_modules/ret/lib/types.js b/node_modules/ret/lib/types.js new file mode 100644 index 0000000..9484145 --- /dev/null +++ b/node_modules/ret/lib/types.js @@ -0,0 +1,10 @@ +module.exports = { + ROOT : 0, + GROUP : 1, + POSITION : 2, + SET : 3, + RANGE : 4, + REPETITION : 5, + REFERENCE : 6, + CHAR : 7, +}; diff --git a/node_modules/ret/lib/util.js b/node_modules/ret/lib/util.js new file mode 100644 index 0000000..97d8cf5 --- /dev/null +++ b/node_modules/ret/lib/util.js @@ -0,0 +1,111 @@ +var types = require('./types'); +var sets = require('./sets'); + + +// All of these are private and only used by randexp. +// It's assumed that they will always be called with the correct input. + +var CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?'; +var SLSH = { '0': 0, 't': 9, 'n': 10, 'v': 11, 'f': 12, 'r': 13 }; + +/** + * Finds character representations in str and convert all to + * their respective characters + * + * @param {String} str + * @return {String} + */ +exports.strToChars = function(str) { + /* jshint maxlen: false */ + var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; + str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) { + if (lbs) { + return s; + } + + var code = b ? 8 : + a16 ? parseInt(a16, 16) : + b16 ? parseInt(b16, 16) : + c8 ? parseInt(c8, 8) : + dctrl ? CTRL.indexOf(dctrl) : + SLSH[eslsh]; + + var c = String.fromCharCode(code); + + // Escape special regex characters. + if (/[\[\]{}\^$.|?*+()]/.test(c)) { + c = '\\' + c; + } + + return c; + }); + + return str; +}; + + +/** + * turns class into tokens + * reads str until it encounters a ] not preceeded by a \ + * + * @param {String} str + * @param {String} regexpStr + * @return {Array., Number>} + */ +exports.tokenizeClass = function(str, regexpStr) { + /* jshint maxlen: false */ + var tokens = []; + var regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g; + var rs, c; + + + while ((rs = regexp.exec(str)) != null) { + if (rs[1]) { + tokens.push(sets.words()); + + } else if (rs[2]) { + tokens.push(sets.ints()); + + } else if (rs[3]) { + tokens.push(sets.whitespace()); + + } else if (rs[4]) { + tokens.push(sets.notWords()); + + } else if (rs[5]) { + tokens.push(sets.notInts()); + + } else if (rs[6]) { + tokens.push(sets.notWhitespace()); + + } else if (rs[7]) { + tokens.push({ + type: types.RANGE, + from: (rs[8] || rs[9]).charCodeAt(0), + to: rs[10].charCodeAt(0), + }); + + } else if (c = rs[12]) { + tokens.push({ + type: types.CHAR, + value: c.charCodeAt(0), + }); + + } else { + return [tokens, regexp.lastIndex]; + } + } + + exports.error(regexpStr, 'Unterminated character class'); +}; + + +/** + * Shortcut to throw errors. + * + * @param {String} regexp + * @param {String} msg + */ +exports.error = function(regexp, msg) { + throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg); +}; diff --git a/node_modules/ret/package.json b/node_modules/ret/package.json new file mode 100644 index 0000000..2fde9a4 --- /dev/null +++ b/node_modules/ret/package.json @@ -0,0 +1,35 @@ +{ + "name": "ret", + "description": "Tokenizes a string that represents a regular expression.", + "keywords": [ + "regex", + "regexp", + "regular expression", + "parser", + "tokenizer" + ], + "version": "0.1.15", + "repository": { + "type": "git", + "url": "git://github.com/fent/ret.js.git" + }, + "author": "Roly Fentanes (https://github.com/fent)", + "main": "./lib/index.js", + "files": [ + "lib" + ], + "scripts": { + "test": "istanbul cover vows -- --spec test/*-test.js" + }, + "directories": { + "lib": "./lib" + }, + "devDependencies": { + "istanbul": "*", + "vows": "*" + }, + "engines": { + "node": ">=0.12" + }, + "license": "MIT" +} diff --git a/node_modules/safe-array-concat/.eslintrc b/node_modules/safe-array-concat/.eslintrc new file mode 100644 index 0000000..fc909f1 --- /dev/null +++ b/node_modules/safe-array-concat/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "max-lines-per-function": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/safe-array-concat/.github/FUNDING.yml b/node_modules/safe-array-concat/.github/FUNDING.yml new file mode 100644 index 0000000..bbd94cd --- /dev/null +++ b/node_modules/safe-array-concat/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-array-concat +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/safe-array-concat/.nycrc b/node_modules/safe-array-concat/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/safe-array-concat/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/safe-array-concat/CHANGELOG.md b/node_modules/safe-array-concat/CHANGELOG.md new file mode 100644 index 0000000..70d78df --- /dev/null +++ b/node_modules/safe-array-concat/CHANGELOG.md @@ -0,0 +1,58 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/ljharb/safe-array-concat/compare/v1.1.1...v1.1.2) - 2024-03-09 + +### Commits + +- [types] use a generic [`a1d744d`](https://github.com/ljharb/safe-array-concat/commit/a1d744d749033c91f0c108b28ac6dbc6016ecce4) +- [Dev Deps] update `@ljharb/tsconfig`, `set-function-length` [`3d3da0a`](https://github.com/ljharb/safe-array-concat/commit/3d3da0ab110bce21f466381c5d09f93200a20f85) + +## [v1.1.1](https://github.com/ljharb/safe-array-concat/compare/v1.1.0...v1.1.1) - 2024-03-09 + +### Commits + +- [types] use shared config [`f509f80`](https://github.com/ljharb/safe-array-concat/commit/f509f80fb2dd9734c309ccb59ca9451c5a5de885) +- [actions] remove redundant finisher; use reusable workflows [`b5f5ff4`](https://github.com/ljharb/safe-array-concat/commit/b5f5ff497976a48e291788b26b741cd4f3d388eb) +- [types] use handwritten d.ts instead of emit [`e717048`](https://github.com/ljharb/safe-array-concat/commit/e717048433b52d3a3240b7c697b5736756ed296e) +- [Dev Deps] update `set-function-length`, `tape` [`dde26a7`](https://github.com/ljharb/safe-array-concat/commit/dde26a7600ebe8ebc8f45d1bf8f1a970175604d8) +- [Deps] update `call-bind`, `get-intrinsic` [`d5d2cde`](https://github.com/ljharb/safe-array-concat/commit/d5d2cde9e5b7179d00d85e007b80b138969c5968) +- [Dev Deps] update `tape` [`9454c5a`](https://github.com/ljharb/safe-array-concat/commit/9454c5a3beacb08200b4b00b7ffa54a572cb76ab) +- [Tests] add `@arethetypeswrong/cli [`00a5243`](https://github.com/ljharb/safe-array-concat/commit/00a5243a5b923ff2b694b3b5ef4ce39027e30f6e) +- [Deps] update `get-intrinsic` [`c935764`](https://github.com/ljharb/safe-array-concat/commit/c9357646c3923a1351dca21f175b2b421dd15da5) + +## [v1.1.0](https://github.com/ljharb/safe-array-concat/compare/v1.0.1...v1.1.0) - 2024-01-15 + +### Commits + +- [New] add types [`bd92413`](https://github.com/ljharb/safe-array-concat/commit/bd92413643b2bd0ad62e854172fad129d3899dc1) +- [Dev Deps] update `aud`, `mock-property`, `npmignore`, `set-function-length`, `tape` [`497ffcb`](https://github.com/ljharb/safe-array-concat/commit/497ffcbb271ad61752756ec363ad5b9400e4d367) +- [Deps] update `call-bind`, `get-intrinsic` [`770f870`](https://github.com/ljharb/safe-array-concat/commit/770f8704d3751b947c7f4772d9ee38d8bcdecf44) +- [Dev Deps] update `mock-property`, `tape` [`be76bd9`](https://github.com/ljharb/safe-array-concat/commit/be76bd958fa73607a105122a8770677ecbdf78f0) +- [Tests] use `set-function-length/env` [`89b1167`](https://github.com/ljharb/safe-array-concat/commit/89b116758d91ad521f963cccf056f9a3f0b18c20) +- [meta] add missing npmrc values [`3185cc7`](https://github.com/ljharb/safe-array-concat/commit/3185cc7a6773baf625c65bb58ffb9b7ee5f3306e) +- [meta] add `sideEffects` flag [`df6c7eb`](https://github.com/ljharb/safe-array-concat/commit/df6c7ebca7f2fd2f152fe2c2a2260d21728e70a3) + +## [v1.0.1](https://github.com/ljharb/safe-array-concat/compare/v1.0.0...v1.0.1) - 2023-09-05 + +### Fixed + +- [Perf] set `Symbol.isConcatSpreadable` only when required [`#2`](https://github.com/ljharb/safe-array-concat/issues/2) + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`c0791b0`](https://github.com/ljharb/safe-array-concat/commit/c0791b00b74e70113921c32d4d1fd494b7e8f555) +- [Deps] update `get-intrinsic` [`7d07ae6`](https://github.com/ljharb/safe-array-concat/commit/7d07ae69d512bb3b6fb2131f1c824b5ffd85af9f) + +## v1.0.0 - 2023-04-20 + +### Commits + +- Initial implementation, tests, readme [`31b8e70`](https://github.com/ljharb/safe-array-concat/commit/31b8e709bbba4b01ebc51cc15cdcc7012fe58341) +- Initial commit [`83d38c6`](https://github.com/ljharb/safe-array-concat/commit/83d38c6f4cde453063393482d9129b134d403d0a) +- npm init [`516fdc2`](https://github.com/ljharb/safe-array-concat/commit/516fdc2bef306ec13f98b1f1b49c929b5308907f) +- Only apps should have lockfiles [`9cfa07b`](https://github.com/ljharb/safe-array-concat/commit/9cfa07b9112107b5ba22c74baca8cb80934a09f2) diff --git a/node_modules/safe-array-concat/LICENSE b/node_modules/safe-array-concat/LICENSE new file mode 100644 index 0000000..b4213ac --- /dev/null +++ b/node_modules/safe-array-concat/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/safe-array-concat/README.md b/node_modules/safe-array-concat/README.md new file mode 100644 index 0000000..c7e1d45 --- /dev/null +++ b/node_modules/safe-array-concat/README.md @@ -0,0 +1,53 @@ +# safe-array-concat [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable + +## Getting started + +```sh +npm install --save safe-array-concat +``` + +## Usage/Examples + +```js +var safeConcat = require('safe-array-concat'); +var assert = require('assert'); + +assert.deepEqual([].concat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with normal concat'); +assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with safe concat'); + +String.prototype[Symbol.isConcatSpreadable] = true; +assert.deepEqual([].concat('foo', Object('bar')), ['foo', 'b', 'a', 'r'], 'spreadable String objects are spread with normal concat!!!'); +assert.deepEqual(safeConcat('foo', Object('bar')), ['foo', Object('bar')], 'spreadable String objects are not spread with safe concat'); + +Array.prototype[Symbol.isConcatSpreadable] = false; +assert.deepEqual([].concat([1, 2], 3, [[4]]), [[], [1, 2], 3, [[4]]], 'non-concat-spreadable arrays do not spread with normal concat!!!'); +assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'non-concat-spreadable arrays still spread with safe concat'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-array-concat +[npm-version-svg]: https://versionbadg.es/ljharb/safe-array-concat.svg +[deps-svg]: https://david-dm.org/ljharb/safe-array-concat.svg +[deps-url]: https://david-dm.org/ljharb/safe-array-concat +[dev-deps-svg]: https://david-dm.org/ljharb/safe-array-concat/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-array-concat#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-array-concat.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-array-concat.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-array-concat.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-array-concat +[codecov-image]: https://codecov.io/gh/ljharb/safe-array-concat/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/safe-array-concat/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-array-concat +[actions-url]: https://github.com/ljharb/safe-array-concat/actions diff --git a/node_modules/safe-array-concat/index.d.ts b/node_modules/safe-array-concat/index.d.ts new file mode 100644 index 0000000..4b204c0 --- /dev/null +++ b/node_modules/safe-array-concat/index.d.ts @@ -0,0 +1,3 @@ +declare function safeArrayConcat(item: T | T[], ...items: (T | T[])[]): T[]; + +export = safeArrayConcat; diff --git a/node_modules/safe-array-concat/index.js b/node_modules/safe-array-concat/index.js new file mode 100644 index 0000000..ec9119a --- /dev/null +++ b/node_modules/safe-array-concat/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $concat = GetIntrinsic('%Array.prototype.concat%'); + +var callBind = require('call-bind'); + +var callBound = require('call-bind/callBound'); +var $slice = callBound('Array.prototype.slice'); + +var hasSymbols = require('has-symbols/shams')(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; + +/** @type {never[]} */ var empty = []; +var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; + +// eslint-disable-next-line no-extra-parens +var isArray = isConcatSpreadable ? /** @type {(value: unknown) => value is unknown[]} */ (require('isarray')) : null; + +/** @type {import('.')} */ +module.exports = isConcatSpreadable + // eslint-disable-next-line no-unused-vars + ? function safeArrayConcat(item) { + for (var i = 0; i < arguments.length; i += 1) { + /** @type {typeof item} */ var arg = arguments[i]; + // @ts-expect-error ts(2538) see https://github.com/microsoft/TypeScript/issues/9998#issuecomment-1890787975; works if `const` + if (arg && typeof arg === 'object' && typeof arg[isConcatSpreadable] === 'boolean') { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + if (!empty[isConcatSpreadable]) { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + empty[isConcatSpreadable] = true; + } + // @ts-expect-error ts(2721) ts(18047) not sure why TS can't figure out this can't be null + var arr = isArray(arg) ? $slice(arg) : [arg]; + // @ts-expect-error ts(7015) TS can't handle expandos on an array + arr[isConcatSpreadable] = true; // shadow the property. TODO: use [[Define]] + arguments[i] = arr; + } + } + // @ts-expect-error ts(2345) https://github.com/microsoft/TypeScript/issues/57164 TS doesn't understand that apply can take an arguments object + return $concatApply(arguments); + } + : callBind($concat, empty); diff --git a/node_modules/safe-array-concat/node_modules/isarray/LICENSE b/node_modules/safe-array-concat/node_modules/isarray/LICENSE new file mode 100644 index 0000000..de32266 --- /dev/null +++ b/node_modules/safe-array-concat/node_modules/isarray/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/safe-array-concat/node_modules/isarray/README.md b/node_modules/safe-array-concat/node_modules/isarray/README.md new file mode 100644 index 0000000..3e160b2 --- /dev/null +++ b/node_modules/safe-array-concat/node_modules/isarray/README.md @@ -0,0 +1,38 @@ + +# isarray + +`Array#isArray` for older browsers and deprecated Node.js versions. + +[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) +[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) + +[![browser support](https://ci.testling.com/juliangruber/isarray.png) +](https://ci.testling.com/juliangruber/isarray) + +__Just use Array.isArray directly__, unless you need to support those older versions. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](https://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/node-browserify). + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! diff --git a/node_modules/safe-array-concat/node_modules/isarray/index.js b/node_modules/safe-array-concat/node_modules/isarray/index.js new file mode 100644 index 0000000..a57f634 --- /dev/null +++ b/node_modules/safe-array-concat/node_modules/isarray/index.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; diff --git a/node_modules/safe-array-concat/node_modules/isarray/package.json b/node_modules/safe-array-concat/node_modules/isarray/package.json new file mode 100644 index 0000000..fb0e89b --- /dev/null +++ b/node_modules/safe-array-concat/node_modules/isarray/package.json @@ -0,0 +1,48 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "2.0.5", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "files": [ + "index.js" + ], + "dependencies": {}, + "devDependencies": { + "tape": "~2.13.4" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "scripts": { + "test": "tape test.js" + } +} diff --git a/node_modules/safe-array-concat/package.json b/node_modules/safe-array-concat/package.json new file mode 100644 index 0000000..1cee4fe --- /dev/null +++ b/node_modules/safe-array-concat/package.json @@ -0,0 +1,92 @@ +{ + "name": "safe-array-concat", + "version": "1.1.2", + "description": "`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prelint": "npm run tsc", + "lint": "eslint --ext=js,mjs .", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "postlint": "evalmd README.md", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "nyc tape test", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "keywords": [ + "safe", + "Array", + "concat", + "push", + "isConcatSpreadable" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-array-concat.git" + }, + "bugs": { + "url": "https://github.com/ljharb/safe-array-concat/issues" + }, + "homepage": "https://github.com/ljharb/safe-array-concat#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.2.0", + "@types/call-bind": "^1.0.5", + "@types/get-intrinsic": "^1.2.2", + "@types/has-symbols": "^1.0.2", + "@types/isarray": "^2.0.2", + "@types/mock-property": "^1.0.2", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "set-function-length": "^1.2.2", + "tape": "^5.7.5", + "typescript": "next" + }, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">=0.4" + } +} diff --git a/node_modules/safe-array-concat/test/index.js b/node_modules/safe-array-concat/test/index.js new file mode 100644 index 0000000..ce52abe --- /dev/null +++ b/node_modules/safe-array-concat/test/index.js @@ -0,0 +1,95 @@ +'use strict'; + +var test = require('tape'); +var mockProperty = require('mock-property'); +var hasSymbols = require('has-symbols/shams')(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; +var species = hasSymbols && Symbol.species; + +var boundFnsHaveConfigurableLengths = require('set-function-length/env').boundFnsHaveConfigurableLengths; + +var safeConcat = require('../'); + +test('safe-array-concat', function (t) { + t.equal(typeof safeConcat, 'function', 'is a function'); + t.equal( + safeConcat.length, + boundFnsHaveConfigurableLengths ? 1 : 0, + 'has a length of ' + (boundFnsHaveConfigurableLengths ? 1 : '0 (function lengths are not configurable)') + ); + + t.deepEqual( + // eslint-disable-next-line no-extra-parens + safeConcat(/** @type {(string | number | number[])[]} */ ([1, 2]), [3, 4], 'foo', 5, 6, [[7]]), + [1, 2, 3, 4, 'foo', 5, 6, [7]], + 'works with flat and nested arrays' + ); + + t.deepEqual( + safeConcat(undefined, 1, 2), + [undefined, 1, 2], + 'first item as undefined is not the concat receiver, which would throw via ToObject' + ); + t.deepEqual( + safeConcat(null, 1, 2), + [null, 1, 2], + 'first item as null is not the concat receiver, which would throw via ToObject' + ); + + var arr = [1, 2]; + arr.constructor = function C() { + return { args: arguments }; + }; + t.deepEqual( + safeConcat(arr, 3, 4), + [1, 2, 3, 4], + 'first item as an array with a nonArray .constructor; ignores constructor' + ); + + t.test('has Symbol.species', { skip: !species }, function (st) { + var speciesArr = [1, 2]; + // @ts-expect-error ts(2740) TS's `constructor` type requires a function + speciesArr.constructor = {}; + // @ts-expect-error ts(2538) TS can't type narrow from tape's `skip` + speciesArr.constructor[species] = function Species() { + return { args: arguments }; + }; + + st.deepEqual( + safeConcat(speciesArr, 3, 4), + [1, 2, 3, 4], + 'first item as an array with a .constructor object with a Symbol.species; ignores constructor and species' + ); + + st.end(); + }); + + t.test('has isConcatSpreadable', { skip: !isConcatSpreadable }, function (st) { + // TS can't type narrow from tape's `skip` + if (isConcatSpreadable) { + st.teardown(mockProperty(String.prototype, isConcatSpreadable, { value: true })); + + var nonSpreadable = [1, 2]; + // @ts-expect-error ts(7015) TS can't handle expandos on an array + nonSpreadable[isConcatSpreadable] = false; + + st.deepEqual( + safeConcat(nonSpreadable, 3, 4, 'foo', Object('bar')), + [1, 2, 3, 4, 'foo', Object('bar')], + 'a non-concat-spreadable array is spreaded, and a concat-spreadable String is not spreaded' + ); + + st.teardown(mockProperty(Array.prototype, isConcatSpreadable, { value: false })); + + st.deepEqual( + safeConcat([1, 2], 3, 4, 'foo', Object('bar')), + [1, 2, 3, 4, 'foo', Object('bar')], + 'all arrays marked non-concat-spreadable are still spreaded, and a concat-spreadable String is not spreaded' + ); + } + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/safe-array-concat/tsconfig.json b/node_modules/safe-array-concat/tsconfig.json new file mode 100644 index 0000000..0ce1896 --- /dev/null +++ b/node_modules/safe-array-concat/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/safe-buffer/README.md b/node_modules/safe-buffer/README.md new file mode 100644 index 0000000..e9a81af --- /dev/null +++ b/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts new file mode 100644 index 0000000..e9fed80 --- /dev/null +++ b/node_modules/safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js new file mode 100644 index 0000000..22438da --- /dev/null +++ b/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json new file mode 100644 index 0000000..623fbc3 --- /dev/null +++ b/node_modules/safe-buffer/package.json @@ -0,0 +1,37 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.1.2", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + } +} diff --git a/node_modules/safe-regex-test/.eslintrc b/node_modules/safe-regex-test/.eslintrc new file mode 100644 index 0000000..ff89be3 --- /dev/null +++ b/node_modules/safe-regex-test/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/node_modules/safe-regex-test/.github/FUNDING.yml b/node_modules/safe-regex-test/.github/FUNDING.yml new file mode 100644 index 0000000..ef4a267 --- /dev/null +++ b/node_modules/safe-regex-test/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-regex-test +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/safe-regex-test/.nycrc b/node_modules/safe-regex-test/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/safe-regex-test/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/safe-regex-test/CHANGELOG.md b/node_modules/safe-regex-test/CHANGELOG.md new file mode 100644 index 0000000..850a489 --- /dev/null +++ b/node_modules/safe-regex-test/CHANGELOG.md @@ -0,0 +1,43 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.3](https://github.com/ljharb/safe-regex-test/compare/v1.0.2...v1.0.3) - 2024-02-06 + +### Commits + +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`d6ba2f9`](https://github.com/ljharb/safe-regex-test/commit/d6ba2f948c679c3104ce6d6c897bedff0f1c5b74) +- [Deps] update `call-bind`, `get-intrinsic` [`5a3b1d7`](https://github.com/ljharb/safe-regex-test/commit/5a3b1d755e46f010e6930f15ec30eae023feffd3) +- [Dev Deps] update `tape` [`75fb719`](https://github.com/ljharb/safe-regex-test/commit/75fb71937c5daf1326052c59d6f251f439cd9332) + +## [v1.0.2](https://github.com/ljharb/safe-regex-test/compare/v1.0.1...v1.0.2) - 2024-01-11 + +### Commits + +- [meta] package.json `sideEffects` should be boolean [`094bb88`](https://github.com/ljharb/safe-regex-test/commit/094bb88d93ce25e26d20f5badee4e45acf0e3ac5) + +## [v1.0.1](https://github.com/ljharb/safe-regex-test/compare/v1.0.0...v1.0.1) - 2024-01-09 + +### Commits + +- [Tests] add nyc for coverage [`7e3f525`](https://github.com/ljharb/safe-regex-test/commit/7e3f5254efdf0979f72492f0e7f52a3a9814591f) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `object-inspect`, `tape` [`e7e0169`](https://github.com/ljharb/safe-regex-test/commit/e7e016949b78602f24debc1185c26f33cc4e9d1b) +- [actions] update rebase action [`2962694`](https://github.com/ljharb/safe-regex-test/commit/2962694bce7ffa278e873911072c11119bb3a608) +- [readme] add testing badges; remove david-dm badges [`e9dfd83`](https://github.com/ljharb/safe-regex-test/commit/e9dfd830655ac702ac7b7947f7076bb524994968) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`496fe99`](https://github.com/ljharb/safe-regex-test/commit/496fe99aa66f20cadb1cf79f6d479b87ae95b620) +- [Deps] update `call-bind`, `get-intrinsic` [`d94c5ba`](https://github.com/ljharb/safe-regex-test/commit/d94c5badd0362df8ff7ced38b50d20550fd629c1) +- [meta] add missing `engines.node` [`f3d4711`](https://github.com/ljharb/safe-regex-test/commit/f3d4711a51b21330e34f5f27e45452fbdb924715) +- [Deps] update `get-intrinsic` [`0eeedd7`](https://github.com/ljharb/safe-regex-test/commit/0eeedd74d0313fab9b0718895c02905f702ecb4d) +- [meta] add `sideEffects` flag [`fe1655f`](https://github.com/ljharb/safe-regex-test/commit/fe1655f16449208d987d9f4b7dafb15564ca80f7) + +## v1.0.0 - 2022-09-22 + +### Commits + +- Initial implementation, tests, readme [`0273e9f`](https://github.com/ljharb/safe-regex-test/commit/0273e9f96f4b09df413523f4faacc8ae9ac5e6cb) +- Initial commit [`b6c1edf`](https://github.com/ljharb/safe-regex-test/commit/b6c1edf740e6105fb71c34c1c69fadd837e8f7ab) +- npm init [`c7f5765`](https://github.com/ljharb/safe-regex-test/commit/c7f576580607b16458b5a16e6bfa3b639e49c6bd) +- Only apps should have lockfiles [`1162bf0`](https://github.com/ljharb/safe-regex-test/commit/1162bf011835040f7e2c9936734294b2d98536bf) diff --git a/node_modules/safe-regex-test/LICENSE b/node_modules/safe-regex-test/LICENSE new file mode 100644 index 0000000..6abfe14 --- /dev/null +++ b/node_modules/safe-regex-test/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/safe-regex-test/README.md b/node_modules/safe-regex-test/README.md new file mode 100644 index 0000000..fca66d4 --- /dev/null +++ b/node_modules/safe-regex-test/README.md @@ -0,0 +1,46 @@ +# safe-regex-test [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Give a regex, get a robust predicate function that tests it against a string. This will work even if `RegExp.prototype` is altered later. + +## Getting started + +```sh +npm install --save safe-regex-test +``` + +## Usage/Examples + +```js +var regexTester = require('safe-regex-test'); +var assert = require('assert'); + +var tester = regexTester('a'); +assert.ok(tester('a')); +assert.notOk(tester('b')); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-regex-test +[npm-version-svg]: https://versionbadg.es/ljharb/safe-regex-test.svg +[deps-svg]: https://david-dm.org/ljharb/safe-regex-test.svg +[deps-url]: https://david-dm.org/ljharb/safe-regex-test +[dev-deps-svg]: https://david-dm.org/ljharb/safe-regex-test/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-regex-test#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-regex-test.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-regex-test.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-regex-test.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-regex-test +[codecov-image]: https://codecov.io/gh/ljharb/safe-regex-test/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/safe-regex-test/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-regex-test +[actions-url]: https://github.com/ljharb/safe-regex-test/actions diff --git a/node_modules/safe-regex-test/index.js b/node_modules/safe-regex-test/index.js new file mode 100644 index 0000000..c57aad7 --- /dev/null +++ b/node_modules/safe-regex-test/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var isRegex = require('is-regex'); + +var $exec = callBound('RegExp.prototype.exec'); +var $TypeError = require('es-errors/type'); + +module.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError('`regex` must be a RegExp'); + } + return function test(s) { + return $exec(regex, s) !== null; + }; +}; diff --git a/node_modules/safe-regex-test/package.json b/node_modules/safe-regex-test/package.json new file mode 100644 index 0000000..902178c --- /dev/null +++ b/node_modules/safe-regex-test/package.json @@ -0,0 +1,80 @@ +{ + "name": "safe-regex-test", + "version": "1.0.3", + "description": "Give a regex, get a robust predicate function that tests it against a string.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "lint": "eslint --ext=js,mjs .", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "nyc tape test", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-regex-test.git" + }, + "keywords": [ + "regex", + "regexp", + "test", + "tester", + "safe", + "robust", + "exec" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/safe-regex-test/issues" + }, + "homepage": "https://github.com/ljharb/safe-regex-test#readme", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/safe-regex-test/test/index.js b/node_modules/safe-regex-test/test/index.js new file mode 100644 index 0000000..a2e1f9d --- /dev/null +++ b/node_modules/safe-regex-test/test/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var regexTester = require('../'); + +test('regex tester', function (t) { + t.equal(typeof regexTester, 'function', 'is a function'); + + t.test('non-regexes', function (st) { + forEach(v.primitives.concat(v.objects), function (val) { + st['throws']( + function () { regexTester(val); }, + TypeError, + inspect(val) + ' is not a regex' + ); + }); + + st.end(); + }); + + t.test('regexes', function (st) { + var tester = regexTester(/a/); + + st.equal(typeof tester, 'function', 'returns a function'); + st.equal(tester('a'), true, 'returns true for a match'); + st.equal(tester('b'), false, 'returns false for a non-match'); + st.equal(tester('a'), true, 'returns true for a match again'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/safe-regex/.travis.yml b/node_modules/safe-regex/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/safe-regex/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/safe-regex/LICENSE b/node_modules/safe-regex/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/safe-regex/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/safe-regex/example/safe.js b/node_modules/safe-regex/example/safe.js new file mode 100644 index 0000000..f486f59 --- /dev/null +++ b/node_modules/safe-regex/example/safe.js @@ -0,0 +1,3 @@ +var safe = require('../'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); diff --git a/node_modules/safe-regex/index.js b/node_modules/safe-regex/index.js new file mode 100644 index 0000000..488f501 --- /dev/null +++ b/node_modules/safe-regex/index.js @@ -0,0 +1,43 @@ +var parse = require('ret'); +var types = parse.types; + +module.exports = function (re, opts) { + if (!opts) opts = {}; + var replimit = opts.limit === undefined ? 25 : opts.limit; + + if (isRegExp(re)) re = re.source; + else if (typeof re !== 'string') re = String(re); + + try { re = parse(re) } + catch (err) { return false } + + var reps = 0; + return (function walk (node, starHeight) { + if (node.type === types.REPETITION) { + starHeight ++; + reps ++; + if (starHeight > 1) return false; + if (reps > replimit) return false; + } + + if (node.options) { + for (var i = 0, len = node.options.length; i < len; i++) { + var ok = walk({ stack: node.options[i] }, starHeight); + if (!ok) return false; + } + } + var stack = node.stack || (node.value && node.value.stack); + if (!stack) return true; + + for (var i = 0; i < stack.length; i++) { + var ok = walk(stack[i], starHeight); + if (!ok) return false; + } + + return true; + })(re, 0); +}; + +function isRegExp (x) { + return {}.toString.call(x) === '[object RegExp]'; +} diff --git a/node_modules/safe-regex/package.json b/node_modules/safe-regex/package.json new file mode 100644 index 0000000..0dd631b --- /dev/null +++ b/node_modules/safe-regex/package.json @@ -0,0 +1,43 @@ +{ + "name": "safe-regex", + "version": "1.1.0", + "description": "detect possibly catastrophic, exponential-time regular expressions", + "main": "index.js", + "dependencies": { + "ret": "~0.1.10" + }, + "devDependencies": { + "tape": "^3.5.0" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8", "ie/9", "ie/10", + "firefox/latest", + "chrome/latest", + "opera/latest", + "safari/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/safe-regex.git" + }, + "homepage": "https://github.com/substack/safe-regex", + "keywords": [ + "catastrophic", + "exponential", + "regex", + "safe", + "sandbox" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT" +} diff --git a/node_modules/safe-regex/readme.markdown b/node_modules/safe-regex/readme.markdown new file mode 100644 index 0000000..83673ac --- /dev/null +++ b/node_modules/safe-regex/readme.markdown @@ -0,0 +1,65 @@ +# safe-regex + +detect potentially +[catastrophic](http://regular-expressions.mobi/catastrophic.html) +[exponential-time](http://perlgeek.de/blog-en/perl-tips/in-search-of-an-exponetial-regexp.html) +regular expressions by limiting the +[star height](https://en.wikipedia.org/wiki/Star_height) to 1 + +WARNING: This module merely *seems* to work given all the catastrophic regular +expressions I could find scouring the internet, but I don't have enough of a +background in automata to be absolutely sure that this module will catch all +exponential-time cases. + +[![browser support](https://ci.testling.com/substack/safe-regex.png)](https://ci.testling.com/substack/safe-regex) + +[![build status](https://secure.travis-ci.org/substack/safe-regex.png)](http://travis-ci.org/substack/safe-regex) + +# example + +``` js +var safe = require('safe-regex'); +var regex = process.argv.slice(2).join(' '); +console.log(safe(regex)); +``` + +``` +$ node safe.js '(x+x+)+y' +false +$ node safe.js '(beep|boop)*' +true +$ node safe.js '(a+){10}' +false +$ node safe.js '\blocation\s*:[^:\n]+\b(Oakland|San Francisco)\b' +true +``` + +# methods + +``` js +var safe = require('safe-regex') +``` + +## var ok = safe(re, opts={}) + +Return a boolean `ok` whether or not the regex `re` is safe and not possibly +catastrophic. + +`re` can be a `RegExp` object or just a string. + +If the `re` is a string and is an invalid regex, returns `false`. + +* `opts.limit` - maximum number of allowed repetitions in the entire regex. +Default: `25`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install safe-regex +``` + +# license + +MIT diff --git a/node_modules/safe-regex/test/regex.js b/node_modules/safe-regex/test/regex.js new file mode 100644 index 0000000..0bda850 --- /dev/null +++ b/node_modules/safe-regex/test/regex.js @@ -0,0 +1,50 @@ +var safe = require('../'); +var test = require('tape'); + +var good = [ + /\bOakland\b/, + /\b(Oakland|San Francisco)\b/i, + /^\d+1337\d+$/i, + /^\d+(1337|404)\d+$/i, + /^\d+(1337|404)*\d+$/i, + RegExp(Array(26).join('a?') + Array(26).join('a')), +]; + +test('safe regex', function (t) { + t.plan(good.length); + good.forEach(function (re) { + t.equal(safe(re), true); + }); +}); + + +var bad = [ + /^(a?){25}(a){25}$/, + RegExp(Array(27).join('a?') + Array(27).join('a')), + /(x+x+)+y/, + /foo|(x+x+)+y/, + /(a+){10}y/, + /(a+){2}y/, + /(.*){1,32000}[bc]/ +]; + +test('unsafe regex', function (t) { + t.plan(bad.length); + bad.forEach(function (re) { + t.equal(safe(re), false); + }); +}); + +var invalid = [ + '*Oakland*', + 'hey(yoo))', + 'abcde(?>hellow)', + '[abc' +]; + +test('invalid regex', function (t) { + t.plan(invalid.length); + invalid.forEach(function (re) { + t.equal(safe(re), false); + }); +}); diff --git a/node_modules/sass/LICENSE b/node_modules/sass/LICENSE new file mode 100644 index 0000000..be5cee6 --- /dev/null +++ b/node_modules/sass/LICENSE @@ -0,0 +1,1726 @@ +Dart Sass license: + +Copyright (c) 2016, Google Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- + +Dart SDK license: + +Copyright 2012, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +_fe_analyzer_shared license: + +Copyright 2019, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +_macros and macros license: + +Copyright 2024, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +analyzer, protobuf and protoc_plugin license: + +Copyright 2013, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +archive license: + +The MIT License + +Copyright (c) 2013-2021 Brendan Duncan. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------------------- + +args, csslib and logging license: + +Copyright 2013, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +async, cli_util, collection, mime, stream_channel and typed_data license: + +Copyright 2015, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +boolean_selector, meta and shelf_packages_handler license: + +Copyright 2016, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +charcode license: + +Copyright 2014, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +checked_yaml license: + +Copyright 2019, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +cli_pkg license: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +-------------------------------------------------------------------------------- + +cli_repl license: + +Copyright (c) 2018, Jennifer Thakar. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the project nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +convert, crypto, shelf_static, source_map_stack_trace and vm_service license: + +Copyright 2015, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +coverage, dart_style, dartdoc, glob, http, http_parser, matcher, path, pool, +pub_semver, source_span, string_scanner, test and watcher license: + +Copyright 2014, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +dart_mappable and type_plus license: + +MIT License + +Copyright (c) 2021 Kilian Schulte + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------------------- + +ffi and package_config license: + +Copyright 2019, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +file license: + +Copyright 2017, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +fixnum, http_multi_server, oauth2, shelf, shelf_web_socket, source_maps and +stack_trace license: + +Copyright 2014, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +frontend_server_client license: + +Copyright 2020, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +grinder and webkit_inspection_protocol license: + +Copyright 2013, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +html license: + +Copyright (c) 2006-2012 The Authors + +Contributors: +James Graham - jg307@cam.ac.uk +Anne van Kesteren - annevankesteren@gmail.com +Lachlan Hunt - lachlan.hunt@lachy.id.au +Matt McDonald - kanashii@kanashii.ca +Sam Ruby - rubys@intertwingly.net +Ian Hickson (Google) - ian@hixie.ch +Thomas Broyer - t.broyer@ltgt.net +Jacques Distler - distler@golem.ph.utexas.edu +Henri Sivonen - hsivonen@iki.fi +Adam Barth - abarth@webkit.org +Eric Seidel - eric@webkit.org +The Mozilla Foundation (contributions from Henri Sivonen since 2008) +David Flanagan (Mozilla) - dflanagan@mozilla.com +Google LLC (contributed the Dart port) - misc@dartlang.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- + +io, stream_transform and term_glyph license: + +Copyright 2017, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +js license: + +Copyright 2012, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +json_annotation license: + +Copyright 2017, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +lints license: + +Copyright 2021, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +markdown license: + +Copyright 2012, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +native_stack_traces license: + +Copyright 2020, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +native_synchronization license: + +Copyright 2023, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +node_interop license: + +Copyright (c) 2017, Anatoly Pulyaevskiy. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +node_preamble license: + +The MIT License (MIT) + +Copyright (c) 2015 Michael Bullington + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=== + +Copyright 2012, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +petitparser and xml license: + +The MIT License + +Copyright (c) 2006-2023 Lukas Renggli. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +-------------------------------------------------------------------------------- + +pub_api_client license: + +MIT License + +Copyright (c) 2020 Leo Farias + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +-------------------------------------------------------------------------------- + +pubspec license: + +Copyright (c) 2015, Anders Holmgren. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +pubspec_parse license: + +Copyright 2018, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +quiver and retry license: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------------------------------------------------------------------- + +test_api and test_core license: + +Copyright 2018, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +test_descriptor and web_socket_channel license: + +Copyright 2016, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +test_process license: + +Copyright 2017, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +uri license: + +Copyright 2013, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +web license: + +Copyright 2023, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +web_socket license: + +Copyright 2024, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +yaml license: + +Copyright (c) 2014, the Dart project authors. +Copyright (c) 2006, Kirill Simonov. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/sass/README.md b/node_modules/sass/README.md new file mode 100644 index 0000000..c7ad591 --- /dev/null +++ b/node_modules/sass/README.md @@ -0,0 +1,173 @@ +A pure JavaScript implementation of [Sass][sass]. **Sass makes CSS fun again**. + + + + + + + +
+ Sass logo + + npm statistics + + GitHub actions build status +
+ Appveyor build status +
+ +[sass]: https://sass-lang.com/ + +This package is a distribution of [Dart Sass][], compiled to pure JavaScript +with no native code or external dependencies. It provides a command-line `sass` +executable and a Node.js API. + +[Dart Sass]: https://github.com/sass/dart-sass + +* [Usage](#usage) +* [See Also](#see-also) +* [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass) + +## Usage + +You can install Sass globally using `npm install -g sass` which will provide +access to the `sass` executable. You can also add it to your project using +`npm install --save-dev sass`. This provides the executable as well as a +library: + +[npm]: https://www.npmjs.com/package/sass + +```js +const sass = require('sass'); + +const result = sass.compile(scssFilename); + +// OR + +// Note that `compileAsync()` is substantially slower than `compile()`. +const result = await sass.compileAsync(scssFilename); +``` + +See [the Sass website][js api] for full API documentation. + +[js api]: https://sass-lang.com/documentation/js-api + +### Legacy API + +Dart Sass also supports an older JavaScript API that's fully compatible with +[Node Sass] (with a few exceptions listed below), with support for both the +[`render()`] and [`renderSync()`] functions. This API is considered deprecated +and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects. + +[Node Sass]: https://github.com/sass/node-sass +[`render()`]: https://sass-lang.com/documentation/js-api/functions/render +[`renderSync()`]: https://sass-lang.com/documentation/js-api/functions/renderSync + +Sass's support for the legacy JavaScript API has the following limitations: + +* Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are + supported. + +* Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a + sufficiently high precision for all existing browsers, and making this + customizable would make the code substantially less efficient. + +* Dart Sass doesn't support the [`sourceComments`] option. Source maps are the + recommended way of locating the origin of generated selectors. + +[`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle +[`precision`]: https://github.com/sass/node-sass#precision +[`sourceComments`]: https://github.com/sass/node-sass#sourcecomments + +## See Also + +* [Dart Sass][], from which this package is compiled, can be used either as a + stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM + is substantially faster than running the pure JavaScript version, so this may + be appropriate for performance-sensitive applications. The Dart API is also + (currently) more user-friendly than the JavaScript API. See + [the Dart Sass README][Using Dart Sass] for details on how to use it. + +* [Node Sass][], which is a wrapper around [LibSass][], the C++ implementation + of Sass. Node Sass supports the same API as this package and is also faster + (although it's usually a little slower than Dart Sass). However, it requires a + native library which may be difficult to install, and it's generally slower to + add features and fix bugs. + +[Using Dart Sass]: https://github.com/sass/dart-sass#using-dart-sass +[Node Sass]: https://www.npmjs.com/package/node-sass +[LibSass]: https://sass-lang.com/libsass + +## Behavioral Differences from Ruby Sass + +There are a few intentional behavioral differences between Dart Sass and Ruby +Sass. These are generally places where Ruby Sass has an undesired behavior, and +it's substantially easier to implement the correct behavior than it would be to +implement compatible behavior. These should all have tracking bugs against Ruby +Sass to update the reference behavior. + +1. `@extend` only accepts simple selectors, as does the second argument of + `selector-extend()`. See [issue 1599][]. + +2. Subject selectors are not supported. See [issue 1126][]. + +3. Pseudo selector arguments are parsed as ``s rather than + having a more limited custom parsing. See [issue 2120][]. + +4. The numeric precision is set to 10. See [issue 1122][]. + +5. The indented syntax parser is more flexible: it doesn't require consistent + indentation across the whole document. See [issue 2176][]. + +6. Colors do not support channel-by-channel arithmetic. See [issue 2144][]. + +7. Unitless numbers aren't `==` to unit numbers with the same value. In + addition, map keys follow the same logic as `==`-equality. See + [issue 1496][]. + +8. `rgba()` and `hsla()` alpha values with percentage units are interpreted as + percentages. Other units are forbidden. See [issue 1525][]. + +9. Too many variable arguments passed to a function is an error. See + [issue 1408][]. + +10. Allow `@extend` to reach outside a media query if there's an identical + `@extend` defined outside that query. This isn't tracked explicitly, because + it'll be irrelevant when [issue 1050][] is fixed. + +11. Some selector pseudos containing placeholder selectors will be compiled + where they wouldn't be in Ruby Sass. This better matches the semantics of + the selectors in question, and is more efficient. See [issue 2228][]. + +12. The old-style `:property value` syntax is not supported in the indented + syntax. See [issue 2245][]. + +13. The reference combinator is not supported. See [issue 303][]. + +14. Universal selector unification is symmetrical. See [issue 2247][]. + +15. `@extend` doesn't produce an error if it matches but fails to unify. See + [issue 2250][]. + +16. Dart Sass currently only supports UTF-8 documents. We'd like to support + more, but Dart currently doesn't support them. See [dart-lang/sdk#11744][], + for example. + +[issue 1599]: https://github.com/sass/sass/issues/1599 +[issue 1126]: https://github.com/sass/sass/issues/1126 +[issue 2120]: https://github.com/sass/sass/issues/2120 +[issue 1122]: https://github.com/sass/sass/issues/1122 +[issue 2176]: https://github.com/sass/sass/issues/2176 +[issue 2144]: https://github.com/sass/sass/issues/2144 +[issue 1496]: https://github.com/sass/sass/issues/1496 +[issue 1525]: https://github.com/sass/sass/issues/1525 +[issue 1408]: https://github.com/sass/sass/issues/1408 +[issue 1050]: https://github.com/sass/sass/issues/1050 +[issue 2228]: https://github.com/sass/sass/issues/2228 +[issue 2245]: https://github.com/sass/sass/issues/2245 +[issue 303]: https://github.com/sass/sass/issues/303 +[issue 2247]: https://github.com/sass/sass/issues/2247 +[issue 2250]: https://github.com/sass/sass/issues/2250 +[dart-lang/sdk#11744]: https://github.com/dart-lang/sdk/issues/11744 + +Disclaimer: this is not an official Google product. diff --git a/node_modules/sass/package.json b/node_modules/sass/package.json new file mode 100644 index 0000000..6f805f8 --- /dev/null +++ b/node_modules/sass/package.json @@ -0,0 +1 @@ +{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=14.0.0"},"dependencies":{"chokidar":"^4.0.0","immutable":"^4.0.0","source-map-js":">=0.6.2 <2.0.0"},"keywords":["style","scss","sass","preprocessor","css"],"types":"types/index.d.ts","exports":{"types":"./types/index.d.ts","node":{"require":"./sass.node.js","default":"./sass.node.mjs"},"default":{"require":"./sass.default.cjs","default":"./sass.default.js"}},"version":"1.79.3","bin":{"sass":"sass.js"},"main":"sass.node.js"} \ No newline at end of file diff --git a/node_modules/sass/sass.dart.js b/node_modules/sass/sass.dart.js new file mode 100644 index 0000000..4ac7fab --- /dev/null +++ b/node_modules/sass/sass.dart.js @@ -0,0 +1,125933 @@ +// Because of vitejs/vite#12340, there's no way to reliably detect whether we're +// running as a (possibly bundled/polyfilled) ESM module or as a CommonJS +// module. In order to work everywhere, we have to provide the load function via +// a side channel on the global object. We write it as a stack so that multiple +// cli_pkg packages can depend on one another without clobbering their exports. +if (!globalThis._cliPkgExports) { + globalThis._cliPkgExports = []; +} +let _cliPkgExports = {}; +globalThis._cliPkgExports.push(_cliPkgExports); + +_cliPkgExports.load = function(_cliPkgRequires, _cliPkgExportParam) { +var dartNodeIsActuallyNode = typeof process !== "undefined" && (process.versions || {}).hasOwnProperty('node'); + +// make sure to keep this as 'var' +// we don't want block scoping +var self = dartNodeIsActuallyNode ? Object.create(globalThis) : globalThis; + +self.scheduleImmediate = typeof setImmediate !== "undefined" + ? function (cb) { + setImmediate(cb); + } + : function(cb) { + setTimeout(cb, 0); + }; + +// CommonJS globals. +if (typeof require !== "undefined") { + self.require = require; +} +self.exports = _cliPkgExportParam || _cliPkgExports; + +// Node.js specific exports, check to see if they exist & or polyfilled + +if (typeof process !== "undefined") { + self.process = process; +} + +if (typeof __dirname !== "undefined") { + self.__dirname = __dirname; +} + +if (typeof __filename !== "undefined") { + self.__filename = __filename; +} + +if (typeof Buffer !== "undefined") { + self.Buffer = Buffer; +} + +// if we're running in a browser, Dart supports most of this out of box +// make sure we only run these in Node.js environment + +if (dartNodeIsActuallyNode) { + // This line is to: + // 1) Prevent Webpack from bundling. + // 2) In Webpack on Node.js, make sure we're using the native Node.js require, which is available via __non_webpack_require__ + // https://github.com/mbullington/node_preamble.dart/issues/18#issuecomment-527305561 + var url = ("undefined" !== typeof __webpack_require__ ? __non_webpack_require__ : require)("url"); + + // Setting `self.location=` in Electron throws a `TypeError`, so we define it + // as a property instead to be safe. + Object.defineProperty(self, "location", { + value: { + get href() { + if (url.pathToFileURL) { + return url.pathToFileURL(process.cwd()).href + "/"; + } else { + // This isn't really a correct transformation, but it's the best we have + // for versions of Node <10.12.0 which introduced `url.pathToFileURL()`. + // For example, it will fail for paths that contain characters that need + // to be escaped in URLs. + return "file://" + (function() { + var cwd = process.cwd(); + if (process.platform != "win32") return cwd; + return "/" + cwd.replace(/\\/g, "/"); + })() + "/" + } + } + } + }); + + (function() { + function computeCurrentScript() { + try { + throw new Error(); + } catch(e) { + var stack = e.stack; + var re = new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "mg"); + var lastMatch = null; + do { + var match = re.exec(stack); + if (match != null) lastMatch = match; + } while (match != null); + return lastMatch[1]; + } + } + + // Setting `self.document=` isn't known to throw an error anywhere like + // `self.location=` does on Electron, but it's better to be future-proof + // just in case.. + var cachedCurrentScript = null; + Object.defineProperty(self, "document", { + value: { + get currentScript() { + if (cachedCurrentScript == null) { + cachedCurrentScript = {src: computeCurrentScript()}; + } + return cachedCurrentScript; + } + } + }); + })(); + + self.dartDeferredLibraryLoader = function(uri, successCallback, errorCallback) { + try { + load(uri); + successCallback(); + } catch (error) { + errorCallback(error); + } + }; +} + +self.immutable = _cliPkgRequires.immutable; +self.chokidar = _cliPkgRequires.chokidar; +self.readline = _cliPkgRequires.readline; +self.fs = _cliPkgRequires.fs; +self.nodeModule = _cliPkgRequires.nodeModule; +self.stream = _cliPkgRequires.stream; +self.util = _cliPkgRequires.util; +// Generated by dart2js (NullSafetyMode.sound, trust primitives, omit checks, lax runtime type, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.5.3. +// The code supports the following hooks: +// dartPrint(message): +// if this function is defined it is called instead of the Dart [print] +// method. +// +// dartMainRunner(main, args): +// if this function is defined, the Dart [main] method will not be invoked +// directly. Instead, a closure that will invoke [main], and its arguments +// [args] is passed to [dartMainRunner]. +// +// dartDeferredLibraryLoader(uri, successCallback, errorCallback, loadId, loadPriority): +// if this function is defined, it will be called when a deferred library +// is loaded. It should load and eval the javascript of `uri`, and call +// successCallback. If it fails to do so, it should call errorCallback with +// an error. The loadId argument is the deferred import that resulted in +// this uri being loaded. The loadPriority argument is the priority the +// library should be loaded with as specified in the code via the +// load-priority annotation (0: normal, 1: high). +// dartDeferredLibraryMultiLoader(uris, successCallback, errorCallback, loadId, loadPriority): +// if this function is defined, it will be called when a deferred library +// is loaded. It should load and eval the javascript of every URI in `uris`, +// and call successCallback. If it fails to do so, it should call +// errorCallback with an error. The loadId argument is the deferred import +// that resulted in this uri being loaded. The loadPriority argument is the +// priority the library should be loaded with as specified in the code via +// the load-priority annotation (0: normal, 1: high). +// +// dartCallInstrumentation(id, qualifiedName): +// if this function is defined, it will be called at each entry of a +// method or constructor. Used only when compiling programs with +// --experiment-call-instrumentation. +(function dartProgram() { + function copyProperties(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + to[key] = from[key]; + } + } + function mixinPropertiesHard(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!to.hasOwnProperty(key)) { + to[key] = from[key]; + } + } + } + function mixinPropertiesEasy(from, to) { + Object.assign(to, from); + } + var supportsDirectProtoAccess = function() { + var cls = function() { + }; + cls.prototype = {p: {}}; + var object = new cls(); + if (!(Object.getPrototypeOf(object) && Object.getPrototypeOf(object).p === cls.prototype.p)) + return false; + try { + if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) + return true; + if (typeof version == "function" && version.length == 0) { + var v = version(); + if (/^\d+\.\d+\.\d+\.\d+$/.test(v)) + return true; + } + } catch (_) { + } + return false; + }(); + function inherit(cls, sup) { + cls.prototype.constructor = cls; + cls.prototype["$is" + cls.name] = cls; + if (sup != null) { + if (supportsDirectProtoAccess) { + Object.setPrototypeOf(cls.prototype, sup.prototype); + return; + } + var clsPrototype = Object.create(sup.prototype); + copyProperties(cls.prototype, clsPrototype); + cls.prototype = clsPrototype; + } + } + function inheritMany(sup, classes) { + for (var i = 0; i < classes.length; i++) { + inherit(classes[i], sup); + } + } + function mixinEasy(cls, mixin) { + mixinPropertiesEasy(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function mixinHard(cls, mixin) { + mixinPropertiesHard(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function lazy(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) { + holder[name] = initializer(); + } + holder[getterName] = function() { + return this[name]; + }; + return holder[name]; + }; + } + function lazyFinal(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) { + var value = initializer(); + if (holder[name] !== uninitializedSentinel) { + A.throwLateFieldADI(name); + } + holder[name] = value; + } + var finalValue = holder[name]; + holder[getterName] = function() { + return finalValue; + }; + return finalValue; + }; + } + function makeConstList(list) { + list.immutable$list = Array; + list.fixed$length = Array; + return list; + } + function convertToFastObject(properties) { + function t() { + } + t.prototype = properties; + new t(); + return properties; + } + function convertAllToFastObject(arrayOfObjects) { + for (var i = 0; i < arrayOfObjects.length; ++i) { + convertToFastObject(arrayOfObjects[i]); + } + } + var functionCounter = 0; + function instanceTearOffGetter(isIntercepted, parameters) { + var cache = null; + return isIntercepted ? function(receiver) { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(receiver, this); + } : function() { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(this, null); + }; + } + function staticTearOffGetter(parameters) { + var cache = null; + return function() { + if (cache === null) + cache = A.closureFromTearOff(parameters).prototype; + return cache; + }; + } + var typesOffset = 0; + function tearOffParameters(container, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + if (typeof funType == "number") { + funType += typesOffset; + } + return {co: container, iS: isStatic, iI: isIntercepted, rC: requiredParameterCount, dV: optionalParameterDefaultValues, cs: callNames, fs: funsOrNames, fT: funType, aI: applyIndex || 0, nDA: needsDirectAccess}; + } + function installStaticTearOff(holder, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + var parameters = tearOffParameters(holder, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, false); + var getterFunction = staticTearOffGetter(parameters); + holder[getterName] = getterFunction; + } + function installInstanceTearOff(prototype, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + isIntercepted = !!isIntercepted; + var parameters = tearOffParameters(prototype, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, !!needsDirectAccess); + var getterFunction = instanceTearOffGetter(isIntercepted, parameters); + prototype[getterName] = getterFunction; + } + function setOrUpdateInterceptorsByTag(newTags) { + var tags = init.interceptorsByTag; + if (!tags) { + init.interceptorsByTag = newTags; + return; + } + copyProperties(newTags, tags); + } + function setOrUpdateLeafTags(newTags) { + var tags = init.leafTags; + if (!tags) { + init.leafTags = newTags; + return; + } + copyProperties(newTags, tags); + } + function updateTypes(newTypes) { + var types = init.types; + var length = types.length; + types.push.apply(types, newTypes); + return length; + } + function updateHolder(holder, newHolder) { + copyProperties(newHolder, holder); + return holder; + } + var hunkHelpers = function() { + var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex, false); + }; + }, + mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); + }; + }; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + }(); + function initializeDeferredHunk(hunk) { + typesOffset = init.types.length; + hunk(hunkHelpers, init, holders, $); + } + var J = { + makeDispatchRecord(interceptor, proto, extension, indexability) { + return {i: interceptor, p: proto, e: extension, x: indexability}; + }, + getNativeInterceptor(object) { + var proto, objectProto, $constructor, interceptor, t1, + record = object[init.dispatchPropertyName]; + if (record == null) + if ($.initNativeDispatchFlag == null) { + A.initNativeDispatch(); + record = object[init.dispatchPropertyName]; + } + if (record != null) { + proto = record.p; + if (false === proto) + return record.i; + if (true === proto) + return object; + objectProto = Object.getPrototypeOf(object); + if (proto === objectProto) + return record.i; + if (record.e === objectProto) + throw A.wrapException(A.UnimplementedError$("Return interceptor for " + A.S(proto(object, record)))); + } + $constructor = object.constructor; + if ($constructor == null) + interceptor = null; + else { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + interceptor = $constructor[t1]; + } + if (interceptor != null) + return interceptor; + interceptor = A.lookupAndCacheInterceptor(object); + if (interceptor != null) + return interceptor; + if (typeof object == "function") + return B.JavaScriptFunction_methods; + proto = Object.getPrototypeOf(object); + if (proto == null) + return B.PlainJavaScriptObject_methods; + if (proto === Object.prototype) + return B.PlainJavaScriptObject_methods; + if (typeof $constructor == "function") { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + Object.defineProperty($constructor, t1, {value: B.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + return B.UnknownJavaScriptObject_methods; + } + return B.UnknownJavaScriptObject_methods; + }, + JSArray_JSArray$fixed($length, $E) { + if ($length < 0 || $length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$allocateFixed($length, $E) { + if ($length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$growable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$allocateGrowable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$markFixed(allocation, $E) { + return J.JSArray_markFixedList(A._setArrayType(allocation, $E._eval$1("JSArray<0>"))); + }, + JSArray_markFixedList(list) { + list.fixed$length = Array; + return list; + }, + JSArray_markUnmodifiableList(list) { + list.fixed$length = Array; + list.immutable$list = Array; + return list; + }, + JSArray__compareAny(a, b) { + return J.compareTo$1$ns(a, b); + }, + JSString__isWhitespace(codeUnit) { + if (codeUnit < 256) + switch (codeUnit) { + case 9: + case 10: + case 11: + case 12: + case 13: + case 32: + case 133: + case 160: + return true; + default: + return false; + } + switch (codeUnit) { + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8232: + case 8233: + case 8239: + case 8287: + case 12288: + case 65279: + return true; + default: + return false; + } + }, + JSString__skipLeadingWhitespace(string, index) { + var t1, codeUnit; + for (t1 = string.length; index < t1;) { + codeUnit = string.charCodeAt(index); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + ++index; + } + return index; + }, + JSString__skipTrailingWhitespace(string, index) { + var index0, codeUnit; + for (; index > 0; index = index0) { + index0 = index - 1; + codeUnit = string.charCodeAt(index0); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + } + return index; + }, + getInterceptor$(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSNumNotInt.prototype; + } + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return J.JSNull.prototype; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ansx(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$asx(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ax(receiver) { + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$in(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSNumNotInt.prototype; + } + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$n(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$ns(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$s(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$x(receiver) { + if (receiver == null) + return receiver; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$z(receiver) { + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + set$AsyncCompiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$AsyncCompiler(receiver, value); + }, + set$CalculationInterpolation$x(receiver, value) { + return J.getInterceptor$x(receiver).set$CalculationInterpolation(receiver, value); + }, + set$CalculationOperation$x(receiver, value) { + return J.getInterceptor$x(receiver).set$CalculationOperation(receiver, value); + }, + set$Compiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Compiler(receiver, value); + }, + set$Exception$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Exception(receiver, value); + }, + set$FALSE$x(receiver, value) { + return J.getInterceptor$x(receiver).set$FALSE(receiver, value); + }, + set$Logger$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Logger(receiver, value); + }, + set$NULL$x(receiver, value) { + return J.getInterceptor$x(receiver).set$NULL(receiver, value); + }, + set$NodePackageImporter$x(receiver, value) { + return J.getInterceptor$x(receiver).set$NodePackageImporter(receiver, value); + }, + set$SassArgumentList$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassArgumentList(receiver, value); + }, + set$SassBoolean$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassBoolean(receiver, value); + }, + set$SassCalculation$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassCalculation(receiver, value); + }, + set$SassColor$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassColor(receiver, value); + }, + set$SassFunction$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassFunction(receiver, value); + }, + set$SassList$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassList(receiver, value); + }, + set$SassMap$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassMap(receiver, value); + }, + set$SassMixin$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassMixin(receiver, value); + }, + set$SassNumber$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassNumber(receiver, value); + }, + set$SassString$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassString(receiver, value); + }, + set$TRUE$x(receiver, value) { + return J.getInterceptor$x(receiver).set$TRUE(receiver, value); + }, + set$Value$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Value(receiver, value); + }, + set$Version$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Version(receiver, value); + }, + set$cli_pkg_main_0_$x(receiver, value) { + return J.getInterceptor$x(receiver).set$cli_pkg_main_0_(receiver, value); + }, + set$compile$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compile(receiver, value); + }, + set$compileAsync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileAsync(receiver, value); + }, + set$compileString$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileString(receiver, value); + }, + set$compileStringAsync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileStringAsync(receiver, value); + }, + set$context$x(receiver, value) { + return J.getInterceptor$x(receiver).set$context(receiver, value); + }, + set$dartValue$x(receiver, value) { + return J.getInterceptor$x(receiver).set$dartValue(receiver, value); + }, + set$deprecations$x(receiver, value) { + return J.getInterceptor$x(receiver).set$deprecations(receiver, value); + }, + set$exitCode$x(receiver, value) { + return J.getInterceptor$x(receiver).set$exitCode(receiver, value); + }, + set$info$x(receiver, value) { + return J.getInterceptor$x(receiver).set$info(receiver, value); + }, + set$initAsyncCompiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$initAsyncCompiler(receiver, value); + }, + set$initCompiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$initCompiler(receiver, value); + }, + set$length$asx(receiver, value) { + return J.getInterceptor$asx(receiver).set$length(receiver, value); + }, + set$loadParserExports_$x(receiver, value) { + return J.getInterceptor$x(receiver).set$loadParserExports_(receiver, value); + }, + set$render$x(receiver, value) { + return J.getInterceptor$x(receiver).set$render(receiver, value); + }, + set$renderSync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$renderSync(receiver, value); + }, + set$sassFalse$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassFalse(receiver, value); + }, + set$sassNull$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassNull(receiver, value); + }, + set$sassTrue$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassTrue(receiver, value); + }, + set$types$x(receiver, value) { + return J.getInterceptor$x(receiver).set$types(receiver, value); + }, + get$$prototype$x(receiver) { + return J.getInterceptor$x(receiver).get$$prototype(receiver); + }, + get$_dartException$x(receiver) { + return J.getInterceptor$x(receiver).get$_dartException(receiver); + }, + get$alertAscii$x(receiver) { + return J.getInterceptor$x(receiver).get$alertAscii(receiver); + }, + get$alertColor$x(receiver) { + return J.getInterceptor$x(receiver).get$alertColor(receiver); + }, + get$argv$x(receiver) { + return J.getInterceptor$x(receiver).get$argv(receiver); + }, + get$brackets$x(receiver) { + return J.getInterceptor$x(receiver).get$brackets(receiver); + }, + get$charset$x(receiver) { + return J.getInterceptor$x(receiver).get$charset(receiver); + }, + get$code$x(receiver) { + return J.getInterceptor$x(receiver).get$code(receiver); + }, + get$current$x(receiver) { + return J.getInterceptor$x(receiver).get$current(receiver); + }, + get$dartValue$x(receiver) { + return J.getInterceptor$x(receiver).get$dartValue(receiver); + }, + get$debug$x(receiver) { + return J.getInterceptor$x(receiver).get$debug(receiver); + }, + get$denominatorUnits$x(receiver) { + return J.getInterceptor$x(receiver).get$denominatorUnits(receiver); + }, + get$end$z(receiver) { + return J.getInterceptor$z(receiver).get$end(receiver); + }, + get$env$x(receiver) { + return J.getInterceptor$x(receiver).get$env(receiver); + }, + get$exitCode$x(receiver) { + return J.getInterceptor$x(receiver).get$exitCode(receiver); + }, + get$fatalDeprecations$x(receiver) { + return J.getInterceptor$x(receiver).get$fatalDeprecations(receiver); + }, + get$fiber$x(receiver) { + return J.getInterceptor$x(receiver).get$fiber(receiver); + }, + get$file$x(receiver) { + return J.getInterceptor$x(receiver).get$file(receiver); + }, + get$filename$x(receiver) { + return J.getInterceptor$x(receiver).get$filename(receiver); + }, + get$first$ax(receiver) { + return J.getInterceptor$ax(receiver).get$first(receiver); + }, + get$functions$x(receiver) { + return J.getInterceptor$x(receiver).get$functions(receiver); + }, + get$futureDeprecations$x(receiver) { + return J.getInterceptor$x(receiver).get$futureDeprecations(receiver); + }, + get$hashCode$(receiver) { + return J.getInterceptor$(receiver).get$hashCode(receiver); + }, + get$id$x(receiver) { + return J.getInterceptor$x(receiver).get$id(receiver); + }, + get$importer$x(receiver) { + return J.getInterceptor$x(receiver).get$importer(receiver); + }, + get$importers$x(receiver) { + return J.getInterceptor$x(receiver).get$importers(receiver); + }, + get$isEmpty$asx(receiver) { + return J.getInterceptor$asx(receiver).get$isEmpty(receiver); + }, + get$isNotEmpty$asx(receiver) { + return J.getInterceptor$asx(receiver).get$isNotEmpty(receiver); + }, + get$isTTY$x(receiver) { + return J.getInterceptor$x(receiver).get$isTTY(receiver); + }, + get$iterator$ax(receiver) { + return J.getInterceptor$ax(receiver).get$iterator(receiver); + }, + get$keys$z(receiver) { + return J.getInterceptor$z(receiver).get$keys(receiver); + }, + get$last$ax(receiver) { + return J.getInterceptor$ax(receiver).get$last(receiver); + }, + get$length$asx(receiver) { + return J.getInterceptor$asx(receiver).get$length(receiver); + }, + get$loadPaths$x(receiver) { + return J.getInterceptor$x(receiver).get$loadPaths(receiver); + }, + get$logger$x(receiver) { + return J.getInterceptor$x(receiver).get$logger(receiver); + }, + get$message$x(receiver) { + return J.getInterceptor$x(receiver).get$message(receiver); + }, + get$mtime$x(receiver) { + return J.getInterceptor$x(receiver).get$mtime(receiver); + }, + get$name$x(receiver) { + return J.getInterceptor$x(receiver).get$name(receiver); + }, + get$numeratorUnits$x(receiver) { + return J.getInterceptor$x(receiver).get$numeratorUnits(receiver); + }, + get$options$x(receiver) { + return J.getInterceptor$x(receiver).get$options(receiver); + }, + get$parent$z(receiver) { + return J.getInterceptor$z(receiver).get$parent(receiver); + }, + get$path$x(receiver) { + return J.getInterceptor$x(receiver).get$path(receiver); + }, + get$platform$x(receiver) { + return J.getInterceptor$x(receiver).get$platform(receiver); + }, + get$quietDeps$x(receiver) { + return J.getInterceptor$x(receiver).get$quietDeps(receiver); + }, + get$quotes$x(receiver) { + return J.getInterceptor$x(receiver).get$quotes(receiver); + }, + get$release$x(receiver) { + return J.getInterceptor$x(receiver).get$release(receiver); + }, + get$reversed$ax(receiver) { + return J.getInterceptor$ax(receiver).get$reversed(receiver); + }, + get$runtimeType$(receiver) { + return J.getInterceptor$(receiver).get$runtimeType(receiver); + }, + get$separator$x(receiver) { + return J.getInterceptor$x(receiver).get$separator(receiver); + }, + get$sign$in(receiver) { + if (typeof receiver === "number") + return receiver > 0 ? 1 : receiver < 0 ? -1 : receiver; + return J.getInterceptor$in(receiver).get$sign(receiver); + }, + get$silenceDeprecations$x(receiver) { + return J.getInterceptor$x(receiver).get$silenceDeprecations(receiver); + }, + get$single$ax(receiver) { + return J.getInterceptor$ax(receiver).get$single(receiver); + }, + get$sourceMap$x(receiver) { + return J.getInterceptor$x(receiver).get$sourceMap(receiver); + }, + get$sourceMapIncludeSources$x(receiver) { + return J.getInterceptor$x(receiver).get$sourceMapIncludeSources(receiver); + }, + get$space$x(receiver) { + return J.getInterceptor$x(receiver).get$space(receiver); + }, + get$span$z(receiver) { + return J.getInterceptor$z(receiver).get$span(receiver); + }, + get$stderr$x(receiver) { + return J.getInterceptor$x(receiver).get$stderr(receiver); + }, + get$stdout$x(receiver) { + return J.getInterceptor$x(receiver).get$stdout(receiver); + }, + get$style$x(receiver) { + return J.getInterceptor$x(receiver).get$style(receiver); + }, + get$syntax$x(receiver) { + return J.getInterceptor$x(receiver).get$syntax(receiver); + }, + get$trace$z(receiver) { + return J.getInterceptor$z(receiver).get$trace(receiver); + }, + get$url$x(receiver) { + return J.getInterceptor$x(receiver).get$url(receiver); + }, + get$verbose$x(receiver) { + return J.getInterceptor$x(receiver).get$verbose(receiver); + }, + get$warn$x(receiver) { + return J.getInterceptor$x(receiver).get$warn(receiver); + }, + $add$ansx(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver + a0; + return J.getInterceptor$ansx(receiver).$add(receiver, a0); + }, + $eq$(receiver, a0) { + if (receiver == null) + return a0 == null; + if (typeof receiver != "object") + return a0 != null && receiver === a0; + return J.getInterceptor$(receiver).$eq(receiver, a0); + }, + $index$asx(receiver, a0) { + if (typeof a0 === "number") + if (Array.isArray(receiver) || typeof receiver == "string" || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) + if (a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0]; + return J.getInterceptor$asx(receiver).$index(receiver, a0); + }, + $indexSet$ax(receiver, a0, a1) { + if (typeof a0 === "number") + if ((Array.isArray(receiver) || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) && !receiver.immutable$list && a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0] = a1; + return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); + }, + $set$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).$set$2(receiver, a0, a1); + }, + add$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).add$1(receiver, a0); + }, + addAll$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).addAll$1(receiver, a0); + }, + allMatches$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).allMatches$1(receiver, a0); + }, + allMatches$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).allMatches$2(receiver, a0, a1); + }, + any$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).any$1(receiver, a0); + }, + apply$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).apply$2(receiver, a0, a1); + }, + asImmutable$0$x(receiver) { + return J.getInterceptor$x(receiver).asImmutable$0(receiver); + }, + asMutable$0$x(receiver) { + return J.getInterceptor$x(receiver).asMutable$0(receiver); + }, + canonicalize$4$baseImporter$baseUrl$forImport$x(receiver, a0, a1, a2, a3) { + return J.getInterceptor$x(receiver).canonicalize$4$baseImporter$baseUrl$forImport(receiver, a0, a1, a2, a3); + }, + cast$1$0$ax(receiver, $T1) { + return J.getInterceptor$ax(receiver).cast$1$0(receiver, $T1); + }, + close$0$x(receiver) { + return J.getInterceptor$x(receiver).close$0(receiver); + }, + codeUnitAt$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).codeUnitAt$1(receiver, a0); + }, + compareTo$1$ns(receiver, a0) { + return J.getInterceptor$ns(receiver).compareTo$1(receiver, a0); + }, + contains$1$asx(receiver, a0) { + return J.getInterceptor$asx(receiver).contains$1(receiver, a0); + }, + createInterface$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).createInterface$1(receiver, a0); + }, + createRequire$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).createRequire$1(receiver, a0); + }, + elementAt$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); + }, + endsWith$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).endsWith$1(receiver, a0); + }, + error$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).error$1(receiver, a0); + }, + every$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).every$1(receiver, a0); + }, + existsSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).existsSync$1(receiver, a0); + }, + expand$1$1$ax(receiver, a0, $T1) { + return J.getInterceptor$ax(receiver).expand$1$1(receiver, a0, $T1); + }, + fillRange$3$ax(receiver, a0, a1, a2) { + return J.getInterceptor$ax(receiver).fillRange$3(receiver, a0, a1, a2); + }, + fold$2$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).fold$2(receiver, a0, a1); + }, + forEach$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); + }, + getRange$2$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).getRange$2(receiver, a0, a1); + }, + getTime$0$x(receiver) { + return J.getInterceptor$x(receiver).getTime$0(receiver); + }, + isDirectory$0$x(receiver) { + return J.getInterceptor$x(receiver).isDirectory$0(receiver); + }, + isFile$0$x(receiver) { + return J.getInterceptor$x(receiver).isFile$0(receiver); + }, + join$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).join$1(receiver, a0); + }, + listen$1$z(receiver, a0) { + return J.getInterceptor$z(receiver).listen$1(receiver, a0); + }, + log$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).log$1(receiver, a0); + }, + map$1$1$ax(receiver, a0, $T1) { + return J.getInterceptor$ax(receiver).map$1$1(receiver, a0, $T1); + }, + matchAsPrefix$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); + }, + mkdirSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).mkdirSync$1(receiver, a0); + }, + noSuchMethod$1$(receiver, a0) { + return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); + }, + on$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).on$2(receiver, a0, a1); + }, + parse$0$z(receiver) { + return J.getInterceptor$z(receiver).parse$0(receiver); + }, + readFileSync$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).readFileSync$2(receiver, a0, a1); + }, + readdirSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).readdirSync$1(receiver, a0); + }, + remove$1$z(receiver, a0) { + return J.getInterceptor$z(receiver).remove$1(receiver, a0); + }, + removeRange$2$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).removeRange$2(receiver, a0, a1); + }, + replaceFirst$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).replaceFirst$2(receiver, a0, a1); + }, + resolve$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).resolve$1(receiver, a0); + }, + run$0$x(receiver) { + return J.getInterceptor$x(receiver).run$0(receiver); + }, + run$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).run$1(receiver, a0); + }, + setRange$4$ax(receiver, a0, a1, a2, a3) { + return J.getInterceptor$ax(receiver).setRange$4(receiver, a0, a1, a2, a3); + }, + skip$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).skip$1(receiver, a0); + }, + sort$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).sort$1(receiver, a0); + }, + startsWith$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); + }, + statSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).statSync$1(receiver, a0); + }, + sublist$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).sublist$1(receiver, a0); + }, + substring$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).substring$1(receiver, a0); + }, + substring$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1); + }, + take$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).take$1(receiver, a0); + }, + then$1$1$x(receiver, a0, $T1) { + return J.getInterceptor$x(receiver).then$1$1(receiver, a0, $T1); + }, + then$1$2$onError$x(receiver, a0, a1, $T1) { + return J.getInterceptor$x(receiver).then$1$2$onError(receiver, a0, a1, $T1); + }, + then$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).then$2(receiver, a0, a1); + }, + toArray$0$x(receiver) { + return J.getInterceptor$x(receiver).toArray$0(receiver); + }, + toList$0$ax(receiver) { + return J.getInterceptor$ax(receiver).toList$0(receiver); + }, + toList$1$growable$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).toList$1$growable(receiver, a0); + }, + toRadixString$1$n(receiver, a0) { + return J.getInterceptor$n(receiver).toRadixString$1(receiver, a0); + }, + toSet$0$ax(receiver) { + return J.getInterceptor$ax(receiver).toSet$0(receiver); + }, + toString$0$(receiver) { + return J.getInterceptor$(receiver).toString$0(receiver); + }, + toString$1$color$(receiver, a0) { + return J.getInterceptor$(receiver).toString$1$color(receiver, a0); + }, + trim$0$s(receiver) { + return J.getInterceptor$s(receiver).trim$0(receiver); + }, + unlinkSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).unlinkSync$1(receiver, a0); + }, + visitAtRootRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitAtRootRule$1(receiver, a0); + }, + visitAtRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitAtRule$1(receiver, a0); + }, + visitBinaryOperationExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitBinaryOperationExpression$1(receiver, a0); + }, + visitBooleanExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitBooleanExpression$1(receiver, a0); + }, + visitColorExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitColorExpression$1(receiver, a0); + }, + visitContentBlock$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitContentBlock$1(receiver, a0); + }, + visitContentRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitContentRule$1(receiver, a0); + }, + visitDebugRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitDebugRule$1(receiver, a0); + }, + visitDeclaration$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitDeclaration$1(receiver, a0); + }, + visitEachRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitEachRule$1(receiver, a0); + }, + visitErrorRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitErrorRule$1(receiver, a0); + }, + visitExtendRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitExtendRule$1(receiver, a0); + }, + visitForRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitForRule$1(receiver, a0); + }, + visitForwardRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitForwardRule$1(receiver, a0); + }, + visitFunctionExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitFunctionExpression$1(receiver, a0); + }, + visitFunctionRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitFunctionRule$1(receiver, a0); + }, + visitIfExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfExpression$1(receiver, a0); + }, + visitIfRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfRule$1(receiver, a0); + }, + visitImportRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitImportRule$1(receiver, a0); + }, + visitIncludeRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIncludeRule$1(receiver, a0); + }, + visitInterpolatedFunctionExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitInterpolatedFunctionExpression$1(receiver, a0); + }, + visitListExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitListExpression$1(receiver, a0); + }, + visitLoudComment$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitLoudComment$1(receiver, a0); + }, + visitMapExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitMapExpression$1(receiver, a0); + }, + visitMediaRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitMediaRule$1(receiver, a0); + }, + visitMixinRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitMixinRule$1(receiver, a0); + }, + visitNullExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitNullExpression$1(receiver, a0); + }, + visitNumberExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitNumberExpression$1(receiver, a0); + }, + visitParenthesizedExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitParenthesizedExpression$1(receiver, a0); + }, + visitReturnRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitReturnRule$1(receiver, a0); + }, + visitSelectorExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSelectorExpression$1(receiver, a0); + }, + visitSilentComment$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSilentComment$1(receiver, a0); + }, + visitStringExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitStringExpression$1(receiver, a0); + }, + visitStyleRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitStyleRule$1(receiver, a0); + }, + visitStylesheet$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitStylesheet$1(receiver, a0); + }, + visitSupportsExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSupportsExpression$1(receiver, a0); + }, + visitSupportsRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSupportsRule$1(receiver, a0); + }, + visitUnaryOperationExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitUnaryOperationExpression$1(receiver, a0); + }, + visitUseRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitUseRule$1(receiver, a0); + }, + visitValueExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitValueExpression$1(receiver, a0); + }, + visitVariableDeclaration$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitVariableDeclaration$1(receiver, a0); + }, + visitVariableExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitVariableExpression$1(receiver, a0); + }, + visitWarnRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitWarnRule$1(receiver, a0); + }, + visitWhileRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitWhileRule$1(receiver, a0); + }, + watch$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).watch$2(receiver, a0, a1); + }, + where$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).where$1(receiver, a0); + }, + write$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).write$1(receiver, a0); + }, + writeFileSync$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).writeFileSync$2(receiver, a0, a1); + }, + yield$0$x(receiver) { + return J.getInterceptor$x(receiver).yield$0(receiver); + }, + Interceptor: function Interceptor() { + }, + JSBool: function JSBool() { + }, + JSNull: function JSNull() { + }, + JavaScriptObject: function JavaScriptObject() { + }, + LegacyJavaScriptObject: function LegacyJavaScriptObject() { + }, + PlainJavaScriptObject: function PlainJavaScriptObject() { + }, + UnknownJavaScriptObject: function UnknownJavaScriptObject() { + }, + JavaScriptFunction: function JavaScriptFunction() { + }, + JavaScriptBigInt: function JavaScriptBigInt() { + }, + JavaScriptSymbol: function JavaScriptSymbol() { + }, + JSArray: function JSArray(t0) { + this.$ti = t0; + }, + JSUnmodifiableArray: function JSUnmodifiableArray(t0) { + this.$ti = t0; + }, + ArrayIterator: function ArrayIterator(t0, t1, t2) { + var _ = this; + _._iterable = t0; + _._length = t1; + _._index = 0; + _._current = null; + _.$ti = t2; + }, + JSNumber: function JSNumber() { + }, + JSInt: function JSInt() { + }, + JSNumNotInt: function JSNumNotInt() { + }, + JSString: function JSString() { + } + }, + A = {JS_CONST: function JS_CONST() { + }, + CastIterable_CastIterable(source, $S, $T) { + if ($S._eval$1("EfficientLengthIterable<0>")._is(source)) + return new A._EfficientLengthCastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("_EfficientLengthCastIterable<1,2>")); + return new A.CastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastIterable<1,2>")); + }, + LateError$localNI(localName) { + return new A.LateError("Local '" + localName + "' has not been initialized."); + }, + ReachabilityError$(_message) { + return new A.ReachabilityError(_message); + }, + hexDigitValue(char) { + var letter, + digit = char ^ 48; + if (digit <= 9) + return digit; + letter = char | 32; + if (97 <= letter && letter <= 102) + return letter - 87; + return -1; + }, + SystemHash_combine(hash, value) { + hash = hash + value & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + return hash ^ hash >>> 6; + }, + SystemHash_finish(hash) { + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >>> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + checkNotNullable(value, $name, $T) { + return value; + }, + isToStringVisiting(object) { + var t1, i; + for (t1 = $.toStringVisiting.length, i = 0; i < t1; ++i) + if (object === $.toStringVisiting[i]) + return true; + return false; + }, + SubListIterable$(_iterable, _start, _endOrLength, $E) { + A.RangeError_checkNotNegative(_start, "start"); + if (_endOrLength != null) { + A.RangeError_checkNotNegative(_endOrLength, "end"); + if (_start > _endOrLength) + A.throwExpression(A.RangeError$range(_start, 0, _endOrLength, "start", null)); + } + return new A.SubListIterable(_iterable, _start, _endOrLength, $E._eval$1("SubListIterable<0>")); + }, + MappedIterable_MappedIterable(iterable, $function, $S, $T) { + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthMappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); + return new A.MappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("MappedIterable<1,2>")); + }, + TakeIterable_TakeIterable(iterable, takeCount, $E) { + var _s9_ = "takeCount"; + A.ArgumentError_checkNotNull(takeCount, _s9_); + A.RangeError_checkNotNegative(takeCount, _s9_); + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthTakeIterable(iterable, takeCount, $E._eval$1("EfficientLengthTakeIterable<0>")); + return new A.TakeIterable(iterable, takeCount, $E._eval$1("TakeIterable<0>")); + }, + SkipIterable_SkipIterable(iterable, count, $E) { + var _s5_ = "count"; + if (type$.EfficientLengthIterable_dynamic._is(iterable)) { + A.ArgumentError_checkNotNull(count, _s5_); + A.RangeError_checkNotNegative(count, _s5_); + return new A.EfficientLengthSkipIterable(iterable, count, $E._eval$1("EfficientLengthSkipIterable<0>")); + } + A.ArgumentError_checkNotNull(count, _s5_); + A.RangeError_checkNotNegative(count, _s5_); + return new A.SkipIterable(iterable, count, $E._eval$1("SkipIterable<0>")); + }, + FollowedByIterable_FollowedByIterable$firstEfficient(first, second, $E) { + if ($E._eval$1("EfficientLengthIterable<0>")._is(second)) + return new A.EfficientLengthFollowedByIterable(first, second, $E._eval$1("EfficientLengthFollowedByIterable<0>")); + return new A.FollowedByIterable(first, second, $E._eval$1("FollowedByIterable<0>")); + }, + IterableElementError_noElement() { + return new A.StateError("No element"); + }, + IterableElementError_tooMany() { + return new A.StateError("Too many elements"); + }, + IterableElementError_tooFew() { + return new A.StateError("Too few elements"); + }, + Sort__doSort(a, left, right, compare) { + if (right - left <= 32) + A.Sort__insertionSort(a, left, right, compare); + else + A.Sort__dualPivotQuicksort(a, left, right, compare); + }, + Sort__insertionSort(a, left, right, compare) { + var i, t1, el, j, j0; + for (i = left + 1, t1 = J.getInterceptor$asx(a); i <= right; ++i) { + el = t1.$index(a, i); + j = i; + while (true) { + if (!(j > left && compare.call$2(t1.$index(a, j - 1), el) > 0)) + break; + j0 = j - 1; + t1.$indexSet(a, j, t1.$index(a, j0)); + j = j0; + } + t1.$indexSet(a, j, el); + } + }, + Sort__dualPivotQuicksort(a, left, right, compare) { + var t0, less, great, pivots_are_equal, k, ak, comp, great0, less0, t2, + sixth = B.JSInt_methods._tdivFast$1(right - left + 1, 6), + index1 = left + sixth, + index5 = right - sixth, + index3 = B.JSInt_methods._tdivFast$1(left + right, 2), + index2 = index3 - sixth, + index4 = index3 + sixth, + t1 = J.getInterceptor$asx(a), + el1 = t1.$index(a, index1), + el2 = t1.$index(a, index2), + el3 = t1.$index(a, index3), + el4 = t1.$index(a, index4), + el5 = t1.$index(a, index5); + if (compare.call$2(el1, el2) > 0) { + t0 = el2; + el2 = el1; + el1 = t0; + } + if (compare.call$2(el4, el5) > 0) { + t0 = el5; + el5 = el4; + el4 = t0; + } + if (compare.call$2(el1, el3) > 0) { + t0 = el3; + el3 = el1; + el1 = t0; + } + if (compare.call$2(el2, el3) > 0) { + t0 = el3; + el3 = el2; + el2 = t0; + } + if (compare.call$2(el1, el4) > 0) { + t0 = el4; + el4 = el1; + el1 = t0; + } + if (compare.call$2(el3, el4) > 0) { + t0 = el4; + el4 = el3; + el3 = t0; + } + if (compare.call$2(el2, el5) > 0) { + t0 = el5; + el5 = el2; + el2 = t0; + } + if (compare.call$2(el2, el3) > 0) { + t0 = el3; + el3 = el2; + el2 = t0; + } + if (compare.call$2(el4, el5) > 0) { + t0 = el5; + el5 = el4; + el4 = t0; + } + t1.$indexSet(a, index1, el1); + t1.$indexSet(a, index3, el3); + t1.$indexSet(a, index5, el5); + t1.$indexSet(a, index2, t1.$index(a, left)); + t1.$indexSet(a, index4, t1.$index(a, right)); + less = left + 1; + great = right - 1; + pivots_are_equal = J.$eq$(compare.call$2(el2, el4), 0); + if (pivots_are_equal) + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + comp = compare.call$2(ak, el2); + if (comp === 0) + continue; + if (comp < 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else + for (; true;) { + comp = compare.call$2(t1.$index(a, great), el2); + if (comp > 0) { + --great; + continue; + } else { + great0 = great - 1; + if (comp < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + great = great0; + less = less0; + break; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + great = great0; + break; + } + } + } + } + else + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + if (compare.call$2(ak, el2) < 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else if (compare.call$2(ak, el4) > 0) + for (; true;) + if (compare.call$2(t1.$index(a, great), el4) > 0) { + --great; + if (great < k) + break; + continue; + } else { + great0 = great - 1; + if (compare.call$2(t1.$index(a, great), el2) < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + less = less0; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + } + great = great0; + break; + } + } + t2 = less - 1; + t1.$indexSet(a, left, t1.$index(a, t2)); + t1.$indexSet(a, t2, el2); + t2 = great + 1; + t1.$indexSet(a, right, t1.$index(a, t2)); + t1.$indexSet(a, t2, el4); + A.Sort__doSort(a, left, less - 2, compare); + A.Sort__doSort(a, great + 2, right, compare); + if (pivots_are_equal) + return; + if (less < index1 && great > index5) { + for (; J.$eq$(compare.call$2(t1.$index(a, less), el2), 0);) + ++less; + for (; J.$eq$(compare.call$2(t1.$index(a, great), el4), 0);) + --great; + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + if (compare.call$2(ak, el2) === 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else if (compare.call$2(ak, el4) === 0) + for (; true;) + if (compare.call$2(t1.$index(a, great), el4) === 0) { + --great; + if (great < k) + break; + continue; + } else { + great0 = great - 1; + if (compare.call$2(t1.$index(a, great), el2) < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + less = less0; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + } + great = great0; + break; + } + } + A.Sort__doSort(a, less, great, compare); + } else + A.Sort__doSort(a, less, great, compare); + }, + _CastIterableBase: function _CastIterableBase() { + }, + CastIterator: function CastIterator(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastIterable: function CastIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + _EfficientLengthCastIterable: function _EfficientLengthCastIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + _CastListBase: function _CastListBase() { + }, + _CastListBase_sort_closure: function _CastListBase_sort_closure(t0, t1) { + this.$this = t0; + this.compare = t1; + }, + CastList: function CastList(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastSet: function CastSet(t0, t1, t2) { + this._source = t0; + this._emptySet = t1; + this.$ti = t2; + }, + CastMap: function CastMap(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastMap_forEach_closure: function CastMap_forEach_closure(t0, t1) { + this.$this = t0; + this.f = t1; + }, + CastMap_entries_closure: function CastMap_entries_closure(t0) { + this.$this = t0; + }, + LateError: function LateError(t0) { + this._message = t0; + }, + ReachabilityError: function ReachabilityError(t0) { + this._message = t0; + }, + CodeUnits: function CodeUnits(t0) { + this._string = t0; + }, + nullFuture_closure: function nullFuture_closure() { + }, + SentinelValue: function SentinelValue() { + }, + EfficientLengthIterable: function EfficientLengthIterable() { + }, + ListIterable: function ListIterable() { + }, + SubListIterable: function SubListIterable(t0, t1, t2, t3) { + var _ = this; + _.__internal$_iterable = t0; + _._start = t1; + _._endOrLength = t2; + _.$ti = t3; + }, + ListIterator: function ListIterator(t0, t1, t2) { + var _ = this; + _.__internal$_iterable = t0; + _.__internal$_length = t1; + _.__internal$_index = 0; + _.__internal$_current = null; + _.$ti = t2; + }, + MappedIterable: function MappedIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + EfficientLengthMappedIterable: function EfficientLengthMappedIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + MappedIterator: function MappedIterator(t0, t1, t2) { + var _ = this; + _.__internal$_current = null; + _._iterator = t0; + _._f = t1; + _.$ti = t2; + }, + MappedListIterable: function MappedListIterable(t0, t1, t2) { + this._source = t0; + this._f = t1; + this.$ti = t2; + }, + WhereIterable: function WhereIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + WhereIterator: function WhereIterator(t0, t1) { + this._iterator = t0; + this._f = t1; + }, + ExpandIterable: function ExpandIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + ExpandIterator: function ExpandIterator(t0, t1, t2, t3) { + var _ = this; + _._iterator = t0; + _._f = t1; + _._currentExpansion = t2; + _.__internal$_current = null; + _.$ti = t3; + }, + TakeIterable: function TakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + EfficientLengthTakeIterable: function EfficientLengthTakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + TakeIterator: function TakeIterator(t0, t1, t2) { + this._iterator = t0; + this._remaining = t1; + this.$ti = t2; + }, + SkipIterable: function SkipIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._skipCount = t1; + this.$ti = t2; + }, + EfficientLengthSkipIterable: function EfficientLengthSkipIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._skipCount = t1; + this.$ti = t2; + }, + SkipIterator: function SkipIterator(t0, t1) { + this._iterator = t0; + this._skipCount = t1; + }, + SkipWhileIterable: function SkipWhileIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + SkipWhileIterator: function SkipWhileIterator(t0, t1) { + this._iterator = t0; + this._f = t1; + this._hasSkipped = false; + }, + EmptyIterable: function EmptyIterable(t0) { + this.$ti = t0; + }, + EmptyIterator: function EmptyIterator() { + }, + FollowedByIterable: function FollowedByIterable(t0, t1, t2) { + this.__internal$_first = t0; + this._second = t1; + this.$ti = t2; + }, + EfficientLengthFollowedByIterable: function EfficientLengthFollowedByIterable(t0, t1, t2) { + this.__internal$_first = t0; + this._second = t1; + this.$ti = t2; + }, + FollowedByIterator: function FollowedByIterator(t0, t1) { + this._currentIterator = t0; + this._nextIterable = t1; + }, + WhereTypeIterable: function WhereTypeIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + WhereTypeIterator: function WhereTypeIterator(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + NonNullsIterable: function NonNullsIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + NonNullsIterator: function NonNullsIterator(t0) { + this._source = t0; + this.__internal$_current = null; + }, + FixedLengthListMixin: function FixedLengthListMixin() { + }, + UnmodifiableListMixin: function UnmodifiableListMixin() { + }, + UnmodifiableListBase: function UnmodifiableListBase() { + }, + ReversedListIterable: function ReversedListIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + Symbol: function Symbol(t0) { + this.__internal$_name = t0; + }, + __CastListBase__CastIterableBase_ListMixin: function __CastListBase__CastIterableBase_ListMixin() { + }, + ConstantMap_ConstantMap$from(other, $K, $V) { + var allStrings, k, object, index, index0, map, + keys = A.List_List$from(other.get$keys(other), true, $K), + t1 = keys.length, + _i = 0; + while (true) { + if (!(_i < t1)) { + allStrings = true; + break; + } + k = keys[_i]; + if (typeof k != "string" || "__proto__" === k) { + allStrings = false; + break; + } + ++_i; + } + if (allStrings) { + object = {}; + for (index = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i, index = index0) { + k = keys[_i]; + other.$index(0, k); + index0 = index + 1; + object[k] = index; + } + map = new A.ConstantStringMap(object, A.List_List$from(other.get$values(other), true, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantStringMap<1,2>")); + map.$keys = keys; + return map; + } + return new A.ConstantMapView(A.LinkedHashMap_LinkedHashMap$from(other, $K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantMapView<1,2>")); + }, + ConstantMap__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable Map")); + }, + ConstantSet__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot modify constant Set")); + }, + instantiate1(f, T1) { + var t1 = new A.Instantiation1(f, T1._eval$1("Instantiation1<0>")); + t1.Instantiation$1(f); + return t1; + }, + unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) + return preserved; + return rawClassName; + }, + isJsIndexable(object, record) { + var result; + if (record != null) { + result = record.x; + if (result != null) + return result; + } + return type$.JavaScriptIndexingBehavior_dynamic._is(object); + }, + S(value) { + var result; + if (typeof value == "string") + return value; + if (typeof value == "number") { + if (value !== 0) + return "" + value; + } else if (true === value) + return "true"; + else if (false === value) + return "false"; + else if (value == null) + return "null"; + result = J.toString$0$(value); + return result; + }, + JSInvocationMirror$(_memberName, _internalName, _kind, _arguments, _namedArgumentNames, _typeArgumentCount) { + return new A.JSInvocationMirror(_memberName, _kind, _arguments, _namedArgumentNames, _typeArgumentCount); + }, + Primitives_objectHashCode(object) { + var hash, + property = $.Primitives__identityHashCodeProperty; + if (property == null) + property = $.Primitives__identityHashCodeProperty = Symbol("identityHashCode"); + hash = object[property]; + if (hash == null) { + hash = Math.random() * 0x3fffffff | 0; + object[property] = hash; + } + return hash; + }, + Primitives_parseInt(source, radix) { + var decimalMatch, maxCharCode, digitsPart, t1, i, _null = null, + match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); + if (match == null) + return _null; + decimalMatch = match[3]; + if (radix == null) { + if (decimalMatch != null) + return parseInt(source, 10); + if (match[2] != null) + return parseInt(source, 16); + return _null; + } + if (radix < 2 || radix > 36) + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", _null)); + if (radix === 10 && decimalMatch != null) + return parseInt(source, 10); + if (radix < 10 || decimalMatch == null) { + maxCharCode = radix <= 10 ? 47 + radix : 86 + radix; + digitsPart = match[1]; + for (t1 = digitsPart.length, i = 0; i < t1; ++i) + if ((digitsPart.charCodeAt(i) | 32) > maxCharCode) + return _null; + } + return parseInt(source, radix); + }, + Primitives_parseDouble(source) { + var result, trimmed; + if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s*$/.test(source)) + return null; + result = parseFloat(source); + if (isNaN(result)) { + trimmed = B.JSString_methods.trim$0(source); + if (trimmed === "NaN" || trimmed === "+NaN" || trimmed === "-NaN") + return result; + return null; + } + return result; + }, + Primitives_objectTypeName(object) { + return A.Primitives__objectTypeNameNewRti(object); + }, + Primitives__objectTypeNameNewRti(object) { + var interceptor, dispatchName, $constructor, constructorName; + if (object instanceof A.Object) + return A._rtiToString(A.instanceType(object), null); + interceptor = J.getInterceptor$(object); + if (interceptor === B.Interceptor_methods || interceptor === B.JavaScriptObject_methods || type$.UnknownJavaScriptObject._is(object)) { + dispatchName = B.C_JS_CONST(object); + if (dispatchName !== "Object" && dispatchName !== "") + return dispatchName; + $constructor = object.constructor; + if (typeof $constructor == "function") { + constructorName = $constructor.name; + if (typeof constructorName == "string" && constructorName !== "Object" && constructorName !== "") + return constructorName; + } + } + return A._rtiToString(A.instanceType(object), null); + }, + Primitives_safeToString(object) { + if (object == null || typeof object == "number" || A._isBool(object)) + return J.toString$0$(object); + if (typeof object == "string") + return JSON.stringify(object); + if (object instanceof A.Closure) + return object.toString$0(0); + if (object instanceof A._Record) + return object._toString$1(true); + return "Instance of '" + A.Primitives_objectTypeName(object) + "'"; + }, + Primitives_currentUri() { + if (!!self.location) + return self.location.href; + return null; + }, + Primitives__fromCharCodeApply(array) { + var result, i, i0, chunkEnd, + end = array.length; + if (end <= 500) + return String.fromCharCode.apply(null, array); + for (result = "", i = 0; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, array.slice(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCodePoints(codePoints) { + var t1, _i, i, + a = A._setArrayType([], type$.JSArray_int); + for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, A.throwConcurrentModificationError)(codePoints), ++_i) { + i = codePoints[_i]; + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); + if (i <= 65535) + a.push(i); + else if (i <= 1114111) { + a.push(55296 + (B.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023)); + a.push(56320 + (i & 1023)); + } else + throw A.wrapException(A.argumentErrorValue(i)); + } + return A.Primitives__fromCharCodeApply(a); + }, + Primitives_stringFromCharCodes(charCodes) { + var t1, _i, i; + for (t1 = charCodes.length, _i = 0; _i < t1; ++_i) { + i = charCodes[_i]; + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); + if (i < 0) + throw A.wrapException(A.argumentErrorValue(i)); + if (i > 65535) + return A.Primitives_stringFromCodePoints(charCodes); + } + return A.Primitives__fromCharCodeApply(charCodes); + }, + Primitives_stringFromNativeUint8List(charCodes, start, end) { + var i, result, i0, chunkEnd; + if (end <= 500 && start === 0 && end === charCodes.length) + return String.fromCharCode.apply(null, charCodes); + for (i = start, result = ""; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCharCode(charCode) { + var bits; + if (0 <= charCode) { + if (charCode <= 65535) + return String.fromCharCode(charCode); + if (charCode <= 1114111) { + bits = charCode - 65536; + return String.fromCharCode((B.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); + } + } + throw A.wrapException(A.RangeError$range(charCode, 0, 1114111, null, null)); + }, + Primitives_lazyAsJsDate(receiver) { + if (receiver.date === void 0) + receiver.date = new Date(receiver._value); + return receiver.date; + }, + Primitives_getYear(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getFullYear() + 0; + return t1; + }, + Primitives_getMonth(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMonth() + 1; + return t1; + }, + Primitives_getDay(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getDate() + 0; + return t1; + }, + Primitives_getHours(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getHours() + 0; + return t1; + }, + Primitives_getMinutes(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMinutes() + 0; + return t1; + }, + Primitives_getSeconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getSeconds() + 0; + return t1; + }, + Primitives_getMilliseconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; + return t1; + }, + Primitives_functionNoSuchMethod($function, positionalArguments, namedArguments) { + var $arguments, namedArgumentList, t1 = {}; + t1.argumentCount = 0; + $arguments = []; + namedArgumentList = []; + t1.argumentCount = positionalArguments.length; + B.JSArray_methods.addAll$1($arguments, positionalArguments); + t1.names = ""; + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + namedArguments.forEach$1(0, new A.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); + return J.noSuchMethod$1$($function, new A.JSInvocationMirror(B.Symbol_call, 0, $arguments, namedArgumentList, 0)); + }, + Primitives_applyFunction($function, positionalArguments, namedArguments) { + var t1, argumentCount, jsStub; + if (Array.isArray(positionalArguments)) + t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; + else + t1 = false; + if (t1) { + argumentCount = positionalArguments.length; + if (argumentCount === 0) { + if (!!$function.call$0) + return $function.call$0(); + } else if (argumentCount === 1) { + if (!!$function.call$1) + return $function.call$1(positionalArguments[0]); + } else if (argumentCount === 2) { + if (!!$function.call$2) + return $function.call$2(positionalArguments[0], positionalArguments[1]); + } else if (argumentCount === 3) { + if (!!$function.call$3) + return $function.call$3(positionalArguments[0], positionalArguments[1], positionalArguments[2]); + } else if (argumentCount === 4) { + if (!!$function.call$4) + return $function.call$4(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3]); + } else if (argumentCount === 5) + if (!!$function.call$5) + return $function.call$5(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3], positionalArguments[4]); + jsStub = $function["call" + "$" + argumentCount]; + if (jsStub != null) + return jsStub.apply($function, positionalArguments); + } + return A.Primitives__generalApplyFunction($function, positionalArguments, namedArguments); + }, + Primitives__generalApplyFunction($function, positionalArguments, namedArguments) { + var defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, maxArguments, missingDefaults, keys, _i, defaultValue, used, t2, + $arguments = Array.isArray(positionalArguments) ? positionalArguments : A.List_List$of(positionalArguments, true, type$.dynamic), + argumentCount = $arguments.length, + requiredParameterCount = $function.$requiredArgCount; + if (argumentCount < requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + defaultValuesClosure = $function.$defaultValues; + t1 = defaultValuesClosure == null; + defaultValues = !t1 ? defaultValuesClosure() : null; + interceptor = J.getInterceptor$($function); + jsFunction = interceptor["call*"]; + if (typeof jsFunction == "string") + jsFunction = interceptor[jsFunction]; + if (t1) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if (argumentCount === requiredParameterCount) + return jsFunction.apply($function, $arguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + if (Array.isArray(defaultValues)) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + maxArguments = requiredParameterCount + defaultValues.length; + if (argumentCount > maxArguments) + return A.Primitives_functionNoSuchMethod($function, $arguments, null); + if (argumentCount < maxArguments) { + missingDefaults = defaultValues.slice(argumentCount - requiredParameterCount); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); + B.JSArray_methods.addAll$1($arguments, missingDefaults); + } + return jsFunction.apply($function, $arguments); + } else { + if (argumentCount > requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); + keys = Object.keys(defaultValues); + if (namedArguments == null) + for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + defaultValue = defaultValues[keys[_i]]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + else { + for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + t2 = keys[_i]; + if (namedArguments.containsKey$1(t2)) { + ++used; + B.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2)); + } else { + defaultValue = defaultValues[t2]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + } + if (used !== namedArguments.__js_helper$_length) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + return jsFunction.apply($function, $arguments); + } + }, + Primitives_extractStackTrace(error) { + var jsError = error.$thrownJsError; + if (jsError == null) + return null; + return A.getTraceFromException(jsError); + }, + diagnoseIndexError(indexable, index) { + var $length, _s5_ = "index"; + if (!A._isInt(index)) + return new A.ArgumentError(true, index, _s5_, null); + $length = J.get$length$asx(indexable); + if (index < 0 || index >= $length) + return A.IndexError$withLength(index, $length, indexable, null, _s5_); + return A.RangeError$value(index, _s5_, null); + }, + diagnoseRangeError(start, end, $length) { + if (start < 0 || start > $length) + return A.RangeError$range(start, 0, $length, "start", null); + if (end != null) + if (end < start || end > $length) + return A.RangeError$range(end, start, $length, "end", null); + return new A.ArgumentError(true, end, "end", null); + }, + argumentErrorValue(object) { + return new A.ArgumentError(true, object, null, null); + }, + checkNum(value) { + return value; + }, + wrapException(ex) { + return A.initializeExceptionWrapper(new Error(), ex); + }, + initializeExceptionWrapper(wrapper, ex) { + var t1; + if (ex == null) + ex = new A.TypeError(); + wrapper.dartException = ex; + t1 = A.toStringWrapper; + if ("defineProperty" in Object) { + Object.defineProperty(wrapper, "message", {get: t1}); + wrapper.name = ""; + } else + wrapper.toString = t1; + return wrapper; + }, + toStringWrapper() { + return J.toString$0$(this.dartException); + }, + throwExpression(ex) { + throw A.wrapException(ex); + }, + throwExpressionWithWrapper(ex, wrapper) { + throw A.initializeExceptionWrapper(wrapper, ex); + }, + throwConcurrentModificationError(collection) { + throw A.wrapException(A.ConcurrentModificationError$(collection)); + }, + TypeErrorDecoder_extractPattern(message) { + var match, $arguments, argumentsExpr, expr, method, receiver; + message = A.quoteStringForRegExp(message.replace(String({}), "$receiver$")); + match = message.match(/\\\$[a-zA-Z]+\\\$/g); + if (match == null) + match = A._setArrayType([], type$.JSArray_String); + $arguments = match.indexOf("\\$arguments\\$"); + argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); + expr = match.indexOf("\\$expr\\$"); + method = match.indexOf("\\$method\\$"); + receiver = match.indexOf("\\$receiver\\$"); + return new A.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); + }, + TypeErrorDecoder_provokeCallErrorOn(expression) { + return function($expr$) { + var $argumentsExpr$ = "$arguments$"; + try { + $expr$.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }(expression); + }, + TypeErrorDecoder_provokePropertyErrorOn(expression) { + return function($expr$) { + try { + $expr$.$method$; + } catch (e) { + return e.message; + } + }(expression); + }, + JsNoSuchMethodError$(_message, match) { + var t1 = match == null, + t2 = t1 ? null : match.method; + return new A.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); + }, + unwrapException(ex) { + if (ex == null) + return new A.NullThrownFromJavaScriptException(ex); + if (ex instanceof A.ExceptionAndStackTrace) + return A.saveStackTrace(ex, ex.dartException); + if (typeof ex !== "object") + return ex; + if ("dartException" in ex) + return A.saveStackTrace(ex, ex.dartException); + return A._unwrapNonDartException(ex); + }, + saveStackTrace(ex, error) { + if (type$.Error._is(error)) + if (error.$thrownJsError == null) + error.$thrownJsError = ex; + return error; + }, + _unwrapNonDartException(ex) { + var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match; + if (!("message" in ex)) + return ex; + message = ex.message; + if ("number" in ex && typeof ex.number == "number") { + number = ex.number; + ieErrorCode = number & 65535; + if ((B.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) + switch (ieErrorCode) { + case 438: + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A.S(message) + " (Error " + ieErrorCode + ")", null)); + case 445: + case 5007: + A.S(message); + return A.saveStackTrace(ex, new A.NullError()); + } + } + if (ex instanceof TypeError) { + nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern(); + notClosure = $.$get$TypeErrorDecoder_notClosurePattern(); + nullCall = $.$get$TypeErrorDecoder_nullCallPattern(); + nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern(); + undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern(); + undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern(); + nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern(); + $.$get$TypeErrorDecoder_nullLiteralPropertyPattern(); + undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern(); + undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); + match = nsme.matchTypeError$1(message); + if (match != null) + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); + else { + match = notClosure.matchTypeError$1(message); + if (match != null) { + match.method = "call"; + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); + } else if (nullCall.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefCall.matchTypeError$1(message) != null || undefLiteralCall.matchTypeError$1(message) != null || nullProperty.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefProperty.matchTypeError$1(message) != null || undefLiteralProperty.matchTypeError$1(message) != null) + return A.saveStackTrace(ex, new A.NullError()); + } + return A.saveStackTrace(ex, new A.UnknownJsTypeError(typeof message == "string" ? message : "")); + } + if (ex instanceof RangeError) { + if (typeof message == "string" && message.indexOf("call stack") !== -1) + return new A.StackOverflowError(); + message = function(ex) { + try { + return String(ex); + } catch (e) { + } + return null; + }(ex); + return A.saveStackTrace(ex, new A.ArgumentError(false, null, null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); + } + if (typeof InternalError == "function" && ex instanceof InternalError) + if (typeof message == "string" && message === "too much recursion") + return new A.StackOverflowError(); + return ex; + }, + getTraceFromException(exception) { + var trace; + if (exception instanceof A.ExceptionAndStackTrace) + return exception.stackTrace; + if (exception == null) + return new A._StackTrace(exception); + trace = exception.$cachedTrace; + if (trace != null) + return trace; + trace = new A._StackTrace(exception); + if (typeof exception === "object") + exception.$cachedTrace = trace; + return trace; + }, + objectHashCode(object) { + if (object == null) + return J.get$hashCode$(object); + if (typeof object == "object") + return A.Primitives_objectHashCode(object); + return J.get$hashCode$(object); + }, + constantHashCode(key) { + if (typeof key == "number") + return B.JSNumber_methods.get$hashCode(key); + if (key instanceof A._Type) + return A.Primitives_objectHashCode(key); + if (key instanceof A._Record) + return key.get$hashCode(key); + if (key instanceof A.Symbol) + return key.get$hashCode(0); + return A.objectHashCode(key); + }, + fillLiteralMap(keyValuePairs, result) { + var index, index0, index1, + $length = keyValuePairs.length; + for (index = 0; index < $length; index = index1) { + index0 = index + 1; + index1 = index0 + 1; + result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); + } + return result; + }, + fillLiteralSet(values, result) { + var index, + $length = values.length; + for (index = 0; index < $length; ++index) + result.add$1(0, values[index]); + return result; + }, + _invokeClosure(closure, numberOfArguments, arg1, arg2, arg3, arg4) { + switch (numberOfArguments) { + case 0: + return closure.call$0(); + case 1: + return closure.call$1(arg1); + case 2: + return closure.call$2(arg1, arg2); + case 3: + return closure.call$3(arg1, arg2, arg3); + case 4: + return closure.call$4(arg1, arg2, arg3, arg4); + } + throw A.wrapException(new A._Exception("Unsupported number of arguments for wrapped closure")); + }, + convertDartClosureToJS(closure, arity) { + var $function; + if (closure == null) + return null; + $function = closure.$identity; + if (!!$function) + return $function; + $function = A.convertDartClosureToJSUncached(closure, arity); + closure.$identity = $function; + return $function; + }, + convertDartClosureToJSUncached(closure, arity) { + var entry; + switch (arity) { + case 0: + entry = closure.call$0; + break; + case 1: + entry = closure.call$1; + break; + case 2: + entry = closure.call$2; + break; + case 3: + entry = closure.call$3; + break; + case 4: + entry = closure.call$4; + break; + default: + entry = null; + } + if (entry != null) + return entry.bind(closure); + return function(closure, arity, invoke) { + return function(a1, a2, a3, a4) { + return invoke(closure, arity, a1, a2, a3, a4); + }; + }(closure, arity, A._invokeClosure); + }, + Closure_fromTearOff(parameters) { + var $prototype, $constructor, t2, trampoline, applyTrampoline, i, stub, stub0, stubName, stubCallName, + container = parameters.co, + isStatic = parameters.iS, + isIntercepted = parameters.iI, + needsDirectAccess = parameters.nDA, + applyTrampolineIndex = parameters.aI, + funsOrNames = parameters.fs, + callNames = parameters.cs, + $name = funsOrNames[0], + callName = callNames[0], + $function = container[$name], + t1 = parameters.fT; + t1.toString; + $prototype = isStatic ? Object.create(new A.StaticClosure().constructor.prototype) : Object.create(new A.BoundClosure(null, null).constructor.prototype); + $prototype.$initialize = $prototype.constructor; + $constructor = isStatic ? function static_tear_off() { + this.$initialize(); + } : function tear_off(a, b) { + this.$initialize(a, b); + }; + $prototype.constructor = $constructor; + $constructor.prototype = $prototype; + $prototype.$_name = $name; + $prototype.$_target = $function; + t2 = !isStatic; + if (t2) + trampoline = A.Closure_forwardCallTo($name, $function, isIntercepted, needsDirectAccess); + else { + $prototype.$static_name = $name; + trampoline = $function; + } + $prototype.$signature = A.Closure__computeSignatureFunctionNewRti(t1, isStatic, isIntercepted); + $prototype[callName] = trampoline; + for (applyTrampoline = trampoline, i = 1; i < funsOrNames.length; ++i) { + stub = funsOrNames[i]; + if (typeof stub == "string") { + stub0 = container[stub]; + stubName = stub; + stub = stub0; + } else + stubName = ""; + stubCallName = callNames[i]; + if (stubCallName != null) { + if (t2) + stub = A.Closure_forwardCallTo(stubName, stub, isIntercepted, needsDirectAccess); + $prototype[stubCallName] = stub; + } + if (i === applyTrampolineIndex) + applyTrampoline = stub; + } + $prototype["call*"] = applyTrampoline; + $prototype.$requiredArgCount = parameters.rC; + $prototype.$defaultValues = parameters.dV; + return $constructor; + }, + Closure__computeSignatureFunctionNewRti(functionType, isStatic, isIntercepted) { + if (typeof functionType == "number") + return functionType; + if (typeof functionType == "string") { + if (isStatic) + throw A.wrapException("Cannot compute signature for static tearoff."); + return function(recipe, evalOnReceiver) { + return function() { + return evalOnReceiver(this, recipe); + }; + }(functionType, A.BoundClosure_evalRecipe); + } + throw A.wrapException("Error in functionType of tearoff"); + }, + Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf; + switch (needsDirectAccess ? -1 : arity) { + case 0: + return function(entry, receiverOf) { + return function() { + return receiverOf(this)[entry](); + }; + }(stubName, getReceiver); + case 1: + return function(entry, receiverOf) { + return function(a) { + return receiverOf(this)[entry](a); + }; + }(stubName, getReceiver); + case 2: + return function(entry, receiverOf) { + return function(a, b) { + return receiverOf(this)[entry](a, b); + }; + }(stubName, getReceiver); + case 3: + return function(entry, receiverOf) { + return function(a, b, c) { + return receiverOf(this)[entry](a, b, c); + }; + }(stubName, getReceiver); + case 4: + return function(entry, receiverOf) { + return function(a, b, c, d) { + return receiverOf(this)[entry](a, b, c, d); + }; + }(stubName, getReceiver); + case 5: + return function(entry, receiverOf) { + return function(a, b, c, d, e) { + return receiverOf(this)[entry](a, b, c, d, e); + }; + }(stubName, getReceiver); + default: + return function(f, receiverOf) { + return function() { + return f.apply(receiverOf(this), arguments); + }; + }($function, getReceiver); + } + }, + Closure_forwardCallTo(stubName, $function, isIntercepted, needsDirectAccess) { + if (isIntercepted) + return A.Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess); + return A.Closure_cspForwardCall($function.length, needsDirectAccess, stubName, $function); + }, + Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf, + getInterceptor = A.BoundClosure_interceptorOf; + switch (needsDirectAccess ? -1 : arity) { + case 0: + throw A.wrapException(new A.RuntimeError("Intercepted function with no arguments.")); + case 1: + return function(entry, interceptorOf, receiverOf) { + return function() { + return interceptorOf(this)[entry](receiverOf(this)); + }; + }(stubName, getInterceptor, getReceiver); + case 2: + return function(entry, interceptorOf, receiverOf) { + return function(a) { + return interceptorOf(this)[entry](receiverOf(this), a); + }; + }(stubName, getInterceptor, getReceiver); + case 3: + return function(entry, interceptorOf, receiverOf) { + return function(a, b) { + return interceptorOf(this)[entry](receiverOf(this), a, b); + }; + }(stubName, getInterceptor, getReceiver); + case 4: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c); + }; + }(stubName, getInterceptor, getReceiver); + case 5: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c, d) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d); + }; + }(stubName, getInterceptor, getReceiver); + case 6: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c, d, e) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d, e); + }; + }(stubName, getInterceptor, getReceiver); + default: + return function(f, interceptorOf, receiverOf) { + return function() { + var a = [receiverOf(this)]; + Array.prototype.push.apply(a, arguments); + return f.apply(interceptorOf(this), a); + }; + }($function, getInterceptor, getReceiver); + } + }, + Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess) { + var arity, t1; + if ($.BoundClosure__interceptorFieldNameCache == null) + $.BoundClosure__interceptorFieldNameCache = A.BoundClosure__computeFieldNamed("interceptor"); + if ($.BoundClosure__receiverFieldNameCache == null) + $.BoundClosure__receiverFieldNameCache = A.BoundClosure__computeFieldNamed("receiver"); + arity = $function.length; + t1 = A.Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + closureFromTearOff(parameters) { + return A.Closure_fromTearOff(parameters); + }, + BoundClosure_evalRecipe(closure, recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, A.instanceType(closure._receiver), recipe); + }, + BoundClosure_receiverOf(closure) { + return closure._receiver; + }, + BoundClosure_interceptorOf(closure) { + return closure._interceptor; + }, + BoundClosure__computeFieldNamed(fieldName) { + var t1, i, $name, + template = new A.BoundClosure("receiver", "interceptor"), + names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template)); + for (t1 = names.length, i = 0; i < t1; ++i) { + $name = names[i]; + if (template[$name] === fieldName) + return $name; + } + throw A.wrapException(A.ArgumentError$("Field name " + fieldName + " not found.", null)); + }, + throwCyclicInit(staticName) { + throw A.wrapException(new A._CyclicInitializationError(staticName)); + }, + getIsolateAffinityTag($name) { + return init.getIsolateTag($name); + }, + LinkedHashMapKeyIterator$(_map, _modifications) { + var t1 = new A.LinkedHashMapKeyIterator(_map, _modifications); + t1.__js_helper$_cell = _map.__js_helper$_first; + return t1; + }, + defineProperty(obj, property, value) { + Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); + }, + lookupAndCacheInterceptor(obj) { + var interceptor, interceptorClass, altTag, mark, t1, + tag = $.getTagFunction.call$1(obj), + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + if (interceptorClass == null) { + altTag = $.alternateTagFunction.call$2(obj, tag); + if (altTag != null) { + record = $.dispatchRecordsForInstanceTags[altTag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[altTag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[altTag]; + tag = altTag; + } + } + if (interceptorClass == null) + return null; + interceptor = interceptorClass.prototype; + mark = tag[0]; + if (mark === "!") { + record = A.makeLeafDispatchRecord(interceptor); + $.dispatchRecordsForInstanceTags[tag] = record; + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + if (mark === "~") { + $.interceptorsForUncacheableTags[tag] = interceptor; + return interceptor; + } + if (mark === "-") { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } + if (mark === "+") + return A.patchInteriorProto(obj, interceptor); + if (mark === "*") + throw A.wrapException(A.UnimplementedError$(tag)); + if (init.leafTags[tag] === true) { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } else + return A.patchInteriorProto(obj, interceptor); + }, + patchInteriorProto(obj, interceptor) { + var proto = Object.getPrototypeOf(obj); + Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); + return interceptor; + }, + makeLeafDispatchRecord(interceptor) { + return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); + }, + makeDefaultDispatchRecord(tag, interceptorClass, proto) { + var interceptor = interceptorClass.prototype; + if (init.leafTags[tag] === true) + return A.makeLeafDispatchRecord(interceptor); + else + return J.makeDispatchRecord(interceptor, proto, null, null); + }, + initNativeDispatch() { + if (true === $.initNativeDispatchFlag) + return; + $.initNativeDispatchFlag = true; + A.initNativeDispatchContinue(); + }, + initNativeDispatchContinue() { + var map, tags, fun, i, tag, proto, record, interceptorClass; + $.dispatchRecordsForInstanceTags = Object.create(null); + $.interceptorsForUncacheableTags = Object.create(null); + A.initHooks(); + map = init.interceptorsByTag; + tags = Object.getOwnPropertyNames(map); + if (typeof window != "undefined") { + window; + fun = function() { + }; + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + proto = $.prototypeForTagFunction.call$1(tag); + if (proto != null) { + record = A.makeDefaultDispatchRecord(tag, map[tag], proto); + if (record != null) { + Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + fun.prototype = proto; + } + } + } + } + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + if (/^[A-Za-z_]/.test(tag)) { + interceptorClass = map[tag]; + map["!" + tag] = interceptorClass; + map["~" + tag] = interceptorClass; + map["-" + tag] = interceptorClass; + map["+" + tag] = interceptorClass; + map["*" + tag] = interceptorClass; + } + } + }, + initHooks() { + var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag, + hooks = B.C_JS_CONST0(); + hooks = A.applyHooksTransformer(B.C_JS_CONST1, A.applyHooksTransformer(B.C_JS_CONST2, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST4, A.applyHooksTransformer(B.C_JS_CONST5, A.applyHooksTransformer(B.C_JS_CONST6(B.C_JS_CONST), hooks))))))); + if (typeof dartNativeDispatchHooksTransformer != "undefined") { + transformers = dartNativeDispatchHooksTransformer; + if (typeof transformers == "function") + transformers = [transformers]; + if (Array.isArray(transformers)) + for (i = 0; i < transformers.length; ++i) { + transformer = transformers[i]; + if (typeof transformer == "function") + hooks = transformer(hooks) || hooks; + } + } + getTag = hooks.getTag; + getUnknownTag = hooks.getUnknownTag; + prototypeForTag = hooks.prototypeForTag; + $.getTagFunction = new A.initHooks_closure(getTag); + $.alternateTagFunction = new A.initHooks_closure0(getUnknownTag); + $.prototypeForTagFunction = new A.initHooks_closure1(prototypeForTag); + }, + applyHooksTransformer(transformer, hooks) { + return transformer(hooks) || hooks; + }, + _RecordN__equalValues(a, b) { + var i; + for (i = 0; i < a.length; ++i) + if (!J.$eq$(a[i], b[i])) + return false; + return true; + }, + createRecordTypePredicate(shape, fieldRtis) { + var $length = fieldRtis.length, + $function = init.rttc["" + $length + ";" + shape]; + if ($function == null) + return null; + if ($length === 0) + return $function; + if ($length === $function.length) + return $function.apply(null, fieldRtis); + return $function(fieldRtis); + }, + JSSyntaxRegExp_makeNative(source, multiLine, caseSensitive, unicode, dotAll, global) { + var m = multiLine ? "m" : "", + i = caseSensitive ? "" : "i", + u = unicode ? "u" : "", + s = dotAll ? "s" : "", + g = global ? "g" : "", + regexp = function(source, modifiers) { + try { + return new RegExp(source, modifiers); + } catch (e) { + return e; + } + }(source, m + i + u + s + g); + if (regexp instanceof RegExp) + return regexp; + throw A.wrapException(A.FormatException$("Illegal RegExp pattern (" + String(regexp) + ")", source, null)); + }, + stringContainsUnchecked(receiver, other, startIndex) { + var t1; + if (typeof other == "string") + return receiver.indexOf(other, startIndex) >= 0; + else if (other instanceof A.JSSyntaxRegExp) { + t1 = B.JSString_methods.substring$1(receiver, startIndex); + return other._nativeRegExp.test(t1); + } else + return !J.allMatches$1$s(other, B.JSString_methods.substring$1(receiver, startIndex)).get$isEmpty(0); + }, + escapeReplacement(replacement) { + if (replacement.indexOf("$", 0) >= 0) + return replacement.replace(/\$/g, "$$$$"); + return replacement; + }, + stringReplaceFirstRE(receiver, regexp, replacement, startIndex) { + var match = regexp._execGlobal$2(receiver, startIndex); + if (match == null) + return receiver; + return A.stringReplaceRangeUnchecked(receiver, match._match.index, match.get$end(0), replacement); + }, + quoteStringForRegExp(string) { + if (/[[\]{}()*+?.\\^$|]/.test(string)) + return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); + return string; + }, + stringReplaceAllUnchecked(receiver, pattern, replacement) { + var nativeRegexp; + if (typeof pattern == "string") + return A.stringReplaceAllUncheckedString(receiver, pattern, replacement); + if (pattern instanceof A.JSSyntaxRegExp) { + nativeRegexp = pattern.get$_nativeGlobalVersion(); + nativeRegexp.lastIndex = 0; + return receiver.replace(nativeRegexp, A.escapeReplacement(replacement)); + } + return A.stringReplaceAllGeneral(receiver, pattern, replacement); + }, + stringReplaceAllGeneral(receiver, pattern, replacement) { + var t1, startIndex, t2, match; + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), startIndex = 0, t2 = ""; t1.moveNext$0();) { + match = t1.get$current(t1); + t2 = t2 + receiver.substring(startIndex, match.get$start(match)) + replacement; + startIndex = match.get$end(match); + } + t1 = t2 + receiver.substring(startIndex); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + stringReplaceAllUncheckedString(receiver, pattern, replacement) { + var $length, t1, i; + if (pattern === "") { + if (receiver === "") + return replacement; + $length = receiver.length; + t1 = "" + replacement; + for (i = 0; i < $length; ++i) + t1 = t1 + receiver[i] + replacement; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + if (receiver.indexOf(pattern, 0) < 0) + return receiver; + if (receiver.length < 500 || replacement.indexOf("$", 0) >= 0) + return receiver.split(pattern).join(replacement); + return receiver.replace(new RegExp(A.quoteStringForRegExp(pattern), "g"), A.escapeReplacement(replacement)); + }, + stringReplaceFirstUnchecked(receiver, pattern, replacement, startIndex) { + var index, t1, matches, match; + if (typeof pattern == "string") { + index = receiver.indexOf(pattern, startIndex); + if (index < 0) + return receiver; + return A.stringReplaceRangeUnchecked(receiver, index, index + pattern.length, replacement); + } + if (pattern instanceof A.JSSyntaxRegExp) + return startIndex === 0 ? receiver.replace(pattern._nativeRegExp, A.escapeReplacement(replacement)) : A.stringReplaceFirstRE(receiver, pattern, replacement, startIndex); + t1 = J.allMatches$2$s(pattern, receiver, startIndex); + matches = t1.get$iterator(t1); + if (!matches.moveNext$0()) + return receiver; + match = matches.get$current(matches); + return B.JSString_methods.replaceRange$3(receiver, match.get$start(match), match.get$end(match), replacement); + }, + stringReplaceRangeUnchecked(receiver, start, end, replacement) { + return receiver.substring(0, start) + replacement + receiver.substring(end); + }, + _Record_1: function _Record_1(t0) { + this._0 = t0; + }, + _Record_2: function _Record_2(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_forImport: function _Record_2_forImport(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_imports_modules: function _Record_2_imports_modules(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_loadedUrls_stylesheet: function _Record_2_loadedUrls_stylesheet(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_sourceMap: function _Record_2_sourceMap(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_3: function _Record_3(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_3_forImport: function _Record_3_forImport(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_3_importer_isDependency: function _Record_3_importer_isDependency(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_3_originalUrl: function _Record_3_originalUrl(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_5_named_namedNodes_positional_positionalNodes_separator: function _Record_5_named_namedNodes_positional_positionalNodes_separator(t0) { + this._values = t0; + }, + ConstantMapView: function ConstantMapView(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + ConstantMap: function ConstantMap() { + }, + ConstantStringMap: function ConstantStringMap(t0, t1, t2) { + this._jsIndex = t0; + this._values = t1; + this.$ti = t2; + }, + _KeysOrValues: function _KeysOrValues(t0, t1) { + this._elements = t0; + this.$ti = t1; + }, + _KeysOrValuesOrElementsIterator: function _KeysOrValuesOrElementsIterator(t0, t1, t2) { + var _ = this; + _._elements = t0; + _.__js_helper$_length = t1; + _.__js_helper$_index = 0; + _.__js_helper$_current = null; + _.$ti = t2; + }, + ConstantSet: function ConstantSet() { + }, + ConstantStringSet: function ConstantStringSet(t0, t1, t2) { + this._jsIndex = t0; + this.__js_helper$_length = t1; + this.$ti = t2; + }, + GeneralConstantSet: function GeneralConstantSet(t0, t1) { + this._elements = t0; + this.$ti = t1; + }, + Instantiation: function Instantiation() { + }, + Instantiation1: function Instantiation1(t0, t1) { + this._genericClosure = t0; + this.$ti = t1; + }, + JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { + var _ = this; + _.__js_helper$_memberName = t0; + _.__js_helper$_kind = t1; + _._arguments = t2; + _._namedArgumentNames = t3; + _._typeArgumentCount = t4; + }, + Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) { + this._box_0 = t0; + this.namedArgumentList = t1; + this.$arguments = t2; + }, + TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._pattern = t0; + _._arguments = t1; + _._argumentsExpr = t2; + _._expr = t3; + _._method = t4; + _._receiver = t5; + }, + NullError: function NullError() { + }, + JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { + this.__js_helper$_message = t0; + this._method = t1; + this._receiver = t2; + }, + UnknownJsTypeError: function UnknownJsTypeError(t0) { + this.__js_helper$_message = t0; + }, + NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) { + this._irritant = t0; + }, + ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) { + this.dartException = t0; + this.stackTrace = t1; + }, + _StackTrace: function _StackTrace(t0) { + this._exception = t0; + this._trace = null; + }, + Closure: function Closure() { + }, + Closure0Args: function Closure0Args() { + }, + Closure2Args: function Closure2Args() { + }, + TearOffClosure: function TearOffClosure() { + }, + StaticClosure: function StaticClosure() { + }, + BoundClosure: function BoundClosure(t0, t1) { + this._receiver = t0; + this._interceptor = t1; + }, + _CyclicInitializationError: function _CyclicInitializationError(t0) { + this.variableName = t0; + }, + RuntimeError: function RuntimeError(t0) { + this.message = t0; + }, + _Required: function _Required() { + }, + JsLinkedHashMap: function JsLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; + _.__js_helper$_modifications = 0; + _.$ti = t0; + }, + JsLinkedHashMap_values_closure: function JsLinkedHashMap_values_closure(t0) { + this.$this = t0; + }, + JsLinkedHashMap_addAll_closure: function JsLinkedHashMap_addAll_closure(t0) { + this.$this = t0; + }, + LinkedHashMapCell: function LinkedHashMapCell(t0, t1) { + var _ = this; + _.hashMapCellKey = t0; + _.hashMapCellValue = t1; + _.__js_helper$_previous = _.__js_helper$_next = null; + }, + LinkedHashMapKeyIterable: function LinkedHashMapKeyIterable(t0, t1) { + this.__js_helper$_map = t0; + this.$ti = t1; + }, + LinkedHashMapKeyIterator: function LinkedHashMapKeyIterator(t0, t1) { + var _ = this; + _.__js_helper$_map = t0; + _.__js_helper$_modifications = t1; + _.__js_helper$_current = _.__js_helper$_cell = null; + }, + JsIdentityLinkedHashMap: function JsIdentityLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; + _.__js_helper$_modifications = 0; + _.$ti = t0; + }, + JsConstantLinkedHashMap: function JsConstantLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; + _.__js_helper$_modifications = 0; + _.$ti = t0; + }, + initHooks_closure: function initHooks_closure(t0) { + this.getTag = t0; + }, + initHooks_closure0: function initHooks_closure0(t0) { + this.getUnknownTag = t0; + }, + initHooks_closure1: function initHooks_closure1(t0) { + this.prototypeForTag = t0; + }, + _Record: function _Record() { + }, + _Record2: function _Record2() { + }, + _Record1: function _Record1() { + }, + _Record3: function _Record3() { + }, + _RecordN: function _RecordN() { + }, + JSSyntaxRegExp: function JSSyntaxRegExp(t0, t1) { + var _ = this; + _.pattern = t0; + _._nativeRegExp = t1; + _._nativeAnchoredRegExp = _._nativeGlobalRegExp = null; + }, + _MatchImplementation: function _MatchImplementation(t0) { + this._match = t0; + }, + _AllMatchesIterable: function _AllMatchesIterable(t0, t1, t2) { + this._re = t0; + this.__js_helper$_string = t1; + this.__js_helper$_start = t2; + }, + _AllMatchesIterator: function _AllMatchesIterator(t0, t1, t2) { + var _ = this; + _._regExp = t0; + _.__js_helper$_string = t1; + _._nextIndex = t2; + _.__js_helper$_current = null; + }, + StringMatch: function StringMatch(t0, t1) { + this.start = t0; + this.pattern = t1; + }, + _StringAllMatchesIterable: function _StringAllMatchesIterable(t0, t1, t2) { + this._input = t0; + this._pattern = t1; + this.__js_helper$_index = t2; + }, + _StringAllMatchesIterator: function _StringAllMatchesIterator(t0, t1, t2) { + var _ = this; + _._input = t0; + _._pattern = t1; + _.__js_helper$_index = t2; + _.__js_helper$_current = null; + }, + throwLateFieldADI(fieldName) { + A.throwExpressionWithWrapper(new A.LateError("Field '" + fieldName + "' has been assigned during initialization."), new Error()); + }, + throwUnnamedLateFieldNI() { + A.throwExpressionWithWrapper(new A.LateError("Field '' has not been initialized."), new Error()); + }, + throwUnnamedLateFieldAI() { + A.throwExpressionWithWrapper(new A.LateError("Field '' has already been initialized."), new Error()); + }, + throwUnnamedLateFieldADI() { + A.throwExpressionWithWrapper(new A.LateError("Field '' has been assigned during initialization."), new Error()); + }, + _Cell$() { + var t1 = new A._Cell(); + return t1.__late_helper$_value = t1; + }, + _Cell: function _Cell() { + this.__late_helper$_value = null; + }, + _ensureNativeList(list) { + return list; + }, + NativeFloat64List_NativeFloat64List$fromList(elements) { + return new Float64Array(A._ensureNativeList(elements)); + }, + NativeInt8List__create1(arg) { + return new Int8Array(arg); + }, + NativeUint8List_NativeUint8List($length) { + return new Uint8Array($length); + }, + _checkValidIndex(index, list, $length) { + if (index >>> 0 !== index || index >= $length) + throw A.wrapException(A.diagnoseIndexError(list, index)); + }, + _checkValidRange(start, end, $length) { + var t1; + if (!(start >>> 0 !== start)) + if (end == null) + t1 = start > $length; + else + t1 = end >>> 0 !== end || start > end || end > $length; + else + t1 = true; + if (t1) + throw A.wrapException(A.diagnoseRangeError(start, end, $length)); + if (end == null) + return $length; + return end; + }, + NativeByteBuffer: function NativeByteBuffer() { + }, + NativeTypedData: function NativeTypedData() { + }, + NativeByteData: function NativeByteData() { + }, + NativeTypedArray: function NativeTypedArray() { + }, + NativeTypedArrayOfDouble: function NativeTypedArrayOfDouble() { + }, + NativeTypedArrayOfInt: function NativeTypedArrayOfInt() { + }, + NativeFloat32List: function NativeFloat32List() { + }, + NativeFloat64List: function NativeFloat64List() { + }, + NativeInt16List: function NativeInt16List() { + }, + NativeInt32List: function NativeInt32List() { + }, + NativeInt8List: function NativeInt8List() { + }, + NativeUint16List: function NativeUint16List() { + }, + NativeUint32List: function NativeUint32List() { + }, + NativeUint8ClampedList: function NativeUint8ClampedList() { + }, + NativeUint8List: function NativeUint8List() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + Rti__getQuestionFromStar(universe, rti) { + var question = rti._precomputed1; + return question == null ? rti._precomputed1 = A._Universe__lookupQuestionRti(universe, rti._primary, true) : question; + }, + Rti__getFutureFromFutureOr(universe, rti) { + var future = rti._precomputed1; + return future == null ? rti._precomputed1 = A._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; + }, + Rti__isUnionOfFunctionType(rti) { + var kind = rti._kind; + if (kind === 6 || kind === 7 || kind === 8) + return A.Rti__isUnionOfFunctionType(rti._primary); + return kind === 12 || kind === 13; + }, + Rti__getCanonicalRecipe(rti) { + return rti._canonicalRecipe; + }, + pairwiseIsTest(fieldRtis, values) { + var i, + $length = values.length; + for (i = 0; i < $length; ++i) + if (!fieldRtis[i]._is(values[i])) + return false; + return true; + }, + findType(recipe) { + return A._Universe_eval(init.typeUniverse, recipe, false); + }, + instantiatedGenericFunctionType(genericFunctionRti, instantiationRti) { + var t1, cache, key, probe, rti; + if (genericFunctionRti == null) + return null; + t1 = instantiationRti._rest; + cache = genericFunctionRti._bindCache; + if (cache == null) + cache = genericFunctionRti._bindCache = new Map(); + key = instantiationRti._canonicalRecipe; + probe = cache.get(key); + if (probe != null) + return probe; + rti = A._substitute(init.typeUniverse, genericFunctionRti._primary, t1, 0); + cache.set(key, rti); + return rti; + }, + _substitute(universe, rti, typeArguments, depth) { + var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, t1, fields, substitutedFields, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, + kind = rti._kind; + switch (kind) { + case 5: + case 1: + case 2: + case 3: + case 4: + return rti; + case 6: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupStarRti(universe, substitutedBaseType, true); + case 7: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupQuestionRti(universe, substitutedBaseType, true); + case 8: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); + case 9: + interfaceTypeArguments = rti._rest; + substitutedInterfaceTypeArguments = A._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); + if (substitutedInterfaceTypeArguments === interfaceTypeArguments) + return rti; + return A._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); + case 10: + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + $arguments = rti._rest; + substitutedArguments = A._substituteArray(universe, $arguments, typeArguments, depth); + if (substitutedBase === base && substitutedArguments === $arguments) + return rti; + return A._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); + case 11: + t1 = rti._primary; + fields = rti._rest; + substitutedFields = A._substituteArray(universe, fields, typeArguments, depth); + if (substitutedFields === fields) + return rti; + return A._Universe__lookupRecordRti(universe, t1, substitutedFields); + case 12: + returnType = rti._primary; + substitutedReturnType = A._substitute(universe, returnType, typeArguments, depth); + functionParameters = rti._rest; + substitutedFunctionParameters = A._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); + if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters) + return rti; + return A._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); + case 13: + bounds = rti._rest; + depth += bounds.length; + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, depth); + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + if (substitutedBounds === bounds && substitutedBase === base) + return rti; + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); + case 14: + index = rti._primary; + if (index < depth) + return rti; + argument = typeArguments[index - depth]; + if (argument == null) + return rti; + return argument; + default: + throw A.wrapException(A.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); + } + }, + _substituteArray(universe, rtiArray, typeArguments, depth) { + var changed, i, rti, substitutedRti, + $length = rtiArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; ++i) { + rti = rtiArray[i]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result[i] = substitutedRti; + } + return changed ? result : rtiArray; + }, + _substituteNamed(universe, namedArray, typeArguments, depth) { + var changed, i, t1, t2, rti, substitutedRti, + $length = namedArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; i += 3) { + t1 = namedArray[i]; + t2 = namedArray[i + 1]; + rti = namedArray[i + 2]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result.splice(i, 3, t1, t2, substitutedRti); + } + return changed ? result : namedArray; + }, + _substituteFunctionParameters(universe, functionParameters, typeArguments, depth) { + var result, + requiredPositional = functionParameters._requiredPositional, + substitutedRequiredPositional = A._substituteArray(universe, requiredPositional, typeArguments, depth), + optionalPositional = functionParameters._optionalPositional, + substitutedOptionalPositional = A._substituteArray(universe, optionalPositional, typeArguments, depth), + named = functionParameters._named, + substitutedNamed = A._substituteNamed(universe, named, typeArguments, depth); + if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named) + return functionParameters; + result = new A._FunctionParameters(); + result._requiredPositional = substitutedRequiredPositional; + result._optionalPositional = substitutedOptionalPositional; + result._named = substitutedNamed; + return result; + }, + _setArrayType(target, rti) { + target[init.arrayRti] = rti; + return target; + }, + closureFunctionType(closure) { + var signature = closure.$signature; + if (signature != null) { + if (typeof signature == "number") + return A.getTypeFromTypesTable(signature); + return closure.$signature(); + } + return null; + }, + instanceOrFunctionType(object, testRti) { + var rti; + if (A.Rti__isUnionOfFunctionType(testRti)) + if (object instanceof A.Closure) { + rti = A.closureFunctionType(object); + if (rti != null) + return rti; + } + return A.instanceType(object); + }, + instanceType(object) { + if (object instanceof A.Object) + return A._instanceType(object); + if (Array.isArray(object)) + return A._arrayInstanceType(object); + return A._instanceTypeFromConstructor(J.getInterceptor$(object)); + }, + _arrayInstanceType(object) { + var rti = object[init.arrayRti], + defaultRti = type$.JSArray_dynamic; + if (rti == null) + return defaultRti; + if (rti.constructor !== defaultRti.constructor) + return defaultRti; + return rti; + }, + _instanceType(object) { + var rti = object.$ti; + return rti != null ? rti : A._instanceTypeFromConstructor(object); + }, + _instanceTypeFromConstructor(instance) { + var $constructor = instance.constructor, + probe = $constructor.$ccache; + if (probe != null) + return probe; + return A._instanceTypeFromConstructorMiss(instance, $constructor); + }, + _instanceTypeFromConstructorMiss(instance, $constructor) { + var effectiveConstructor = instance instanceof A.Closure ? Object.getPrototypeOf(Object.getPrototypeOf(instance)).constructor : $constructor, + rti = A._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); + $constructor.$ccache = rti; + return rti; + }, + getTypeFromTypesTable(index) { + var rti, + table = init.types, + type = table[index]; + if (typeof type == "string") { + rti = A._Universe_eval(init.typeUniverse, type, false); + table[index] = rti; + return rti; + } + return type; + }, + getRuntimeTypeOfDartObject(object) { + return A.createRuntimeType(A._instanceType(object)); + }, + getRuntimeTypeOfClosure(closure) { + var rti = A.closureFunctionType(closure); + return A.createRuntimeType(rti == null ? A.instanceType(closure) : rti); + }, + _structuralTypeOf(object) { + var functionRti; + if (object instanceof A._Record) + return A.evaluateRtiForRecord(object.$recipe, object._getFieldValues$0()); + functionRti = object instanceof A.Closure ? A.closureFunctionType(object) : null; + if (functionRti != null) + return functionRti; + if (type$.TrustedGetRuntimeType._is(object)) + return J.get$runtimeType$(object)._rti; + if (Array.isArray(object)) + return A._arrayInstanceType(object); + return A.instanceType(object); + }, + createRuntimeType(rti) { + var t1 = rti._cachedRuntimeType; + return t1 == null ? rti._cachedRuntimeType = A._createRuntimeType(rti) : t1; + }, + _createRuntimeType(rti) { + var starErasedRti, t1, + s = rti._canonicalRecipe, + starErasedRecipe = s.replace(/\*/g, ""); + if (starErasedRecipe === s) + return rti._cachedRuntimeType = new A._Type(rti); + starErasedRti = A._Universe_eval(init.typeUniverse, starErasedRecipe, true); + t1 = starErasedRti._cachedRuntimeType; + return t1 == null ? starErasedRti._cachedRuntimeType = A._createRuntimeType(starErasedRti) : t1; + }, + evaluateRtiForRecord(recordRecipe, valuesList) { + var bindings, i, + values = valuesList, + $length = values.length; + if ($length === 0) + return type$.Record_0; + bindings = A._Universe_evalInEnvironment(init.typeUniverse, A._structuralTypeOf(values[0]), "@<0>"); + for (i = 1; i < $length; ++i) + bindings = A._Universe_bind(init.typeUniverse, bindings, A._structuralTypeOf(values[i])); + return A._Universe_evalInEnvironment(init.typeUniverse, bindings, recordRecipe); + }, + typeLiteral(recipe) { + return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); + }, + _installSpecializedIsTest(object) { + var t1, unstarred, unstarredKind, isFn, $name, predicate, testRti = this; + if (testRti === type$.Object) + return A._finishIsFn(testRti, object, A._isObject); + if (!A.isSoundTopType(testRti)) + t1 = testRti === type$.legacy_Object; + else + t1 = true; + if (t1) + return A._finishIsFn(testRti, object, A._isTop); + t1 = testRti._kind; + if (t1 === 7) + return A._finishIsFn(testRti, object, A._generalNullableIsTestImplementation); + if (t1 === 1) + return A._finishIsFn(testRti, object, A._isNever); + unstarred = t1 === 6 ? testRti._primary : testRti; + unstarredKind = unstarred._kind; + if (unstarredKind === 8) + return A._finishIsFn(testRti, object, A._isFutureOr); + if (unstarred === type$.int) + isFn = A._isInt; + else if (unstarred === type$.double || unstarred === type$.num) + isFn = A._isNum; + else if (unstarred === type$.String) + isFn = A._isString; + else + isFn = unstarred === type$.bool ? A._isBool : null; + if (isFn != null) + return A._finishIsFn(testRti, object, isFn); + if (unstarredKind === 9) { + $name = unstarred._primary; + if (unstarred._rest.every(A.isDefinitelyTopType)) { + testRti._specializedTestResource = "$is" + $name; + if ($name === "List") + return A._finishIsFn(testRti, object, A._isListTestViaProperty); + return A._finishIsFn(testRti, object, A._isTestViaProperty); + } + } else if (unstarredKind === 11) { + predicate = A.createRecordTypePredicate(unstarred._primary, unstarred._rest); + return A._finishIsFn(testRti, object, predicate == null ? A._isNever : predicate); + } + return A._finishIsFn(testRti, object, A._generalIsTestImplementation); + }, + _finishIsFn(testRti, object, isFn) { + testRti._is = isFn; + return testRti._is(object); + }, + _installSpecializedAsCheck(object) { + var t1, testRti = this, + asFn = A._generalAsCheckImplementation; + if (!A.isSoundTopType(testRti)) + t1 = testRti === type$.legacy_Object; + else + t1 = true; + if (t1) + asFn = A._asTop; + else if (testRti === type$.Object) + asFn = A._asObject; + else { + t1 = A.isNullable(testRti); + if (t1) + asFn = A._generalNullableAsCheckImplementation; + } + testRti._as = asFn; + return testRti._as(object); + }, + _nullIs(testRti) { + var kind = testRti._kind, + t1 = true; + if (!A.isSoundTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + if (!(testRti === type$.legacy_Never)) + if (kind !== 7) + if (!(kind === 6 && A._nullIs(testRti._primary))) + t1 = kind === 8 && A._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull; + return t1; + }, + _generalIsTestImplementation(object) { + var testRti = this; + if (object == null) + return A._nullIs(testRti); + return A.isSubtype(init.typeUniverse, A.instanceOrFunctionType(object, testRti), testRti); + }, + _generalNullableIsTestImplementation(object) { + if (object == null) + return true; + return this._primary._is(object); + }, + _isTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A._nullIs(testRti); + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _isListTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A._nullIs(testRti); + if (typeof object != "object") + return false; + if (Array.isArray(object)) + return true; + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _generalAsCheckImplementation(object) { + var testRti = this; + if (object == null) { + if (A.isNullable(testRti)) + return object; + } else if (testRti._is(object)) + return object; + A._failedAsCheck(object, testRti); + }, + _generalNullableAsCheckImplementation(object) { + var testRti = this; + if (object == null) + return object; + else if (testRti._is(object)) + return object; + A._failedAsCheck(object, testRti); + }, + _failedAsCheck(object, testRti) { + throw A.wrapException(A._TypeError$fromMessage(A._Error_compose(object, A._rtiToString(testRti, null)))); + }, + _Error_compose(object, checkedTypeDescription) { + return A.Error_safeToString(object) + ": type '" + A._rtiToString(A._structuralTypeOf(object), null) + "' is not a subtype of type '" + checkedTypeDescription + "'"; + }, + _TypeError$fromMessage(message) { + return new A._TypeError("TypeError: " + message); + }, + _TypeError__TypeError$forType(object, type) { + return new A._TypeError("TypeError: " + A._Error_compose(object, type)); + }, + _isFutureOr(object) { + var testRti = this, + unstarred = testRti._kind === 6 ? testRti._primary : testRti; + return unstarred._primary._is(object) || A.Rti__getFutureFromFutureOr(init.typeUniverse, unstarred)._is(object); + }, + _isObject(object) { + return object != null; + }, + _asObject(object) { + if (object != null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "Object")); + }, + _isTop(object) { + return true; + }, + _asTop(object) { + return object; + }, + _isNever(object) { + return false; + }, + _isBool(object) { + return true === object || false === object; + }, + _asBool(object) { + if (true === object) + return true; + if (false === object) + return false; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); + }, + _asBoolS(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); + }, + _asBoolQ(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool?")); + }, + _asDouble(object) { + if (typeof object == "number") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); + }, + _asDoubleS(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); + }, + _asDoubleQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double?")); + }, + _isInt(object) { + return typeof object == "number" && Math.floor(object) === object; + }, + _asInt(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); + }, + _asIntS(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); + }, + _asIntQ(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int?")); + }, + _isNum(object) { + return typeof object == "number"; + }, + _asNum(object) { + if (typeof object == "number") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); + }, + _asNumS(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); + }, + _asNumQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num?")); + }, + _isString(object) { + return typeof object == "string"; + }, + _asString(object) { + if (typeof object == "string") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); + }, + _asStringS(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); + }, + _asStringQ(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String?")); + }, + _rtiArrayToString(array, genericContext) { + var s, sep, i; + for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") + s += sep + A._rtiToString(array[i], genericContext); + return s; + }, + _recordRtiToString(recordType, genericContext) { + var fieldCount, names, namesIndex, s, comma, i, + partialShape = recordType._primary, + fields = recordType._rest; + if ("" === partialShape) + return "(" + A._rtiArrayToString(fields, genericContext) + ")"; + fieldCount = fields.length; + names = partialShape.split(","); + namesIndex = names.length - fieldCount; + for (s = "(", comma = "", i = 0; i < fieldCount; ++i, comma = ", ") { + s += comma; + if (namesIndex === 0) + s += "{"; + s += A._rtiToString(fields[i], genericContext); + if (namesIndex >= 0) + s += " " + names[namesIndex]; + ++namesIndex; + } + return s + "})"; + }, + _functionRtiToString(functionType, genericContext, bounds) { + var boundsLength, offset, i, t1, t2, typeParametersText, typeSep, boundRti, kind, t3, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", ", outerContextLength = null; + if (bounds != null) { + boundsLength = bounds.length; + if (genericContext == null) + genericContext = A._setArrayType([], type$.JSArray_String); + else + outerContextLength = genericContext.length; + offset = genericContext.length; + for (i = boundsLength; i > 0; --i) + genericContext.push("T" + (offset + i)); + for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { + typeParametersText = B.JSString_methods.$add(typeParametersText + typeSep, genericContext[genericContext.length - 1 - i]); + boundRti = bounds[i]; + kind = boundRti._kind; + if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) + t3 = boundRti === t2; + else + t3 = true; + if (!t3) + typeParametersText += " extends " + A._rtiToString(boundRti, genericContext); + } + typeParametersText += ">"; + } else + typeParametersText = ""; + t1 = functionType._primary; + parameters = functionType._rest; + requiredPositional = parameters._requiredPositional; + requiredPositionalLength = requiredPositional.length; + optionalPositional = parameters._optionalPositional; + optionalPositionalLength = optionalPositional.length; + named = parameters._named; + namedLength = named.length; + returnTypeText = A._rtiToString(t1, genericContext); + for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(requiredPositional[i], genericContext); + if (optionalPositionalLength > 0) { + argumentsText += sep + "["; + for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(optionalPositional[i], genericContext); + argumentsText += "]"; + } + if (namedLength > 0) { + argumentsText += sep + "{"; + for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) { + argumentsText += sep; + if (named[i + 1]) + argumentsText += "required "; + argumentsText += A._rtiToString(named[i + 2], genericContext) + " " + named[i]; + } + argumentsText += "}"; + } + if (outerContextLength != null) { + genericContext.toString; + genericContext.length = outerContextLength; + } + return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; + }, + _rtiToString(rti, genericContext) { + var questionArgument, s, argumentKind, $name, $arguments, t1, + kind = rti._kind; + if (kind === 5) + return "erased"; + if (kind === 2) + return "dynamic"; + if (kind === 3) + return "void"; + if (kind === 1) + return "Never"; + if (kind === 4) + return "any"; + if (kind === 6) + return A._rtiToString(rti._primary, genericContext); + if (kind === 7) { + questionArgument = rti._primary; + s = A._rtiToString(questionArgument, genericContext); + argumentKind = questionArgument._kind; + return (argumentKind === 12 || argumentKind === 13 ? "(" + s + ")" : s) + "?"; + } + if (kind === 8) + return "FutureOr<" + A._rtiToString(rti._primary, genericContext) + ">"; + if (kind === 9) { + $name = A._unminifyOrTag(rti._primary); + $arguments = rti._rest; + return $arguments.length > 0 ? $name + ("<" + A._rtiArrayToString($arguments, genericContext) + ">") : $name; + } + if (kind === 11) + return A._recordRtiToString(rti, genericContext); + if (kind === 12) + return A._functionRtiToString(rti, genericContext, null); + if (kind === 13) + return A._functionRtiToString(rti._primary, genericContext, rti._rest); + if (kind === 14) { + t1 = rti._primary; + return genericContext[genericContext.length - 1 - t1]; + } + return "?"; + }, + _unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) + return preserved; + return rawClassName; + }, + _Universe_findRule(universe, targetType) { + var rule = universe.tR[targetType]; + for (; typeof rule == "string";) + rule = universe.tR[rule]; + return rule; + }, + _Universe_findErasedType(universe, cls) { + var $length, erased, $arguments, i, $interface, + t1 = universe.eT, + probe = t1[cls]; + if (probe == null) + return A._Universe_eval(universe, cls, false); + else if (typeof probe == "number") { + $length = probe; + erased = A._Universe__lookupTerminalRti(universe, 5, "#"); + $arguments = A._Utils_newArrayOrEmpty($length); + for (i = 0; i < $length; ++i) + $arguments[i] = erased; + $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); + t1[cls] = $interface; + return $interface; + } else + return probe; + }, + _Universe_addRules(universe, rules) { + return A._Utils_objectAssign(universe.tR, rules); + }, + _Universe_addErasedTypes(universe, types) { + return A._Utils_objectAssign(universe.eT, types); + }, + _Universe_eval(universe, recipe, normalize) { + var rti, + t1 = universe.eC, + probe = t1.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, null, recipe, normalize)); + t1.set(recipe, rti); + return rti; + }, + _Universe_evalInEnvironment(universe, environment, recipe) { + var probe, rti, + cache = environment._evalCache; + if (cache == null) + cache = environment._evalCache = new Map(); + probe = cache.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, environment, recipe, true)); + cache.set(recipe, rti); + return rti; + }, + _Universe_bind(universe, environment, argumentsRti) { + var argumentsRecipe, probe, rti, + cache = environment._bindCache; + if (cache == null) + cache = environment._bindCache = new Map(); + argumentsRecipe = argumentsRti._canonicalRecipe; + probe = cache.get(argumentsRecipe); + if (probe != null) + return probe; + rti = A._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]); + cache.set(argumentsRecipe, rti); + return rti; + }, + _Universe__installTypeTests(universe, rti) { + rti._as = A._installSpecializedAsCheck; + rti._is = A._installSpecializedIsTest; + return rti; + }, + _Universe__lookupTerminalRti(universe, kind, key) { + var rti, t1, + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = kind; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupStarRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "*", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createStarRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createStarRti(universe, baseType, key, normalize) { + var baseKind, t1, rti; + if (normalize) { + baseKind = baseType._kind; + if (!A.isSoundTopType(baseType)) + t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6; + else + t1 = true; + if (t1) + return baseType; + } + rti = new A.Rti(null, null); + rti._kind = 6; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupQuestionRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "?", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createQuestionRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createQuestionRti(universe, baseType, key, normalize) { + var baseKind, t1, starArgument, rti; + if (normalize) { + baseKind = baseType._kind; + t1 = true; + if (!A.isSoundTopType(baseType)) + if (!(baseType === type$.Null || baseType === type$.JSNull)) + if (baseKind !== 7) + t1 = baseKind === 8 && A.isNullable(baseType._primary); + if (t1) + return baseType; + else if (baseKind === 1 || baseType === type$.legacy_Never) + return type$.Null; + else if (baseKind === 6) { + starArgument = baseType._primary; + if (starArgument._kind === 8 && A.isNullable(starArgument._primary)) + return starArgument; + else + return A.Rti__getQuestionFromStar(universe, baseType); + } + } + rti = new A.Rti(null, null); + rti._kind = 7; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupFutureOrRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "/", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createFutureOrRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createFutureOrRti(universe, baseType, key, normalize) { + var t1, rti; + if (normalize) { + t1 = baseType._kind; + if (A.isSoundTopType(baseType) || baseType === type$.Object || baseType === type$.legacy_Object) + return baseType; + else if (t1 === 1) + return A._Universe__lookupInterfaceRti(universe, "Future", [baseType]); + else if (baseType === type$.Null || baseType === type$.JSNull) + return type$.nullable_Future_Null; + } + rti = new A.Rti(null, null); + rti._kind = 8; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupGenericFunctionParameterRti(universe, index) { + var rti, t1, + key = "" + index + "^", + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 14; + rti._primary = index; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__canonicalRecipeJoin($arguments) { + var s, sep, i, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",") + s += sep + $arguments[i]._canonicalRecipe; + return s; + }, + _Universe__canonicalRecipeJoinNamed($arguments) { + var s, sep, i, t1, nameSep, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") { + t1 = $arguments[i]; + nameSep = $arguments[i + 1] ? "!" : ":"; + s += sep + t1 + nameSep + $arguments[i + 2]._canonicalRecipe; + } + return s; + }, + _Universe__lookupInterfaceRti(universe, $name, $arguments) { + var probe, rti, t1, + s = $name; + if ($arguments.length > 0) + s += "<" + A._Universe__canonicalRecipeJoin($arguments) + ">"; + probe = universe.eC.get(s); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 9; + rti._primary = $name; + rti._rest = $arguments; + if ($arguments.length > 0) + rti._precomputed1 = $arguments[0]; + rti._canonicalRecipe = s; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(s, t1); + return t1; + }, + _Universe__lookupBindingRti(universe, base, $arguments) { + var newBase, newArguments, key, probe, rti, t1; + if (base._kind === 10) { + newBase = base._primary; + newArguments = base._rest.concat($arguments); + } else { + newArguments = $arguments; + newBase = base; + } + key = newBase._canonicalRecipe + (";<" + A._Universe__canonicalRecipeJoin(newArguments) + ">"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 10; + rti._primary = newBase; + rti._rest = newArguments; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupRecordRti(universe, partialShapeTag, fields) { + var rti, t1, + key = "+" + (partialShapeTag + "(" + A._Universe__canonicalRecipeJoin(fields) + ")"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 11; + rti._primary = partialShapeTag; + rti._rest = fields; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupFunctionRti(universe, returnType, parameters) { + var sep, key, probe, rti, t1, + s = returnType._canonicalRecipe, + requiredPositional = parameters._requiredPositional, + requiredPositionalLength = requiredPositional.length, + optionalPositional = parameters._optionalPositional, + optionalPositionalLength = optionalPositional.length, + named = parameters._named, + namedLength = named.length, + recipe = "(" + A._Universe__canonicalRecipeJoin(requiredPositional); + if (optionalPositionalLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "[" + A._Universe__canonicalRecipeJoin(optionalPositional) + "]"; + } + if (namedLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "{" + A._Universe__canonicalRecipeJoinNamed(named) + "}"; + } + key = s + (recipe + ")"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 12; + rti._primary = returnType; + rti._rest = parameters; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupGenericFunctionRti(universe, baseFunctionType, bounds, normalize) { + var t1, + key = baseFunctionType._canonicalRecipe + ("<" + A._Universe__canonicalRecipeJoin(bounds) + ">"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize) { + var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti; + if (normalize) { + $length = bounds.length; + typeArguments = A._Utils_newArrayOrEmpty($length); + for (count = 0, i = 0; i < $length; ++i) { + bound = bounds[i]; + if (bound._kind === 1) { + typeArguments[i] = bound; + ++count; + } + } + if (count > 0) { + substitutedBase = A._substitute(universe, baseFunctionType, typeArguments, 0); + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, 0); + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); + } + } + rti = new A.Rti(null, null); + rti._kind = 13; + rti._primary = baseFunctionType; + rti._rest = bounds; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Parser_create(universe, environment, recipe, normalize) { + return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; + }, + _Parser_parse(parser) { + var t2, i, ch, t3, array, end, item, + source = parser.r, + t1 = parser.s; + for (t2 = source.length, i = 0; i < t2;) { + ch = source.charCodeAt(i); + if (ch >= 48 && ch <= 57) + i = A._Parser_handleDigit(i + 1, ch, source, t1); + else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124) + i = A._Parser_handleIdentifier(parser, i, source, t1, false); + else if (ch === 46) + i = A._Parser_handleIdentifier(parser, i, source, t1, true); + else { + ++i; + switch (ch) { + case 44: + break; + case 58: + t1.push(false); + break; + case 33: + t1.push(true); + break; + case 59: + t1.push(A._Parser_toType(parser.u, parser.e, t1.pop())); + break; + case 94: + t1.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); + break; + case 35: + t1.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); + break; + case 64: + t1.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); + break; + case 126: + t1.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); + break; + case 60: + t1.push(parser.p); + parser.p = t1.length; + break; + case 62: + A._Parser_handleTypeArguments(parser, t1); + break; + case 38: + A._Parser_handleExtendedOperations(parser, t1); + break; + case 42: + t3 = parser.u; + t1.push(A._Universe__lookupStarRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 63: + t3 = parser.u; + t1.push(A._Universe__lookupQuestionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 47: + t3 = parser.u; + t1.push(A._Universe__lookupFutureOrRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 40: + t1.push(-3); + t1.push(parser.p); + parser.p = t1.length; + break; + case 41: + A._Parser_handleArguments(parser, t1); + break; + case 91: + t1.push(parser.p); + parser.p = t1.length; + break; + case 93: + array = t1.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = t1.pop(); + t1.push(array); + t1.push(-1); + break; + case 123: + t1.push(parser.p); + parser.p = t1.length; + break; + case 125: + array = t1.splice(parser.p); + A._Parser_toTypesNamed(parser.u, parser.e, array); + parser.p = t1.pop(); + t1.push(array); + t1.push(-2); + break; + case 43: + end = source.indexOf("(", i); + t1.push(source.substring(i, end)); + t1.push(-4); + t1.push(parser.p); + parser.p = t1.length; + i = end + 1; + break; + default: + throw "Bad character " + ch; + } + } + } + item = t1.pop(); + return A._Parser_toType(parser.u, parser.e, item); + }, + _Parser_handleDigit(i, digit, source, stack) { + var t1, ch, + value = digit - 48; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (!(ch >= 48 && ch <= 57)) + break; + value = value * 10 + (ch - 48); + } + stack.push(value); + return i; + }, + _Parser_handleIdentifier(parser, start, source, stack, hasPeriod) { + var t1, ch, t2, string, environment, recipe, + i = start + 1; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (ch === 46) { + if (hasPeriod) + break; + hasPeriod = true; + } else { + if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124)) + t2 = ch >= 48 && ch <= 57; + else + t2 = true; + if (!t2) + break; + } + } + string = source.substring(start, i); + if (hasPeriod) { + t1 = parser.u; + environment = parser.e; + if (environment._kind === 10) + environment = environment._primary; + recipe = A._Universe_findRule(t1, environment._primary)[string]; + if (recipe == null) + A.throwExpression('No "' + string + '" in "' + A.Rti__getCanonicalRecipe(environment) + '"'); + stack.push(A._Universe_evalInEnvironment(t1, environment, recipe)); + } else + stack.push(string); + return i; + }, + _Parser_handleTypeArguments(parser, stack) { + var base, + t1 = parser.u, + $arguments = A._Parser_collectArray(parser, stack), + head = stack.pop(); + if (typeof head == "string") + stack.push(A._Universe__lookupInterfaceRti(t1, head, $arguments)); + else { + base = A._Parser_toType(t1, parser.e, head); + switch (base._kind) { + case 12: + stack.push(A._Universe__lookupGenericFunctionRti(t1, base, $arguments, parser.n)); + break; + default: + stack.push(A._Universe__lookupBindingRti(t1, base, $arguments)); + break; + } + } + }, + _Parser_handleArguments(parser, stack) { + var requiredPositional, returnType, parameters, + t1 = parser.u, + head = stack.pop(), + optionalPositional = null, named = null; + if (typeof head == "number") + switch (head) { + case -1: + optionalPositional = stack.pop(); + break; + case -2: + named = stack.pop(); + break; + default: + stack.push(head); + break; + } + else + stack.push(head); + requiredPositional = A._Parser_collectArray(parser, stack); + head = stack.pop(); + switch (head) { + case -3: + head = stack.pop(); + if (optionalPositional == null) + optionalPositional = t1.sEA; + if (named == null) + named = t1.sEA; + returnType = A._Parser_toType(t1, parser.e, head); + parameters = new A._FunctionParameters(); + parameters._requiredPositional = requiredPositional; + parameters._optionalPositional = optionalPositional; + parameters._named = named; + stack.push(A._Universe__lookupFunctionRti(t1, returnType, parameters)); + return; + case -4: + stack.push(A._Universe__lookupRecordRti(t1, stack.pop(), requiredPositional)); + return; + default: + throw A.wrapException(A.AssertionError$("Unexpected state under `()`: " + A.S(head))); + } + }, + _Parser_handleExtendedOperations(parser, stack) { + var $top = stack.pop(); + if (0 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 1, "0&")); + return; + } + if (1 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 4, "1&")); + return; + } + throw A.wrapException(A.AssertionError$("Unexpected extended operation " + A.S($top))); + }, + _Parser_collectArray(parser, stack) { + var array = stack.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = stack.pop(); + return array; + }, + _Parser_toType(universe, environment, item) { + if (typeof item == "string") + return A._Universe__lookupInterfaceRti(universe, item, universe.sEA); + else if (typeof item == "number") { + environment.toString; + return A._Parser_indexToType(universe, environment, item); + } else + return item; + }, + _Parser_toTypes(universe, environment, items) { + var i, + $length = items.length; + for (i = 0; i < $length; ++i) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_toTypesNamed(universe, environment, items) { + var i, + $length = items.length; + for (i = 2; i < $length; i += 3) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_indexToType(universe, environment, index) { + var typeArguments, len, + kind = environment._kind; + if (kind === 10) { + if (index === 0) + return environment._primary; + typeArguments = environment._rest; + len = typeArguments.length; + if (index <= len) + return typeArguments[index - 1]; + index -= len; + environment = environment._primary; + kind = environment._kind; + } else if (index === 0) + return environment; + if (kind !== 9) + throw A.wrapException(A.AssertionError$("Indexed base must be an interface type")); + typeArguments = environment._rest; + if (index <= typeArguments.length) + return typeArguments[index - 1]; + throw A.wrapException(A.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); + }, + isSubtype(universe, s, t) { + var result, + sCache = s._isSubtypeCache; + if (sCache == null) + sCache = s._isSubtypeCache = new Map(); + result = sCache.get(t); + if (result == null) { + result = A._isSubtype(universe, s, null, t, null, false) ? 1 : 0; + sCache.set(t, result); + } + if (0 === result) + return false; + if (1 === result) + return true; + return true; + }, + _isSubtype(universe, s, sEnv, t, tEnv, isLegacy) { + var t1, sKind, leftTypeVariable, tKind, t2, sBounds, tBounds, sLength, i, sBound, tBound; + if (s === t) + return true; + if (!A.isSoundTopType(t)) + t1 = t === type$.legacy_Object; + else + t1 = true; + if (t1) + return true; + sKind = s._kind; + if (sKind === 4) + return true; + if (A.isSoundTopType(s)) + return false; + t1 = s._kind; + if (t1 === 1) + return true; + leftTypeVariable = sKind === 14; + if (leftTypeVariable) + if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv, false)) + return true; + tKind = t._kind; + t1 = s === type$.Null || s === type$.JSNull; + if (t1) { + if (tKind === 8) + return A._isSubtype(universe, s, sEnv, t._primary, tEnv, false); + return t === type$.Null || t === type$.JSNull || tKind === 7 || tKind === 6; + } + if (t === type$.Object) { + if (sKind === 8) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); + if (sKind === 6) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); + return sKind !== 7; + } + if (sKind === 6) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); + if (tKind === 6) { + t1 = A.Rti__getQuestionFromStar(universe, t); + return A._isSubtype(universe, s, sEnv, t1, tEnv, false); + } + if (sKind === 8) { + if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv, false)) + return false; + return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv, false); + } + if (sKind === 7) { + t1 = A._isSubtype(universe, type$.Null, sEnv, t, tEnv, false); + return t1 && A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); + } + if (tKind === 8) { + if (A._isSubtype(universe, s, sEnv, t._primary, tEnv, false)) + return true; + return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv, false); + } + if (tKind === 7) { + t1 = A._isSubtype(universe, s, sEnv, type$.Null, tEnv, false); + return t1 || A._isSubtype(universe, s, sEnv, t._primary, tEnv, false); + } + if (leftTypeVariable) + return false; + t1 = sKind !== 12; + if ((!t1 || sKind === 13) && t === type$.Function) + return true; + t2 = sKind === 11; + if (t2 && t === type$.Record) + return true; + if (tKind === 13) { + if (s === type$.JavaScriptFunction) + return true; + if (sKind !== 13) + return false; + sBounds = s._rest; + tBounds = t._rest; + sLength = sBounds.length; + if (sLength !== tBounds.length) + return false; + sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); + tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); + for (i = 0; i < sLength; ++i) { + sBound = sBounds[i]; + tBound = tBounds[i]; + if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv, false) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv, false)) + return false; + } + return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv, false); + } + if (tKind === 12) { + if (s === type$.JavaScriptFunction) + return true; + if (t1) + return false; + return A._isFunctionSubtype(universe, s, sEnv, t, tEnv, false); + } + if (sKind === 9) { + if (tKind !== 9) + return false; + return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv, false); + } + if (t2 && tKind === 11) + return A._isRecordSubtype(universe, s, sEnv, t, tEnv, false); + return false; + }, + _isFunctionSubtype(universe, s, sEnv, t, tEnv, isLegacy) { + var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; + if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv, false)) + return false; + sParameters = s._rest; + tParameters = t._rest; + sRequiredPositional = sParameters._requiredPositional; + tRequiredPositional = tParameters._requiredPositional; + sRequiredPositionalLength = sRequiredPositional.length; + tRequiredPositionalLength = tRequiredPositional.length; + if (sRequiredPositionalLength > tRequiredPositionalLength) + return false; + requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength; + sOptionalPositional = sParameters._optionalPositional; + tOptionalPositional = tParameters._optionalPositional; + sOptionalPositionalLength = sOptionalPositional.length; + tOptionalPositionalLength = tOptionalPositional.length; + if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength) + return false; + for (i = 0; i < sRequiredPositionalLength; ++i) { + t1 = sRequiredPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv, false)) + return false; + } + for (i = 0; i < requiredPositionalDelta; ++i) { + t1 = sOptionalPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv, false)) + return false; + } + for (i = 0; i < tOptionalPositionalLength; ++i) { + t1 = sOptionalPositional[requiredPositionalDelta + i]; + if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv, false)) + return false; + } + sNamed = sParameters._named; + tNamed = tParameters._named; + sNamedLength = sNamed.length; + tNamedLength = tNamed.length; + for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { + tName = tNamed[tIndex]; + for (; true;) { + if (sIndex >= sNamedLength) + return false; + sName = sNamed[sIndex]; + sIndex += 3; + if (tName < sName) + return false; + sIsRequired = sNamed[sIndex - 2]; + if (sName < tName) { + if (sIsRequired) + return false; + continue; + } + t1 = tNamed[tIndex + 1]; + if (sIsRequired && !t1) + return false; + t1 = sNamed[sIndex - 1]; + if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv, false)) + return false; + break; + } + } + for (; sIndex < sNamedLength;) { + if (sNamed[sIndex + 1]) + return false; + sIndex += 3; + } + return true; + }, + _isInterfaceSubtype(universe, s, sEnv, t, tEnv, isLegacy) { + var rule, recipes, $length, supertypeArgs, i, + sName = s._primary, + tName = t._primary; + for (; sName !== tName;) { + rule = universe.tR[sName]; + if (rule == null) + return false; + if (typeof rule == "string") { + sName = rule; + continue; + } + recipes = rule[tName]; + if (recipes == null) + return false; + $length = recipes.length; + supertypeArgs = $length > 0 ? new Array($length) : init.typeUniverse.sEA; + for (i = 0; i < $length; ++i) + supertypeArgs[i] = A._Universe_evalInEnvironment(universe, s, recipes[i]); + return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv, false); + } + return A._areArgumentsSubtypes(universe, s._rest, null, sEnv, t._rest, tEnv, false); + }, + _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv, isLegacy) { + var i, + $length = sArgs.length; + for (i = 0; i < $length; ++i) + if (!A._isSubtype(universe, sArgs[i], sEnv, tArgs[i], tEnv, false)) + return false; + return true; + }, + _isRecordSubtype(universe, s, sEnv, t, tEnv, isLegacy) { + var i, + sFields = s._rest, + tFields = t._rest, + sCount = sFields.length; + if (sCount !== tFields.length) + return false; + if (s._primary !== t._primary) + return false; + for (i = 0; i < sCount; ++i) + if (!A._isSubtype(universe, sFields[i], sEnv, tFields[i], tEnv, false)) + return false; + return true; + }, + isNullable(t) { + var kind = t._kind, + t1 = true; + if (!(t === type$.Null || t === type$.JSNull)) + if (!A.isSoundTopType(t)) + if (kind !== 7) + if (!(kind === 6 && A.isNullable(t._primary))) + t1 = kind === 8 && A.isNullable(t._primary); + return t1; + }, + isDefinitelyTopType(t) { + var t1; + if (!A.isSoundTopType(t)) + t1 = t === type$.legacy_Object; + else + t1 = true; + return t1; + }, + isSoundTopType(t) { + var kind = t._kind; + return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; + }, + _Utils_objectAssign(o, other) { + var i, key, + keys = Object.keys(other), + $length = keys.length; + for (i = 0; i < $length; ++i) { + key = keys[i]; + o[key] = other[key]; + } + }, + _Utils_newArrayOrEmpty($length) { + return $length > 0 ? new Array($length) : init.typeUniverse.sEA; + }, + Rti: function Rti(t0, t1) { + var _ = this; + _._as = t0; + _._is = t1; + _._cachedRuntimeType = _._specializedTestResource = _._isSubtypeCache = _._precomputed1 = null; + _._kind = 0; + _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; + }, + _FunctionParameters: function _FunctionParameters() { + this._named = this._optionalPositional = this._requiredPositional = null; + }, + _Type: function _Type(t0) { + this._rti = t0; + }, + _Error: function _Error() { + }, + _TypeError: function _TypeError(t0) { + this.__rti$_message = t0; + }, + _AsyncRun__initializeScheduleImmediate() { + var div, span, t1 = {}; + if (self.scheduleImmediate != null) + return A.async__AsyncRun__scheduleImmediateJsOverride$closure(); + if (self.MutationObserver != null && self.document != null) { + div = self.document.createElement("div"); + span = self.document.createElement("span"); + t1.storedCallback = null; + new self.MutationObserver(A.convertDartClosureToJS(new A._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); + return new A._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); + } else if (self.setImmediate != null) + return A.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); + return A.async__AsyncRun__scheduleImmediateWithTimer$closure(); + }, + _AsyncRun__scheduleImmediateJsOverride(callback) { + self.scheduleImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateJsOverride_internalCallback(callback), 0)); + }, + _AsyncRun__scheduleImmediateWithSetImmediate(callback) { + self.setImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(callback), 0)); + }, + _AsyncRun__scheduleImmediateWithTimer(callback) { + A.Timer__createTimer(B.Duration_0, callback); + }, + Timer__createTimer(duration, callback) { + var milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); + }, + _TimerImpl$(milliseconds, callback) { + var t1 = new A._TimerImpl(true); + t1._TimerImpl$2(milliseconds, callback); + return t1; + }, + _TimerImpl$periodic(milliseconds, callback) { + var t1 = new A._TimerImpl(false); + t1._TimerImpl$periodic$2(milliseconds, callback); + return t1; + }, + _makeAsyncAwaitCompleter($T) { + return new A._AsyncAwaitCompleter(new A._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); + }, + _asyncStartSync(bodyFunction, completer) { + bodyFunction.call$2(0, null); + completer.isSync = true; + return completer._future; + }, + _asyncAwait(object, bodyFunction) { + A._awaitOnObject(object, bodyFunction); + }, + _asyncReturn(object, completer) { + completer.complete$1(object); + }, + _asyncRethrow(object, completer) { + completer.completeError$2(A.unwrapException(object), A.getTraceFromException(object)); + }, + _awaitOnObject(object, bodyFunction) { + var t1, future, + thenCallback = new A._awaitOnObject_closure(bodyFunction), + errorCallback = new A._awaitOnObject_closure0(bodyFunction); + if (object instanceof A._Future) + object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic); + else { + t1 = type$.dynamic; + if (object instanceof A._Future) + object.then$1$2$onError(0, thenCallback, errorCallback, t1); + else { + future = new A._Future($.Zone__current, type$._Future_dynamic); + future._state = 8; + future._resultOrListeners = object; + future._thenAwait$1$2(thenCallback, errorCallback, t1); + } + } + }, + _wrapJsFunctionForAsync($function) { + var $protected = function(fn, ERROR) { + return function(errorCode, result) { + while (true) { + try { + fn(errorCode, result); + break; + } catch (error) { + result = error; + errorCode = ERROR; + } + } + }; + }($function, 1); + return $.Zone__current.registerBinaryCallback$3$1(new A._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); + }, + _SyncStarIterator__terminatedBody(_1, _2, _3) { + return 0; + }, + AsyncError$(error, stackTrace) { + var t1 = A.checkNotNullable(error, "error", type$.Object); + return new A.AsyncError(t1, stackTrace == null ? A.AsyncError_defaultStackTrace(error) : stackTrace); + }, + AsyncError_defaultStackTrace(error) { + var stackTrace; + if (type$.Error._is(error)) { + stackTrace = error.get$stackTrace(); + if (stackTrace != null) + return stackTrace; + } + return B._StringStackTrace_uwd; + }, + Future_Future$value(value, $T) { + var t1; + $T._as(value); + t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t1._asyncComplete$1(value); + return t1; + }, + Future_Future$error(error, stackTrace, $T) { + var t1, replacement; + A.checkNotNullable(error, "error", type$.Object); + t1 = $.Zone__current; + if (t1 !== B.C__RootZone) { + replacement = t1.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } + } + if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); + t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t1._asyncCompleteError$2(error, stackTrace); + return t1; + }, + Future_wait(futures, eagerError, $T) { + var handleError, future, pos, e, st, t1, t2, exception, _box_0 = {}, cleanUp = null, + _future = new A._Future($.Zone__current, $T._eval$1("_Future>")); + _box_0.values = null; + _box_0.remaining = 0; + _box_0.stackTrace = _box_0.error = null; + handleError = new A.Future_wait_handleError(_box_0, cleanUp, eagerError, _future); + try { + for (t1 = J.get$iterator$ax(futures), t2 = type$.Null; t1.moveNext$0();) { + future = t1.get$current(t1); + pos = _box_0.remaining; + J.then$1$2$onError$x(future, new A.Future_wait_closure(_box_0, pos, _future, $T, cleanUp, eagerError), handleError, t2); + ++_box_0.remaining; + } + t1 = _box_0.remaining; + if (t1 === 0) { + t1 = _future; + t1._completeWithValue$1(A._setArrayType([], $T._eval$1("JSArray<0>"))); + return t1; + } + _box_0.values = A.List_List$filled(t1, null, false, $T._eval$1("0?")); + } catch (exception) { + e = A.unwrapException(exception); + st = A.getTraceFromException(exception); + if (_box_0.remaining === 0 || eagerError) + return A.Future_Future$error(e, st, $T._eval$1("List<0>")); + else { + _box_0.error = e; + _box_0.stackTrace = st; + } + } + return _future; + }, + _Future$zoneValue(value, _zone, $T) { + var t1 = new A._Future(_zone, $T._eval$1("_Future<0>")); + t1._state = 8; + t1._resultOrListeners = value; + return t1; + }, + _Future$value(value, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t1._state = 8; + t1._resultOrListeners = value; + return t1; + }, + _Future__chainCoreFutureSync(source, target) { + var t1, listeners; + for (; t1 = source._state, (t1 & 4) !== 0;) + source = source._resultOrListeners; + if (source === target) { + target._asyncCompleteError$2(new A.ArgumentError(true, source, null, "Cannot complete a future with itself"), A.StackTrace_current()); + return; + } + t1 |= target._state & 1; + source._state = t1; + if ((t1 & 24) !== 0) { + listeners = target._removeListeners$0(); + target._cloneResult$1(source); + A._Future__propagateToListeners(target, listeners); + } else { + listeners = target._resultOrListeners; + target._setChained$1(source); + source._prependListeners$1(listeners); + } + }, + _Future__chainCoreFutureAsync(source, target) { + var t2, listeners, _box_0 = {}, + t1 = _box_0.source = source; + for (; t2 = t1._state, (t2 & 4) !== 0;) { + t1 = t1._resultOrListeners; + _box_0.source = t1; + } + if (t1 === target) { + target._asyncCompleteError$2(new A.ArgumentError(true, t1, null, "Cannot complete a future with itself"), A.StackTrace_current()); + return; + } + if ((t2 & 24) === 0) { + listeners = target._resultOrListeners; + target._setChained$1(t1); + _box_0.source._prependListeners$1(listeners); + return; + } + if ((t2 & 16) === 0 && target._resultOrListeners == null) { + target._cloneResult$1(t1); + return; + } + target._state ^= 2; + target._zone.scheduleMicrotask$1(new A._Future__chainCoreFutureAsync_closure(_box_0, target)); + }, + _Future__propagateToListeners(source, listeners) { + var _box_0, t2, t3, hasError, nextListener, nextListener0, sourceResult, t4, zone, oldZone, result, current, _box_1 = {}, + t1 = _box_1.source = source; + for (; true;) { + _box_0 = {}; + t2 = t1._state; + t3 = (t2 & 16) === 0; + hasError = !t3; + if (listeners == null) { + if (hasError && (t2 & 1) === 0) { + t2 = t1._resultOrListeners; + t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); + } + return; + } + _box_0.listener = listeners; + nextListener = listeners._nextListener; + for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) { + t1._nextListener = null; + A._Future__propagateToListeners(_box_1.source, t1); + _box_0.listener = nextListener; + nextListener0 = nextListener._nextListener; + } + t2 = _box_1.source; + sourceResult = t2._resultOrListeners; + _box_0.listenerHasError = hasError; + _box_0.listenerValueOrError = sourceResult; + if (t3) { + t4 = t1.state; + t4 = (t4 & 1) !== 0 || (t4 & 15) === 8; + } else + t4 = true; + if (t4) { + zone = t1.result._zone; + if (hasError) { + t1 = t2._zone; + t1 = !(t1 === zone || t1.get$errorZone() === zone.get$errorZone()); + } else + t1 = false; + if (t1) { + t1 = _box_1.source; + t2 = t1._resultOrListeners; + t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); + return; + } + oldZone = $.Zone__current; + if (oldZone !== zone) + $.Zone__current = zone; + else + oldZone = null; + t1 = _box_0.listener.state; + if ((t1 & 15) === 8) + new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); + else if (t3) { + if ((t1 & 1) !== 0) + new A._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); + } else if ((t1 & 2) !== 0) + new A._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); + if (oldZone != null) + $.Zone__current = oldZone; + t1 = _box_0.listenerValueOrError; + if (t1 instanceof A._Future) { + t2 = _box_0.listener.$ti; + t2 = t2._eval$1("Future<2>")._is(t1) || !t2._rest[1]._is(t1); + } else + t2 = false; + if (t2) { + result = _box_0.listener.result; + if ((t1._state & 24) !== 0) { + current = result._resultOrListeners; + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._state = t1._state & 30 | result._state & 1; + result._resultOrListeners = t1._resultOrListeners; + _box_1.source = t1; + continue; + } else + A._Future__chainCoreFutureSync(t1, result); + return; + } + } + result = _box_0.listener.result; + current = result._resultOrListeners; + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + t1 = _box_0.listenerHasError; + t2 = _box_0.listenerValueOrError; + if (!t1) { + result._state = 8; + result._resultOrListeners = t2; + } else { + result._state = result._state & 1 | 16; + result._resultOrListeners = t2; + } + _box_1.source = result; + t1 = result; + } + }, + _registerErrorHandler(errorHandler, zone) { + if (type$.dynamic_Function_Object_StackTrace._is(errorHandler)) + return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.dynamic_Function_Object._is(errorHandler)) + return zone.registerUnaryCallback$2$1(errorHandler, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$value(errorHandler, "onError", string$.Error_)); + }, + _microtaskLoop() { + var entry, next; + for (entry = $._nextCallback; entry != null; entry = $._nextCallback) { + $._lastPriorityCallback = null; + next = entry.next; + $._nextCallback = next; + if (next == null) + $._lastCallback = null; + entry.callback.call$0(); + } + }, + _startMicrotaskLoop() { + $._isInCallbackLoop = true; + try { + A._microtaskLoop(); + } finally { + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + if ($._nextCallback != null) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); + } + }, + _scheduleAsyncCallback(callback) { + var newEntry = new A._AsyncCallbackEntry(callback), + lastCallback = $._lastCallback; + if (lastCallback == null) { + $._nextCallback = $._lastCallback = newEntry; + if (!$._isInCallbackLoop) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); + } else + $._lastCallback = lastCallback.next = newEntry; + }, + _schedulePriorityAsyncCallback(callback) { + var entry, lastPriorityCallback, next, + t1 = $._nextCallback; + if (t1 == null) { + A._scheduleAsyncCallback(callback); + $._lastPriorityCallback = $._lastCallback; + return; + } + entry = new A._AsyncCallbackEntry(callback); + lastPriorityCallback = $._lastPriorityCallback; + if (lastPriorityCallback == null) { + entry.next = t1; + $._nextCallback = $._lastPriorityCallback = entry; + } else { + next = lastPriorityCallback.next; + entry.next = next; + $._lastPriorityCallback = lastPriorityCallback.next = entry; + if (next == null) + $._lastCallback = entry; + } + }, + scheduleMicrotask(callback) { + var t1, _null = null, + currentZone = $.Zone__current; + if (B.C__RootZone === currentZone) { + A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback); + return; + } + if (B.C__RootZone === currentZone.get$_scheduleMicrotask().zone) + t1 = B.C__RootZone.get$errorZone() === currentZone.get$errorZone(); + else + t1 = false; + if (t1) { + A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback$1$1(callback, type$.void)); + return; + } + t1 = $.Zone__current; + t1.scheduleMicrotask$1(t1.bindCallbackGuarded$1(callback)); + }, + Stream_Stream$fromFuture(future, $T) { + var _null = null, + t1 = $T._eval$1("_SyncStreamController<0>"), + controller = new A._SyncStreamController(_null, _null, _null, _null, t1); + future.then$1$2$onError(0, new A.Stream_Stream$fromFuture_closure(controller, $T), new A.Stream_Stream$fromFuture_closure0(controller), type$.Null); + return new A._ControllerStream(controller, t1._eval$1("_ControllerStream<1>")); + }, + StreamIterator_StreamIterator(stream) { + return new A._StreamIterator(A.checkNotNullable(stream, "stream", type$.Object)); + }, + StreamController_StreamController(onCancel, onListen, onPause, onResume, sync, $T) { + return sync ? new A._SyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_SyncStreamController<0>")) : new A._AsyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_AsyncStreamController<0>")); + }, + _runGuarded(notificationHandler) { + var e, s, exception; + if (notificationHandler == null) + return; + try { + notificationHandler.call$0(); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + $.Zone__current.handleUncaughtError$2(e, s); + } + }, + _ControllerSubscription$(_controller, onData, onError, onDone, cancelOnError, $T) { + var t1 = $.Zone__current, + t2 = cancelOnError ? 1 : 0, + t3 = onError != null ? 32 : 0, + t4 = A._BufferingStreamSubscription__registerDataHandler(t1, onData, $T), + t5 = A._BufferingStreamSubscription__registerErrorHandler(t1, onError), + t6 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + return new A._ControllerSubscription(_controller, t4, t5, t1.registerCallback$1$1(t6, type$.void), t1, t2 | t3, $T._eval$1("_ControllerSubscription<0>")); + }, + _AddStreamState_makeErrorHandler(controller) { + return new A._AddStreamState_makeErrorHandler_closure(controller); + }, + _BufferingStreamSubscription__registerDataHandler(zone, handleData, $T) { + var t1 = handleData == null ? A.async___nullDataHandler$closure() : handleData; + return zone.registerUnaryCallback$2$1(t1, type$.void, $T); + }, + _BufferingStreamSubscription__registerErrorHandler(zone, handleError) { + if (handleError == null) + handleError = A.async___nullErrorHandler$closure(); + if (type$.void_Function_Object_StackTrace._is(handleError)) + return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.void_Function_Object._is(handleError)) + return zone.registerUnaryCallback$2$1(handleError, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.", null)); + }, + _nullDataHandler(value) { + }, + _nullErrorHandler(error, stackTrace) { + $.Zone__current.handleUncaughtError$2(error, stackTrace); + }, + _nullDoneHandler() { + }, + Timer_Timer(duration, callback) { + var t1 = $.Zone__current; + if (t1 === B.C__RootZone) + return t1.createTimer$2(duration, callback); + return t1.createTimer$2(duration, t1.bindCallbackGuarded$1(callback)); + }, + _rootHandleUncaughtError($self, $parent, zone, error, stackTrace) { + A._rootHandleError(error, stackTrace); + }, + _rootHandleError(error, stackTrace) { + A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace)); + }, + _rootRun($self, $parent, zone, f) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$0(); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$0(); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunUnary($self, $parent, zone, f, arg) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$1(arg); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$1(arg); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunBinary($self, $parent, zone, f, arg1, arg2) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$2(arg1, arg2); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$2(arg1, arg2); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRegisterCallback($self, $parent, zone, f) { + return f; + }, + _rootRegisterUnaryCallback($self, $parent, zone, f) { + return f; + }, + _rootRegisterBinaryCallback($self, $parent, zone, f) { + return f; + }, + _rootErrorCallback($self, $parent, zone, error, stackTrace) { + return null; + }, + _rootScheduleMicrotask($self, $parent, zone, f) { + var t1, t2; + if (B.C__RootZone !== zone) { + t1 = B.C__RootZone.get$errorZone(); + t2 = zone.get$errorZone(); + f = t1 !== t2 ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void); + } + A._scheduleAsyncCallback(f); + }, + _rootCreateTimer($self, $parent, zone, duration, callback) { + return A.Timer__createTimer(duration, B.C__RootZone !== zone ? zone.bindCallback$1$1(callback, type$.void) : callback); + }, + _rootCreatePeriodicTimer($self, $parent, zone, duration, callback) { + var milliseconds; + if (B.C__RootZone !== zone) + callback = zone.bindUnaryCallback$2$1(callback, type$.void, type$.Timer); + milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback); + }, + _rootPrint($self, $parent, zone, line) { + A.printString(line); + }, + _printToZone(line) { + $.Zone__current.print$1(line); + }, + _rootFork($self, $parent, zone, specification, zoneValues) { + var valueMap, t1, handleUncaughtError; + $.printToZone = A.async___printToZone$closure(); + if (specification == null) + specification = B._ZoneSpecification_48t; + if (zoneValues == null) + valueMap = zone.get$_async$_map(); + else { + t1 = type$.nullable_Object; + valueMap = A.HashMap_HashMap$from(zoneValues, t1, t1); + } + t1 = new A._CustomZone(zone.get$_run(), zone.get$_runUnary(), zone.get$_runBinary(), zone.get$_registerCallback(), zone.get$_registerUnaryCallback(), zone.get$_registerBinaryCallback(), zone.get$_errorCallback(), zone.get$_scheduleMicrotask(), zone.get$_createTimer(), zone.get$_createPeriodicTimer(), zone.get$_print(), zone.get$_fork(), zone.get$_handleUncaughtError(), zone, valueMap); + handleUncaughtError = specification.handleUncaughtError; + if (handleUncaughtError != null) + t1._handleUncaughtError = new A._ZoneFunction(t1, handleUncaughtError); + return t1; + }, + runZoned(body, zoneValues, $R) { + A.checkNotNullable(body, "body", $R._eval$1("0()")); + return A._runZoned(body, zoneValues, null, $R); + }, + _runZoned(body, zoneValues, specification, $R) { + return $.Zone__current.fork$2$specification$zoneValues(specification, zoneValues).run$1$1(0, body, $R); + }, + _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { + this._box_0 = t0; + }, + _AsyncRun__initializeScheduleImmediate_closure: function _AsyncRun__initializeScheduleImmediate_closure(t0, t1, t2) { + this._box_0 = t0; + this.div = t1; + this.span = t2; + }, + _AsyncRun__scheduleImmediateJsOverride_internalCallback: function _AsyncRun__scheduleImmediateJsOverride_internalCallback(t0) { + this.callback = t0; + }, + _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) { + this.callback = t0; + }, + _TimerImpl: function _TimerImpl(t0) { + this._once = t0; + this._handle = null; + this._tick = 0; + }, + _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) { + this.$this = t0; + this.callback = t1; + }, + _TimerImpl$periodic_closure: function _TimerImpl$periodic_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.milliseconds = t1; + _.start = t2; + _.callback = t3; + }, + _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) { + this._future = t0; + this.isSync = false; + this.$ti = t1; + }, + _awaitOnObject_closure: function _awaitOnObject_closure(t0) { + this.bodyFunction = t0; + }, + _awaitOnObject_closure0: function _awaitOnObject_closure0(t0) { + this.bodyFunction = t0; + }, + _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) { + this.$protected = t0; + }, + _SyncStarIterator: function _SyncStarIterator(t0) { + var _ = this; + _._body = t0; + _._suspendedBodies = _._nestedIterator = _._datum = _._async$_current = null; + }, + _SyncStarIterable: function _SyncStarIterable(t0, t1) { + this._outerHelper = t0; + this.$ti = t1; + }, + AsyncError: function AsyncError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + Future_wait_handleError: function Future_wait_handleError(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.cleanUp = t1; + _.eagerError = t2; + _._future = t3; + }, + Future_wait_closure: function Future_wait_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.pos = t1; + _._future = t2; + _.T = t3; + _.cleanUp = t4; + _.eagerError = t5; + }, + _Completer: function _Completer() { + }, + _AsyncCompleter: function _AsyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, + _SyncCompleter: function _SyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, + _FutureListener: function _FutureListener(t0, t1, t2, t3, t4) { + var _ = this; + _._nextListener = null; + _.result = t0; + _.state = t1; + _.callback = t2; + _.errorCallback = t3; + _.$ti = t4; + }, + _Future: function _Future(t0, t1) { + var _ = this; + _._state = 0; + _._zone = t0; + _._resultOrListeners = null; + _.$ti = t1; + }, + _Future__addListener_closure: function _Future__addListener_closure(t0, t1) { + this.$this = t0; + this.listener = t1; + }, + _Future__prependListeners_closure: function _Future__prependListeners_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { + this.$this = t0; + }, + _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { + this.$this = t0; + }, + _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { + this.$this = t0; + this.e = t1; + this.s = t2; + }, + _Future__chainCoreFutureAsync_closure: function _Future__chainCoreFutureAsync_closure(t0, t1) { + this._box_0 = t0; + this.target = t1; + }, + _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _Future__asyncCompleteError_closure: function _Future__asyncCompleteError_closure(t0, t1, t2) { + this.$this = t0; + this.error = t1; + this.stackTrace = t2; + }, + _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) { + this._box_0 = t0; + this._box_1 = t1; + this.hasError = t2; + }, + _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) { + this.originalSource = t0; + }, + _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) { + this._box_0 = t0; + this.sourceResult = t1; + }, + _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) { + this._box_1 = t0; + this._box_0 = t1; + }, + _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) { + this.callback = t0; + this.next = null; + }, + Stream: function Stream() { + }, + Stream_Stream$fromFuture_closure: function Stream_Stream$fromFuture_closure(t0, t1) { + this.controller = t0; + this.T = t1; + }, + Stream_Stream$fromFuture_closure0: function Stream_Stream$fromFuture_closure0(t0) { + this.controller = t0; + }, + Stream_length_closure: function Stream_length_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + Stream_length_closure0: function Stream_length_closure0(t0, t1) { + this._box_0 = t0; + this.future = t1; + }, + _StreamController: function _StreamController() { + }, + _StreamController__subscribe_closure: function _StreamController__subscribe_closure(t0) { + this.$this = t0; + }, + _StreamController__recordCancel_complete: function _StreamController__recordCancel_complete(t0) { + this.$this = t0; + }, + _SyncStreamControllerDispatch: function _SyncStreamControllerDispatch() { + }, + _AsyncStreamControllerDispatch: function _AsyncStreamControllerDispatch() { + }, + _AsyncStreamController: function _AsyncStreamController(t0, t1, t2, t3, t4) { + var _ = this; + _._varData = null; + _._state = 0; + _._doneFuture = null; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; + }, + _SyncStreamController: function _SyncStreamController(t0, t1, t2, t3, t4) { + var _ = this; + _._varData = null; + _._state = 0; + _._doneFuture = null; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; + }, + _ControllerStream: function _ControllerStream(t0, t1) { + this._controller = t0; + this.$ti = t1; + }, + _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._controller = t0; + _._onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._state = t5; + _._pending = _._cancelFuture = null; + _.$ti = t6; + }, + _AddStreamState: function _AddStreamState() { + }, + _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) { + this.controller = t0; + }, + _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) { + this.$this = t0; + }, + _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2) { + this._varData = t0; + this.addStreamFuture = t1; + this.addSubscription = t2; + }, + _BufferingStreamSubscription: function _BufferingStreamSubscription() { + }, + _BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) { + this.$this = t0; + this.error = t1; + this.stackTrace = t2; + }, + _BufferingStreamSubscription__sendDone_sendDone: function _BufferingStreamSubscription__sendDone_sendDone(t0) { + this.$this = t0; + }, + _StreamImpl: function _StreamImpl() { + }, + _DelayedEvent: function _DelayedEvent() { + }, + _DelayedData: function _DelayedData(t0) { + this.value = t0; + this.next = null; + }, + _DelayedError: function _DelayedError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + this.next = null; + }, + _DelayedDone: function _DelayedDone() { + }, + _PendingEvents: function _PendingEvents() { + this._state = 0; + this.lastPendingEvent = this.firstPendingEvent = null; + }, + _PendingEvents_schedule_closure: function _PendingEvents_schedule_closure(t0, t1) { + this.$this = t0; + this.dispatch = t1; + }, + _StreamIterator: function _StreamIterator(t0) { + this._subscription = null; + this._stateData = t0; + this._async$_hasValue = false; + }, + _ForwardingStream: function _ForwardingStream() { + }, + _ForwardingStreamSubscription: function _ForwardingStreamSubscription(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._stream = t0; + _._subscription = null; + _._onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._state = t5; + _._pending = _._cancelFuture = null; + _.$ti = t6; + }, + _ExpandStream: function _ExpandStream(t0, t1, t2) { + this._expand = t0; + this._async$_source = t1; + this.$ti = t2; + }, + _ZoneFunction: function _ZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _ZoneSpecification: function _ZoneSpecification(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { + var _ = this; + _.handleUncaughtError = t0; + _.run = t1; + _.runUnary = t2; + _.runBinary = t3; + _.registerCallback = t4; + _.registerUnaryCallback = t5; + _.registerBinaryCallback = t6; + _.errorCallback = t7; + _.scheduleMicrotask = t8; + _.createTimer = t9; + _.createPeriodicTimer = t10; + _.print = t11; + _.fork = t12; + }, + _ZoneDelegate: function _ZoneDelegate(t0) { + this._delegationTarget = t0; + }, + _Zone: function _Zone() { + }, + _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._run = t0; + _._runUnary = t1; + _._runBinary = t2; + _._registerCallback = t3; + _._registerUnaryCallback = t4; + _._registerBinaryCallback = t5; + _._errorCallback = t6; + _._scheduleMicrotask = t7; + _._createTimer = t8; + _._createPeriodicTimer = t9; + _._print = t10; + _._fork = t11; + _._handleUncaughtError = t12; + _._delegateCache = null; + _.parent = t13; + _._async$_map = t14; + }, + _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) { + this.$this = t0; + this.registered = t1; + this.R = t2; + }, + _CustomZone_bindUnaryCallback_closure: function _CustomZone_bindUnaryCallback_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.registered = t1; + _.T = t2; + _.R = t3; + }, + _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) { + this.$this = t0; + this.registered = t1; + }, + _rootHandleError_closure: function _rootHandleError_closure(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + _RootZone: function _RootZone() { + }, + _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) { + this.$this = t0; + this.f = t1; + this.R = t2; + }, + _RootZone_bindUnaryCallback_closure: function _RootZone_bindUnaryCallback_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.f = t1; + _.T = t2; + _.R = t3; + }, + _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) { + this.$this = t0; + this.f = t1; + }, + HashMap_HashMap($K, $V) { + return new A._HashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("_HashMap<1,2>")); + }, + _HashMap__getTableEntry(table, key) { + var entry = table[key]; + return entry === table ? null : entry; + }, + _HashMap__setTableEntry(table, key, value) { + if (value == null) + table[key] = table; + else + table[key] = value; + }, + _HashMap__newHashTable() { + var table = Object.create(null); + A._HashMap__setTableEntry(table, "", table); + delete table[""]; + return table; + }, + LinkedHashMap_LinkedHashMap(equals, hashCode, isValidKey, $K, $V) { + if (isValidKey == null) + if (hashCode == null) { + if (equals == null) + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); + hashCode = A.collection___defaultHashCode$closure(); + } else { + if (A.core__identityHashCode$closure() === hashCode && A.core__identical$closure() === equals) + return new A.JsIdentityLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsIdentityLinkedHashMap<1,2>")); + if (equals == null) + equals = A.collection___defaultEquals$closure(); + } + else { + if (hashCode == null) + hashCode = A.collection___defaultHashCode$closure(); + if (equals == null) + equals = A.collection___defaultEquals$closure(); + } + return A._LinkedCustomHashMap$(equals, hashCode, isValidKey, $K, $V); + }, + LinkedHashMap_LinkedHashMap$_literal(keyValuePairs, $K, $V) { + return A.fillLiteralMap(keyValuePairs, new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"))); + }, + LinkedHashMap_LinkedHashMap$_empty($K, $V) { + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); + }, + _LinkedCustomHashMap$(_equals, _hashCode, validKey, $K, $V) { + var t1 = validKey != null ? validKey : new A._LinkedCustomHashMap_closure($K); + return new A._LinkedCustomHashMap(_equals, _hashCode, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("_LinkedCustomHashMap<1,2>")); + }, + LinkedHashSet_LinkedHashSet($E) { + return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); + }, + LinkedHashSet_LinkedHashSet$_empty($E) { + return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); + }, + LinkedHashSet_LinkedHashSet$_literal(values, $E) { + return A.fillLiteralSet(values, new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>"))); + }, + _LinkedHashSet__newHashTable() { + var table = Object.create(null); + table[""] = table; + delete table[""]; + return table; + }, + _LinkedHashSetIterator$(_set, _modifications, $E) { + var t1 = new A._LinkedHashSetIterator(_set, _modifications, $E._eval$1("_LinkedHashSetIterator<0>")); + t1._cell = _set._first; + return t1; + }, + UnmodifiableListView$(source, $E) { + return new A.UnmodifiableListView(source, $E._eval$1("UnmodifiableListView<0>")); + }, + _defaultEquals(a, b) { + return J.$eq$(a, b); + }, + _defaultHashCode(a) { + return J.get$hashCode$(a); + }, + HashMap_HashMap$from(other, $K, $V) { + var result = A.HashMap_HashMap($K, $V); + other.forEach$1(0, new A.HashMap_HashMap$from_closure(result, $K, $V)); + return result; + }, + LinkedHashMap_LinkedHashMap$from(other, $K, $V) { + var result = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); + other.forEach$1(0, new A.LinkedHashMap_LinkedHashMap$from_closure(result, $K, $V)); + return result; + }, + LinkedHashMap_LinkedHashMap$of(other, $K, $V) { + var t1 = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); + t1.addAll$1(0, other); + return t1; + }, + LinkedHashSet_LinkedHashSet$from(elements, $E) { + var t1, _i, + result = A.LinkedHashSet_LinkedHashSet($E); + for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) + result.add$1(0, $E._as(elements[_i])); + return result; + }, + LinkedHashSet_LinkedHashSet$of(elements, $E) { + var t1 = A.LinkedHashSet_LinkedHashSet($E); + t1.addAll$1(0, elements); + return t1; + }, + ListBase__compareAny(a, b) { + var t1 = type$.Comparable_dynamic; + return J.compareTo$1$ns(t1._as(a), t1._as(b)); + }, + MapBase_mapToString(m) { + var result, t1 = {}; + if (A.isToStringVisiting(m)) + return "{...}"; + result = new A.StringBuffer(""); + try { + $.toStringVisiting.push(m); + result._contents += "{"; + t1.first = true; + m.forEach$1(0, new A.MapBase_mapToString_closure(t1, result)); + result._contents += "}"; + } finally { + $.toStringVisiting.pop(); + } + t1 = result._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + MapBase__fillMapWithIterables(map, keys, values) { + var keyIterator = keys.get$iterator(keys), + valueIterator = values.get$iterator(values), + hasNextKey = keyIterator.moveNext$0(), + hasNextValue = valueIterator.moveNext$0(); + while (true) { + if (!(hasNextKey && hasNextValue)) + break; + map.$indexSet(0, keyIterator.get$current(keyIterator), valueIterator.get$current(valueIterator)); + hasNextKey = keyIterator.moveNext$0(); + hasNextValue = valueIterator.moveNext$0(); + } + if (hasNextKey || hasNextValue) + throw A.wrapException(A.ArgumentError$("Iterables do not have same length.", null)); + }, + ListQueue$($E) { + return new A.ListQueue(A.List_List$filled(A.ListQueue__calculateCapacity(null), null, false, $E._eval$1("0?")), $E._eval$1("ListQueue<0>")); + }, + ListQueue__calculateCapacity(initialCapacity) { + return 8; + }, + ListQueue__nextPowerOf2(number) { + var nextNumber; + number = (number << 1 >>> 0) - 1; + for (; true; number = nextNumber) { + nextNumber = (number & number - 1) >>> 0; + if (nextNumber === 0) + return number; + } + }, + _ListQueueIterator$(queue, $E) { + return new A._ListQueueIterator(queue, queue._tail, queue._modificationCount, queue._head, $E._eval$1("_ListQueueIterator<0>")); + }, + _UnmodifiableSetMixin__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot change an unmodifiable set")); + }, + _HashMap: function _HashMap(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_keys = _._collection$_rest = _._nums = _._strings = null; + _.$ti = t0; + }, + _HashMap_values_closure: function _HashMap_values_closure(t0) { + this.$this = t0; + }, + _HashMap_addAll_closure: function _HashMap_addAll_closure(t0) { + this.$this = t0; + }, + _IdentityHashMap: function _IdentityHashMap(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_keys = _._collection$_rest = _._nums = _._strings = null; + _.$ti = t0; + }, + _HashMapKeyIterable: function _HashMapKeyIterable(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + _HashMapKeyIterator: function _HashMapKeyIterator(t0, t1, t2) { + var _ = this; + _._map = t0; + _._collection$_keys = t1; + _._offset = 0; + _._collection$_current = null; + _.$ti = t2; + }, + _LinkedCustomHashMap: function _LinkedCustomHashMap(t0, t1, t2, t3) { + var _ = this; + _._equals = t0; + _._hashCode = t1; + _._validKey = t2; + _.__js_helper$_length = 0; + _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; + _.__js_helper$_modifications = 0; + _.$ti = t3; + }, + _LinkedCustomHashMap_closure: function _LinkedCustomHashMap_closure(t0) { + this.K = t0; + }, + _LinkedHashSet: function _LinkedHashSet(t0) { + var _ = this; + _._collection$_length = 0; + _._last = _._first = _._collection$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + _LinkedIdentityHashSet: function _LinkedIdentityHashSet(t0) { + var _ = this; + _._collection$_length = 0; + _._last = _._first = _._collection$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + _LinkedHashSetCell: function _LinkedHashSetCell(t0) { + this._element = t0; + this._previous = this._next = null; + }, + _LinkedHashSetIterator: function _LinkedHashSetIterator(t0, t1, t2) { + var _ = this; + _._set = t0; + _._modifications = t1; + _._collection$_current = _._cell = null; + _.$ti = t2; + }, + UnmodifiableListView: function UnmodifiableListView(t0, t1) { + this._collection$_source = t0; + this.$ti = t1; + }, + HashMap_HashMap$from_closure: function HashMap_HashMap$from_closure(t0, t1, t2) { + this.result = t0; + this.K = t1; + this.V = t2; + }, + LinkedHashMap_LinkedHashMap$from_closure: function LinkedHashMap_LinkedHashMap$from_closure(t0, t1, t2) { + this.result = t0; + this.K = t1; + this.V = t2; + }, + ListBase: function ListBase() { + }, + MapBase: function MapBase() { + }, + MapBase_addAll_closure: function MapBase_addAll_closure(t0) { + this.$this = t0; + }, + MapBase_entries_closure: function MapBase_entries_closure(t0) { + this.$this = t0; + }, + MapBase_mapToString_closure: function MapBase_mapToString_closure(t0, t1) { + this._box_0 = t0; + this.result = t1; + }, + UnmodifiableMapBase: function UnmodifiableMapBase() { + }, + _MapBaseValueIterable: function _MapBaseValueIterable(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + _MapBaseValueIterator: function _MapBaseValueIterator(t0, t1, t2) { + var _ = this; + _._collection$_keys = t0; + _._map = t1; + _._collection$_current = null; + _.$ti = t2; + }, + _UnmodifiableMapMixin: function _UnmodifiableMapMixin() { + }, + MapView: function MapView() { + }, + UnmodifiableMapView: function UnmodifiableMapView(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + ListQueue: function ListQueue(t0, t1) { + var _ = this; + _._table = t0; + _._modificationCount = _._tail = _._head = 0; + _.$ti = t1; + }, + _ListQueueIterator: function _ListQueueIterator(t0, t1, t2, t3, t4) { + var _ = this; + _._queue = t0; + _._collection$_end = t1; + _._modificationCount = t2; + _._collection$_position = t3; + _._collection$_current = null; + _.$ti = t4; + }, + SetBase: function SetBase() { + }, + _SetBase: function _SetBase() { + }, + _UnmodifiableSetMixin: function _UnmodifiableSetMixin() { + }, + UnmodifiableSetView: function UnmodifiableSetView(t0, t1) { + this._collection$_source = t0; + this.$ti = t1; + }, + _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { + }, + _UnmodifiableSetView_SetBase__UnmodifiableSetMixin: function _UnmodifiableSetView_SetBase__UnmodifiableSetMixin() { + }, + _parseJson(source, reviver) { + var e, exception, t1, parsed = null; + try { + parsed = JSON.parse(source); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.FormatException$(String(e), null, null); + throw A.wrapException(t1); + } + t1 = A._convertJsonToDartLazy(parsed); + return t1; + }, + _convertJsonToDartLazy(object) { + var i; + if (object == null) + return null; + if (typeof object != "object") + return object; + if (!Array.isArray(object)) + return new A._JsonMap(object, Object.create(null)); + for (i = 0; i < object.length; ++i) + object[i] = A._convertJsonToDartLazy(object[i]); + return object; + }, + _Utf8Decoder__makeNativeUint8List(codeUnits, start, end) { + var bytes, t1, i, b, + $length = end - start; + if ($length <= 4096) + bytes = $.$get$_Utf8Decoder__reusableBuffer(); + else + bytes = new Uint8Array($length); + for (t1 = J.getInterceptor$asx(codeUnits), i = 0; i < $length; ++i) { + b = t1.$index(codeUnits, start + i); + if ((b & 255) !== b) + b = 255; + bytes[i] = b; + } + return bytes; + }, + _Utf8Decoder__convertInterceptedUint8List(allowMalformed, codeUnits, start, end) { + var decoder = allowMalformed ? $.$get$_Utf8Decoder__decoderNonfatal() : $.$get$_Utf8Decoder__decoder(); + if (decoder == null) + return null; + if (0 === start && end === codeUnits.length) + return A._Utf8Decoder__useTextDecoder(decoder, codeUnits); + return A._Utf8Decoder__useTextDecoder(decoder, codeUnits.subarray(start, end)); + }, + _Utf8Decoder__useTextDecoder(decoder, codeUnits) { + var t1, exception; + try { + t1 = decoder.decode(codeUnits); + return t1; + } catch (exception) { + } + return null; + }, + Base64Codec__checkPadding(source, sourceIndex, sourceEnd, firstPadding, paddingCount, $length) { + if (B.JSInt_methods.$mod($length, 4) !== 0) + throw A.wrapException(A.FormatException$("Invalid base64 padding, padded length must be multiple of four, is " + $length, source, sourceEnd)); + if (firstPadding + paddingCount !== $length) + throw A.wrapException(A.FormatException$("Invalid base64 padding, '=' not at the end", source, sourceIndex)); + if (paddingCount > 2) + throw A.wrapException(A.FormatException$("Invalid base64 padding, more than two '=' characters", source, sourceIndex)); + }, + _Base64Encoder_encodeChunk(alphabet, bytes, start, end, isLast, output, outputIndex, state) { + var t1, i, byteOr, byte, outputIndex0, outputIndex1, + bits = state >>> 2, + expectedChars = 3 - (state & 3); + for (t1 = J.getInterceptor$asx(bytes), i = start, byteOr = 0; i < end; ++i) { + byte = t1.$index(bytes, i); + byteOr = (byteOr | byte) >>> 0; + bits = (bits << 8 | byte) & 16777215; + --expectedChars; + if (expectedChars === 0) { + outputIndex0 = outputIndex + 1; + output[outputIndex] = alphabet.charCodeAt(bits >>> 18 & 63); + outputIndex = outputIndex0 + 1; + output[outputIndex0] = alphabet.charCodeAt(bits >>> 12 & 63); + outputIndex0 = outputIndex + 1; + output[outputIndex] = alphabet.charCodeAt(bits >>> 6 & 63); + outputIndex = outputIndex0 + 1; + output[outputIndex0] = alphabet.charCodeAt(bits & 63); + bits = 0; + expectedChars = 3; + } + } + if (byteOr >= 0 && byteOr <= 255) { + if (isLast && expectedChars < 3) { + outputIndex0 = outputIndex + 1; + outputIndex1 = outputIndex0 + 1; + if (3 - expectedChars === 1) { + output[outputIndex] = alphabet.charCodeAt(bits >>> 2 & 63); + output[outputIndex0] = alphabet.charCodeAt(bits << 4 & 63); + output[outputIndex1] = 61; + output[outputIndex1 + 1] = 61; + } else { + output[outputIndex] = alphabet.charCodeAt(bits >>> 10 & 63); + output[outputIndex0] = alphabet.charCodeAt(bits >>> 4 & 63); + output[outputIndex1] = alphabet.charCodeAt(bits << 2 & 63); + output[outputIndex1 + 1] = 61; + } + return 0; + } + return (bits << 2 | 3 - expectedChars) >>> 0; + } + for (i = start; i < end;) { + byte = t1.$index(bytes, i); + if (byte < 0 || byte > 255) + break; + ++i; + } + throw A.wrapException(A.ArgumentError$value(bytes, "Not a byte value at index " + i + ": 0x" + J.toRadixString$1$n(t1.$index(bytes, i), 16), null)); + }, + JsonUnsupportedObjectError$(unsupportedObject, cause, partialResult) { + return new A.JsonUnsupportedObjectError(unsupportedObject, cause); + }, + _defaultToEncodable(object) { + return object.toJson$0(); + }, + _JsonStringStringifier$(_sink, _toEncodable) { + return new A._JsonStringStringifier(_sink, [], A.convert___defaultToEncodable$closure()); + }, + _JsonStringStringifier_stringify(object, toEncodable, indent) { + var t1, + output = new A.StringBuffer(""), + stringifier = A._JsonStringStringifier$(output, toEncodable); + stringifier.writeObject$1(object); + t1 = output._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Utf8Decoder_errorDescription(state) { + switch (state) { + case 65: + return "Missing extension byte"; + case 67: + return "Unexpected extension byte"; + case 69: + return "Invalid UTF-8 byte"; + case 71: + return "Overlong encoding"; + case 73: + return "Out of unicode range"; + case 75: + return "Encoded surrogate"; + case 77: + return "Unfinished UTF-8 octet sequence"; + default: + return ""; + } + }, + _JsonMap: function _JsonMap(t0, t1) { + this._original = t0; + this._processed = t1; + this._data = null; + }, + _JsonMap_values_closure: function _JsonMap_values_closure(t0) { + this.$this = t0; + }, + _JsonMap_addAll_closure: function _JsonMap_addAll_closure(t0) { + this.$this = t0; + }, + _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) { + this._convert$_parent = t0; + }, + _Utf8Decoder__decoder_closure: function _Utf8Decoder__decoder_closure() { + }, + _Utf8Decoder__decoderNonfatal_closure: function _Utf8Decoder__decoderNonfatal_closure() { + }, + AsciiCodec: function AsciiCodec() { + }, + _UnicodeSubsetEncoder: function _UnicodeSubsetEncoder() { + }, + AsciiEncoder: function AsciiEncoder(t0) { + this._subsetMask = t0; + }, + Base64Codec: function Base64Codec() { + }, + Base64Encoder: function Base64Encoder() { + }, + _Base64Encoder: function _Base64Encoder(t0) { + this._convert$_state = 0; + this._alphabet = t0; + }, + _Base64EncoderSink: function _Base64EncoderSink() { + }, + _Utf8Base64EncoderSink: function _Utf8Base64EncoderSink(t0, t1) { + this._sink = t0; + this._encoder = t1; + }, + ByteConversionSink: function ByteConversionSink() { + }, + Codec: function Codec() { + }, + Converter: function Converter() { + }, + Encoding: function Encoding() { + }, + JsonUnsupportedObjectError: function JsonUnsupportedObjectError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCyclicError: function JsonCyclicError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCodec: function JsonCodec() { + }, + JsonEncoder: function JsonEncoder(t0) { + this._toEncodable = t0; + }, + JsonDecoder: function JsonDecoder(t0) { + this._reviver = t0; + }, + _JsonStringifier: function _JsonStringifier() { + }, + _JsonStringifier_writeMap_closure: function _JsonStringifier_writeMap_closure(t0, t1) { + this._box_0 = t0; + this.keyValueList = t1; + }, + _JsonStringStringifier: function _JsonStringStringifier(t0, t1, t2) { + this._sink = t0; + this._seen = t1; + this._toEncodable = t2; + }, + StringConversionSink: function StringConversionSink() { + }, + _StringSinkConversionSink: function _StringSinkConversionSink(t0) { + this._stringSink = t0; + }, + _StringCallbackSink: function _StringCallbackSink(t0, t1) { + this._convert$_callback = t0; + this._stringSink = t1; + }, + _Utf8StringSinkAdapter: function _Utf8StringSinkAdapter(t0, t1, t2) { + this._decoder = t0; + this._sink = t1; + this._stringSink = t2; + }, + Utf8Codec: function Utf8Codec() { + }, + Utf8Encoder: function Utf8Encoder() { + }, + _Utf8Encoder: function _Utf8Encoder(t0) { + this._bufferIndex = 0; + this._buffer = t0; + }, + Utf8Decoder: function Utf8Decoder(t0) { + this._allowMalformed = t0; + }, + _Utf8Decoder: function _Utf8Decoder(t0) { + this.allowMalformed = t0; + this._convert$_state = 16; + this._charOrIndex = 0; + }, + identityHashCode(object) { + return A.objectHashCode(object); + }, + Function_apply($function, positionalArguments) { + return A.Primitives_applyFunction($function, positionalArguments, null); + }, + Expando$() { + return new A.Expando(new WeakMap()); + }, + Expando__checkType(object) { + if (A._isBool(object) || typeof object == "number" || typeof object == "string" || object instanceof A._Record) + A.Expando__badExpandoKey(object); + }, + Expando__badExpandoKey(object) { + throw A.wrapException(A.ArgumentError$value(object, "object", "Expandos are not allowed on strings, numbers, bools, records or null")); + }, + int_parse(source, radix) { + var value = A.Primitives_parseInt(source, radix); + if (value != null) + return value; + throw A.wrapException(A.FormatException$(source, null, null)); + }, + double_parse(source) { + var value = A.Primitives_parseDouble(source); + if (value != null) + return value; + throw A.wrapException(A.FormatException$("Invalid double", source, null)); + }, + Error__throw(error, stackTrace) { + error = A.wrapException(error); + error.stack = stackTrace.toString$0(0); + throw error; + throw A.wrapException("unreachable"); + }, + List_List$filled($length, fill, growable, $E) { + var i, + result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E); + if ($length !== 0 && fill != null) + for (i = 0; i < result.length; ++i) + result[i] = fill; + return result; + }, + List_List$from(elements, growable, $E) { + var t1, + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + list.push(t1.get$current(t1)); + if (growable) + return list; + return J.JSArray_markFixedList(list); + }, + List_List$of(elements, growable, $E) { + var t1; + if (growable) + return A.List_List$_of(elements, $E); + t1 = J.JSArray_markFixedList(A.List_List$_of(elements, $E)); + return t1; + }, + List_List$_of(elements, $E) { + var list, t1; + if (Array.isArray(elements)) + return A._setArrayType(elements.slice(0), $E._eval$1("JSArray<0>")); + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + list.push(t1.get$current(t1)); + return list; + }, + List_List$unmodifiable(elements, $E) { + return J.JSArray_markUnmodifiableList(A.List_List$from(elements, false, $E)); + }, + String_String$fromCharCodes(charCodes, start, end) { + var t1, t2, maxLength, array, len; + A.RangeError_checkNotNegative(start, "start"); + t1 = end == null; + t2 = !t1; + if (t2) { + maxLength = end - start; + if (maxLength < 0) + throw A.wrapException(A.RangeError$range(end, start, null, "end", null)); + if (maxLength === 0) + return ""; + } + if (Array.isArray(charCodes)) { + array = charCodes; + len = array.length; + if (t1) + end = len; + return A.Primitives_stringFromCharCodes(start > 0 || end < len ? array.slice(start, end) : array); + } + if (type$.NativeUint8List._is(charCodes)) + return A.String__stringFromUint8List(charCodes, start, end); + if (t2) + charCodes = J.take$1$ax(charCodes, end); + if (start > 0) + charCodes = J.skip$1$ax(charCodes, start); + return A.Primitives_stringFromCharCodes(A.List_List$of(charCodes, true, type$.int)); + }, + String_String$fromCharCode(charCode) { + return A.Primitives_stringFromCharCode(charCode); + }, + String__stringFromUint8List(charCodes, start, endOrNull) { + var len = charCodes.length; + if (start >= len) + return ""; + return A.Primitives_stringFromNativeUint8List(charCodes, start, endOrNull == null || endOrNull > len ? len : endOrNull); + }, + RegExp_RegExp(source, multiLine) { + return new A.JSSyntaxRegExp(source, A.JSSyntaxRegExp_makeNative(source, multiLine, true, false, false, false)); + }, + identical(a, b) { + return a == null ? b == null : a === b; + }, + StringBuffer__writeAll(string, objects, separator) { + var iterator = J.get$iterator$ax(objects); + if (!iterator.moveNext$0()) + return string; + if (separator.length === 0) { + do + string += A.S(iterator.get$current(iterator)); + while (iterator.moveNext$0()); + } else { + string += A.S(iterator.get$current(iterator)); + for (; iterator.moveNext$0();) + string = string + separator + A.S(iterator.get$current(iterator)); + } + return string; + }, + NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, invocation) { + return new A.NoSuchMethodError(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()); + }, + Uri_base() { + var cachedUri, uri, + current = A.Primitives_currentUri(); + if (current == null) + throw A.wrapException(A.UnsupportedError$("'Uri.base' is not supported")); + cachedUri = $.Uri__cachedBaseUri; + if (cachedUri != null && current === $.Uri__cachedBaseString) + return cachedUri; + uri = A.Uri_parse(current); + $.Uri__cachedBaseUri = uri; + $.Uri__cachedBaseString = current; + return uri; + }, + _Uri__uriEncode(canonicalTable, text, encoding, spaceToPlus) { + var t1, bytes, i, t2, byte, + _s16_ = "0123456789ABCDEF"; + if (encoding === B.C_Utf8Codec) { + t1 = $.$get$_Uri__needsNoEncoding(); + t1 = t1._nativeRegExp.test(text); + } else + t1 = false; + if (t1) + return text; + bytes = B.C_Utf8Encoder.convert$1(text); + for (t1 = bytes.length, i = 0, t2 = ""; i < t1; ++i) { + byte = bytes[i]; + if (byte < 128 && (canonicalTable[byte >>> 4] & 1 << (byte & 15)) !== 0) + t2 += A.Primitives_stringFromCharCode(byte); + else + t2 = spaceToPlus && byte === 32 ? t2 + "+" : t2 + "%" + _s16_[byte >>> 4 & 15] + _s16_[byte & 15]; + } + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + StackTrace_current() { + return A.getTraceFromException(new Error()); + }, + DateTime__fourDigits(n) { + var absN = Math.abs(n), + sign = n < 0 ? "-" : ""; + if (absN >= 1000) + return "" + n; + if (absN >= 100) + return sign + "0" + absN; + if (absN >= 10) + return sign + "00" + absN; + return sign + "000" + absN; + }, + DateTime__threeDigits(n) { + if (n >= 100) + return "" + n; + if (n >= 10) + return "0" + n; + return "00" + n; + }, + DateTime__twoDigits(n) { + if (n >= 10) + return "" + n; + return "0" + n; + }, + Duration$(microseconds, milliseconds) { + return new A.Duration(microseconds + 1000 * milliseconds); + }, + EnumByName_byName(_this, $name) { + var _i, value; + for (_i = 0; _i < 4; ++_i) { + value = _this[_i]; + if (value._name === $name) + return value; + } + throw A.wrapException(A.ArgumentError$value($name, "name", "No enum value with that name")); + }, + Error_safeToString(object) { + if (typeof object == "number" || A._isBool(object) || object == null) + return J.toString$0$(object); + if (typeof object == "string") + return JSON.stringify(object); + return A.Primitives_safeToString(object); + }, + Error_throwWithStackTrace(error, stackTrace) { + A.checkNotNullable(error, "error", type$.Object); + A.checkNotNullable(stackTrace, "stackTrace", type$.StackTrace); + A.Error__throw(error, stackTrace); + }, + AssertionError$(message) { + return new A.AssertionError(message); + }, + ArgumentError$(message, $name) { + return new A.ArgumentError(false, null, $name, message); + }, + ArgumentError$value(value, $name, message) { + return new A.ArgumentError(true, value, $name, message); + }, + ArgumentError_checkNotNull(argument, $name) { + return argument; + }, + RangeError$(message) { + var _null = null; + return new A.RangeError(_null, _null, false, _null, _null, message); + }, + RangeError$value(value, $name, message) { + return new A.RangeError(null, null, true, value, $name, message == null ? "Value not in range" : message); + }, + RangeError$range(invalidValue, minValue, maxValue, $name, message) { + return new A.RangeError(minValue, maxValue, true, invalidValue, $name, message == null ? "Invalid value" : message); + }, + RangeError_checkValueInInterval(value, minValue, maxValue, $name) { + if (value < minValue || value > maxValue) + throw A.wrapException(A.RangeError$range(value, minValue, maxValue, $name, null)); + return value; + }, + RangeError_checkValidRange(start, end, $length) { + if (0 > start || start > $length) + throw A.wrapException(A.RangeError$range(start, 0, $length, "start", null)); + if (end != null) { + if (start > end || end > $length) + throw A.wrapException(A.RangeError$range(end, start, $length, "end", null)); + return end; + } + return $length; + }, + RangeError_checkNotNegative(value, $name) { + if (value < 0) + throw A.wrapException(A.RangeError$range(value, 0, null, $name, null)); + return value; + }, + IndexError$withLength(invalidValue, $length, indexable, message, $name) { + return new A.IndexError($length, true, invalidValue, $name, "Index out of range"); + }, + IndexError_check(index, $length, indexable, message, $name) { + if (0 > index || index >= $length) + throw A.wrapException(A.IndexError$withLength(index, $length, indexable, message, $name == null ? "index" : $name)); + return index; + }, + UnsupportedError$(message) { + return new A.UnsupportedError(message); + }, + UnimplementedError$(message) { + return new A.UnimplementedError(message); + }, + StateError$(message) { + return new A.StateError(message); + }, + ConcurrentModificationError$(modifiedObject) { + return new A.ConcurrentModificationError(modifiedObject); + }, + FormatException$(message, source, offset) { + return new A.FormatException(message, source, offset); + }, + Iterable_Iterable$generate(count, generator, $E) { + if (count <= 0) + return new A.EmptyIterable($E._eval$1("EmptyIterable<0>")); + return new A._GeneratorIterable(count, generator, $E._eval$1("_GeneratorIterable<0>")); + }, + Iterable_iterableToShortString(iterable, leftDelimiter, rightDelimiter) { + var parts, t1; + if (A.isToStringVisiting(iterable)) { + if (leftDelimiter === "(" && rightDelimiter === ")") + return "(...)"; + return leftDelimiter + "..." + rightDelimiter; + } + parts = A._setArrayType([], type$.JSArray_String); + $.toStringVisiting.push(iterable); + try { + A._iterablePartsToStrings(iterable, parts); + } finally { + $.toStringVisiting.pop(); + } + t1 = A.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + Iterable_iterableToFullString(iterable, leftDelimiter, rightDelimiter) { + var buffer, t1; + if (A.isToStringVisiting(iterable)) + return leftDelimiter + "..." + rightDelimiter; + buffer = new A.StringBuffer(leftDelimiter); + $.toStringVisiting.push(iterable); + try { + t1 = buffer; + t1._contents = A.StringBuffer__writeAll(t1._contents, iterable, ", "); + } finally { + $.toStringVisiting.pop(); + } + buffer._contents += rightDelimiter; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _iterablePartsToStrings(iterable, parts) { + var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, + it = iterable.get$iterator(iterable), + $length = 0, count = 0; + while (true) { + if (!($length < 80 || count < 3)) + break; + if (!it.moveNext$0()) + return; + next = A.S(it.get$current(it)); + parts.push(next); + $length += next.length + 2; + ++count; + } + if (!it.moveNext$0()) { + if (count <= 5) + return; + ultimateString = parts.pop(); + penultimateString = parts.pop(); + } else { + penultimate = it.get$current(it); + ++count; + if (!it.moveNext$0()) { + if (count <= 4) { + parts.push(A.S(penultimate)); + return; + } + ultimateString = A.S(penultimate); + penultimateString = parts.pop(); + $length += ultimateString.length + 2; + } else { + ultimate = it.get$current(it); + ++count; + for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { + ultimate0 = it.get$current(it); + ++count; + if (count > 100) { + while (true) { + if (!($length > 75 && count > 3)) + break; + $length -= parts.pop().length + 2; + --count; + } + parts.push("..."); + return; + } + } + penultimateString = A.S(penultimate); + ultimateString = A.S(ultimate); + $length += ultimateString.length + penultimateString.length + 4; + } + } + if (count > parts.length + 2) { + $length += 5; + elision = "..."; + } else + elision = null; + while (true) { + if (!($length > 80 && parts.length > 3)) + break; + $length -= parts.pop().length + 2; + if (elision == null) { + $length += 5; + elision = "..."; + } + } + if (elision != null) + parts.push(elision); + parts.push(penultimateString); + parts.push(ultimateString); + }, + Map_castFrom(source, $K, $V, K2, V2) { + return new A.CastMap(source, $K._eval$1("@<0>")._bind$1($V)._bind$1(K2)._bind$1(V2)._eval$1("CastMap<1,2,3,4>")); + }, + Object_hash(object1, object2, object3, object4) { + var t1; + if (B.C_SentinelValue === object3) { + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2)); + } + if (B.C_SentinelValue === object4) { + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + object3 = J.get$hashCode$(object3); + return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2), object3)); + } + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + object3 = J.get$hashCode$(object3); + object4 = J.get$hashCode$(object4); + object4 = A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2), object3), object4)); + return object4; + }, + Object_hashAll(objects) { + var t1, _i, + hash = $.$get$_hashSeed(); + for (t1 = objects.length, _i = 0; _i < objects.length; objects.length === t1 || (0, A.throwConcurrentModificationError)(objects), ++_i) + hash = A.SystemHash_combine(hash, J.get$hashCode$(objects[_i])); + return A.SystemHash_finish(hash); + }, + print(object) { + var line = A.S(object), + toZone = $.printToZone; + if (toZone == null) + A.printString(line); + else + toZone.call$1(line); + }, + Set_Set$unmodifiable(elements, $E) { + return new A.UnmodifiableSetView(A.LinkedHashSet_LinkedHashSet$of(elements, $E), $E._eval$1("UnmodifiableSetView<0>")); + }, + Set_castFrom(source, newSet, $S, $T) { + return new A.CastSet(source, newSet, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastSet<1,2>")); + }, + _combineSurrogatePair(start, end) { + return 65536 + ((start & 1023) << 10) + (end & 1023); + }, + Uri_Uri$dataFromString($content, encoding, mimeType) { + var encodingName, t1, + buffer = new A.StringBuffer(""), + indices = A._setArrayType([-1], type$.JSArray_int); + if (encoding == null) + encodingName = null; + else + encodingName = "utf-8"; + if (encoding == null) + encoding = B.C_AsciiCodec; + A.UriData__writeUri(mimeType, encodingName, null, buffer, indices); + indices.push(buffer._contents.length); + buffer._contents += ","; + A.UriData__uriEncodeBytes(B.List_42A, encoding.encode$1($content), buffer); + t1 = buffer._contents; + return new A.UriData(t1.charCodeAt(0) == 0 ? t1 : t1, indices, null).get$uri(); + }, + Uri_parse(uri) { + var delta, indices, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, isSimple, scheme, t1, t2, schemeAuth, queryStart0, pathStart0, port, userInfoStart, userInfo, host, portNumber, path, query, _null = null, + end = uri.length; + if (end >= 5) { + delta = ((uri.charCodeAt(4) ^ 58) * 3 | uri.charCodeAt(0) ^ 100 | uri.charCodeAt(1) ^ 97 | uri.charCodeAt(2) ^ 116 | uri.charCodeAt(3) ^ 97) >>> 0; + if (delta === 0) + return A.UriData__parse(end < end ? B.JSString_methods.substring$2(uri, 0, end) : uri, 5, _null).get$uri(); + else if (delta === 32) + return A.UriData__parse(B.JSString_methods.substring$2(uri, 5, end), 0, _null).get$uri(); + } + indices = A.List_List$filled(8, 0, false, type$.int); + indices[0] = 0; + indices[1] = -1; + indices[2] = -1; + indices[7] = -1; + indices[3] = 0; + indices[4] = 0; + indices[5] = end; + indices[6] = end; + if (A._scan(uri, 0, end, 0, indices) >= 14) + indices[7] = end; + schemeEnd = indices[1]; + if (schemeEnd >= 0) + if (A._scan(uri, 0, schemeEnd, 20, indices) === 20) + indices[7] = schemeEnd; + hostStart = indices[2] + 1; + portStart = indices[3]; + pathStart = indices[4]; + queryStart = indices[5]; + fragmentStart = indices[6]; + if (fragmentStart < queryStart) + queryStart = fragmentStart; + if (pathStart < hostStart) + pathStart = queryStart; + else if (pathStart <= schemeEnd) + pathStart = schemeEnd + 1; + if (portStart < hostStart) + portStart = pathStart; + isSimple = indices[7] < 0; + scheme = _null; + if (isSimple) { + isSimple = false; + if (!(hostStart > schemeEnd + 3)) { + t1 = portStart > 0; + if (!(t1 && portStart + 1 === pathStart)) { + if (!B.JSString_methods.startsWith$2(uri, "\\", pathStart)) + if (hostStart > 0) + t2 = B.JSString_methods.startsWith$2(uri, "\\", hostStart - 1) || B.JSString_methods.startsWith$2(uri, "\\", hostStart - 2); + else + t2 = false; + else + t2 = true; + if (!t2) { + if (!(queryStart < end && queryStart === pathStart + 2 && B.JSString_methods.startsWith$2(uri, "..", pathStart))) + t2 = queryStart > pathStart + 2 && B.JSString_methods.startsWith$2(uri, "/..", queryStart - 3); + else + t2 = true; + if (!t2) + if (schemeEnd === 4) { + if (B.JSString_methods.startsWith$2(uri, "file", 0)) { + if (hostStart <= 0) { + if (!B.JSString_methods.startsWith$2(uri, "/", pathStart)) { + schemeAuth = "file:///"; + delta = 3; + } else { + schemeAuth = "file://"; + delta = 2; + } + uri = schemeAuth + B.JSString_methods.substring$2(uri, pathStart, end); + queryStart += delta; + fragmentStart += delta; + end = uri.length; + hostStart = 7; + portStart = 7; + pathStart = 7; + } else if (pathStart === queryStart) { + ++fragmentStart; + queryStart0 = queryStart + 1; + uri = B.JSString_methods.replaceRange$3(uri, pathStart, queryStart, "/"); + ++end; + queryStart = queryStart0; + } + scheme = "file"; + } else if (B.JSString_methods.startsWith$2(uri, "http", 0)) { + if (t1 && portStart + 3 === pathStart && B.JSString_methods.startsWith$2(uri, "80", portStart + 1)) { + fragmentStart -= 3; + pathStart0 = pathStart - 3; + queryStart -= 3; + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); + end -= 3; + pathStart = pathStart0; + } + scheme = "http"; + } + } else if (schemeEnd === 5 && B.JSString_methods.startsWith$2(uri, "https", 0)) { + if (t1 && portStart + 4 === pathStart && B.JSString_methods.startsWith$2(uri, "443", portStart + 1)) { + fragmentStart -= 4; + pathStart0 = pathStart - 4; + queryStart -= 4; + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); + end -= 3; + pathStart = pathStart0; + } + scheme = "https"; + } + isSimple = !t2; + } + } + } + } + if (isSimple) + return new A._SimpleUri(end < uri.length ? B.JSString_methods.substring$2(uri, 0, end) : uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme); + if (scheme == null) + if (schemeEnd > 0) + scheme = A._Uri__makeScheme(uri, 0, schemeEnd); + else { + if (schemeEnd === 0) + A._Uri__fail(uri, 0, "Invalid empty scheme"); + scheme = ""; + } + port = _null; + if (hostStart > 0) { + userInfoStart = schemeEnd + 3; + userInfo = userInfoStart < hostStart ? A._Uri__makeUserInfo(uri, userInfoStart, hostStart - 1) : ""; + host = A._Uri__makeHost(uri, hostStart, portStart, false); + t1 = portStart + 1; + if (t1 < pathStart) { + portNumber = A.Primitives_parseInt(B.JSString_methods.substring$2(uri, t1, pathStart), _null); + port = A._Uri__makePort(portNumber == null ? A.throwExpression(A.FormatException$("Invalid port", uri, t1)) : portNumber, scheme); + } + } else { + host = _null; + userInfo = ""; + } + path = A._Uri__makePath(uri, pathStart, queryStart, _null, scheme, host != null); + query = queryStart < fragmentStart ? A._Uri__makeQuery(uri, queryStart + 1, fragmentStart, _null) : _null; + return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragmentStart < end ? A._Uri__makeFragment(uri, fragmentStart + 1, end) : _null); + }, + Uri_decodeComponent(encodedComponent) { + return A._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, B.C_Utf8Codec, false); + }, + Uri__parseIPv4Address(host, start, end) { + var i, partStart, partIndex, char, part, partIndex0, + _s43_ = "IPv4 address should contain exactly 4 parts", + _s37_ = "each part must be in the range 0..255", + error = new A.Uri__parseIPv4Address_error(host), + result = new Uint8Array(4); + for (i = start, partStart = i, partIndex = 0; i < end; ++i) { + char = host.charCodeAt(i); + if (char !== 46) { + if ((char ^ 48) > 9) + error.call$2("invalid character", i); + } else { + if (partIndex === 3) + error.call$2(_s43_, i); + part = A.int_parse(B.JSString_methods.substring$2(host, partStart, i), null); + if (part > 255) + error.call$2(_s37_, partStart); + partIndex0 = partIndex + 1; + result[partIndex] = part; + partStart = i + 1; + partIndex = partIndex0; + } + } + if (partIndex !== 3) + error.call$2(_s43_, end); + part = A.int_parse(B.JSString_methods.substring$2(host, partStart, end), null); + if (part > 255) + error.call$2(_s37_, partStart); + result[partIndex] = part; + return result; + }, + Uri_parseIPv6Address(host, start, end) { + var parts, i, partStart, wildcardSeen, seenDot, char, atEnd, t1, last, bytes, wildCardLength, index, value, j, _null = null, + error = new A.Uri_parseIPv6Address_error(host), + parseHex = new A.Uri_parseIPv6Address_parseHex(error, host); + if (host.length < 2) + error.call$2("address is too short", _null); + parts = A._setArrayType([], type$.JSArray_int); + for (i = start, partStart = i, wildcardSeen = false, seenDot = false; i < end; ++i) { + char = host.charCodeAt(i); + if (char === 58) { + if (i === start) { + ++i; + if (host.charCodeAt(i) !== 58) + error.call$2("invalid start colon.", i); + partStart = i; + } + if (i === partStart) { + if (wildcardSeen) + error.call$2("only one wildcard `::` is allowed", i); + parts.push(-1); + wildcardSeen = true; + } else + parts.push(parseHex.call$2(partStart, i)); + partStart = i + 1; + } else if (char === 46) + seenDot = true; + } + if (parts.length === 0) + error.call$2("too few parts", _null); + atEnd = partStart === end; + t1 = B.JSArray_methods.get$last(parts); + if (atEnd && t1 !== -1) + error.call$2("expected a part after last `:`", end); + if (!atEnd) + if (!seenDot) + parts.push(parseHex.call$2(partStart, end)); + else { + last = A.Uri__parseIPv4Address(host, partStart, end); + parts.push((last[0] << 8 | last[1]) >>> 0); + parts.push((last[2] << 8 | last[3]) >>> 0); + } + if (wildcardSeen) { + if (parts.length > 7) + error.call$2("an address with a wildcard must have less than 7 parts", _null); + } else if (parts.length !== 8) + error.call$2("an address without a wildcard must contain exactly 8 parts", _null); + bytes = new Uint8Array(16); + for (t1 = parts.length, wildCardLength = 9 - t1, i = 0, index = 0; i < t1; ++i) { + value = parts[i]; + if (value === -1) + for (j = 0; j < wildCardLength; ++j) { + bytes[index] = 0; + bytes[index + 1] = 0; + index += 2; + } + else { + bytes[index] = B.JSInt_methods._shrOtherPositive$1(value, 8); + bytes[index + 1] = value & 255; + index += 2; + } + } + return bytes; + }, + _Uri$_internal(scheme, _userInfo, _host, _port, path, _query, _fragment) { + return new A._Uri(scheme, _userInfo, _host, _port, path, _query, _fragment); + }, + _Uri__Uri(host, path, pathSegments, scheme) { + var userInfo, query, fragment, port, isFile, t1, hasAuthority, t2, _null = null; + scheme = scheme == null ? "" : A._Uri__makeScheme(scheme, 0, scheme.length); + userInfo = A._Uri__makeUserInfo(_null, 0, 0); + host = A._Uri__makeHost(host, 0, host == null ? 0 : host.length, false); + query = A._Uri__makeQuery(_null, 0, 0, _null); + fragment = A._Uri__makeFragment(_null, 0, 0); + port = A._Uri__makePort(_null, scheme); + isFile = scheme === "file"; + if (host == null) + t1 = userInfo.length !== 0 || port != null || isFile; + else + t1 = false; + if (t1) + host = ""; + t1 = host == null; + hasAuthority = !t1; + path = A._Uri__makePath(path, 0, path == null ? 0 : path.length, pathSegments, scheme, hasAuthority); + t2 = scheme.length === 0; + if (t2 && t1 && !B.JSString_methods.startsWith$1(path, "/")) + path = A._Uri__normalizeRelativePath(path, !t2 || hasAuthority); + else + path = A._Uri__removeDotSegments(path); + return A._Uri$_internal(scheme, userInfo, t1 && B.JSString_methods.startsWith$1(path, "//") ? "" : host, port, path, query, fragment); + }, + _Uri__defaultPort(scheme) { + if (scheme === "http") + return 80; + if (scheme === "https") + return 443; + return 0; + }, + _Uri__fail(uri, index, message) { + throw A.wrapException(A.FormatException$(message, uri, index)); + }, + _Uri__Uri$file(path, windows) { + return windows ? A._Uri__makeWindowsFileUrl(path, false) : A._Uri__makeFileUri(path, false); + }, + _Uri__checkNonWindowsPathReservedCharacters(segments, argumentError) { + var t1, _i, segment, t2, t3; + for (t1 = segments.length, _i = 0; _i < t1; ++_i) { + segment = segments[_i]; + t2 = J.getInterceptor$asx(segment); + t3 = t2.get$length(segment); + if (0 > t3) + A.throwExpression(A.RangeError$range(0, 0, t2.get$length(segment), null, null)); + if (A.stringContainsUnchecked(segment, "/", 0)) { + t1 = A.UnsupportedError$("Illegal path character " + A.S(segment)); + throw A.wrapException(t1); + } + } + }, + _Uri__checkWindowsPathReservedCharacters(segments, argumentError, firstSegment) { + var t1, t2, t3, t4; + for (t1 = A.SubListIterable$(segments, firstSegment, null, A._arrayInstanceType(segments)._precomputed1), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + t4 = A.RegExp_RegExp('["*/:<>?\\\\|]', false); + if (A.stringContainsUnchecked(t3, t4, 0)) + if (argumentError) + throw A.wrapException(A.ArgumentError$("Illegal character in path", null)); + else + throw A.wrapException(A.UnsupportedError$("Illegal character in path: " + t3)); + } + }, + _Uri__checkWindowsDriveLetter(charCode, argumentError) { + var t1, + _s21_ = "Illegal drive letter "; + if (!(65 <= charCode && charCode <= 90)) + t1 = 97 <= charCode && charCode <= 122; + else + t1 = true; + if (t1) + return; + if (argumentError) + throw A.wrapException(A.ArgumentError$(_s21_ + A.String_String$fromCharCode(charCode), null)); + else + throw A.wrapException(A.UnsupportedError$(_s21_ + A.String_String$fromCharCode(charCode))); + }, + _Uri__makeFileUri(path, slashTerminated) { + var _null = null, + segments = A._setArrayType(path.split("/"), type$.JSArray_String); + if (B.JSString_methods.startsWith$1(path, "/")) + return A._Uri__Uri(_null, _null, segments, "file"); + else + return A._Uri__Uri(_null, _null, segments, _null); + }, + _Uri__makeWindowsFileUrl(path, slashTerminated) { + var t1, pathSegments, pathStart, hostPart, _s1_ = "\\", _null = null, _s4_ = "file"; + if (B.JSString_methods.startsWith$1(path, "\\\\?\\")) + if (B.JSString_methods.startsWith$2(path, "UNC\\", 4)) + path = B.JSString_methods.replaceRange$3(path, 0, 7, _s1_); + else { + path = B.JSString_methods.substring$1(path, 4); + if (path.length < 3 || path.charCodeAt(1) !== 58 || path.charCodeAt(2) !== 92) + throw A.wrapException(A.ArgumentError$value(path, "path", "Windows paths with \\\\?\\ prefix must be absolute")); + } + else + path = A.stringReplaceAllUnchecked(path, "/", _s1_); + t1 = path.length; + if (t1 > 1 && path.charCodeAt(1) === 58) { + A._Uri__checkWindowsDriveLetter(path.charCodeAt(0), true); + if (t1 === 2 || path.charCodeAt(2) !== 92) + throw A.wrapException(A.ArgumentError$value(path, "path", "Windows paths with drive letter must be absolute")); + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 1); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); + } + if (B.JSString_methods.startsWith$1(path, _s1_)) + if (B.JSString_methods.startsWith$2(path, _s1_, 1)) { + pathStart = B.JSString_methods.indexOf$2(path, _s1_, 2); + t1 = pathStart < 0; + hostPart = t1 ? B.JSString_methods.substring$1(path, 2) : B.JSString_methods.substring$2(path, 2, pathStart); + pathSegments = A._setArrayType((t1 ? "" : B.JSString_methods.substring$1(path, pathStart + 1)).split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(hostPart, _null, pathSegments, _s4_); + } else { + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); + } + else { + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _null); + } + }, + _Uri__makePort(port, scheme) { + if (port != null && port === A._Uri__defaultPort(scheme)) + return null; + return port; + }, + _Uri__makeHost(host, start, end, strictIPv6) { + var t1, t2, index, zoneIDstart, zoneID, i; + if (host == null) + return null; + if (start === end) + return ""; + if (host.charCodeAt(start) === 91) { + t1 = end - 1; + if (host.charCodeAt(t1) !== 93) + A._Uri__fail(host, start, "Missing end `]` to match `[` in host"); + t2 = start + 1; + index = A._Uri__checkZoneID(host, t2, t1); + if (index < t1) { + zoneIDstart = index + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, t1, "%25"); + } else + zoneID = ""; + A.Uri_parseIPv6Address(host, t2, index); + return B.JSString_methods.substring$2(host, start, index).toLowerCase() + zoneID + "]"; + } + for (i = start; i < end; ++i) + if (host.charCodeAt(i) === 58) { + index = B.JSString_methods.indexOf$2(host, "%", start); + index = index >= start && index < end ? index : end; + if (index < end) { + zoneIDstart = index + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, end, "%25"); + } else + zoneID = ""; + A.Uri_parseIPv6Address(host, start, index); + return "[" + B.JSString_methods.substring$2(host, start, index) + zoneID + "]"; + } + return A._Uri__normalizeRegName(host, start, end); + }, + _Uri__checkZoneID(host, start, end) { + var index = B.JSString_methods.indexOf$2(host, "%", start); + return index >= start && index < end ? index : end; + }, + _Uri__normalizeZoneID(host, start, end, prefix) { + var index, sectionStart, isNormalized, char, replacement, t1, t2, sourceLength, tail, slice, + buffer = prefix !== "" ? new A.StringBuffer(prefix) : null; + for (index = start, sectionStart = index, isNormalized = true; index < end;) { + char = host.charCodeAt(index); + if (char === 37) { + replacement = A._Uri__normalizeEscape(host, index, true); + t1 = replacement == null; + if (t1 && isNormalized) { + index += 3; + continue; + } + if (buffer == null) + buffer = new A.StringBuffer(""); + t2 = buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + if (t1) + replacement = B.JSString_methods.substring$2(host, index, index + 3); + else if (replacement === "%") + A._Uri__fail(host, index, "ZoneID should not contain % anymore"); + buffer._contents = t2 + replacement; + index += 3; + sectionStart = index; + isNormalized = true; + } else if (char < 127 && (B.List_piR[char >>> 4] & 1 << (char & 15)) !== 0) { + if (isNormalized && 65 <= char && 90 >= char) { + if (buffer == null) + buffer = new A.StringBuffer(""); + if (sectionStart < index) { + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + sectionStart = index; + } + isNormalized = false; + } + ++index; + } else { + sourceLength = 1; + if ((char & 64512) === 55296 && index + 1 < end) { + tail = host.charCodeAt(index + 1); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; + } + } + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t2 = A._Uri__escapeChar(char); + t1._contents += t2; + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return B.JSString_methods.substring$2(host, start, end); + if (sectionStart < end) { + slice = B.JSString_methods.substring$2(host, sectionStart, end); + buffer._contents += slice; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__normalizeRegName(host, start, end) { + var index, sectionStart, buffer, isNormalized, char, replacement, t1, slice, t2, sourceLength, tail; + for (index = start, sectionStart = index, buffer = null, isNormalized = true; index < end;) { + char = host.charCodeAt(index); + if (char === 37) { + replacement = A._Uri__normalizeEscape(host, index, true); + t1 = replacement == null; + if (t1 && isNormalized) { + index += 3; + continue; + } + if (buffer == null) + buffer = new A.StringBuffer(""); + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (!isNormalized) + slice = slice.toLowerCase(); + t2 = buffer._contents += slice; + sourceLength = 3; + if (t1) + replacement = B.JSString_methods.substring$2(host, index, index + 3); + else if (replacement === "%") { + replacement = "%25"; + sourceLength = 1; + } + buffer._contents = t2 + replacement; + index += sourceLength; + sectionStart = index; + isNormalized = true; + } else if (char < 127 && (B.List_4AN[char >>> 4] & 1 << (char & 15)) !== 0) { + if (isNormalized && 65 <= char && 90 >= char) { + if (buffer == null) + buffer = new A.StringBuffer(""); + if (sectionStart < index) { + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + sectionStart = index; + } + isNormalized = false; + } + ++index; + } else if (char <= 93 && (B.List_VOY[char >>> 4] & 1 << (char & 15)) !== 0) + A._Uri__fail(host, index, "Invalid character"); + else { + sourceLength = 1; + if ((char & 64512) === 55296 && index + 1 < end) { + tail = host.charCodeAt(index + 1); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; + } + } + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (!isNormalized) + slice = slice.toLowerCase(); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t2 = A._Uri__escapeChar(char); + t1._contents += t2; + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return B.JSString_methods.substring$2(host, start, end); + if (sectionStart < end) { + slice = B.JSString_methods.substring$2(host, sectionStart, end); + if (!isNormalized) + slice = slice.toLowerCase(); + buffer._contents += slice; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__makeScheme(scheme, start, end) { + var i, containsUpperCase, codeUnit; + if (start === end) + return ""; + if (!A._Uri__isAlphabeticCharacter(scheme.charCodeAt(start))) + A._Uri__fail(scheme, start, "Scheme not starting with alphabetic character"); + for (i = start, containsUpperCase = false; i < end; ++i) { + codeUnit = scheme.charCodeAt(i); + if (!(codeUnit < 128 && (B.List_GVy[codeUnit >>> 4] & 1 << (codeUnit & 15)) !== 0)) + A._Uri__fail(scheme, i, "Illegal scheme character"); + if (65 <= codeUnit && codeUnit <= 90) + containsUpperCase = true; + } + scheme = B.JSString_methods.substring$2(scheme, start, end); + return A._Uri__canonicalizeScheme(containsUpperCase ? scheme.toLowerCase() : scheme); + }, + _Uri__canonicalizeScheme(scheme) { + if (scheme === "http") + return "http"; + if (scheme === "file") + return "file"; + if (scheme === "https") + return "https"; + if (scheme === "package") + return "package"; + return scheme; + }, + _Uri__makeUserInfo(userInfo, start, end) { + if (userInfo == null) + return ""; + return A._Uri__normalizeOrSubstring(userInfo, start, end, B.List_2jN, false, false); + }, + _Uri__makePath(path, start, end, pathSegments, scheme, hasAuthority) { + var result, + isFile = scheme === "file", + ensureLeadingSlash = isFile || hasAuthority; + if (path == null) { + if (pathSegments == null) + return isFile ? "/" : ""; + result = new A.MappedListIterable(pathSegments, new A._Uri__makePath_closure(), A._arrayInstanceType(pathSegments)._eval$1("MappedListIterable<1,String>")).join$1(0, "/"); + } else if (pathSegments != null) + throw A.wrapException(A.ArgumentError$("Both path and pathSegments specified", null)); + else + result = A._Uri__normalizeOrSubstring(path, start, end, B.List_M2I, true, true); + if (result.length === 0) { + if (isFile) + return "/"; + } else if (ensureLeadingSlash && !B.JSString_methods.startsWith$1(result, "/")) + result = "/" + result; + return A._Uri__normalizePath(result, scheme, hasAuthority); + }, + _Uri__normalizePath(path, scheme, hasAuthority) { + var t1 = scheme.length === 0; + if (t1 && !hasAuthority && !B.JSString_methods.startsWith$1(path, "/") && !B.JSString_methods.startsWith$1(path, "\\")) + return A._Uri__normalizeRelativePath(path, !t1 || hasAuthority); + return A._Uri__removeDotSegments(path); + }, + _Uri__makeQuery(query, start, end, queryParameters) { + if (query != null) + return A._Uri__normalizeOrSubstring(query, start, end, B.List_42A, true, false); + return null; + }, + _Uri__makeFragment(fragment, start, end) { + if (fragment == null) + return null; + return A._Uri__normalizeOrSubstring(fragment, start, end, B.List_42A, true, false); + }, + _Uri__normalizeEscape(source, index, lowerCase) { + var firstDigit, secondDigit, firstDigitValue, secondDigitValue, value, + t1 = index + 2; + if (t1 >= source.length) + return "%"; + firstDigit = source.charCodeAt(index + 1); + secondDigit = source.charCodeAt(t1); + firstDigitValue = A.hexDigitValue(firstDigit); + secondDigitValue = A.hexDigitValue(secondDigit); + if (firstDigitValue < 0 || secondDigitValue < 0) + return "%"; + value = firstDigitValue * 16 + secondDigitValue; + if (value < 127 && (B.List_piR[B.JSInt_methods._shrOtherPositive$1(value, 4)] & 1 << (value & 15)) !== 0) + return A.Primitives_stringFromCharCode(lowerCase && 65 <= value && 90 >= value ? (value | 32) >>> 0 : value); + if (firstDigit >= 97 || secondDigit >= 97) + return B.JSString_methods.substring$2(source, index, index + 3).toUpperCase(); + return null; + }, + _Uri__escapeChar(char) { + var codeUnits, flag, encodedBytes, index, byte, + _s16_ = "0123456789ABCDEF"; + if (char < 128) { + codeUnits = new Uint8Array(3); + codeUnits[0] = 37; + codeUnits[1] = _s16_.charCodeAt(char >>> 4); + codeUnits[2] = _s16_.charCodeAt(char & 15); + } else { + if (char > 2047) + if (char > 65535) { + flag = 240; + encodedBytes = 4; + } else { + flag = 224; + encodedBytes = 3; + } + else { + flag = 192; + encodedBytes = 2; + } + codeUnits = new Uint8Array(3 * encodedBytes); + for (index = 0; --encodedBytes, encodedBytes >= 0; flag = 128) { + byte = B.JSInt_methods._shrReceiverPositive$1(char, 6 * encodedBytes) & 63 | flag; + codeUnits[index] = 37; + codeUnits[index + 1] = _s16_.charCodeAt(byte >>> 4); + codeUnits[index + 2] = _s16_.charCodeAt(byte & 15); + index += 3; + } + } + return A.String_String$fromCharCodes(codeUnits, 0, null); + }, + _Uri__normalizeOrSubstring(component, start, end, charTable, escapeDelimiters, replaceBackslash) { + var t1 = A._Uri__normalize(component, start, end, charTable, escapeDelimiters, replaceBackslash); + return t1 == null ? B.JSString_methods.substring$2(component, start, end) : t1; + }, + _Uri__normalize(component, start, end, charTable, escapeDelimiters, replaceBackslash) { + var t1, index, sectionStart, buffer, char, sourceLength, replacement, t2, tail, t3, _null = null; + for (t1 = !escapeDelimiters, index = start, sectionStart = index, buffer = _null; index < end;) { + char = component.charCodeAt(index); + if (char < 127 && (charTable[char >>> 4] & 1 << (char & 15)) !== 0) + ++index; + else { + sourceLength = 1; + if (char === 37) { + replacement = A._Uri__normalizeEscape(component, index, false); + if (replacement == null) { + index += 3; + continue; + } + if ("%" === replacement) + replacement = "%25"; + else + sourceLength = 3; + } else if (char === 92 && replaceBackslash) + replacement = "/"; + else if (t1 && char <= 93 && (B.List_VOY[char >>> 4] & 1 << (char & 15)) !== 0) { + A._Uri__fail(component, index, "Invalid character"); + sourceLength = _null; + replacement = sourceLength; + } else { + if ((char & 64512) === 55296) { + t2 = index + 1; + if (t2 < end) { + tail = component.charCodeAt(t2); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; + } + } + } + replacement = A._Uri__escapeChar(char); + } + if (buffer == null) { + buffer = new A.StringBuffer(""); + t2 = buffer; + } else + t2 = buffer; + t3 = t2._contents += B.JSString_methods.substring$2(component, sectionStart, index); + t2._contents = t3 + A.S(replacement); + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return _null; + if (sectionStart < end) { + t1 = B.JSString_methods.substring$2(component, sectionStart, end); + buffer._contents += t1; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__mayContainDotSegments(path) { + if (B.JSString_methods.startsWith$1(path, ".")) + return true; + return B.JSString_methods.indexOf$1(path, "/.") !== -1; + }, + _Uri__removeDotSegments(path) { + var output, t1, t2, appendSlash, _i, segment; + if (!A._Uri__mayContainDotSegments(path)) + return path; + output = A._setArrayType([], type$.JSArray_String); + for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { + segment = t1[_i]; + if (J.$eq$(segment, "..")) { + if (output.length !== 0) { + output.pop(); + if (output.length === 0) + output.push(""); + } + appendSlash = true; + } else { + appendSlash = "." === segment; + if (!appendSlash) + output.push(segment); + } + } + if (appendSlash) + output.push(""); + return B.JSArray_methods.join$1(output, "/"); + }, + _Uri__normalizeRelativePath(path, allowScheme) { + var output, t1, t2, appendSlash, _i, segment; + if (!A._Uri__mayContainDotSegments(path)) + return !allowScheme ? A._Uri__escapeScheme(path) : path; + output = A._setArrayType([], type$.JSArray_String); + for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { + segment = t1[_i]; + if (".." === segment) { + appendSlash = output.length !== 0 && B.JSArray_methods.get$last(output) !== ".."; + if (appendSlash) + output.pop(); + else + output.push(".."); + } else { + appendSlash = "." === segment; + if (!appendSlash) + output.push(segment); + } + } + t1 = output.length; + if (t1 !== 0) + t1 = t1 === 1 && output[0].length === 0; + else + t1 = true; + if (t1) + return "./"; + if (appendSlash || B.JSArray_methods.get$last(output) === "..") + output.push(""); + if (!allowScheme) + output[0] = A._Uri__escapeScheme(output[0]); + return B.JSArray_methods.join$1(output, "/"); + }, + _Uri__escapeScheme(path) { + var i, char, + t1 = path.length; + if (t1 >= 2 && A._Uri__isAlphabeticCharacter(path.charCodeAt(0))) + for (i = 1; i < t1; ++i) { + char = path.charCodeAt(i); + if (char === 58) + return B.JSString_methods.substring$2(path, 0, i) + "%3A" + B.JSString_methods.substring$1(path, i + 1); + if (char > 127 || (B.List_GVy[char >>> 4] & 1 << (char & 15)) === 0) + break; + } + return path; + }, + _Uri__packageNameEnd(uri, path) { + if (uri.isScheme$1("package") && uri._host == null) + return A._skipPackageNameChars(path, 0, path.length); + return -1; + }, + _Uri__toWindowsFilePath(uri) { + var t2, host, + segments = uri.get$pathSegments(), + t1 = segments.length, + hasDriveLetter = t1 > 0 && J.get$length$asx(segments[0]) === 2 && J.codeUnitAt$1$s(segments[0], 1) === 58; + if (hasDriveLetter) { + A._Uri__checkWindowsDriveLetter(J.codeUnitAt$1$s(segments[0], 0), false); + A._Uri__checkWindowsPathReservedCharacters(segments, false, 1); + } else + A._Uri__checkWindowsPathReservedCharacters(segments, false, 0); + t2 = uri.get$hasAbsolutePath() && !hasDriveLetter ? "" + "\\" : ""; + if (uri.get$hasAuthority()) { + host = uri.get$host(); + if (host.length !== 0) + t2 = t2 + "\\" + host + "\\"; + } + t2 = A.StringBuffer__writeAll(t2, segments, "\\"); + t1 = hasDriveLetter && t1 === 1 ? t2 + "\\" : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__hexCharPairToByte(s, pos) { + var byte, i, charCode; + for (byte = 0, i = 0; i < 2; ++i) { + charCode = s.charCodeAt(pos + i); + if (48 <= charCode && charCode <= 57) + byte = byte * 16 + charCode - 48; + else { + charCode |= 32; + if (97 <= charCode && charCode <= 102) + byte = byte * 16 + charCode - 87; + else + throw A.wrapException(A.ArgumentError$("Invalid URL encoding", null)); + } + } + return byte; + }, + _Uri__uriDecode(text, start, end, encoding, plusToSpace) { + var simple, codeUnit, t1, bytes, + i = start; + while (true) { + if (!(i < end)) { + simple = true; + break; + } + codeUnit = text.charCodeAt(i); + if (codeUnit <= 127) + t1 = codeUnit === 37; + else + t1 = true; + if (t1) { + simple = false; + break; + } + ++i; + } + if (simple) + if (B.C_Utf8Codec === encoding) + return B.JSString_methods.substring$2(text, start, end); + else + bytes = new A.CodeUnits(B.JSString_methods.substring$2(text, start, end)); + else { + bytes = A._setArrayType([], type$.JSArray_int); + for (t1 = text.length, i = start; i < end; ++i) { + codeUnit = text.charCodeAt(i); + if (codeUnit > 127) + throw A.wrapException(A.ArgumentError$("Illegal percent encoding in URI", null)); + if (codeUnit === 37) { + if (i + 3 > t1) + throw A.wrapException(A.ArgumentError$("Truncated URI", null)); + bytes.push(A._Uri__hexCharPairToByte(text, i + 1)); + i += 2; + } else + bytes.push(codeUnit); + } + } + return B.Utf8Decoder_false.convert$1(bytes); + }, + _Uri__isAlphabeticCharacter(codeUnit) { + var lowerCase = codeUnit | 32; + return 97 <= lowerCase && lowerCase <= 122; + }, + UriData__writeUri(mimeType, charsetName, parameters, buffer, indices) { + var t1, slashIndex; + if (mimeType != null) + t1 = 10 === mimeType.length && A._caseInsensitiveCompareStart("text/plain", mimeType, 0) >= 0; + else + t1 = true; + if (t1) + mimeType = ""; + if (mimeType.length === 0 || mimeType === "application/octet-stream") + t1 = buffer._contents += mimeType; + else { + slashIndex = A.UriData__validateMimeType(mimeType); + if (slashIndex < 0) + throw A.wrapException(A.ArgumentError$value(mimeType, "mimeType", "Invalid MIME type")); + t1 = A._Uri__uriEncode(B.List_oyU, B.JSString_methods.substring$2(mimeType, 0, slashIndex), B.C_Utf8Codec, false); + t1 = buffer._contents += t1; + buffer._contents = t1 + "/"; + t1 = A._Uri__uriEncode(B.List_oyU, B.JSString_methods.substring$1(mimeType, slashIndex + 1), B.C_Utf8Codec, false); + t1 = buffer._contents += t1; + } + if (charsetName != null) { + indices.push(t1.length); + indices.push(buffer._contents.length + 8); + buffer._contents += ";charset="; + t1 = A._Uri__uriEncode(B.List_oyU, charsetName, B.C_Utf8Codec, false); + buffer._contents += t1; + } + }, + UriData__validateMimeType(mimeType) { + var t1, slashIndex, i; + for (t1 = mimeType.length, slashIndex = -1, i = 0; i < t1; ++i) { + if (mimeType.charCodeAt(i) !== 47) + continue; + if (slashIndex < 0) { + slashIndex = i; + continue; + } + return -1; + } + return slashIndex; + }, + UriData__parse(text, start, sourceUri) { + var t1, i, slashIndex, char, equalsIndex, lastSeparator, t2, data, + _s17_ = "Invalid MIME type", + indices = A._setArrayType([start - 1], type$.JSArray_int); + for (t1 = text.length, i = start, slashIndex = -1, char = null; i < t1; ++i) { + char = text.charCodeAt(i); + if (char === 44 || char === 59) + break; + if (char === 47) { + if (slashIndex < 0) { + slashIndex = i; + continue; + } + throw A.wrapException(A.FormatException$(_s17_, text, i)); + } + } + if (slashIndex < 0 && i > start) + throw A.wrapException(A.FormatException$(_s17_, text, i)); + for (; char !== 44;) { + indices.push(i); + ++i; + for (equalsIndex = -1; i < t1; ++i) { + char = text.charCodeAt(i); + if (char === 61) { + if (equalsIndex < 0) + equalsIndex = i; + } else if (char === 59 || char === 44) + break; + } + if (equalsIndex >= 0) + indices.push(equalsIndex); + else { + lastSeparator = B.JSArray_methods.get$last(indices); + if (char !== 44 || i !== lastSeparator + 7 || !B.JSString_methods.startsWith$2(text, "base64", lastSeparator + 1)) + throw A.wrapException(A.FormatException$("Expecting '='", text, i)); + break; + } + } + indices.push(i); + t2 = i + 1; + if ((indices.length & 1) === 1) + text = B.C_Base64Codec.normalize$3(text, t2, t1); + else { + data = A._Uri__normalize(text, t2, t1, B.List_42A, true, false); + if (data != null) + text = B.JSString_methods.replaceRange$3(text, t2, t1, data); + } + return new A.UriData(text, indices, sourceUri); + }, + UriData__uriEncodeBytes(canonicalTable, bytes, buffer) { + var t1, byteOr, i, byte, t2, + _s16_ = "0123456789ABCDEF"; + for (t1 = bytes.length, byteOr = 0, i = 0; i < t1; ++i) { + byte = bytes[i]; + byteOr |= byte; + if (byte < 128 && (canonicalTable[byte >>> 4] & 1 << (byte & 15)) !== 0) { + t2 = A.Primitives_stringFromCharCode(byte); + buffer._contents += t2; + } else { + t2 = A.Primitives_stringFromCharCode(37); + buffer._contents += t2; + t2 = A.Primitives_stringFromCharCode(_s16_.charCodeAt(byte >>> 4)); + buffer._contents += t2; + t2 = A.Primitives_stringFromCharCode(_s16_.charCodeAt(byte & 15)); + buffer._contents += t2; + } + } + if ((byteOr & 4294967040) !== 0) + for (i = 0; i < t1; ++i) { + byte = bytes[i]; + if (byte > 255) + throw A.wrapException(A.ArgumentError$value(byte, "non-byte value", null)); + } + }, + _createTables() { + var _i, t1, t2, t3, b, + _s77_ = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", + _s1_ = ".", _s1_0 = ":", _s1_1 = "/", _s1_2 = "\\", _s1_3 = "?", _s1_4 = "#", _s2_ = "/\\", + tables = J.JSArray_JSArray$allocateGrowable(22, type$.Uint8List); + for (_i = 0; _i < 22; ++_i) + tables[_i] = new Uint8Array(96); + t1 = new A._createTables_build(tables); + t2 = new A._createTables_setChars(); + t3 = new A._createTables_setRange(); + b = t1.call$2(0, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, _s1_, 14); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s1_1, 3); + t2.call$3(b, _s1_2, 227); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(14, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, _s1_, 15); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s2_, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(15, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, "%", 225); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s1_1, 9); + t2.call$3(b, _s1_2, 233); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(1, 225); + t2.call$3(b, _s77_, 1); + t2.call$3(b, _s1_0, 34); + t2.call$3(b, _s1_1, 10); + t2.call$3(b, _s1_2, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(2, 235); + t2.call$3(b, _s77_, 139); + t2.call$3(b, _s1_1, 131); + t2.call$3(b, _s1_2, 131); + t2.call$3(b, _s1_, 146); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(3, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_1, 68); + t2.call$3(b, _s1_2, 68); + t2.call$3(b, _s1_, 18); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(4, 229); + t2.call$3(b, _s77_, 5); + t3.call$3(b, "AZ", 229); + t2.call$3(b, _s1_0, 102); + t2.call$3(b, "@", 68); + t2.call$3(b, "[", 232); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 138); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(5, 229); + t2.call$3(b, _s77_, 5); + t3.call$3(b, "AZ", 229); + t2.call$3(b, _s1_0, 102); + t2.call$3(b, "@", 68); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 138); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(6, 231); + t3.call$3(b, "19", 7); + t2.call$3(b, "@", 68); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 138); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(7, 231); + t3.call$3(b, "09", 7); + t2.call$3(b, "@", 68); + t2.call$3(b, _s1_1, 138); + t2.call$3(b, _s1_2, 138); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + t2.call$3(t1.call$2(8, 8), "]", 5); + b = t1.call$2(9, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 16); + t2.call$3(b, _s2_, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(16, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 17); + t2.call$3(b, _s2_, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(17, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_1, 9); + t2.call$3(b, _s1_2, 233); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(10, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 18); + t2.call$3(b, _s1_1, 10); + t2.call$3(b, _s1_2, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(18, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_, 19); + t2.call$3(b, _s2_, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(19, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s2_, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(11, 235); + t2.call$3(b, _s77_, 11); + t2.call$3(b, _s1_1, 10); + t2.call$3(b, _s1_2, 234); + t2.call$3(b, _s1_3, 172); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(12, 236); + t2.call$3(b, _s77_, 12); + t2.call$3(b, _s1_3, 12); + t2.call$3(b, _s1_4, 205); + b = t1.call$2(13, 237); + t2.call$3(b, _s77_, 13); + t2.call$3(b, _s1_3, 13); + t3.call$3(t1.call$2(20, 245), "az", 21); + b = t1.call$2(21, 245); + t3.call$3(b, "az", 21); + t3.call$3(b, "09", 21); + t2.call$3(b, "+-.", 21); + return tables; + }, + _scan(uri, start, end, state, indices) { + var i, table, char, transition, + tables = $.$get$_scannerTables(); + for (i = start; i < end; ++i) { + table = tables[state]; + char = uri.charCodeAt(i) ^ 96; + transition = table[char > 95 ? 31 : char]; + state = transition & 31; + indices[transition >>> 5] = i; + } + return state; + }, + _SimpleUri__packageNameEnd(uri) { + if (uri._schemeEnd === 7 && B.JSString_methods.startsWith$1(uri._uri, "package") && uri._hostStart <= 0) + return A._skipPackageNameChars(uri._uri, uri._pathStart, uri._queryStart); + return -1; + }, + _skipPackageNameChars(source, start, end) { + var i, dots, char; + for (i = start, dots = 0; i < end; ++i) { + char = source.charCodeAt(i); + if (char === 47) + return dots !== 0 ? i : -1; + if (char === 37 || char === 58) + return -1; + dots |= char ^ 46; + } + return -1; + }, + _caseInsensitiveCompareStart(prefix, string, start) { + var t1, result, i, stringChar, delta, lowerChar; + for (t1 = prefix.length, result = 0, i = 0; i < t1; ++i) { + stringChar = string.charCodeAt(start + i); + delta = prefix.charCodeAt(i) ^ stringChar; + if (delta !== 0) { + if (delta === 32) { + lowerChar = stringChar | delta; + if (97 <= lowerChar && lowerChar <= 122) { + result = 32; + continue; + } + } + return -1; + } + } + return result; + }, + NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { + this._box_0 = t0; + this.sb = t1; + }, + DateTime: function DateTime(t0, t1, t2) { + this._value = t0; + this._microsecond = t1; + this.isUtc = t2; + }, + Duration: function Duration(t0) { + this._duration = t0; + }, + _Enum: function _Enum() { + }, + Error: function Error() { + }, + AssertionError: function AssertionError(t0) { + this.message = t0; + }, + TypeError: function TypeError() { + }, + ArgumentError: function ArgumentError(t0, t1, t2, t3) { + var _ = this; + _._hasValue = t0; + _.invalidValue = t1; + _.name = t2; + _.message = t3; + }, + RangeError: function RangeError(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.start = t0; + _.end = t1; + _._hasValue = t2; + _.invalidValue = t3; + _.name = t4; + _.message = t5; + }, + IndexError: function IndexError(t0, t1, t2, t3, t4) { + var _ = this; + _.length = t0; + _._hasValue = t1; + _.invalidValue = t2; + _.name = t3; + _.message = t4; + }, + NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { + var _ = this; + _._core$_receiver = t0; + _._memberName = t1; + _._core$_arguments = t2; + _._namedArguments = t3; + }, + UnsupportedError: function UnsupportedError(t0) { + this.message = t0; + }, + UnimplementedError: function UnimplementedError(t0) { + this.message = t0; + }, + StateError: function StateError(t0) { + this.message = t0; + }, + ConcurrentModificationError: function ConcurrentModificationError(t0) { + this.modifiedObject = t0; + }, + OutOfMemoryError: function OutOfMemoryError() { + }, + StackOverflowError: function StackOverflowError() { + }, + _Exception: function _Exception(t0) { + this.message = t0; + }, + FormatException: function FormatException(t0, t1, t2) { + this.message = t0; + this.source = t1; + this.offset = t2; + }, + Iterable: function Iterable() { + }, + _GeneratorIterable: function _GeneratorIterable(t0, t1, t2) { + this.length = t0; + this._generator = t1; + this.$ti = t2; + }, + MapEntry: function MapEntry(t0, t1, t2) { + this.key = t0; + this.value = t1; + this.$ti = t2; + }, + Null: function Null() { + }, + Object: function Object() { + }, + _StringStackTrace: function _StringStackTrace(t0) { + this._stackTrace = t0; + }, + Runes: function Runes(t0) { + this.string = t0; + }, + RuneIterator: function RuneIterator(t0) { + var _ = this; + _.string = t0; + _._nextPosition = _._position = 0; + _._currentCodePoint = -1; + }, + StringBuffer: function StringBuffer(t0) { + this._contents = t0; + }, + Uri__parseIPv4Address_error: function Uri__parseIPv4Address_error(t0) { + this.host = t0; + }, + Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { + this.host = t0; + }, + Uri_parseIPv6Address_parseHex: function Uri_parseIPv6Address_parseHex(t0, t1) { + this.error = t0; + this.host = t1; + }, + _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; + }, + _Uri__makePath_closure: function _Uri__makePath_closure() { + }, + UriData: function UriData(t0, t1, t2) { + this._text = t0; + this._separatorIndices = t1; + this._uriCache = t2; + }, + _createTables_build: function _createTables_build(t0) { + this.tables = t0; + }, + _createTables_setChars: function _createTables_setChars() { + }, + _createTables_setRange: function _createTables_setRange() { + }, + _SimpleUri: function _SimpleUri(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._uri = t0; + _._schemeEnd = t1; + _._hostStart = t2; + _._portStart = t3; + _._pathStart = t4; + _._queryStart = t5; + _._fragmentStart = t6; + _._schemeCache = t7; + _._hashCodeCache = null; + }, + _DataUri: function _DataUri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; + }, + Expando: function Expando(t0) { + this._jsWeakMap = t0; + }, + _convertDartFunctionFast(f) { + var ret, + existing = f.$dart_jsFunction; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFast, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f.$dart_jsFunction = ret; + return ret; + }, + _convertDartFunctionFastCaptureThis(f) { + var ret, + existing = f._$dart_jsFunctionCaptureThis; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, this, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFastCaptureThis, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f._$dart_jsFunctionCaptureThis = ret; + return ret; + }, + _callDartFunctionFast(callback, $arguments) { + return A.Function_apply(callback, $arguments); + }, + _callDartFunctionFastCaptureThis(callback, $self, $arguments) { + var t1 = [$self]; + B.JSArray_methods.addAll$1(t1, $arguments); + return A.Function_apply(callback, t1); + }, + allowInterop(f) { + if (typeof f == "function") + return f; + else + return A._convertDartFunctionFast(f); + }, + allowInteropCaptureThis(f) { + if (typeof f == "function") + throw A.wrapException(A.ArgumentError$("Function is already a JS function so cannot capture this.", null)); + else + return A._convertDartFunctionFastCaptureThis(f); + }, + _noJsifyRequired(o) { + return o == null || A._isBool(o) || typeof o == "number" || typeof o == "string" || type$.Int8List._is(o) || type$.Uint8List._is(o) || type$.Uint8ClampedList._is(o) || type$.Int16List._is(o) || type$.Uint16List._is(o) || type$.Int32List._is(o) || type$.Uint32List._is(o) || type$.Float32List._is(o) || type$.Float64List._is(o) || type$.ByteBuffer._is(o) || type$.ByteData._is(o); + }, + jsify(object) { + if (A._noJsifyRequired(object)) + return object; + return new A.jsify__convert(new A._IdentityHashMap(type$._IdentityHashMap_of_nullable_Object_and_nullable_Object)).call$1(object); + }, + callConstructor(constr, $arguments) { + var args, factoryFunction; + if ($arguments instanceof Array) + switch ($arguments.length) { + case 0: + return new constr(); + case 1: + return new constr($arguments[0]); + case 2: + return new constr($arguments[0], $arguments[1]); + case 3: + return new constr($arguments[0], $arguments[1], $arguments[2]); + case 4: + return new constr($arguments[0], $arguments[1], $arguments[2], $arguments[3]); + } + args = [null]; + B.JSArray_methods.addAll$1(args, $arguments); + factoryFunction = constr.bind.apply(constr, args); + String(factoryFunction); + return new factoryFunction(); + }, + promiseToFuture0(jsPromise, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new A._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); + jsPromise.then(A.convertDartClosureToJS(new A.promiseToFuture_closure1(completer), 1), A.convertDartClosureToJS(new A.promiseToFuture_closure2(completer), 1)); + return t1; + }, + jsify__convert: function jsify__convert(t0) { + this._convertedObjects = t0; + }, + promiseToFuture_closure1: function promiseToFuture_closure1(t0) { + this.completer = t0; + }, + promiseToFuture_closure2: function promiseToFuture_closure2(t0) { + this.completer = t0; + }, + NullRejectionException: function NullRejectionException(t0) { + this.isUndefined = t0; + }, + max(a, b) { + return Math.max(a, b); + }, + pow(x, exponent) { + return Math.pow(x, exponent); + }, + Random_Random() { + return B.C__JSRandom; + }, + _JSRandom: function _JSRandom() { + }, + ArgParser: function ArgParser(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._arg_parser$_options = t0; + _._aliases = t1; + _.options = t2; + _.commands = t3; + _._optionsAndSeparators = t4; + _.allowTrailingOptions = t5; + _.usageLineLength = t6; + }, + ArgParser__addOption_closure: function ArgParser__addOption_closure(t0) { + this.$this = t0; + }, + ArgParserException$(message, commands) { + return new A.ArgParserException(commands == null ? B.List_empty : A.List_List$unmodifiable(commands, type$.String), message, null, null); + }, + ArgParserException: function ArgParserException(t0, t1, t2, t3) { + var _ = this; + _.commands = t0; + _.message = t1; + _.source = t2; + _.offset = t3; + }, + ArgResults: function ArgResults(t0, t1, t2, t3) { + var _ = this; + _._parser = t0; + _._parsed = t1; + _.name = t2; + _.rest = t3; + }, + Option: function Option(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { + var _ = this; + _.name = t0; + _.abbr = t1; + _.help = t2; + _.valueHelp = t3; + _.allowed = t4; + _.allowedHelp = t5; + _.defaultsTo = t6; + _.negatable = t7; + _.callback = t8; + _.type = t9; + _.splitCommas = t10; + _.mandatory = t11; + _.hide = t12; + }, + OptionType: function OptionType(t0) { + this.name = t0; + }, + Parser$(_commandName, _grammar, _args, _parent, rest) { + var t1 = A._setArrayType([], type$.JSArray_String); + if (rest != null) + B.JSArray_methods.addAll$1(t1, rest); + return new A.Parser0(_commandName, _parent, _grammar, _args, t1, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); + }, + _isLetterOrDigit(codeUnit) { + var t1 = true; + if (!(codeUnit >= 65 && codeUnit <= 90)) + if (!(codeUnit >= 97 && codeUnit <= 122)) + t1 = codeUnit >= 48 && codeUnit <= 57; + return t1; + }, + Parser0: function Parser0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._commandName = t0; + _._parser$_parent = t1; + _._grammar = t2; + _._args = t3; + _._parser$_rest = t4; + _._results = t5; + }, + Parser_parse_closure: function Parser_parse_closure(t0) { + this.$this = t0; + }, + Parser__setOption_closure: function Parser__setOption_closure() { + }, + _Usage: function _Usage(t0, t1, t2) { + var _ = this; + _._usage$_optionsAndSeparators = t0; + _._usage$_buffer = t1; + _._currentColumn = 0; + _.___Usage__columnWidths_FI = $; + _._newlinesNeeded = 0; + _.lineLength = t2; + }, + _Usage__writeOption_closure: function _Usage__writeOption_closure() { + }, + _Usage__buildAllowedList_closure: function _Usage__buildAllowedList_closure(t0) { + this.option = t0; + }, + FutureGroup: function FutureGroup(t0, t1, t2) { + var _ = this; + _._future_group$_pending = 0; + _._future_group$_closed = false; + _._future_group$_completer = t0; + _._future_group$_values = t1; + _.$ti = t2; + }, + FutureGroup_add_closure: function FutureGroup_add_closure(t0, t1) { + this.$this = t0; + this.index = t1; + }, + FutureGroup_add_closure0: function FutureGroup_add_closure0(t0) { + this.$this = t0; + }, + ErrorResult: function ErrorResult(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + ValueResult: function ValueResult(t0, t1) { + this.value = t0; + this.$ti = t1; + }, + StreamCompleter: function StreamCompleter(t0, t1) { + this._stream_completer$_stream = t0; + this.$ti = t1; + }, + _CompleterStream: function _CompleterStream(t0) { + this._sourceStream = this._stream_completer$_controller = null; + this.$ti = t0; + }, + StreamGroup: function StreamGroup(t0, t1, t2) { + var _ = this; + _.__StreamGroup__controller_A = $; + _._closed = false; + _._stream_group$_state = t0; + _._subscriptions = t1; + _.$ti = t2; + }, + StreamGroup_add_closure: function StreamGroup_add_closure() { + }, + StreamGroup_add_closure0: function StreamGroup_add_closure0(t0, t1) { + this.$this = t0; + this.stream = t1; + }, + StreamGroup__onListen_closure: function StreamGroup__onListen_closure() { + }, + StreamGroup__onCancel_closure: function StreamGroup__onCancel_closure(t0) { + this.$this = t0; + }, + StreamGroup__listenToStream_closure: function StreamGroup__listenToStream_closure(t0, t1) { + this.$this = t0; + this.stream = t1; + }, + _StreamGroupState: function _StreamGroupState(t0) { + this.name = t0; + }, + StreamQueue: function StreamQueue(t0, t1, t2, t3) { + var _ = this; + _._stream_queue$_source = t0; + _._stream_queue$_subscription = null; + _._isDone = false; + _._eventsReceived = 0; + _._eventQueue = t1; + _._requestQueue = t2; + _.$ti = t3; + }, + StreamQueue__ensureListening_closure: function StreamQueue__ensureListening_closure(t0) { + this.$this = t0; + }, + StreamQueue__ensureListening_closure1: function StreamQueue__ensureListening_closure1(t0) { + this.$this = t0; + }, + StreamQueue__ensureListening_closure0: function StreamQueue__ensureListening_closure0(t0) { + this.$this = t0; + }, + _NextRequest: function _NextRequest(t0, t1) { + this._completer = t0; + this.$ti = t1; + }, + isNodeJs() { + var t1 = self.process; + if (t1 == null) + t1 = null; + else { + t1 = J.get$release$x(t1); + t1 = t1 == null ? null : J.get$name$x(t1); + } + return J.$eq$(t1, "node"); + }, + isBrowser() { + return !A.isNodeJs() && self.document != null && typeof self.document.querySelector == "function"; + }, + wrapJSExceptions(callback) { + var error, error0, error1, error2, t1, exception; + if (!$.$get$_isStrictMode()) + return callback.call$0(); + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (typeof t1 == "string") { + error = t1; + throw A.wrapException(error); + } else if (A._isBool(t1)) { + error0 = t1; + throw A.wrapException(error0); + } else if (typeof t1 == "number") { + error1 = t1; + throw A.wrapException(error1); + } else { + error2 = t1; + if (typeof error2 == "symbol" || typeof error2 == "bigint" || error2 == null) + throw A.wrapException(error2.toString()); + throw exception; + } + } + }, + _isStrictMode_closure: function _isStrictMode_closure() { + }, + Repl: function Repl(t0, t1, t2, t3) { + var _ = this; + _.prompt = t0; + _.continuation = t1; + _.validator = t2; + _.__Repl__adapter_A = $; + _.history = t3; + }, + alwaysValid_closure: function alwaysValid_closure() { + }, + ReplAdapter: function ReplAdapter(t0) { + this.repl = t0; + this.rl = null; + }, + ReplAdapter_runAsync_closure: function ReplAdapter_runAsync_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.rl = t2; + _.runController = t3; + }, + ReplAdapter_runAsync__closure: function ReplAdapter_runAsync__closure(t0) { + this.lineController = t0; + }, + Stdin: function Stdin() { + }, + Stdout: function Stdout() { + }, + ReadlineModule: function ReadlineModule() { + }, + ReadlineOptions: function ReadlineOptions() { + }, + ReadlineInterface: function ReadlineInterface() { + }, + EmptyUnmodifiableSet: function EmptyUnmodifiableSet(t0) { + this.$ti = t0; + }, + _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin: function _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin() { + }, + DefaultEquality: function DefaultEquality() { + }, + IterableEquality: function IterableEquality() { + }, + ListEquality: function ListEquality() { + }, + _MapEntry: function _MapEntry(t0, t1, t2) { + this.equality = t0; + this.key = t1; + this.value = t2; + }, + MapEquality: function MapEquality(t0) { + this.$ti = t0; + }, + QueueList$(initialCapacity, $E) { + return new A.QueueList(A.List_List$filled(A.QueueList__computeInitialCapacity(initialCapacity), null, false, $E._eval$1("0?")), 0, 0, $E._eval$1("QueueList<0>")); + }, + QueueList_QueueList$from(source, $E) { + var $length, queue, t1; + if (type$.List_dynamic._is(source)) { + $length = J.get$length$asx(source); + queue = A.QueueList$($length + 1, $E); + J.setRange$4$ax(queue._queue_list$_table, 0, $length, source, 0); + queue._queue_list$_tail = $length; + return queue; + } else { + t1 = A.QueueList$(null, $E); + t1.addAll$1(0, source); + return t1; + } + }, + QueueList__computeInitialCapacity(initialCapacity) { + if (initialCapacity == null || initialCapacity < 8) + return 8; + ++initialCapacity; + if ((initialCapacity & initialCapacity - 1) >>> 0 === 0) + return initialCapacity; + return A.QueueList__nextPowerOf2(initialCapacity); + }, + QueueList__nextPowerOf2(number) { + var nextNumber; + number = (number << 1 >>> 0) - 1; + for (; true; number = nextNumber) { + nextNumber = (number & number - 1) >>> 0; + if (nextNumber === 0) + return number; + } + }, + QueueList: function QueueList(t0, t1, t2, t3) { + var _ = this; + _._queue_list$_table = t0; + _._queue_list$_head = t1; + _._queue_list$_tail = t2; + _.$ti = t3; + }, + _CastQueueList: function _CastQueueList(t0, t1, t2, t3, t4) { + var _ = this; + _._queue_list$_delegate = t0; + _._queue_list$_table = t1; + _._queue_list$_head = t2; + _._queue_list$_tail = t3; + _.$ti = t4; + }, + _QueueList_Object_ListMixin: function _QueueList_Object_ListMixin() { + }, + UnionSet: function UnionSet(t0, t1) { + this._sets = t0; + this.$ti = t1; + }, + UnionSet__iterable_closure: function UnionSet__iterable_closure(t0) { + this.$this = t0; + }, + UnionSet_contains_closure: function UnionSet_contains_closure(t0, t1) { + this.$this = t0; + this.element = t1; + }, + _UnionSet_SetBase_UnmodifiableSetMixin: function _UnionSet_SetBase_UnmodifiableSetMixin() { + }, + UnmodifiableSetMixin__throw() { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable Set")); + }, + UnmodifiableSetView0: function UnmodifiableSetView0(t0, t1) { + this._base = t0; + this.$ti = t1; + }, + UnmodifiableSetMixin: function UnmodifiableSetMixin() { + }, + _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin: function _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin() { + }, + _DelegatingIterableBase: function _DelegatingIterableBase() { + }, + DelegatingSet: function DelegatingSet(t0, t1) { + this._base = t0; + this.$ti = t1; + }, + MapKeySet: function MapKeySet(t0, t1) { + this._baseMap = t0; + this.$ti = t1; + }, + MapKeySet_difference_closure: function MapKeySet_difference_closure(t0, t1) { + this.$this = t0; + this.other = t1; + }, + _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin: function _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin() { + }, + BufferModule: function BufferModule() { + }, + BufferConstants: function BufferConstants() { + }, + Buffer: function Buffer() { + }, + ConsoleModule: function ConsoleModule() { + }, + Console: function Console() { + }, + EventEmitter: function EventEmitter() { + }, + fs() { + var t1 = $._fs; + return t1 == null ? $._fs = self.fs : t1; + }, + FS: function FS() { + }, + FSConstants: function FSConstants() { + }, + FSWatcher: function FSWatcher() { + }, + ReadStream: function ReadStream() { + }, + ReadStreamOptions: function ReadStreamOptions() { + }, + WriteStream: function WriteStream() { + }, + WriteStreamOptions: function WriteStreamOptions() { + }, + FileOptions: function FileOptions() { + }, + StatOptions: function StatOptions() { + }, + MkdirOptions: function MkdirOptions() { + }, + RmdirOptions: function RmdirOptions() { + }, + WatchOptions: function WatchOptions() { + }, + WatchFileOptions: function WatchFileOptions() { + }, + Stats: function Stats() { + }, + Promise: function Promise() { + }, + Date: function Date() { + }, + JsError: function JsError() { + }, + Atomics: function Atomics() { + }, + Modules: function Modules() { + }, + Module: function Module() { + }, + Net: function Net() { + }, + Socket: function Socket() { + }, + NetAddress: function NetAddress() { + }, + NetServer: function NetServer() { + }, + NodeJsError: function NodeJsError() { + }, + JsAssertionError: function JsAssertionError() { + }, + JsRangeError: function JsRangeError() { + }, + JsReferenceError: function JsReferenceError() { + }, + JsSyntaxError: function JsSyntaxError() { + }, + JsTypeError: function JsTypeError() { + }, + JsSystemError: function JsSystemError() { + }, + Process: function Process() { + }, + CPUUsage: function CPUUsage() { + }, + Release: function Release() { + }, + StreamModule: function StreamModule() { + }, + Readable: function Readable() { + }, + Writable: function Writable() { + }, + Duplex: function Duplex() { + }, + Transform: function Transform() { + }, + WritableOptions: function WritableOptions() { + }, + ReadableOptions: function ReadableOptions() { + }, + Immediate: function Immediate() { + }, + Timeout: function Timeout() { + }, + TTY: function TTY() { + }, + TTYReadStream: function TTYReadStream() { + }, + TTYWriteStream: function TTYWriteStream() { + }, + jsify0(dartObject) { + if (A._isBasicType(dartObject)) + return dartObject; + return A.jsify(dartObject); + }, + _isBasicType(value) { + return false; + }, + promiseToFuture(promise, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new A._SyncCompleter(t1, $T._eval$1("_SyncCompleter<0>")); + J.then$2$x(promise, A.allowInterop(new A.promiseToFuture_closure(completer)), A.allowInterop(new A.promiseToFuture_closure0(completer))); + return t1; + }, + futureToPromise(future, $T) { + return new self.Promise(A.allowInterop(new A.futureToPromise_closure(future, $T))); + }, + Util: function Util() { + }, + promiseToFuture_closure: function promiseToFuture_closure(t0) { + this.completer = t0; + }, + promiseToFuture_closure0: function promiseToFuture_closure0(t0) { + this.completer = t0; + }, + futureToPromise_closure: function futureToPromise_closure(t0, t1) { + this.future = t0; + this.T = t1; + }, + futureToPromise__closure: function futureToPromise__closure(t0, t1) { + this.resolve = t0; + this.T = t1; + }, + Context_Context(style) { + return new A.Context(style, "."); + }, + _parseUri(uri) { + if (typeof uri == "string") + return A.Uri_parse(uri); + if (type$.Uri._is(uri)) + return uri; + throw A.wrapException(A.ArgumentError$value(uri, "uri", "Value must be a String or a Uri")); + }, + _validateArgList(method, args) { + var numArgs, i, numArgs0, message, t1, t2, t3, t4; + for (numArgs = args.length, i = 1; i < numArgs; ++i) { + if (args[i] == null || args[i - 1] != null) + continue; + for (; numArgs >= 1; numArgs = numArgs0) { + numArgs0 = numArgs - 1; + if (args[numArgs0] != null) + break; + } + message = new A.StringBuffer(""); + t1 = "" + (method + "("); + message._contents = t1; + t2 = A._arrayInstanceType(args); + t3 = t2._eval$1("SubListIterable<1>"); + t4 = new A.SubListIterable(args, 0, numArgs, t3); + t4.SubListIterable$3(args, 0, numArgs, t2._precomputed1); + t3 = t1 + new A.MappedListIterable(t4, new A._validateArgList_closure(), t3._eval$1("MappedListIterable")).join$1(0, ", "); + message._contents = t3; + message._contents = t3 + ("): part " + (i - 1) + " was null, but part " + i + " was not."); + throw A.wrapException(A.ArgumentError$(message.toString$0(0), null)); + } + }, + Context: function Context(t0, t1) { + this.style = t0; + this._context$_current = t1; + }, + Context_joinAll_closure: function Context_joinAll_closure() { + }, + Context_split_closure: function Context_split_closure() { + }, + _validateArgList_closure: function _validateArgList_closure() { + }, + _PathDirection: function _PathDirection(t0) { + this.name = t0; + }, + _PathRelation: function _PathRelation(t0) { + this.name = t0; + }, + InternalStyle: function InternalStyle() { + }, + ParsedPath_ParsedPath$parse(path, style) { + var t1, parts, separators, start, i, + root = style.getRoot$1(path), + isRootRelative = style.isRootRelative$1(path); + if (root != null) + path = B.JSString_methods.substring$1(path, root.length); + t1 = type$.JSArray_String; + parts = A._setArrayType([], t1); + separators = A._setArrayType([], t1); + t1 = path.length; + if (t1 !== 0 && style.isSeparator$1(path.charCodeAt(0))) { + separators.push(path[0]); + start = 1; + } else { + separators.push(""); + start = 0; + } + for (i = start; i < t1; ++i) + if (style.isSeparator$1(path.charCodeAt(i))) { + parts.push(B.JSString_methods.substring$2(path, start, i)); + separators.push(path[i]); + start = i + 1; + } + if (start < t1) { + parts.push(B.JSString_methods.substring$1(path, start)); + separators.push(""); + } + return new A.ParsedPath(style, root, isRootRelative, parts, separators); + }, + ParsedPath: function ParsedPath(t0, t1, t2, t3, t4) { + var _ = this; + _.style = t0; + _.root = t1; + _.isRootRelative = t2; + _.parts = t3; + _.separators = t4; + }, + ParsedPath__splitExtension_closure: function ParsedPath__splitExtension_closure() { + }, + ParsedPath__splitExtension_closure0: function ParsedPath__splitExtension_closure0() { + }, + PathException$(message) { + return new A.PathException(message); + }, + PathException: function PathException(t0) { + this.message = t0; + }, + PathMap__create(context, $V) { + var t1 = {}; + t1.context = context; + t1.context = $.$get$context(); + return A.LinkedHashMap_LinkedHashMap(new A.PathMap__create_closure(t1), new A.PathMap__create_closure0(t1), new A.PathMap__create_closure1(), type$.nullable_String, $V); + }, + PathMap: function PathMap(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + PathMap__create_closure: function PathMap__create_closure(t0) { + this._box_0 = t0; + }, + PathMap__create_closure0: function PathMap__create_closure0(t0) { + this._box_0 = t0; + }, + PathMap__create_closure1: function PathMap__create_closure1() { + }, + Style__getPlatformStyle() { + if (A.Uri_base().get$scheme() !== "file") + return $.$get$Style_url(); + var t1 = A.Uri_base(); + if (!B.JSString_methods.endsWith$1(t1.get$path(t1), "/")) + return $.$get$Style_url(); + if (A._Uri__Uri(null, "a/b", null, null).toFilePath$0() === "a\\b") + return $.$get$Style_windows(); + return $.$get$Style_posix(); + }, + Style: function Style() { + }, + PosixStyle: function PosixStyle(t0, t1, t2) { + this.separatorPattern = t0; + this.needsSeparatorPattern = t1; + this.rootPattern = t2; + }, + UrlStyle: function UrlStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; + }, + WindowsStyle: function WindowsStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; + }, + WindowsStyle_absolutePathToUri_closure: function WindowsStyle_absolutePathToUri_closure() { + }, + Version$_(major, minor, patch, preRelease, build, _text) { + var t1 = preRelease == null ? A._setArrayType([], type$.JSArray_Object) : A.Version__splitParts(preRelease), + t2 = build == null ? A._setArrayType([], type$.JSArray_Object) : A.Version__splitParts(build); + if (major < 0) + A.throwExpression(A.ArgumentError$("Major version must be non-negative.", null)); + if (minor < 0) + A.throwExpression(A.ArgumentError$("Minor version must be non-negative.", null)); + if (patch < 0) + A.throwExpression(A.ArgumentError$("Patch version must be non-negative.", null)); + return new A.Version(major, minor, patch, t1, t2, _text); + }, + Version_Version(major, minor, patch, pre) { + var text = "" + major + "." + minor + "." + patch; + if (pre != null) + text += "-" + pre; + return A.Version$_(major, minor, patch, pre, null, text); + }, + Version___parse_tearOff(text) { + return A.Version_Version$parse(text); + }, + Version_Version$parse(text) { + var major, minor, patch, preRelease, build, t1, exception, _null = null, + _s17_ = 'Could not parse "', + match = $.$get$completeVersion().firstMatch$1(text); + if (match == null) + throw A.wrapException(A.FormatException$(_s17_ + text + '".', _null, _null)); + try { + t1 = match._match[1]; + t1.toString; + major = A.int_parse(t1, _null); + t1 = match._match[2]; + t1.toString; + minor = A.int_parse(t1, _null); + t1 = match._match[3]; + t1.toString; + patch = A.int_parse(t1, _null); + preRelease = match._match[5]; + build = match._match[8]; + t1 = A.Version$_(major, minor, patch, preRelease, build, text); + return t1; + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) + throw A.wrapException(A.FormatException$(_s17_ + text + '".', _null, _null)); + else + throw exception; + } + }, + Version__splitParts(text) { + var t1 = type$.MappedListIterable_String_Object; + return A.List_List$of(new A.MappedListIterable(A._setArrayType(text.split("."), type$.JSArray_String), new A.Version__splitParts_closure(), t1), true, t1._eval$1("ListIterable.E")); + }, + Version: function Version(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.major = t0; + _.minor = t1; + _.patch = t2; + _.preRelease = t3; + _.build = t4; + _._version$_text = t5; + }, + Version__splitParts_closure: function Version__splitParts_closure() { + }, + VersionRange_VersionRange(includeMax, max) { + return new A.VersionRange(null, max, false, true); + }, + VersionRange: function VersionRange(t0, t1, t2, t3) { + var _ = this; + _.min = t0; + _.max = t1; + _.includeMin = t2; + _.includeMax = t3; + }, + CssMediaQuery_parseList(contents, interpolationMap, logger) { + var t1 = A.SpanScanner$(contents, null); + return new A.MediaQueryParser(t1, logger, interpolationMap).parse$0(0); + }, + CssMediaQuery$type(type, conditions, modifier) { + return new A.CssMediaQuery(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); + }, + CssMediaQuery$condition(conditions, conjunction) { + var t1 = A.List_List$unmodifiable(conditions, type$.String); + if (t1.length > 1 && conjunction == null) + A.throwExpression(A.ArgumentError$(string$.If_con, null)); + return new A.CssMediaQuery(null, null, conjunction !== false, t1); + }, + CssMediaQuery: function CssMediaQuery(t0, t1, t2, t3) { + var _ = this; + _.modifier = t0; + _.type = t1; + _.conjunction = t2; + _.conditions = t3; + }, + _SingletonCssMediaQueryMergeResult: function _SingletonCssMediaQueryMergeResult(t0) { + this._name = t0; + }, + MediaQuerySuccessfulMergeResult: function MediaQuerySuccessfulMergeResult(t0) { + this.query = t0; + }, + ModifiableCssAtRule$($name, span, childless, value) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssAtRule($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssAtRule: function ModifiableCssAtRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.isChildless = t2; + _.span = t3; + _.children = t4; + _._children = t5; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssComment: function ModifiableCssComment(t0, t1) { + var _ = this; + _.text = t0; + _.span = t1; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssDeclaration$($name, value, span, interleavedRules, parsedAsCustomProperty, trace, valueSpanForMap) { + var t3, + t1 = interleavedRules == null ? B.List_empty11 : A.List_List$unmodifiable(interleavedRules, type$.CssStyleRule), + t2 = valueSpanForMap == null ? value.span : valueSpanForMap; + if (parsedAsCustomProperty) + if (!J.startsWith$1$s($name.value, "--")) + A.throwExpression(A.ArgumentError$(string$.parsed, null)); + else { + t3 = value.value; + if (!(t3 instanceof A.SassString)) + A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeTypeOfDartObject(t3).toString$0(0) + ").", null)); + } + return new A.ModifiableCssDeclaration($name, value, parsedAsCustomProperty, t1, trace, t2, span); + }, + ModifiableCssDeclaration: function ModifiableCssDeclaration(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.name = t0; + _.value = t1; + _.parsedAsCustomProperty = t2; + _.interleavedRules = t3; + _.trace = t4; + _.valueSpanForMap = t5; + _.span = t6; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssImport: function ModifiableCssImport(t0, t1, t2) { + var _ = this; + _.url = t0; + _.modifiers = t1; + _.span = t2; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssKeyframeBlock$(selector, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssKeyframeBlock(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssKeyframeBlock: function ModifiableCssKeyframeBlock(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssMediaRule$(queries, span) { + var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery), + t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + if (J.get$isEmpty$asx(queries)) + A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); + return new A.ModifiableCssMediaRule(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode), t2); + }, + ModifiableCssMediaRule: function ModifiableCssMediaRule(t0, t1, t2, t3) { + var _ = this; + _.queries = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssNode: function ModifiableCssNode() { + }, + ModifiableCssNode_hasFollowingSibling_closure: function ModifiableCssNode_hasFollowingSibling_closure() { + }, + ModifiableCssParentNode: function ModifiableCssParentNode() { + }, + ModifiableCssStyleRule$(_selector, span, fromPlainCss, originalSelector) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssStyleRule(_selector, originalSelector, span, fromPlainCss, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssStyleRule: function ModifiableCssStyleRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._style_rule$_selector = t0; + _.originalSelector = t1; + _.span = t2; + _.fromPlainCss = t3; + _.children = t4; + _._children = t5; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssStylesheet$(span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssStylesheet(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssStylesheet: function ModifiableCssStylesheet(t0, t1, t2) { + var _ = this; + _.span = t0; + _.children = t1; + _._children = t2; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssSupportsRule$(condition, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssSupportsRule(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssSupportsRule: function ModifiableCssSupportsRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + CssNode: function CssNode() { + }, + CssParentNode: function CssParentNode() { + }, + _IsInvisibleVisitor: function _IsInvisibleVisitor(t0, t1) { + this.includeBogus = t0; + this.includeComments = t1; + }, + __IsInvisibleVisitor_Object_EveryCssVisitor: function __IsInvisibleVisitor_Object_EveryCssVisitor() { + }, + CssStylesheet: function CssStylesheet(t0, t1) { + this.children = t0; + this.span = t1; + }, + CssValue: function CssValue(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + _FakeAstNode: function _FakeAstNode(t0) { + this._callback = t0; + }, + Argument: function Argument(t0, t1, t2) { + this.name = t0; + this.defaultValue = t1; + this.span = t2; + }, + ArgumentDeclaration_ArgumentDeclaration$parse(contents, url) { + return A.ScssParser$(contents, null, url).parseArgumentDeclaration$0(); + }, + ArgumentDeclaration: function ArgumentDeclaration(t0, t1, t2) { + this.$arguments = t0; + this.restArgument = t1; + this.span = t2; + }, + ArgumentDeclaration_verify_closure: function ArgumentDeclaration_verify_closure() { + }, + ArgumentDeclaration_verify_closure0: function ArgumentDeclaration_verify_closure0() { + }, + ArgumentInvocation$empty(span) { + return new A.ArgumentInvocation(B.List_empty9, B.Map_empty6, null, null, span); + }, + ArgumentInvocation: function ArgumentInvocation(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.named = t1; + _.rest = t2; + _.keywordRest = t3; + _.span = t4; + }, + AtRootQuery: function AtRootQuery(t0, t1, t2, t3) { + var _ = this; + _.include = t0; + _.names = t1; + _._all = t2; + _._at_root_query$_rule = t3; + }, + ConfiguredVariable: function ConfiguredVariable(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.expression = t1; + _.isGuarded = t2; + _.span = t3; + }, + Expression: function Expression() { + }, + _IsCalculationSafeVisitor: function _IsCalculationSafeVisitor() { + }, + _IsCalculationSafeVisitor_visitListExpression_closure: function _IsCalculationSafeVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + BinaryOperationExpression: function BinaryOperationExpression(t0, t1, t2, t3) { + var _ = this; + _.operator = t0; + _.left = t1; + _.right = t2; + _.allowsSlash = t3; + }, + BinaryOperator: function BinaryOperator(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _.isAssociative = t3; + _._name = t4; + }, + BooleanExpression: function BooleanExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + ColorExpression: function ColorExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + FunctionExpression: function FunctionExpression(t0, t1, t2, t3, t4) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.span = t4; + }, + IfExpression: function IfExpression(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + InterpolatedFunctionExpression: function InterpolatedFunctionExpression(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + ListExpression: function ListExpression(t0, t1, t2, t3) { + var _ = this; + _.contents = t0; + _.separator = t1; + _.hasBrackets = t2; + _.span = t3; + }, + ListExpression_toString_closure: function ListExpression_toString_closure(t0) { + this.$this = t0; + }, + MapExpression: function MapExpression(t0, t1) { + this.pairs = t0; + this.span = t1; + }, + NullExpression: function NullExpression(t0) { + this.span = t0; + }, + NumberExpression: function NumberExpression(t0, t1, t2) { + this.value = t0; + this.unit = t1; + this.span = t2; + }, + ParenthesizedExpression: function ParenthesizedExpression(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SelectorExpression: function SelectorExpression(t0) { + this.span = t0; + }, + StringExpression_quoteText(text) { + var t1, + quote = A.StringExpression__bestQuote(A._setArrayType([text], type$.JSArray_String)), + buffer = new A.StringBuffer(""); + buffer._contents = "" + A.Primitives_stringFromCharCode(quote); + A.StringExpression__quoteInnerText(text, quote, buffer, true); + t1 = A.Primitives_stringFromCharCode(quote); + t1 = buffer._contents += t1; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + StringExpression__quoteInnerText(text, quote, buffer, $static) { + var t1, t2, i, _1_0, _0_0, t3, t4, t5, t0; + for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { + _1_0 = text.charCodeAt(i); + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(97); + if (i !== t2) { + _0_0 = text.charCodeAt(i + 1); + t3 = true; + if (!(_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12)) + if (!(_0_0 >= 48 && _0_0 <= 57)) + if (!(_0_0 >= 97 && _0_0 <= 102)) + t3 = _0_0 >= 65 && _0_0 <= 70; + if (t3) + buffer.writeCharCode$1(32); + } + continue; + } + t3 = 92 === _1_0; + if (t3) + t4 = _1_0; + else + t4 = null; + if (!t3) { + t3 = false; + t5 = _1_0 === quote; + if (t5) + t4 = _1_0; + if (!t5) + if (35 === _1_0) + if ($static) + if (i < t2) { + t3 = text.charCodeAt(i + 1) === 123; + if (t3) + t4 = _1_0; + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t3 = t4; + t4 = true; + } + } else { + t3 = t4; + t4 = true; + } + if (t4) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(t3); + continue; + } + buffer.writeCharCode$1(_1_0); + } + }, + StringExpression__bestQuote(strings) { + var t1, t2, t3, containsDoubleQuote, t4, t5; + for (t1 = J.get$iterator$ax(strings), t2 = type$.CodeUnits, t3 = t2._eval$1("ListIterator"), t2 = t2._eval$1("ListBase.E"), containsDoubleQuote = false; t1.moveNext$0();) + for (t4 = new A.CodeUnits(t1.get$current(t1)), t4 = new A.ListIterator(t4, t4.get$length(0), t3); t4.moveNext$0();) { + t5 = t4.__internal$_current; + if (t5 == null) + t5 = t2._as(t5); + if (t5 === 39) + return 34; + if (t5 === 34) + containsDoubleQuote = true; + } + return containsDoubleQuote ? 39 : 34; + }, + StringExpression: function StringExpression(t0, t1) { + this.text = t0; + this.hasQuotes = t1; + }, + SupportsExpression: function SupportsExpression(t0) { + this.condition = t0; + }, + UnaryOperationExpression: function UnaryOperationExpression(t0, t1, t2) { + this.operator = t0; + this.operand = t1; + this.span = t2; + }, + UnaryOperator: function UnaryOperator(t0, t1, t2) { + this.name = t0; + this.operator = t1; + this._name = t2; + }, + ValueExpression: function ValueExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + VariableExpression: function VariableExpression(t0, t1, t2) { + this.namespace = t0; + this.name = t1; + this.span = t2; + }, + DynamicImport: function DynamicImport(t0, t1) { + this.urlString = t0; + this.span = t1; + }, + StaticImport: function StaticImport(t0, t1, t2) { + this.url = t0; + this.modifiers = t1; + this.span = t2; + }, + Interpolation$(contents, span) { + var t1 = new A.Interpolation(A.List_List$unmodifiable(contents, type$.Object), span); + t1.Interpolation$2(contents, span); + return t1; + }, + Interpolation: function Interpolation(t0, t1) { + this.contents = t0; + this.span = t1; + }, + Interpolation_toString_closure: function Interpolation_toString_closure() { + }, + Statement: function Statement() { + }, + AtRootRule$(children, span, query) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.AtRootRule(query, span, t1, t2); + }, + AtRootRule: function AtRootRule(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + AtRule$($name, span, children, value) { + var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement), + t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.AtRule($name, value, span, t1, t2 === true); + }, + AtRule: function AtRule(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + CallableDeclaration: function CallableDeclaration() { + }, + ContentBlock$($arguments, children, span) { + var _s8_ = "@content", + t1 = A.stringReplaceAllUnchecked(_s8_, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.ContentBlock(t1, _s8_, $arguments, span, t2, t3); + }, + ContentBlock: function ContentBlock(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + ContentRule: function ContentRule(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + DebugRule: function DebugRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + Declaration$($name, value, span) { + return new A.Declaration($name, value, span, null, false); + }, + Declaration$nested($name, children, span, value) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.Declaration($name, value, span, t1, t2); + }, + Declaration: function Declaration(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule$(variables, list, children, span) { + var t1 = A.List_List$unmodifiable(variables, type$.String), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.EachRule(t1, list, span, t2, t3); + }, + EachRule: function EachRule(t0, t1, t2, t3, t4) { + var _ = this; + _.variables = t0; + _.list = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule_toString_closure: function EachRule_toString_closure() { + }, + ErrorRule: function ErrorRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + ExtendRule: function ExtendRule(t0, t1, t2) { + this.selector = t0; + this.isOptional = t1; + this.span = t2; + }, + ForRule$(variable, from, to, children, span, exclusive) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.ForRule(variable, from, to, exclusive, span, t1, t2); + }, + ForRule: function ForRule(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.variable = t0; + _.from = t1; + _.to = t2; + _.isExclusive = t3; + _.span = t4; + _.children = t5; + _.hasDeclarations = t6; + }, + ForwardRule: function ForwardRule(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.url = t0; + _.shownMixinsAndFunctions = t1; + _.shownVariables = t2; + _.hiddenMixinsAndFunctions = t3; + _.hiddenVariables = t4; + _.prefix = t5; + _.configuration = t6; + _.span = t7; + }, + FunctionRule$($name, $arguments, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.FunctionRule(t1, $name, $arguments, span, t2, t3); + }, + FunctionRule: function FunctionRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + IfClause$(expression, children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement); + return new A.IfClause(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); + }, + ElseClause$(children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement); + return new A.ElseClause(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); + }, + IfRule: function IfRule(t0, t1, t2) { + this.clauses = t0; + this.lastClause = t1; + this.span = t2; + }, + IfRule_toString_closure: function IfRule_toString_closure() { + }, + IfRuleClause: function IfRuleClause() { + }, + IfRuleClause$__closure: function IfRuleClause$__closure() { + }, + IfRuleClause$___closure: function IfRuleClause$___closure() { + }, + IfClause: function IfClause(t0, t1, t2) { + this.expression = t0; + this.children = t1; + this.hasDeclarations = t2; + }, + ElseClause: function ElseClause(t0, t1) { + this.children = t0; + this.hasDeclarations = t1; + }, + ImportRule: function ImportRule(t0, t1) { + this.imports = t0; + this.span = t1; + }, + IncludeRule: function IncludeRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.content = t4; + _.span = t5; + }, + LoudComment: function LoudComment(t0) { + this.text = t0; + }, + MediaRule$(query, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.MediaRule(query, span, t1, t2); + }, + MediaRule: function MediaRule(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + MixinRule$($name, $arguments, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.MixinRule(t1, $name, $arguments, span, t2, t3); + }, + MixinRule: function MixinRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.__MixinRule_hasContent_FI = $; + _.name = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + _HasContentVisitor: function _HasContentVisitor() { + }, + __HasContentVisitor_Object_StatementSearchVisitor: function __HasContentVisitor_Object_StatementSearchVisitor() { + }, + ParentStatement: function ParentStatement() { + }, + ParentStatement_closure: function ParentStatement_closure() { + }, + ParentStatement__closure: function ParentStatement__closure() { + }, + ReturnRule: function ReturnRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SilentComment: function SilentComment(t0, t1) { + this.text = t0; + this.span = t1; + }, + StyleRule$(selector, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.StyleRule(selector, span, t1, t2); + }, + StyleRule: function StyleRule(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + Stylesheet$(children, span) { + var t1 = A._setArrayType([], type$.JSArray_UseRule), + t2 = A._setArrayType([], type$.JSArray_ForwardRule), + t3 = A.List_List$unmodifiable(children, type$.Statement), + t4 = B.JSArray_methods.any$1(t3, new A.ParentStatement_closure()); + t1 = new A.Stylesheet(span, false, t1, t2, t3, t4); + t1.Stylesheet$internal$3$plainCss(children, span, false); + return t1; + }, + Stylesheet$internal(children, span, plainCss) { + var t1 = A._setArrayType([], type$.JSArray_UseRule), + t2 = A._setArrayType([], type$.JSArray_ForwardRule), + t3 = A.List_List$unmodifiable(children, type$.Statement), + t4 = B.JSArray_methods.any$1(t3, new A.ParentStatement_closure()); + t1 = new A.Stylesheet(span, plainCss, t1, t2, t3, t4); + t1.Stylesheet$internal$3$plainCss(children, span, plainCss); + return t1; + }, + Stylesheet_Stylesheet$parse(contents, syntax, logger, url) { + var error, stackTrace, url0, t1, exception, t2; + try { + switch (syntax) { + case B.Syntax_Sass_sass: + t1 = A.SpanScanner$(contents, url); + t1 = new A.SassParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration), t1, logger, null).parse$0(0); + return t1; + case B.Syntax_SCSS_scss: + t1 = A.ScssParser$(contents, logger, url).parse$0(0); + return t1; + case B.Syntax_CSS_css: + t1 = A.SpanScanner$(contents, url); + t1 = new A.CssParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration), t1, logger, null).parse$0(0); + return t1; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + url0 = t1.get$sourceUrl(t1); + if (url0 == null || J.toString$0$(url0) === "stdin") + throw exception; + t1 = type$.Uri; + throw A.wrapException(A.throwWithTrace(error.withLoadedUrls$1(A.Set_Set$unmodifiable(A.LinkedHashSet_LinkedHashSet$_literal([url0], t1), t1)), error, stackTrace)); + } else + throw exception; + } + }, + Stylesheet: function Stylesheet(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.span = t0; + _.plainCss = t1; + _._uses = t2; + _._forwards = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + SupportsRule$(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.SupportsRule(condition, span, t1, t2); + }, + SupportsRule: function SupportsRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + UseRule: function UseRule(t0, t1, t2, t3) { + var _ = this; + _.url = t0; + _.namespace = t1; + _.configuration = t2; + _.span = t3; + }, + VariableDeclaration$($name, expression, span, comment, global, guarded, namespace) { + if (namespace != null && global) + A.throwExpression(A.ArgumentError$(string$.Other_, null)); + return new A.VariableDeclaration(namespace, $name, expression, guarded, global, span); + }, + VariableDeclaration: function VariableDeclaration(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.expression = t2; + _.isGuarded = t3; + _.isGlobal = t4; + _.span = t5; + }, + WarnRule: function WarnRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + WhileRule$(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.WhileRule(condition, span, t1, t2); + }, + WhileRule: function WhileRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + SupportsAnything: function SupportsAnything(t0, t1) { + this.contents = t0; + this.span = t1; + }, + SupportsDeclaration: function SupportsDeclaration(t0, t1, t2) { + this.name = t0; + this.value = t1; + this.span = t2; + }, + SupportsFunction: function SupportsFunction(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + SupportsInterpolation: function SupportsInterpolation(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SupportsNegation: function SupportsNegation(t0, t1) { + this.condition = t0; + this.span = t1; + }, + SupportsOperation$(left, right, operator, span) { + var lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + return new A.SupportsOperation(left, right, operator, span); + }, + SupportsOperation: function SupportsOperation(t0, t1, t2, t3) { + var _ = this; + _.left = t0; + _.right = t1; + _.operator = t2; + _.span = t3; + }, + Selector: function Selector() { + }, + _IsInvisibleVisitor0: function _IsInvisibleVisitor0(t0) { + this.includeBogus = t0; + }, + _IsBogusVisitor: function _IsBogusVisitor(t0) { + this.includeLeadingCombinator = t0; + }, + _IsBogusVisitor_visitComplexSelector_closure: function _IsBogusVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + _IsUselessVisitor: function _IsUselessVisitor() { + }, + _IsUselessVisitor_visitComplexSelector_closure: function _IsUselessVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + __IsBogusVisitor_Object_AnySelectorVisitor: function __IsBogusVisitor_Object_AnySelectorVisitor() { + }, + __IsInvisibleVisitor_Object_AnySelectorVisitor: function __IsInvisibleVisitor_Object_AnySelectorVisitor() { + }, + __IsUselessVisitor_Object_AnySelectorVisitor: function __IsUselessVisitor_Object_AnySelectorVisitor() { + }, + AttributeSelector: function AttributeSelector(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.op = t1; + _.value = t2; + _.modifier = t3; + _.span = t4; + }, + AttributeOperator: function AttributeOperator(t0, t1) { + this._attribute$_text = t0; + this._name = t1; + }, + ClassSelector: function ClassSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + Combinator: function Combinator(t0, t1) { + this._combinator$_text = t0; + this._name = t1; + }, + ComplexSelector$(leadingCombinators, components, span, lineBreak) { + var t1 = A.List_List$unmodifiable(leadingCombinators, type$.CssValue_Combinator), + t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent); + if (t1.length === 0 && t2.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + return new A.ComplexSelector(t1, t2, lineBreak, span); + }, + ComplexSelector: function ComplexSelector(t0, t1, t2, t3) { + var _ = this; + _.leadingCombinators = t0; + _.components = t1; + _.lineBreak = t2; + _.__ComplexSelector_specificity_FI = $; + _.span = t3; + }, + ComplexSelector_specificity_closure: function ComplexSelector_specificity_closure() { + }, + ComplexSelectorComponent: function ComplexSelectorComponent(t0, t1, t2) { + this.selector = t0; + this.combinators = t1; + this.span = t2; + }, + ComplexSelectorComponent_toString_closure: function ComplexSelectorComponent_toString_closure() { + }, + CompoundSelector$(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.CompoundSelector(t1, span); + }, + CompoundSelector: function CompoundSelector(t0, t1) { + var _ = this; + _.components = t0; + _.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = _.__CompoundSelector_specificity_FI = $; + _.span = t1; + }, + CompoundSelector_specificity_closure: function CompoundSelector_specificity_closure() { + }, + CompoundSelector_hasComplicatedSuperselectorSemantics_closure: function CompoundSelector_hasComplicatedSuperselectorSemantics_closure() { + }, + IDSelector: function IDSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + IDSelector_unify_closure: function IDSelector_unify_closure(t0) { + this.$this = t0; + }, + SelectorList$(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.SelectorList(t1, span); + }, + SelectorList_SelectorList$parse(contents, allowParent, interpolationMap, logger, plainCss) { + return A.SelectorParser$(contents, allowParent, interpolationMap, logger, plainCss, null).parse$0(0); + }, + SelectorList: function SelectorList(t0, t1) { + this.components = t0; + this.span = t1; + }, + SelectorList_asSassList_closure: function SelectorList_asSassList_closure() { + }, + SelectorList_nestWithin_closure: function SelectorList_nestWithin_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.preserveParentSelectors = t1; + _.implicitParent = t2; + _.parent = t3; + }, + SelectorList_nestWithin__closure: function SelectorList_nestWithin__closure(t0) { + this.complex = t0; + }, + SelectorList_nestWithin__closure0: function SelectorList_nestWithin__closure0(t0) { + this.complex = t0; + }, + SelectorList__nestWithinCompound_closure: function SelectorList__nestWithinCompound_closure() { + }, + SelectorList__nestWithinCompound_closure0: function SelectorList__nestWithinCompound_closure0(t0) { + this.parent = t0; + }, + SelectorList__nestWithinCompound_closure1: function SelectorList__nestWithinCompound_closure1(t0, t1, t2) { + this.parentSelector = t0; + this.resolvedSimples = t1; + this.component = t2; + }, + SelectorList_withAdditionalCombinators_closure: function SelectorList_withAdditionalCombinators_closure(t0) { + this.combinators = t0; + }, + _ParentSelectorVisitor: function _ParentSelectorVisitor() { + }, + __ParentSelectorVisitor_Object_SelectorSearchVisitor: function __ParentSelectorVisitor_Object_SelectorSearchVisitor() { + }, + ParentSelector: function ParentSelector(t0, t1) { + this.suffix = t0; + this.span = t1; + }, + PlaceholderSelector: function PlaceholderSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + PseudoSelector$($name, span, argument, element, selector) { + var t1 = !element, + t2 = t1 && !A.PseudoSelector__isFakePseudoElement($name); + return new A.PseudoSelector($name, A.unvendor($name), t2, t1, argument, selector, span); + }, + PseudoSelector__isFakePseudoElement($name) { + switch ($name.charCodeAt(0)) { + case 97: + case 65: + return A.equalsIgnoreCase($name, "after"); + case 98: + case 66: + return A.equalsIgnoreCase($name, "before"); + case 102: + case 70: + return A.equalsIgnoreCase($name, "first-line") || A.equalsIgnoreCase($name, "first-letter"); + default: + return false; + } + }, + PseudoSelector: function PseudoSelector(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.name = t0; + _.normalizedName = t1; + _.isClass = t2; + _.isSyntacticClass = t3; + _.argument = t4; + _.selector = t5; + _.__PseudoSelector_specificity_FI = $; + _.span = t6; + }, + PseudoSelector_specificity_closure: function PseudoSelector_specificity_closure(t0) { + this.$this = t0; + }, + PseudoSelector_specificity__closure: function PseudoSelector_specificity__closure() { + }, + PseudoSelector_specificity__closure0: function PseudoSelector_specificity__closure0() { + }, + PseudoSelector_unify_closure: function PseudoSelector_unify_closure() { + }, + QualifiedName: function QualifiedName(t0, t1) { + this.name = t0; + this.namespace = t1; + }, + SimpleSelector: function SimpleSelector() { + }, + SimpleSelector_isSuperselector_closure: function SimpleSelector_isSuperselector_closure(t0) { + this.$this = t0; + }, + SimpleSelector_isSuperselector__closure: function SimpleSelector_isSuperselector__closure(t0) { + this.$this = t0; + }, + TypeSelector: function TypeSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + UniversalSelector: function UniversalSelector(t0, t1) { + this.namespace = t0; + this.span = t1; + }, + compileAsync(path, charset, fatalDeprecations, futureDeprecations, importCache, logger, quietDeps, silenceDeprecations, sourceMap, style, syntax, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, t3, t4, t0, stylesheet, result, t1, t2; + var $async$compileAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + t1 = syntax === A.Syntax_forPath(path); + $async$goto = t1 ? 3 : 5; + break; + case 3: + // then + t1 = $.$get$FilesystemImporter_cwd(); + t2 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t2 == null ? null : J.get$platform$x(t2), "win32")) { + t2 = A.isNodeJs() ? self.process : null; + t2 = J.$eq$(t2 == null ? null : J.get$platform$x(t2), "darwin"); + } else + t2 = true; + if (t2) { + t2 = $.$get$context(); + t3 = A._realCasePath(A.absolute(t2.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); + t0 = t3; + t3 = t2; + t2 = t0; + } else { + t2 = $.$get$context(); + t3 = t2.canonicalize$1(0, path); + t0 = t3; + t3 = t2; + t2 = t0; + } + $async$goto = 6; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(t1, t3.toUri$1(t2), t3.toUri$1(path)), $async$compileAsync); + case 6: + // returning from await. + t3 = $async$result; + t3.toString; + stylesheet = t3; + // goto join + $async$goto = 4; + break; + case 5: + // else + t1 = A.readFile(path); + stylesheet = A.Stylesheet_Stylesheet$parse(t1, syntax, logger, $.$get$context().toUri$1(path)); + case 4: + // join + $async$goto = 7; + return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, $.$get$FilesystemImporter_cwd(), null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileAsync); + case 7: + // returning from await. + result = $async$result; + logger.summarize$1$js(false); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileAsync, $async$completer); + }, + compileStringAsync(source, charset, fatalDeprecations, futureDeprecations, importCache, importer, logger, quietDeps, silenceDeprecations, sourceMap, style, syntax, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, t3, t4, stylesheet, result, t1, t2; + var $async$compileStringAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse(source, syntax, logger, null); + $async$goto = 3; + return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, importer, null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileStringAsync); + case 3: + // returning from await. + result = $async$result; + logger.summarize$1$js(false); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStringAsync, $async$completer); + }, + _compileStylesheet0(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, serializeResult, resultSourceMap, $async$temp1; + var $async$_compileStylesheet0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A._EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet0); + case 3: + // returning from await. + serializeResult = $async$temp1.serialize($async$result._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, true); + resultSourceMap = serializeResult._1; + if (resultSourceMap != null) + A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure0(stylesheet, importCache)); + $async$returnValue = new A.CompileResult(serializeResult); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheet0, $async$completer); + }, + _compileStylesheet_closure0: function _compileStylesheet_closure0(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + AsyncEnvironment$() { + var t1 = type$.String, + t2 = type$.Module_AsyncCallable, + t3 = type$.AstNode, + t4 = type$.int, + t5 = type$.AsyncCallable, + t6 = type$.JSArray_Map_String_AsyncCallable; + return new A.AsyncEnvironment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + AsyncEnvironment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.AsyncEnvironment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule0(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty2; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_AsyncCallable, t3 = type$.List_CssComment, t4 = A.MapExtensions_get_pairs(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable0(forwarded); + t3 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure5(), type$.Map_String_Value), type$.Value); + t4 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure6(), type$.Map_String_AstNode), type$.AstNode); + t5 = type$.Map_String_AsyncCallable; + t6 = type$.AsyncCallable; + t7 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure7(), t5), t6); + t6 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure8(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure9()); + return A._EnvironmentModule$_0(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure10())); + }, + _EnvironmentModule__makeModulesByVariable0(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty8; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule0) { + for (t3 = t2._async_environment$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._async_environment$_environment._async_environment$_variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap0(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$(t1, type$.String, $V); + }, + _EnvironmentModule$_0(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule0(_environment._async_environment$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + AsyncEnvironment: function AsyncEnvironment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._async_environment$_modules = t0; + _._async_environment$_namespaceNodes = t1; + _._async_environment$_globalModules = t2; + _._async_environment$_importedModules = t3; + _._async_environment$_forwardedModules = t4; + _._async_environment$_nestedForwardedModules = t5; + _._async_environment$_allModules = t6; + _._async_environment$_variables = t7; + _._async_environment$_variableNodes = t8; + _._async_environment$_variableIndices = t9; + _._async_environment$_functions = t10; + _._async_environment$_functionIndices = t11; + _._async_environment$_mixins = t12; + _._async_environment$_mixinIndices = t13; + _._async_environment$_content = t14; + _._async_environment$_inMixin = false; + _._async_environment$_inSemiGlobalScope = true; + _._async_environment$_lastVariableIndex = _._async_environment$_lastVariableName = null; + }, + AsyncEnvironment__getVariableFromGlobalModule_closure: function AsyncEnvironment__getVariableFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure: function AsyncEnvironment_setVariable_closure(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment_setVariable_closure0: function AsyncEnvironment_setVariable_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure1: function AsyncEnvironment_setVariable_closure1(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment__getFunctionFromGlobalModule_closure: function AsyncEnvironment__getFunctionFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment__getMixinFromGlobalModule_closure: function AsyncEnvironment__getMixinFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment_toModule_closure: function AsyncEnvironment_toModule_closure() { + }, + AsyncEnvironment_toDummyModule_closure: function AsyncEnvironment_toDummyModule_closure() { + }, + _EnvironmentModule0: function _EnvironmentModule0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._async_environment$_environment = t10; + _._async_environment$_modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure5: function _EnvironmentModule__EnvironmentModule_closure5() { + }, + _EnvironmentModule__EnvironmentModule_closure6: function _EnvironmentModule__EnvironmentModule_closure6() { + }, + _EnvironmentModule__EnvironmentModule_closure7: function _EnvironmentModule__EnvironmentModule_closure7() { + }, + _EnvironmentModule__EnvironmentModule_closure8: function _EnvironmentModule__EnvironmentModule_closure8() { + }, + _EnvironmentModule__EnvironmentModule_closure9: function _EnvironmentModule__EnvironmentModule_closure9() { + }, + _EnvironmentModule__EnvironmentModule_closure10: function _EnvironmentModule__EnvironmentModule_closure10() { + }, + AsyncImportCache__toImporters(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_AsyncImporter_2); + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_AsyncImporter_2); + B.JSArray_methods.addAll$1(t1, importers); + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + AsyncImportCache_wrapLogger(logger, silenceDeprecations, fatalDeprecations, futureDeprecations) { + var t3, t4, + t1 = type$.Deprecation, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t4.addAll$1(0, futureDeprecations); + return new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, false); + }, + AsyncImportCache: function AsyncImportCache(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._async_import_cache$_importers = t0; + _._async_import_cache$_logger = t1; + _._async_import_cache$_canonicalizeCache = t2; + _._async_import_cache$_perImporterCanonicalizeCache = t3; + _._async_import_cache$_nonCanonicalRelativeUrls = t4; + _._async_import_cache$_importCache = t5; + _._async_import_cache$_resultsCache = t6; + }, + AsyncImportCache_canonicalize_closure: function AsyncImportCache_canonicalize_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + AsyncImportCache__canonicalize_closure: function AsyncImportCache__canonicalize_closure(t0, t1) { + this.importer = t0; + this.url = t1; + }, + AsyncImportCache_importCanonical_closure: function AsyncImportCache_importCanonical_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + AsyncImportCache_humanize_closure: function AsyncImportCache_humanize_closure(t0) { + this.canonicalUrl = t0; + }, + AsyncImportCache_humanize_closure0: function AsyncImportCache_humanize_closure0() { + }, + AsyncImportCache_humanize_closure1: function AsyncImportCache_humanize_closure1() { + }, + AsyncImportCache_humanize_closure2: function AsyncImportCache_humanize_closure2(t0) { + this.canonicalUrl = t0; + }, + AsyncBuiltInCallable$mixin($name, $arguments, callback, acceptsContent, url) { + return new A.AsyncBuiltInCallable($name, A.ScssParser$("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.AsyncBuiltInCallable$mixin_closure(callback), false); + }, + AsyncBuiltInCallable: function AsyncBuiltInCallable(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _._async_built_in$_arguments = t1; + _._async_built_in$_callback = t2; + _.acceptsContent = t3; + }, + AsyncBuiltInCallable$mixin_closure: function AsyncBuiltInCallable$mixin_closure(t0) { + this.callback = t0; + }, + AsyncBuiltInCallable_withDeprecationWarning_closure: function AsyncBuiltInCallable_withDeprecationWarning_closure(t0, t1, t2) { + this.$this = t0; + this.module = t1; + this.newName = t2; + }, + BuiltInCallable$function($name, $arguments, callback, url) { + return new A.BuiltInCallable($name, A._setArrayType([new A._Record_2(A.ScssParser$("@function " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), callback)], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value), false); + }, + BuiltInCallable$mixin($name, $arguments, callback, acceptsContent, url) { + return new A.BuiltInCallable($name, A._setArrayType([new A._Record_2(A.ScssParser$("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.BuiltInCallable$mixin_closure(callback))], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value), acceptsContent); + }, + BuiltInCallable$overloadedFunction($name, overloads) { + var t2, t3, t4, t5, t6, args, callback, + t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value); + for (t2 = type$.String, t3 = A.MapExtensions_get_pairs(overloads, t2, type$.Value_Function_List_Value), t3 = t3.get$iterator(t3), t4 = "@function " + $name + "(", t5 = type$.VariableDeclaration; t3.moveNext$0();) { + t6 = t3.get$current(t3); + args = t6._0; + callback = t6._1; + t6 = A.SpanScanner$(t4 + args + ") {", null); + t1.push(new A._Record_2(new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t2, t5), t6, B.StderrLogger_false, null).parseArgumentDeclaration$0(), callback)); + } + return new A.BuiltInCallable($name, t1, false); + }, + BuiltInCallable: function BuiltInCallable(t0, t1, t2) { + this.name = t0; + this._overloads = t1; + this.acceptsContent = t2; + }, + BuiltInCallable$mixin_closure: function BuiltInCallable$mixin_closure(t0) { + this.callback = t0; + }, + BuiltInCallable_withDeprecationWarning_closure: function BuiltInCallable_withDeprecationWarning_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.module = t2; + _.newName = t3; + }, + PlainCssCallable: function PlainCssCallable(t0) { + this.name = t0; + }, + UserDefinedCallable: function UserDefinedCallable(t0, t1, t2, t3) { + var _ = this; + _.declaration = t0; + _.environment = t1; + _.inDependency = t2; + _.$ti = t3; + }, + _compileStylesheet(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var serializeResult = A.serialize(A._EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet)._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, true), + resultSourceMap = serializeResult._1; + if (resultSourceMap != null) + A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure(stylesheet, importCache)); + return new A.CompileResult(serializeResult); + }, + _compileStylesheet_closure: function _compileStylesheet_closure(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + CompileResult: function CompileResult(t0) { + this._serialize = t0; + }, + Configuration: function Configuration(t0, t1) { + this._configuration$_values = t0; + this.__originalConfiguration = t1; + }, + ExplicitConfiguration: function ExplicitConfiguration(t0, t1, t2) { + this.nodeWithSpan = t0; + this._configuration$_values = t1; + this.__originalConfiguration = t2; + }, + ConfiguredValue: function ConfiguredValue(t0, t1, t2) { + this.value = t0; + this.configurationSpan = t1; + this.assignmentNode = t2; + }, + Deprecation_fromId(id) { + return A.IterableExtension_firstWhereOrNull(B.List_kyy, new A.Deprecation_fromId_closure(id)); + }, + Deprecation_forVersion(version) { + var t2, _i, deprecation, $self, t3, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t2 = A.VersionRange_VersionRange(true, version).get$allows(), _i = 0; _i < 24; ++_i) { + deprecation = B.List_kyy[_i]; + $self = deprecation._deprecatedIn; + t3 = $self == null ? null : A.Version___parse_tearOff($self); + t3 = t3 == null ? null : t2.call$1(t3); + if (t3 == null ? false : t3) + t1.add$1(0, deprecation); + } + return t1; + }, + Deprecation: function Deprecation(t0, t1, t2, t3) { + var _ = this; + _.id = t0; + _._deprecatedIn = t1; + _.isFuture = t2; + _._name = t3; + }, + Deprecation_fromId_closure: function Deprecation_fromId_closure(t0) { + this.id = t0; + }, + Environment$() { + var t1 = type$.String, + t2 = type$.Module_Callable, + t3 = type$.AstNode, + t4 = type$.int, + t5 = type$.Callable, + t6 = type$.JSArray_Map_String_Callable; + return new A.Environment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + Environment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.Environment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty0; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_Callable, t3 = type$.List_CssComment, t4 = A.MapExtensions_get_pairs(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable(forwarded); + t3 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure(), type$.Map_String_Value), type$.Value); + t4 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure0(), type$.Map_String_AstNode), type$.AstNode); + t5 = type$.Map_String_Callable; + t6 = type$.Callable; + t7 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure1(), t5), t6); + t6 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure2(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure3()); + return A._EnvironmentModule$_(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure4())); + }, + _EnvironmentModule__makeModulesByVariable(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty1; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule) { + for (t3 = t2._modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._environment$_environment._variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$(t1, type$.String, $V); + }, + _EnvironmentModule$_(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule(_environment._allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + Environment: function Environment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._environment$_modules = t0; + _._namespaceNodes = t1; + _._globalModules = t2; + _._importedModules = t3; + _._forwardedModules = t4; + _._nestedForwardedModules = t5; + _._allModules = t6; + _._variables = t7; + _._variableNodes = t8; + _._variableIndices = t9; + _._functions = t10; + _._functionIndices = t11; + _._mixins = t12; + _._mixinIndices = t13; + _._content = t14; + _._inMixin = false; + _._inSemiGlobalScope = true; + _._lastVariableIndex = _._lastVariableName = null; + }, + Environment__getVariableFromGlobalModule_closure: function Environment__getVariableFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment_setVariable_closure: function Environment_setVariable_closure(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment_setVariable_closure0: function Environment_setVariable_closure0(t0) { + this.name = t0; + }, + Environment_setVariable_closure1: function Environment_setVariable_closure1(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment__getFunctionFromGlobalModule_closure: function Environment__getFunctionFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment__getMixinFromGlobalModule_closure: function Environment__getMixinFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment_toModule_closure: function Environment_toModule_closure() { + }, + Environment_toDummyModule_closure: function Environment_toDummyModule_closure() { + }, + _EnvironmentModule: function _EnvironmentModule(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._environment$_environment = t10; + _._modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure: function _EnvironmentModule__EnvironmentModule_closure() { + }, + _EnvironmentModule__EnvironmentModule_closure0: function _EnvironmentModule__EnvironmentModule_closure0() { + }, + _EnvironmentModule__EnvironmentModule_closure1: function _EnvironmentModule__EnvironmentModule_closure1() { + }, + _EnvironmentModule__EnvironmentModule_closure2: function _EnvironmentModule__EnvironmentModule_closure2() { + }, + _EnvironmentModule__EnvironmentModule_closure3: function _EnvironmentModule__EnvironmentModule_closure3() { + }, + _EnvironmentModule__EnvironmentModule_closure4: function _EnvironmentModule__EnvironmentModule_closure4() { + }, + SassException$(message, span, loadedUrls) { + return new A.SassException(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassException$(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassException(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassRuntimeException$(message, span, trace, loadedUrls) { + return new A.SassRuntimeException(trace, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassRuntimeException$(message, span, primaryLabel, secondarySpans, trace, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassRuntimeException(trace, primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassFormatException$(message, span, loadedUrls) { + return new A.SassFormatException(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassFormatException$(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassFormatException(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassScriptException$(message, argumentName) { + return new A.SassScriptException(argumentName == null ? message : "$" + argumentName + ": " + message); + }, + MultiSpanSassScriptException$(message, primaryLabel, secondarySpans) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassScriptException(primaryLabel, t1, message); + }, + SassException: function SassException(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassException: function MultiSpanSassException(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassRuntimeException: function SassRuntimeException(t0, t1, t2, t3) { + var _ = this; + _.trace = t0; + _.loadedUrls = t1; + _._span_exception$_message = t2; + _._span = t3; + }, + MultiSpanSassRuntimeException: function MultiSpanSassRuntimeException(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.trace = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _.loadedUrls = t3; + _._span_exception$_message = t4; + _._span = t5; + }, + SassFormatException: function SassFormatException(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassFormatException: function MultiSpanSassFormatException(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassScriptException: function SassScriptException(t0) { + this.message = t0; + }, + MultiSpanSassScriptException: function MultiSpanSassScriptException(t0, t1, t2) { + this.primaryLabel = t0; + this.secondarySpans = t1; + this.message = t2; + }, + compileStylesheet(options, graph, source, destination, ifModified) { + return A.compileStylesheet$body(options, graph, source, destination, ifModified); + }, + compileStylesheet$body(options, graph, source, destination, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_int_and_String_and_nullable_String), + $async$returnValue, $async$handler = 2, $async$currentError, error, stackTrace, message, error0, stackTrace0, path, message0, exception, t1, $async$exception; + var $async$compileStylesheet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(A._compileStylesheetWithoutErrorHandling(options, graph, source, destination, ifModified), $async$compileStylesheet); + case 7: + // returning from await. + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (destination != null && !options.get$emitErrorCss()) + A._tryDelete(destination); + message = J.toString$1$color$(error, options.get$color()); + if (A._asBool(options._options.$index(0, "trace"))) { + t1 = A.getTrace(error); + if (t1 == null) + t1 = stackTrace; + } else + t1 = null; + $async$returnValue = A._getErrorWithStackTrace(65, message, t1); + // goto return + $async$goto = 1; + break; + } else if (t1 instanceof A.FileSystemException) { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + path = error0.path; + message0 = path == null ? error0.message : "Error reading " + $.$get$context().relative$2$from(path, null) + ": " + error0.message + "."; + if (A._asBool(options._options.$index(0, "trace"))) { + t1 = A.getTrace(error0); + if (t1 == null) + t1 = stackTrace0; + } else + t1 = null; + $async$returnValue = A._getErrorWithStackTrace(66, message0, t1); + // goto return + $async$goto = 1; + break; + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$compileStylesheet, $async$completer); + }, + _compileStylesheetWithoutErrorHandling(options, graph, source, destination, ifModified) { + return A._compileStylesheetWithoutErrorHandling$body(options, graph, source, destination, ifModified); + }, + _compileStylesheetWithoutErrorHandling$body(options, graph, source, destination, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$currentError, syntax, result, importCache, error, t1, exception, t2, t3, t4, t5, t6, t7, t8, t9, t10, result0, t11, t12, t13, t14, logger, stylesheet, t0, css, buffer, sourceName, destinationName, nowStr, timestamp, importer, $async$exception; + var $async$_compileStylesheetWithoutErrorHandling = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + importer = $.$get$FilesystemImporter_cwd(); + if (ifModified) + try { + t1 = false; + if (source != null) + if (destination != null) { + t1 = A.absolute(source, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + t1 = !graph.modifiedSince$3($.$get$context().toUri$1(t1), A.modificationTime(destination), importer); + } + if (t1) { + // goto return + $async$goto = 1; + break; + } + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + syntax = null; + if (A._asBoolQ(options._ifParsed$1("indented")) === true) + syntax = B.Syntax_Sass_sass; + else if (source != null) + syntax = A.Syntax_forPath(source); + else + syntax = B.Syntax_SCSS_scss; + result = null; + $async$handler = 4; + t1 = options._options; + $async$goto = A._asBool(t1.$index(0, "async")) ? 7 : 9; + break; + case 7: + // then + t2 = options.get$pkgImporters(); + t3 = type$.List_String._as(t1.$index(0, "load-path")); + t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t4 = A.AsyncImportCache_wrapLogger(t4, options.get$silenceDeprecations(0), options.get$fatalDeprecations(0), options.get$futureDeprecations(0)); + t5 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl; + t6 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport; + t7 = type$.Uri; + t3 = A.AsyncImportCache__toImporters(t2, t3, null); + importCache = new A.AsyncImportCache(t3, t4, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t5), A.LinkedHashMap_LinkedHashMap$_empty(t6, t5), A.LinkedHashMap_LinkedHashMap$_empty(t6, t7), A.LinkedHashMap_LinkedHashMap$_empty(t7, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t7, type$.ImporterResult)); + $async$goto = source == null ? 10 : 12; + break; + case 10: + // then + $async$goto = 13; + return A._asyncAwait(A.readStdin(), $async$_compileStylesheetWithoutErrorHandling); + case 13: + // returning from await. + t2 = $async$result; + t3 = syntax; + t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t5 = $.$get$FilesystemImporter_cwd(); + t6 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t7 = A._asBool(t1.$index(0, "quiet-deps")); + t8 = A._asBool(t1.$index(0, "verbose")); + t9 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t10 = options.get$silenceDeprecations(0); + $async$goto = 14; + return A._asyncAwait(A.compileStringAsync(t2, t1, options.get$fatalDeprecations(0), options.get$futureDeprecations(0), importCache, t5, t4, t7, t10, t9, t6, t3, t8), $async$_compileStylesheetWithoutErrorHandling); + case 14: + // returning from await. + result0 = $async$result; + // goto join + $async$goto = 11; + break; + case 12: + // else + t2 = syntax; + t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t4 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t5 = A._asBool(t1.$index(0, "quiet-deps")); + t6 = A._asBool(t1.$index(0, "verbose")); + t7 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t8 = options.get$silenceDeprecations(0); + $async$goto = 15; + return A._asyncAwait(A.compileAsync(source, t1, options.get$fatalDeprecations(0), options.get$futureDeprecations(0), importCache, t3, t5, t8, t7, t4, t2, t6), $async$_compileStylesheetWithoutErrorHandling); + case 15: + // returning from await. + result0 = $async$result; + case 11: + // join + result = result0; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = source == null ? 16 : 18; + break; + case 16: + // then + $async$goto = 19; + return A._asyncAwait(A.readStdin(), $async$_compileStylesheetWithoutErrorHandling); + case 19: + // returning from await. + t2 = $async$result; + t3 = syntax; + t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t5 = $.$get$FilesystemImporter_cwd(); + t6 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t7 = A._asBool(t1.$index(0, "quiet-deps")); + t8 = A._asBool(t1.$index(0, "verbose")); + t9 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t10 = options.get$silenceDeprecations(0); + t11 = options.get$fatalDeprecations(0); + t12 = options.get$futureDeprecations(0); + t13 = type$.Deprecation; + t14 = A.LinkedHashSet_LinkedHashSet$_empty(t13); + t14.addAll$1(0, t10); + t10 = A.LinkedHashSet_LinkedHashSet$_empty(t13); + t10.addAll$1(0, t11); + t11 = A.LinkedHashSet_LinkedHashSet$_empty(t13); + t11.addAll$1(0, t12); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t13, type$.int), t4, t14, t10, t11, !t8); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse(t2, t3 == null ? B.Syntax_SCSS_scss : t3, logger, null); + result0 = A._compileStylesheet(stylesheet, logger, graph.importCache, null, t5, null, t6, true, null, null, t7, t9, t1); + logger.summarize$1$js(false); + // goto join + $async$goto = 17; + break; + case 18: + // else + t2 = syntax; + t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + importCache = graph.importCache; + t4 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t5 = A._asBool(t1.$index(0, "quiet-deps")); + t6 = A._asBool(t1.$index(0, "verbose")); + t7 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t8 = options.get$silenceDeprecations(0); + t9 = options.get$fatalDeprecations(0); + t10 = options.get$futureDeprecations(0); + t11 = type$.Deprecation; + t12 = A.LinkedHashSet_LinkedHashSet$_empty(t11); + t12.addAll$1(0, t8); + t8 = A.LinkedHashSet_LinkedHashSet$_empty(t11); + t8.addAll$1(0, t9); + t9 = A.LinkedHashSet_LinkedHashSet$_empty(t11); + t9.addAll$1(0, t10); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t11, type$.int), t3, t12, t8, t9, !t6); + logger.validate$0(); + t3 = t2 == null || t2 === A.Syntax_forPath(source); + if (t3) { + t2 = $.$get$FilesystemImporter_cwd(); + t3 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t3 == null ? null : J.get$platform$x(t3), "win32")) { + t3 = A.isNodeJs() ? self.process : null; + t3 = J.$eq$(t3 == null ? null : J.get$platform$x(t3), "darwin"); + } else + t3 = true; + if (t3) { + t3 = $.$get$context(); + t6 = A._realCasePath(A.absolute(t3.normalize$1(source), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); + t0 = t6; + t6 = t3; + t3 = t0; + } else { + t3 = $.$get$context(); + t6 = t3.canonicalize$1(0, source); + t0 = t6; + t6 = t3; + t3 = t0; + } + t6 = importCache.importCanonical$3$originalUrl(t2, t6.toUri$1(t3), t6.toUri$1(source)); + t6.toString; + stylesheet = t6; + } else { + t3 = A.readFile(source); + if (t2 == null) + t2 = A.Syntax_forPath(source); + stylesheet = A.Stylesheet_Stylesheet$parse(t3, t2, logger, $.$get$context().toUri$1(source)); + } + result0 = A._compileStylesheet(stylesheet, logger, importCache, null, $.$get$FilesystemImporter_cwd(), null, t4, true, null, null, t5, t7, t1); + logger.summarize$1$js(false); + case 17: + // join + result = result0; + case 8: + // join + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + if (options.get$emitErrorCss()) + if (destination == null) + A.print(error.toCssString$0()); + else { + A.ensureDir($.$get$context().dirname$1(destination)); + A.writeFile(destination, error.toCssString$0() + "\n"); + } + throw $async$exception; + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + css = result._serialize._0 + A._writeSourceMap(options, result._serialize._1, destination); + if (destination == null) { + if (css.length !== 0) + A.print(css); + } else { + A.ensureDir($.$get$context().dirname$1(destination)); + A.writeFile(destination, css + "\n"); + } + t1 = options._options; + if (!A._asBool(t1.$index(0, "quiet"))) + t1 = !A._asBool(t1.$index(0, "update")) && !A._asBool(t1.$index(0, "watch")); + else + t1 = true; + if (t1) { + // goto return + $async$goto = 1; + break; + } + buffer = new A.StringBuffer(""); + if (source == null) + sourceName = "stdin"; + else { + t1 = $.$get$context(); + sourceName = t1.prettyUri$1(t1.toUri$1(source)); + } + destination.toString; + t1 = $.$get$context(); + destinationName = t1.prettyUri$1(t1.toUri$1(destination)); + nowStr = new A.DateTime(Date.now(), 0, false).toString$0(0); + timestamp = B.JSString_methods.substring$2(nowStr, 0, nowStr.length - 7); + t1 = options.get$color() ? buffer._contents = "" + "\x1b[90m" : ""; + t1 = buffer._contents = t1 + ("[" + timestamp + "] "); + if (options.get$color()) + t1 = buffer._contents = t1 + "\x1b[32m"; + t1 += "Compiled " + sourceName + " to " + destinationName + "."; + buffer._contents = t1; + if (options.get$color()) + buffer._contents = t1 + "\x1b[0m"; + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) { + t1 = J.get$stdout$x(t1); + J.write$1$x(t1, buffer.toString$0(0) + "\n"); + } else { + t1 = self.console; + J.log$1$x(t1, buffer); + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheetWithoutErrorHandling, $async$completer); + }, + _writeSourceMap(options, sourceMap, destination) { + var t1, sourceMapText, url, sourceMapPath, t2, escapedUrl; + if (sourceMap == null) + return ""; + if (destination != null) { + t1 = $.$get$context(); + sourceMap.targetUrl = t1.toUri$1(A.ParsedPath_ParsedPath$parse(destination, t1.style).get$basename()).toString$0(0); + } + A.mapInPlace(sourceMap.urls, new A._writeSourceMap_closure(options, destination)); + t1 = options._options; + sourceMapText = B.C_JsonCodec.encode$2$toEncodable(sourceMap.toJson$1$includeSourceContents(A._asBool(t1.$index(0, "embed-sources"))), null); + if (A._asBool(t1.$index(0, "embed-source-map"))) + url = A.Uri_Uri$dataFromString(sourceMapText, B.C_Utf8Codec, "application/json"); + else { + destination.toString; + sourceMapPath = destination + ".map"; + t2 = $.$get$context(); + A.ensureDir(t2.dirname$1(sourceMapPath)); + A.writeFile(sourceMapPath, sourceMapText); + url = t2.toUri$1(t2.relative$2$from(sourceMapPath, t2.dirname$1(destination))); + } + t2 = url.toString$0(0); + escapedUrl = A.stringReplaceAllUnchecked(t2, "*/", "%2A/"); + t1 = (J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0) === B.OutputStyle_1 ? "" : "\n\n"; + return t1 + ("/*# sourceMappingURL=" + escapedUrl + " */"); + }, + _tryDelete(path) { + var exception; + try { + A.deleteFile(path); + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + }, + _getErrorWithStackTrace(exitCode, error, stackTrace) { + return new A._Record_3(exitCode, error, stackTrace != null ? B.JSString_methods.trimRight$0(A.Trace_Trace$from(stackTrace).get$terse().toString$0(0)) : null); + }, + _writeSourceMap_closure: function _writeSourceMap_closure(t0, t1) { + this.options = t0; + this.destination = t1; + }, + ExecutableOptions__separator(text) { + var t1 = $.$get$ExecutableOptions__separatorBar(), + t2 = B.JSString_methods.$mul(t1, 3), + t3 = A.hasTerminal() ? "\x1b[1m" : "", + t4 = A.hasTerminal() ? "\x1b[0m" : ""; + return t2 + " " + t3 + text + t4 + " " + B.JSString_methods.$mul(t1, 35 - text.length); + }, + ExecutableOptions__fail(message) { + return A.throwExpression(A.UsageException$(message)); + }, + ExecutableOptions_ExecutableOptions$parse(args) { + var options, error, t1, t2, exception; + try { + t1 = $.$get$ExecutableOptions__parser(); + t2 = A.ListQueue$(type$.String); + t2.addAll$1(0, args); + t2 = A.Parser$(null, t1, t2, null, null).parse$0(0); + if (t2.wasParsed$1("poll") && !A._asBool(t2.$index(0, "watch"))) + A.ExecutableOptions__fail("--poll may not be passed without --watch."); + options = new A.ExecutableOptions(t2); + if (A._asBool(options._options.$index(0, "help"))) + A.ExecutableOptions__fail("Compile Sass to CSS."); + return options; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + error = t1; + A.ExecutableOptions__fail(J.get$message$x(error)); + } else + throw exception; + } + }, + UsageException$(message) { + return new A.UsageException(message); + }, + ExecutableOptions: function ExecutableOptions(t0) { + var _ = this; + _._options = t0; + _.__ExecutableOptions_interactive_FI = $; + _._sourcesToDestinations = null; + _.__ExecutableOptions__sourceDirectoriesToDestinations_F = $; + _._fatalDeprecations = null; + }, + ExecutableOptions__parser_closure: function ExecutableOptions__parser_closure() { + }, + ExecutableOptions_interactive_closure: function ExecutableOptions_interactive_closure(t0) { + this.$this = t0; + }, + ExecutableOptions_emitErrorCss_closure: function ExecutableOptions_emitErrorCss_closure() { + }, + ExecutableOptions_fatalDeprecations_closure: function ExecutableOptions_fatalDeprecations_closure(t0) { + this.$this = t0; + }, + UsageException: function UsageException(t0) { + this.message = t0; + }, + watch(options, graph) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, t1, t2, t3, t4, t5, t6, dirWatcher, sourcesToDestinations, t0; + var $async$watch = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + options._ensureSources$0(); + t1 = options.__ExecutableOptions__sourceDirectoriesToDestinations_F; + t1 === $ && A.throwUnnamedLateFieldNI(); + t2 = type$.String; + t1 = t1.cast$2$0(0, t2, t2); + t1 = A.List_List$of(t1.get$keys(t1), true, t2); + for (options._ensureSources$0(), t3 = options._sourcesToDestinations.cast$2$0(0, t2, t2), t3 = J.get$iterator$ax(t3.get$keys(t3)); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t1.push($.$get$context().dirname$1(t4)); + } + t3 = options._options; + B.JSArray_methods.addAll$1(t1, type$.List_String._as(t3.$index(0, "load-path"))); + t4 = A._asBool(t3.$index(0, "poll")); + t5 = type$.Stream_WatchEvent; + t6 = A.PathMap__create(null, t5); + t5 = new A.StreamGroup(B._StreamGroupState_dormant, A.LinkedHashMap_LinkedHashMap$_empty(t5, type$.nullable_StreamSubscription_WatchEvent), type$.StreamGroup_WatchEvent); + t5.__StreamGroup__controller_A = A.StreamController_StreamController(t5.get$_onCancel(), t5.get$_onListen(), t5.get$_onPause(), t5.get$_onResume(), true, type$.WatchEvent); + dirWatcher = new A.MultiDirWatcher(new A.PathMap(t6, type$.PathMap_Stream_WatchEvent), t5, t4); + $async$goto = 3; + return A._asyncAwait(A.Future_wait(new A.MappedListIterable(t1, new A.watch_closure(dirWatcher), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Future<~>>")), false, type$.void), $async$watch); + case 3: + // returning from await. + options._ensureSources$0(); + sourcesToDestinations = options._sourcesToDestinations.cast$2$0(0, t2, t2); + for (t1 = J.get$iterator$ax(sourcesToDestinations.get$keys(sourcesToDestinations)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + t4 = $.$get$FilesystemImporter_cwd(); + t5 = self.process; + if (t5 == null) + t5 = null; + else { + t5 = J.get$release$x(t5); + t5 = t5 == null ? null : J.get$name$x(t5); + } + t5 = J.$eq$(t5, "node") ? self.process : null; + if (!J.$eq$(t5 == null ? null : J.get$platform$x(t5), "win32")) { + t5 = self.process; + if (t5 == null) + t5 = null; + else { + t5 = J.get$release$x(t5); + t5 = t5 == null ? null : J.get$name$x(t5); + } + t5 = J.$eq$(t5, "node") ? self.process : null; + t5 = J.$eq$(t5 == null ? null : J.get$platform$x(t5), "darwin"); + } else + t5 = true; + if (t5) { + t5 = $.$get$context(); + t6 = A._realCasePath(t5.absolute$15(t5.normalize$1(t2), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); + t0 = t6; + t6 = t5; + t5 = t0; + } else { + t5 = $.$get$context(); + t6 = t5.canonicalize$1(0, t2); + t0 = t6; + t6 = t5; + t5 = t0; + } + graph.addCanonical$4$recanonicalize(t4, t6.toUri$1(t5), t6.toUri$1(t2), false); + } + $async$goto = 4; + return A._asyncAwait(A.compileStylesheets(options, graph, sourcesToDestinations, true), $async$watch); + case 4: + // returning from await. + if (!$async$result && A._asBool(t3.$index(0, "stop-on-error"))) { + t1 = dirWatcher._group.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$1(0, null).cancel$0(); + // goto return + $async$goto = 1; + break; + } + A.print("Sass is watching for changes. Press Ctrl-C to stop.\n"); + $async$goto = 5; + return A._asyncAwait(new A._Watcher(options, graph).watch$1(0, dirWatcher), $async$watch); + case 5: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$watch, $async$completer); + }, + watch_closure: function watch_closure(t0) { + this.dirWatcher = t0; + }, + _Watcher: function _Watcher(t0, t1) { + this._watch$_options = t0; + this._graph = t1; + }, + _Watcher__debounceEvents_closure: function _Watcher__debounceEvents_closure() { + }, + EmptyExtensionStore: function EmptyExtensionStore() { + }, + Extension: function Extension(t0, t1, t2, t3, t4) { + var _ = this; + _.extender = t0; + _.target = t1; + _.mediaContext = t2; + _.isOptional = t3; + _.span = t4; + }, + Extender: function Extender(t0, t1) { + this.selector = t0; + this.isOriginal = t1; + this._extension = null; + }, + ExtensionStore__extendOrReplace(selector, source, targets, mode, span) { + var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, compound, t9, t10, t11, _i0, simple, t12, _i1, t13, t14, + extender = A.ExtensionStore$_mode(mode); + if (!selector.accept$1(B._IsInvisibleVisitor_true)) + extender._originals.addAll$1(0, selector.components); + for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector, t6 = type$.Extension, t7 = type$.SimpleSelector, t8 = type$.Map_ComplexSelector_Extension, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassScriptException$("Can't extend complex selector " + A.S(complex) + ".", null)); + t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); + for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { + simple = t10[_i0]; + t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); + for (_i1 = 0; _i1 < t4; ++_i1) { + complex = t3[_i1]; + complex.get$specificity(); + t13 = new A.Extender(complex, false); + t14 = new A.Extension(t13, simple, null, true, span); + t13._extension = t14; + t12.$indexSet(0, complex, t14); + } + t9.$indexSet(0, simple, t12); + } + selector = extender._extendList$2(selector, t9); + } + return selector; + }, + ExtensionStore$() { + var t1 = type$.SimpleSelector; + return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), B.ExtendMode_normal_normal); + }, + ExtensionStore$_mode(_mode) { + var t1 = type$.SimpleSelector; + return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), _mode); + }, + ExtensionStore: function ExtensionStore(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._selectors = t0; + _._extensions = t1; + _._extensionsByExtender = t2; + _._mediaContexts = t3; + _._sourceSpecificity = t4; + _._originals = t5; + _._mode = t6; + }, + ExtensionStore_extensionsWhereTarget_closure: function ExtensionStore_extensionsWhereTarget_closure() { + }, + ExtensionStore__registerSelector_closure: function ExtensionStore__registerSelector_closure() { + }, + ExtensionStore_addExtension_closure: function ExtensionStore_addExtension_closure() { + }, + ExtensionStore_addExtension_closure0: function ExtensionStore_addExtension_closure0() { + }, + ExtensionStore_addExtension_closure1: function ExtensionStore_addExtension_closure1(t0) { + this.complex = t0; + }, + ExtensionStore__extendExistingExtensions_closure: function ExtensionStore__extendExistingExtensions_closure() { + }, + ExtensionStore__extendExistingExtensions_closure0: function ExtensionStore__extendExistingExtensions_closure0() { + }, + ExtensionStore_addExtensions_closure: function ExtensionStore_addExtensions_closure() { + }, + ExtensionStore__extendComplex_closure: function ExtensionStore__extendComplex_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendComplex__closure: function ExtensionStore__extendComplex__closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendCompound_closure: function ExtensionStore__extendCompound_closure() { + }, + ExtensionStore__extendCompound_closure0: function ExtensionStore__extendCompound_closure0() { + }, + ExtensionStore__extendCompound_closure1: function ExtensionStore__extendCompound_closure1(t0) { + this.original = t0; + }, + ExtensionStore__extendSimple_withoutPseudo: function ExtensionStore__extendSimple_withoutPseudo(t0, t1, t2) { + this.$this = t0; + this.extensions = t1; + this.targetsUsed = t2; + }, + ExtensionStore__extendSimple_closure: function ExtensionStore__extendSimple_closure(t0, t1) { + this.$this = t0; + this.withoutPseudo = t1; + }, + ExtensionStore__extendSimple_closure0: function ExtensionStore__extendSimple_closure0() { + }, + ExtensionStore__extendPseudo_closure: function ExtensionStore__extendPseudo_closure() { + }, + ExtensionStore__extendPseudo_closure0: function ExtensionStore__extendPseudo_closure0() { + }, + ExtensionStore__extendPseudo_closure1: function ExtensionStore__extendPseudo_closure1() { + }, + ExtensionStore__extendPseudo_closure2: function ExtensionStore__extendPseudo_closure2(t0) { + this.pseudo = t0; + }, + ExtensionStore__extendPseudo_closure3: function ExtensionStore__extendPseudo_closure3(t0, t1) { + this.pseudo = t0; + this.selector = t1; + }, + ExtensionStore__trim_closure: function ExtensionStore__trim_closure(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore__trim_closure0: function ExtensionStore__trim_closure0(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore_clone_closure: function ExtensionStore_clone_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.newSelectors = t1; + _.oldToNewSelectors = t2; + _.newMediaContexts = t3; + }, + unifyComplex(complexes, span) { + var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, _0_6_isSet, _0_6, t5, newLeadingCombinator, base, _1_1, newTrailingCombinator, _i, t6, t7, t8, _null = null, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) + return complexes; + for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.accept$1(B.C__IsUselessVisitor)) + return _null; + t4 = t3.components; + _0_6_isSet = t4.length === 1; + if (_0_6_isSet) { + _0_6 = t3.leadingCombinators; + t5 = _0_6.length === 1; + } else { + _0_6 = _null; + t5 = false; + } + if (t5) { + newLeadingCombinator = (_0_6_isSet ? _0_6 : t3.leadingCombinators)[0]; + if (leadingCombinator == null) + leadingCombinator = newLeadingCombinator; + else if (!(leadingCombinator.$ti._is(newLeadingCombinator) && J.$eq$(newLeadingCombinator.value, leadingCombinator.value))) + return _null; + } + base = B.JSArray_methods.get$last(t4); + _1_1 = base.combinators; + if (_1_1.length === 1) { + newTrailingCombinator = _1_1[0]; + if (trailingCombinator != null) + t3 = !(trailingCombinator.$ti._is(newTrailingCombinator) && J.$eq$(newTrailingCombinator.value, trailingCombinator.value)); + else + t3 = false; + if (t3) + return _null; + trailingCombinator = newTrailingCombinator; + } + if (unifiedBase == null) + unifiedBase = base.selector.components; + else + for (t3 = base.selector.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + unifiedBase = t3[_i].unify$1(unifiedBase); + if (unifiedBase == null) + return _null; + } + } + t2 = type$.JSArray_ComplexSelector; + t3 = A._setArrayType([], t2); + for (t4 = t1.get$iterator(complexes); t4.moveNext$0();) { + t5 = t4.get$current(t4); + t6 = t5.components; + t7 = t6.length; + if (t7 > 1) { + t8 = t5.leadingCombinators; + t3.push(A.ComplexSelector$(t8, B.JSArray_methods.take$1(t6, t7 - 1), t5.span, t5.lineBreak)); + } + } + t4 = leadingCombinator == null ? B.List_empty0 : A._setArrayType([leadingCombinator], type$.JSArray_CssValue_Combinator); + unifiedBase.toString; + t5 = A.CompoundSelector$(unifiedBase, span); + t6 = trailingCombinator == null ? B.List_empty0 : A._setArrayType([trailingCombinator], type$.JSArray_CssValue_Combinator); + base = A.ComplexSelector$(t4, A._setArrayType([new A.ComplexSelectorComponent(t5, A.List_List$unmodifiable(t6, type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent), span, t1.any$1(complexes, new A.unifyComplex_closure())); + if (t3.length === 0) + t1 = A._setArrayType([base], t2); + else { + t1 = A.List_List$of(A.IterableExtension_get_exceptLast(t3), true, type$.ComplexSelector); + t1.push(B.JSArray_methods.get$last(t3).concatenate$2(base, span)); + } + return A.weave(t1, span, false); + }, + unifyCompound(compound1, compound2) { + var t1, t2, _i, unified, + result = compound2.components; + for (t1 = compound1.components, t2 = t1.length, _i = 0; _i < t2; ++_i, result = unified) { + unified = t1[_i].unify$1(result); + if (unified == null) + return null; + } + return A.CompoundSelector$(result, compound1.span); + }, + unifyUniversalAndElement(selector1, selector2) { + var namespace, $name, t1, + _0_0 = A._namespaceAndName(selector1, "selector1"), + namespace1 = _0_0._0, + name1 = _0_0._1, + _1_0 = A._namespaceAndName(selector2, "selector2"), + namespace2 = _1_0._0, + name2 = _1_0._1; + if (namespace1 == namespace2 || namespace2 === "*") + namespace = namespace1; + else { + if (namespace1 !== "*") + return null; + namespace = namespace2; + } + if (name1 == name2 || name2 == null) + $name = name1; + else { + if (!(name1 == null || name1 === "*")) + return null; + $name = name2; + } + t1 = selector1.span; + return $name == null ? new A.UniversalSelector(namespace, t1) : new A.TypeSelector(new A.QualifiedName($name, namespace), t1); + }, + _namespaceAndName(selector, $name) { + var t1, _0_4; + $label0$0: { + if (selector instanceof A.UniversalSelector) { + t1 = new A._Record_2(selector.namespace, null); + break $label0$0; + } + if (selector instanceof A.TypeSelector) { + _0_4 = selector.name; + t1 = new A._Record_2(_0_4.namespace, _0_4.name); + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$value(selector, $name, string$.must_b)); + } + return t1; + }, + weave(complexes, span, forceLineBreak) { + var complex, t2, prefixes, t3, t4, t5, t6, i, t7, t8, _i, t9, t10, _i0, parentPrefix, t11, t12, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) { + complex = t1.$index(complexes, 0); + if (!forceLineBreak || complex.lineBreak) + return complexes; + return A._setArrayType([A.ComplexSelector$(complex.leadingCombinators, complex.components, complex.span, true)], type$.JSArray_ComplexSelector); + } + t2 = type$.JSArray_ComplexSelector; + prefixes = A._setArrayType([t1.get$first(complexes)], t2); + for (t1 = t1.skip$1(complexes, 1), t3 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t3._eval$1("ListIterator")), t4 = type$.ComplexSelectorComponent, t3 = t3._eval$1("ListIterable.E"); t1.moveNext$0();) { + t5 = t1.__internal$_current; + if (t5 == null) + t5 = t3._as(t5); + t6 = t5.components; + if (t6.length === 1) { + for (i = 0; i < prefixes.length; ++i) + prefixes[i] = prefixes[i].concatenate$3$forceLineBreak(t5, span, forceLineBreak); + continue; + } + t7 = A._setArrayType([], t2); + for (t8 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t8 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { + t9 = A._weaveParents(prefixes[_i], t5, span); + if (t9 == null) + t9 = B.List_empty1; + t10 = t9.length; + _i0 = 0; + for (; _i0 < t9.length; t9.length === t10 || (0, A.throwConcurrentModificationError)(t9), ++_i0) { + parentPrefix = t9[_i0]; + t11 = B.JSArray_methods.get$last(t6); + t12 = A.List_List$of(parentPrefix.components, true, t4); + t12.push(t11); + t11 = parentPrefix.lineBreak || forceLineBreak; + t7.push(A.ComplexSelector$(parentPrefix.leadingCombinators, t12, span, t11)); + } + } + prefixes = t7; + } + return prefixes; + }, + _weaveParents(prefix, base, span) { + var t1, queue1, queue2, trailingCombinators, _0_1, _0_3, _0_3_isSet, _0_30, rootish2, t2, rootish1, rootish, t3, rootish_case_0, t0, rootish_case_1, groups1, groups2, lcs, choices, t4, _i, group, t5, t6, t7, _i0, chunk, t8, t9, _null = null, + leadingCombinators = A._mergeLeadingCombinators(prefix.leadingCombinators, base.leadingCombinators); + if (leadingCombinators == null) + return _null; + t1 = type$.ComplexSelectorComponent; + queue1 = A.QueueList_QueueList$from(prefix.components, t1); + queue2 = A.QueueList_QueueList$from(A.IterableExtension_get_exceptLast(base.components), t1); + trailingCombinators = A._mergeTrailingCombinators(queue1, queue2, span, _null); + if (trailingCombinators == null) + return _null; + $label0$0: { + _0_1 = A._firstIfRootish(queue1); + _0_3 = A._firstIfRootish(queue2); + _0_3_isSet = _0_1 != null; + _0_30 = _null; + rootish2 = _null; + t2 = false; + if (_0_3_isSet) { + rootish1 = _0_1 == null ? t1._as(_0_1) : _0_1; + t2 = _0_3 != null; + if (t2) + rootish2 = _0_3 == null ? t1._as(_0_3) : _0_3; + _0_30 = _0_3; + } else + rootish1 = _null; + if (t2) { + rootish = A.unifyCompound(rootish1.selector, rootish2.selector); + if (rootish == null) + return _null; + t1 = rootish1.combinators; + t2 = rootish1.span; + t3 = type$.CssValue_Combinator; + queue1.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(t1, t3), t2)); + queue2.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(rootish2.combinators, t3), t2)); + break $label0$0; + } + t2 = _null; + t3 = false; + if (_0_1 != null) { + rootish_case_0 = _0_1; + if (_0_3_isSet) + t2 = _0_30; + else { + t2 = _0_3; + _0_30 = t2; + _0_3_isSet = true; + } + t2 = t2 == null; + t3 = t2 ? rootish_case_0 : _null; + t0 = t3; + t3 = t2; + t2 = t0; + } + if (!t3) + if (_0_1 == null) { + if (_0_3_isSet) + t3 = _0_30; + else { + t3 = _0_3; + _0_30 = t3; + _0_3_isSet = true; + } + t3 = t3 != null; + if (t3) { + rootish_case_1 = _0_3_isSet ? _0_30 : _0_3; + if (rootish_case_1 == null) + rootish_case_1 = t1._as(rootish_case_1); + t1 = rootish_case_1; + } else + t1 = t2; + t2 = t3; + } else { + t1 = t2; + t2 = false; + } + else { + t1 = t2; + t2 = true; + } + if (t2) { + queue1.addFirst$1(t1); + queue2.addFirst$1(t1); + } + } + groups1 = A._groupSelectors(queue1); + groups2 = A._groupSelectors(queue2); + t1 = type$.List_ComplexSelectorComponent; + lcs = A.longestCommonSubsequence(groups2, groups1, new A._weaveParents_closure(span), t1); + choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent); + for (t2 = lcs.length, t3 = type$.JSArray_Iterable_ComplexSelectorComponent, t4 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < lcs.length; lcs.length === t2 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { + group = lcs[_i]; + t5 = A._setArrayType([], t3); + for (t6 = A._chunks(groups1, groups2, new A._weaveParents_closure0(group), t1), t7 = t6.length, _i0 = 0; _i0 < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i0) { + chunk = t6[_i0]; + t8 = A._setArrayType([], t4); + for (t9 = B.JSArray_methods.get$iterator(chunk); t9.moveNext$0();) + B.JSArray_methods.addAll$1(t8, t9.get$current(0)); + t5.push(t8); + } + choices.push(t5); + choices.push(A._setArrayType([group], t3)); + groups1.removeFirst$0(); + groups2.removeFirst$0(); + } + t2 = A._setArrayType([], t3); + for (t1 = A._chunks(groups1, groups2, new A._weaveParents_closure1(), t1), t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + chunk = t1[_i]; + t5 = A._setArrayType([], t4); + for (t6 = B.JSArray_methods.get$iterator(chunk); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t5, t6.get$current(0)); + t2.push(t5); + } + choices.push(t2); + B.JSArray_methods.addAll$1(choices, trailingCombinators); + t1 = A._setArrayType([], type$.JSArray_ComplexSelector); + for (t2 = J.get$iterator$ax(A.paths(new A.WhereIterable(choices, new A._weaveParents_closure2(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent), type$.Iterable_ComplexSelectorComponent)), t3 = !prefix.lineBreak, t5 = base.lineBreak; t2.moveNext$0();) { + t6 = t2.get$current(t2); + t7 = A._setArrayType([], t4); + for (t6 = J.get$iterator$ax(t6); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t7, t6.get$current(t6)); + t1.push(A.ComplexSelector$(leadingCombinators, t7, span, !t3 || t5)); + } + return t1; + }, + _firstIfRootish(queue) { + var first, t1, t2, _i, simple, t3; + if (queue.get$length(0) >= 1) { + first = queue.$index(0, 0); + for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + t3 = false; + if (simple instanceof A.PseudoSelector) + if (simple.isClass) + t3 = $._rootishPseudoClasses.contains$1(0, simple.normalizedName); + if (t3) { + queue.removeFirst$0(); + return first; + } + } + } + return null; + }, + _mergeLeadingCombinators(combinators1, combinators2) { + var _0_4, t1, t2, _0_7_isSet, _0_7, t3, _0_4_isSet, _0_11, _0_11_isSet, combinators, _null = null; + $label0$0: { + _0_4 = combinators2; + t1 = _null; + t2 = type$.List_CssValue_Combinator; + _0_7_isSet = t2._is(combinators1); + _0_7 = _null; + if (_0_7_isSet) { + _0_7 = combinators1.length; + t3 = _0_7; + t3 = t3 > 1; + } else + t3 = false; + _0_4_isSet = true; + _0_11 = _null; + if (!t3) { + t3 = _0_4; + _0_11_isSet = t2._is(t3); + if (_0_11_isSet) { + t3 = _0_4; + _0_11 = (t3 == null ? t2._as(t3) : t3).length; + t3 = _0_11; + t3 = t3 > 1; + } else + t3 = false; + } else { + _0_11_isSet = false; + t3 = true; + } + if (t3) + break $label0$0; + if (t2._is(combinators1)) { + if (_0_7_isSet) + t3 = _0_7; + else { + _0_7 = combinators1.length; + t3 = _0_7; + } + t3 = t3 <= 0; + if (t3) + if (_0_4_isSet) + combinators = _0_4; + else { + combinators = combinators2; + _0_4 = combinators; + _0_4_isSet = true; + } + else + combinators = t1; + t1 = t3; + } else { + combinators = t1; + t1 = false; + } + if (!t1) { + t1 = false; + if (_0_4_isSet) + t3 = _0_4; + else { + t3 = combinators2; + _0_4 = t3; + _0_4_isSet = true; + } + if (t2._is(t3)) { + if (_0_11_isSet) + t1 = _0_11; + else { + t1 = _0_4_isSet ? _0_4 : combinators2; + _0_11 = (t1 == null ? t2._as(t1) : t1).length; + t1 = _0_11; + } + t1 = t1 <= 0; + } + combinators = combinators1; + } else + t1 = true; + if (t1) { + t1 = combinators; + break $label0$0; + } + t1 = B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; + break $label0$0; + } + return t1; + }, + _mergeTrailingCombinators(components1, components2, span, result) { + var _0_1, t1, _1_1, t2, t3, _4_1, _4_3, _4_4_isSet, _4_5, _4_4, component1, component2, t4, t5, choices, _2_0, _4_9, _4_6, _4_7, followingComponents, nextComponents, _4_4_isSet0, _4_6_isSet, _4_7_isSet, _4_10_isSet, _4_10, _4_5_isSet, next, following, _3_0, siblingComponents_case_0, siblingComponents_case_1, combinator1, t6, combinator2, unified, t7, combinator_case_0, combinatorComponents_case_0, descendantComponents_case_0, t0, combinator_case_1, descendantComponents_case_1, combinatorComponents_case_1, _null = null; + if (result == null) + result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent); + $label0$0: { + _0_1 = components1.get$length(0); + if (_0_1 >= 1) { + t1 = components1.$index(0, _0_1 - 1).combinators; + break $label0$0; + } + t1 = B.List_empty0; + break $label0$0; + } + $label1$1: { + _1_1 = components2.get$length(0); + if (_1_1 >= 1) { + t2 = components2.$index(0, _1_1 - 1).combinators; + break $label1$1; + } + t2 = B.List_empty0; + break $label1$1; + } + t3 = t1.length; + if (t3 === 0 && t2.length === 0) + return result; + if (t3 > 1 || t2.length > 1) + return _null; + $label2$2: { + t3 = A.IterableExtension_get_firstOrNull(t1); + t3 = t3 == null ? _null : t3.value; + t2 = A.IterableExtension_get_firstOrNull(t2); + t2 = [t3, t2 == null ? _null : t2.value, components1, components2]; + _4_1 = t2[0]; + _4_3 = B.Combinator_y18 === _4_1; + _4_4_isSet = _4_3; + _4_5 = _null; + _4_4 = _null; + if (_4_4_isSet) { + _4_4 = t2[1]; + _4_5 = B.Combinator_y18 === _4_4; + t3 = _4_5; + } else + t3 = false; + if (t3) { + component1 = components1.removeLast$0(0); + component2 = components2.removeLast$0(0); + t2 = component1.selector; + t3 = component2.selector; + if (A.compoundIsSuperselector(t2, t3, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + else { + t4 = type$.JSArray_ComplexSelectorComponent; + t5 = type$.JSArray_List_ComplexSelectorComponent; + if (A.compoundIsSuperselector(t3, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component1], t4)], t5)); + else { + choices = A._setArrayType([A._setArrayType([component1, component2], t4), A._setArrayType([component2, component1], t4)], t5); + _2_0 = A.unifyCompound(t2, t3); + if (_2_0 != null) + choices.push(A._setArrayType([new A.ComplexSelectorComponent(_2_0, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator), type$.CssValue_Combinator), span)], t4)); + result.addFirst$1(choices); + } + } + break $label2$2; + } + _4_9 = _null; + _4_6 = _null; + _4_7 = _null; + followingComponents = _null; + nextComponents = _null; + if (_4_3) { + if (_4_4_isSet) { + t3 = _4_4; + _4_4_isSet0 = _4_4_isSet; + } else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet0 = true; + } + _4_9 = B.Combinator_gRV === t3; + _4_6_isSet = _4_9; + if (_4_6_isSet) { + _4_6 = t2[2]; + _4_7 = t2[3]; + nextComponents = _4_7; + followingComponents = _4_6; + } + t3 = _4_6_isSet; + _4_7_isSet = t3; + } else { + _4_4_isSet0 = _4_4_isSet; + _4_6_isSet = false; + _4_7_isSet = false; + t3 = false; + } + _4_10_isSet = !t3; + _4_10 = _null; + if (_4_10_isSet) { + _4_10 = B.Combinator_gRV === _4_1; + t3 = _4_10; + if (t3) { + if (_4_4_isSet) { + t3 = _4_5; + _4_5_isSet = _4_4_isSet; + _4_4_isSet = _4_4_isSet0; + } else { + if (_4_4_isSet0) { + t3 = _4_4; + _4_4_isSet = _4_4_isSet0; + } else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet = true; + } + _4_5 = B.Combinator_y18 === t3; + t3 = _4_5; + _4_5_isSet = true; + } + if (t3) { + if (_4_6_isSet) + nextComponents = _4_6; + else { + _4_6 = t2[2]; + nextComponents = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + followingComponents = _4_7; + else { + _4_7 = t2[3]; + followingComponents = _4_7; + _4_7_isSet = true; + } + } + } else { + _4_5_isSet = _4_4_isSet; + _4_4_isSet = _4_4_isSet0; + t3 = false; + } + } else { + _4_5_isSet = _4_4_isSet; + _4_4_isSet = _4_4_isSet0; + t3 = true; + } + if (t3) { + next = nextComponents.removeLast$0(0); + following = followingComponents.removeLast$0(0); + t1 = following.selector; + t2 = next.selector; + t3 = type$.JSArray_ComplexSelectorComponent; + t4 = type$.JSArray_List_ComplexSelectorComponent; + if (A.compoundIsSuperselector(t1, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([next], t3)], t4)); + else { + t4 = A._setArrayType([A._setArrayType([following, next], t3)], t4); + _3_0 = A.unifyCompound(t1, t2); + if (_3_0 != null) + t4.push(A._setArrayType([new A.ComplexSelectorComponent(_3_0, A.List_List$unmodifiable(next.combinators, type$.CssValue_Combinator), span)], t3)); + result.addFirst$1(t4); + } + break $label2$2; + } + t3 = _null; + if (B.Combinator_8I8 === _4_1) { + _4_4_isSet0 = true; + if (_4_3) + t4 = _4_9; + else { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_9 = B.Combinator_gRV === t4; + t4 = _4_9; + } + if (!t4) + if (_4_5_isSet) + t4 = _4_5; + else { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_5 = B.Combinator_y18 === t4; + t4 = _4_5; + } + else + t4 = true; + if (t4) { + if (_4_7_isSet) + siblingComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + siblingComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t3 = siblingComponents_case_0; + } + } else + t4 = false; + if (!t4) { + if (_4_10_isSet) + t4 = _4_10; + else { + _4_10 = B.Combinator_gRV === _4_1; + t4 = _4_10; + } + if (!t4) + t4 = _4_3; + else + t4 = true; + if (t4) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = B.Combinator_8I8 === t4; + if (t4) { + if (_4_6_isSet) + siblingComponents_case_1 = _4_6; + else { + _4_6 = t2[2]; + siblingComponents_case_1 = _4_6; + _4_6_isSet = true; + } + t3 = siblingComponents_case_1; + } + } else + t4 = false; + } else + t4 = true; + if (t4) { + result.addFirst$1(A._setArrayType([A._setArrayType([t3.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + break $label2$2; + } + t3 = _4_1 == null; + t4 = !t3; + t5 = false; + if (t4) { + _4_4_isSet0 = true; + combinator1 = _4_1; + if (_4_4_isSet) + t6 = _4_4; + else { + _4_4 = t2[1]; + t6 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + if (t6 != null) { + if (_4_4_isSet) + combinator2 = _4_4; + else { + _4_4 = t2[1]; + combinator2 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + t5 = combinator1 === (combinator2 == null ? type$.Combinator._as(combinator2) : combinator2); + } + } + if (t5) { + unified = A.unifyCompound(components1.removeLast$0(0).selector, components2.removeLast$0(0).selector); + if (unified == null) + return _null; + result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent(unified, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator), type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + break $label2$2; + } + t1 = _null; + t5 = _null; + t6 = _null; + t7 = false; + if (t4) { + combinator_case_0 = _4_1; + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = t4 == null; + if (t4) { + if (_4_6_isSet) + combinatorComponents_case_0 = _4_6; + else { + _4_6 = t2[2]; + combinatorComponents_case_0 = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + descendantComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + descendantComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t1 = descendantComponents_case_0; + t6 = t1; + t1 = combinator_case_0; + t5 = combinatorComponents_case_0; + } + t0 = t6; + t6 = t4; + t4 = t5; + t5 = t0; + } else { + t4 = t5; + t5 = t6; + t6 = t7; + } + if (!t6) + if (t3) { + if (_4_4_isSet) + t3 = _4_4; + else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet = true; + } + t3 = t3 != null; + if (t3) { + combinator_case_1 = _4_4_isSet ? _4_4 : t2[1]; + if (combinator_case_1 == null) + combinator_case_1 = type$.Combinator._as(combinator_case_1); + descendantComponents_case_1 = _4_6_isSet ? _4_6 : t2[2]; + combinatorComponents_case_1 = _4_7_isSet ? _4_7 : t2[3]; + t1 = combinatorComponents_case_1; + t2 = descendantComponents_case_1; + t4 = t2; + t2 = t1; + t1 = combinator_case_1; + } else { + t2 = t4; + t4 = t5; + } + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t3 = t5; + t2 = t4; + t4 = false; + } + else { + t3 = t5; + t2 = t4; + t4 = true; + } + if (t4) { + if (t1 === B.Combinator_8I8) { + t1 = A.IterableExtension_get_lastOrNull(t3); + t1 = t1 == null ? _null : A.compoundIsSuperselector(t1.selector, t2.get$last(t2).selector, _null); + t1 = t1 === true; + } else + t1 = false; + if (t1) + t3.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([t2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + break $label2$2; + } + return _null; + } + return A._mergeTrailingCombinators(components1, components2, span, result); + }, + _mustUnify(complex1, complex2) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector); + for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) + for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions___isUnique$closure()); t4.moveNext$0();) + t1.add$1(0, t3.get$current(0)); + if (t1._collection$_length === 0) + return false; + return J.any$1$ax(complex2, new A._mustUnify_closure(t1)); + }, + _isUnique(simple) { + var t1; + if (!(simple instanceof A.IDSelector)) + t1 = simple instanceof A.PseudoSelector && !simple.isClass; + else + t1 = true; + return t1; + }, + _chunks(queue1, queue2, done, $T) { + var chunk2, _0_4, _0_5_isSet, _0_1, _0_7, _0_5, chunk, _0_5_isSet0, t2, _null = null, + t1 = $T._eval$1("JSArray<0>"), + chunk1 = A._setArrayType([], t1); + for (; !done.call$1(queue1);) + chunk1.push(queue1.removeFirst$0()); + chunk2 = A._setArrayType([], t1); + for (; !done.call$1(queue2);) + chunk2.push(queue2.removeFirst$0()); + $label0$0: { + _0_4 = chunk1.length <= 0; + _0_5_isSet = _0_4; + _0_1 = chunk1; + _0_7 = _null; + _0_5 = _null; + if (_0_5_isSet) { + _0_7 = chunk2.length <= 0; + t1 = _0_7; + _0_5 = chunk2; + } else + t1 = false; + if (t1) { + t1 = A._setArrayType([], $T._eval$1("JSArray>")); + break $label0$0; + } + if (_0_4) + if (_0_5_isSet) { + chunk = _0_5; + _0_5_isSet0 = _0_5_isSet; + } else { + chunk = chunk2; + _0_5 = chunk; + _0_5_isSet0 = true; + } + else { + chunk = _null; + _0_5_isSet0 = _0_5_isSet; + } + if (!_0_4) { + if (_0_5_isSet) + t1 = _0_7; + else { + _0_7 = (_0_5_isSet0 ? _0_5 : chunk2).length <= 0; + t1 = _0_7; + } + chunk = _0_1; + } else + t1 = true; + if (t1) { + t1 = A._setArrayType([chunk], $T._eval$1("JSArray>")); + break $label0$0; + } + t1 = A.List_List$of(chunk1, true, $T); + B.JSArray_methods.addAll$1(t1, chunk2); + t2 = A.List_List$of(chunk2, true, $T); + B.JSArray_methods.addAll$1(t2, chunk1); + t2 = A._setArrayType([t1, t2], $T._eval$1("JSArray>")); + t1 = t2; + break $label0$0; + } + return t1; + }, + paths(choices, $T) { + return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure($T)); + }, + _groupSelectors(complex) { + var t2, t3, t4, + groups = A.QueueList$(null, type$.List_ComplexSelectorComponent), + t1 = type$.JSArray_ComplexSelectorComponent, + group = A._setArrayType([], t1); + for (t2 = complex.$ti, t3 = new A.ListIterator(complex, complex.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t3.moveNext$0();) { + t4 = t3.__internal$_current; + if (t4 == null) + t4 = t2._as(t4); + group.push(t4); + if (t4.combinators.length === 0) { + groups._queue_list$_add$1(group); + group = A._setArrayType([], t1); + } + } + if (group.length !== 0) + groups._queue_list$_add$1(group); + return groups; + }, + listIsSuperselector(list1, list2) { + return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure(list1)); + }, + _complexIsParentSuperselector(complex1, complex2) { + var t1, base, t2; + if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) + return false; + t1 = $.$get$bogusSpan(); + base = new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([new A.PlaceholderSelector("", t1)], type$.JSArray_SimpleSelector), t1), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t1); + t1 = type$.ComplexSelectorComponent; + t2 = A.List_List$of(complex1, true, t1); + t2.push(base); + t1 = A.List_List$of(complex2, true, t1); + t1.push(base); + return A.complexIsSuperselector(t2, t1); + }, + complexIsSuperselector(complex1, complex2) { + var t1, t2, previousCombinator, i1, i2, remaining1, remaining2, component1, t3, t4, endOfSubselector, component2, t5, combinator1, _null = null; + if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) + return false; + if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) + return false; + for (t1 = A._arrayInstanceType(complex2), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), previousCombinator = _null, i1 = 0, i2 = 0; true; previousCombinator = combinator1) { + remaining1 = complex1.length - i1; + remaining2 = complex2.length - i2; + if (remaining1 === 0 || remaining2 === 0) + return false; + if (remaining1 > remaining2) + return false; + component1 = complex1[i1]; + t3 = component1.combinators; + if (t3.length > 1) + return false; + if (remaining1 === 1) + if (B.JSArray_methods.any$1(complex2, new A.complexIsSuperselector_closure())) + return false; + else { + t1 = component1.selector; + t2 = B.JSArray_methods.get$last(complex2).selector; + return A.compoundIsSuperselector(t1, t2, t1.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, complex2.length - 1) : _null); + } + for (t4 = component1.selector, endOfSubselector = i2; true;) { + component2 = complex2[endOfSubselector]; + if (component2.combinators.length > 1) + return false; + t5 = component2.selector; + if (A.compoundIsSuperselector(t4, t5, t4.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, endOfSubselector) : _null)) + break; + ++endOfSubselector; + if (endOfSubselector === complex2.length - 1) + return false; + } + t4 = new A.SubListIterable(complex2, 0, endOfSubselector, t1); + t4.SubListIterable$3(complex2, 0, endOfSubselector, t2); + if (!A._compatibleWithPreviousCombinator(previousCombinator, t4.skip$1(0, i2))) + return false; + component2 = complex2[endOfSubselector]; + combinator1 = A.IterableExtension_get_firstOrNull(t3); + if (!A._isSupercombinator(combinator1, A.IterableExtension_get_firstOrNull(component2.combinators))) + return false; + ++i1; + i2 = endOfSubselector + 1; + if (complex1.length - i1 === 1) { + t3 = combinator1 == null; + if (J.$eq$(t3 ? _null : combinator1.value, B.Combinator_y18)) { + t3 = complex2.length - 1; + t4 = new A.SubListIterable(complex2, 0, t3, t1); + t4.SubListIterable$3(complex2, 0, t3, t2); + if (!t4.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure0(combinator1))) + return false; + } else if (!t3) + if (complex2.length - i2 > 1) + return false; + } + } + }, + _compatibleWithPreviousCombinator(previous, parents) { + if (parents.get$isEmpty(parents)) + return true; + if (previous == null) + return true; + if (previous.value !== B.Combinator_y18) + return false; + return parents.every$1(0, new A._compatibleWithPreviousCombinator_closure()); + }, + _isSupercombinator(combinator1, combinator2) { + var t2, t3, + t1 = true; + if (!J.$eq$(combinator1, combinator2)) { + t2 = combinator1 == null; + if (t2) + t3 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_8I8); + else + t3 = false; + if (!t3) + if (J.$eq$(t2 ? null : combinator1.value, B.Combinator_y18)) + t1 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_gRV); + else + t1 = false; + } + return t1; + }, + compoundIsSuperselector(compound1, compound2, parents) { + var t1, _0_1, _0_5, _0_5_isSet, _0_50, index1, pseudo2, index2, t2, t3, pseudo1, t4, t5, _i, simple1, _null = null; + if (!compound1.get$hasComplicatedSuperselectorSemantics() && !compound2.get$hasComplicatedSuperselectorSemantics()) { + t1 = compound1.components; + if (t1.length > compound2.components.length) + return false; + return B.JSArray_methods.every$1(t1, new A.compoundIsSuperselector_closure(compound2)); + } + _0_1 = A._findPseudoElementIndexed(compound1); + _0_5 = A._findPseudoElementIndexed(compound2); + t1 = type$.Record_2_nullable_Object_and_nullable_Object; + _0_5_isSet = t1._is(_0_1); + _0_50 = _null; + index1 = _null; + pseudo2 = _null; + index2 = _null; + t2 = false; + if (_0_5_isSet) { + t3 = _0_1 == null; + pseudo1 = (t3 ? t1._as(_0_1) : _0_1)._0; + index1 = (t3 ? t1._as(_0_1) : _0_1)._1; + t2 = t1._is(_0_5); + if (t2) { + t3 = _0_5 == null; + pseudo2 = (t3 ? t1._as(_0_5) : _0_5)._0; + index2 = (t3 ? t1._as(_0_5) : _0_5)._1; + } + t1 = t2; + _0_50 = _0_5; + } else { + t1 = t2; + pseudo1 = _null; + } + if (t1) { + if (pseudo1.isSuperselector$1(pseudo2)) { + t1 = compound1.components; + t2 = type$.int; + t3 = A._arrayInstanceType(t1)._precomputed1; + t4 = compound2.components; + t5 = A._arrayInstanceType(t4)._precomputed1; + t1 = A._compoundComponentsIsSuperselector(A.SubListIterable$(t1, 0, A.checkNotNullable(index1, "count", t2), t3), A.SubListIterable$(t4, 0, A.checkNotNullable(index2, "count", t2), t5), parents) && A._compoundComponentsIsSuperselector(A.SubListIterable$(t1, index1 + 1, _null, t3), A.SubListIterable$(t4, index2 + 1, _null, t5), parents); + } else + t1 = false; + return t1; + } + if (_0_1 == null) + t1 = (_0_5_isSet ? _0_50 : _0_5) != null; + else + t1 = true; + if (t1) + return false; + for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { + simple1 = t1[_i]; + if (simple1 instanceof A.PseudoSelector) + t4 = simple1.selector != null; + else + t4 = false; + if (t4) { + if (!A._selectorPseudoIsSuperselector(simple1, compound2, parents)) + return false; + } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) + return false; + } + return true; + }, + _findPseudoElementIndexed(compound) { + var t1, t2, i, simple; + for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { + simple = t1[i]; + if (simple instanceof A.PseudoSelector && !simple.isClass) + return new A._Record_2(simple, i); + } + return null; + }, + _compoundComponentsIsSuperselector(compound1, compound2, parents) { + var t1; + if (compound1.get$length(0) === 0) + return true; + if (compound2.get$length(0) === 0) + compound2 = A._setArrayType([new A.UniversalSelector("*", $.$get$bogusSpan())], type$.JSArray_SimpleSelector); + t1 = $.$get$bogusSpan(); + return A.compoundIsSuperselector(A.CompoundSelector$(compound1, t1), A.CompoundSelector$(compound2, t1), parents); + }, + _selectorPseudoIsSuperselector(pseudo1, compound2, parents) { + var selector1 = pseudo1.selector; + if (selector1 == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); + switch (pseudo1.normalizedName) { + case "is": + case "matches": + case "any": + case "where": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure(selector1)) || B.JSArray_methods.any$1(selector1.components, new A._selectorPseudoIsSuperselector_closure0(parents, compound2)); + case "has": + case "host": + case "host-context": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure1(selector1)); + case "slotted": + return A._selectorPseudoArgs(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure2(selector1)); + case "not": + return B.JSArray_methods.every$1(selector1.components, new A._selectorPseudoIsSuperselector_closure3(compound2, pseudo1)); + case "current": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure4(selector1)); + case "nth-child": + case "nth-last-child": + return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure5(pseudo1, selector1)); + default: + throw A.wrapException("unreachable"); + } + }, + _selectorPseudoArgs(compound, $name, isClass) { + var t1 = type$.WhereTypeIterable_PseudoSelector; + return new A.NonNullsIterable(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure0(), t1._eval$1("MappedIterable")), type$.NonNullsIterable_SelectorList); + }, + unifyComplex_closure: function unifyComplex_closure() { + }, + _weaveParents_closure: function _weaveParents_closure(t0) { + this.span = t0; + }, + _weaveParents_closure0: function _weaveParents_closure0(t0) { + this.group = t0; + }, + _weaveParents_closure1: function _weaveParents_closure1() { + }, + _weaveParents_closure2: function _weaveParents_closure2() { + }, + _mustUnify_closure: function _mustUnify_closure(t0) { + this.uniqueSelectors = t0; + }, + _mustUnify__closure: function _mustUnify__closure(t0) { + this.uniqueSelectors = t0; + }, + paths_closure: function paths_closure(t0) { + this.T = t0; + }, + paths__closure: function paths__closure(t0, t1) { + this.paths = t0; + this.T = t1; + }, + paths___closure: function paths___closure(t0, t1) { + this.option = t0; + this.T = t1; + }, + listIsSuperselector_closure: function listIsSuperselector_closure(t0) { + this.list1 = t0; + }, + listIsSuperselector__closure: function listIsSuperselector__closure(t0) { + this.complex1 = t0; + }, + complexIsSuperselector_closure: function complexIsSuperselector_closure() { + }, + complexIsSuperselector_closure0: function complexIsSuperselector_closure0(t0) { + this.combinator1 = t0; + }, + _compatibleWithPreviousCombinator_closure: function _compatibleWithPreviousCombinator_closure() { + }, + compoundIsSuperselector_closure: function compoundIsSuperselector_closure(t0) { + this.compound2 = t0; + }, + _selectorPseudoIsSuperselector_closure: function _selectorPseudoIsSuperselector_closure(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure0: function _selectorPseudoIsSuperselector_closure0(t0, t1) { + this.parents = t0; + this.compound2 = t1; + }, + _selectorPseudoIsSuperselector_closure1: function _selectorPseudoIsSuperselector_closure1(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure2: function _selectorPseudoIsSuperselector_closure2(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure3: function _selectorPseudoIsSuperselector_closure3(t0, t1) { + this.compound2 = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector__closure: function _selectorPseudoIsSuperselector__closure(t0, t1) { + this.complex = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector___closure: function _selectorPseudoIsSuperselector___closure(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector___closure0: function _selectorPseudoIsSuperselector___closure0(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector_closure4: function _selectorPseudoIsSuperselector_closure4(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure5: function _selectorPseudoIsSuperselector_closure5(t0, t1) { + this.pseudo1 = t0; + this.selector1 = t1; + }, + _selectorPseudoArgs_closure: function _selectorPseudoArgs_closure(t0, t1) { + this.isClass = t0; + this.name = t1; + }, + _selectorPseudoArgs_closure0: function _selectorPseudoArgs_closure0() { + }, + MergedExtension_merge(left, right) { + var t2, t3, t4, + t1 = left.extender.selector; + if (!t1.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) + throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); + t2 = left.mediaContext; + t3 = t2 == null; + if (!t3) { + t4 = right.mediaContext; + t4 = t4 != null && !B.C_ListEquality.equals$2(0, t2, t4); + } else + t4 = false; + if (t4) + throw A.wrapException(A.SassException$("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span, null)); + if (right.isOptional && right.mediaContext == null) + return left; + if (left.isOptional && t3) + return right; + if (t3) + t2 = right.mediaContext; + t1.get$specificity(); + t1 = new A.Extender(t1, false); + return t1._extension = new A.MergedExtension(left, right, t1, left.target, t2, true, left.span); + }, + MergedExtension: function MergedExtension(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.left = t0; + _.right = t1; + _.extender = t2; + _.target = t3; + _.mediaContext = t4; + _.isOptional = t5; + _.span = t6; + }, + ExtendMode: function ExtendMode(t0, t1) { + this.name = t0; + this._name = t1; + }, + globalFunctions_closure: function globalFunctions_closure() { + }, + _invert($arguments, global) { + var t2, color, rgb, channel2, space, weight, inSpace, t3, _1_9, channel0, channel1, t4, _s6_ = "weight", _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + weightNumber = t1.$index($arguments, 1).assertNumber$1(_s6_); + if (!(t1.$index($arguments, 0) instanceof A.SassNumber)) + t2 = global && t1.$index($arguments, 0).get$isSpecialNumber(); + else + t2 = true; + if (t2) { + if (weightNumber._number$_value !== 100 || !weightNumber.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + return A._functionString("invert", t1.take$1($arguments, 1)); + } + color = t1.$index($arguments, 0).assertColor$1("color"); + if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull)) { + t1 = color._space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.To_usei + color.toString$0(0) + ", you must provide a $space.", "color")); + A._checkPercent(weightNumber, _s6_); + rgb = color.toSpace$1(B.RgbColorSpace_mlz); + channel2 = B.LinearChannel_Npb; + return A._mixLegacy(A.SassColor_SassColor$rgbInternal(A._invertChannel(rgb, B.LinearChannel_bdu, rgb.channel0OrNull), A._invertChannel(rgb, B.LinearChannel_kUZ, rgb.channel1OrNull), A._invertChannel(rgb, channel2, rgb.channel2OrNull), color.alphaOrNull, null), color, weightNumber).toSpace$1(t1); + } + t1 = t1.$index($arguments, 2).assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName(t1._string$_text, _s5_); + weight = weightNumber.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100; + if (A.fuzzyEquals(weight, 0)) + return color; + inSpace = color.toSpace$1(space); + $label0$0: { + if (B.HwbColorSpace_06z === space) { + t1 = A._invertChannel(inSpace, space._channels[0], inSpace.channel0OrNull); + t2 = inSpace.alphaOrNull; + if (t2 == null) + t2 = 0; + t2 = A.SassColor_SassColor$hwb(t1, inSpace.channel2OrNull, inSpace.channel1OrNull, t2); + t1 = t2; + break $label0$0; + } + if (B.HslColorSpace_gsm === space || B.LchColorSpace_wv8 === space || B.OklchColorSpace_li8 === space) { + t1 = space._channels; + t2 = A._invertChannel(inSpace, t1[0], inSpace.channel0OrNull); + t1 = A._invertChannel(inSpace, t1[2], inSpace.channel2OrNull); + t3 = inSpace.alphaOrNull; + if (t3 == null) + t3 = 0; + t3 = A.SassColor_SassColor$forSpaceInternal(space, t2, inSpace.channel1OrNull, t1, t3); + t1 = t3; + break $label0$0; + } + _1_9 = space._channels; + channel0 = _1_9[0]; + channel1 = _1_9[1]; + channel2 = _1_9[2]; + t1 = A._invertChannel(inSpace, channel0, inSpace.channel0OrNull); + t2 = A._invertChannel(inSpace, channel1, inSpace.channel1OrNull); + t3 = A._invertChannel(inSpace, channel2, inSpace.channel2OrNull); + t4 = inSpace.alphaOrNull; + t1 = A.SassColor_SassColor$forSpaceInternal(space, t1, t2, t3, t4 == null ? 0 : t4); + break $label0$0; + } + return A.fuzzyEquals(weight, 1) ? t1.toSpace$2$legacyMissing(color._space, false) : color.interpolate$4$legacyMissing$weight(t1, A.InterpolationMethod$(space, null), false, 1 - weight); + }, + _invertChannel(color, channel, value) { + var _0_2_isSet, _0_2, t1; + if (value == null) + A._missingChannelError(color, channel.name); + $label0$0: { + _0_2_isSet = channel instanceof A.LinearChannel; + if (_0_2_isSet) { + _0_2 = channel.min; + t1 = _0_2 < 0; + } else { + _0_2 = null; + t1 = false; + } + if (t1) { + t1 = -value; + break $label0$0; + } + if (_0_2_isSet) + t1 = 0 === _0_2; + else + t1 = false; + if (t1) { + t1 = channel.max - value; + break $label0$0; + } + if (channel.isPolarAngle) { + t1 = B.JSNumber_methods.$mod(value + 180, 360); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown channel " + channel.toString$0(0) + ".")); + } + return t1; + }, + _grayscale(colorArg) { + var hsl, t2, oklch, + color = colorArg.assertColor$1("color"), + t1 = color._space; + if (t1.get$isLegacyInternal()) { + hsl = color.toSpace$1(B.HslColorSpace_gsm); + t2 = hsl.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$hsl(hsl.channel0OrNull, 0, hsl.channel2OrNull, t2).toSpace$2$legacyMissing(t1, false); + } else { + oklch = color.toSpace$1(B.OklchColorSpace_li8); + t2 = oklch.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$forSpaceInternal(B.OklchColorSpace_li8, oklch.channel0OrNull, 0, oklch.channel2OrNull, t2).toSpace$1(t1); + } + }, + _updateComponents($arguments, adjust, change, scale) { + var t2, t3, keywords, originalColor, spaceKeyword, alphaArg, color, channelArgs, channelInfo, t4, value, channelIndex, result, i, alphaNumber, _null = null, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + argumentList = type$.SassArgumentList._as(t1.$index($arguments, 1)); + if (argumentList._list$_contents.length !== 0) + throw A.wrapException(A.SassScriptException$(string$.Only_op, _null)); + argumentList._wereKeywordsAccessed = true; + t2 = type$.String; + t3 = type$.Value; + keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._keywords, t2, t3); + originalColor = t1.$index($arguments, 0).assertColor$1("color"); + t1 = keywords.remove$1(0, _s5_); + spaceKeyword = t1 == null ? _null : t1.assertString$1(_s5_); + if (spaceKeyword == null) + spaceKeyword = _null; + else + spaceKeyword.assertUnquoted$1(_s5_); + alphaArg = keywords.remove$1(0, "alpha"); + t1 = spaceKeyword == null; + if (t1 && originalColor._space.get$isLegacyInternal() && keywords.__js_helper$_length !== 0) { + t1 = A.NullableExtension_andThen(A._sniffLegacyColorSpace(keywords), new A._updateComponents_closure(originalColor)); + color = t1 == null ? originalColor : t1; + } else + color = A._colorInSpace(originalColor, t1 ? B.C__SassNull : spaceKeyword, true); + channelArgs = A.List_List$filled(color.get$channels().length, _null, false, type$.nullable_Value); + t1 = color._space; + channelInfo = t1._channels; + for (t2 = A.MapExtensions_get_pairs(keywords, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = {}; + t4 = t2.get$current(t2); + t3.name = null; + t3.name = t4._0; + value = t4._1; + channelIndex = B.JSArray_methods.indexWhere$1(channelInfo, new A._updateComponents_closure0(t3)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$("Color space " + t1.toString$0(0) + " doesn't have a channel with this name.", t3.name)); + channelArgs[channelIndex] = value; + } + if (change) + result = A._changeColor(color, channelArgs, alphaArg); + else { + t2 = A._setArrayType([], type$.JSArray_nullable_SassNumber); + for (i = 0; i < 3; ++i) { + t3 = channelArgs[i]; + t2.push(t3 == null ? _null : t3.assertNumber$1(channelInfo[i].name)); + } + alphaNumber = alphaArg == null ? _null : alphaArg.assertNumber$1("alpha"); + result = scale ? A.SassColor_SassColor$forSpaceInternal(t1, A._scaleChannel(color, channelInfo[0], color.channel0OrNull, t2[0]), A._scaleChannel(color, channelInfo[1], color.channel1OrNull, t2[1]), A._scaleChannel(color, channelInfo[2], color.channel2OrNull, t2[2]), A._scaleChannel(color, B.LinearChannel_omH, color.alphaOrNull, alphaNumber)) : A._adjustColor(color, t2, alphaNumber); + } + return result.toSpace$2$legacyMissing(originalColor._space, false); + }, + _changeColor(color, channelArgs, alphaArg) { + var t4, _s5_ = "alpha", + t1 = A._channelForChange(channelArgs[0], color, 0), + t2 = A._channelForChange(channelArgs[1], color, 1), + t3 = A._channelForChange(channelArgs[2], color, 2); + $label0$0: { + if (alphaArg == null) { + t4 = color.alphaOrNull; + if (t4 == null) + t4 = 0; + break $label0$0; + } + t4 = A._isNone(alphaArg); + if (t4) { + t4 = null; + break $label0$0; + } + t4 = alphaArg instanceof A.SassNumber; + if (t4 && !alphaArg.get$hasUnits()) { + t4 = alphaArg.valueInRange$3(0, 1, _s5_); + break $label0$0; + } + if (t4 && alphaArg.hasUnit$1("%")) { + t4 = alphaArg.valueInRangeWithUnit$4(0, 100, _s5_, "%") / 100; + break $label0$0; + } + if (t4) { + t4 = new A._changeColor_closure(alphaArg).call$0(); + break $label0$0; + } + t4 = A.throwExpression(A.SassScriptException$(alphaArg.toString$0(0) + ' is not a number or unquoted "none".', _s5_)); + } + return A._colorFromChannels(color._space, t1, t2, t3, t4, false, false); + }, + _channelForChange(channelArg, color, channel) { + var _0_0, t1, t2; + if (channelArg == null) { + _0_0 = color.get$channelsOrNull()[channel]; + $label0$0: { + if (_0_0 != null) { + t1 = color._space; + t2 = A.SassNumber_SassNumber(_0_0, (t1 === B.HslColorSpace_gsm || t1 === B.HwbColorSpace_06z) && channel > 0 ? "%" : null); + t1 = t2; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + } + if (A._isNone(channelArg)) + return null; + if (channelArg instanceof A.SassNumber) + return channelArg; + throw A.wrapException(A.SassScriptException$(channelArg.toString$0(0) + ' is not a number or unquoted "none".', color._space._channels[channel].name)); + }, + _scaleChannel(color, channel, oldValue, factorArg) { + var t1, factor; + if (factorArg == null) + return oldValue; + if (!(channel instanceof A.LinearChannel)) + throw A.wrapException(A.SassScriptException$("Channel isn't scalable.", channel.name)); + if (oldValue == null) + A._missingChannelError(color, channel.name); + t1 = channel.name; + factorArg.assertUnit$2("%", t1); + factor = factorArg.valueInRangeWithUnit$4(-100, 100, t1, "%") / 100; + $label0$0: { + if (0 === factor) { + t1 = oldValue; + break $label0$0; + } + if (factor > 0) { + t1 = channel.max; + t1 = oldValue >= t1 ? oldValue : oldValue + (t1 - oldValue) * factor; + break $label0$0; + } + t1 = channel.min; + t1 = oldValue <= t1 ? oldValue : oldValue + (oldValue - t1) * factor; + break $label0$0; + } + return t1; + }, + _adjustColor(color, channelArgs, alphaArg) { + var t1 = color._space, + t2 = t1._channels; + return A.SassColor_SassColor$forSpaceInternal(t1, A._adjustChannel(color, t2[0], color.channel0OrNull, channelArgs[0]), A._adjustChannel(color, t2[1], color.channel1OrNull, channelArgs[1]), A._adjustChannel(color, t2[2], color.channel2OrNull, channelArgs[2]), A.NullableExtension_andThen(A._adjustChannel(color, B.LinearChannel_omH, color.alphaOrNull, alphaArg), new A._adjustColor_closure())); + }, + _adjustChannel(color, channel, oldValue, adjustmentArg) { + var _0_1, _0_3, t1, _0_6_isSet, _0_6, _0_6_isSet0, t2, _0_11, result, min, max, _null = null; + if (adjustmentArg == null) + return oldValue; + if (oldValue == null) + A._missingChannelError(color, channel.name); + $label0$0: { + _0_1 = color._space; + _0_3 = B.HslColorSpace_gsm === _0_1; + t1 = _0_3; + if (!t1) + _0_6_isSet = B.HwbColorSpace_06z === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + t1 = channel.isPolarAngle; + _0_6 = channel; + } else { + _0_6 = _null; + t1 = false; + } + if (t1) { + adjustmentArg = A.SassNumber_SassNumber(A._angleValue(adjustmentArg, "hue"), _null); + break $label0$0; + } + t1 = false; + if (_0_3) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_6; + else { + t2 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t2; + } + if (t2 instanceof A.LinearChannel) { + if (_0_6_isSet) + t1 = _0_6; + else { + t1 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t1; + } + _0_11 = type$.LinearChannel._as(t1).name; + t1 = _0_11; + if ("saturation" !== t1) + t1 = "lightness" === _0_11; + else + t1 = true; + } + } + if (t1) { + A._checkPercent(adjustmentArg, channel.name); + adjustmentArg = A.SassNumber_SassNumber(adjustmentArg._number$_value, "%"); + break $label0$0; + } + if (B.LinearChannel_omH === (_0_6_isSet ? _0_6 : channel) && adjustmentArg.get$hasUnits()) { + A.warnForDeprecation("$alpha: Passing a number with unit " + adjustmentArg.get$unitString() + string$.x20is_de + adjustmentArg.unitSuggestion$1("alpha") + string$.x0a_Morex3af, B.Deprecation_2jN); + adjustmentArg = A.SassNumber_SassNumber(adjustmentArg._number$_value, _null); + } + } + t1 = A._channelFromValue(channel, adjustmentArg, false); + t1.toString; + result = oldValue + t1; + $label1$1: { + t1 = channel instanceof A.LinearChannel; + min = _null; + t2 = false; + if (t1) + if (channel.lowerClamped) { + min = channel.min; + t2 = result < min; + } + if (t2) { + t1 = oldValue < min ? Math.max(oldValue, result) : min; + break $label1$1; + } + max = _null; + t2 = false; + if (t1) + if (channel.upperClamped) { + max = channel.max; + t1 = result > max; + } else + t1 = t2; + else + t1 = t2; + if (t1) { + t1 = oldValue > max ? Math.min(oldValue, result) : max; + break $label1$1; + } + t1 = result; + break $label1$1; + } + return t1; + }, + _sniffLegacyColorSpace(keywords) { + var t1, t2; + for (t1 = A.LinkedHashMapKeyIterator$(keywords, keywords.__js_helper$_modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + if ("red" === t2 || "green" === t2 || "blue" === t2) + return B.RgbColorSpace_mlz; + if ("saturation" === t2 || "lightness" === t2) + return B.HslColorSpace_gsm; + if ("whiteness" === t2 || "blackness" === t2) + return B.HwbColorSpace_06z; + } + return keywords.containsKey$1("hue") ? B.HslColorSpace_gsm : null; + }, + _functionString($name, $arguments) { + return new A.SassString($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure(), type$.String).join$1(0, ", ") + ")", false); + }, + _removedColorFunction($name, argument, negative) { + return A.BuiltInCallable$function($name, "$color, $amount", new A._removedColorFunction_closure($name, argument, negative), "sass:color"); + }, + _rgb($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("red"); + t3 = t1.$index($arguments, 1).assertNumber$1("green"); + t1 = t1.$index($arguments, 2).assertNumber$1("blue"); + t4 = A.NullableExtension_andThen(alpha, new A._rgb_closure()); + return A._colorFromChannels(B.RgbColorSpace_mlz, t2, t3, t1, t4 == null ? 1 : t4, true, true); + }, + _rgbTwoArg($name, $arguments) { + var t2, color, + t1 = J.getInterceptor$asx($arguments), + first = t1.$index($arguments, 0), + second = t1.$index($arguments, 1); + if (!first.get$isVar()) + t2 = !(first instanceof A.SassColor) && second.get$isVar(); + else + t2 = true; + if (t2) + return A._functionString($name, $arguments); + color = first.assertColor$1("color"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$("Expected " + color.toString$0(0) + string$.x20to_be_ + color.toString$0(0) + ", $alpha: " + second.toString$0(0) + ")", $name)); + color.assertLegacy$1("color"); + color = color.toSpace$1(B.RgbColorSpace_mlz); + if (second.get$isSpecialNumber()) + return A._functionString($name, A._setArrayType([A.SassNumber_SassNumber(color.channel$1(0, "red"), null), A.SassNumber_SassNumber(color.channel$1(0, "green"), null), A.SassNumber_SassNumber(color.channel$1(0, "blue"), null), t1.$index($arguments, 1)], type$.JSArray_Value)); + t1 = A._percentageOrUnitless(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha"); + return color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + }, + _hsl($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("hue"); + t3 = t1.$index($arguments, 1).assertNumber$1("saturation"); + t1 = t1.$index($arguments, 2).assertNumber$1("lightness"); + t4 = A.NullableExtension_andThen(alpha, new A._hsl_closure()); + return A._colorFromChannels(B.HslColorSpace_gsm, t2, t3, t1, t4 == null ? 1 : t4, true, false); + }, + _angleValue(angleValue, $name) { + var angle = angleValue.assertNumber$1($name); + if (angle.compatibleWithUnit$1("deg")) + return angle.coerceValueToUnit$1("deg"); + A.warnForDeprecation("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + string$.x29x20is_d + angle.unitSuggestion$1($name) + string$.x0a_See_, B.Deprecation_2jN); + return angle._number$_value; + }, + _checkPercent(number, $name) { + if (number.hasUnit$1("%")) + return; + A.warnForDeprecation("$" + $name + ": Passing a number without unit % (" + number.toString$0(0) + string$.x29x20is_d + number.unitSuggestion$2($name, "%") + string$.x0a_Morex3af, B.Deprecation_2jN); + }, + _percentageOrUnitless(number, max, $name) { + var value; + if (!number.get$hasUnits()) + value = number._number$_value; + else if (number.hasUnit$1("%")) + value = max * number._number$_value / 100; + else + throw A.wrapException(A.SassScriptException$("Expected " + number.toString$0(0) + ' to have unit "%" or no units.', $name)); + return value; + }, + _mixLegacy(color1, color2, weight) { + var t2, alphaDistance, weight1, weight2, t3, t4, t5, t6, t7, t8, + rgb1 = color1.toSpace$1(B.RgbColorSpace_mlz), + rgb2 = color2.toSpace$1(B.RgbColorSpace_mlz), + weightScale = weight.valueInRange$3(0, 100, "weight") / 100, + normalizedWeight = weightScale * 2 - 1, + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + alphaDistance = t1 - (t2 == null ? 0 : t2); + t1 = normalizedWeight * alphaDistance; + weight1 = ((t1 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t1)) + 1) / 2; + weight2 = 1 - weight1; + t1 = rgb1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = rgb2.channel0OrNull; + if (t2 == null) + t2 = 0; + t3 = rgb1.channel1OrNull; + if (t3 == null) + t3 = 0; + t4 = rgb2.channel1OrNull; + if (t4 == null) + t4 = 0; + t5 = rgb1.channel2OrNull; + if (t5 == null) + t5 = 0; + t6 = rgb2.channel2OrNull; + if (t6 == null) + t6 = 0; + t7 = rgb1.alphaOrNull; + if (t7 == null) + t7 = 0; + t8 = rgb2.alphaOrNull; + if (t8 == null) + t8 = 0; + return A.SassColor_SassColor$rgbInternal(t1 * weight1 + t2 * weight2, t3 * weight1 + t4 * weight2, t5 * weight1 + t6 * weight2, t7 * weightScale + t8 * (1 - weightScale), null); + }, + _opacify($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 += amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation($name + "() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_ukt); + return result; + }, + _transparentize($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 -= amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation($name + "() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_ukt); + return result; + }, + _colorInSpace(colorUntyped, spaceUntyped, legacyMissing) { + var t1, _s5_ = "space", + color = colorUntyped.assertColor$1("color"); + if (spaceUntyped.$eq(0, B.C__SassNull)) + return color; + t1 = spaceUntyped.assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + return color.toSpace$2$legacyMissing(A.ColorSpace_fromName(t1._string$_text, _s5_), legacyMissing); + }, + _parseChannels(functionName, input, $name, space) { + var parsedSlash, components, alphaValue, _2_0, _2_1, _2_5, t1, _2_6, t2, _2_60, t3, channels, first, rest, componentList, spaceName, i, channel, channelName, t4, _null = null; + if (input.get$isVar()) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + parsedSlash = A._parseSlashChannels(input, $name); + if (parsedSlash == null) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + components = parsedSlash._0; + alphaValue = parsedSlash._1; + $label0$0: { + _2_0 = components.assertCommonListStyle$2$allowSlash($name, false); + _2_1 = _2_0.length; + if (_2_1 <= 0) + throw A.wrapException(A.SassScriptException$("Color component list may not be empty.", $name)); + _2_5 = _2_1 >= 1; + t1 = _2_5; + _2_6 = _null; + t2 = false; + if (t1) { + _2_60 = _2_0[0]; + t3 = _2_60; + _2_6 = t3; + if (t3 instanceof A.SassString) { + type$.SassString._as(_2_6); + t2 = !_2_6._hasQuotes && _2_6._string$_text.toLowerCase() === "from"; + } + } + if (t2) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + t2 = components.get$isVar(); + if (t2) { + channels = A._setArrayType([components], type$.JSArray_Value); + break $label0$0; + } + channels = _null; + if (_2_5) { + first = t1 ? _2_6 : _2_0[0]; + rest = B.JSArray_methods.sublist$1(_2_0, 1); + componentList = _2_0; + } else { + componentList = channels; + rest = componentList; + first = _null; + } + if (_2_5) { + if (space == null) { + spaceName = first.assertString$1($name); + spaceName.assertUnquoted$1($name); + space = spaceName.get$isVar() ? _null : A.ColorSpace_fromName(spaceName._string$_text, $name); + if (B.RgbColorSpace_mlz === space || B.HslColorSpace_gsm === space || B.HwbColorSpace_06z === space || B.LabColorSpace_IF2 === space || B.LchColorSpace_wv8 === space || B.OklabColorSpace_yrt === space || B.OklchColorSpace_li8 === space) + throw A.wrapException(A.SassScriptException$(string$.The_co + A.S(space) + ". Use the " + A.S(space) + "() function instead.", $name)); + channels = rest; + } else + channels = componentList; + for (i = 0; i < channels.length; ++i) { + channel = channels[i]; + t1 = false; + if (!channel.get$isSpecialNumber()) + if (!(channel instanceof A.SassNumber)) + t1 = !(channel instanceof A.SassString && !channel._hasQuotes && channel._string$_text.toLowerCase() === "none"); + if (t1) { + t1 = _null; + if (space == null) + channelName = t1; + else { + t2 = space._channels; + t2 = i < 3 ? t2[i] : _null; + if (!(t2 == null)) + t1 = new A._parseChannels_closure().call$1(t2.name); + channelName = t1; + } + if (channelName == null) + channelName = "channel " + (i + 1); + throw A.wrapException(A.SassScriptException$("Expected " + channelName + " to be a number, was " + channel.toString$0(0) + ".", $name)); + } + } + break $label0$0; + } + throw A.wrapException("unreachable"); + } + t1 = alphaValue == null; + t2 = t1 ? _null : alphaValue.get$isSpecialNumber(); + if (t2 === true) { + if (channels.length === 3 && B.Set_2Dcfy.contains$1(0, space)) { + t1 = A.List_List$of(channels, true, type$.Value); + alphaValue.toString; + t1.push(alphaValue); + t1 = A._functionString(functionName, t1); + } else + t1 = A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + return t1; + } + $label1$1: { + if (t1) { + t2 = 1; + break $label1$1; + } + if (alphaValue instanceof A.SassString && !alphaValue._hasQuotes && "none" === alphaValue._string$_text) { + t2 = _null; + break $label1$1; + } + t2 = A._percentageOrUnitless(alphaValue.assertNumber$1($name), 1, "alpha"); + t2 = isNaN(t2) ? 0 : B.JSNumber_methods.clamp$2(t2, 0, 1); + break $label1$1; + } + if (space == null) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + if (B.JSArray_methods.any$1(channels, new A._parseChannels_closure0())) { + if (channels.length === 3 && B.Set_2Dcfy.contains$1(0, space)) { + t2 = A.List_List$of(channels, true, type$.Value); + if (!t1) + t2.push(alphaValue); + t1 = A._functionString(functionName, t2); + } else + t1 = A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + return t1; + } + if (channels.length !== 3) + throw A.wrapException(A.SassScriptException$("The " + space.toString$0(0) + " color space has 3 channels but " + input.toString$0(0) + " has " + channels.length + ".", $name)); + t1 = channels[0]; + t1 = t1 instanceof A.SassNumber ? t1 : _null; + t3 = channels[1]; + t3 = t3 instanceof A.SassNumber ? t3 : _null; + t4 = channels[2]; + t4 = t4 instanceof A.SassNumber ? t4 : _null; + return A._colorFromChannels(space, t1, t3, t4, t2, true, space === B.RgbColorSpace_mlz); + }, + _parseSlashChannels(input, $name) { + var _1_1, alphaValue, t1, components, _1_7, _1_9_isSet, _1_8, _1_9, initial, t2, _0_0, _0_1, channel3, alpha, _1_16, _1_16_isSet, _1_9_isSet0, t3, _null = null, + _1_0 = input.assertCommonListStyle$2$allowSlash($name, true); + $label0$0: { + _1_1 = _1_0.length; + alphaValue = _null; + t1 = false; + if (_1_1 === 2) { + components = _1_0[0]; + alphaValue = _1_0[1]; + t1 = input.get$separator(input) === B.ListSeparator_cQA; + } else + components = _null; + if (t1) { + t1 = new A._Record_2(components, alphaValue); + break $label0$0; + } + t1 = input.get$separator(input); + if (t1 === B.ListSeparator_cQA) { + t1 = _1_0.length; + A.throwExpression(A.SassScriptException$(string$.Only_2 + t1 + " " + A.pluralize("was", t1, "were") + " passed.", $name)); + } + _1_7 = _1_1 >= 1; + _1_9_isSet = _1_7; + _1_8 = _null; + _1_9 = _null; + initial = _null; + t1 = false; + if (_1_9_isSet) { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + if (t2 instanceof A.SassString) { + type$.SassString._as(_1_9); + t1 = !_1_9._hasQuotes; + } + } + if (t1) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + } + _0_0 = type$.SassString._as(t1)._string$_text.split("/"); + $label1$1: { + _0_1 = _0_0.length; + if (_0_1 === 1) { + t1 = new A._Record_2(input, _null); + break $label1$1; + } + if (_0_1 === 2) { + channel3 = _0_0[0]; + alpha = _0_0[1]; + t1 = A.List_List$of(initial, true, type$.Value); + t1.push(A._parseNumberOrString(channel3)); + t1 = new A._Record_2(A.SassList$(t1, B.ListSeparator_nbm, false), A._parseNumberOrString(alpha)); + break $label1$1; + } + t1 = _null; + break $label1$1; + } + break $label0$0; + } + _1_16 = _null; + _1_16_isSet = false; + t1 = false; + if (_1_7) { + _1_9_isSet0 = true; + if (_1_9_isSet) + initial = _1_8; + else { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + } + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16_isSet = t2 instanceof A.SassNumber; + if (_1_16_isSet) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16 = type$.SassNumber._as(t1).asSlash; + t1 = _1_16; + t1 = type$.Record_2_nullable_Object_and_nullable_Object._is(t1); + } + } else + initial = _null; + if (t1) { + if (_1_16_isSet) + t1 = _1_16; + else { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = true; + } + _1_16 = type$.SassNumber._as(t1).asSlash; + t1 = _1_16; + _1_16_isSet = true; + } + if (t1 == null) + t1 = type$.Record_2_nullable_Object_and_nullable_Object._as(t1); + if (_1_16_isSet) + t2 = _1_16; + else { + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + } + _1_16 = type$.SassNumber._as(t2).asSlash; + t2 = _1_16; + } + if (t2 == null) + t2 = type$.Record_2_nullable_Object_and_nullable_Object._as(t2); + t3 = A.List_List$of(initial, true, type$.Value); + t3.push(t1._0); + t2 = new A._Record_2(A.SassList$(t3, B.ListSeparator_nbm, false), t2._1); + t1 = t2; + break $label0$0; + } + t1 = new A._Record_2(input, _null); + break $label0$0; + } + return t1; + }, + _parseNumberOrString(text) { + var t1, expression, exception; + try { + t1 = A.ScssParser$(text, null, null); + expression = t1._parseSingleProduction$1$1(t1.get$_number(), type$.NumberExpression); + t1 = A.SassNumber_SassNumber(expression.value, expression.unit); + return t1; + } catch (exception) { + if (type$.SassFormatException._is(A.unwrapException(exception))) + return new A.SassString(text, false); + else + throw exception; + } + }, + _colorFromChannels(space, channel0, channel1, channel2, alpha, clamp, fromRgbFunction) { + var t1, t2, whiteness, blackness, t3; + switch (space) { + case B.HslColorSpace_gsm: + if (channel1 != null) + A._checkPercent(channel1, "saturation"); + if (channel2 != null) + A._checkPercent(channel2, "lightness"); + t1 = space._channels; + return A.SassColor_SassColor$hsl(A.NullableExtension_andThen(channel0, new A._colorFromChannels_closure()), A._channelFromValue(t1[1], A._forcePercent(channel1), clamp), A._channelFromValue(t1[2], A._forcePercent(channel2), clamp), alpha); + case B.HwbColorSpace_06z: + t1 = channel1 == null; + if (!t1) + channel1.assertUnit$2("%", "whiteness"); + t2 = channel2 == null; + if (!t2) + channel2.assertUnit$2("%", "blackness"); + whiteness = t1 ? null : channel1._number$_value; + blackness = t2 ? null : channel2._number$_value; + if (whiteness != null && blackness != null && whiteness + blackness > 100) { + t1 = whiteness + blackness; + whiteness = whiteness / t1 * 100; + blackness = blackness / t1 * 100; + } + return A.SassColor_SassColor$hwb(A.NullableExtension_andThen(channel0, new A._colorFromChannels_closure0()), whiteness, blackness, alpha); + case B.RgbColorSpace_mlz: + t1 = space._channels; + t2 = A._channelFromValue(t1[0], channel0, clamp); + t3 = A._channelFromValue(t1[1], channel1, clamp); + t1 = A._channelFromValue(t1[2], channel2, clamp); + return A.SassColor_SassColor$rgbInternal(t2, t3, t1, alpha, fromRgbFunction ? B.C__ColorFormatEnum : null); + default: + t1 = space._channels; + return A.SassColor_SassColor$forSpaceInternal(space, A._channelFromValue(t1[0], channel0, clamp), A._channelFromValue(t1[1], channel1, clamp), A._channelFromValue(t1[2], channel2, clamp), alpha); + } + }, + _forcePercent(number) { + var t1, _0_3; + $label0$0: { + if (number == null) { + t1 = null; + break $label0$0; + } + _0_3 = number.get$numeratorUnits(number); + if (_0_3.length === 1) + t1 = "%" === _0_3[0] && number.get$denominatorUnits(number).length <= 0; + else + t1 = false; + if (t1) { + t1 = number; + break $label0$0; + } + t1 = A.SassNumber_SassNumber(number._number$_value, "%"); + break $label0$0; + } + return t1; + }, + _channelFromValue(channel, value, clamp) { + return A.NullableExtension_andThen(value, new A._channelFromValue_closure(channel, clamp)); + }, + _isNone(value) { + return value instanceof A.SassString && !value._hasQuotes && value._string$_text.toLowerCase() === "none"; + }, + _channelFunction($name, space, getter, global, unit) { + return A.BuiltInCallable$function($name, "$color", new A._channelFunction_closure(getter, unit, global, $name, space), "sass:color"); + }, + _suggestScaleAndAdjust(original, adjustment, channelName) { + var t2, oldValue, newValue, factor, t3, suggestion, + channel = channelName === "alpha" ? B.LinearChannel_omH : type$.LinearChannel._as(B.JSArray_methods.firstWhere$1(B.List_8aB, new A._suggestScaleAndAdjust_closure(channelName))), + t1 = channel === B.LinearChannel_omH; + if (t1) { + t2 = original.alphaOrNull; + oldValue = t2 == null ? 0 : t2; + } else + oldValue = original.toSpace$1(B.HslColorSpace_gsm).channel$1(0, channelName); + newValue = oldValue + adjustment; + if (adjustment !== 0) { + factor = A._Cell$(); + t2 = channel.max; + if (newValue > t2) + factor.__late_helper$_value = 1; + else { + t3 = channel.min; + if (newValue < t3) + factor.__late_helper$_value = -1; + else if (adjustment > 0) + factor.__late_helper$_value = adjustment / (t2 - oldValue); + else + factor.__late_helper$_value = (newValue - oldValue) / (oldValue - t3); + } + suggestion = "Suggestion" + ("s:\n\ncolor.scale($color, $" + channelName + ": " + A.SassNumber_SassNumber(factor._readLocal$0() * 100, "%").toString$0(0) + ")\n"); + } else + suggestion = "Suggestion:\n\n"; + return suggestion + ("color.adjust($color, $" + channelName + ": " + A.SassNumber_SassNumber(adjustment, t1 ? null : "%").toString$0(0) + ")"); + }, + _missingChannelError(color, channel) { + return A.throwExpression(A.SassScriptException$(string$.Becaus + color.toString$0(0) + ").", channel)); + }, + _channelName(value) { + var t1 = value.assertString$1("channel"); + t1.assertQuoted$1("channel"); + return t1._string$_text; + }, + _function5($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:color"); + }, + global_closure0: function global_closure0() { + }, + global_closure1: function global_closure1() { + }, + global_closure2: function global_closure2() { + }, + global_closure3: function global_closure3() { + }, + global_closure4: function global_closure4() { + }, + global_closure5: function global_closure5() { + }, + global_closure6: function global_closure6() { + }, + global_closure7: function global_closure7() { + }, + global_closure8: function global_closure8() { + }, + global_closure9: function global_closure9() { + }, + global_closure10: function global_closure10() { + }, + global_closure11: function global_closure11() { + }, + global_closure12: function global_closure12() { + }, + global_closure13: function global_closure13() { + }, + global_closure14: function global_closure14() { + }, + global_closure15: function global_closure15() { + }, + global_closure16: function global_closure16() { + }, + global_closure17: function global_closure17() { + }, + global_closure18: function global_closure18() { + }, + global_closure19: function global_closure19() { + }, + global_closure20: function global_closure20() { + }, + global_closure21: function global_closure21() { + }, + global_closure22: function global_closure22() { + }, + global_closure23: function global_closure23() { + }, + global_closure24: function global_closure24() { + }, + global_closure25: function global_closure25() { + }, + global_closure26: function global_closure26() { + }, + global_closure27: function global_closure27() { + }, + global_closure28: function global_closure28() { + }, + global_closure29: function global_closure29() { + }, + global_closure30: function global_closure30() { + }, + global_closure31: function global_closure31() { + }, + global_closure32: function global_closure32() { + }, + global_closure33: function global_closure33() { + }, + global_closure34: function global_closure34() { + }, + global_closure35: function global_closure35() { + }, + global__closure: function global__closure() { + }, + global_closure36: function global_closure36() { + }, + global_closure37: function global_closure37() { + }, + global_closure38: function global_closure38() { + }, + global_closure39: function global_closure39() { + }, + global_closure40: function global_closure40() { + }, + global_closure41: function global_closure41() { + }, + global_closure42: function global_closure42() { + }, + module_closure1: function module_closure1() { + }, + module_closure2: function module_closure2() { + }, + module_closure3: function module_closure3() { + }, + module_closure4: function module_closure4() { + }, + module_closure5: function module_closure5() { + }, + module_closure6: function module_closure6() { + }, + module_closure7: function module_closure7() { + }, + module_closure8: function module_closure8() { + }, + module_closure9: function module_closure9() { + }, + module_closure10: function module_closure10() { + }, + module_closure11: function module_closure11() { + }, + module_closure12: function module_closure12() { + }, + module_closure13: function module_closure13() { + }, + module_closure14: function module_closure14() { + }, + module__closure2: function module__closure2() { + }, + module_closure15: function module_closure15() { + }, + module_closure16: function module_closure16() { + }, + module_closure17: function module_closure17() { + }, + module_closure18: function module_closure18() { + }, + module_closure19: function module_closure19() { + }, + module_closure20: function module_closure20() { + }, + module_closure21: function module_closure21() { + }, + module_closure22: function module_closure22() { + }, + module__closure1: function module__closure1(t0) { + this.channelName = t0; + }, + module_closure23: function module_closure23() { + }, + module_closure_toXyzNoMissing: function module_closure_toXyzNoMissing() { + }, + module_closure24: function module_closure24() { + }, + _mix_closure: function _mix_closure() { + }, + _complement_closure: function _complement_closure() { + }, + _adjust_closure: function _adjust_closure() { + }, + _scale_closure: function _scale_closure() { + }, + _change_closure: function _change_closure() { + }, + _ieHexStr_closure: function _ieHexStr_closure() { + }, + _ieHexStr_closure_hexString: function _ieHexStr_closure_hexString() { + }, + _updateComponents_closure: function _updateComponents_closure(t0) { + this.originalColor = t0; + }, + _updateComponents_closure0: function _updateComponents_closure0(t0) { + this._box_0 = t0; + }, + _changeColor_closure: function _changeColor_closure(t0) { + this.alphaArg = t0; + }, + _adjustColor_closure: function _adjustColor_closure() { + }, + _functionString_closure: function _functionString_closure() { + }, + _removedColorFunction_closure: function _removedColorFunction_closure(t0, t1, t2) { + this.name = t0; + this.argument = t1; + this.negative = t2; + }, + _rgb_closure: function _rgb_closure() { + }, + _hsl_closure: function _hsl_closure() { + }, + _parseChannels_closure: function _parseChannels_closure() { + }, + _parseChannels_closure0: function _parseChannels_closure0() { + }, + _colorFromChannels_closure: function _colorFromChannels_closure() { + }, + _colorFromChannels_closure0: function _colorFromChannels_closure0() { + }, + _channelFromValue_closure: function _channelFromValue_closure(t0, t1) { + this.channel = t0; + this.clamp = t1; + }, + _channelFunction_closure: function _channelFunction_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.getter = t0; + _.unit = t1; + _.global = t2; + _.name = t3; + _.space = t4; + }, + _suggestScaleAndAdjust_closure: function _suggestScaleAndAdjust_closure(t0) { + this.channelName = t0; + }, + _function4($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:list"); + }, + _length_closure0: function _length_closure0() { + }, + _nth_closure: function _nth_closure() { + }, + _setNth_closure: function _setNth_closure() { + }, + _join_closure: function _join_closure() { + }, + _append_closure0: function _append_closure0() { + }, + _zip_closure: function _zip_closure() { + }, + _zip__closure: function _zip__closure() { + }, + _zip__closure0: function _zip__closure0(t0) { + this._box_0 = t0; + }, + _zip__closure1: function _zip__closure1(t0) { + this._box_0 = t0; + }, + _index_closure0: function _index_closure0() { + }, + _separator_closure: function _separator_closure() { + }, + _isBracketed_closure: function _isBracketed_closure() { + }, + _slash_closure: function _slash_closure() { + }, + _modify(map, keys, modify, addNesting) { + var keyIterator = J.get$iterator$ax(keys); + return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); + }, + _deepMergeImpl(map1, map2) { + var t2, t3, result, t4, key, value, _1_1, _1_3, _1_3_isSet, _1_30, resultMap, valueMap, merged, + t1 = map1._map$_contents; + if (t1.get$isEmpty(t1)) + return map2; + t2 = map2._map$_contents; + if (t2.get$isEmpty(t2)) + return map1; + t3 = type$.Value; + result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); + for (t1 = A.MapExtensions_get_pairs(t2, t3, t3), t1 = t1.get$iterator(t1), t2 = type$.SassMap; t1.moveNext$0();) { + t4 = t1.get$current(t1); + key = t4._0; + value = t4._1; + t4 = result.$index(0, key); + _1_1 = t4 == null ? null : t4.tryMap$0(); + _1_3 = value.tryMap$0(); + _1_3_isSet = _1_1 != null; + _1_30 = null; + t4 = false; + if (_1_3_isSet) { + resultMap = _1_1 == null ? t2._as(_1_1) : _1_1; + t4 = _1_3 != null; + _1_30 = _1_3; + } else + resultMap = null; + if (t4) { + valueMap = _1_3_isSet ? _1_30 : _1_3; + merged = A._deepMergeImpl(resultMap, valueMap == null ? t2._as(valueMap) : valueMap); + if (merged === resultMap) + continue; + result.$indexSet(0, key, merged); + } else + result.$indexSet(0, key, value); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(result, t3, t3)); + }, + _function3($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:map"); + }, + _get_closure: function _get_closure() { + }, + _set_closure: function _set_closure() { + }, + _set__closure0: function _set__closure0(t0) { + this.$arguments = t0; + }, + _set_closure0: function _set_closure0() { + }, + _set__closure: function _set__closure(t0) { + this._box_0 = t0; + }, + _merge_closure: function _merge_closure() { + }, + _merge_closure0: function _merge_closure0() { + }, + _merge__closure: function _merge__closure(t0) { + this.map2 = t0; + }, + _deepMerge_closure: function _deepMerge_closure() { + }, + _deepRemove_closure: function _deepRemove_closure() { + }, + _deepRemove__closure: function _deepRemove__closure(t0) { + this.keys = t0; + }, + _remove_closure: function _remove_closure() { + }, + _remove_closure0: function _remove_closure0() { + }, + _keys_closure: function _keys_closure() { + }, + _values_closure: function _values_closure() { + }, + _hasKey_closure: function _hasKey_closure() { + }, + _modify_modifyNestedMap: function _modify_modifyNestedMap(t0, t1, t2) { + this.keyIterator = t0; + this.modify = t1; + this.addNesting = t2; + }, + _singleArgumentMathFunc($name, mathFunc) { + return A.BuiltInCallable$function($name, "$number", new A._singleArgumentMathFunc_closure(mathFunc), "sass:math"); + }, + _numberFunction($name, transform) { + return A.BuiltInCallable$function($name, "$number", new A._numberFunction_closure(transform), "sass:math"); + }, + _function2($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:math"); + }, + global_closure: function global_closure() { + }, + module_closure0: function module_closure0() { + }, + _ceil_closure: function _ceil_closure() { + }, + _clamp_closure: function _clamp_closure() { + }, + _floor_closure: function _floor_closure() { + }, + _max_closure: function _max_closure() { + }, + _min_closure: function _min_closure() { + }, + _round_closure: function _round_closure() { + }, + _hypot_closure: function _hypot_closure() { + }, + _hypot__closure: function _hypot__closure() { + }, + _log_closure: function _log_closure() { + }, + _pow_closure: function _pow_closure() { + }, + _atan2_closure: function _atan2_closure() { + }, + _compatible_closure: function _compatible_closure() { + }, + _isUnitless_closure: function _isUnitless_closure() { + }, + _unit_closure: function _unit_closure() { + }, + _percentage_closure: function _percentage_closure() { + }, + _randomFunction_closure: function _randomFunction_closure() { + }, + _div_closure: function _div_closure() { + }, + _singleArgumentMathFunc_closure: function _singleArgumentMathFunc_closure(t0) { + this.mathFunc = t0; + }, + _numberFunction_closure: function _numberFunction_closure(t0) { + this.transform = t0; + }, + _function($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:meta"); + }, + _shared_closure: function _shared_closure() { + }, + _shared_closure0: function _shared_closure0() { + }, + _shared_closure1: function _shared_closure1() { + }, + _shared_closure2: function _shared_closure2() { + }, + moduleFunctions_closure: function moduleFunctions_closure() { + }, + moduleFunctions_closure0: function moduleFunctions_closure0() { + }, + moduleFunctions__closure: function moduleFunctions__closure() { + }, + moduleFunctions_closure1: function moduleFunctions_closure1() { + }, + _prependParent(compound) { + var _0_3, _0_4, _0_40, t2, _0_4_isSet, t3, rest, _null = null, + t1 = A.EvaluationContext_currentOrNull(), + span = (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan(), + _0_0 = compound.components; + $label0$0: { + _0_3 = _0_0.length >= 1; + _0_4 = _null; + if (_0_3) { + _0_40 = _0_0[0]; + t1 = _0_40; + _0_4 = t1; + t1 = t1 instanceof A.UniversalSelector; + } else + t1 = false; + t2 = _null; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + if (_0_3) { + _0_4_isSet = true; + t3 = _0_4; + if (t3 instanceof A.TypeSelector) { + t1 = _0_4; + t1 = type$.TypeSelector._as(t1).name.namespace != null; + } + } else + _0_4_isSet = _0_3; + if (t1) { + t1 = t2; + break $label0$0; + } + if (_0_3) { + if (_0_4_isSet) + t1 = _0_4; + else { + _0_4 = _0_0[0]; + t1 = _0_4; + _0_4_isSet = true; + } + t1 = t1 instanceof A.TypeSelector; + } else + t1 = false; + if (t1) { + t1 = _0_4_isSet ? _0_4 : _0_0[0]; + type$.TypeSelector._as(t1); + rest = B.JSArray_methods.sublist$1(_0_0, 1); + t1 = A._setArrayType([new A.ParentSelector(t1.name.name, span)], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, rest); + t1 = A.CompoundSelector$(t1, span); + break $label0$0; + } + t1 = A._setArrayType([new A.ParentSelector(_null, span)], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, _0_0); + t1 = A.CompoundSelector$(t1, span); + break $label0$0; + } + return t1; + }, + _function1($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:selector"); + }, + _nest_closure: function _nest_closure() { + }, + _nest__closure: function _nest__closure(t0) { + this._box_0 = t0; + }, + _nest__closure0: function _nest__closure0() { + }, + _append_closure: function _append_closure() { + }, + _append__closure: function _append__closure() { + }, + _append__closure0: function _append__closure0(t0) { + this.span = t0; + }, + _append___closure: function _append___closure(t0, t1) { + this.parent = t0; + this.span = t1; + }, + _extend_closure: function _extend_closure() { + }, + _replace_closure: function _replace_closure() { + }, + _unify_closure: function _unify_closure() { + }, + _isSuperselector_closure: function _isSuperselector_closure() { + }, + _simpleSelectors_closure: function _simpleSelectors_closure() { + }, + _simpleSelectors__closure: function _simpleSelectors__closure() { + }, + _parse_closure: function _parse_closure() { + }, + _codepointForIndex(index, lengthInCodepoints, allowNegative) { + var result; + if (index === 0) + return 0; + if (index > 0) + return Math.min(index - 1, lengthInCodepoints); + result = lengthInCodepoints + index; + if (result < 0 && !allowNegative) + return 0; + return result; + }, + _function0($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:string"); + }, + module_closure: function module_closure() { + }, + module__closure: function module__closure(t0) { + this.string = t0; + }, + module__closure0: function module__closure0(t0) { + this.string = t0; + }, + _unquote_closure: function _unquote_closure() { + }, + _quote_closure: function _quote_closure() { + }, + _length_closure: function _length_closure() { + }, + _insert_closure: function _insert_closure() { + }, + _index_closure: function _index_closure() { + }, + _slice_closure: function _slice_closure() { + }, + _toUpperCase_closure: function _toUpperCase_closure() { + }, + _toLowerCase_closure: function _toLowerCase_closure() { + }, + _uniqueId_closure: function _uniqueId_closure() { + }, + ImportCache$(importers, loadPaths, logger) { + var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl, + t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport, + t3 = type$.Uri, + t4 = A.ImportCache__toImporters(importers, loadPaths, null); + return new A.ImportCache(t4, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult)); + }, + ImportCache__toImporters(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_Importer); + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_Importer); + B.JSArray_methods.addAll$1(t1, importers); + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + ImportCache_wrapLogger(logger, silenceDeprecations, fatalDeprecations, futureDeprecations) { + var t3, t4, + t1 = type$.Deprecation, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t4.addAll$1(0, futureDeprecations); + return new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, false); + }, + ImportCache: function ImportCache(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._importers = t0; + _._logger = t1; + _._canonicalizeCache = t2; + _._perImporterCanonicalizeCache = t3; + _._nonCanonicalRelativeUrls = t4; + _._importCache = t5; + _._resultsCache = t6; + }, + ImportCache_canonicalize_closure: function ImportCache_canonicalize_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + ImportCache__canonicalize_closure: function ImportCache__canonicalize_closure(t0, t1) { + this.importer = t0; + this.url = t1; + }, + ImportCache_importCanonical_closure: function ImportCache_importCanonical_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + ImportCache_humanize_closure: function ImportCache_humanize_closure(t0) { + this.canonicalUrl = t0; + }, + ImportCache_humanize_closure0: function ImportCache_humanize_closure0() { + }, + ImportCache_humanize_closure1: function ImportCache_humanize_closure1() { + }, + ImportCache_humanize_closure2: function ImportCache_humanize_closure2(t0) { + this.canonicalUrl = t0; + }, + ImportCache_clearCanonicalize_closure: function ImportCache_clearCanonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + Importer: function Importer() { + }, + AsyncImporter: function AsyncImporter() { + }, + CanonicalizeContext: function CanonicalizeContext(t0, t1) { + this._fromImport = t0; + this._containingUrl = t1; + this._wasContainingUrlAccessed = false; + }, + FilesystemImporter: function FilesystemImporter(t0, t1) { + this._loadPath = t0; + this._loadPathDeprecated = t1; + }, + FilesystemImporter_canonicalize_closure: function FilesystemImporter_canonicalize_closure() { + }, + NoOpImporter: function NoOpImporter() { + }, + NodePackageImporter: function NodePackageImporter() { + this.__NodePackageImporter__entryPointDirectory_F = $; + }, + NodePackageImporter__nodePackageExportsResolve_closure: function NodePackageImporter__nodePackageExportsResolve_closure() { + }, + NodePackageImporter__nodePackageExportsResolve_closure0: function NodePackageImporter__nodePackageExportsResolve_closure0() { + }, + NodePackageImporter__nodePackageExportsResolve_closure1: function NodePackageImporter__nodePackageExportsResolve_closure1() { + }, + NodePackageImporter__nodePackageExportsResolve_closure2: function NodePackageImporter__nodePackageExportsResolve_closure2(t0, t1, t2) { + this.$this = t0; + this.exports = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure: function NodePackageImporter__nodePackageExportsResolve__closure(t0, t1, t2) { + this.$this = t0; + this.variant = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure0: function NodePackageImporter__nodePackageExportsResolve__closure0() { + }, + NodePackageImporter__getMainExport_closure: function NodePackageImporter__getMainExport_closure() { + }, + ImporterResult: function ImporterResult(t0, t1, t2) { + this.contents = t0; + this._sourceMapUrl = t1; + this.syntax = t2; + }, + fromImport() { + var t1 = type$.nullable_CanonicalizeContext._as($.Zone__current.$index(0, B.Symbol__canonicalizeContext)); + t1 = t1 == null ? null : t1._fromImport; + return t1 === true; + }, + canonicalizeContext() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); + $label0$0: { + if (_0_0 == null) + A.throwExpression(A.StateError$(string$.canoni)); + if (_0_0 instanceof A.CanonicalizeContext) { + t1 = _0_0; + break $label0$0; + } + t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); + } + return t1; + }, + resolveImportPath(path) { + var t1, + extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + if (extension === ".sass" || extension === ".scss" || extension === ".css") { + t1 = A.fromImport() ? new A.resolveImportPath_closure(path, extension).call$0() : null; + return t1 == null ? A._exactlyOne(A._tryPath(path)) : t1; + } + t1 = A.fromImport() ? new A.resolveImportPath_closure0(path).call$0() : null; + if (t1 == null) + t1 = A._exactlyOne(A._tryPathWithExtensions(path)); + return t1 == null ? A._tryPathAsDirectory(path) : t1; + }, + _tryPathWithExtensions(path) { + var result = A._tryPath(path + ".sass"); + B.JSArray_methods.addAll$1(result, A._tryPath(path + ".scss")); + return result.length !== 0 ? result : A._tryPath(path + ".css"); + }, + _tryPath(path) { + var t1 = $.$get$context(), + partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); + t1 = A._setArrayType([], type$.JSArray_String); + if (A.fileExists(partial)) + t1.push(partial); + if (A.fileExists(path)) + t1.push(path); + return t1; + }, + _tryPathAsDirectory(path) { + var t1; + if (!A.dirExists(path)) + return null; + t1 = A.fromImport() ? new A._tryPathAsDirectory_closure(path).call$0() : null; + return t1 == null ? A._exactlyOne(A._tryPathWithExtensions(A.join(path, "index", null))) : t1; + }, + _exactlyOne(paths) { + var _0_1, t1, path; + $label0$0: { + _0_1 = paths.length; + if (_0_1 <= 0) { + t1 = null; + break $label0$0; + } + if (_0_1 === 1) { + path = paths[0]; + t1 = path; + break $label0$0; + } + t1 = A.throwExpression(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure(), type$.String).join$1(0, "\n")); + } + return t1; + }, + resolveImportPath_closure: function resolveImportPath_closure(t0, t1) { + this.path = t0; + this.extension = t1; + }, + resolveImportPath_closure0: function resolveImportPath_closure0(t0) { + this.path = t0; + }, + _tryPathAsDirectory_closure: function _tryPathAsDirectory_closure(t0) { + this.path = t0; + }, + _exactlyOne_closure: function _exactlyOne_closure() { + }, + InterpolationBuffer: function InterpolationBuffer(t0, t1) { + this._interpolation_buffer$_text = t0; + this._interpolation_buffer$_contents = t1; + }, + InterpolationMap$(_interpolation, targetLocations) { + var t1 = A.List_List$unmodifiable(targetLocations, type$.SourceLocation), + t2 = _interpolation.contents.length, + expectedLocations = Math.max(0, t2 - 1); + if (t1.length !== expectedLocations) + A.throwExpression(A.ArgumentError$("InterpolationMap must have " + A.S(expectedLocations) + string$.x20targe + t2 + " components.", null)); + return new A.InterpolationMap(_interpolation, t1); + }, + InterpolationMap: function InterpolationMap(t0, t1) { + this._interpolation = t0; + this._targetLocations = t1; + }, + InterpolationMap_mapException_closure: function InterpolationMap_mapException_closure() { + }, + _realCasePath(path) { + var prefix, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (!t1) + return path; + t1 = A.isNodeJs() ? self.process : _null; + if (J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); + t1 = prefix.length; + if (t1 !== 0 && A.CharacterExtension_get_isAlphabetic(prefix.charCodeAt(0))) + path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); + } + return new A._realCasePath_helper().call$1(path); + }, + _realCasePath_helper: function _realCasePath_helper() { + }, + _realCasePath_helper_closure: function _realCasePath_helper_closure(t0, t1, t2) { + this.helper = t0; + this.dirname = t1; + this.path = t2; + }, + _realCasePath_helper__closure: function _realCasePath_helper__closure(t0) { + this.basename = t0; + }, + printError(message) { + var t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) { + t1 = J.get$stderr$x(t1); + J.write$1$x(t1, A.S(message == null ? "" : message) + "\n"); + } else { + t1 = self.console; + J.error$1$x(t1, message == null ? "" : message); + } + }, + readFile(path) { + var contents, sourceFile, t1, i; + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("readFile() is only supported on Node.js")); + contents = A._asString(A._readFile(path, "utf8")); + if (!B.JSString_methods.contains$1(contents, "\ufffd")) + return contents; + sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); + for (t1 = contents.length, i = 0; i < t1; ++i) { + if (contents.charCodeAt(i) !== 65533) + continue; + throw A.wrapException(A.SassException$("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0(), null)); + } + return contents; + }, + _readFile(path, encoding) { + return A._systemErrorToFileSystemException(new A._readFile_closure(path, encoding)); + }, + writeFile(path, contents) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("writeFile() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.writeFile_closure(path, contents)); + }, + deleteFile(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("deleteFile() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.deleteFile_closure(path)); + }, + readStdin() { + return A.readStdin$body(); + }, + readStdin$body() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, t3, completer, sink, t1, t2; + var $async$readStdin = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = A.isNodeJs() ? self.process : null; + if (t2 == null) + throw A.wrapException(A.UnsupportedError$("readStdin() is only supported on Node.js")); + t3 = new A._Future($.Zone__current, type$._Future_String); + completer = new A._AsyncCompleter(t3, type$._AsyncCompleter_String); + t1.contents = null; + sink = new A._StringCallbackSink(new A.readStdin_closure(t1, completer), new A.StringBuffer("")).asUtf8Sink$1(false); + t1 = J.getInterceptor$x(t2); + J.on$2$x(t1.get$stdin(t2), "data", A.allowInterop(new A.readStdin_closure0(sink))); + J.on$2$x(t1.get$stdin(t2), "end", A.allowInterop(new A.readStdin_closure1(sink))); + J.on$2$x(t1.get$stdin(t2), "error", A.allowInterop(new A.readStdin_closure2(completer))); + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$readStdin, $async$completer); + }, + fileExists(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$(string$.fileEx)); + return A._systemErrorToFileSystemException(new A.fileExists_closure(path)); + }, + dirExists(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("dirExists() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.dirExists_closure(path)); + }, + ensureDir(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("ensureDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.ensureDir_closure(path)); + }, + listDir(path, recursive) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.listDir_closure(recursive, path)); + }, + modificationTime(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("modificationTime() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.modificationTime_closure(path)); + }, + getEnvironmentVariable($name) { + var t1 = A.isNodeJs() ? self.process : null, + env = t1 == null ? null : J.get$env$x(t1); + if (env == null) + t1 = null; + else + t1 = A._asStringQ(env[$name]); + return t1; + }, + _systemErrorToFileSystemException(callback) { + var error, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + if (!type$.JsSystemError._is(error)) + throw exception; + t1 = error; + t2 = J.getInterceptor$x(t1); + throw A.wrapException(new A.FileSystemException(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); + } + }, + hasTerminal() { + var t1 = A.isNodeJs() ? self.process : null; + return J.$eq$(t1 == null ? null : J.get$isTTY$x(J.get$stdout$x(t1)), true); + }, + isWindows() { + var t1 = A.isNodeJs() ? self.process : null; + return J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32"); + }, + watchDir(path, poll) { + var watcher, t2, t3, t1 = {}; + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("watchDir() is only supported on Node.js")); + watcher = J.watch$2$x(self.chokidar, path, {usePolling: poll}); + t1.controller = null; + t2 = J.getInterceptor$x(watcher); + t2.on$2(watcher, "add", A.allowInterop(new A.watchDir_closure(t1))); + t2.on$2(watcher, "change", A.allowInterop(new A.watchDir_closure0(t1))); + t2.on$2(watcher, "unlink", A.allowInterop(new A.watchDir_closure1(t1))); + t2.on$2(watcher, "error", A.allowInterop(new A.watchDir_closure2(t1))); + t3 = new A._Future($.Zone__current, type$._Future_Stream_WatchEvent); + t2.on$2(watcher, "ready", A.allowInterop(new A.watchDir_closure3(t1, watcher, new A._AsyncCompleter(t3, type$._AsyncCompleter_Stream_WatchEvent)))); + return t3; + }, + FileSystemException: function FileSystemException(t0, t1) { + this.message = t0; + this.path = t1; + }, + _readFile_closure: function _readFile_closure(t0, t1) { + this.path = t0; + this.encoding = t1; + }, + writeFile_closure: function writeFile_closure(t0, t1) { + this.path = t0; + this.contents = t1; + }, + deleteFile_closure: function deleteFile_closure(t0) { + this.path = t0; + }, + readStdin_closure: function readStdin_closure(t0, t1) { + this._box_0 = t0; + this.completer = t1; + }, + readStdin_closure0: function readStdin_closure0(t0) { + this.sink = t0; + }, + readStdin_closure1: function readStdin_closure1(t0) { + this.sink = t0; + }, + readStdin_closure2: function readStdin_closure2(t0) { + this.completer = t0; + }, + fileExists_closure: function fileExists_closure(t0) { + this.path = t0; + }, + dirExists_closure: function dirExists_closure(t0) { + this.path = t0; + }, + ensureDir_closure: function ensureDir_closure(t0) { + this.path = t0; + }, + listDir_closure: function listDir_closure(t0, t1) { + this.recursive = t0; + this.path = t1; + }, + listDir__closure: function listDir__closure(t0) { + this.path = t0; + }, + listDir__closure0: function listDir__closure0() { + }, + listDir_closure_list: function listDir_closure_list() { + }, + listDir__list_closure: function listDir__list_closure(t0, t1) { + this.parent = t0; + this.list = t1; + }, + modificationTime_closure: function modificationTime_closure(t0) { + this.path = t0; + }, + watchDir_closure: function watchDir_closure(t0) { + this._box_0 = t0; + }, + watchDir_closure0: function watchDir_closure0(t0) { + this._box_0 = t0; + }, + watchDir_closure1: function watchDir_closure1(t0) { + this._box_0 = t0; + }, + watchDir_closure2: function watchDir_closure2(t0) { + this._box_0 = t0; + }, + watchDir_closure3: function watchDir_closure3(t0, t1, t2) { + this._box_0 = t0; + this.watcher = t1; + this.completer = t2; + }, + watchDir__closure: function watchDir__closure(t0) { + this.watcher = t0; + }, + JSArray0: function JSArray0() { + }, + Chokidar: function Chokidar() { + }, + ChokidarOptions: function ChokidarOptions() { + }, + ChokidarWatcher: function ChokidarWatcher() { + }, + JSFunction: function JSFunction() { + }, + ImmutableList: function ImmutableList() { + }, + ImmutableMap: function ImmutableMap() { + }, + NodeImporterResult: function NodeImporterResult() { + }, + RenderContext: function RenderContext() { + }, + RenderContextOptions: function RenderContextOptions() { + }, + RenderContextResult: function RenderContextResult() { + }, + RenderContextResultStats: function RenderContextResultStats() { + }, + JSModule: function JSModule() { + }, + JSModuleRequire: function JSModuleRequire() { + }, + JSClass: function JSClass() { + }, + JSUrl: function JSUrl() { + }, + jsThrow0(error) { + return type$.Never._as($.$get$_jsThrow0().call$1(error)); + }, + _PropertyDescriptor: function _PropertyDescriptor() { + }, + _RequireMain: function _RequireMain() { + }, + WarnForDeprecation_warnForDeprecation(_this, deprecation, message, span, trace) { + if (deprecation.isFuture && !(_this instanceof A.DeprecationProcessingLogger)) + return; + if (_this instanceof A.DeprecationProcessingLogger) + _this.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + else + _this.warn$4$deprecation$span$trace(0, message, true, span, trace); + }, + LoggerWithDeprecationType0: function LoggerWithDeprecationType0() { + }, + _QuietLogger: function _QuietLogger() { + }, + DeprecationProcessingLogger: function DeprecationProcessingLogger(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._warningCounts = t0; + _._inner = t1; + _.silenceDeprecations = t2; + _.fatalDeprecations = t3; + _.futureDeprecations = t4; + _.limitRepetition = t5; + }, + DeprecationProcessingLogger_summarize_closure: function DeprecationProcessingLogger_summarize_closure() { + }, + DeprecationProcessingLogger_summarize_closure0: function DeprecationProcessingLogger_summarize_closure0() { + }, + StderrLogger: function StderrLogger(t0) { + this.color = t0; + }, + TrackingLogger: function TrackingLogger(t0) { + this._tracking$_logger = t0; + this._emittedDebug = this._emittedWarning = false; + }, + BuiltInModule$($name, functions, mixins, variables, $T) { + var t1 = A._Uri__Uri(null, $name, null, "sass"), + t2 = A.BuiltInModule__callableMap(functions, $T), + t3 = A.BuiltInModule__callableMap(mixins, $T), + t4 = variables == null ? B.Map_empty5 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value); + return new A.BuiltInModule(t1, t2, t3, t4, $T._eval$1("BuiltInModule<0>")); + }, + BuiltInModule__callableMap(callables, $T) { + var t2, _i, callable, + t1 = type$.String; + if (callables == null) + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + else { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { + callable = callables[_i]; + t1.$indexSet(0, J.get$name$x(callable), callable); + } + t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + } + return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + }, + BuiltInModule: function BuiltInModule(t0, t1, t2, t3, t4) { + var _ = this; + _.url = t0; + _.functions = t1; + _.mixins = t2; + _.variables = t3; + _.$ti = t4; + }, + ForwardedModuleView_ifNecessary(inner, rule, $T) { + var t2, + t1 = false; + if (rule.prefix == null) + if (rule.shownMixinsAndFunctions == null) + if (rule.shownVariables == null) { + t2 = rule.hiddenMixinsAndFunctions; + t2 = t2 == null ? null : t2._base.get$isEmpty(0); + if (t2 === true) { + t1 = rule.hiddenVariables; + t1 = t1 == null ? null : t1._base.get$isEmpty(0); + t1 = t1 === true; + } + } + if (t1) + return inner; + else + return A.ForwardedModuleView$(inner, rule, $T); + }, + ForwardedModuleView$(_inner, _rule, $T) { + var t1 = _rule.prefix, + t2 = _rule.shownVariables, + t3 = _rule.hiddenVariables, + t4 = _rule.shownMixinsAndFunctions, + t5 = _rule.hiddenMixinsAndFunctions; + return new A.ForwardedModuleView(_inner, _rule, A.ForwardedModuleView__forwardedMap(_inner.get$variables(), t1, t2, t3, type$.Value), A.ForwardedModuleView__forwardedMap(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode), A.ForwardedModuleView__forwardedMap(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView<0>")); + }, + ForwardedModuleView__forwardedMap(map, prefix, safelist, blocklist, $V) { + var t1 = prefix == null, + t2 = false; + if (t1) + if (safelist == null) + t2 = blocklist == null || blocklist._base.get$isEmpty(0); + if (t2) + return map; + if (!t1) + map = new A.PrefixedMapView(map, prefix, $V._eval$1("PrefixedMapView<0>")); + if (safelist != null) + map = new A.LimitedMapView(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView<1,2>")); + else if (blocklist != null && blocklist._base.get$isNotEmpty(0)) + map = A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); + return map; + }, + ForwardedModuleView: function ForwardedModuleView(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._forwarded_view$_inner = t0; + _._rule = t1; + _.variables = t2; + _.variableNodes = t3; + _.functions = t4; + _.mixins = t5; + _.$ti = t6; + }, + ShadowedModuleView_ifNecessary(inner, functions, mixins, variables, $T) { + return A.ShadowedModuleView__needsBlocklist(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist(inner.get$mixins(), mixins) ? new A.ShadowedModuleView(inner, A.ShadowedModuleView__shadowedMap(inner.get$variables(), variables, type$.Value), A.ShadowedModuleView__shadowedMap(inner.get$variableNodes(), variables, type$.AstNode), A.ShadowedModuleView__shadowedMap(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView<0>")) : null; + }, + ShadowedModuleView__shadowedMap(map, blocklist, $V) { + var t1 = A.ShadowedModuleView__needsBlocklist(map, blocklist); + return !t1 ? map : A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); + }, + ShadowedModuleView__needsBlocklist(map, blocklist) { + return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); + }, + ShadowedModuleView: function ShadowedModuleView(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._shadowed_view$_inner = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.$ti = t5; + }, + AtRootQueryParser$(contents, logger, url) { + var t1 = A.SpanScanner$(contents, url); + return new A.AtRootQueryParser(t1, logger, null); + }, + AtRootQueryParser: function AtRootQueryParser(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._interpolationMap = t2; + }, + AtRootQueryParser_parse_closure: function AtRootQueryParser_parse_closure(t0) { + this.$this = t0; + }, + _disallowedFunctionNames_closure: function _disallowedFunctionNames_closure() { + }, + CssParser: function CssParser(t0, t1, t2, t3) { + var _ = this; + _._isUseAllowed = true; + _._inExpression = _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + _._interpolationMap = t3; + }, + KeyframeSelectorParser$(contents, interpolationMap, logger) { + var t1 = A.SpanScanner$(contents, null); + return new A.KeyframeSelectorParser(t1, logger, interpolationMap); + }, + KeyframeSelectorParser: function KeyframeSelectorParser(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._interpolationMap = t2; + }, + KeyframeSelectorParser_parse_closure: function KeyframeSelectorParser_parse_closure(t0) { + this.$this = t0; + }, + MediaQueryParser: function MediaQueryParser(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._interpolationMap = t2; + }, + MediaQueryParser_parse_closure: function MediaQueryParser_parse_closure(t0) { + this.$this = t0; + }, + Parser_isIdentifier(text) { + var t1, t2, exception, logger = null; + try { + t1 = logger; + t2 = A.SpanScanner$(text, null); + new A.Parser(t2, t1 == null ? B.StderrLogger_false : t1, null)._parseIdentifier$0(); + return true; + } catch (exception) { + if (type$.SassFormatException._is(A.unwrapException(exception))) + return false; + else + throw exception; + } + }, + Parser: function Parser(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._interpolationMap = t2; + }, + Parser__parseIdentifier_closure: function Parser__parseIdentifier_closure(t0) { + this.$this = t0; + }, + Parser_escape_closure: function Parser_escape_closure() { + }, + Parser_scanIdentChar_matches: function Parser_scanIdentChar_matches(t0, t1) { + this.caseSensitive = t0; + this.char = t1; + }, + Parser_spanFrom_closure: function Parser_spanFrom_closure(t0, t1) { + this.$this = t0; + this.span = t1; + }, + SassParser: function SassParser(t0, t1, t2, t3) { + var _ = this; + _._currentIndentation = 0; + _._spaces = _._nextIndentationEnd = _._nextIndentation = null; + _._isUseAllowed = true; + _._inExpression = _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + _._interpolationMap = t3; + }, + SassParser_styleRuleSelector_closure: function SassParser_styleRuleSelector_closure() { + }, + SassParser_children_closure: function SassParser_children_closure(t0, t1, t2) { + this.$this = t0; + this.child = t1; + this.children = t2; + }, + SassParser__peekIndentation_closure: function SassParser__peekIndentation_closure() { + }, + SassParser__peekIndentation_closure0: function SassParser__peekIndentation_closure0() { + }, + ScssParser$(contents, logger, url) { + var t1 = A.SpanScanner$(contents, url), + t2 = logger == null ? B.StderrLogger_false : logger; + return new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration), t1, t2, null); + }, + ScssParser: function ScssParser(t0, t1, t2, t3) { + var _ = this; + _._isUseAllowed = true; + _._inExpression = _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + _._interpolationMap = t3; + }, + SelectorParser$(contents, allowParent, interpolationMap, logger, plainCss, url) { + var t1 = A.SpanScanner$(contents, url); + return new A.SelectorParser(allowParent, plainCss, t1, logger == null ? B.StderrLogger_false : logger, interpolationMap); + }, + SelectorParser: function SelectorParser(t0, t1, t2, t3, t4) { + var _ = this; + _._allowParent = t0; + _._plainCss = t1; + _.scanner = t2; + _.logger = t3; + _._interpolationMap = t4; + }, + SelectorParser_parse_closure: function SelectorParser_parse_closure(t0) { + this.$this = t0; + }, + SelectorParser_parseCompoundSelector_closure: function SelectorParser_parseCompoundSelector_closure(t0) { + this.$this = t0; + }, + StylesheetParser: function StylesheetParser() { + }, + StylesheetParser_parse_closure: function StylesheetParser_parse_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure: function StylesheetParser_parse__closure(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure0: function StylesheetParser_parse__closure0() { + }, + StylesheetParser_parseArgumentDeclaration_closure: function StylesheetParser_parseArgumentDeclaration_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parseVariableDeclaration_closure: function StylesheetParser_parseVariableDeclaration_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parseUseRule_closure: function StylesheetParser_parseUseRule_closure(t0) { + this.$this = t0; + }, + StylesheetParser__parseSingleProduction_closure: function StylesheetParser__parseSingleProduction_closure(t0, t1, t2) { + this.$this = t0; + this.production = t1; + this.T = t2; + }, + StylesheetParser__statement_closure: function StylesheetParser__statement_closure(t0) { + this.$this = t0; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure: function StylesheetParser_variableDeclarationWithoutNamespace_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure0: function StylesheetParser_variableDeclarationWithoutNamespace_closure0(t0) { + this.declaration = t0; + }, + StylesheetParser__styleRule_closure: function StylesheetParser__styleRule_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInStyleRule = t2; + _.start = t3; + }, + StylesheetParser__tryDeclarationChildren_closure: function StylesheetParser__tryDeclarationChildren_closure(t0, t1) { + this.name = t0; + this.value = t1; + }, + StylesheetParser__atRootRule_closure: function StylesheetParser__atRootRule_closure(t0) { + this.query = t0; + }, + StylesheetParser__atRootRule_closure0: function StylesheetParser__atRootRule_closure0() { + }, + StylesheetParser__eachRule_closure: function StylesheetParser__eachRule_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.wasInControlDirective = t1; + _.variables = t2; + _.list = t3; + }, + StylesheetParser__functionRule_closure: function StylesheetParser__functionRule_closure(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.precedingComment = t2; + }, + StylesheetParser__forRule_closure: function StylesheetParser__forRule_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__forRule_closure0: function StylesheetParser__forRule_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInControlDirective = t2; + _.variable = t3; + _.from = t4; + _.to = t5; + }, + StylesheetParser__memberList_closure: function StylesheetParser__memberList_closure(t0, t1, t2) { + this.$this = t0; + this.variables = t1; + this.identifiers = t2; + }, + StylesheetParser__includeRule_closure: function StylesheetParser__includeRule_closure(t0) { + this.contentArguments_ = t0; + }, + StylesheetParser_mediaRule_closure: function StylesheetParser_mediaRule_closure(t0) { + this.query = t0; + }, + StylesheetParser__mixinRule_closure: function StylesheetParser__mixinRule_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.name = t1; + _.$arguments = t2; + _.precedingComment = t3; + }, + StylesheetParser_mozDocumentRule_closure: function StylesheetParser_mozDocumentRule_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.name = t2; + _.value = t3; + }, + StylesheetParser_supportsRule_closure: function StylesheetParser_supportsRule_closure(t0) { + this.condition = t0; + }, + StylesheetParser__whileRule_closure: function StylesheetParser__whileRule_closure(t0, t1, t2) { + this.$this = t0; + this.wasInControlDirective = t1; + this.condition = t2; + }, + StylesheetParser_unknownAtRule_closure: function StylesheetParser_unknownAtRule_closure(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__expression_resetState: function StylesheetParser__expression_resetState(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__expression_resolveOneOperation: function StylesheetParser__expression_resolveOneOperation(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__expression_resolveOperations: function StylesheetParser__expression_resolveOperations(t0, t1) { + this._box_0 = t0; + this.resolveOneOperation = t1; + }, + StylesheetParser__expression_addSingleExpression: function StylesheetParser__expression_addSingleExpression(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resetState = t2; + _.resolveOperations = t3; + }, + StylesheetParser__expression_addOperator: function StylesheetParser__expression_addOperator(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOneOperation = t2; + }, + StylesheetParser__expression_resolveSpaceExpressions: function StylesheetParser__expression_resolveSpaceExpressions(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOperations = t2; + }, + StylesheetParser_expressionUntilComma_closure: function StylesheetParser_expressionUntilComma_closure(t0) { + this.$this = t0; + }, + StylesheetParser__isHexColor_closure: function StylesheetParser__isHexColor_closure() { + }, + StylesheetParser__unicodeRange_closure: function StylesheetParser__unicodeRange_closure() { + }, + StylesheetParser__unicodeRange_closure0: function StylesheetParser__unicodeRange_closure0() { + }, + StylesheetParser_namespacedExpression_closure: function StylesheetParser_namespacedExpression_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_trySpecialFunction_closure: function StylesheetParser_trySpecialFunction_closure() { + }, + StylesheetParser__expressionUntilComparison_closure: function StylesheetParser__expressionUntilComparison_closure(t0) { + this.$this = t0; + }, + StylesheetParser__publicIdentifier_closure: function StylesheetParser__publicIdentifier_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetNode$_(_stylesheet, importer, canonicalUrl, allUpstream) { + var t1 = new A.StylesheetNode(_stylesheet, importer, canonicalUrl, allUpstream._1, allUpstream._0, A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode)); + t1.StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream); + return t1; + }, + StylesheetGraph: function StylesheetGraph(t0, t1, t2) { + this._nodes = t0; + this.importCache = t1; + this._transitiveModificationTimes = t2; + }, + StylesheetGraph_modifiedSince_transitiveModificationTime: function StylesheetGraph_modifiedSince_transitiveModificationTime(t0) { + this.$this = t0; + }, + StylesheetGraph_modifiedSince_transitiveModificationTime_closure: function StylesheetGraph_modifiedSince_transitiveModificationTime_closure(t0, t1) { + this.node = t0; + this.transitiveModificationTime = t1; + }, + StylesheetGraph__add_closure: function StylesheetGraph__add_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.url = t1; + _.baseImporter = t2; + _.baseUrl = t3; + }, + StylesheetGraph_addCanonical_closure: function StylesheetGraph_addCanonical_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + }, + StylesheetGraph_reload_closure: function StylesheetGraph_reload_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.canonicalUrl = t2; + }, + StylesheetGraph__nodeFor_closure: function StylesheetGraph__nodeFor_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.url = t1; + _.baseImporter = t2; + _.baseUrl = t3; + _.forImport = t4; + }, + StylesheetGraph__nodeFor_closure0: function StylesheetGraph__nodeFor_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetNode: function StylesheetNode(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._stylesheet = t0; + _.importer = t1; + _.canonicalUrl = t2; + _._upstream = t3; + _._upstreamImports = t4; + _._downstream = t5; + }, + Syntax_forPath(path) { + var t1, + _0_0 = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + $label0$0: { + if (".sass" === _0_0) { + t1 = B.Syntax_Sass_sass; + break $label0$0; + } + if (".css" === _0_0) { + t1 = B.Syntax_CSS_css; + break $label0$0; + } + t1 = B.Syntax_SCSS_scss; + break $label0$0; + } + return t1; + }, + Syntax: function Syntax(t0, t1) { + this._syntax$_name = t0; + this._name = t1; + }, + Box: function Box(t0, t1) { + this._box$_inner = t0; + this.$ti = t1; + }, + ModifiableBox: function ModifiableBox(t0, t1) { + this.value = t0; + this.$ti = t1; + }, + LazyFileSpan: function LazyFileSpan(t0) { + this._builder = t0; + this._lazy_file_span$_span = null; + }, + LimitedMapView$blocklist(_map, blocklist, $K, $V) { + var t2, key, + t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); + for (t2 = J.get$iterator$ax(_map.get$keys(_map)); t2.moveNext$0();) { + key = t2.get$current(t2); + if (!blocklist.contains$1(0, key)) + t1.add$1(0, key); + } + return new A.LimitedMapView(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView<1,2>")); + }, + LimitedMapView: function LimitedMapView(t0, t1, t2) { + this._limited_map_view$_map = t0; + this._limited_map_view$_keys = t1; + this.$ti = t2; + }, + MapExtensions_get_pairs(_this, $K, $V) { + return _this.get$entries(_this).map$1$1(0, new A.MapExtensions_get_pairs_closure($K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("+(1,2)")); + }, + MapExtensions_get_pairs_closure: function MapExtensions_get_pairs_closure(t0, t1) { + this.K = t0; + this.V = t1; + }, + MergedMapView$(maps, $K, $V) { + var t1 = $K._eval$1("@<0>")._bind$1($V); + t1 = new A.MergedMapView(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView<1,2>")); + t1.MergedMapView$1(maps, $K, $V); + return t1; + }, + MergedMapView: function MergedMapView(t0, t1) { + this._mapsByKey = t0; + this.$ti = t1; + }, + MultiDirWatcher: function MultiDirWatcher(t0, t1, t2) { + this._watchers = t0; + this._group = t1; + this._poll = t2; + }, + MultiSpan: function MultiSpan(t0, t1, t2) { + this._multi_span$_primary = t0; + this.primaryLabel = t1; + this.secondarySpans = t2; + }, + NoSourceMapBuffer: function NoSourceMapBuffer(t0) { + this._no_source_map_buffer$_buffer = t0; + }, + PrefixedMapView: function PrefixedMapView(t0, t1, t2) { + this._prefixed_map_view$_map = t0; + this._prefix = t1; + this.$ti = t2; + }, + _PrefixedKeys: function _PrefixedKeys(t0) { + this._view = t0; + }, + _PrefixedKeys_iterator_closure: function _PrefixedKeys_iterator_closure(t0) { + this.$this = t0; + }, + PublicMemberMapView: function PublicMemberMapView(t0, t1) { + this._public_member_map_view$_inner = t0; + this.$ti = t1; + }, + SourceMapBuffer: function SourceMapBuffer(t0, t1) { + var _ = this; + _._source_map_buffer$_buffer = t0; + _._entries = t1; + _._column = _._line = 0; + _._inSpan = false; + }, + SourceMapBuffer_buildSourceMap_closure: function SourceMapBuffer_buildSourceMap_closure(t0, t1) { + this._box_0 = t0; + this.prefixLength = t1; + }, + UnprefixedMapView: function UnprefixedMapView(t0, t1, t2) { + this._unprefixed_map_view$_map = t0; + this._unprefixed_map_view$_prefix = t1; + this.$ti = t2; + }, + _UnprefixedKeys: function _UnprefixedKeys(t0) { + this._unprefixed_map_view$_view = t0; + }, + _UnprefixedKeys_iterator_closure: function _UnprefixedKeys_iterator_closure(t0) { + this.$this = t0; + }, + _UnprefixedKeys_iterator_closure0: function _UnprefixedKeys_iterator_closure0(t0) { + this.$this = t0; + }, + toSentence(iter, conjunction) { + if (iter.get$length(iter) === 1) + return J.toString$0$(iter.get$first(iter)); + return A.IterableExtension_get_exceptLast(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter.get$last(iter))); + }, + indent(string, indentation) { + return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); + }, + pluralize($name, number, plural) { + if (number === 1) + return $name; + if (plural != null) + return plural; + return $name + "s"; + }, + trimAscii(string, excludeEscape) { + var t1, + start = A._firstNonWhitespace(string); + if (start == null) + t1 = ""; + else { + t1 = A._lastNonWhitespace(string, true); + t1.toString; + t1 = B.JSString_methods.substring$2(string, start, t1 + 1); + } + return t1; + }, + trimAsciiRight(string, excludeEscape) { + var end = A._lastNonWhitespace(string, excludeEscape); + return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); + }, + _firstNonWhitespace(string) { + var t1, i, t2; + for (t1 = string.length, i = 0; i < t1; ++i) { + t2 = string.charCodeAt(i); + if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) + return i; + } + return null; + }, + _lastNonWhitespace(string, excludeEscape) { + var i, i0, codeUnit; + for (i = string.length - 1, i0 = i; i0 >= 0; --i0) { + codeUnit = string.charCodeAt(i0); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + if (excludeEscape && i0 !== 0 && i0 !== i && codeUnit === 92) + return i0 + 1; + else + return i0; + } + return null; + }, + isPublic(member) { + var start = member.charCodeAt(0); + return start !== 45 && start !== 95; + }, + flattenVertically(iterable, $T) { + var result, + t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), + queues = A.List_List$of(new A.MappedListIterable(iterable, new A.flattenVertically_closure($T), t1), true, t1._eval$1("ListIterable.E")); + if (queues.length === 1) + return B.JSArray_methods.get$first(queues); + result = A._setArrayType([], $T._eval$1("JSArray<0>")); + for (; queues.length !== 0;) { + if (!!queues.fixed$length) + A.throwExpression(A.UnsupportedError$("removeWhere")); + B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure0(result, $T), true); + } + return result; + }, + codepointIndexToCodeUnitIndex(string, codepointIndex) { + var codeUnitIndex, i, codeUnitIndex0; + for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { + codeUnitIndex0 = codeUnitIndex + 1; + codeUnitIndex = string.charCodeAt(codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; + } + return codeUnitIndex; + }, + codeUnitIndexToCodepointIndex(string, codeUnitIndex) { + var codepointIndex, i; + for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (string.charCodeAt(i) >>> 10 === 54 ? i + 1 : i) + 1) + ++codepointIndex; + return codepointIndex; + }, + frameForSpan(span, member, url) { + var t2, t3, + t1 = url == null ? span.get$sourceUrl(span) : url; + if (t1 == null) + t1 = $.$get$_noSourceUrl(); + t2 = span.get$start(span); + t2 = t2.file.getLine$1(t2.offset); + t3 = span.get$start(span); + return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); + }, + declarationName(span) { + var text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(span.file._decodedChars, span._file$_start, span._end), 0, null); + return A.trimAsciiRight(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); + }, + unvendor($name) { + var i, + t1 = $name.length; + if (t1 < 2) + return $name; + if ($name.charCodeAt(0) !== 45) + return $name; + if ($name.charCodeAt(1) === 45) + return $name; + for (i = 2; i < t1; ++i) + if ($name.charCodeAt(i) === 45) + return B.JSString_methods.substring$1($name, i + 1); + return $name; + }, + equalsIgnoreCase(string1, string2) { + var t1, i; + if (string1 === string2) + return true; + if (string1 == null) + return false; + t1 = string1.length; + if (t1 !== string2.length) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase(string1.charCodeAt(i), string2.charCodeAt(i))) + return false; + return true; + }, + startsWithIgnoreCase(string, prefix) { + var i, + t1 = prefix.length; + if (string.length < t1) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase(string.charCodeAt(i), prefix.charCodeAt(i))) + return false; + return true; + }, + mapInPlace(list, $function) { + var i; + for (i = 0; i < list.length; ++i) + list[i] = $function.call$1(list[i]); + }, + longestCommonSubsequence(list1, list2, select, $T) { + var t1, _i, selections, i, i0, j, selection, j0, + _length = list1.get$length(0) + 1, + lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); + for (t1 = type$.int, _i = 0; _i < _length; ++_i) + lengths[_i] = A.List_List$filled(((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0) + 1, 0, false, t1); + _length = list1.get$length(0); + selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); + for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) + selections[_i] = A.List_List$filled((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0, null, false, t1); + for (i = 0; i < (list1._queue_list$_tail - list1._queue_list$_head & J.get$length$asx(list1._queue_list$_table) - 1) >>> 0; i = i0) + for (i0 = i + 1, j = 0; j < (list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0; j = j0) { + selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); + selections[i][j] = selection; + t1 = lengths[i0]; + j0 = j + 1; + t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; + } + return new A.longestCommonSubsequence_backtrack(selections, lengths, $T).call$2(list1.get$length(0) - 1, list2.get$length(0) - 1); + }, + removeFirstWhere(list, test, orElse) { + var i; + for (i = 0; i < list.length; ++i) { + if (!test.call$1(list[i])) + continue; + B.JSArray_methods.removeAt$1(list, i); + return; + } + orElse.call$0(); + }, + mapAddAll2(destination, source, K1, K2, $V) { + source.forEach$1(0, new A.mapAddAll2_closure(destination, K1, K2, $V)); + }, + setAll(map, keys, value) { + var t1; + for (t1 = J.get$iterator$ax(keys); t1.moveNext$0();) + map.$indexSet(0, t1.get$current(t1), value); + }, + rotateSlice(list, start, end) { + var i, next, + element = list.$index(0, end - 1); + for (i = start; i < end; ++i, element = next) { + next = list.$index(0, i); + list.$indexSet(0, i, element); + } + }, + mapAsync(iterable, callback, $E, $F) { + return A.mapAsync$body(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); + }, + mapAsync$body(iterable, callback, $E, $F, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t2, _i, t1, $async$temp1; + var $async$mapAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); + t2 = iterable.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$mapAsync, $async$completer); + }, + putIfAbsentAsync(map, key, ifAbsent, $K, $V) { + return A.putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $V); + }, + putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t1, value; + var $async$putIfAbsentAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (map.containsKey$1(key)) { + t1 = map.$index(0, key); + $async$returnValue = t1 == null ? $V._as(t1) : t1; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync); + case 3: + // returning from await. + value = $async$result; + map.$indexSet(0, key, value); + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$putIfAbsentAsync, $async$completer); + }, + copyMapOfMap(map, K1, K2, $V) { + var t3, key, child, + t1 = K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty(K1, t1); + for (t1 = A.MapExtensions_get_pairs(map, K1, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + key = t3._0; + child = t3._1; + t3 = A.LinkedHashMap_LinkedHashMap(null, null, null, K2, $V); + t3.addAll$1(0, child); + t2.$indexSet(0, key, t3); + } + return t2; + }, + copyMapOfList(map, $K, $E) { + var t3, + t1 = $E._eval$1("List<0>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty($K, t1); + for (t1 = A.MapExtensions_get_pairs(map, $K, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + t2.$indexSet(0, t3._0, J.toList$0$ax(t3._1)); + } + return t2; + }, + consumeEscapedCharacter(scanner) { + var _1_0, value, i, next, t1; + scanner.expectChar$1(92); + _1_0 = scanner.peekChar$0(); + if (_1_0 == null) + return 65533; + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) + scanner.error$1(0, "Expected escape sequence."); + if (A.CharacterExtension_get_isHex(_1_0)) { + for (value = 0, i = 0; i < 6; ++i) { + next = scanner.peekChar$0(); + if (next != null) { + t1 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t1 = next >= 65 && next <= 70; + t1 = !t1; + } else + t1 = true; + if (t1) + break; + value = (value << 4 >>> 0) + A.asHex(scanner.readChar$0()); + } + t1 = scanner.peekChar$0(); + if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) + scanner.readChar$0(); + $label0$1: { + if (0 !== value) + t1 = value >= 55296 && value <= 57343 || value >= 1114111; + else + t1 = true; + if (t1) { + t1 = 65533; + break $label0$1; + } + t1 = value; + break $label0$1; + } + return t1; + } + return scanner.readChar$0(); + }, + throwWithTrace(error, originalError, trace) { + var t1 = A.getTrace(originalError); + A.attachTrace(error, t1 == null ? trace : t1); + throw A.wrapException(error); + }, + attachTrace(error, trace) { + var t1; + if (trace.toString$0(0).length === 0) + return; + t1 = $.$get$_traces(); + A.Expando__checkType(error); + if (t1._jsWeakMap.get(error) == null) + t1.$indexSet(0, error, trace); + }, + getTrace(error) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + t1 = null; + else { + t1 = $.$get$_traces(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap.get(error); + } + return t1; + }, + indent_closure: function indent_closure(t0) { + this.indentation = t0; + }, + flattenVertically_closure: function flattenVertically_closure(t0) { + this.T = t0; + }, + flattenVertically_closure0: function flattenVertically_closure0(t0, t1) { + this.result = t0; + this.T = t1; + }, + longestCommonSubsequence_backtrack: function longestCommonSubsequence_backtrack(t0, t1, t2) { + this.selections = t0; + this.lengths = t1; + this.T = t2; + }, + mapAddAll2_closure: function mapAddAll2_closure(t0, t1, t2, t3) { + var _ = this; + _.destination = t0; + _.K1 = t1; + _.K2 = t2; + _.V = t3; + }, + SassApiValue_assertSelector(_this, allowParent, $name) { + var error, stackTrace, t1, exception, + string = _this._selectorString$1($name); + try { + t1 = A.SelectorList_SelectorList$parse(string, allowParent, null, null, false); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace(new A.SassScriptException($name == null ? t1 : "$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + SassApiValue_assertCompoundSelector(_this, $name) { + var error, stackTrace, t1, exception, + allowParent = false, + string = _this._selectorString$1($name); + try { + t1 = A.SelectorParser$(string, allowParent, null, null, false, null).parseCompoundSelector$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace(new A.SassScriptException("$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + Value: function Value() { + }, + SassArgumentList$(contents, keywords, separator) { + var t1 = type$.Value; + t1 = new A.SassArgumentList(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); + t1.SassList$3$brackets(contents, separator, false); + return t1; + }, + SassArgumentList: function SassArgumentList(t0, t1, t2, t3) { + var _ = this; + _._keywords = t0; + _._wereKeywordsAccessed = false; + _._list$_contents = t1; + _._separator = t2; + _._hasBrackets = t3; + }, + SassBoolean: function SassBoolean(t0) { + this.value = t0; + }, + SassCalculation_calc(argument) { + var t1, + _0_0 = A.SassCalculation__simplify(argument); + $label0$0: { + if (_0_0 instanceof A.SassNumber) { + t1 = _0_0; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation) { + t1 = _0_0; + break $label0$0; + } + t1 = new A.SassCalculation("calc", A.List_List$unmodifiable([_0_0], type$.Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_min($arguments) { + var minimum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); + for (minimum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber) + t2 = minimum != null && !minimum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + minimum = null; + break; + } else if (minimum == null || minimum.greaterThan$1(arg).value) + minimum = arg; + } + if (minimum != null) + return minimum; + A.SassCalculation__verifyCompatibleNumbers(args); + return new A.SassCalculation("min", args); + }, + SassCalculation_max($arguments) { + var maximum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); + for (maximum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber) + t2 = maximum != null && !maximum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + maximum = null; + break; + } else if (maximum == null || maximum.lessThan$1(arg).value) + maximum = arg; + } + if (maximum != null) + return maximum; + A.SassCalculation__verifyCompatibleNumbers(args); + return new A.SassCalculation("max", args); + }, + SassCalculation_hypot($arguments) { + var first, subtotal, i, number, value, t2, t3, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("hypot() must have at least one argument.", null)); + A.SassCalculation__verifyCompatibleNumbers(args); + first = B.JSArray_methods.get$first(args); + if (!(first instanceof A.SassNumber) || first.hasUnit$1("%")) + return new A.SassCalculation("hypot", args); + for (subtotal = 0, i = 0; i < t1;) { + number = args[i]; + if (!(number instanceof A.SassNumber) || !number.hasCompatibleUnits$1(first)) + return new A.SassCalculation("hypot", args); + ++i; + value = number.convertValueToMatch$3(first, "numbers[" + i + "]", "numbers[1]"); + subtotal += value * value; + } + t1 = Math.sqrt(subtotal); + t2 = J.getInterceptor$x(first); + t3 = t2.get$numeratorUnits(first); + return A.SassNumber_SassNumber$withUnits(t1, t2.get$denominatorUnits(first), t3); + }, + SassCalculation_abs(argument) { + argument = A.SassCalculation__simplify(argument); + if (!(argument instanceof A.SassNumber)) + return new A.SassCalculation("abs", A._setArrayType([argument], type$.JSArray_Object)); + if (argument.hasUnit$1("%")) + A.warnForDeprecation(string$.Passinp + argument.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + argument.toString$0(0) + string$.x7d__Mor, B.Deprecation_GFc); + return A.SassNumber_SassNumber(Math.abs(argument._number$_value), null).coerceToMatch$1(argument); + }, + SassCalculation_exp(argument) { + argument = A.SassCalculation__simplify(argument); + if (!(argument instanceof A.SassNumber)) + return new A.SassCalculation("exp", A._setArrayType([argument], type$.JSArray_Object)); + argument.assertNoUnits$0(); + return A.pow0(A.SassNumber_SassNumber(2.718281828459045, null), argument); + }, + SassCalculation_sign(argument) { + var t1, _0_2, t2, arg; + argument = A.SassCalculation__simplify(argument); + $label0$0: { + t1 = argument instanceof A.SassNumber; + if (t1) { + _0_2 = argument._number$_value; + if (!isNaN(_0_2)) + t2 = 0 === _0_2; + else + t2 = true; + } else + t2 = false; + if (t2) { + t1 = argument; + break $label0$0; + } + if (t1) { + t1 = !argument.hasUnit$1("%"); + arg = argument; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.SassNumber_SassNumber(J.get$sign$in(arg._number$_value), null).coerceToMatch$1(argument); + break $label0$0; + } + t1 = new A.SassCalculation("sign", A._setArrayType([argument], type$.JSArray_Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_clamp(min, value, max) { + var t1, args; + if (value == null && max != null) + throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); + min = A.SassCalculation__simplify(min); + value = A.NullableExtension_andThen(value, A.calculation_SassCalculation__simplify$closure()); + max = A.NullableExtension_andThen(max, A.calculation_SassCalculation__simplify$closure()); + if (min instanceof A.SassNumber && value instanceof A.SassNumber && max instanceof A.SassNumber && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { + if (value.lessThanOrEquals$1(min).value) + return min; + if (value.greaterThanOrEquals$1(max).value) + return max; + return value; + } + t1 = [min]; + if (value != null) + t1.push(value); + if (max != null) + t1.push(max); + args = A.List_List$unmodifiable(t1, type$.Object); + A.SassCalculation__verifyCompatibleNumbers(args); + A.SassCalculation__verifyLength(args, 3); + return new A.SassCalculation("clamp", args); + }, + SassCalculation_pow(base, exponent) { + var t1 = A._setArrayType([base], type$.JSArray_Object); + if (exponent != null) + t1.push(exponent); + A.SassCalculation__verifyLength(t1, 2); + base = A.SassCalculation__simplify(base); + exponent = A.NullableExtension_andThen(exponent, A.calculation_SassCalculation__simplify$closure()); + if (!(base instanceof A.SassNumber) || !(exponent instanceof A.SassNumber)) + return new A.SassCalculation("pow", t1); + base.assertNoUnits$0(); + exponent.assertNoUnits$0(); + return A.pow0(base, exponent); + }, + SassCalculation_log(number, base) { + var t1, t2; + number = A.SassCalculation__simplify(number); + base = A.NullableExtension_andThen(base, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([number], type$.JSArray_Object); + t2 = base != null; + if (t2) + t1.push(base); + if (number instanceof A.SassNumber) + t2 = t2 && !(base instanceof A.SassNumber); + else + t2 = true; + if (t2) + return new A.SassCalculation("log", t1); + number.assertNoUnits$0(); + if (base instanceof A.SassNumber) { + base.assertNoUnits$0(); + return A.log(number, base); + } + return A.log(number, null); + }, + SassCalculation_atan2(y, x) { + var t1; + y = A.SassCalculation__simplify(y); + x = A.NullableExtension_andThen(x, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([y], type$.JSArray_Object); + if (x != null) + t1.push(x); + A.SassCalculation__verifyLength(t1, 2); + A.SassCalculation__verifyCompatibleNumbers(t1); + if (!(y instanceof A.SassNumber) || !(x instanceof A.SassNumber) || y.hasUnit$1("%") || x.hasUnit$1("%") || !y.hasCompatibleUnits$1(x)) + return new A.SassCalculation("atan2", t1); + return A.SassNumber_SassNumber$withUnits(Math.atan2(y._number$_value, x.convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + SassCalculation_rem(dividend, modulus) { + var t1, result; + dividend = A.SassCalculation__simplify(dividend); + modulus = A.NullableExtension_andThen(modulus, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength(t1, 2); + A.SassCalculation__verifyCompatibleNumbers(t1); + if (!(dividend instanceof A.SassNumber) || !(modulus instanceof A.SassNumber) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation("rem", t1); + result = dividend.modulo$1(modulus); + t1 = modulus._number$_value; + if (A.DoubleWithSignedZero_get_signIncludingZero(t1) !== A.DoubleWithSignedZero_get_signIncludingZero(dividend._number$_value)) { + if (t1 == 1 / 0 || t1 == -1 / 0) + return dividend; + if (result._number$_value === 0) + return result.unaryMinus$0(); + return result.minus$1(modulus); + } + return result; + }, + SassCalculation_mod(dividend, modulus) { + var t1; + dividend = A.SassCalculation__simplify(dividend); + modulus = A.NullableExtension_andThen(modulus, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength(t1, 2); + A.SassCalculation__verifyCompatibleNumbers(t1); + if (!(dividend instanceof A.SassNumber) || !(modulus instanceof A.SassNumber) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation("mod", t1); + return dividend.modulo$1(modulus); + }, + SassCalculation_round(strategyOrNumber, numberOrStep, step) { + var number, t2, _0_2_isSet, _0_2_isSet0, _0_10_isSet, _0_8, _0_12, _0_14, _0_14_isSet, _0_16, _0_16_isSet, strategy, _0_5_isSet0, _0_12_isSet, t3, t4, _0_8_isSet, _0_8_isSet0, rest, _null = null, _s5_ = "round", + _0_1 = A.SassCalculation__simplify(strategyOrNumber), + _0_2 = A.NullableExtension_andThen(numberOrStep, A.calculation_SassCalculation__simplify$closure()), + _0_5 = A.NullableExtension_andThen(step, A.calculation_SassCalculation__simplify$closure()), + _0_10 = _0_1, + _0_4_isSet = _0_1 instanceof A.SassNumber, + _0_4 = _null, + _0_20 = _null, + _0_6 = _null, + _0_6_isSet = false, + _0_50 = _null, + _0_5_isSet = false, + t1 = false; + if (_0_4_isSet) { + type$.SassNumber._as(_0_10); + _0_4 = _0_2 == null; + _0_5_isSet = _0_4; + _0_20 = _0_2; + if (_0_5_isSet) { + _0_6 = _0_5 == null; + t1 = _0_6; + _0_50 = _0_5; + } + _0_6_isSet = _0_5_isSet; + number = _0_10; + _0_1 = number; + } else { + number = _null; + _0_1 = _0_10; + } + if (t1) { + t1 = B.JSNumber_methods.round$0(number._number$_value); + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(t1, number.get$denominatorUnits(number), t2); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber) { + _0_2_isSet = true; + if (_0_4_isSet) { + t2 = _0_20; + _0_2_isSet0 = _0_4_isSet; + } else { + t2 = _0_2; + _0_2_isSet0 = _0_2_isSet; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_2_isSet0) { + t2 = _0_20; + _0_2_isSet = _0_2_isSet0; + } else { + t2 = _0_2; + _0_20 = t2; + } + type$.SassNumber._as(t2); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + t1 = t1 && !_0_1.hasCompatibleUnits$1(t2); + step = t2; + } else + _0_2_isSet = _0_2_isSet0; + number = _0_1; + } else { + number = _null; + _0_2_isSet = _0_4_isSet; + } + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], t1)); + return new A.SassCalculation(_s5_, A._setArrayType([number, step], t1)); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber) { + _0_2_isSet0 = true; + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + type$.SassNumber._as(t2); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + step = t2; + } + number = _0_1; + } else + number = _null; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep("nearest", number, step); + } + _0_10_isSet = _0_1 instanceof A.SassString; + _0_10 = _null; + _0_8 = _null; + _0_12 = _null; + _0_14 = _null; + _0_14_isSet = false; + _0_16 = _null; + _0_16_isSet = false; + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_10_isSet) { + _0_2_isSet0 = true; + _0_5_isSet0 = true; + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_12_isSet = !t2; + t2 = true; + if (_0_12_isSet) { + _0_12 = "up" === _0_8; + t3 = _0_12; + _0_14_isSet = !t3; + if (_0_14_isSet) { + _0_14 = "down" === _0_8; + t3 = _0_14; + _0_16_isSet = !t3; + if (_0_16_isSet) { + _0_16 = "to-zero" === _0_8; + t2 = _0_16; + } + } + } + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + t3 = type$.SassNumber; + t3._as(t2); + if (_0_5_isSet) + t4 = _0_50; + else { + t4 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t4; + } + if (t4 instanceof A.SassNumber) { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t1; + } + t3._as(t1); + t3 = !t2.hasCompatibleUnits$1(t1); + step = t1; + t1 = t3; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_12_isSet = false; + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], t1)); + return new A.SassCalculation(_s5_, A._setArrayType([strategy, number, step], t1)); + } + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_2_isSet0 = true; + _0_5_isSet0 = true; + _0_8_isSet = true; + if (_0_10_isSet) { + t2 = _0_10; + _0_8_isSet0 = _0_10_isSet; + } else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_8_isSet0 = _0_8_isSet; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet0) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet0 = _0_8_isSet; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet0) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet0 = _0_8_isSet; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) { + t2 = _0_16; + _0_8_isSet = _0_8_isSet0; + } else { + if (_0_8_isSet0) { + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else { + t2 = t3; + _0_8_isSet = _0_8_isSet0; + } + } else { + t2 = t3; + _0_8_isSet = _0_8_isSet0; + } + } else { + t2 = t3; + _0_8_isSet = _0_8_isSet0; + } + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + t3 = type$.SassNumber; + t3._as(t2); + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t1; + } + t1 = t1 instanceof A.SassNumber; + if (t1) { + if (_0_5_isSet) + t4 = _0_50; + else { + t4 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t4; + } + t3._as(t4); + step = t4; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_8_isSet = _0_10_isSet; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep(strategy._string$_text, number, step); + } + strategy = _null; + rest = _null; + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_2_isSet0 = true; + _0_8_isSet0 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassString) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + type$.SassString._as(t2); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + rest = t2; + } + strategy = _0_1; + } + } + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([strategy, rest], type$.JSArray_Object)); + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_8_isSet0 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + if (t2 != null) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$(string$.If_str, _null)); + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_8_isSet0 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_4_isSet) + t2 = _0_4; + else { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + _0_4 = t2 == null; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$(string$.Number, _null)); + t1 = false; + if (_0_1 instanceof A.SassString) { + if (_0_4_isSet) + t2 = _0_4; + else { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + _0_4 = t2 == null; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + rest = _0_1; + } else + rest = _null; + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([rest], type$.JSArray_Object)); + t1 = false; + if (_0_4_isSet) + t2 = _0_4; + else { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + _0_4 = t2 == null; + t2 = _0_4; + } + if (t2) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + if (t1) + throw A.wrapException(A.SassScriptException$("Single argument " + A.S(_0_1) + " expected to be simplifiable.", _null)); + step = _null; + t1 = false; + _0_2_isSet0 = true; + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 != null) { + if (_0_2_isSet) + step = _0_20; + else { + step = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = step; + } + if (step == null) + step = type$.Object._as(step); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + } + } + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([_0_1, step], type$.JSArray_Object)); + if (_0_1 instanceof A.SassString) { + t1 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = true; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + } + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = true; + } + _0_12 = "up" === t2; + t2 = _0_12; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string$_text; + t2 = _0_8; + _0_8_isSet = true; + } + _0_14 = "down" === t2; + t2 = _0_14; + } + if (!t2) + if (_0_16_isSet) + t1 = _0_16; + else { + if (_0_8_isSet) + t1 = _0_8; + else { + _0_8 = _0_1._string$_text; + t1 = _0_8; + } + _0_16 = "to-zero" === t1; + t1 = _0_16; + } + } + } + } else + t1 = false; + if (!t1) + if (_0_1 instanceof A.SassString) + t1 = _0_1.get$isVar(); + else + t1 = false; + else + t1 = true; + number = _null; + step = _null; + t2 = false; + if (t1) { + _0_2_isSet0 = true; + _0_5_isSet0 = true; + type$.SassString._as(_0_1); + if (_0_2_isSet) + t1 = _0_20; + else { + t1 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t1; + } + if (t1 != null) { + if (_0_2_isSet) + number = _0_20; + else { + number = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = number; + } + if (number == null) + number = type$.Object._as(number); + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t1; + } + t1 = t1 != null; + if (t1) { + if (_0_5_isSet) + step = _0_50; + else { + step = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = step; + } + if (step == null) + step = type$.Object._as(step); + } + } else + t1 = t2; + strategy = _0_1; + } else { + t1 = t2; + strategy = _null; + } + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([strategy, number, step], type$.JSArray_Object)); + t1 = false; + if ((_0_2_isSet ? _0_20 : _0_2) != null) + t1 = (_0_5_isSet ? _0_50 : _0_5) != null; + if (t1) + throw A.wrapException(A.SassScriptException$(A.S(strategyOrNumber) + string$.x20must_b, _null)); + t1 = A.SassScriptException$("Invalid parameters.", _null); + throw A.wrapException(t1); + }, + SassCalculation_operateInternal(operator, left, right, inLegacySassFunction, simplify) { + var t1; + if (!simplify) + return new A.CalculationOperation(operator, left, right); + left = A.SassCalculation__simplify(left); + right = A.SassCalculation__simplify(right); + if (B.CalculationOperator_g2q === operator || B.CalculationOperator_CxF === operator) { + t1 = false; + if (left instanceof A.SassNumber) + if (right instanceof A.SassNumber) + t1 = inLegacySassFunction ? left.isComparableTo$1(right) : left.hasCompatibleUnits$1(right); + if (t1) + return operator === B.CalculationOperator_g2q ? left.plus$1(right) : left.minus$1(right); + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([left, right], type$.JSArray_Object)); + if (right instanceof A.SassNumber) { + t1 = right._number$_value; + t1 = t1 < 0 && !A.fuzzyEquals(t1, 0); + } else + t1 = false; + if (t1) { + right = right.times$1(A.SassNumber_SassNumber(-1, null)); + operator = operator === B.CalculationOperator_g2q ? B.CalculationOperator_CxF : B.CalculationOperator_g2q; + } + return new A.CalculationOperation(operator, left, right); + } else if (left instanceof A.SassNumber && right instanceof A.SassNumber) + return operator === B.CalculationOperator_171 ? left.times$1(right) : left.dividedBy$1(right); + else + return new A.CalculationOperation(operator, left, right); + }, + SassCalculation__roundWithStep(strategy, number, step) { + var _0_2, t1, _0_6, _0_8_isSet, _0_8, _0_9_isSet, _0_9, _0_11, _0_13, stepWithNumberUnit, t2, _null = null; + if (!A.LinkedHashSet_LinkedHashSet$_literal(["nearest", "up", "down", "to-zero"], type$.String).contains$1(0, strategy)) + throw A.wrapException(A.ArgumentError$(strategy + string$.x20must_b, _null)); + _0_2 = number._number$_value; + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) { + t1 = step._number$_value; + t1 = t1 == 1 / 0 || t1 == -1 / 0; + } else + t1 = false; + if (!t1) { + t1 = step._number$_value; + t1 = t1 === 0 || isNaN(_0_2) || isNaN(t1); + } else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(0 / 0, number.get$denominatorUnits(number), t1); + } + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) + return number; + t1 = step._number$_value; + if (t1 == 1 / 0 || t1 == -1 / 0) { + $label0$0: { + if (0 === _0_2) { + t1 = number; + break $label0$0; + } + _0_6 = "nearest" === strategy; + t1 = _0_6; + _0_8_isSet = !t1; + _0_8 = _null; + if (_0_8_isSet) { + _0_8 = "to-zero" === strategy; + _0_9_isSet = _0_8; + } else + _0_9_isSet = true; + _0_9 = _null; + if (_0_9_isSet) { + _0_9 = _0_2 > 0; + t1 = _0_9; + } else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (!_0_6) + if (_0_8_isSet) + t1 = _0_8; + else { + _0_8 = "to-zero" === strategy; + t1 = _0_8; + } + else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_11 = "up" === strategy; + t1 = _0_11; + if (t1) + if (_0_9_isSet) + t1 = _0_9; + else { + _0_9 = _0_2 > 0; + t1 = _0_9; + } + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_11) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_13 = "down" === strategy; + t1 = _0_13; + if (t1) + t1 = _0_2 < 0; + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(-1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_13) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Invalid argument: " + strategy + ".")); + } + return t1; + } + stepWithNumberUnit = step.convertValueToMatch$1(number); + $label1$1: { + if ("nearest" === strategy) { + t1 = B.JSNumber_methods.round$0(_0_2 / stepWithNumberUnit); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("up" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.floor$0(t2) : B.JSNumber_methods.ceil$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("down" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.ceil$0(t2) : B.JSNumber_methods.floor$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("to-zero" === strategy) { + t1 = _0_2 / stepWithNumberUnit; + if (_0_2 < 0) { + t1 = B.JSNumber_methods.ceil$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } else { + t1 = B.JSNumber_methods.floor$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } + break $label1$1; + } + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(0 / 0, number.get$denominatorUnits(number), t1); + break $label1$1; + } + return t1; + }, + SassCalculation__simplify(arg) { + var t1, t2, _0_11_isSet, _0_15, _0_12, _0_16_isSet, text, _0_11, _0_16, _0_12_isSet, _0_15_isSet, value, _null = null, + _s32_ = " can't be used in a calculation."; + $label0$0: { + if (arg instanceof A.SassNumber || arg instanceof A.CalculationOperation) { + t1 = arg; + break $label0$0; + } + t1 = arg instanceof A.SassString; + t2 = _null; + if (t1 && !arg._hasQuotes) { + t1 = arg; + break $label0$0; + } + if (t1) + A.throwExpression(A.SassScriptException$("Quoted string " + arg.toString$0(0) + _s32_, _null)); + _0_11_isSet = arg instanceof A.SassCalculation; + _0_15 = _null; + _0_12 = _null; + _0_16_isSet = false; + text = _null; + t1 = false; + if (_0_11_isSet) { + _0_11 = "calc" === arg.name; + if (_0_11) { + _0_12 = arg.$arguments; + _0_15 = _0_12.length === 1; + _0_16_isSet = _0_15; + if (_0_16_isSet) { + _0_16 = _0_12[0]; + t2 = _0_16; + if (t2 instanceof A.SassString) { + type$.SassString._as(_0_16); + if (!_0_16._hasQuotes) { + text = _0_16._string$_text; + t1 = A.SassCalculation__needsParentheses(text); + } + } + } else + _0_16 = t2; + } else + _0_16 = t2; + _0_12_isSet = _0_11; + _0_15_isSet = _0_12_isSet; + } else { + _0_16 = t2; + _0_11 = _null; + _0_15_isSet = false; + _0_12_isSet = false; + } + if (t1) { + t1 = new A.SassString("(" + A.S(text) + ")", false); + break $label0$0; + } + t1 = false; + if (_0_11_isSet) + if (_0_11) + if (_0_15_isSet) + t1 = _0_15; + else { + if (_0_12_isSet) + t1 = _0_12; + else { + _0_12 = arg.$arguments; + t1 = _0_12; + _0_12_isSet = true; + } + _0_15 = t1.length === 1; + t1 = _0_15; + } + if (t1) { + if (_0_16_isSet) + value = _0_16; + else { + _0_16 = (_0_12_isSet ? _0_12 : arg.$arguments)[0]; + value = _0_16; + } + t1 = value; + break $label0$0; + } + if (_0_11_isSet) { + t1 = arg; + break $label0$0; + } + if (arg instanceof A.Value) + A.throwExpression(A.SassScriptException$("Value " + arg.toString$0(0) + _s32_, _null)); + t1 = A.throwExpression(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", _null)); + } + return t1; + }, + SassCalculation__needsParentheses(text) { + var t1, couldBeVar, second, third, fourth, i, t2, + first = text.charCodeAt(0); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47 || first === 42) + return true; + t1 = text.length; + couldBeVar = t1 >= 4 && A.characterEqualsIgnoreCase(first, 118); + if (t1 < 2) + return false; + second = text.charCodeAt(1); + if (second === 32 || second === 9 || second === 10 || second === 13 || second === 12 || second === 47 || second === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase(second, 97); + if (t1 < 3) + return false; + third = text.charCodeAt(2); + if (third === 32 || third === 9 || third === 10 || third === 13 || third === 12 || third === 47 || third === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase(third, 114); + if (t1 < 4) + return false; + fourth = text.charCodeAt(3); + if (couldBeVar && fourth === 40) + return true; + if (fourth === 32 || fourth === 9 || fourth === 10 || fourth === 13 || fourth === 12 || fourth === 47 || fourth === 42) + return true; + for (i = 4; i < t1; ++i) { + t2 = text.charCodeAt(i); + if (t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || t2 === 47 || t2 === 42) + return true; + } + return false; + }, + SassCalculation__verifyCompatibleNumbers(args) { + var t1, _i, t2, arg, i, number1, j, number2; + for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber && arg.get$hasComplexUnits()) + throw A.wrapException(A.SassScriptException$("Number " + A.S(arg) + " isn't compatible with CSS calculations.", null)); + } + for (t1 = t2, i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.SassScriptException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); + } + } + }, + SassCalculation__verifyLength(args, expectedLength) { + var t1; + if (args.length === expectedLength) + return; + if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure())) + return; + t1 = args.length; + throw A.wrapException(A.SassScriptException$("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize("was", t1, "were") + " passed.", null)); + }, + SassCalculation__singleArgument($name, argument, mathFunc, forbidUnits) { + argument = A.SassCalculation__simplify(argument); + if (!(argument instanceof A.SassNumber)) + return new A.SassCalculation($name, A._setArrayType([argument], type$.JSArray_Object)); + if (forbidUnits) + argument.assertNoUnits$0(); + return mathFunc.call$1(argument); + }, + SassCalculation: function SassCalculation(t0, t1) { + this.name = t0; + this.$arguments = t1; + }, + SassCalculation__verifyLength_closure: function SassCalculation__verifyLength_closure() { + }, + CalculationOperation: function CalculationOperation(t0, t1, t2) { + this._operator = t0; + this._left = t1; + this._right = t2; + }, + CalculationOperator: function CalculationOperator(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _._name = t3; + }, + SassColor_SassColor$rgb(red, green, blue, alpha) { + return A.SassColor_SassColor$rgbInternal(red, green, blue, alpha, null); + }, + SassColor_SassColor$rgbInternal(red, green, blue, alpha, format) { + var _null = null, + t1 = red == null ? _null : red, + t2 = green == null ? _null : green, + t3 = blue == null ? _null : blue; + return A.SassColor$_forSpace(B.RgbColorSpace_mlz, t1, t2, t3, alpha == null ? _null : alpha, format); + }, + SassColor_SassColor$hsl(hue, saturation, lightness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = saturation == null ? _null : saturation, + t3 = lightness == null ? _null : lightness; + return A.SassColor_SassColor$forSpaceInternal(B.HslColorSpace_gsm, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$hwb(hue, whiteness, blackness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = whiteness == null ? _null : whiteness, + t3 = blackness == null ? _null : blackness; + return A.SassColor_SassColor$forSpaceInternal(B.HwbColorSpace_06z, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$forSpaceInternal(space, channel0, channel1, channel2, alpha) { + var t1, t2, _null = null; + $label0$0: { + if (B.HslColorSpace_gsm === space) { + t1 = channel1 == null; + t2 = A.SassColor__normalizeHue(channel0, !t1 && channel1 < 0 && !A.fuzzyEquals(channel1, 0)); + t2 = A.SassColor$_forSpace(space, t2, t1 ? _null : Math.abs(channel1), channel2, alpha, _null); + t1 = t2; + break $label0$0; + } + if (B.HwbColorSpace_06z === space) { + t1 = A.SassColor$_forSpace(space, A.SassColor__normalizeHue(channel0, false), channel1, channel2, alpha, _null); + break $label0$0; + } + if (B.LchColorSpace_wv8 === space || B.OklchColorSpace_li8 === space) { + t1 = channel1 == null; + t2 = t1 ? _null : Math.abs(channel1); + t2 = A.SassColor$_forSpace(space, channel0, t2, A.SassColor__normalizeHue(channel2, !t1 && channel1 < 0 && !A.fuzzyEquals(channel1, 0)), alpha, _null); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor$_forSpace(space, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + return t1; + }, + SassColor$_forSpace(_space, channel0OrNull, channel1OrNull, channel2OrNull, alpha, format) { + return new A.SassColor(_space, channel0OrNull, channel1OrNull, channel2OrNull, format, A.NullableExtension_andThen(alpha, new A.SassColor$_forSpace_closure())); + }, + SassColor__normalizeHue(hue, invert) { + var t1, t2; + if (hue == null) + return hue; + t1 = B.JSNumber_methods.$mod(hue, 360); + t2 = invert ? 180 : 0; + return B.JSNumber_methods.$mod(t1 + 360 + t2, 360); + }, + SassColor: function SassColor(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._space = t0; + _.channel0OrNull = t1; + _.channel1OrNull = t2; + _.channel2OrNull = t3; + _.format = t4; + _.alphaOrNull = t5; + }, + SassColor$_forSpace_closure: function SassColor$_forSpace_closure() { + }, + _ColorFormatEnum: function _ColorFormatEnum() { + }, + SpanColorFormat: function SpanColorFormat(t0) { + this._color$_span = t0; + }, + ColorChannel: function ColorChannel(t0, t1, t2) { + this.name = t0; + this.isPolarAngle = t1; + this.associatedUnit = t2; + }, + LinearChannel: function LinearChannel(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.min = t0; + _.max = t1; + _.requiresPercent = t2; + _.lowerClamped = t3; + _.upperClamped = t4; + _.name = t5; + _.isPolarAngle = t6; + _.associatedUnit = t7; + }, + GamutMapMethod_GamutMapMethod$fromName($name) { + var t1; + $label0$0: { + if ("clip" === $name) { + t1 = B.ClipGamutMap_clip; + break $label0$0; + } + if ("local-minde" === $name) { + t1 = B.LocalMindeGamutMap_Q7f; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$('Unknown gamut map method "' + $name + '".', null)); + } + return t1; + }, + GamutMapMethod: function GamutMapMethod() { + }, + ClipGamutMap: function ClipGamutMap(t0) { + this.name = t0; + }, + LocalMindeGamutMap: function LocalMindeGamutMap(t0) { + this.name = t0; + }, + InterpolationMethod$(space, hue) { + var t1; + if (space.get$isPolarInternal()) + t1 = hue == null ? B.HueInterpolationMethod_0 : hue; + else + t1 = null; + if (!space.get$isPolarInternal() && hue != null) + A.throwExpression(A.ArgumentError$(string$.Hue_in + space.toString$0(0) + ".", null)); + return new A.InterpolationMethod(space, t1); + }, + InterpolationMethod_InterpolationMethod$fromValue(value, $name) { + var t1, space, hueMethod, + list = value.assertCommonListStyle$2$allowSlash($name, false); + if (list.length === 0) + throw A.wrapException(A.SassScriptException$(string$.Expecta, $name)); + t1 = B.JSArray_methods.get$first(list).assertString$1($name); + t1.assertUnquoted$1($name); + space = A.ColorSpace_fromName(t1._string$_text, $name); + if (list.length === 1) + return A.InterpolationMethod$(space, null); + hueMethod = A.HueInterpolationMethod_HueInterpolationMethod$_fromValue(list[1], $name); + if (list.length === 2) + throw A.wrapException(A.SassScriptException$('Expected unquoted string "hue" after ' + value.toString$0(0) + ".", $name)); + else { + t1 = list[2].assertString$1($name); + t1.assertUnquoted$1($name); + if (t1._string$_text.toLowerCase() !== "hue") + throw A.wrapException(A.SassScriptException$(string$.Expectu + value.toString$0(0) + ", was " + A.S(list[2]) + ".", $name)); + else if (list.length > 3) + throw A.wrapException(A.SassScriptException$('Expected nothing after "hue" in ' + value.toString$0(0) + ".", $name)); + else if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$('Hue interpolation method "' + hueMethod.toString$0(0) + string$.x20hue__ + space.toString$0(0) + ".", $name)); + } + return A.InterpolationMethod$(space, hueMethod); + }, + HueInterpolationMethod_HueInterpolationMethod$_fromValue(value, $name) { + var _0_0, + t1 = value.assertString$1($name); + t1.assertUnquoted$0(); + _0_0 = t1._string$_text.toLowerCase(); + $label0$0: { + if ("shorter" === _0_0) { + t1 = B.HueInterpolationMethod_0; + break $label0$0; + } + if ("longer" === _0_0) { + t1 = B.HueInterpolationMethod_1; + break $label0$0; + } + if ("increasing" === _0_0) { + t1 = B.HueInterpolationMethod_2; + break $label0$0; + } + if ("decreasing" === _0_0) { + t1 = B.HueInterpolationMethod_3; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$("Unknown hue interpolation method " + value.toString$0(0) + ".", $name)); + } + return t1; + }, + InterpolationMethod: function InterpolationMethod(t0, t1) { + this.space = t0; + this.hue = t1; + }, + HueInterpolationMethod: function HueInterpolationMethod(t0) { + this._name = t0; + }, + ColorSpace_fromName($name, argumentName) { + var t1, + _0_0 = $name.toLowerCase(); + $label0$0: { + if ("rgb" === _0_0) { + t1 = B.RgbColorSpace_mlz; + break $label0$0; + } + if ("hwb" === _0_0) { + t1 = B.HwbColorSpace_06z; + break $label0$0; + } + if ("hsl" === _0_0) { + t1 = B.HslColorSpace_gsm; + break $label0$0; + } + if ("srgb" === _0_0) { + t1 = B.SrgbColorSpace_AD4; + break $label0$0; + } + if ("srgb-linear" === _0_0) { + t1 = B.SrgbLinearColorSpace_sEs; + break $label0$0; + } + if ("display-p3" === _0_0) { + t1 = B.DisplayP3ColorSpace_NQk; + break $label0$0; + } + if ("a98-rgb" === _0_0) { + t1 = B.A98RgbColorSpace_bdu; + break $label0$0; + } + if ("prophoto-rgb" === _0_0) { + t1 = B.ProphotoRgbColorSpace_KiG; + break $label0$0; + } + if ("rec2020" === _0_0) { + t1 = B.Rec2020ColorSpace_2jN; + break $label0$0; + } + if ("xyz" === _0_0 || "xyz-d65" === _0_0) { + t1 = B.XyzD65ColorSpace_4CA; + break $label0$0; + } + if ("xyz-d50" === _0_0) { + t1 = B.XyzD50ColorSpace_2No; + break $label0$0; + } + if ("lab" === _0_0) { + t1 = B.LabColorSpace_IF2; + break $label0$0; + } + if ("lch" === _0_0) { + t1 = B.LchColorSpace_wv8; + break $label0$0; + } + if ("oklab" === _0_0) { + t1 = B.OklabColorSpace_yrt; + break $label0$0; + } + if ("oklch" === _0_0) { + t1 = B.OklchColorSpace_li8; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$('Unknown color space "' + $name + '".', argumentName)); + } + return t1; + }, + ColorSpace: function ColorSpace() { + }, + A98RgbColorSpace: function A98RgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + DisplayP3ColorSpace: function DisplayP3ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + HslColorSpace: function HslColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + HwbColorSpace: function HwbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + HwbColorSpace_convert_toRgb: function HwbColorSpace_convert_toRgb(t0, t1) { + this._box_0 = t0; + this.factor = t1; + }, + LabColorSpace: function LabColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + LchColorSpace: function LchColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + LmsColorSpace: function LmsColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + OklabColorSpace: function OklabColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + OklchColorSpace: function OklchColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + ProphotoRgbColorSpace: function ProphotoRgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + Rec2020ColorSpace: function Rec2020ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + RgbColorSpace: function RgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + SrgbColorSpace: function SrgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + SrgbLinearColorSpace: function SrgbLinearColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + XyzD50ColorSpace: function XyzD50ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + XyzD65ColorSpace: function XyzD65ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + SassFunction: function SassFunction(t0) { + this.callable = t0; + }, + SassList$(contents, _separator, brackets) { + var t1 = new A.SassList(A.List_List$unmodifiable(contents, type$.Value), _separator, brackets); + t1.SassList$3$brackets(contents, _separator, brackets); + return t1; + }, + SassList: function SassList(t0, t1, t2) { + this._list$_contents = t0; + this._separator = t1; + this._hasBrackets = t2; + }, + SassList_isBlank_closure: function SassList_isBlank_closure() { + }, + ListSeparator: function ListSeparator(t0, t1, t2) { + this._list$_name = t0; + this.separator = t1; + this._name = t2; + }, + SassMap: function SassMap(t0) { + this._map$_contents = t0; + }, + SassMixin: function SassMixin(t0) { + this.callable = t0; + }, + _SassNull: function _SassNull() { + }, + conversionFactor(unit1, unit2) { + var _0_0; + if (unit1 === unit2) + return 1; + _0_0 = B.Map_gQqJO.$index(0, unit1); + if (_0_0 != null) + return _0_0.$index(0, unit2); + return null; + }, + SassNumber_SassNumber(value, unit) { + return unit == null ? new A.UnitlessSassNumber(value, null) : new A.SingleUnitSassNumber(unit, value, null); + }, + SassNumber_SassNumber$withUnits(value, denominatorUnits, numeratorUnits) { + var t1, _0_8_isSet, _0_8, _0_10, _0_10_isSet, _0_7, unit, t2, _0_7_isSet, t3, _0_4_isSet, _0_7_isSet0, numerators, denominators, unsimplifiedDenominators, valueDouble, _i, denominator, simplifiedAway, i, factor, _1_2, _1_7_isSet, _1_7, _null = null, + _0_6_isSet = !false, + _0_6 = _null, + _0_4 = _null; + if (_0_6_isSet) { + _0_4 = (numeratorUnits === null ? type$.List_String._as(numeratorUnits) : numeratorUnits).length; + t1 = _0_4; + _0_6 = t1 <= 0; + _0_8_isSet = _0_6; + } else + _0_8_isSet = true; + _0_8 = _null; + _0_10 = _null; + if (_0_8_isSet) { + _0_8 = denominatorUnits == null; + t1 = _0_8; + _0_10_isSet = !t1; + if (_0_10_isSet) { + _0_10 = (denominatorUnits == null ? type$.List_String._as(denominatorUnits) : denominatorUnits).length <= 0; + t1 = _0_10; + } else + t1 = true; + _0_7 = denominatorUnits; + } else { + _0_7 = _null; + _0_10_isSet = false; + t1 = false; + } + if (t1) + return new A.UnitlessSassNumber(value, _null); + t1 = type$.List_String; + unit = _null; + t2 = false; + if (t1._is(numeratorUnits)) { + _0_7_isSet = true; + if (_0_6_isSet) { + t3 = _0_4; + _0_4_isSet = _0_6_isSet; + } else { + _0_4 = numeratorUnits.length; + t3 = _0_4; + _0_4_isSet = true; + } + if (t3 === 1) { + unit = numeratorUnits[0]; + if (_0_8_isSet) { + t2 = _0_8; + _0_7_isSet0 = _0_8_isSet; + } else { + _0_8 = denominatorUnits == null; + t2 = _0_8; + _0_7_isSet0 = _0_7_isSet; + _0_7 = denominatorUnits; + _0_8_isSet = true; + } + if (!t2) + if (_0_10_isSet) { + t2 = _0_10; + _0_7_isSet = _0_7_isSet0; + } else { + if (_0_7_isSet0) { + t2 = _0_7; + _0_7_isSet = _0_7_isSet0; + } else { + t2 = denominatorUnits; + _0_7 = t2; + } + _0_10 = (t2 == null ? t1._as(t2) : t2).length <= 0; + t2 = _0_10; + _0_10_isSet = true; + } + else { + _0_7_isSet = _0_7_isSet0; + t2 = true; + } + } else + _0_7_isSet = _0_8_isSet; + } else { + _0_7_isSet = _0_8_isSet; + _0_4_isSet = _0_6_isSet; + } + if (t2) + return new A.SingleUnitSassNumber(unit, value, _null); + t2 = numeratorUnits === null; + t3 = false; + if (!t2) { + _0_7_isSet0 = true; + numerators = numeratorUnits; + if (_0_8_isSet) + t3 = _0_8; + else { + if (_0_7_isSet) + t3 = _0_7; + else { + t3 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t3; + } + _0_8 = t3 == null; + t3 = _0_8; + } + if (!t3) + if (_0_10_isSet) + t3 = _0_10; + else { + if (_0_7_isSet) + t3 = _0_7; + else { + t3 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t3; + } + _0_10 = (t3 == null ? t1._as(t3) : t3).length <= 0; + t3 = _0_10; + } + else + t3 = true; + } else + numerators = _null; + if (t3) + return new A.ComplexSassNumber(A.List_List$unmodifiable(numerators, type$.String), B.List_empty, value, _null); + if (!false) + if (_0_6_isSet) + t2 = _0_6; + else { + if (_0_4_isSet) + t2 = _0_4; + else { + _0_4 = (t2 ? t1._as(numeratorUnits) : numeratorUnits).length; + t2 = _0_4; + } + _0_6 = t2 <= 0; + t2 = _0_6; + } + else + t2 = true; + denominators = _null; + if (t2) { + if (_0_7_isSet) + t2 = _0_7; + else { + t2 = denominatorUnits; + _0_7 = t2; + _0_7_isSet = true; + } + t2 = t2 != null; + if (t2) { + denominators = _0_7_isSet ? _0_7 : denominatorUnits; + if (denominators == null) + denominators = t1._as(denominators); + } + t1 = t2; + } else + t1 = false; + if (t1) + return new A.ComplexSassNumber(B.List_empty, A.List_List$unmodifiable(denominators, type$.String), value, _null); + numerators = A._setArrayType(numeratorUnits.slice(0), A._arrayInstanceType(numeratorUnits)); + unsimplifiedDenominators = A._setArrayType(denominatorUnits.slice(0), A.instanceType(denominatorUnits)); + denominators = A._setArrayType([], type$.JSArray_String); + for (t1 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t1 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { + denominator = unsimplifiedDenominators[_i]; + i = 0; + while (true) { + if (!(i < numerators.length)) { + simplifiedAway = false; + break; + } + c$0: { + factor = A.conversionFactor(denominator, numerators[i]); + if (factor == null) + break c$0; + valueDouble *= factor; + B.JSArray_methods.removeAt$1(numerators, i); + simplifiedAway = true; + break; + } + ++i; + } + if (!simplifiedAway) + denominators.push(denominator); + } + $label0$1: { + _1_2 = numerators.length; + t1 = _1_2; + _1_7_isSet = t1 <= 0; + if (_1_7_isSet) { + _1_7 = denominators.length <= 0; + t1 = _1_7; + } else { + _1_7 = _null; + t1 = false; + } + if (t1) { + t1 = new A.UnitlessSassNumber(valueDouble, _null); + break $label0$1; + } + t1 = false; + if (_1_2 === 1) { + unit = numerators[0]; + t1 = _1_7_isSet ? _1_7 : denominators.length <= 0; + } else + unit = _null; + if (t1) { + t1 = new A.SingleUnitSassNumber(unit, valueDouble, _null); + break $label0$1; + } + t1 = type$.String; + t1 = new A.ComplexSassNumber(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); + break $label0$1; + } + return t1; + }, + SassNumber: function SassNumber() { + }, + SassNumber__coerceOrConvertValue_compatibilityException: function SassNumber__coerceOrConvertValue_compatibilityException(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.other = t1; + _.otherName = t2; + _.otherHasUnits = t3; + _.name = t4; + _.newNumerators = t5; + _.newDenominators = t6; + }, + SassNumber__coerceOrConvertValue_closure: function SassNumber__coerceOrConvertValue_closure(t0, t1) { + this._box_0 = t0; + this.newNumerator = t1; + }, + SassNumber__coerceOrConvertValue_closure0: function SassNumber__coerceOrConvertValue_closure0(t0) { + this.compatibilityException = t0; + }, + SassNumber__coerceOrConvertValue_closure1: function SassNumber__coerceOrConvertValue_closure1(t0, t1) { + this._box_0 = t0; + this.newDenominator = t1; + }, + SassNumber__coerceOrConvertValue_closure2: function SassNumber__coerceOrConvertValue_closure2(t0) { + this.compatibilityException = t0; + }, + SassNumber_plus_closure: function SassNumber_plus_closure() { + }, + SassNumber_minus_closure: function SassNumber_minus_closure() { + }, + SassNumber_multiplyUnits_closure: function SassNumber_multiplyUnits_closure(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure0: function SassNumber_multiplyUnits_closure0(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure1: function SassNumber_multiplyUnits_closure1(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure2: function SassNumber_multiplyUnits_closure2(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber__areAnyConvertible_closure: function SassNumber__areAnyConvertible_closure(t0) { + this.units2 = t0; + }, + SassNumber__canonicalizeUnitList_closure: function SassNumber__canonicalizeUnitList_closure() { + }, + SassNumber__canonicalMultiplier_closure: function SassNumber__canonicalMultiplier_closure(t0) { + this.$this = t0; + }, + SassNumber_unitSuggestion_closure: function SassNumber_unitSuggestion_closure() { + }, + SassNumber_unitSuggestion_closure0: function SassNumber_unitSuggestion_closure0() { + }, + ComplexSassNumber: function ComplexSassNumber(t0, t1, t2, t3) { + var _ = this; + _._numeratorUnits = t0; + _._denominatorUnits = t1; + _._number$_value = t2; + _.hashCache = null; + _.asSlash = t3; + }, + SingleUnitSassNumber: function SingleUnitSassNumber(t0, t1, t2) { + var _ = this; + _._unit = t0; + _._number$_value = t1; + _.hashCache = null; + _.asSlash = t2; + }, + SingleUnitSassNumber__coerceToUnit_closure: function SingleUnitSassNumber__coerceToUnit_closure(t0, t1) { + this.$this = t0; + this.unit = t1; + }, + SingleUnitSassNumber__coerceValueToUnit_closure: function SingleUnitSassNumber__coerceValueToUnit_closure(t0) { + this.$this = t0; + }, + SingleUnitSassNumber_multiplyUnits_closure: function SingleUnitSassNumber_multiplyUnits_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SingleUnitSassNumber_multiplyUnits_closure0: function SingleUnitSassNumber_multiplyUnits_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + UnitlessSassNumber: function UnitlessSassNumber(t0, t1) { + this._number$_value = t0; + this.hashCache = null; + this.asSlash = t1; + }, + SassString$(_text, quotes) { + return new A.SassString(_text, quotes); + }, + SassString: function SassString(t0, t1) { + var _ = this; + _._string$_text = t0; + _._hasQuotes = t1; + _.__SassString__sassLength_FI = $; + _._hashCache = null; + }, + AnySelectorVisitor: function AnySelectorVisitor() { + }, + AnySelectorVisitor_visitComplexSelector_closure: function AnySelectorVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + AnySelectorVisitor_visitCompoundSelector_closure: function AnySelectorVisitor_visitCompoundSelector_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t1 = type$.Uri, + t2 = type$.Module_AsyncCallable, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode); + t1 = new A._EvaluateVisitor0(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.AsyncEnvironment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor0: function _EvaluateVisitor0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._async_evaluate$_importCache = t0; + _._async_evaluate$_nodeImporter = t1; + _._async_evaluate$_builtInFunctions = t2; + _._async_evaluate$_builtInModules = t3; + _._async_evaluate$_modules = t4; + _._async_evaluate$_moduleConfigurations = t5; + _._async_evaluate$_moduleNodes = t6; + _._async_evaluate$_logger = t7; + _._async_evaluate$_warningsEmitted = t8; + _._async_evaluate$_quietDeps = t9; + _._async_evaluate$_sourceMap = t10; + _._async_evaluate$_environment = t11; + _._async_evaluate$_declarationName = _._async_evaluate$__parent = _._async_evaluate$_mediaQuerySources = _._async_evaluate$_mediaQueries = _._async_evaluate$_styleRuleIgnoringAtRoot = null; + _._async_evaluate$_member = "root stylesheet"; + _._async_evaluate$_importSpan = _._async_evaluate$_callableNode = _._async_evaluate$_currentCallable = null; + _._async_evaluate$_inSupportsDeclaration = _._async_evaluate$_inKeyframes = _._async_evaluate$_atRootExcludingStyleRule = _._async_evaluate$_inUnknownAtRule = _._async_evaluate$_inFunction = false; + _._async_evaluate$_loadedUrls = t12; + _._async_evaluate$_activeModules = t13; + _._async_evaluate$_stack = t14; + _._async_evaluate$_importer = null; + _._async_evaluate$_inDependency = false; + _._async_evaluate$__extensionStore = _._async_evaluate$_preModuleComments = _._async_evaluate$_outOfOrderImports = _._async_evaluate$__endOfImports = _._async_evaluate$__root = _._async_evaluate$__stylesheet = null; + _._async_evaluate$_configuration = t15; + }, + _EvaluateVisitor_closure12: function _EvaluateVisitor_closure12(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure13: function _EvaluateVisitor_closure13(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure14: function _EvaluateVisitor_closure14(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure15: function _EvaluateVisitor_closure15(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure16: function _EvaluateVisitor_closure16(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure17: function _EvaluateVisitor_closure17(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure18: function _EvaluateVisitor_closure18(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure19: function _EvaluateVisitor_closure19(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure20: function _EvaluateVisitor_closure20(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure6: function _EvaluateVisitor__closure6(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure21: function _EvaluateVisitor_closure21(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure5: function _EvaluateVisitor__closure5(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure22: function _EvaluateVisitor_closure22(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure23: function _EvaluateVisitor_closure23(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure3: function _EvaluateVisitor__closure3(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure4: function _EvaluateVisitor__closure4(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure24: function _EvaluateVisitor_closure24(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure0: function _EvaluateVisitor_run_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure0: function _EvaluateVisitor_run__closure0(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor__loadModule_closure1: function _EvaluateVisitor__loadModule_closure1(t0, t1) { + this._box_1 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure2: function _EvaluateVisitor__loadModule_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure1: function _EvaluateVisitor__loadModule__closure1(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure2: function _EvaluateVisitor__loadModule__closure2(t0, t1, t2) { + this._box_0 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure0: function _EvaluateVisitor__execute_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure1: function _EvaluateVisitor__combineCss_closure1() { + }, + _EvaluateVisitor__combineCss_closure2: function _EvaluateVisitor__combineCss_closure2(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule0: function _EvaluateVisitor__combineCss_visitModule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure1: function _EvaluateVisitor__extendModules_closure1(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure2: function _EvaluateVisitor__extendModules_closure2() { + }, + _EvaluateVisitor_visitAtRootRule_closure1: function _EvaluateVisitor_visitAtRootRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure2: function _EvaluateVisitor_visitAtRootRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure5: function _EvaluateVisitor__scopeForAtRoot_closure5(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure6: function _EvaluateVisitor__scopeForAtRoot_closure6(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure7: function _EvaluateVisitor__scopeForAtRoot_closure7(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure0: function _EvaluateVisitor__scopeForAtRoot__closure0(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure8: function _EvaluateVisitor__scopeForAtRoot_closure8(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure9: function _EvaluateVisitor__scopeForAtRoot_closure9() { + }, + _EvaluateVisitor__scopeForAtRoot_closure10: function _EvaluateVisitor__scopeForAtRoot_closure10(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure0: function _EvaluateVisitor_visitContentRule_closure0(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure0: function _EvaluateVisitor_visitDeclaration_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure2: function _EvaluateVisitor_visitEachRule_closure2(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure3: function _EvaluateVisitor_visitEachRule_closure3(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure4: function _EvaluateVisitor_visitEachRule_closure4(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure0: function _EvaluateVisitor_visitEachRule__closure0(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure0: function _EvaluateVisitor_visitEachRule___closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure2: function _EvaluateVisitor_visitAtRule_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure3: function _EvaluateVisitor_visitAtRule_closure3(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure0: function _EvaluateVisitor_visitAtRule__closure0(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure4: function _EvaluateVisitor_visitAtRule_closure4() { + }, + _EvaluateVisitor_visitForRule_closure4: function _EvaluateVisitor_visitForRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure5: function _EvaluateVisitor_visitForRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure6: function _EvaluateVisitor_visitForRule_closure6(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure7: function _EvaluateVisitor_visitForRule_closure7(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure8: function _EvaluateVisitor_visitForRule_closure8(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure0: function _EvaluateVisitor_visitForRule__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure1: function _EvaluateVisitor_visitForwardRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure2: function _EvaluateVisitor_visitForwardRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure0: function _EvaluateVisitor__registerCommentsForModule_closure0() { + }, + _EvaluateVisitor_visitIfRule_closure0: function _EvaluateVisitor_visitIfRule_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure0: function _EvaluateVisitor_visitIfRule__closure0(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure0: function _EvaluateVisitor_visitIfRule___closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure0: function _EvaluateVisitor__visitDynamicImport_closure0(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure3: function _EvaluateVisitor__visitDynamicImport__closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure4: function _EvaluateVisitor__visitDynamicImport__closure4() { + }, + _EvaluateVisitor__visitDynamicImport__closure5: function _EvaluateVisitor__visitDynamicImport__closure5() { + }, + _EvaluateVisitor__visitDynamicImport__closure6: function _EvaluateVisitor__visitDynamicImport__closure6(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure1: function _EvaluateVisitor__applyMixin_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure2: function _EvaluateVisitor__applyMixin__closure2(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure2: function _EvaluateVisitor__applyMixin_closure2(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure1: function _EvaluateVisitor__applyMixin__closure1(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure0: function _EvaluateVisitor__applyMixin___closure0(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure0: function _EvaluateVisitor__applyMixin____closure0(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure2: function _EvaluateVisitor_visitIncludeRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure3: function _EvaluateVisitor_visitIncludeRule_closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure4: function _EvaluateVisitor_visitIncludeRule_closure4(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure2: function _EvaluateVisitor_visitMediaRule_closure2(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure3: function _EvaluateVisitor_visitMediaRule_closure3(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure0: function _EvaluateVisitor_visitMediaRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure0: function _EvaluateVisitor_visitMediaRule___closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure4: function _EvaluateVisitor_visitMediaRule_closure4(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure3: function _EvaluateVisitor_visitStyleRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure4: function _EvaluateVisitor_visitStyleRule_closure4() { + }, + _EvaluateVisitor_visitStyleRule_closure6: function _EvaluateVisitor_visitStyleRule_closure6(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure0: function _EvaluateVisitor_visitStyleRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure5: function _EvaluateVisitor_visitStyleRule_closure5() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure0: function _EvaluateVisitor__warnForBogusCombinators_closure0() { + }, + _EvaluateVisitor_visitSupportsRule_closure1: function _EvaluateVisitor_visitSupportsRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure0: function _EvaluateVisitor_visitSupportsRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure2: function _EvaluateVisitor_visitSupportsRule_closure2() { + }, + _EvaluateVisitor__visitSupportsCondition_closure0: function _EvaluateVisitor__visitSupportsCondition_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure2: function _EvaluateVisitor_visitVariableDeclaration_closure2(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure3: function _EvaluateVisitor_visitVariableDeclaration_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure4: function _EvaluateVisitor_visitVariableDeclaration_closure4(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure0: function _EvaluateVisitor_visitUseRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure0: function _EvaluateVisitor_visitWarnRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure0: function _EvaluateVisitor_visitWhileRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure0: function _EvaluateVisitor_visitWhileRule__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure0: function _EvaluateVisitor_visitBinaryOperationExpression_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation0: function _EvaluateVisitor__slash_recommendation0() { + }, + _EvaluateVisitor_visitVariableExpression_closure0: function _EvaluateVisitor_visitVariableExpression_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure0: function _EvaluateVisitor_visitUnaryOperationExpression_closure0(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitListExpression_closure0: function _EvaluateVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure2: function _EvaluateVisitor_visitFunctionExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure3: function _EvaluateVisitor_visitFunctionExpression_closure3() { + }, + _EvaluateVisitor_visitFunctionExpression_closure4: function _EvaluateVisitor_visitFunctionExpression_closure4(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__checkCalculationArguments_check0: function _EvaluateVisitor__checkCalculationArguments_check0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure0: function _EvaluateVisitor__visitCalculationExpression_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure0: function _EvaluateVisitor__runUserDefinedCallable_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure0: function _EvaluateVisitor__runUserDefinedCallable__closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure0: function _EvaluateVisitor__runUserDefinedCallable___closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure0: function _EvaluateVisitor__runUserDefinedCallable____closure0() { + }, + _EvaluateVisitor__runFunctionCallable_closure0: function _EvaluateVisitor__runFunctionCallable_closure0(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure2: function _EvaluateVisitor__runBuiltInCallable_closure2(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure3: function _EvaluateVisitor__runBuiltInCallable_closure3(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure4: function _EvaluateVisitor__runBuiltInCallable_closure4() { + }, + _EvaluateVisitor__evaluateArguments_closure3: function _EvaluateVisitor__evaluateArguments_closure3() { + }, + _EvaluateVisitor__evaluateArguments_closure4: function _EvaluateVisitor__evaluateArguments_closure4(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure5: function _EvaluateVisitor__evaluateArguments_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure6: function _EvaluateVisitor__evaluateArguments_closure6() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure3: function _EvaluateVisitor__evaluateMacroArguments_closure3(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure4: function _EvaluateVisitor__evaluateMacroArguments_closure4(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure5: function _EvaluateVisitor__evaluateMacroArguments_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure6: function _EvaluateVisitor__evaluateMacroArguments_closure6(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure0: function _EvaluateVisitor__addRestMap_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure0: function _EvaluateVisitor__verifyArguments_closure0(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure1: function _EvaluateVisitor_visitCssAtRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure2: function _EvaluateVisitor_visitCssAtRule_closure2() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure1: function _EvaluateVisitor_visitCssKeyframeBlock_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure2: function _EvaluateVisitor_visitCssKeyframeBlock_closure2() { + }, + _EvaluateVisitor_visitCssMediaRule_closure2: function _EvaluateVisitor_visitCssMediaRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure3: function _EvaluateVisitor_visitCssMediaRule_closure3(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure0: function _EvaluateVisitor_visitCssMediaRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure0: function _EvaluateVisitor_visitCssMediaRule___closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure4: function _EvaluateVisitor_visitCssMediaRule_closure4(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure2: function _EvaluateVisitor_visitCssStyleRule_closure2(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure0: function _EvaluateVisitor_visitCssStyleRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure1: function _EvaluateVisitor_visitCssStyleRule_closure1() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure1: function _EvaluateVisitor_visitCssSupportsRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure0: function _EvaluateVisitor_visitCssSupportsRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure2: function _EvaluateVisitor_visitCssSupportsRule_closure2() { + }, + _EvaluateVisitor__performInterpolationHelper_closure0: function _EvaluateVisitor__performInterpolationHelper_closure0(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure0: function _EvaluateVisitor__serialize_closure0(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure0: function _EvaluateVisitor__expressionNode_closure0(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation0: function _EvaluateVisitor__withoutSlash_recommendation0() { + }, + _EvaluateVisitor__stackFrame_closure0: function _EvaluateVisitor__stackFrame_closure0(t0) { + this.$this = t0; + }, + _ImportedCssVisitor0: function _ImportedCssVisitor0(t0) { + this._async_evaluate$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure0: function _ImportedCssVisitor_visitCssAtRule_closure0() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure0: function _ImportedCssVisitor_visitCssMediaRule_closure0(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure0: function _ImportedCssVisitor_visitCssStyleRule_closure0() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure0: function _ImportedCssVisitor_visitCssSupportsRule_closure0() { + }, + _EvaluationContext0: function _EvaluationContext0(t0, t1) { + this._async_evaluate$_visitor = t0; + this._async_evaluate$_defaultWarnNodeWithSpan = t1; + }, + cloneCssStylesheet(stylesheet, extensionStore) { + var _0_0 = extensionStore.clone$0(); + return new A._Record_2(new A._CloneCssVisitor(_0_0._1)._visitChildren$2(A.ModifiableCssStylesheet$(stylesheet.get$span(stylesheet)), stylesheet), _0_0._0); + }, + _CloneCssVisitor: function _CloneCssVisitor(t0) { + this._oldToNewSelectors = t0; + }, + _EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t1 = type$.Uri, + t2 = type$.Module_Callable, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode); + t1 = new A._EvaluateVisitor(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.Environment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + Evaluator: function Evaluator(t0, t1) { + this._visitor = t0; + this._importer = t1; + }, + _EvaluateVisitor: function _EvaluateVisitor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._evaluate$_importCache = t0; + _._evaluate$_nodeImporter = t1; + _._builtInFunctions = t2; + _._builtInModules = t3; + _._modules = t4; + _._moduleConfigurations = t5; + _._moduleNodes = t6; + _._evaluate$_logger = t7; + _._warningsEmitted = t8; + _._quietDeps = t9; + _._sourceMap = t10; + _._environment = t11; + _._declarationName = _.__parent = _._mediaQuerySources = _._mediaQueries = _._styleRuleIgnoringAtRoot = null; + _._member = "root stylesheet"; + _._importSpan = _._callableNode = _._currentCallable = null; + _._inSupportsDeclaration = _._inKeyframes = _._atRootExcludingStyleRule = _._inUnknownAtRule = _._inFunction = false; + _._loadedUrls = t12; + _._activeModules = t13; + _._stack = t14; + _._importer = null; + _._inDependency = false; + _.__extensionStore = _._preModuleComments = _._outOfOrderImports = _.__endOfImports = _.__root = _.__stylesheet = null; + _._configuration = t15; + }, + _EvaluateVisitor_closure: function _EvaluateVisitor_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure0: function _EvaluateVisitor_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure1: function _EvaluateVisitor_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure2: function _EvaluateVisitor_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure3: function _EvaluateVisitor_closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure4: function _EvaluateVisitor_closure4(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure5: function _EvaluateVisitor_closure5(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure6: function _EvaluateVisitor_closure6(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure7: function _EvaluateVisitor_closure7(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure2: function _EvaluateVisitor__closure2(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure8: function _EvaluateVisitor_closure8(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure1: function _EvaluateVisitor__closure1(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure9: function _EvaluateVisitor_closure9(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure10: function _EvaluateVisitor_closure10(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure: function _EvaluateVisitor__closure(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure0: function _EvaluateVisitor__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure11: function _EvaluateVisitor_closure11(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure: function _EvaluateVisitor_run_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure: function _EvaluateVisitor_run__closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor_runExpression_closure: function _EvaluateVisitor_runExpression_closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.expression = t2; + }, + _EvaluateVisitor_runExpression__closure: function _EvaluateVisitor_runExpression__closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor_runExpression___closure: function _EvaluateVisitor_runExpression___closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor_runStatement_closure: function _EvaluateVisitor_runStatement_closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.statement = t2; + }, + _EvaluateVisitor_runStatement__closure: function _EvaluateVisitor_runStatement__closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_runStatement___closure: function _EvaluateVisitor_runStatement___closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor__loadModule_closure: function _EvaluateVisitor__loadModule_closure(t0, t1) { + this._box_1 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure0: function _EvaluateVisitor__loadModule_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure: function _EvaluateVisitor__loadModule__closure(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure0: function _EvaluateVisitor__loadModule__closure0(t0, t1, t2) { + this._box_0 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure: function _EvaluateVisitor__execute_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure: function _EvaluateVisitor__combineCss_closure() { + }, + _EvaluateVisitor__combineCss_closure0: function _EvaluateVisitor__combineCss_closure0(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule: function _EvaluateVisitor__combineCss_visitModule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure: function _EvaluateVisitor__extendModules_closure(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure0: function _EvaluateVisitor__extendModules_closure0() { + }, + _EvaluateVisitor_visitAtRootRule_closure: function _EvaluateVisitor_visitAtRootRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure0: function _EvaluateVisitor_visitAtRootRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure: function _EvaluateVisitor__scopeForAtRoot_closure(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure0: function _EvaluateVisitor__scopeForAtRoot_closure0(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure1: function _EvaluateVisitor__scopeForAtRoot_closure1(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure: function _EvaluateVisitor__scopeForAtRoot__closure(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure2: function _EvaluateVisitor__scopeForAtRoot_closure2(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure3: function _EvaluateVisitor__scopeForAtRoot_closure3() { + }, + _EvaluateVisitor__scopeForAtRoot_closure4: function _EvaluateVisitor__scopeForAtRoot_closure4(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure: function _EvaluateVisitor_visitContentRule_closure(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure: function _EvaluateVisitor_visitDeclaration_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure: function _EvaluateVisitor_visitEachRule_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure0: function _EvaluateVisitor_visitEachRule_closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure1: function _EvaluateVisitor_visitEachRule_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure: function _EvaluateVisitor_visitEachRule__closure(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure: function _EvaluateVisitor_visitEachRule___closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure: function _EvaluateVisitor_visitAtRule_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure0: function _EvaluateVisitor_visitAtRule_closure0(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure: function _EvaluateVisitor_visitAtRule__closure(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure1: function _EvaluateVisitor_visitAtRule_closure1() { + }, + _EvaluateVisitor_visitForRule_closure: function _EvaluateVisitor_visitForRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure0: function _EvaluateVisitor_visitForRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure1: function _EvaluateVisitor_visitForRule_closure1(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure2: function _EvaluateVisitor_visitForRule_closure2(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure3: function _EvaluateVisitor_visitForRule_closure3(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure: function _EvaluateVisitor_visitForRule__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure: function _EvaluateVisitor_visitForwardRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure0: function _EvaluateVisitor_visitForwardRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure: function _EvaluateVisitor__registerCommentsForModule_closure() { + }, + _EvaluateVisitor_visitIfRule_closure: function _EvaluateVisitor_visitIfRule_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure: function _EvaluateVisitor_visitIfRule__closure(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure: function _EvaluateVisitor_visitIfRule___closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure: function _EvaluateVisitor__visitDynamicImport_closure(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure: function _EvaluateVisitor__visitDynamicImport__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure0: function _EvaluateVisitor__visitDynamicImport__closure0() { + }, + _EvaluateVisitor__visitDynamicImport__closure1: function _EvaluateVisitor__visitDynamicImport__closure1() { + }, + _EvaluateVisitor__visitDynamicImport__closure2: function _EvaluateVisitor__visitDynamicImport__closure2(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure: function _EvaluateVisitor__applyMixin_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure0: function _EvaluateVisitor__applyMixin__closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure0: function _EvaluateVisitor__applyMixin_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure: function _EvaluateVisitor__applyMixin__closure(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure: function _EvaluateVisitor__applyMixin___closure(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure: function _EvaluateVisitor__applyMixin____closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure: function _EvaluateVisitor_visitIncludeRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure0: function _EvaluateVisitor_visitIncludeRule_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure1: function _EvaluateVisitor_visitIncludeRule_closure1(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure: function _EvaluateVisitor_visitMediaRule_closure(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure0: function _EvaluateVisitor_visitMediaRule_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure: function _EvaluateVisitor_visitMediaRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure: function _EvaluateVisitor_visitMediaRule___closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure1: function _EvaluateVisitor_visitMediaRule_closure1(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure: function _EvaluateVisitor_visitStyleRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure0: function _EvaluateVisitor_visitStyleRule_closure0() { + }, + _EvaluateVisitor_visitStyleRule_closure2: function _EvaluateVisitor_visitStyleRule_closure2(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure: function _EvaluateVisitor_visitStyleRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure1: function _EvaluateVisitor_visitStyleRule_closure1() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure: function _EvaluateVisitor__warnForBogusCombinators_closure() { + }, + _EvaluateVisitor_visitSupportsRule_closure: function _EvaluateVisitor_visitSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure: function _EvaluateVisitor_visitSupportsRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure0: function _EvaluateVisitor_visitSupportsRule_closure0() { + }, + _EvaluateVisitor__visitSupportsCondition_closure: function _EvaluateVisitor__visitSupportsCondition_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure: function _EvaluateVisitor_visitVariableDeclaration_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure0: function _EvaluateVisitor_visitVariableDeclaration_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure1: function _EvaluateVisitor_visitVariableDeclaration_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure: function _EvaluateVisitor_visitUseRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure: function _EvaluateVisitor_visitWarnRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure: function _EvaluateVisitor_visitWhileRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure: function _EvaluateVisitor_visitWhileRule__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure: function _EvaluateVisitor_visitBinaryOperationExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation: function _EvaluateVisitor__slash_recommendation() { + }, + _EvaluateVisitor_visitVariableExpression_closure: function _EvaluateVisitor_visitVariableExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure: function _EvaluateVisitor_visitUnaryOperationExpression_closure(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitListExpression_closure: function _EvaluateVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure: function _EvaluateVisitor_visitFunctionExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure0: function _EvaluateVisitor_visitFunctionExpression_closure0() { + }, + _EvaluateVisitor_visitFunctionExpression_closure1: function _EvaluateVisitor_visitFunctionExpression_closure1(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__checkCalculationArguments_check: function _EvaluateVisitor__checkCalculationArguments_check(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure: function _EvaluateVisitor__visitCalculationExpression_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure: function _EvaluateVisitor__runUserDefinedCallable_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure: function _EvaluateVisitor__runUserDefinedCallable__closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure: function _EvaluateVisitor__runUserDefinedCallable___closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure: function _EvaluateVisitor__runUserDefinedCallable____closure() { + }, + _EvaluateVisitor__runFunctionCallable_closure: function _EvaluateVisitor__runFunctionCallable_closure(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure: function _EvaluateVisitor__runBuiltInCallable_closure(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure0: function _EvaluateVisitor__runBuiltInCallable_closure0(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure1: function _EvaluateVisitor__runBuiltInCallable_closure1() { + }, + _EvaluateVisitor__evaluateArguments_closure: function _EvaluateVisitor__evaluateArguments_closure() { + }, + _EvaluateVisitor__evaluateArguments_closure0: function _EvaluateVisitor__evaluateArguments_closure0(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure1: function _EvaluateVisitor__evaluateArguments_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure2: function _EvaluateVisitor__evaluateArguments_closure2() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure: function _EvaluateVisitor__evaluateMacroArguments_closure(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure0: function _EvaluateVisitor__evaluateMacroArguments_closure0(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure1: function _EvaluateVisitor__evaluateMacroArguments_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure2: function _EvaluateVisitor__evaluateMacroArguments_closure2(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure: function _EvaluateVisitor__addRestMap_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure: function _EvaluateVisitor__verifyArguments_closure(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure: function _EvaluateVisitor_visitCssAtRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure0: function _EvaluateVisitor_visitCssAtRule_closure0() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure: function _EvaluateVisitor_visitCssKeyframeBlock_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure0: function _EvaluateVisitor_visitCssKeyframeBlock_closure0() { + }, + _EvaluateVisitor_visitCssMediaRule_closure: function _EvaluateVisitor_visitCssMediaRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure0: function _EvaluateVisitor_visitCssMediaRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure: function _EvaluateVisitor_visitCssMediaRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure: function _EvaluateVisitor_visitCssMediaRule___closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure1: function _EvaluateVisitor_visitCssMediaRule_closure1(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure0: function _EvaluateVisitor_visitCssStyleRule_closure0(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure: function _EvaluateVisitor_visitCssStyleRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure: function _EvaluateVisitor_visitCssStyleRule_closure() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure: function _EvaluateVisitor_visitCssSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure: function _EvaluateVisitor_visitCssSupportsRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure0: function _EvaluateVisitor_visitCssSupportsRule_closure0() { + }, + _EvaluateVisitor__performInterpolationHelper_closure: function _EvaluateVisitor__performInterpolationHelper_closure(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure: function _EvaluateVisitor__serialize_closure(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure: function _EvaluateVisitor__expressionNode_closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation: function _EvaluateVisitor__withoutSlash_recommendation() { + }, + _EvaluateVisitor__stackFrame_closure: function _EvaluateVisitor__stackFrame_closure(t0) { + this.$this = t0; + }, + _ImportedCssVisitor: function _ImportedCssVisitor(t0) { + this._visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure: function _ImportedCssVisitor_visitCssAtRule_closure() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure: function _ImportedCssVisitor_visitCssMediaRule_closure(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure: function _ImportedCssVisitor_visitCssStyleRule_closure() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure: function _ImportedCssVisitor_visitCssSupportsRule_closure() { + }, + _EvaluationContext: function _EvaluationContext(t0, t1) { + this._visitor = t0; + this._defaultWarnNodeWithSpan = t1; + }, + EveryCssVisitor: function EveryCssVisitor() { + }, + EveryCssVisitor_visitCssAtRule_closure: function EveryCssVisitor_visitCssAtRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssKeyframeBlock_closure: function EveryCssVisitor_visitCssKeyframeBlock_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssMediaRule_closure: function EveryCssVisitor_visitCssMediaRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStyleRule_closure: function EveryCssVisitor_visitCssStyleRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStylesheet_closure: function EveryCssVisitor_visitCssStylesheet_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssSupportsRule_closure: function EveryCssVisitor_visitCssSupportsRule_closure(t0) { + this.$this = t0; + }, + expressionToCalc(expression) { + var t4, + t1 = A._setArrayType([B.C__MakeExpressionCalculationSafe.visitBinaryOperationExpression$1(0, expression)], type$.JSArray_Expression), + t2 = expression.get$span(0), + t3 = type$.Expression; + t1 = A.List_List$unmodifiable(t1, t3); + t3 = A.ConstantMap_ConstantMap$from(B.Map_empty6, type$.String, t3); + t4 = expression.get$span(0); + return new A.FunctionExpression(null, A.stringReplaceAllUnchecked("calc", "_", "-"), "calc", new A.ArgumentInvocation(t1, t3, null, null, t2), t4); + }, + _MakeExpressionCalculationSafe: function _MakeExpressionCalculationSafe() { + }, + __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor: function __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor() { + }, + _FindDependenciesVisitor: function _FindDependenciesVisitor(t0, t1, t2, t3, t4) { + var _ = this; + _._find_dependencies$_uses = t0; + _._find_dependencies$_forwards = t1; + _._metaLoadCss = t2; + _._imports = t3; + _._metaNamespaces = t4; + }, + DependencyReport: function DependencyReport(t0, t1, t2, t3) { + var _ = this; + _.uses = t0; + _.forwards = t1; + _.metaLoadCss = t2; + _.imports = t3; + }, + __FindDependenciesVisitor_Object_RecursiveStatementVisitor: function __FindDependenciesVisitor_Object_RecursiveStatementVisitor() { + }, + RecursiveStatementVisitor: function RecursiveStatementVisitor() { + }, + ReplaceExpressionVisitor: function ReplaceExpressionVisitor() { + }, + ReplaceExpressionVisitor_visitListExpression_closure: function ReplaceExpressionVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitArgumentInvocation_closure: function ReplaceExpressionVisitor_visitArgumentInvocation_closure(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitInterpolation_closure: function ReplaceExpressionVisitor_visitInterpolation_closure(t0) { + this.$this = t0; + }, + SelectorSearchVisitor: function SelectorSearchVisitor() { + }, + SelectorSearchVisitor_visitComplexSelector_closure: function SelectorSearchVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + SelectorSearchVisitor_visitCompoundSelector_closure: function SelectorSearchVisitor_visitCompoundSelector_closure(t0) { + this.$this = t0; + }, + serialize(node, charset, indentWidth, inspect, lineFeed, logger, sourceMap, style, useSpaces) { + var t1, css, t2, prefix, + visitor = A._SerializeVisitor$(2, inspect, lineFeed, logger, true, sourceMap, style, true); + node.accept$1(visitor); + t1 = visitor._serialize$_buffer; + css = t1.toString$0(0); + if (charset) { + t2 = new A.CodeUnits(css); + t2 = t2.any$1(t2, new A.serialize_closure()); + } else + t2 = false; + if (t2) + prefix = style === B.OutputStyle_1 ? "\ufeff" : '@charset "UTF-8";\n'; + else + prefix = ""; + t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; + return new A._Record_2_sourceMap(prefix + css, t1); + }, + serializeValue(value, inspect, quote) { + var _null = null, + visitor = A._SerializeVisitor$(_null, inspect, _null, _null, quote, false, _null, true); + value.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + serializeSelector(selector, inspect) { + var _null = null, + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + selector.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + _SerializeVisitor$(indentWidth, inspect, lineFeed, logger, quote, sourceMap, style, useSpaces) { + var t1 = sourceMap ? new A.SourceMapBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer(new A.StringBuffer("")), + t2 = style == null ? B.OutputStyle_0 : style, + t3 = indentWidth == null ? 2 : indentWidth, + t4 = logger == null ? B.StderrLogger_false : logger; + A.RangeError_checkValueInInterval(t3, 0, 10, "indentWidth"); + return new A._SerializeVisitor(t1, t2, inspect, quote, 32, t3, B.LineFeed_lf, t4); + }, + serialize_closure: function serialize_closure() { + }, + _SerializeVisitor: function _SerializeVisitor(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._serialize$_buffer = t0; + _._indentation = 0; + _._style = t1; + _._inspect = t2; + _._quote = t3; + _._indentCharacter = t4; + _._indentWidth = t5; + _._serialize$_lineFeed = t6; + _._serialize$_logger = t7; + }, + _SerializeVisitor_visitCssComment_closure: function _SerializeVisitor_visitCssComment_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssAtRule_closure: function _SerializeVisitor_visitCssAtRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssMediaRule_closure: function _SerializeVisitor_visitCssMediaRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport_closure: function _SerializeVisitor_visitCssImport_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport__closure: function _SerializeVisitor_visitCssImport__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssKeyframeBlock_closure: function _SerializeVisitor_visitCssKeyframeBlock_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssStyleRule_closure: function _SerializeVisitor_visitCssStyleRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssSupportsRule_closure: function _SerializeVisitor_visitCssSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure: function _SerializeVisitor_visitCssDeclaration_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure0: function _SerializeVisitor_visitCssDeclaration_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitList_closure: function _SerializeVisitor_visitList_closure() { + }, + _SerializeVisitor_visitList_closure0: function _SerializeVisitor_visitList_closure0(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor_visitList_closure1: function _SerializeVisitor_visitList_closure1(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitMap_closure: function _SerializeVisitor_visitMap_closure(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitSelectorList_closure: function _SerializeVisitor_visitSelectorList_closure() { + }, + _SerializeVisitor__write_closure: function _SerializeVisitor__write_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor__visitChildren_closure: function _SerializeVisitor__visitChildren_closure(t0, t1) { + this.$this = t0; + this.child = t1; + }, + _SerializeVisitor__visitChildren_closure0: function _SerializeVisitor__visitChildren_closure0(t0, t1) { + this.$this = t0; + this.child = t1; + }, + OutputStyle: function OutputStyle(t0) { + this._name = t0; + }, + LineFeed: function LineFeed(t0) { + this._name = t0; + }, + StatementSearchVisitor: function StatementSearchVisitor() { + }, + StatementSearchVisitor_visitIfRule_closure: function StatementSearchVisitor_visitIfRule_closure(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure0: function StatementSearchVisitor_visitIfRule__closure0(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule_closure0: function StatementSearchVisitor_visitIfRule_closure0(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure: function StatementSearchVisitor_visitIfRule__closure(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitChildren_closure: function StatementSearchVisitor_visitChildren_closure(t0) { + this.$this = t0; + }, + Entry: function Entry(t0, t1, t2) { + this.source = t0; + this.target = t1; + this.identifierName = t2; + }, + SingleMapping_SingleMapping$fromEntries(entries) { + var lines, t1, t2, urls, names, files, targetEntries, t3, lineNum, _i, sourceEntry, t4, t5, sourceUrl, t6, urlId, + sourceEntries = J.toList$0$ax(entries); + B.JSArray_methods.sort$0(sourceEntries); + lines = A._setArrayType([], type$.JSArray_TargetLineEntry); + t1 = type$.String; + t2 = type$.int; + urls = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + names = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + files = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.SourceFile); + targetEntries = A._Cell$(); + for (t2 = sourceEntries.length, t3 = type$.JSArray_TargetEntry, lineNum = null, _i = 0; _i < sourceEntries.length; sourceEntries.length === t2 || (0, A.throwConcurrentModificationError)(sourceEntries), ++_i) { + sourceEntry = sourceEntries[_i]; + if (lineNum == null || sourceEntry.target.line > lineNum) { + lineNum = sourceEntry.target.line; + t4 = A._setArrayType([], t3); + targetEntries.__late_helper$_value = t4; + lines.push(new A.TargetLineEntry(lineNum, t4)); + } + t4 = sourceEntry.source; + t5 = t4.file; + sourceUrl = t5.url; + t6 = sourceUrl == null ? "" : sourceUrl.toString$0(0); + urlId = urls.putIfAbsent$2(t6, new A.SingleMapping_SingleMapping$fromEntries_closure(urls)); + files.putIfAbsent$2(urlId, new A.SingleMapping_SingleMapping$fromEntries_closure0(sourceEntry)); + t6 = targetEntries.__late_helper$_value; + if (t6 === targetEntries) + A.throwExpression(A.LateError$localNI("")); + t4 = t4.offset; + J.add$1$ax(t6, new A.TargetEntry(sourceEntry.target.column, urlId, t5.getLine$1(t4), t5.getColumn$1(t4), null)); + } + t2 = urls.get$values(0); + t2 = A.MappedIterable_MappedIterable(t2, new A.SingleMapping_SingleMapping$fromEntries_closure1(files), A._instanceType(t2)._eval$1("Iterable.E"), type$.nullable_SourceFile); + t2 = A.List_List$of(t2, true, A._instanceType(t2)._eval$1("Iterable.E")); + t3 = urls.$ti._eval$1("LinkedHashMapKeyIterable<1>"); + t4 = names.$ti._eval$1("LinkedHashMapKeyIterable<1>"); + return new A.SingleMapping(A.List_List$of(new A.LinkedHashMapKeyIterable(urls, t3), true, t3._eval$1("Iterable.E")), A.List_List$of(new A.LinkedHashMapKeyIterable(names, t4), true, t4._eval$1("Iterable.E")), t2, lines, null, A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.dynamic)); + }, + Mapping: function Mapping() { + }, + SingleMapping: function SingleMapping(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.urls = t0; + _.names = t1; + _.files = t2; + _.lines = t3; + _.targetUrl = t4; + _.sourceRoot = null; + _.extensions = t5; + }, + SingleMapping_SingleMapping$fromEntries_closure: function SingleMapping_SingleMapping$fromEntries_closure(t0) { + this.urls = t0; + }, + SingleMapping_SingleMapping$fromEntries_closure0: function SingleMapping_SingleMapping$fromEntries_closure0(t0) { + this.sourceEntry = t0; + }, + SingleMapping_SingleMapping$fromEntries_closure1: function SingleMapping_SingleMapping$fromEntries_closure1(t0) { + this.files = t0; + }, + SingleMapping_toJson_closure: function SingleMapping_toJson_closure() { + }, + SingleMapping_toJson_closure0: function SingleMapping_toJson_closure0(t0) { + this.result = t0; + }, + TargetLineEntry: function TargetLineEntry(t0, t1) { + this.line = t0; + this.entries = t1; + }, + TargetEntry: function TargetEntry(t0, t1, t2, t3, t4) { + var _ = this; + _.column = t0; + _.sourceUrlId = t1; + _.sourceLine = t2; + _.sourceColumn = t3; + _.sourceNameId = t4; + }, + SourceFile$fromString(text, url) { + var t1 = new A.CodeUnits(text), + t2 = A._setArrayType([0], type$.JSArray_int), + t3 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url); + t2 = new A.SourceFile(t3, t2, new Uint32Array(A._ensureNativeList(t1.toList$0(t1)))); + t2.SourceFile$decoded$2$url(t1, url); + return t2; + }, + SourceFile$decoded(decodedChars, url) { + var t1 = A._setArrayType([0], type$.JSArray_int), + t2 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url); + t1 = new A.SourceFile(t2, t1, new Uint32Array(A._ensureNativeList(J.toList$0$ax(decodedChars)))); + t1.SourceFile$decoded$2$url(decodedChars, url); + return t1; + }, + FileLocation$_(file, offset) { + if (offset < 0) + A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > file._decodedChars.length) + A.throwExpression(A.RangeError$("Offset " + offset + string$.x20must_n + file.get$length(0) + ".")); + return new A.FileLocation(file, offset); + }, + _FileSpan$(file, _start, _end) { + if (_end < _start) + A.throwExpression(A.ArgumentError$("End " + _end + " must come after start " + _start + ".", null)); + else if (_end > file._decodedChars.length) + A.throwExpression(A.RangeError$("End " + _end + string$.x20must_n + file.get$length(0) + ".")); + else if (_start < 0) + A.throwExpression(A.RangeError$("Start may not be negative, was " + _start + ".")); + return new A._FileSpan(file, _start, _end); + }, + FileSpanExtension_subspan(_this, start, end) { + var t1, startOffset, t2; + A.RangeError_checkValidRange(start, end, _this.get$length(_this)); + if (start === 0) + t1 = end == null || end === _this.get$length(_this); + else + t1 = false; + if (t1) + return _this; + startOffset = _this.get$start(_this).offset; + t1 = _this.get$file(_this); + t2 = end == null ? _this.get$end(_this).offset : startOffset + end; + return t1.span$2(0, startOffset + start, t2); + }, + SourceFile: function SourceFile(t0, t1, t2) { + var _ = this; + _.url = t0; + _._lineStarts = t1; + _._decodedChars = t2; + _._cachedLine = null; + }, + FileLocation: function FileLocation(t0, t1) { + this.file = t0; + this.offset = t1; + }, + _FileSpan: function _FileSpan(t0, t1, t2) { + this.file = t0; + this._file$_start = t1; + this._end = t2; + }, + Highlighter$(span, color) { + var t1 = A.Highlighter__collateLines(A._setArrayType([A._Highlight$(span, null, true)], type$.JSArray__Highlight)), + t2 = new A.Highlighter_closure(color).call$0(), + t3 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1), + t4 = A.Highlighter__contiguous(t1) ? 0 : 3, + t5 = A._arrayInstanceType(t1); + return new A.Highlighter(t1, t2, null, 1 + Math.max(t3.length, t4), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t5._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t5._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); + }, + Highlighter$multiple(primarySpan, primaryLabel, secondarySpans, color, primaryColor, secondaryColor) { + var t2, t3, t4, t5, t6, + t1 = A._setArrayType([A._Highlight$(primarySpan, primaryLabel, true)], type$.JSArray__Highlight); + for (t2 = secondarySpans.get$entries(secondarySpans), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(A._Highlight$(t3.key, t3.value, false)); + } + t1 = A.Highlighter__collateLines(t1); + if (color) + t2 = primaryColor == null ? "\x1b[31m" : primaryColor; + else + t2 = null; + if (color) + t3 = "\x1b[34m"; + else + t3 = null; + t4 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1); + t5 = A.Highlighter__contiguous(t1) ? 0 : 3; + t6 = A._arrayInstanceType(t1); + return new A.Highlighter(t1, t2, t3, 1 + Math.max(t4.length, t5), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t6._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t6._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); + }, + Highlighter__contiguous(lines) { + var i, thisLine, nextLine; + for (i = 0; i < lines.length - 1;) { + thisLine = lines[i]; + ++i; + nextLine = lines[i]; + if (thisLine.number + 1 !== nextLine.number && J.$eq$(thisLine.url, nextLine.url)) + return false; + } + return true; + }, + Highlighter__collateLines(highlights) { + var t1, t2, t3, + highlightsByUrl = A.groupBy(highlights, new A.Highlighter__collateLines_closure(), type$._Highlight, type$.Object); + for (t1 = highlightsByUrl.get$values(0), t2 = A._instanceType(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f, t2._eval$1("MappedIterator<1,2>")), t2 = t2._rest[1]; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + J.sort$1$ax(t3, new A.Highlighter__collateLines_closure0()); + } + t1 = highlightsByUrl.get$entries(0); + t2 = A._instanceType(t1)._eval$1("ExpandIterable"); + return A.List_List$of(new A.ExpandIterable(t1, new A.Highlighter__collateLines_closure1(), t2), true, t2._eval$1("Iterable.E")); + }, + _Highlight$(span, label, primary) { + var t2, + t1 = new A._Highlight_closure(span).call$0(); + if (label == null) + t2 = null; + else + t2 = A.stringReplaceAllUnchecked(label, "\r\n", "\n"); + return new A._Highlight(t1, primary, t2); + }, + _Highlight__normalizeNewlines(span) { + var endOffset, t1, i, t2, t3, t4, + text = span.get$text(); + if (!B.JSString_methods.contains$1(text, "\r\n")) + return span; + endOffset = span.get$end(span).get$offset(); + for (t1 = text.length - 1, i = 0; i < t1; ++i) + if (text.charCodeAt(i) === 13 && text.charCodeAt(i + 1) === 10) + --endOffset; + t1 = span.get$start(span); + t2 = span.get$sourceUrl(span); + t3 = span.get$end(span).get$line(); + t2 = A.SourceLocation$(endOffset, span.get$end(span).get$column(), t3, t2); + t3 = A.stringReplaceAllUnchecked(text, "\r\n", "\n"); + t4 = span.get$context(span); + return A.SourceSpanWithContext$(t1, t2, t3, A.stringReplaceAllUnchecked(t4, "\r\n", "\n")); + }, + _Highlight__normalizeTrailingNewline(span) { + var context, text, start, end, t1, t2, t3; + if (!B.JSString_methods.endsWith$1(span.get$context(span), "\n")) + return span; + if (B.JSString_methods.endsWith$1(span.get$text(), "\n\n")) + return span; + context = B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1); + text = span.get$text(); + start = span.get$start(span); + end = span.get$end(span); + if (B.JSString_methods.endsWith$1(span.get$text(), "\n")) { + t1 = A.findLineStart(span.get$context(span), span.get$text(), span.get$start(span).get$column()); + t1.toString; + t1 = t1 + span.get$start(span).get$column() + span.get$length(span) === span.get$context(span).length; + } else + t1 = false; + if (t1) { + text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); + if (text.length === 0) + end = start; + else { + t1 = span.get$end(span).get$offset(); + t2 = span.get$sourceUrl(span); + t3 = span.get$end(span).get$line(); + end = A.SourceLocation$(t1 - 1, A._Highlight__lastLineLength(context), t3 - 1, t2); + start = span.get$start(span).get$offset() === span.get$end(span).get$offset() ? end : span.get$start(span); + } + } + return A.SourceSpanWithContext$(start, end, text, context); + }, + _Highlight__normalizeEndOfLine(span) { + var text, t1, t2, t3, t4; + if (span.get$end(span).get$column() !== 0) + return span; + if (span.get$end(span).get$line() === span.get$start(span).get$line()) + return span; + text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); + t1 = span.get$start(span); + t2 = span.get$end(span).get$offset(); + t3 = span.get$sourceUrl(span); + t4 = span.get$end(span).get$line(); + t3 = A.SourceLocation$(t2 - 1, text.length - B.JSString_methods.lastIndexOf$1(text, "\n") - 1, t4 - 1, t3); + return A.SourceSpanWithContext$(t1, t3, text, B.JSString_methods.endsWith$1(span.get$context(span), "\n") ? B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1) : span.get$context(span)); + }, + _Highlight__lastLineLength(text) { + var t1 = text.length; + if (t1 === 0) + return 0; + else if (text.charCodeAt(t1 - 1) === 10) + return t1 === 1 ? 0 : t1 - B.JSString_methods.lastIndexOf$2(text, "\n", t1 - 2) - 1; + else + return t1 - B.JSString_methods.lastIndexOf$1(text, "\n") - 1; + }, + Highlighter: function Highlighter(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._lines = t0; + _._primaryColor = t1; + _._secondaryColor = t2; + _._paddingBeforeSidebar = t3; + _._maxMultilineSpans = t4; + _._multipleFiles = t5; + _._highlighter$_buffer = t6; + }, + Highlighter_closure: function Highlighter_closure(t0) { + this.color = t0; + }, + Highlighter$__closure: function Highlighter$__closure() { + }, + Highlighter$___closure: function Highlighter$___closure() { + }, + Highlighter$__closure0: function Highlighter$__closure0() { + }, + Highlighter__collateLines_closure: function Highlighter__collateLines_closure() { + }, + Highlighter__collateLines_closure0: function Highlighter__collateLines_closure0() { + }, + Highlighter__collateLines_closure1: function Highlighter__collateLines_closure1() { + }, + Highlighter__collateLines__closure: function Highlighter__collateLines__closure(t0) { + this.line = t0; + }, + Highlighter_highlight_closure: function Highlighter_highlight_closure() { + }, + Highlighter__writeFileStart_closure: function Highlighter__writeFileStart_closure(t0) { + this.$this = t0; + }, + Highlighter__writeMultilineHighlights_closure: function Highlighter__writeMultilineHighlights_closure(t0, t1, t2) { + this.$this = t0; + this.startLine = t1; + this.line = t2; + }, + Highlighter__writeMultilineHighlights_closure0: function Highlighter__writeMultilineHighlights_closure0(t0, t1) { + this.$this = t0; + this.highlight = t1; + }, + Highlighter__writeMultilineHighlights_closure1: function Highlighter__writeMultilineHighlights_closure1(t0) { + this.$this = t0; + }, + Highlighter__writeMultilineHighlights_closure2: function Highlighter__writeMultilineHighlights_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.current = t2; + _.startLine = t3; + _.line = t4; + _.highlight = t5; + _.endLine = t6; + }, + Highlighter__writeMultilineHighlights__closure: function Highlighter__writeMultilineHighlights__closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + Highlighter__writeMultilineHighlights__closure0: function Highlighter__writeMultilineHighlights__closure0(t0, t1) { + this.$this = t0; + this.vertical = t1; + }, + Highlighter__writeHighlightedText_closure: function Highlighter__writeHighlightedText_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.text = t1; + _.startColumn = t2; + _.endColumn = t3; + }, + Highlighter__writeIndicator_closure: function Highlighter__writeIndicator_closure(t0, t1, t2) { + this.$this = t0; + this.line = t1; + this.highlight = t2; + }, + Highlighter__writeIndicator_closure0: function Highlighter__writeIndicator_closure0(t0, t1, t2) { + this.$this = t0; + this.line = t1; + this.highlight = t2; + }, + Highlighter__writeIndicator_closure1: function Highlighter__writeIndicator_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.coversWholeLine = t1; + _.line = t2; + _.highlight = t3; + }, + Highlighter__writeLabel_closure: function Highlighter__writeLabel_closure(t0, t1) { + this.$this = t0; + this.lines = t1; + }, + Highlighter__writeLabel_closure0: function Highlighter__writeLabel_closure0(t0, t1) { + this.$this = t0; + this.text = t1; + }, + Highlighter__writeSidebar_closure: function Highlighter__writeSidebar_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.end = t2; + }, + _Highlight: function _Highlight(t0, t1, t2) { + this.span = t0; + this.isPrimary = t1; + this.label = t2; + }, + _Highlight_closure: function _Highlight_closure(t0) { + this.span = t0; + }, + _Line: function _Line(t0, t1, t2, t3) { + var _ = this; + _.text = t0; + _.number = t1; + _.url = t2; + _.highlights = t3; + }, + SourceLocation$(offset, column, line, sourceUrl) { + var t1 = line == null, + t2 = t1 ? 0 : line, + t3 = column == null, + t4 = t3 ? offset : column; + if (offset < 0) + A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (!t1 && line < 0) + A.throwExpression(A.RangeError$("Line may not be negative, was " + A.S(line) + ".")); + else if (!t3 && column < 0) + A.throwExpression(A.RangeError$("Column may not be negative, was " + A.S(column) + ".")); + return new A.SourceLocation(sourceUrl, offset, t2, t4); + }, + SourceLocation: function SourceLocation(t0, t1, t2, t3) { + var _ = this; + _.sourceUrl = t0; + _.offset = t1; + _.line = t2; + _.column = t3; + }, + SourceLocationMixin: function SourceLocationMixin() { + }, + SourceSpanExtension_messageMultiple(_this, message, label, secondarySpans, color, primaryColor, secondaryColor) { + var t2, t3, + t1 = _this.get$start(_this); + t1 = t1.file.getLine$1(t1.offset); + t2 = _this.get$start(_this); + t2 = "" + ("line " + (t1 + 1) + ", column " + (t2.file.getColumn$1(t2.offset) + 1)); + if (_this.get$sourceUrl(_this) != null) { + t1 = _this.get$sourceUrl(_this); + t3 = $.$get$context(); + t1.toString; + t1 = t2 + (" of " + t3.prettyUri$1(t1)); + } else + t1 = t2; + t1 = t1 + (": " + message + "\n") + A.Highlighter$multiple(_this, label, secondarySpans, color, primaryColor, secondaryColor).highlight$0(); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + SourceSpanBase: function SourceSpanBase() { + }, + SourceSpanException: function SourceSpanException() { + }, + SourceSpanFormatException: function SourceSpanFormatException(t0, t1, t2) { + this.source = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSourceSpanException: function MultiSourceSpanException() { + }, + MultiSourceSpanFormatException: function MultiSourceSpanFormatException(t0, t1, t2, t3, t4) { + var _ = this; + _.source = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SourceSpanMixin: function SourceSpanMixin() { + }, + SourceSpanWithContext$(start, end, text, _context) { + var t1 = new A.SourceSpanWithContext(_context, start, end, text); + t1.SourceSpanBase$3(start, end, text); + if (!B.JSString_methods.contains$1(_context, text)) + A.throwExpression(A.ArgumentError$('The context line "' + _context + '" must contain "' + text + '".', null)); + if (A.findLineStart(_context, text, start.get$column()) == null) + A.throwExpression(A.ArgumentError$('The span text "' + text + '" must start at column ' + (start.get$column() + 1) + ' in a line within "' + _context + '".', null)); + return t1; + }, + SourceSpanWithContext: function SourceSpanWithContext(t0, t1, t2, t3) { + var _ = this; + _._context = t0; + _.start = t1; + _.end = t2; + _.text = t3; + }, + Chain_Chain$parse(chain) { + var t1, t2, + _s51_ = string$.x3d_____; + if (chain.length === 0) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([], type$.JSArray_Trace), type$.Trace)); + t1 = $.$get$vmChainGap(); + if (B.JSString_methods.contains$1(chain, t1)) { + t1 = B.JSString_methods.split$1(chain, t1); + t2 = A._arrayInstanceType(t1); + return new A.Chain(A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(t1, new A.Chain_Chain$parse_closure(), t2._eval$1("WhereIterable<1>")), A.trace_Trace___parseVM_tearOff$closure(), t2._eval$1("MappedIterable<1,Trace>")), type$.Trace)); + } + if (!B.JSString_methods.contains$1(chain, _s51_)) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([A.Trace_Trace$parse(chain)], type$.JSArray_Trace), type$.Trace)); + return new A.Chain(A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(chain.split(_s51_), type$.JSArray_String), A.trace_Trace___parseFriendly_tearOff$closure(), type$.MappedListIterable_String_Trace), type$.Trace)); + }, + Chain: function Chain(t0) { + this.traces = t0; + }, + Chain_Chain$parse_closure: function Chain_Chain$parse_closure() { + }, + Chain_toTrace_closure: function Chain_toTrace_closure() { + }, + Chain_toString_closure0: function Chain_toString_closure0() { + }, + Chain_toString__closure0: function Chain_toString__closure0() { + }, + Chain_toString_closure: function Chain_toString_closure(t0) { + this.longest = t0; + }, + Chain_toString__closure: function Chain_toString__closure(t0) { + this.longest = t0; + }, + Frame___parseVM_tearOff(frame) { + return A.Frame_Frame$parseVM(frame); + }, + Frame_Frame$parseVM(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseVM_closure(frame)); + }, + Frame___parseV8_tearOff(frame) { + return A.Frame_Frame$parseV8(frame); + }, + Frame_Frame$parseV8(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseV8_closure(frame)); + }, + Frame_Frame$_parseFirefoxEval(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$_parseFirefoxEval_closure(frame)); + }, + Frame___parseFirefox_tearOff(frame) { + return A.Frame_Frame$parseFirefox(frame); + }, + Frame_Frame$parseFirefox(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFirefox_closure(frame)); + }, + Frame___parseFriendly_tearOff(frame) { + return A.Frame_Frame$parseFriendly(frame); + }, + Frame_Frame$parseFriendly(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFriendly_closure(frame)); + }, + Frame__uriOrPathToUri(uriOrPath) { + if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__uriRegExp())) + return A.Uri_parse(uriOrPath); + else if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__windowsRegExp())) + return A._Uri__Uri$file(uriOrPath, true); + else if (B.JSString_methods.startsWith$1(uriOrPath, "/")) + return A._Uri__Uri$file(uriOrPath, false); + if (B.JSString_methods.contains$1(uriOrPath, "\\")) + return $.$get$windows().toUri$1(uriOrPath); + return A.Uri_parse(uriOrPath); + }, + Frame__catchFormatException(text, body) { + var t1, exception; + try { + t1 = body.call$0(); + return t1; + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), text); + else + throw exception; + } + }, + Frame: function Frame(t0, t1, t2, t3) { + var _ = this; + _.uri = t0; + _.line = t1; + _.column = t2; + _.member = t3; + }, + Frame_Frame$parseVM_closure: function Frame_Frame$parseVM_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseV8_closure: function Frame_Frame$parseV8_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseV8_closure_parseLocation: function Frame_Frame$parseV8_closure_parseLocation(t0) { + this.frame = t0; + }, + Frame_Frame$_parseFirefoxEval_closure: function Frame_Frame$_parseFirefoxEval_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseFirefox_closure: function Frame_Frame$parseFirefox_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseFriendly_closure: function Frame_Frame$parseFriendly_closure(t0) { + this.frame = t0; + }, + LazyTrace: function LazyTrace(t0) { + this._thunk = t0; + this.__LazyTrace__trace_FI = $; + }, + LazyTrace_terse_closure: function LazyTrace_terse_closure(t0) { + this.$this = t0; + }, + Trace_Trace$from(trace) { + if (type$.Trace._is(trace)) + return trace; + if (trace instanceof A.Chain) + return trace.toTrace$0(); + return new A.LazyTrace(new A.Trace_Trace$from_closure(trace)); + }, + Trace_Trace$parse(trace) { + var error, t1, exception; + try { + if (trace.length === 0) { + t1 = A.Trace$(A._setArrayType([], type$.JSArray_Frame), null); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_v8Trace())) { + t1 = A.Trace$parseV8(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, "\tat ")) { + t1 = A.Trace$parseJSCore(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_firefoxSafariTrace()) || B.JSString_methods.contains$1(trace, $.$get$_firefoxEvalTrace())) { + t1 = A.Trace$parseFirefox(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, string$.x3d_____)) { + t1 = A.Chain_Chain$parse(trace).toTrace$0(); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_friendlyTrace())) { + t1 = A.Trace$parseFriendly(trace); + return t1; + } + t1 = A.Trace$parseVM(trace); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + error = t1; + throw A.wrapException(A.FormatException$(J.get$message$x(error) + "\nStack trace:\n" + trace, null, null)); + } else + throw exception; + } + }, + Trace___parseVM_tearOff(trace) { + return A.Trace$parseVM(trace); + }, + Trace$parseVM(trace) { + var t1 = A.List_List$unmodifiable(A.Trace__parseVM(trace), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace__parseVM(trace) { + var $frames, + t1 = B.JSString_methods.trim$0(trace), + t2 = $.$get$vmChainGap(), + t3 = type$.WhereIterable_String, + lines = new A.WhereIterable(A._setArrayType(A.stringReplaceAllUnchecked(t1, t2, "").split("\n"), type$.JSArray_String), new A.Trace__parseVM_closure(), t3); + if (!lines.get$iterator(0).moveNext$0()) + return A._setArrayType([], type$.JSArray_Frame); + t1 = A.TakeIterable_TakeIterable(lines, lines.get$length(0) - 1, t3._eval$1("Iterable.E")); + t1 = A.MappedIterable_MappedIterable(t1, A.frame_Frame___parseVM_tearOff$closure(), A._instanceType(t1)._eval$1("Iterable.E"), type$.Frame); + $frames = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + if (!J.endsWith$1$s(lines.get$last(0), ".da")) + B.JSArray_methods.add$1($frames, A.Frame_Frame$parseVM(lines.get$last(0))); + return $frames; + }, + Trace$parseV8(trace) { + var t1 = A.SubListIterable$(A._setArrayType(trace.split("\n"), type$.JSArray_String), 1, null, type$.String).super$Iterable$skipWhile(0, new A.Trace$parseV8_closure()), + t2 = type$.Frame; + t2 = A.List_List$unmodifiable(A.MappedIterable_MappedIterable(t1, A.frame_Frame___parseV8_tearOff$closure(), t1.$ti._eval$1("Iterable.E"), t2), t2); + return new A.Trace(t2, new A._StringStackTrace(trace)); + }, + Trace$parseJSCore(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(trace.split("\n"), type$.JSArray_String), new A.Trace$parseJSCore_closure(), type$.WhereIterable_String), A.frame_Frame___parseV8_tearOff$closure(), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace$parseFirefox(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFirefox_closure(), type$.WhereIterable_String), A.frame_Frame___parseFirefox_tearOff$closure(), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace___parseFriendly_tearOff(trace) { + return A.Trace$parseFriendly(trace); + }, + Trace$parseFriendly(trace) { + var t1 = trace.length === 0 ? A._setArrayType([], type$.JSArray_Frame) : new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFriendly_closure(), type$.WhereIterable_String), A.frame_Frame___parseFriendly_tearOff$closure(), type$.MappedIterable_String_Frame); + t1 = A.List_List$unmodifiable(t1, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace$($frames, original) { + var t1 = A.List_List$unmodifiable($frames, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(original == null ? "" : original)); + }, + Trace: function Trace(t0, t1) { + this.frames = t0; + this.original = t1; + }, + Trace_Trace$from_closure: function Trace_Trace$from_closure(t0) { + this.trace = t0; + }, + Trace__parseVM_closure: function Trace__parseVM_closure() { + }, + Trace$parseV8_closure: function Trace$parseV8_closure() { + }, + Trace$parseJSCore_closure: function Trace$parseJSCore_closure() { + }, + Trace$parseFirefox_closure: function Trace$parseFirefox_closure() { + }, + Trace$parseFriendly_closure: function Trace$parseFriendly_closure() { + }, + Trace_terse_closure: function Trace_terse_closure() { + }, + Trace_foldFrames_closure: function Trace_foldFrames_closure(t0) { + this.oldPredicate = t0; + }, + Trace_foldFrames_closure0: function Trace_foldFrames_closure0(t0) { + this._box_0 = t0; + }, + Trace_toString_closure0: function Trace_toString_closure0() { + }, + Trace_toString_closure: function Trace_toString_closure(t0) { + this.longest = t0; + }, + UnparsedFrame: function UnparsedFrame(t0, t1) { + this.uri = t0; + this.member = t1; + }, + TransformByHandlers_transformByHandlers(_this, onData, onDone, $S, $T) { + var _null = null, t1 = {}, + controller = A.StreamController_StreamController(_null, _null, _null, _null, true, $T); + t1.subscription = null; + controller.onListen = new A.TransformByHandlers_transformByHandlers_closure(t1, _this, onData, controller, A.instantiate1(A.from_handlers__TransformByHandlers__defaultHandleError$closure(), $T), onDone, $S); + return controller.get$stream(); + }, + TransformByHandlers__defaultHandleError(error, stackTrace, sink) { + sink.addError$2(error, stackTrace); + }, + TransformByHandlers_transformByHandlers_closure: function TransformByHandlers_transformByHandlers_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_1 = t0; + _._this = t1; + _.handleData = t2; + _.controller = t3; + _.handleError = t4; + _.handleDone = t5; + _.S = t6; + }, + TransformByHandlers_transformByHandlers__closure: function TransformByHandlers_transformByHandlers__closure(t0, t1, t2) { + this.handleData = t0; + this.controller = t1; + this.S = t2; + }, + TransformByHandlers_transformByHandlers__closure1: function TransformByHandlers_transformByHandlers__closure1(t0, t1) { + this.handleError = t0; + this.controller = t1; + }, + TransformByHandlers_transformByHandlers__closure0: function TransformByHandlers_transformByHandlers__closure0(t0, t1, t2) { + this._box_0 = t0; + this.handleDone = t1; + this.controller = t2; + }, + TransformByHandlers_transformByHandlers__closure2: function TransformByHandlers_transformByHandlers__closure2(t0, t1) { + this._box_1 = t0; + this._box_0 = t1; + }, + RateLimit__debounceAggregate(_this, duration, collect, leading, trailing, $T, $S) { + var t1 = {}; + t1.soFar = t1.timer = null; + t1.emittedLatestAsLeading = t1.shouldClose = t1.hasPending = false; + return A.TransformByHandlers_transformByHandlers(_this, new A.RateLimit__debounceAggregate_closure(t1, $S, collect, false, duration, true, $T), new A.RateLimit__debounceAggregate_closure0(t1, true, $S), $T, $S); + }, + _collect($event, soFar, $T) { + var t1 = soFar == null ? A._setArrayType([], $T._eval$1("JSArray<0>")) : soFar; + J.add$1$ax(t1, $event); + return t1; + }, + RateLimit__debounceAggregate_closure: function RateLimit__debounceAggregate_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_0 = t0; + _.S = t1; + _.collect = t2; + _.leading = t3; + _.duration = t4; + _.trailing = t5; + _.T = t6; + }, + RateLimit__debounceAggregate_closure_emit: function RateLimit__debounceAggregate_closure_emit(t0, t1, t2) { + this._box_0 = t0; + this.sink = t1; + this.S = t2; + }, + RateLimit__debounceAggregate__closure: function RateLimit__debounceAggregate__closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.trailing = t1; + _.emit = t2; + _.sink = t3; + }, + RateLimit__debounceAggregate_closure0: function RateLimit__debounceAggregate_closure0(t0, t1, t2) { + this._box_0 = t0; + this.trailing = t1; + this.S = t2; + }, + StringScannerException$(message, span, source) { + return new A.StringScannerException(source, message, span); + }, + StringScannerException: function StringScannerException(t0, t1, t2) { + this.source = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + LineScanner$(string) { + return new A.LineScanner(null, string); + }, + LineScanner: function LineScanner(t0, t1) { + var _ = this; + _._line_scanner$_column = _._line_scanner$_line = 0; + _.sourceUrl = t0; + _.string = t1; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + SpanScanner$(string, sourceUrl) { + var t2, + t1 = A.SourceFile$fromString(string, sourceUrl); + if (sourceUrl == null) + t2 = null; + else + t2 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); + return new A.SpanScanner(t1, t2, string); + }, + SpanScanner: function SpanScanner(t0, t1, t2) { + var _ = this; + _._sourceFile = t0; + _.sourceUrl = t1; + _.string = t2; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + _SpanScannerState: function _SpanScannerState(t0, t1) { + this._scanner = t0; + this.position = t1; + }, + StringScanner$(string, position, sourceUrl) { + var t1; + if (sourceUrl == null) + t1 = null; + else + t1 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); + return new A.StringScanner(t1, string); + }, + StringScanner: function StringScanner(t0, t1) { + var _ = this; + _.sourceUrl = t0; + _.string = t1; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + AsciiGlyphSet: function AsciiGlyphSet() { + }, + UnicodeGlyphSet: function UnicodeGlyphSet() { + }, + WatchEvent: function WatchEvent(t0, t1) { + this.type = t0; + this.path = t1; + }, + ChangeType: function ChangeType(t0) { + this._watch_event$_name = t0; + }, + A98RgbColorSpace0: function A98RgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + AnySelectorVisitor0: function AnySelectorVisitor0() { + }, + AnySelectorVisitor_visitComplexSelector_closure0: function AnySelectorVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + AnySelectorVisitor_visitCompoundSelector_closure0: function AnySelectorVisitor_visitCompoundSelector_closure0(t0) { + this.$this = t0; + }, + SupportsAnything0: function SupportsAnything0(t0, t1) { + this.contents = t0; + this.span = t1; + }, + Argument0: function Argument0(t0, t1, t2) { + this.name = t0; + this.defaultValue = t1; + this.span = t2; + }, + ArgumentDeclaration_ArgumentDeclaration$parse0(contents, url) { + return A.ScssParser$0(contents, null, url).parseArgumentDeclaration$0(); + }, + ArgumentDeclaration0: function ArgumentDeclaration0(t0, t1, t2) { + this.$arguments = t0; + this.restArgument = t1; + this.span = t2; + }, + ArgumentDeclaration_verify_closure1: function ArgumentDeclaration_verify_closure1() { + }, + ArgumentDeclaration_verify_closure2: function ArgumentDeclaration_verify_closure2() { + }, + ArgumentInvocation$empty0(span) { + return new A.ArgumentInvocation0(B.List_empty21, B.Map_empty14, null, null, span); + }, + ArgumentInvocation0: function ArgumentInvocation0(t0, t1, t2, t3, t4) { + var _ = this; + _.positional = t0; + _.named = t1; + _.rest = t2; + _.keywordRest = t3; + _.span = t4; + }, + argumentListClass_closure: function argumentListClass_closure() { + }, + argumentListClass__closure: function argumentListClass__closure() { + }, + argumentListClass__closure0: function argumentListClass__closure0() { + }, + SassArgumentList$0(contents, keywords, separator) { + var t1 = type$.Value_2; + t1 = new A.SassArgumentList0(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); + t1.SassList$3$brackets0(contents, separator, false); + return t1; + }, + SassArgumentList0: function SassArgumentList0(t0, t1, t2, t3) { + var _ = this; + _._argument_list$_keywords = t0; + _._argument_list$_wereKeywordsAccessed = false; + _._list1$_contents = t1; + _._list1$_separator = t2; + _._list1$_hasBrackets = t3; + }, + JSArray1: function JSArray1() { + }, + AsyncImporter0: function AsyncImporter0() { + }, + JSToDartAsyncImporter: function JSToDartAsyncImporter(t0, t1, t2) { + this._async0$_canonicalize = t0; + this._load = t1; + this._nonCanonicalSchemes = t2; + }, + JSToDartAsyncImporter_canonicalize_closure: function JSToDartAsyncImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + JSToDartAsyncImporter_load_closure: function JSToDartAsyncImporter_load_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + AsyncBuiltInCallable$mixin0($name, $arguments, callback, acceptsContent, url) { + return new A.AsyncBuiltInCallable0($name, A.ScssParser$0("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.AsyncBuiltInCallable$mixin_closure0(callback), false); + }, + AsyncBuiltInCallable0: function AsyncBuiltInCallable0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _._async_built_in0$_arguments = t1; + _._async_built_in0$_callback = t2; + _.acceptsContent = t3; + }, + AsyncBuiltInCallable$mixin_closure0: function AsyncBuiltInCallable$mixin_closure0(t0) { + this.callback = t0; + }, + AsyncBuiltInCallable_withDeprecationWarning_closure0: function AsyncBuiltInCallable_withDeprecationWarning_closure0(t0, t1, t2) { + this.$this = t0; + this.module = t1; + this.newName = t2; + }, + compileAsync0(path, charset, fatalDeprecations, functions, futureDeprecations, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, useSpaces, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, t3, t4, t0, stylesheet, result, t1, t2; + var $async$compileAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation_3; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + t1 = nodeImporter == null; + if (t1) + t2 = syntax == null || syntax === A.Syntax_forPath0(path); + else + t2 = false; + $async$goto = t2 ? 3 : 5; + break; + case 3: + // then + if (importCache == null) + importCache = A.AsyncImportCache$none(logger); + t2 = $.$get$FilesystemImporter_cwd0(); + t3 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t3 == null ? null : J.get$platform$x(t3), "win32")) { + t3 = A.isNodeJs() ? self.process : null; + t3 = J.$eq$(t3 == null ? null : J.get$platform$x(t3), "darwin"); + } else + t3 = true; + if (t3) { + t3 = $.$get$context(); + t4 = A._realCasePath0(A.absolute(t3.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t3 = $.$get$context(); + t4 = t3.canonicalize$1(0, path); + t0 = t4; + t4 = t3; + t3 = t0; + } + $async$goto = 6; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(t2, t4.toUri$1(t3), t4.toUri$1(path)), $async$compileAsync0); + case 6: + // returning from await. + t4 = $async$result; + t4.toString; + stylesheet = t4; + // goto join + $async$goto = 4; + break; + case 5: + // else + t2 = A.readFile0(path); + t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; + stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, logger, $.$get$context().toUri$1(path)); + case 4: + // join + $async$goto = 7; + return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, $.$get$FilesystemImporter_cwd0(), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileAsync0); + case 7: + // returning from await. + result = $async$result; + logger.summarize$1$js(!t1); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileAsync0, $async$completer); + }, + compileStringAsync0(source, charset, fatalDeprecations, functions, futureDeprecations, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, url, useSpaces, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, t3, t4, stylesheet, result, t1, t2; + var $async$compileStringAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation_3; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_scss0 : syntax, logger, url); + if (importer == null) + t1 = A.isBrowser() ? new A.NoOpImporter0() : $.$get$FilesystemImporter_cwd0(); + else + t1 = importer; + $async$goto = 3; + return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, t1, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileStringAsync0); + case 3: + // returning from await. + result = $async$result; + logger.summarize$1$js(nodeImporter != null); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStringAsync0, $async$completer); + }, + _compileStylesheet2(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, evaluateResult, serializeResult, resultSourceMap; + var $async$_compileStylesheet2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (nodeImporter != null) + A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_EuK, string$.The_le, null, null); + $async$goto = 3; + return A._asyncAwait(A._EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet2); + case 3: + // returning from await. + evaluateResult = $async$result; + serializeResult = A.serialize0(evaluateResult._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, useSpaces); + resultSourceMap = serializeResult._1; + if (resultSourceMap != null && importCache != null) + A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure2(stylesheet, importCache)); + $async$returnValue = new A.CompileResult0(evaluateResult, serializeResult); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheet2, $async$completer); + }, + _compileStylesheet_closure2: function _compileStylesheet_closure2(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + AsyncEnvironment$0() { + var t1 = type$.String, + t2 = type$.Module_AsyncCallable_2, + t3 = type$.AstNode_2, + t4 = type$.int, + t5 = type$.AsyncCallable_2, + t6 = type$.JSArray_Map_String_AsyncCallable_2; + return new A.AsyncEnvironment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + AsyncEnvironment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.AsyncEnvironment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule2(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty6; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_AsyncCallable_2, t3 = type$.List_CssComment_2, t4 = A.MapExtensions_get_pairs0(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment_2; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable2(forwarded); + t3 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure17(), type$.Map_String_Value_2), type$.Value_2); + t4 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure18(), type$.Map_String_AstNode_2), type$.AstNode_2); + t5 = type$.Map_String_AsyncCallable_2; + t6 = type$.AsyncCallable_2; + t7 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure19(), t5), t6); + t6 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure20(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure21()); + return A._EnvironmentModule$_2(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure22())); + }, + _EnvironmentModule__makeModulesByVariable2(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty16; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable_2); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule2) { + for (t3 = t2._async_environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll0(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll0(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._async_environment0$_environment._async_environment0$_variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap2(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$0(t1, type$.String, $V); + }, + _EnvironmentModule$_2(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule2(_environment._async_environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + AsyncEnvironment0: function AsyncEnvironment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._async_environment0$_modules = t0; + _._async_environment0$_namespaceNodes = t1; + _._async_environment0$_globalModules = t2; + _._async_environment0$_importedModules = t3; + _._async_environment0$_forwardedModules = t4; + _._async_environment0$_nestedForwardedModules = t5; + _._async_environment0$_allModules = t6; + _._async_environment0$_variables = t7; + _._async_environment0$_variableNodes = t8; + _._async_environment0$_variableIndices = t9; + _._async_environment0$_functions = t10; + _._async_environment0$_functionIndices = t11; + _._async_environment0$_mixins = t12; + _._async_environment0$_mixinIndices = t13; + _._async_environment0$_content = t14; + _._async_environment0$_inMixin = false; + _._async_environment0$_inSemiGlobalScope = true; + _._async_environment0$_lastVariableIndex = _._async_environment0$_lastVariableName = null; + }, + AsyncEnvironment__getVariableFromGlobalModule_closure0: function AsyncEnvironment__getVariableFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure2: function AsyncEnvironment_setVariable_closure2(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment_setVariable_closure3: function AsyncEnvironment_setVariable_closure3(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure4: function AsyncEnvironment_setVariable_closure4(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment__getFunctionFromGlobalModule_closure0: function AsyncEnvironment__getFunctionFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment__getMixinFromGlobalModule_closure0: function AsyncEnvironment__getMixinFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_toModule_closure0: function AsyncEnvironment_toModule_closure0() { + }, + AsyncEnvironment_toDummyModule_closure0: function AsyncEnvironment_toDummyModule_closure0() { + }, + _EnvironmentModule2: function _EnvironmentModule2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._async_environment0$_environment = t10; + _._async_environment0$_modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure17: function _EnvironmentModule__EnvironmentModule_closure17() { + }, + _EnvironmentModule__EnvironmentModule_closure18: function _EnvironmentModule__EnvironmentModule_closure18() { + }, + _EnvironmentModule__EnvironmentModule_closure19: function _EnvironmentModule__EnvironmentModule_closure19() { + }, + _EnvironmentModule__EnvironmentModule_closure20: function _EnvironmentModule__EnvironmentModule_closure20() { + }, + _EnvironmentModule__EnvironmentModule_closure21: function _EnvironmentModule__EnvironmentModule_closure21() { + }, + _EnvironmentModule__EnvironmentModule_closure22: function _EnvironmentModule__EnvironmentModule_closure22() { + }, + _EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t4, + t1 = type$.Uri, + t2 = type$.Module_AsyncCallable_2, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode_2); + if (importCache == null) + t4 = nodeImporter == null ? A.AsyncImportCache$none(logger) : null; + else + t4 = importCache; + t1 = new A._EvaluateVisitor2(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.AsyncEnvironment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor2: function _EvaluateVisitor2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._async_evaluate0$_importCache = t0; + _._async_evaluate0$_nodeImporter = t1; + _._async_evaluate0$_builtInFunctions = t2; + _._async_evaluate0$_builtInModules = t3; + _._async_evaluate0$_modules = t4; + _._async_evaluate0$_moduleConfigurations = t5; + _._async_evaluate0$_moduleNodes = t6; + _._async_evaluate0$_logger = t7; + _._async_evaluate0$_warningsEmitted = t8; + _._async_evaluate0$_quietDeps = t9; + _._async_evaluate0$_sourceMap = t10; + _._async_evaluate0$_environment = t11; + _._async_evaluate0$_declarationName = _._async_evaluate0$__parent = _._async_evaluate0$_mediaQuerySources = _._async_evaluate0$_mediaQueries = _._async_evaluate0$_styleRuleIgnoringAtRoot = null; + _._async_evaluate0$_member = "root stylesheet"; + _._async_evaluate0$_importSpan = _._async_evaluate0$_callableNode = _._async_evaluate0$_currentCallable = null; + _._async_evaluate0$_inSupportsDeclaration = _._async_evaluate0$_inKeyframes = _._async_evaluate0$_atRootExcludingStyleRule = _._async_evaluate0$_inUnknownAtRule = _._async_evaluate0$_inFunction = false; + _._async_evaluate0$_loadedUrls = t12; + _._async_evaluate0$_activeModules = t13; + _._async_evaluate0$_stack = t14; + _._async_evaluate0$_importer = null; + _._async_evaluate0$_inDependency = false; + _._async_evaluate0$__extensionStore = _._async_evaluate0$_preModuleComments = _._async_evaluate0$_outOfOrderImports = _._async_evaluate0$__endOfImports = _._async_evaluate0$__root = _._async_evaluate0$__stylesheet = null; + _._async_evaluate0$_configuration = t15; + }, + _EvaluateVisitor_closure38: function _EvaluateVisitor_closure38(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure39: function _EvaluateVisitor_closure39(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure40: function _EvaluateVisitor_closure40(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure41: function _EvaluateVisitor_closure41(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure42: function _EvaluateVisitor_closure42(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure43: function _EvaluateVisitor_closure43(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure44: function _EvaluateVisitor_closure44(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure45: function _EvaluateVisitor_closure45(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure46: function _EvaluateVisitor_closure46(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure14: function _EvaluateVisitor__closure14(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure47: function _EvaluateVisitor_closure47(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure13: function _EvaluateVisitor__closure13(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure48: function _EvaluateVisitor_closure48(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure49: function _EvaluateVisitor_closure49(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure11: function _EvaluateVisitor__closure11(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure12: function _EvaluateVisitor__closure12(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure50: function _EvaluateVisitor_closure50(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure2: function _EvaluateVisitor_run_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure2: function _EvaluateVisitor_run__closure2(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor__loadModule_closure5: function _EvaluateVisitor__loadModule_closure5(t0, t1) { + this._box_1 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure6: function _EvaluateVisitor__loadModule_closure6(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure5: function _EvaluateVisitor__loadModule__closure5(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure6: function _EvaluateVisitor__loadModule__closure6(t0, t1, t2) { + this._box_0 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure2: function _EvaluateVisitor__execute_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure5: function _EvaluateVisitor__combineCss_closure5() { + }, + _EvaluateVisitor__combineCss_closure6: function _EvaluateVisitor__combineCss_closure6(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule2: function _EvaluateVisitor__combineCss_visitModule2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure5: function _EvaluateVisitor__extendModules_closure5(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure6: function _EvaluateVisitor__extendModules_closure6() { + }, + _EvaluateVisitor_visitAtRootRule_closure5: function _EvaluateVisitor_visitAtRootRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure6: function _EvaluateVisitor_visitAtRootRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure17: function _EvaluateVisitor__scopeForAtRoot_closure17(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure18: function _EvaluateVisitor__scopeForAtRoot_closure18(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure19: function _EvaluateVisitor__scopeForAtRoot_closure19(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure2: function _EvaluateVisitor__scopeForAtRoot__closure2(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure20: function _EvaluateVisitor__scopeForAtRoot_closure20(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure21: function _EvaluateVisitor__scopeForAtRoot_closure21() { + }, + _EvaluateVisitor__scopeForAtRoot_closure22: function _EvaluateVisitor__scopeForAtRoot_closure22(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure2: function _EvaluateVisitor_visitContentRule_closure2(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure2: function _EvaluateVisitor_visitDeclaration_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure8: function _EvaluateVisitor_visitEachRule_closure8(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure9: function _EvaluateVisitor_visitEachRule_closure9(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure10: function _EvaluateVisitor_visitEachRule_closure10(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure2: function _EvaluateVisitor_visitEachRule__closure2(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure2: function _EvaluateVisitor_visitEachRule___closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure8: function _EvaluateVisitor_visitAtRule_closure8(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure9: function _EvaluateVisitor_visitAtRule_closure9(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure2: function _EvaluateVisitor_visitAtRule__closure2(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure10: function _EvaluateVisitor_visitAtRule_closure10() { + }, + _EvaluateVisitor_visitForRule_closure14: function _EvaluateVisitor_visitForRule_closure14(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure15: function _EvaluateVisitor_visitForRule_closure15(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure16: function _EvaluateVisitor_visitForRule_closure16(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure17: function _EvaluateVisitor_visitForRule_closure17(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure18: function _EvaluateVisitor_visitForRule_closure18(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure2: function _EvaluateVisitor_visitForRule__closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure5: function _EvaluateVisitor_visitForwardRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure6: function _EvaluateVisitor_visitForwardRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure2: function _EvaluateVisitor__registerCommentsForModule_closure2() { + }, + _EvaluateVisitor_visitIfRule_closure2: function _EvaluateVisitor_visitIfRule_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure2: function _EvaluateVisitor_visitIfRule__closure2(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure2: function _EvaluateVisitor_visitIfRule___closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure2: function _EvaluateVisitor__visitDynamicImport_closure2(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure11: function _EvaluateVisitor__visitDynamicImport__closure11(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure12: function _EvaluateVisitor__visitDynamicImport__closure12() { + }, + _EvaluateVisitor__visitDynamicImport__closure13: function _EvaluateVisitor__visitDynamicImport__closure13() { + }, + _EvaluateVisitor__visitDynamicImport__closure14: function _EvaluateVisitor__visitDynamicImport__closure14(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure5: function _EvaluateVisitor__applyMixin_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure6: function _EvaluateVisitor__applyMixin__closure6(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure6: function _EvaluateVisitor__applyMixin_closure6(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure5: function _EvaluateVisitor__applyMixin__closure5(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure2: function _EvaluateVisitor__applyMixin___closure2(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure2: function _EvaluateVisitor__applyMixin____closure2(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure8: function _EvaluateVisitor_visitIncludeRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure9: function _EvaluateVisitor_visitIncludeRule_closure9(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure10: function _EvaluateVisitor_visitIncludeRule_closure10(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure8: function _EvaluateVisitor_visitMediaRule_closure8(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure9: function _EvaluateVisitor_visitMediaRule_closure9(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure2: function _EvaluateVisitor_visitMediaRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure2: function _EvaluateVisitor_visitMediaRule___closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure10: function _EvaluateVisitor_visitMediaRule_closure10(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure11: function _EvaluateVisitor_visitStyleRule_closure11(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure12: function _EvaluateVisitor_visitStyleRule_closure12() { + }, + _EvaluateVisitor_visitStyleRule_closure14: function _EvaluateVisitor_visitStyleRule_closure14(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure2: function _EvaluateVisitor_visitStyleRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure13: function _EvaluateVisitor_visitStyleRule_closure13() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure2: function _EvaluateVisitor__warnForBogusCombinators_closure2() { + }, + _EvaluateVisitor_visitSupportsRule_closure5: function _EvaluateVisitor_visitSupportsRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure2: function _EvaluateVisitor_visitSupportsRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure6: function _EvaluateVisitor_visitSupportsRule_closure6() { + }, + _EvaluateVisitor__visitSupportsCondition_closure2: function _EvaluateVisitor__visitSupportsCondition_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure8: function _EvaluateVisitor_visitVariableDeclaration_closure8(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure9: function _EvaluateVisitor_visitVariableDeclaration_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure10: function _EvaluateVisitor_visitVariableDeclaration_closure10(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure2: function _EvaluateVisitor_visitUseRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure2: function _EvaluateVisitor_visitWarnRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure2: function _EvaluateVisitor_visitWhileRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure2: function _EvaluateVisitor_visitWhileRule__closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure2: function _EvaluateVisitor_visitBinaryOperationExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation2: function _EvaluateVisitor__slash_recommendation2() { + }, + _EvaluateVisitor_visitVariableExpression_closure2: function _EvaluateVisitor_visitVariableExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure2: function _EvaluateVisitor_visitUnaryOperationExpression_closure2(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitListExpression_closure2: function _EvaluateVisitor_visitListExpression_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure8: function _EvaluateVisitor_visitFunctionExpression_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure9: function _EvaluateVisitor_visitFunctionExpression_closure9() { + }, + _EvaluateVisitor_visitFunctionExpression_closure10: function _EvaluateVisitor_visitFunctionExpression_closure10(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__checkCalculationArguments_check2: function _EvaluateVisitor__checkCalculationArguments_check2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure2: function _EvaluateVisitor__visitCalculationExpression_closure2(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure2: function _EvaluateVisitor__runUserDefinedCallable_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure2: function _EvaluateVisitor__runUserDefinedCallable__closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure2: function _EvaluateVisitor__runUserDefinedCallable___closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure2: function _EvaluateVisitor__runUserDefinedCallable____closure2() { + }, + _EvaluateVisitor__runFunctionCallable_closure2: function _EvaluateVisitor__runFunctionCallable_closure2(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure8: function _EvaluateVisitor__runBuiltInCallable_closure8(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure9: function _EvaluateVisitor__runBuiltInCallable_closure9(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure10: function _EvaluateVisitor__runBuiltInCallable_closure10() { + }, + _EvaluateVisitor__evaluateArguments_closure11: function _EvaluateVisitor__evaluateArguments_closure11() { + }, + _EvaluateVisitor__evaluateArguments_closure12: function _EvaluateVisitor__evaluateArguments_closure12(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure13: function _EvaluateVisitor__evaluateArguments_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure14: function _EvaluateVisitor__evaluateArguments_closure14() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure11: function _EvaluateVisitor__evaluateMacroArguments_closure11(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure12: function _EvaluateVisitor__evaluateMacroArguments_closure12(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure13: function _EvaluateVisitor__evaluateMacroArguments_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure14: function _EvaluateVisitor__evaluateMacroArguments_closure14(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure2: function _EvaluateVisitor__addRestMap_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure2: function _EvaluateVisitor__verifyArguments_closure2(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure5: function _EvaluateVisitor_visitCssAtRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure6: function _EvaluateVisitor_visitCssAtRule_closure6() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure5: function _EvaluateVisitor_visitCssKeyframeBlock_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure6: function _EvaluateVisitor_visitCssKeyframeBlock_closure6() { + }, + _EvaluateVisitor_visitCssMediaRule_closure8: function _EvaluateVisitor_visitCssMediaRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure9: function _EvaluateVisitor_visitCssMediaRule_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure2: function _EvaluateVisitor_visitCssMediaRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure2: function _EvaluateVisitor_visitCssMediaRule___closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure10: function _EvaluateVisitor_visitCssMediaRule_closure10(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure6: function _EvaluateVisitor_visitCssStyleRule_closure6(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure2: function _EvaluateVisitor_visitCssStyleRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure5: function _EvaluateVisitor_visitCssStyleRule_closure5() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure5: function _EvaluateVisitor_visitCssSupportsRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure2: function _EvaluateVisitor_visitCssSupportsRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure6: function _EvaluateVisitor_visitCssSupportsRule_closure6() { + }, + _EvaluateVisitor__performInterpolationHelper_closure2: function _EvaluateVisitor__performInterpolationHelper_closure2(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure2: function _EvaluateVisitor__serialize_closure2(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure2: function _EvaluateVisitor__expressionNode_closure2(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation2: function _EvaluateVisitor__withoutSlash_recommendation2() { + }, + _EvaluateVisitor__stackFrame_closure2: function _EvaluateVisitor__stackFrame_closure2(t0) { + this.$this = t0; + }, + _ImportedCssVisitor2: function _ImportedCssVisitor2(t0) { + this._async_evaluate0$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure2: function _ImportedCssVisitor_visitCssAtRule_closure2() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure2: function _ImportedCssVisitor_visitCssMediaRule_closure2(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure2: function _ImportedCssVisitor_visitCssStyleRule_closure2() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure2: function _ImportedCssVisitor_visitCssSupportsRule_closure2() { + }, + _EvaluationContext2: function _EvaluationContext2(t0, t1) { + this._async_evaluate0$_visitor = t0; + this._async_evaluate0$_defaultWarnNodeWithSpan = t1; + }, + JSToDartAsyncFileImporter: function JSToDartAsyncFileImporter(t0) { + this._findFileUrl = t0; + }, + JSToDartAsyncFileImporter_canonicalize_closure: function JSToDartAsyncFileImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + AsyncImportCache$(importers, loadPaths, logger, packageConfig) { + var t1 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, + t3 = type$.Uri, + t4 = A.AsyncImportCache__toImporters0(importers, loadPaths, packageConfig); + return new A.AsyncImportCache0(t4, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); + }, + AsyncImportCache$none(logger) { + var t1 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, + t3 = type$.Uri; + return new A.AsyncImportCache0(B.List_empty27, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); + }, + AsyncImportCache__toImporters0(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable0("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_AsyncImporter); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_AsyncImporter); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + if (loadPaths != null) + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + AsyncImportCache_wrapLogger0(logger, silenceDeprecations, fatalDeprecations, futureDeprecations, color) { + var t3, t4, + t1 = type$.Deprecation_3, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + return new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, false); + }, + AsyncImportCache0: function AsyncImportCache0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._async_import_cache0$_importers = t0; + _._async_import_cache0$_logger = t1; + _._async_import_cache0$_canonicalizeCache = t2; + _._async_import_cache0$_perImporterCanonicalizeCache = t3; + _._async_import_cache0$_nonCanonicalRelativeUrls = t4; + _._async_import_cache0$_importCache = t5; + _._async_import_cache0$_resultsCache = t6; + }, + AsyncImportCache_canonicalize_closure0: function AsyncImportCache_canonicalize_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + AsyncImportCache__canonicalize_closure0: function AsyncImportCache__canonicalize_closure0(t0, t1) { + this.importer = t0; + this.url = t1; + }, + AsyncImportCache_importCanonical_closure0: function AsyncImportCache_importCanonical_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + AsyncImportCache_humanize_closure3: function AsyncImportCache_humanize_closure3(t0) { + this.canonicalUrl = t0; + }, + AsyncImportCache_humanize_closure4: function AsyncImportCache_humanize_closure4() { + }, + AsyncImportCache_humanize_closure5: function AsyncImportCache_humanize_closure5() { + }, + AsyncImportCache_humanize_closure6: function AsyncImportCache_humanize_closure6(t0) { + this.canonicalUrl = t0; + }, + AtRootQueryParser$0(contents, logger, url) { + var t1 = A.SpanScanner$(contents, url); + return new A.AtRootQueryParser0(t1, logger, null); + }, + AtRootQueryParser0: function AtRootQueryParser0(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._parser1$_interpolationMap = t2; + }, + AtRootQueryParser_parse_closure0: function AtRootQueryParser_parse_closure0(t0) { + this.$this = t0; + }, + AtRootQuery0: function AtRootQuery0(t0, t1, t2, t3) { + var _ = this; + _.include = t0; + _.names = t1; + _._at_root_query0$_all = t2; + _._at_root_query0$_rule = t3; + }, + AtRootRule$0(children, span, query) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.AtRootRule0(query, span, t1, t2); + }, + AtRootRule0: function AtRootRule0(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + ModifiableCssAtRule$0($name, span, childless, value) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssAtRule0($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssAtRule0: function ModifiableCssAtRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.isChildless = t2; + _.span = t3; + _.children = t4; + _._node$_children = t5; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + AtRule$0($name, span, children, value) { + var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement_2), + t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.AtRule0($name, value, span, t1, t2 === true); + }, + AtRule0: function AtRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + AttributeSelector0: function AttributeSelector0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.op = t1; + _.value = t2; + _.modifier = t3; + _.span = t4; + }, + AttributeOperator0: function AttributeOperator0(t0, t1) { + this._attribute0$_text = t0; + this._name = t1; + }, + BinaryOperationExpression0: function BinaryOperationExpression0(t0, t1, t2, t3) { + var _ = this; + _.operator = t0; + _.left = t1; + _.right = t2; + _.allowsSlash = t3; + }, + BinaryOperator0: function BinaryOperator0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _.isAssociative = t3; + _._name = t4; + }, + BooleanExpression0: function BooleanExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + booleanClass_closure: function booleanClass_closure() { + }, + booleanClass__closure: function booleanClass__closure() { + }, + legacyBooleanClass_closure: function legacyBooleanClass_closure() { + }, + legacyBooleanClass__closure: function legacyBooleanClass__closure() { + }, + legacyBooleanClass__closure0: function legacyBooleanClass__closure0() { + }, + SassBoolean0: function SassBoolean0(t0) { + this.value = t0; + }, + Box0: function Box0(t0, t1) { + this._box0$_inner = t0; + this.$ti = t1; + }, + ModifiableBox0: function ModifiableBox0(t0, t1) { + this.value = t0; + this.$ti = t1; + }, + BuiltInCallable$function0($name, $arguments, callback, url) { + return new A.BuiltInCallable0($name, A._setArrayType([new A._Record_2(A.ScssParser$0("@function " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), callback)], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2), false); + }, + BuiltInCallable$mixin0($name, $arguments, callback, acceptsContent, url) { + return new A.BuiltInCallable0($name, A._setArrayType([new A._Record_2(A.ScssParser$0("@mixin " + $name + "(" + $arguments + ") {", null, url).parseArgumentDeclaration$0(), new A.BuiltInCallable$mixin_closure0(callback))], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2), acceptsContent); + }, + BuiltInCallable$overloadedFunction0($name, overloads) { + var t2, t3, t4, t5, t6, args, callback, + t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2); + for (t2 = type$.String, t3 = A.MapExtensions_get_pairs0(overloads, t2, type$.Value_Function_List_Value_2), t3 = t3.get$iterator(t3), t4 = "@function " + $name + "(", t5 = type$.VariableDeclaration_2; t3.moveNext$0();) { + t6 = t3.get$current(t3); + args = t6._0; + callback = t6._1; + t6 = A.SpanScanner$(t4 + args + ") {", null); + t1.push(new A._Record_2(new A.ScssParser0(A.LinkedHashMap_LinkedHashMap$_empty(t2, t5), t6, B.StderrLogger_false0, null).parseArgumentDeclaration$0(), callback)); + } + return new A.BuiltInCallable0($name, t1, false); + }, + BuiltInCallable0: function BuiltInCallable0(t0, t1, t2) { + this.name = t0; + this._built_in$_overloads = t1; + this.acceptsContent = t2; + }, + BuiltInCallable$mixin_closure0: function BuiltInCallable$mixin_closure0(t0) { + this.callback = t0; + }, + BuiltInCallable_withDeprecationWarning_closure0: function BuiltInCallable_withDeprecationWarning_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.module = t2; + _.newName = t3; + }, + BuiltInModule$0($name, functions, mixins, variables, $T) { + var t1 = A._Uri__Uri(null, $name, null, "sass"), + t2 = A.BuiltInModule__callableMap0(functions, $T), + t3 = A.BuiltInModule__callableMap0(mixins, $T), + t4 = variables == null ? B.Map_empty13 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value_2); + return new A.BuiltInModule0(t1, t2, t3, t4, $T._eval$1("BuiltInModule0<0>")); + }, + BuiltInModule__callableMap0(callables, $T) { + var t2, _i, callable, + t1 = type$.String; + if (callables == null) + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + else { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { + callable = callables[_i]; + t1.$indexSet(0, J.get$name$x(callable), callable); + } + t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + } + return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + }, + BuiltInModule0: function BuiltInModule0(t0, t1, t2, t3, t4) { + var _ = this; + _.url = t0; + _.functions = t1; + _.mixins = t2; + _.variables = t3; + _.$ti = t4; + }, + _assertCalculationValue(arg) { + var t1; + $label0$0: { + if (!(arg instanceof A.SassNumber0)) + t1 = arg instanceof A.SassString0 && !arg._string0$_hasQuotes || arg instanceof A.SassCalculation0 || arg instanceof A.CalculationOperation0 || arg instanceof A.CalculationInterpolation; + else + t1 = true; + if (t1) { + t1 = null; + break $label0$0; + } + t1 = A.jsThrow0(new self.Error("Argument `" + A.S(arg) + "` must be one of SassNumber, unquoted SassString, SassCalculation, CalculationOperation, CalculationInterpolation")); + } + return t1; + }, + _isValidClampArg(arg) { + var t1; + $label0$0: { + if (!(arg instanceof A.CalculationInterpolation)) + t1 = arg instanceof A.SassString0 && !arg._string0$_hasQuotes; + else + t1 = true; + if (t1) + break $label0$0; + break $label0$0; + } + return t1; + }, + calculationClass_closure: function calculationClass_closure() { + }, + calculationClass__closure: function calculationClass__closure() { + }, + calculationClass__closure0: function calculationClass__closure0() { + }, + calculationClass__closure1: function calculationClass__closure1() { + }, + calculationClass__closure2: function calculationClass__closure2() { + }, + calculationClass__closure3: function calculationClass__closure3() { + }, + calculationClass__closure4: function calculationClass__closure4() { + }, + calculationClass__closure5: function calculationClass__closure5() { + }, + calculationOperationClass_closure: function calculationOperationClass_closure() { + }, + calculationOperationClass__closure: function calculationOperationClass__closure() { + }, + calculationOperationClass___closure: function calculationOperationClass___closure(t0) { + this.strOperator = t0; + }, + calculationOperationClass__closure0: function calculationOperationClass__closure0() { + }, + calculationOperationClass__closure1: function calculationOperationClass__closure1() { + }, + calculationOperationClass__closure2: function calculationOperationClass__closure2() { + }, + calculationOperationClass__closure3: function calculationOperationClass__closure3() { + }, + calculationOperationClass__closure4: function calculationOperationClass__closure4() { + }, + calculationInterpolationClass_closure: function calculationInterpolationClass_closure() { + }, + calculationInterpolationClass__closure: function calculationInterpolationClass__closure() { + }, + calculationInterpolationClass__closure0: function calculationInterpolationClass__closure0() { + }, + calculationInterpolationClass__closure1: function calculationInterpolationClass__closure1() { + }, + calculationInterpolationClass__closure2: function calculationInterpolationClass__closure2() { + }, + SassCalculation_calc0(argument) { + var t1, + _0_0 = A.SassCalculation__simplify0(argument); + $label0$0: { + if (_0_0 instanceof A.SassNumber0) { + t1 = _0_0; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation0) { + t1 = _0_0; + break $label0$0; + } + t1 = new A.SassCalculation0("calc", A.List_List$unmodifiable([_0_0], type$.Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_min0($arguments) { + var minimum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); + for (minimum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0) + t2 = minimum != null && !minimum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + minimum = null; + break; + } else if (minimum == null || minimum.greaterThan$1(arg).value) + minimum = arg; + } + if (minimum != null) + return minimum; + A.SassCalculation__verifyCompatibleNumbers0(args); + return new A.SassCalculation0("min", args); + }, + SassCalculation_max0($arguments) { + var maximum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); + for (maximum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0) + t2 = maximum != null && !maximum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + maximum = null; + break; + } else if (maximum == null || maximum.lessThan$1(arg).value) + maximum = arg; + } + if (maximum != null) + return maximum; + A.SassCalculation__verifyCompatibleNumbers0(args); + return new A.SassCalculation0("max", args); + }, + SassCalculation_hypot0($arguments) { + var first, subtotal, i, number, value, t2, t3, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("hypot() must have at least one argument.", null)); + A.SassCalculation__verifyCompatibleNumbers0(args); + first = B.JSArray_methods.get$first(args); + if (!(first instanceof A.SassNumber0) || first.hasUnit$1("%")) + return new A.SassCalculation0("hypot", args); + for (subtotal = 0, i = 0; i < t1;) { + number = args[i]; + if (!(number instanceof A.SassNumber0) || !number.hasCompatibleUnits$1(first)) + return new A.SassCalculation0("hypot", args); + ++i; + value = number.convertValueToMatch$3(first, "numbers[" + i + "]", "numbers[1]"); + subtotal += value * value; + } + t1 = Math.sqrt(subtotal); + t2 = J.getInterceptor$x(first); + t3 = t2.get$numeratorUnits(first); + return A.SassNumber_SassNumber$withUnits0(t1, t2.get$denominatorUnits(first), t3); + }, + SassCalculation_abs0(argument) { + argument = A.SassCalculation__simplify0(argument); + if (!(argument instanceof A.SassNumber0)) + return new A.SassCalculation0("abs", A._setArrayType([argument], type$.JSArray_Object)); + if (argument.hasUnit$1("%")) + A.warnForDeprecation0(string$.Passinp + argument.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + argument.toString$0(0) + string$.x7d__Mor, B.Deprecation_jYb); + return A.SassNumber_SassNumber0(Math.abs(argument._number1$_value), null).coerceToMatch$1(argument); + }, + SassCalculation_exp0(argument) { + argument = A.SassCalculation__simplify0(argument); + if (!(argument instanceof A.SassNumber0)) + return new A.SassCalculation0("exp", A._setArrayType([argument], type$.JSArray_Object)); + argument.assertNoUnits$0(); + return A.pow1(A.SassNumber_SassNumber0(2.718281828459045, null), argument); + }, + SassCalculation_sign0(argument) { + var t1, _0_2, t2, arg; + argument = A.SassCalculation__simplify0(argument); + $label0$0: { + t1 = argument instanceof A.SassNumber0; + if (t1) { + _0_2 = argument._number1$_value; + if (!isNaN(_0_2)) + t2 = 0 === _0_2; + else + t2 = true; + } else + t2 = false; + if (t2) { + t1 = argument; + break $label0$0; + } + if (t1) { + t1 = !argument.hasUnit$1("%"); + arg = argument; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.SassNumber_SassNumber0(J.get$sign$in(arg._number1$_value), null).coerceToMatch$1(argument); + break $label0$0; + } + t1 = new A.SassCalculation0("sign", A._setArrayType([argument], type$.JSArray_Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_clamp0(min, value, max) { + var t1, args; + if (value == null && max != null) + throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); + min = A.SassCalculation__simplify0(min); + value = A.NullableExtension_andThen0(value, A.calculation0_SassCalculation__simplify$closure()); + max = A.NullableExtension_andThen0(max, A.calculation0_SassCalculation__simplify$closure()); + if (min instanceof A.SassNumber0 && value instanceof A.SassNumber0 && max instanceof A.SassNumber0 && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { + if (value.lessThanOrEquals$1(min).value) + return min; + if (value.greaterThanOrEquals$1(max).value) + return max; + return value; + } + t1 = [min]; + if (value != null) + t1.push(value); + if (max != null) + t1.push(max); + args = A.List_List$unmodifiable(t1, type$.Object); + A.SassCalculation__verifyCompatibleNumbers0(args); + A.SassCalculation__verifyLength0(args, 3); + return new A.SassCalculation0("clamp", args); + }, + SassCalculation_pow0(base, exponent) { + var t1 = A._setArrayType([base], type$.JSArray_Object); + if (exponent != null) + t1.push(exponent); + A.SassCalculation__verifyLength0(t1, 2); + base = A.SassCalculation__simplify0(base); + exponent = A.NullableExtension_andThen0(exponent, A.calculation0_SassCalculation__simplify$closure()); + if (!(base instanceof A.SassNumber0) || !(exponent instanceof A.SassNumber0)) + return new A.SassCalculation0("pow", t1); + base.assertNoUnits$0(); + exponent.assertNoUnits$0(); + return A.pow1(base, exponent); + }, + SassCalculation_log0(number, base) { + var t1, t2; + number = A.SassCalculation__simplify0(number); + base = A.NullableExtension_andThen0(base, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([number], type$.JSArray_Object); + t2 = base != null; + if (t2) + t1.push(base); + if (number instanceof A.SassNumber0) + t2 = t2 && !(base instanceof A.SassNumber0); + else + t2 = true; + if (t2) + return new A.SassCalculation0("log", t1); + number.assertNoUnits$0(); + if (base instanceof A.SassNumber0) { + base.assertNoUnits$0(); + return A.log0(number, base); + } + return A.log0(number, null); + }, + SassCalculation_atan20(y, x) { + var t1; + y = A.SassCalculation__simplify0(y); + x = A.NullableExtension_andThen0(x, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([y], type$.JSArray_Object); + if (x != null) + t1.push(x); + A.SassCalculation__verifyLength0(t1, 2); + A.SassCalculation__verifyCompatibleNumbers0(t1); + if (!(y instanceof A.SassNumber0) || !(x instanceof A.SassNumber0) || y.hasUnit$1("%") || x.hasUnit$1("%") || !y.hasCompatibleUnits$1(x)) + return new A.SassCalculation0("atan2", t1); + return A.SassNumber_SassNumber$withUnits0(Math.atan2(y._number1$_value, x.convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + SassCalculation_rem0(dividend, modulus) { + var t1, result; + dividend = A.SassCalculation__simplify0(dividend); + modulus = A.NullableExtension_andThen0(modulus, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength0(t1, 2); + A.SassCalculation__verifyCompatibleNumbers0(t1); + if (!(dividend instanceof A.SassNumber0) || !(modulus instanceof A.SassNumber0) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation0("rem", t1); + result = dividend.modulo$1(modulus); + t1 = modulus._number1$_value; + if (A.DoubleWithSignedZero_get_signIncludingZero0(t1) !== A.DoubleWithSignedZero_get_signIncludingZero0(dividend._number1$_value)) { + if (t1 == 1 / 0 || t1 == -1 / 0) + return dividend; + if (result._number1$_value === 0) + return result.unaryMinus$0(); + return result.minus$1(modulus); + } + return result; + }, + SassCalculation_mod0(dividend, modulus) { + var t1; + dividend = A.SassCalculation__simplify0(dividend); + modulus = A.NullableExtension_andThen0(modulus, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength0(t1, 2); + A.SassCalculation__verifyCompatibleNumbers0(t1); + if (!(dividend instanceof A.SassNumber0) || !(modulus instanceof A.SassNumber0) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation0("mod", t1); + return dividend.modulo$1(modulus); + }, + SassCalculation_round0(strategyOrNumber, numberOrStep, step) { + var number, t2, _0_2_isSet, _0_2_isSet0, _0_10_isSet, _0_8, _0_12, _0_14, _0_14_isSet, _0_16, _0_16_isSet, strategy, _0_5_isSet0, _0_12_isSet, t3, t4, _0_8_isSet, _0_8_isSet0, rest, _null = null, _s5_ = "round", + _0_1 = A.SassCalculation__simplify0(strategyOrNumber), + _0_2 = A.NullableExtension_andThen0(numberOrStep, A.calculation0_SassCalculation__simplify$closure()), + _0_5 = A.NullableExtension_andThen0(step, A.calculation0_SassCalculation__simplify$closure()), + _0_10 = _0_1, + _0_4_isSet = _0_1 instanceof A.SassNumber0, + _0_4 = _null, + _0_20 = _null, + _0_6 = _null, + _0_6_isSet = false, + _0_50 = _null, + _0_5_isSet = false, + t1 = false; + if (_0_4_isSet) { + type$.SassNumber_2._as(_0_10); + _0_4 = _0_2 == null; + _0_5_isSet = _0_4; + _0_20 = _0_2; + if (_0_5_isSet) { + _0_6 = _0_5 == null; + t1 = _0_6; + _0_50 = _0_5; + } + _0_6_isSet = _0_5_isSet; + number = _0_10; + _0_1 = number; + } else { + number = _null; + _0_1 = _0_10; + } + if (t1) { + t1 = B.JSNumber_methods.round$0(number._number1$_value); + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(t1, number.get$denominatorUnits(number), t2); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber0) { + _0_2_isSet = true; + if (_0_4_isSet) { + t2 = _0_20; + _0_2_isSet0 = _0_4_isSet; + } else { + t2 = _0_2; + _0_2_isSet0 = _0_2_isSet; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_2_isSet0) { + t2 = _0_20; + _0_2_isSet = _0_2_isSet0; + } else { + t2 = _0_2; + _0_20 = t2; + } + type$.SassNumber_2._as(t2); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + t1 = t1 && !_0_1.hasCompatibleUnits$1(t2); + step = t2; + } else + _0_2_isSet = _0_2_isSet0; + number = _0_1; + } else { + number = _null; + _0_2_isSet = _0_4_isSet; + } + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], t1)); + return new A.SassCalculation0(_s5_, A._setArrayType([number, step], t1)); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber0) { + _0_2_isSet0 = true; + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + type$.SassNumber_2._as(t2); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + step = t2; + } + number = _0_1; + } else + number = _null; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep0("nearest", number, step); + } + _0_10_isSet = _0_1 instanceof A.SassString0; + _0_10 = _null; + _0_8 = _null; + _0_12 = _null; + _0_14 = _null; + _0_14_isSet = false; + _0_16 = _null; + _0_16_isSet = false; + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_10_isSet) { + _0_2_isSet0 = true; + _0_5_isSet0 = true; + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_12_isSet = !t2; + t2 = true; + if (_0_12_isSet) { + _0_12 = "up" === _0_8; + t3 = _0_12; + _0_14_isSet = !t3; + if (_0_14_isSet) { + _0_14 = "down" === _0_8; + t3 = _0_14; + _0_16_isSet = !t3; + if (_0_16_isSet) { + _0_16 = "to-zero" === _0_8; + t2 = _0_16; + } + } + } + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + t3 = type$.SassNumber_2; + t3._as(t2); + if (_0_5_isSet) + t4 = _0_50; + else { + t4 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t4; + } + if (t4 instanceof A.SassNumber0) { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t1; + } + t3._as(t1); + t3 = !t2.hasCompatibleUnits$1(t1); + step = t1; + t1 = t3; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_12_isSet = false; + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], t1)); + return new A.SassCalculation0(_s5_, A._setArrayType([strategy, number, step], t1)); + } + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_2_isSet0 = true; + _0_5_isSet0 = true; + _0_8_isSet = true; + if (_0_10_isSet) { + t2 = _0_10; + _0_8_isSet0 = _0_10_isSet; + } else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_8_isSet0 = _0_8_isSet; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet0) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet0 = _0_8_isSet; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet0) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet0 = _0_8_isSet; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) { + t2 = _0_16; + _0_8_isSet = _0_8_isSet0; + } else { + if (_0_8_isSet0) { + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else { + t2 = t3; + _0_8_isSet = _0_8_isSet0; + } + } else { + t2 = t3; + _0_8_isSet = _0_8_isSet0; + } + } else { + t2 = t3; + _0_8_isSet = _0_8_isSet0; + } + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + t3 = type$.SassNumber_2; + t3._as(t2); + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t1; + } + t1 = t1 instanceof A.SassNumber0; + if (t1) { + if (_0_5_isSet) + t4 = _0_50; + else { + t4 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t4; + } + t3._as(t4); + step = t4; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_8_isSet = _0_10_isSet; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep0(strategy._string0$_text, number, step); + } + strategy = _null; + rest = _null; + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_2_isSet0 = true; + _0_8_isSet0 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 instanceof A.SassString0) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + type$.SassString_2._as(t2); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + rest = t2; + } + strategy = _0_1; + } + } + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([strategy, rest], type$.JSArray_Object)); + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_8_isSet0 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + if (t2 != null) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$0(string$.If_str, _null)); + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_8_isSet0 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + _0_10_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_12 = "up" === t2; + t2 = _0_12; + _0_12_isSet = true; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_14 = "down" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + if (!t2) + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = _0_8_isSet0; + } + _0_16 = "to-zero" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_4_isSet) + t2 = _0_4; + else { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + _0_4 = t2 == null; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$0(string$.Number, _null)); + t1 = false; + if (_0_1 instanceof A.SassString0) { + if (_0_4_isSet) + t2 = _0_4; + else { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + _0_4 = t2 == null; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + rest = _0_1; + } else + rest = _null; + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([rest], type$.JSArray_Object)); + t1 = false; + if (_0_4_isSet) + t2 = _0_4; + else { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + _0_4 = t2 == null; + t2 = _0_4; + } + if (t2) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + _0_6_isSet = true; + } + if (t1) + throw A.wrapException(A.SassScriptException$0("Single argument " + A.S(_0_1) + " expected to be simplifiable.", _null)); + step = _null; + t1 = false; + _0_2_isSet0 = true; + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t2; + } + if (t2 != null) { + if (_0_2_isSet) + step = _0_20; + else { + step = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = step; + } + if (step == null) + step = type$.Object._as(step); + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_50 = t1; + _0_5_isSet = true; + } + _0_6 = t1 == null; + t1 = _0_6; + } + } + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([_0_1, step], type$.JSArray_Object)); + if (_0_1 instanceof A.SassString0) { + t1 = true; + if (_0_10_isSet) + t2 = _0_10; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = true; + } + _0_10 = "nearest" === t2; + t2 = _0_10; + } + if (!t2) { + if (_0_12_isSet) + t2 = _0_12; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = true; + } + _0_12 = "up" === t2; + t2 = _0_12; + } + if (!t2) { + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_8_isSet) + t2 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t2 = _0_8; + _0_8_isSet = true; + } + _0_14 = "down" === t2; + t2 = _0_14; + } + if (!t2) + if (_0_16_isSet) + t1 = _0_16; + else { + if (_0_8_isSet) + t1 = _0_8; + else { + _0_8 = _0_1._string0$_text; + t1 = _0_8; + } + _0_16 = "to-zero" === t1; + t1 = _0_16; + } + } + } + } else + t1 = false; + if (!t1) + if (_0_1 instanceof A.SassString0) + t1 = _0_1.get$isVar(); + else + t1 = false; + else + t1 = true; + number = _null; + step = _null; + t2 = false; + if (t1) { + _0_2_isSet0 = true; + _0_5_isSet0 = true; + type$.SassString_2._as(_0_1); + if (_0_2_isSet) + t1 = _0_20; + else { + t1 = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = t1; + } + if (t1 != null) { + if (_0_2_isSet) + number = _0_20; + else { + number = _0_2; + _0_2_isSet = _0_2_isSet0; + _0_20 = number; + } + if (number == null) + number = type$.Object._as(number); + if (_0_5_isSet) + t1 = _0_50; + else { + t1 = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = t1; + } + t1 = t1 != null; + if (t1) { + if (_0_5_isSet) + step = _0_50; + else { + step = _0_5; + _0_5_isSet = _0_5_isSet0; + _0_50 = step; + } + if (step == null) + step = type$.Object._as(step); + } + } else + t1 = t2; + strategy = _0_1; + } else { + t1 = t2; + strategy = _null; + } + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([strategy, number, step], type$.JSArray_Object)); + t1 = false; + if ((_0_2_isSet ? _0_20 : _0_2) != null) + t1 = (_0_5_isSet ? _0_50 : _0_5) != null; + if (t1) + throw A.wrapException(A.SassScriptException$0(A.S(strategyOrNumber) + string$.x20must_b, _null)); + t1 = A.SassScriptException$0("Invalid parameters.", _null); + throw A.wrapException(t1); + }, + SassCalculation_operateInternal0(operator, left, right, inLegacySassFunction, simplify) { + var t1; + if (!simplify) + return new A.CalculationOperation0(operator, left, right); + left = A.SassCalculation__simplify0(left); + right = A.SassCalculation__simplify0(right); + if (B.CalculationOperator_g2q0 === operator || B.CalculationOperator_CxF0 === operator) { + t1 = false; + if (left instanceof A.SassNumber0) + if (right instanceof A.SassNumber0) + t1 = inLegacySassFunction ? left.isComparableTo$1(right) : left.hasCompatibleUnits$1(right); + if (t1) + return operator === B.CalculationOperator_g2q0 ? left.plus$1(right) : left.minus$1(right); + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([left, right], type$.JSArray_Object)); + if (right instanceof A.SassNumber0) { + t1 = right._number1$_value; + t1 = t1 < 0 && !A.fuzzyEquals0(t1, 0); + } else + t1 = false; + if (t1) { + right = right.times$1(A.SassNumber_SassNumber0(-1, null)); + operator = operator === B.CalculationOperator_g2q0 ? B.CalculationOperator_CxF0 : B.CalculationOperator_g2q0; + } + return new A.CalculationOperation0(operator, left, right); + } else if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) + return operator === B.CalculationOperator_1710 ? left.times$1(right) : left.dividedBy$1(right); + else + return new A.CalculationOperation0(operator, left, right); + }, + SassCalculation__roundWithStep0(strategy, number, step) { + var _0_2, t1, _0_6, _0_8_isSet, _0_8, _0_9_isSet, _0_9, _0_11, _0_13, stepWithNumberUnit, t2, _null = null; + if (!A.LinkedHashSet_LinkedHashSet$_literal(["nearest", "up", "down", "to-zero"], type$.String).contains$1(0, strategy)) + throw A.wrapException(A.ArgumentError$(strategy + string$.x20must_b, _null)); + _0_2 = number._number1$_value; + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) { + t1 = step._number1$_value; + t1 = t1 == 1 / 0 || t1 == -1 / 0; + } else + t1 = false; + if (!t1) { + t1 = step._number1$_value; + t1 = t1 === 0 || isNaN(_0_2) || isNaN(t1); + } else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(0 / 0, number.get$denominatorUnits(number), t1); + } + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) + return number; + t1 = step._number1$_value; + if (t1 == 1 / 0 || t1 == -1 / 0) { + $label0$0: { + if (0 === _0_2) { + t1 = number; + break $label0$0; + } + _0_6 = "nearest" === strategy; + t1 = _0_6; + _0_8_isSet = !t1; + _0_8 = _null; + if (_0_8_isSet) { + _0_8 = "to-zero" === strategy; + _0_9_isSet = _0_8; + } else + _0_9_isSet = true; + _0_9 = _null; + if (_0_9_isSet) { + _0_9 = _0_2 > 0; + t1 = _0_9; + } else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (!_0_6) + if (_0_8_isSet) + t1 = _0_8; + else { + _0_8 = "to-zero" === strategy; + t1 = _0_8; + } + else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_11 = "up" === strategy; + t1 = _0_11; + if (t1) + if (_0_9_isSet) + t1 = _0_9; + else { + _0_9 = _0_2 > 0; + t1 = _0_9; + } + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_11) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_13 = "down" === strategy; + t1 = _0_13; + if (t1) + t1 = _0_2 < 0; + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(-1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_13) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Invalid argument: " + strategy + ".")); + } + return t1; + } + stepWithNumberUnit = step.convertValueToMatch$1(number); + $label1$1: { + if ("nearest" === strategy) { + t1 = B.JSNumber_methods.round$0(_0_2 / stepWithNumberUnit); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("up" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.floor$0(t2) : B.JSNumber_methods.ceil$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("down" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.ceil$0(t2) : B.JSNumber_methods.floor$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("to-zero" === strategy) { + t1 = _0_2 / stepWithNumberUnit; + if (_0_2 < 0) { + t1 = B.JSNumber_methods.ceil$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } else { + t1 = B.JSNumber_methods.floor$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } + break $label1$1; + } + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(0 / 0, number.get$denominatorUnits(number), t1); + break $label1$1; + } + return t1; + }, + SassCalculation__simplify0(arg) { + var t1, t2, _0_11_isSet, _0_15, _0_12, _0_16_isSet, text, _0_11, _0_16, _0_12_isSet, _0_15_isSet, value, _null = null, + _s32_ = " can't be used in a calculation."; + $label0$0: { + if (arg instanceof A.SassNumber0 || arg instanceof A.CalculationOperation0) { + t1 = arg; + break $label0$0; + } + if (arg instanceof A.CalculationInterpolation) { + t1 = new A.SassString0("(" + arg._calculation0$_value + ")", false); + break $label0$0; + } + t1 = arg instanceof A.SassString0; + t2 = _null; + if (t1 && !arg._string0$_hasQuotes) { + t1 = arg; + break $label0$0; + } + if (t1) + A.throwExpression(A.SassScriptException$0("Quoted string " + arg.toString$0(0) + _s32_, _null)); + _0_11_isSet = arg instanceof A.SassCalculation0; + _0_15 = _null; + _0_12 = _null; + _0_16_isSet = false; + text = _null; + t1 = false; + if (_0_11_isSet) { + _0_11 = "calc" === arg.name; + if (_0_11) { + _0_12 = arg.$arguments; + _0_15 = _0_12.length === 1; + _0_16_isSet = _0_15; + if (_0_16_isSet) { + _0_16 = _0_12[0]; + t2 = _0_16; + if (t2 instanceof A.SassString0) { + type$.SassString_2._as(_0_16); + if (!_0_16._string0$_hasQuotes) { + text = _0_16._string0$_text; + t1 = A.SassCalculation__needsParentheses0(text); + } + } + } else + _0_16 = t2; + } else + _0_16 = t2; + _0_12_isSet = _0_11; + _0_15_isSet = _0_12_isSet; + } else { + _0_16 = t2; + _0_11 = _null; + _0_15_isSet = false; + _0_12_isSet = false; + } + if (t1) { + t1 = new A.SassString0("(" + A.S(text) + ")", false); + break $label0$0; + } + t1 = false; + if (_0_11_isSet) + if (_0_11) + if (_0_15_isSet) + t1 = _0_15; + else { + if (_0_12_isSet) + t1 = _0_12; + else { + _0_12 = arg.$arguments; + t1 = _0_12; + _0_12_isSet = true; + } + _0_15 = t1.length === 1; + t1 = _0_15; + } + if (t1) { + if (_0_16_isSet) + value = _0_16; + else { + _0_16 = (_0_12_isSet ? _0_12 : arg.$arguments)[0]; + value = _0_16; + } + t1 = value; + break $label0$0; + } + if (_0_11_isSet) { + t1 = arg; + break $label0$0; + } + if (arg instanceof A.Value0) + A.throwExpression(A.SassScriptException$0("Value " + arg.toString$0(0) + _s32_, _null)); + t1 = A.throwExpression(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", _null)); + } + return t1; + }, + SassCalculation__needsParentheses0(text) { + var t1, couldBeVar, second, third, fourth, i, t2, + first = text.charCodeAt(0); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47 || first === 42) + return true; + t1 = text.length; + couldBeVar = t1 >= 4 && A.characterEqualsIgnoreCase0(first, 118); + if (t1 < 2) + return false; + second = text.charCodeAt(1); + if (second === 32 || second === 9 || second === 10 || second === 13 || second === 12 || second === 47 || second === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase0(second, 97); + if (t1 < 3) + return false; + third = text.charCodeAt(2); + if (third === 32 || third === 9 || third === 10 || third === 13 || third === 12 || third === 47 || third === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase0(third, 114); + if (t1 < 4) + return false; + fourth = text.charCodeAt(3); + if (couldBeVar && fourth === 40) + return true; + if (fourth === 32 || fourth === 9 || fourth === 10 || fourth === 13 || fourth === 12 || fourth === 47 || fourth === 42) + return true; + for (i = 4; i < t1; ++i) { + t2 = text.charCodeAt(i); + if (t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || t2 === 47 || t2 === 42) + return true; + } + return false; + }, + SassCalculation__verifyCompatibleNumbers0(args) { + var t1, _i, t2, arg, i, number1, j, number2; + for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0 && arg.get$hasComplexUnits()) + throw A.wrapException(A.SassScriptException$0("Number " + A.S(arg) + " isn't compatible with CSS calculations.", null)); + } + for (t1 = t2, i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.SassScriptException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); + } + } + }, + SassCalculation__verifyLength0(args, expectedLength) { + var t1; + if (args.length === expectedLength) + return; + if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure0())) + return; + t1 = args.length; + throw A.wrapException(A.SassScriptException$0("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", null)); + }, + SassCalculation__singleArgument0($name, argument, mathFunc, forbidUnits) { + argument = A.SassCalculation__simplify0(argument); + if (!(argument instanceof A.SassNumber0)) + return new A.SassCalculation0($name, A._setArrayType([argument], type$.JSArray_Object)); + if (forbidUnits) + argument.assertNoUnits$0(); + return mathFunc.call$1(argument); + }, + SassCalculation0: function SassCalculation0(t0, t1) { + this.name = t0; + this.$arguments = t1; + }, + SassCalculation__verifyLength_closure0: function SassCalculation__verifyLength_closure0() { + }, + CalculationOperation0: function CalculationOperation0(t0, t1, t2) { + this._calculation0$_operator = t0; + this._calculation0$_left = t1; + this._calculation0$_right = t2; + }, + CalculationOperator0: function CalculationOperator0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _._name = t3; + }, + CalculationInterpolation: function CalculationInterpolation(t0) { + this._calculation0$_value = t0; + }, + CallableDeclaration0: function CallableDeclaration0() { + }, + updateCanonicalizeContextPrototype() { + var t1 = type$.JSClass._as(new A.CanonicalizeContext0(false, null).constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["fromImport", new A.updateCanonicalizeContextPrototype_closure(), "containingUrl", new A.updateCanonicalizeContextPrototype_closure0()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); + return null; + }, + updateCanonicalizeContextPrototype_closure: function updateCanonicalizeContextPrototype_closure() { + }, + updateCanonicalizeContextPrototype_closure0: function updateCanonicalizeContextPrototype_closure0() { + }, + CanonicalizeContext0: function CanonicalizeContext0(t0, t1) { + this._canonicalize_context$_fromImport = t0; + this._canonicalize_context$_containingUrl = t1; + this._canonicalize_context$_wasContainingUrlAccessed = false; + }, + ColorChannel0: function ColorChannel0(t0, t1, t2) { + this.name = t0; + this.isPolarAngle = t1; + this.associatedUnit = t2; + }, + LinearChannel0: function LinearChannel0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.min = t0; + _.max = t1; + _.requiresPercent = t2; + _.lowerClamped = t3; + _.upperClamped = t4; + _.name = t5; + _.isPolarAngle = t6; + _.associatedUnit = t7; + }, + Chokidar0: function Chokidar0() { + }, + ChokidarOptions0: function ChokidarOptions0() { + }, + ChokidarWatcher0: function ChokidarWatcher0() { + }, + ClassSelector0: function ClassSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + ClipGamutMap0: function ClipGamutMap0(t0) { + this.name = t0; + }, + cloneCssStylesheet0(stylesheet, extensionStore) { + var _0_0 = extensionStore.clone$0(); + return new A._Record_2(new A._CloneCssVisitor0(_0_0._1)._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(stylesheet.get$span(stylesheet)), stylesheet), _0_0._0); + }, + _CloneCssVisitor0: function _CloneCssVisitor0(t0) { + this._clone_css$_oldToNewSelectors = t0; + }, + ColorExpression0: function ColorExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + _invert0($arguments, global) { + var t2, color, rgb, channel2, space, weight, inSpace, t3, _1_9, channel0, channel1, t4, _s6_ = "weight", _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + weightNumber = t1.$index($arguments, 1).assertNumber$1(_s6_); + if (!(t1.$index($arguments, 0) instanceof A.SassNumber0)) + t2 = global && t1.$index($arguments, 0).get$isSpecialNumber(); + else + t2 = true; + if (t2) { + if (weightNumber._number1$_value !== 100 || !weightNumber.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + return A._functionString0("invert", t1.take$1($arguments, 1)); + } + color = t1.$index($arguments, 0).assertColor$1("color"); + if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull0)) { + t1 = color._color0$_space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.To_usei + color.toString$0(0) + ", you must provide a $space.", "color")); + A._checkPercent0(weightNumber, _s6_); + rgb = color.toSpace$1(B.RgbColorSpace_mlz0); + channel2 = B.LinearChannel_Npb0; + return A._mixLegacy0(A.SassColor_SassColor$rgbInternal0(A._invertChannel0(rgb, B.LinearChannel_bdu0, rgb.channel0OrNull), A._invertChannel0(rgb, B.LinearChannel_kUZ0, rgb.channel1OrNull), A._invertChannel0(rgb, channel2, rgb.channel2OrNull), color.alphaOrNull, null), color, weightNumber).toSpace$1(t1); + } + t1 = t1.$index($arguments, 2).assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName0(t1._string0$_text, _s5_); + weight = weightNumber.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100; + if (A.fuzzyEquals0(weight, 0)) + return color; + inSpace = color.toSpace$1(space); + $label0$0: { + if (B.HwbColorSpace_06z0 === space) { + t1 = A._invertChannel0(inSpace, space._space$_channels[0], inSpace.channel0OrNull); + t2 = inSpace.alphaOrNull; + if (t2 == null) + t2 = 0; + t2 = A.SassColor_SassColor$hwb0(t1, inSpace.channel2OrNull, inSpace.channel1OrNull, t2); + t1 = t2; + break $label0$0; + } + if (B.HslColorSpace_gsm0 === space || B.LchColorSpace_wv80 === space || B.OklchColorSpace_li80 === space) { + t1 = space._space$_channels; + t2 = A._invertChannel0(inSpace, t1[0], inSpace.channel0OrNull); + t1 = A._invertChannel0(inSpace, t1[2], inSpace.channel2OrNull); + t3 = inSpace.alphaOrNull; + if (t3 == null) + t3 = 0; + t3 = A.SassColor_SassColor$forSpaceInternal0(space, t2, inSpace.channel1OrNull, t1, t3); + t1 = t3; + break $label0$0; + } + _1_9 = space._space$_channels; + channel0 = _1_9[0]; + channel1 = _1_9[1]; + channel2 = _1_9[2]; + t1 = A._invertChannel0(inSpace, channel0, inSpace.channel0OrNull); + t2 = A._invertChannel0(inSpace, channel1, inSpace.channel1OrNull); + t3 = A._invertChannel0(inSpace, channel2, inSpace.channel2OrNull); + t4 = inSpace.alphaOrNull; + t1 = A.SassColor_SassColor$forSpaceInternal0(space, t1, t2, t3, t4 == null ? 0 : t4); + break $label0$0; + } + return A.fuzzyEquals0(weight, 1) ? t1.toSpace$2$legacyMissing(color._color0$_space, false) : color.interpolate$4$legacyMissing$weight(t1, A.InterpolationMethod$0(space, null), false, 1 - weight); + }, + _invertChannel0(color, channel, value) { + var _0_2_isSet, _0_2, t1; + if (value == null) + A._missingChannelError0(color, channel.name); + $label0$0: { + _0_2_isSet = channel instanceof A.LinearChannel0; + if (_0_2_isSet) { + _0_2 = channel.min; + t1 = _0_2 < 0; + } else { + _0_2 = null; + t1 = false; + } + if (t1) { + t1 = -value; + break $label0$0; + } + if (_0_2_isSet) + t1 = 0 === _0_2; + else + t1 = false; + if (t1) { + t1 = channel.max - value; + break $label0$0; + } + if (channel.isPolarAngle) { + t1 = B.JSNumber_methods.$mod(value + 180, 360); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown channel " + channel.toString$0(0) + ".")); + } + return t1; + }, + _grayscale0(colorArg) { + var hsl, t2, oklch, + color = colorArg.assertColor$1("color"), + t1 = color._color0$_space; + if (t1.get$isLegacyInternal()) { + hsl = color.toSpace$1(B.HslColorSpace_gsm0); + t2 = hsl.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$hsl0(hsl.channel0OrNull, 0, hsl.channel2OrNull, t2).toSpace$2$legacyMissing(t1, false); + } else { + oklch = color.toSpace$1(B.OklchColorSpace_li80); + t2 = oklch.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_li80, oklch.channel0OrNull, 0, oklch.channel2OrNull, t2).toSpace$1(t1); + } + }, + _updateComponents0($arguments, adjust, change, scale) { + var t2, t3, keywords, originalColor, spaceKeyword, alphaArg, color, channelArgs, channelInfo, t4, value, channelIndex, result, i, alphaNumber, _null = null, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + argumentList = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + if (argumentList._list1$_contents.length !== 0) + throw A.wrapException(A.SassScriptException$0(string$.Only_op, _null)); + argumentList._argument_list$_wereKeywordsAccessed = true; + t2 = type$.String; + t3 = type$.Value_2; + keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._argument_list$_keywords, t2, t3); + originalColor = t1.$index($arguments, 0).assertColor$1("color"); + t1 = keywords.remove$1(0, _s5_); + spaceKeyword = t1 == null ? _null : t1.assertString$1(_s5_); + if (spaceKeyword == null) + spaceKeyword = _null; + else + spaceKeyword.assertUnquoted$1(_s5_); + alphaArg = keywords.remove$1(0, "alpha"); + t1 = spaceKeyword == null; + if (t1 && originalColor._color0$_space.get$isLegacyInternal() && keywords.__js_helper$_length !== 0) { + t1 = A.NullableExtension_andThen0(A._sniffLegacyColorSpace0(keywords), new A._updateComponents_closure1(originalColor)); + color = t1 == null ? originalColor : t1; + } else + color = A._colorInSpace0(originalColor, t1 ? B.C__SassNull0 : spaceKeyword, true); + channelArgs = A.List_List$filled(color.get$channels().length, _null, false, type$.nullable_Value_2); + t1 = color._color0$_space; + channelInfo = t1._space$_channels; + for (t2 = A.MapExtensions_get_pairs0(keywords, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = {}; + t4 = t2.get$current(t2); + t3.name = null; + t3.name = t4._0; + value = t4._1; + channelIndex = B.JSArray_methods.indexWhere$1(channelInfo, new A._updateComponents_closure2(t3)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$0("Color space " + t1.toString$0(0) + " doesn't have a channel with this name.", t3.name)); + channelArgs[channelIndex] = value; + } + if (change) + result = A._changeColor0(color, channelArgs, alphaArg); + else { + t2 = A._setArrayType([], type$.JSArray_nullable_SassNumber_2); + for (i = 0; i < 3; ++i) { + t3 = channelArgs[i]; + t2.push(t3 == null ? _null : t3.assertNumber$1(channelInfo[i].name)); + } + alphaNumber = alphaArg == null ? _null : alphaArg.assertNumber$1("alpha"); + result = scale ? A.SassColor_SassColor$forSpaceInternal0(t1, A._scaleChannel0(color, channelInfo[0], color.channel0OrNull, t2[0]), A._scaleChannel0(color, channelInfo[1], color.channel1OrNull, t2[1]), A._scaleChannel0(color, channelInfo[2], color.channel2OrNull, t2[2]), A._scaleChannel0(color, B.LinearChannel_omH0, color.alphaOrNull, alphaNumber)) : A._adjustColor0(color, t2, alphaNumber); + } + return result.toSpace$2$legacyMissing(originalColor._color0$_space, false); + }, + _changeColor0(color, channelArgs, alphaArg) { + var t4, _s5_ = "alpha", + t1 = A._channelForChange0(channelArgs[0], color, 0), + t2 = A._channelForChange0(channelArgs[1], color, 1), + t3 = A._channelForChange0(channelArgs[2], color, 2); + $label0$0: { + if (alphaArg == null) { + t4 = color.alphaOrNull; + if (t4 == null) + t4 = 0; + break $label0$0; + } + t4 = A._isNone0(alphaArg); + if (t4) { + t4 = null; + break $label0$0; + } + t4 = alphaArg instanceof A.SassNumber0; + if (t4 && !alphaArg.get$hasUnits()) { + t4 = alphaArg.valueInRange$3(0, 1, _s5_); + break $label0$0; + } + if (t4 && alphaArg.hasUnit$1("%")) { + t4 = alphaArg.valueInRangeWithUnit$4(0, 100, _s5_, "%") / 100; + break $label0$0; + } + if (t4) { + t4 = new A._changeColor_closure0(alphaArg).call$0(); + break $label0$0; + } + t4 = A.throwExpression(A.SassScriptException$0(alphaArg.toString$0(0) + ' is not a number or unquoted "none".', _s5_)); + } + return A._colorFromChannels0(color._color0$_space, t1, t2, t3, t4, false, false); + }, + _channelForChange0(channelArg, color, channel) { + var _0_0, t1, t2; + if (channelArg == null) { + _0_0 = color.get$channelsOrNull()[channel]; + $label0$0: { + if (_0_0 != null) { + t1 = color._color0$_space; + t2 = A.SassNumber_SassNumber0(_0_0, (t1 === B.HslColorSpace_gsm0 || t1 === B.HwbColorSpace_06z0) && channel > 0 ? "%" : null); + t1 = t2; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + } + if (A._isNone0(channelArg)) + return null; + if (channelArg instanceof A.SassNumber0) + return channelArg; + throw A.wrapException(A.SassScriptException$0(channelArg.toString$0(0) + ' is not a number or unquoted "none".', color._color0$_space._space$_channels[channel].name)); + }, + _scaleChannel0(color, channel, oldValue, factorArg) { + var t1, factor; + if (factorArg == null) + return oldValue; + if (!(channel instanceof A.LinearChannel0)) + throw A.wrapException(A.SassScriptException$0("Channel isn't scalable.", channel.name)); + if (oldValue == null) + A._missingChannelError0(color, channel.name); + t1 = channel.name; + factorArg.assertUnit$2("%", t1); + factor = factorArg.valueInRangeWithUnit$4(-100, 100, t1, "%") / 100; + $label0$0: { + if (0 === factor) { + t1 = oldValue; + break $label0$0; + } + if (factor > 0) { + t1 = channel.max; + t1 = oldValue >= t1 ? oldValue : oldValue + (t1 - oldValue) * factor; + break $label0$0; + } + t1 = channel.min; + t1 = oldValue <= t1 ? oldValue : oldValue + (oldValue - t1) * factor; + break $label0$0; + } + return t1; + }, + _adjustColor0(color, channelArgs, alphaArg) { + var t1 = color._color0$_space, + t2 = t1._space$_channels; + return A.SassColor_SassColor$forSpaceInternal0(t1, A._adjustChannel0(color, t2[0], color.channel0OrNull, channelArgs[0]), A._adjustChannel0(color, t2[1], color.channel1OrNull, channelArgs[1]), A._adjustChannel0(color, t2[2], color.channel2OrNull, channelArgs[2]), A.NullableExtension_andThen0(A._adjustChannel0(color, B.LinearChannel_omH0, color.alphaOrNull, alphaArg), new A._adjustColor_closure0())); + }, + _adjustChannel0(color, channel, oldValue, adjustmentArg) { + var _0_1, _0_3, t1, _0_6_isSet, _0_6, _0_6_isSet0, t2, _0_11, result, min, max, _null = null; + if (adjustmentArg == null) + return oldValue; + if (oldValue == null) + A._missingChannelError0(color, channel.name); + $label0$0: { + _0_1 = color._color0$_space; + _0_3 = B.HslColorSpace_gsm0 === _0_1; + t1 = _0_3; + if (!t1) + _0_6_isSet = B.HwbColorSpace_06z0 === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + t1 = channel.isPolarAngle; + _0_6 = channel; + } else { + _0_6 = _null; + t1 = false; + } + if (t1) { + adjustmentArg = A.SassNumber_SassNumber0(A._angleValue0(adjustmentArg, "hue"), _null); + break $label0$0; + } + t1 = false; + if (_0_3) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_6; + else { + t2 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t2; + } + if (t2 instanceof A.LinearChannel0) { + if (_0_6_isSet) + t1 = _0_6; + else { + t1 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t1; + } + _0_11 = type$.LinearChannel_2._as(t1).name; + t1 = _0_11; + if ("saturation" !== t1) + t1 = "lightness" === _0_11; + else + t1 = true; + } + } + if (t1) { + A._checkPercent0(adjustmentArg, channel.name); + adjustmentArg = A.SassNumber_SassNumber0(adjustmentArg._number1$_value, "%"); + break $label0$0; + } + if (B.LinearChannel_omH0 === (_0_6_isSet ? _0_6 : channel) && adjustmentArg.get$hasUnits()) { + A.warnForDeprecation0("$alpha: Passing a number with unit " + adjustmentArg.get$unitString() + string$.x20is_de + adjustmentArg.unitSuggestion$1("alpha") + string$.x0a_Morex3af, B.Deprecation_oCX); + adjustmentArg = A.SassNumber_SassNumber0(adjustmentArg._number1$_value, _null); + } + } + t1 = A._channelFromValue0(channel, adjustmentArg, false); + t1.toString; + result = oldValue + t1; + $label1$1: { + t1 = channel instanceof A.LinearChannel0; + min = _null; + t2 = false; + if (t1) + if (channel.lowerClamped) { + min = channel.min; + t2 = result < min; + } + if (t2) { + t1 = oldValue < min ? Math.max(oldValue, result) : min; + break $label1$1; + } + max = _null; + t2 = false; + if (t1) + if (channel.upperClamped) { + max = channel.max; + t1 = result > max; + } else + t1 = t2; + else + t1 = t2; + if (t1) { + t1 = oldValue > max ? Math.min(oldValue, result) : max; + break $label1$1; + } + t1 = result; + break $label1$1; + } + return t1; + }, + _sniffLegacyColorSpace0(keywords) { + var t1, t2; + for (t1 = A.LinkedHashMapKeyIterator$(keywords, keywords.__js_helper$_modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + if ("red" === t2 || "green" === t2 || "blue" === t2) + return B.RgbColorSpace_mlz0; + if ("saturation" === t2 || "lightness" === t2) + return B.HslColorSpace_gsm0; + if ("whiteness" === t2 || "blackness" === t2) + return B.HwbColorSpace_06z0; + } + return keywords.containsKey$1("hue") ? B.HslColorSpace_gsm0 : null; + }, + _functionString0($name, $arguments) { + return new A.SassString0($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure0(), type$.String).join$1(0, ", ") + ")", false); + }, + _removedColorFunction0($name, argument, negative) { + return A.BuiltInCallable$function0($name, "$color, $amount", new A._removedColorFunction_closure0($name, argument, negative), "sass:color"); + }, + _rgb0($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString0($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("red"); + t3 = t1.$index($arguments, 1).assertNumber$1("green"); + t1 = t1.$index($arguments, 2).assertNumber$1("blue"); + t4 = A.NullableExtension_andThen0(alpha, new A._rgb_closure0()); + return A._colorFromChannels0(B.RgbColorSpace_mlz0, t2, t3, t1, t4 == null ? 1 : t4, true, true); + }, + _rgbTwoArg0($name, $arguments) { + var t2, color, + t1 = J.getInterceptor$asx($arguments), + first = t1.$index($arguments, 0), + second = t1.$index($arguments, 1); + if (!first.get$isVar()) + t2 = !(first instanceof A.SassColor0) && second.get$isVar(); + else + t2 = true; + if (t2) + return A._functionString0($name, $arguments); + color = first.assertColor$1("color"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0("Expected " + color.toString$0(0) + string$.x20to_be_ + color.toString$0(0) + ", $alpha: " + second.toString$0(0) + ")", $name)); + color.assertLegacy$1("color"); + color = color.toSpace$1(B.RgbColorSpace_mlz0); + if (second.get$isSpecialNumber()) + return A._functionString0($name, A._setArrayType([A.SassNumber_SassNumber0(color.channel$1(0, "red"), null), A.SassNumber_SassNumber0(color.channel$1(0, "green"), null), A.SassNumber_SassNumber0(color.channel$1(0, "blue"), null), t1.$index($arguments, 1)], type$.JSArray_Value_2)); + t1 = A._percentageOrUnitless0(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha"); + return color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + }, + _hsl0($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString0($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("hue"); + t3 = t1.$index($arguments, 1).assertNumber$1("saturation"); + t1 = t1.$index($arguments, 2).assertNumber$1("lightness"); + t4 = A.NullableExtension_andThen0(alpha, new A._hsl_closure0()); + return A._colorFromChannels0(B.HslColorSpace_gsm0, t2, t3, t1, t4 == null ? 1 : t4, true, false); + }, + _angleValue0(angleValue, $name) { + var angle = angleValue.assertNumber$1($name); + if (angle.compatibleWithUnit$1("deg")) + return angle.coerceValueToUnit$1("deg"); + A.warnForDeprecation0("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + string$.x29x20is_d + angle.unitSuggestion$1($name) + string$.x0a_See_, B.Deprecation_oCX); + return angle._number1$_value; + }, + _checkPercent0(number, $name) { + if (number.hasUnit$1("%")) + return; + A.warnForDeprecation0("$" + $name + ": Passing a number without unit % (" + number.toString$0(0) + string$.x29x20is_d + number.unitSuggestion$2($name, "%") + string$.x0a_Morex3af, B.Deprecation_oCX); + }, + _percentageOrUnitless0(number, max, $name) { + var value; + if (!number.get$hasUnits()) + value = number._number1$_value; + else if (number.hasUnit$1("%")) + value = max * number._number1$_value / 100; + else + throw A.wrapException(A.SassScriptException$0("Expected " + number.toString$0(0) + ' to have unit "%" or no units.', $name)); + return value; + }, + _mixLegacy0(color1, color2, weight) { + var t2, alphaDistance, weight1, weight2, t3, t4, t5, t6, t7, t8, + rgb1 = color1.toSpace$1(B.RgbColorSpace_mlz0), + rgb2 = color2.toSpace$1(B.RgbColorSpace_mlz0), + weightScale = weight.valueInRange$3(0, 100, "weight") / 100, + normalizedWeight = weightScale * 2 - 1, + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + alphaDistance = t1 - (t2 == null ? 0 : t2); + t1 = normalizedWeight * alphaDistance; + weight1 = ((t1 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t1)) + 1) / 2; + weight2 = 1 - weight1; + t1 = rgb1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = rgb2.channel0OrNull; + if (t2 == null) + t2 = 0; + t3 = rgb1.channel1OrNull; + if (t3 == null) + t3 = 0; + t4 = rgb2.channel1OrNull; + if (t4 == null) + t4 = 0; + t5 = rgb1.channel2OrNull; + if (t5 == null) + t5 = 0; + t6 = rgb2.channel2OrNull; + if (t6 == null) + t6 = 0; + t7 = rgb1.alphaOrNull; + if (t7 == null) + t7 = 0; + t8 = rgb2.alphaOrNull; + if (t8 == null) + t8 = 0; + return A.SassColor_SassColor$rgbInternal0(t1 * weight1 + t2 * weight2, t3 * weight1 + t4 * weight2, t5 * weight1 + t6 * weight2, t7 * weightScale + t8 * (1 - weightScale), null); + }, + _opacify0($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 += amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation0($name + "() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_ivT); + return result; + }, + _transparentize0($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 -= amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation0($name + "() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_ivT); + return result; + }, + _colorInSpace0(colorUntyped, spaceUntyped, legacyMissing) { + var t1, _s5_ = "space", + color = colorUntyped.assertColor$1("color"); + if (spaceUntyped.$eq(0, B.C__SassNull0)) + return color; + t1 = spaceUntyped.assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + return color.toSpace$2$legacyMissing(A.ColorSpace_fromName0(t1._string0$_text, _s5_), legacyMissing); + }, + _parseChannels0(functionName, input, $name, space) { + var parsedSlash, components, alphaValue, _2_0, _2_1, _2_5, t1, _2_6, t2, _2_60, t3, channels, first, rest, componentList, spaceName, i, channel, channelName, t4, _null = null; + if (input.get$isVar()) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + parsedSlash = A._parseSlashChannels0(input, $name); + if (parsedSlash == null) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + components = parsedSlash._0; + alphaValue = parsedSlash._1; + $label0$0: { + _2_0 = components.assertCommonListStyle$2$allowSlash($name, false); + _2_1 = _2_0.length; + if (_2_1 <= 0) + throw A.wrapException(A.SassScriptException$0("Color component list may not be empty.", $name)); + _2_5 = _2_1 >= 1; + t1 = _2_5; + _2_6 = _null; + t2 = false; + if (t1) { + _2_60 = _2_0[0]; + t3 = _2_60; + _2_6 = t3; + if (t3 instanceof A.SassString0) { + type$.SassString_2._as(_2_6); + t2 = !_2_6._string0$_hasQuotes && _2_6._string0$_text.toLowerCase() === "from"; + } + } + if (t2) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + t2 = components.get$isVar(); + if (t2) { + channels = A._setArrayType([components], type$.JSArray_Value_2); + break $label0$0; + } + channels = _null; + if (_2_5) { + first = t1 ? _2_6 : _2_0[0]; + rest = B.JSArray_methods.sublist$1(_2_0, 1); + componentList = _2_0; + } else { + componentList = channels; + rest = componentList; + first = _null; + } + if (_2_5) { + if (space == null) { + spaceName = first.assertString$1($name); + spaceName.assertUnquoted$1($name); + space = spaceName.get$isVar() ? _null : A.ColorSpace_fromName0(spaceName._string0$_text, $name); + if (B.RgbColorSpace_mlz0 === space || B.HslColorSpace_gsm0 === space || B.HwbColorSpace_06z0 === space || B.LabColorSpace_IF20 === space || B.LchColorSpace_wv80 === space || B.OklabColorSpace_yrt0 === space || B.OklchColorSpace_li80 === space) + throw A.wrapException(A.SassScriptException$0(string$.The_co + A.S(space) + ". Use the " + A.S(space) + "() function instead.", $name)); + channels = rest; + } else + channels = componentList; + for (i = 0; i < channels.length; ++i) { + channel = channels[i]; + t1 = false; + if (!channel.get$isSpecialNumber()) + if (!(channel instanceof A.SassNumber0)) + t1 = !(channel instanceof A.SassString0 && !channel._string0$_hasQuotes && channel._string0$_text.toLowerCase() === "none"); + if (t1) { + t1 = _null; + if (space == null) + channelName = t1; + else { + t2 = space._space$_channels; + t2 = i < 3 ? t2[i] : _null; + if (!(t2 == null)) + t1 = new A._parseChannels_closure1().call$1(t2.name); + channelName = t1; + } + if (channelName == null) + channelName = "channel " + (i + 1); + throw A.wrapException(A.SassScriptException$0("Expected " + channelName + " to be a number, was " + channel.toString$0(0) + ".", $name)); + } + } + break $label0$0; + } + throw A.wrapException("unreachable"); + } + t1 = alphaValue == null; + t2 = t1 ? _null : alphaValue.get$isSpecialNumber(); + if (t2 === true) { + if (channels.length === 3 && B.Set_2Dcfy0.contains$1(0, space)) { + t1 = A.List_List$of(channels, true, type$.Value_2); + alphaValue.toString; + t1.push(alphaValue); + t1 = A._functionString0(functionName, t1); + } else + t1 = A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + return t1; + } + $label1$1: { + if (t1) { + t2 = 1; + break $label1$1; + } + if (alphaValue instanceof A.SassString0 && !alphaValue._string0$_hasQuotes && "none" === alphaValue._string0$_text) { + t2 = _null; + break $label1$1; + } + t2 = A._percentageOrUnitless0(alphaValue.assertNumber$1($name), 1, "alpha"); + t2 = isNaN(t2) ? 0 : B.JSNumber_methods.clamp$2(t2, 0, 1); + break $label1$1; + } + if (space == null) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + if (B.JSArray_methods.any$1(channels, new A._parseChannels_closure2())) { + if (channels.length === 3 && B.Set_2Dcfy0.contains$1(0, space)) { + t2 = A.List_List$of(channels, true, type$.Value_2); + if (!t1) + t2.push(alphaValue); + t1 = A._functionString0(functionName, t2); + } else + t1 = A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + return t1; + } + if (channels.length !== 3) + throw A.wrapException(A.SassScriptException$0("The " + space.toString$0(0) + " color space has 3 channels but " + input.toString$0(0) + " has " + channels.length + ".", $name)); + t1 = channels[0]; + t1 = t1 instanceof A.SassNumber0 ? t1 : _null; + t3 = channels[1]; + t3 = t3 instanceof A.SassNumber0 ? t3 : _null; + t4 = channels[2]; + t4 = t4 instanceof A.SassNumber0 ? t4 : _null; + return A._colorFromChannels0(space, t1, t3, t4, t2, true, space === B.RgbColorSpace_mlz0); + }, + _parseSlashChannels0(input, $name) { + var _1_1, alphaValue, t1, components, _1_7, _1_9_isSet, _1_8, _1_9, initial, t2, _0_0, _0_1, channel3, alpha, _1_16, _1_16_isSet, _1_9_isSet0, t3, _null = null, + _1_0 = input.assertCommonListStyle$2$allowSlash($name, true); + $label0$0: { + _1_1 = _1_0.length; + alphaValue = _null; + t1 = false; + if (_1_1 === 2) { + components = _1_0[0]; + alphaValue = _1_0[1]; + t1 = input.get$separator(input) === B.ListSeparator_cQA0; + } else + components = _null; + if (t1) { + t1 = new A._Record_2(components, alphaValue); + break $label0$0; + } + t1 = input.get$separator(input); + if (t1 === B.ListSeparator_cQA0) { + t1 = _1_0.length; + A.throwExpression(A.SassScriptException$0(string$.Only_2 + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", $name)); + } + _1_7 = _1_1 >= 1; + _1_9_isSet = _1_7; + _1_8 = _null; + _1_9 = _null; + initial = _null; + t1 = false; + if (_1_9_isSet) { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + if (t2 instanceof A.SassString0) { + type$.SassString_2._as(_1_9); + t1 = !_1_9._string0$_hasQuotes; + } + } + if (t1) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + } + _0_0 = type$.SassString_2._as(t1)._string0$_text.split("/"); + $label1$1: { + _0_1 = _0_0.length; + if (_0_1 === 1) { + t1 = new A._Record_2(input, _null); + break $label1$1; + } + if (_0_1 === 2) { + channel3 = _0_0[0]; + alpha = _0_0[1]; + t1 = A.List_List$of(initial, true, type$.Value_2); + t1.push(A._parseNumberOrString0(channel3)); + t1 = new A._Record_2(A.SassList$0(t1, B.ListSeparator_nbm0, false), A._parseNumberOrString0(alpha)); + break $label1$1; + } + t1 = _null; + break $label1$1; + } + break $label0$0; + } + _1_16 = _null; + _1_16_isSet = false; + t1 = false; + if (_1_7) { + _1_9_isSet0 = true; + if (_1_9_isSet) + initial = _1_8; + else { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + } + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16_isSet = t2 instanceof A.SassNumber0; + if (_1_16_isSet) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16 = type$.SassNumber_2._as(t1).asSlash; + t1 = _1_16; + t1 = type$.Record_2_nullable_Object_and_nullable_Object._is(t1); + } + } else + initial = _null; + if (t1) { + if (_1_16_isSet) + t1 = _1_16; + else { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = true; + } + _1_16 = type$.SassNumber_2._as(t1).asSlash; + t1 = _1_16; + _1_16_isSet = true; + } + if (t1 == null) + t1 = type$.Record_2_nullable_Object_and_nullable_Object._as(t1); + if (_1_16_isSet) + t2 = _1_16; + else { + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + } + _1_16 = type$.SassNumber_2._as(t2).asSlash; + t2 = _1_16; + } + if (t2 == null) + t2 = type$.Record_2_nullable_Object_and_nullable_Object._as(t2); + t3 = A.List_List$of(initial, true, type$.Value_2); + t3.push(t1._0); + t2 = new A._Record_2(A.SassList$0(t3, B.ListSeparator_nbm0, false), t2._1); + t1 = t2; + break $label0$0; + } + t1 = new A._Record_2(input, _null); + break $label0$0; + } + return t1; + }, + _parseNumberOrString0(text) { + var t1, expression, exception; + try { + t1 = A.ScssParser$0(text, null, null); + expression = t1._stylesheet0$_parseSingleProduction$1$1(t1.get$_stylesheet0$_number(), type$.NumberExpression_2); + t1 = A.SassNumber_SassNumber0(expression.value, expression.unit); + return t1; + } catch (exception) { + if (type$.SassFormatException_2._is(A.unwrapException(exception))) + return new A.SassString0(text, false); + else + throw exception; + } + }, + _colorFromChannels0(space, channel0, channel1, channel2, alpha, clamp, fromRgbFunction) { + var t1, t2, whiteness, blackness, t3; + switch (space) { + case B.HslColorSpace_gsm0: + if (channel1 != null) + A._checkPercent0(channel1, "saturation"); + if (channel2 != null) + A._checkPercent0(channel2, "lightness"); + t1 = space._space$_channels; + return A.SassColor_SassColor$hsl0(A.NullableExtension_andThen0(channel0, new A._colorFromChannels_closure1()), A._channelFromValue0(t1[1], A._forcePercent0(channel1), clamp), A._channelFromValue0(t1[2], A._forcePercent0(channel2), clamp), alpha); + case B.HwbColorSpace_06z0: + t1 = channel1 == null; + if (!t1) + channel1.assertUnit$2("%", "whiteness"); + t2 = channel2 == null; + if (!t2) + channel2.assertUnit$2("%", "blackness"); + whiteness = t1 ? null : channel1._number1$_value; + blackness = t2 ? null : channel2._number1$_value; + if (whiteness != null && blackness != null && whiteness + blackness > 100) { + t1 = whiteness + blackness; + whiteness = whiteness / t1 * 100; + blackness = blackness / t1 * 100; + } + return A.SassColor_SassColor$hwb0(A.NullableExtension_andThen0(channel0, new A._colorFromChannels_closure2()), whiteness, blackness, alpha); + case B.RgbColorSpace_mlz0: + t1 = space._space$_channels; + t2 = A._channelFromValue0(t1[0], channel0, clamp); + t3 = A._channelFromValue0(t1[1], channel1, clamp); + t1 = A._channelFromValue0(t1[2], channel2, clamp); + return A.SassColor_SassColor$rgbInternal0(t2, t3, t1, alpha, fromRgbFunction ? B.C__ColorFormatEnum0 : null); + default: + t1 = space._space$_channels; + return A.SassColor_SassColor$forSpaceInternal0(space, A._channelFromValue0(t1[0], channel0, clamp), A._channelFromValue0(t1[1], channel1, clamp), A._channelFromValue0(t1[2], channel2, clamp), alpha); + } + }, + _forcePercent0(number) { + var t1, _0_3; + $label0$0: { + if (number == null) { + t1 = null; + break $label0$0; + } + _0_3 = number.get$numeratorUnits(number); + if (_0_3.length === 1) + t1 = "%" === _0_3[0] && number.get$denominatorUnits(number).length <= 0; + else + t1 = false; + if (t1) { + t1 = number; + break $label0$0; + } + t1 = A.SassNumber_SassNumber0(number._number1$_value, "%"); + break $label0$0; + } + return t1; + }, + _channelFromValue0(channel, value, clamp) { + return A.NullableExtension_andThen0(value, new A._channelFromValue_closure0(channel, clamp)); + }, + _isNone0(value) { + return value instanceof A.SassString0 && !value._string0$_hasQuotes && value._string0$_text.toLowerCase() === "none"; + }, + _channelFunction0($name, space, getter, global, unit) { + return A.BuiltInCallable$function0($name, "$color", new A._channelFunction_closure0(getter, unit, global, $name, space), "sass:color"); + }, + _suggestScaleAndAdjust0(original, adjustment, channelName) { + var t2, oldValue, newValue, factor, t3, suggestion, + channel = channelName === "alpha" ? B.LinearChannel_omH0 : type$.LinearChannel_2._as(B.JSArray_methods.firstWhere$1(B.List_8aB0, new A._suggestScaleAndAdjust_closure0(channelName))), + t1 = channel === B.LinearChannel_omH0; + if (t1) { + t2 = original.alphaOrNull; + oldValue = t2 == null ? 0 : t2; + } else + oldValue = original.toSpace$1(B.HslColorSpace_gsm0).channel$1(0, channelName); + newValue = oldValue + adjustment; + if (adjustment !== 0) { + factor = A._Cell$(); + t2 = channel.max; + if (newValue > t2) + factor.__late_helper$_value = 1; + else { + t3 = channel.min; + if (newValue < t3) + factor.__late_helper$_value = -1; + else if (adjustment > 0) + factor.__late_helper$_value = adjustment / (t2 - oldValue); + else + factor.__late_helper$_value = (newValue - oldValue) / (oldValue - t3); + } + suggestion = "Suggestion" + ("s:\n\ncolor.scale($color, $" + channelName + ": " + A.SassNumber_SassNumber0(factor._readLocal$0() * 100, "%").toString$0(0) + ")\n"); + } else + suggestion = "Suggestion:\n\n"; + return suggestion + ("color.adjust($color, $" + channelName + ": " + A.SassNumber_SassNumber0(adjustment, t1 ? null : "%").toString$0(0) + ")"); + }, + _missingChannelError0(color, channel) { + return A.throwExpression(A.SassScriptException$0(string$.Becaus + color.toString$0(0) + ").", channel)); + }, + _channelName0(value) { + var t1 = value.assertString$1("channel"); + t1.assertQuoted$1("channel"); + return t1._string0$_text; + }, + _function12($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:color"); + }, + global_closure44: function global_closure44() { + }, + global_closure45: function global_closure45() { + }, + global_closure46: function global_closure46() { + }, + global_closure47: function global_closure47() { + }, + global_closure48: function global_closure48() { + }, + global_closure49: function global_closure49() { + }, + global_closure50: function global_closure50() { + }, + global_closure51: function global_closure51() { + }, + global_closure52: function global_closure52() { + }, + global_closure53: function global_closure53() { + }, + global_closure54: function global_closure54() { + }, + global_closure55: function global_closure55() { + }, + global_closure56: function global_closure56() { + }, + global_closure57: function global_closure57() { + }, + global_closure58: function global_closure58() { + }, + global_closure59: function global_closure59() { + }, + global_closure60: function global_closure60() { + }, + global_closure61: function global_closure61() { + }, + global_closure62: function global_closure62() { + }, + global_closure63: function global_closure63() { + }, + global_closure64: function global_closure64() { + }, + global_closure65: function global_closure65() { + }, + global_closure66: function global_closure66() { + }, + global_closure67: function global_closure67() { + }, + global_closure68: function global_closure68() { + }, + global_closure69: function global_closure69() { + }, + global_closure70: function global_closure70() { + }, + global_closure71: function global_closure71() { + }, + global_closure72: function global_closure72() { + }, + global_closure73: function global_closure73() { + }, + global_closure74: function global_closure74() { + }, + global_closure75: function global_closure75() { + }, + global_closure76: function global_closure76() { + }, + global_closure77: function global_closure77() { + }, + global_closure78: function global_closure78() { + }, + global_closure79: function global_closure79() { + }, + global__closure0: function global__closure0() { + }, + global_closure80: function global_closure80() { + }, + global_closure81: function global_closure81() { + }, + global_closure82: function global_closure82() { + }, + global_closure83: function global_closure83() { + }, + global_closure84: function global_closure84() { + }, + global_closure85: function global_closure85() { + }, + global_closure86: function global_closure86() { + }, + module_closure27: function module_closure27() { + }, + module_closure28: function module_closure28() { + }, + module_closure29: function module_closure29() { + }, + module_closure30: function module_closure30() { + }, + module_closure31: function module_closure31() { + }, + module_closure32: function module_closure32() { + }, + module_closure33: function module_closure33() { + }, + module_closure34: function module_closure34() { + }, + module_closure35: function module_closure35() { + }, + module_closure36: function module_closure36() { + }, + module_closure37: function module_closure37() { + }, + module_closure38: function module_closure38() { + }, + module_closure39: function module_closure39() { + }, + module_closure40: function module_closure40() { + }, + module__closure6: function module__closure6() { + }, + module_closure41: function module_closure41() { + }, + module_closure42: function module_closure42() { + }, + module_closure43: function module_closure43() { + }, + module_closure44: function module_closure44() { + }, + module_closure45: function module_closure45() { + }, + module_closure46: function module_closure46() { + }, + module_closure47: function module_closure47() { + }, + module_closure48: function module_closure48() { + }, + module__closure5: function module__closure5(t0) { + this.channelName = t0; + }, + module_closure49: function module_closure49() { + }, + module_closure_toXyzNoMissing0: function module_closure_toXyzNoMissing0() { + }, + module_closure50: function module_closure50() { + }, + _mix_closure0: function _mix_closure0() { + }, + _complement_closure0: function _complement_closure0() { + }, + _adjust_closure0: function _adjust_closure0() { + }, + _scale_closure0: function _scale_closure0() { + }, + _change_closure0: function _change_closure0() { + }, + _ieHexStr_closure0: function _ieHexStr_closure0() { + }, + _ieHexStr_closure_hexString0: function _ieHexStr_closure_hexString0() { + }, + _updateComponents_closure1: function _updateComponents_closure1(t0) { + this.originalColor = t0; + }, + _updateComponents_closure2: function _updateComponents_closure2(t0) { + this._box_0 = t0; + }, + _changeColor_closure0: function _changeColor_closure0(t0) { + this.alphaArg = t0; + }, + _adjustColor_closure0: function _adjustColor_closure0() { + }, + _functionString_closure0: function _functionString_closure0() { + }, + _removedColorFunction_closure0: function _removedColorFunction_closure0(t0, t1, t2) { + this.name = t0; + this.argument = t1; + this.negative = t2; + }, + _rgb_closure0: function _rgb_closure0() { + }, + _hsl_closure0: function _hsl_closure0() { + }, + _parseChannels_closure1: function _parseChannels_closure1() { + }, + _parseChannels_closure2: function _parseChannels_closure2() { + }, + _colorFromChannels_closure1: function _colorFromChannels_closure1() { + }, + _colorFromChannels_closure2: function _colorFromChannels_closure2() { + }, + _channelFromValue_closure0: function _channelFromValue_closure0(t0, t1) { + this.channel = t0; + this.clamp = t1; + }, + _channelFunction_closure0: function _channelFunction_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.getter = t0; + _.unit = t1; + _.global = t2; + _.name = t3; + _.space = t4; + }, + _suggestScaleAndAdjust_closure0: function _suggestScaleAndAdjust_closure0(t0) { + this.channelName = t0; + }, + _constructionSpace(options) { + var t1 = J.getInterceptor$x(options); + if (t1.get$space(options) != null) { + t1 = t1.get$space(options); + t1.toString; + return A.ColorSpace_fromName0(t1, null); + } + if (t1.get$red(options) != null) + return B.RgbColorSpace_mlz0; + if (t1.get$saturation(options) != null) + return B.HslColorSpace_gsm0; + if (t1.get$whiteness(options) != null) + return B.HwbColorSpace_06z0; + throw A.wrapException("No color space found"); + }, + _toSpace($self, space) { + return $self.toSpace$1(A.ColorSpace_fromName0(space == null ? $self._color0$_space.name : space, null)); + }, + _checkNullAlphaDeprecation(options) { + var t1 = J.getInterceptor$x(options), + t2 = t1.get$alpha(options); + if (!A._asBool($.$get$_isUndefined().call$1(t2)) && t1.get$alpha(options) == null && t1.get$space(options) == null) + A.warnForDeprecationFromApi(string$.Passin_, B.Deprecation_omH); + }, + colorClass_closure: function colorClass_closure() { + }, + colorClass__closure: function colorClass__closure() { + }, + colorClass__closure0: function colorClass__closure0() { + }, + colorClass__closure1: function colorClass__closure1() { + }, + colorClass__closure2: function colorClass__closure2() { + }, + colorClass__closure3: function colorClass__closure3() { + }, + colorClass__closure4: function colorClass__closure4() { + }, + colorClass__closure5: function colorClass__closure5() { + }, + colorClass__closure6: function colorClass__closure6() { + }, + colorClass__closure7: function colorClass__closure7() { + }, + colorClass__closure8: function colorClass__closure8() { + }, + colorClass___closure: function colorClass___closure(t0) { + this.key = t0; + }, + colorClass__closure_changedValue: function colorClass__closure_changedValue(t0, t1) { + this.color = t0; + this.options = t1; + }, + colorClass__closure9: function colorClass__closure9() { + }, + colorClass__closure10: function colorClass__closure10() { + }, + colorClass__closure11: function colorClass__closure11() { + }, + colorClass__closure12: function colorClass__closure12() { + }, + colorClass__closure13: function colorClass__closure13() { + }, + colorClass__closure14: function colorClass__closure14() { + }, + colorClass__closure15: function colorClass__closure15() { + }, + colorClass__closure16: function colorClass__closure16() { + }, + colorClass__closure17: function colorClass__closure17() { + }, + colorClass__closure18: function colorClass__closure18() { + }, + colorClass__closure19: function colorClass__closure19() { + }, + colorClass__closure20: function colorClass__closure20() { + }, + colorClass__closure21: function colorClass__closure21() { + }, + colorClass__closure22: function colorClass__closure22() { + }, + _Channels: function _Channels() { + }, + _ConstructionOptions: function _ConstructionOptions() { + }, + _ChannelOptions: function _ChannelOptions() { + }, + _ToGamutOptions: function _ToGamutOptions() { + }, + _InterpolationOptions: function _InterpolationOptions() { + }, + _NodeSassColor: function _NodeSassColor() { + }, + legacyColorClass_closure: function legacyColorClass_closure() { + }, + legacyColorClass__closure: function legacyColorClass__closure() { + }, + legacyColorClass_closure0: function legacyColorClass_closure0() { + }, + legacyColorClass_closure1: function legacyColorClass_closure1() { + }, + legacyColorClass_closure2: function legacyColorClass_closure2() { + }, + legacyColorClass_closure3: function legacyColorClass_closure3() { + }, + legacyColorClass_closure4: function legacyColorClass_closure4() { + }, + legacyColorClass_closure5: function legacyColorClass_closure5() { + }, + legacyColorClass_closure6: function legacyColorClass_closure6() { + }, + legacyColorClass_closure7: function legacyColorClass_closure7() { + }, + SassColor_SassColor$rgb0(red, green, blue, alpha) { + return A.SassColor_SassColor$rgbInternal0(red, green, blue, alpha, null); + }, + SassColor_SassColor$rgbInternal0(red, green, blue, alpha, format) { + var _null = null, + t1 = red == null ? _null : red, + t2 = green == null ? _null : green, + t3 = blue == null ? _null : blue; + return A.SassColor$_forSpace0(B.RgbColorSpace_mlz0, t1, t2, t3, alpha == null ? _null : alpha, format); + }, + SassColor_SassColor$hsl0(hue, saturation, lightness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = saturation == null ? _null : saturation, + t3 = lightness == null ? _null : lightness; + return A.SassColor_SassColor$forSpaceInternal0(B.HslColorSpace_gsm0, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$hwb0(hue, whiteness, blackness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = whiteness == null ? _null : whiteness, + t3 = blackness == null ? _null : blackness; + return A.SassColor_SassColor$forSpaceInternal0(B.HwbColorSpace_06z0, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$forSpaceInternal0(space, channel0, channel1, channel2, alpha) { + var t1, t2, _null = null; + $label0$0: { + if (B.HslColorSpace_gsm0 === space) { + t1 = channel1 == null; + t2 = A.SassColor__normalizeHue0(channel0, !t1 && channel1 < 0 && !A.fuzzyEquals0(channel1, 0)); + t2 = A.SassColor$_forSpace0(space, t2, t1 ? _null : Math.abs(channel1), channel2, alpha, _null); + t1 = t2; + break $label0$0; + } + if (B.HwbColorSpace_06z0 === space) { + t1 = A.SassColor$_forSpace0(space, A.SassColor__normalizeHue0(channel0, false), channel1, channel2, alpha, _null); + break $label0$0; + } + if (B.LchColorSpace_wv80 === space || B.OklchColorSpace_li80 === space) { + t1 = channel1 == null; + t2 = t1 ? _null : Math.abs(channel1); + t2 = A.SassColor$_forSpace0(space, channel0, t2, A.SassColor__normalizeHue0(channel2, !t1 && channel1 < 0 && !A.fuzzyEquals0(channel1, 0)), alpha, _null); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor$_forSpace0(space, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + return t1; + }, + SassColor$_forSpace0(_space, channel0OrNull, channel1OrNull, channel2OrNull, alpha, format) { + return new A.SassColor0(_space, channel0OrNull, channel1OrNull, channel2OrNull, format, A.NullableExtension_andThen0(alpha, new A.SassColor$_forSpace_closure0())); + }, + SassColor__normalizeHue0(hue, invert) { + var t1, t2; + if (hue == null) + return hue; + t1 = B.JSNumber_methods.$mod(hue, 360); + t2 = invert ? 180 : 0; + return B.JSNumber_methods.$mod(t1 + 360 + t2, 360); + }, + SassColor0: function SassColor0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._color0$_space = t0; + _.channel0OrNull = t1; + _.channel1OrNull = t2; + _.channel2OrNull = t3; + _.format = t4; + _.alphaOrNull = t5; + }, + SassColor$_forSpace_closure0: function SassColor$_forSpace_closure0() { + }, + _ColorFormatEnum0: function _ColorFormatEnum0() { + }, + SpanColorFormat0: function SpanColorFormat0(t0) { + this._color0$_span = t0; + }, + Combinator0: function Combinator0(t0, t1) { + this._combinator0$_text = t0; + this._name = t1; + }, + ModifiableCssComment0: function ModifiableCssComment0(t0, t1) { + var _ = this; + _.text = t0; + _.span = t1; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + compile0(path, options) { + var color, ascii, logger, result, error, stackTrace, t1, color0, ascii0, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, exception, _null = null; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The compile() method is only available in Node.js.")); + t1 = options == null; + color0 = t1 ? _null : J.get$alertColor$x(options); + color = color0 == null ? A.hasTerminal0() : color0; + ascii0 = t1 ? _null : J.get$alertAscii$x(options); + ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0; + t2 = t1 ? _null : J.get$logger$x(options); + t3 = ascii; + if (t3 == null) + t3 = $._glyphs === B.C_AsciiGlyphSet; + logger = new A.JSToDartLogger(t2, new A.StderrLogger0(color), t3); + try { + t2 = t1 ? _null : J.get$loadPaths$x(options); + t3 = t1 ? _null : J.get$quietDeps$x(options); + if (t3 == null) + t3 = false; + t4 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); + t5 = t1 ? _null : J.get$verbose$x(options); + if (t5 == null) + t5 = false; + t6 = t1 ? _null : J.get$charset$x(options); + if (t6 == null) + t6 = true; + t7 = t1 ? _null : J.get$sourceMap$x(options); + if (t7 == null) + t7 = false; + t8 = logger; + if (t1) + t9 = _null; + else { + t9 = J.get$importers$x(options); + t9 = t9 == null ? _null : J.map$1$1$ax(t9, A.compile___parseImporter$closure(), type$.Importer); + } + t10 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); + t11 = t1 ? _null : J.get$fatalDeprecations$x(options); + t11 = A.parseDeprecations(logger, t11, true); + t12 = t1 ? _null : J.get$silenceDeprecations$x(options); + t12 = A.parseDeprecations(logger, t12, false); + t13 = t1 ? _null : J.get$futureDeprecations$x(options); + t13 = A.parseDeprecations(logger, t13, false); + result = A.compile(path, t6, t11, new A.CastList(t10, A._arrayInstanceType(t10)._eval$1("CastList<1,Callable>")), t13, A.ImportCache$0(t9, t2, A.ImportCache_wrapLogger0(t8, t12, t11, t13, color), _null), _null, _null, t8, _null, t3, t12, t7, t4, _null, true, t5); + t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); + if (t1 == null) + t1 = false; + t1 = A._convertResult(result, t1); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwNodeException(error, ascii, color, stackTrace); + } else + throw exception; + } + }, + compileString0(text, options) { + var logger, result, error, stackTrace, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, exception, _null = null, + t1 = options == null, + color0 = t1 ? _null : J.get$alertColor$x(options), + color = color0 == null ? A.hasTerminal0() : color0, + ascii0 = t1 ? _null : J.get$alertAscii$x(options), + ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0, + t2 = t1 ? _null : J.get$logger$x(options), + t3 = ascii; + if (t3 == null) + t3 = $._glyphs === B.C_AsciiGlyphSet; + logger = new A.JSToDartLogger(t2, new A.StderrLogger0(color), t3); + try { + t2 = A.parseSyntax(t1 ? _null : J.get$syntax$x(options)); + t3 = t1 ? _null : A.NullableExtension_andThen0(J.get$url$x(options), A.utils3__jsToDartUrl$closure()); + t4 = t1 ? _null : J.get$loadPaths$x(options); + t5 = t1 ? _null : J.get$quietDeps$x(options); + if (t5 == null) + t5 = false; + t6 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); + t7 = t1 ? _null : J.get$verbose$x(options); + if (t7 == null) + t7 = false; + t8 = t1 ? _null : J.get$charset$x(options); + if (t8 == null) + t8 = true; + t9 = t1 ? _null : J.get$sourceMap$x(options); + if (t9 == null) + t9 = false; + t10 = logger; + if (t1) + t11 = _null; + else { + t11 = J.get$importers$x(options); + t11 = t11 == null ? _null : J.map$1$1$ax(t11, A.compile___parseImporter$closure(), type$.Importer); + } + t12 = t1 ? _null : A.NullableExtension_andThen0(J.get$importer$x(options), A.compile___parseImporter$closure()); + if (t12 == null) + t12 = (t1 ? _null : J.get$url$x(options)) == null ? new A.NoOpImporter0() : _null; + t13 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); + t14 = t1 ? _null : J.get$fatalDeprecations$x(options); + t14 = A.parseDeprecations(logger, t14, true); + t15 = t1 ? _null : J.get$silenceDeprecations$x(options); + t15 = A.parseDeprecations(logger, t15, false); + t16 = t1 ? _null : J.get$futureDeprecations$x(options); + t16 = A.parseDeprecations(logger, t16, false); + result = A.compileString(text, t8, t14, new A.CastList(t13, A._arrayInstanceType(t13)._eval$1("CastList<1,Callable>")), t16, A.ImportCache$0(t11, t4, A.ImportCache_wrapLogger0(t10, t15, t14, t16, color), _null), t12, _null, _null, t10, _null, t5, t15, t9, t6, t2, t3, true, t7); + t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); + if (t1 == null) + t1 = false; + t1 = A._convertResult(result, t1); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwNodeException(error, ascii, color, stackTrace); + } else + throw exception; + } + }, + compileAsync1(path, options) { + var t1, color, ascii; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The compileAsync() method is only available in Node.js.")); + t1 = options == null; + color = t1 ? null : J.get$alertColor$x(options); + if (color == null) + color = A.hasTerminal0(); + ascii = t1 ? null : J.get$alertAscii$x(options); + if (ascii == null) + ascii = $._glyphs === B.C_AsciiGlyphSet; + t1 = t1 ? null : J.get$logger$x(options); + return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileAsync_closure(path, color, options, new A.JSToDartLogger(t1, new A.StderrLogger0(color), ascii)).call$0()), ascii, color); + }, + compileStringAsync1(text, options) { + var ascii, + t1 = options == null, + color = t1 ? null : J.get$alertColor$x(options); + if (color == null) + color = A.hasTerminal0(); + ascii = t1 ? null : J.get$alertAscii$x(options); + if (ascii == null) + ascii = $._glyphs === B.C_AsciiGlyphSet; + t1 = t1 ? null : J.get$logger$x(options); + return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileStringAsync_closure(text, options, color, new A.JSToDartLogger(t1, new A.StderrLogger0(color), ascii)).call$0()), ascii, color); + }, + _convertResult(result, includeSourceContents) { + var loadedUrls, + t1 = result._compile_result$_serialize, + t2 = t1._1, + sourceMap = t2 == null ? null : t2.toJson$1$includeSourceContents(includeSourceContents); + if (type$.Map_String_dynamic._is(sourceMap) && !sourceMap.containsKey$1("sources")) + sourceMap.$indexSet(0, "sources", A._setArrayType([], type$.JSArray_String)); + loadedUrls = A.toJSArray(result._evaluate._0.map$1$1(0, A.utils3__dartToJSUrl$closure(), type$.nullable_Object)); + t1 = t1._0; + return sourceMap == null ? {css: t1, loadedUrls: loadedUrls} : {css: t1, sourceMap: A.jsify0(sourceMap), loadedUrls: loadedUrls}; + }, + _wrapAsyncSassExceptions(promise, ascii, color) { + return J.then$2$x(promise, null, A.allowInterop(new A._wrapAsyncSassExceptions_closure(color, ascii))); + }, + _parseOutputStyle0(style) { + var t1; + $label0$0: { + if (style == null || "expanded" === style) { + t1 = B.OutputStyle_00; + break $label0$0; + } + if ("compressed" === style) { + t1 = B.OutputStyle_10; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown output style "' + A.S(style) + '".')); + } + return t1; + }, + _parseAsyncImporter(importer) { + var t1, canonicalize, load, _0_0; + if (importer instanceof A.NodePackageImporter0) + return importer; + if (importer == null) + A.jsThrow(new self.Error("Importers may not be null.")); + type$.JSImporter._as(importer); + t1 = J.getInterceptor$x(importer); + canonicalize = t1.get$canonicalize(importer); + load = t1.get$load(importer); + _0_0 = t1.get$findFileUrl(importer); + if (_0_0 != null) + if (canonicalize != null || load != null) + A.jsThrow(new self.Error(string$.An_impa)); + else + return new A.JSToDartAsyncFileImporter(_0_0); + else if (canonicalize == null || load == null) + A.jsThrow(new self.Error(string$.An_impu)); + else { + t1 = A._normalizeNonCanonicalSchemes(t1.get$nonCanonicalScheme(importer)); + t1 = t1 == null ? B.Set_empty7 : A.Set_Set$unmodifiable(t1, type$.String); + t1.forEach$1(0, A.utils4__validateUrlScheme$closure()); + return new A.JSToDartAsyncImporter(canonicalize, load, t1); + } + }, + _parseImporter0(importer) { + var t1, canonicalize, load, _0_0; + if (importer instanceof A.NodePackageImporter0) + return importer; + if (importer == null) + A.jsThrow(new self.Error("Importers may not be null.")); + type$.JSImporter._as(importer); + t1 = J.getInterceptor$x(importer); + canonicalize = t1.get$canonicalize(importer); + load = t1.get$load(importer); + _0_0 = t1.get$findFileUrl(importer); + if (_0_0 != null) + if (canonicalize != null || load != null) + A.jsThrow(new self.Error(string$.An_impa)); + else + return new A.JSToDartFileImporter(_0_0); + else if (canonicalize == null || load == null) + A.jsThrow(new self.Error(string$.An_impu)); + else { + t1 = A._normalizeNonCanonicalSchemes(t1.get$nonCanonicalScheme(importer)); + t1 = t1 == null ? B.Set_empty7 : A.Set_Set$unmodifiable(t1, type$.String); + t1.forEach$1(0, A.utils4__validateUrlScheme$closure()); + return new A.JSToDartImporter(canonicalize, load, t1); + } + }, + _normalizeNonCanonicalSchemes(schemes) { + var t1; + $label0$0: { + if (typeof schemes == "string") { + t1 = A._setArrayType([schemes], type$.JSArray_String); + break $label0$0; + } + if (type$.List_dynamic._is(schemes)) { + t1 = J.cast$1$0$ax(schemes, type$.String); + break $label0$0; + } + if (schemes == null) { + t1 = null; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('nonCanonicalScheme must be a string or list of strings, was "' + A.S(schemes) + '"')); + } + return t1; + }, + _simplifyValue(value) { + var _0_1, t1, t2, _0_4, _0_3, _0_4_isSet, _0_5, _0_40, _0_8, first, _0_10, min, _null = null; + $label1$1: { + if (value instanceof A.SassCalculation0) { + _0_1 = value.name; + t1 = value.$arguments; + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>"); + _0_4 = A.List_List$of(new A.MappedListIterable(t1, A.compile___simplifyCalcArg$closure(), t2), true, t2._eval$1("ListIterable.E")); + $label0$0: { + _0_3 = "calc" === _0_1; + _0_4_isSet = _0_3; + _0_5 = _null; + _0_40 = _null; + if (_0_4_isSet) { + _0_5 = _0_4.length; + t1 = _0_5; + _0_40 = _0_4; + t1 = t1 === 1; + } else + t1 = false; + if (t1) { + _0_8 = (_0_4_isSet ? _0_40 : _0_4)[0]; + first = _0_8; + type$.Value_2._as(first); + t1 = first; + break $label0$0; + } + if (_0_3) + A.throwExpression(A.ArgumentError$("calc() requires exactly one argument.", _null)); + _0_10 = "clamp" === _0_1; + t1 = _0_10; + if (t1) { + if (_0_4_isSet) + t1 = _0_5; + else { + _0_5 = _0_4.length; + t1 = _0_5; + _0_40 = _0_4; + _0_4_isSet = true; + } + t1 = t1 === 3; + } else + t1 = false; + if (t1) { + if (_0_4_isSet) + t1 = _0_40; + else { + t1 = _0_4; + _0_40 = t1; + _0_4_isSet = true; + } + _0_8 = t1[0]; + min = _0_8; + if (_0_4_isSet) + t1 = _0_40; + else { + t1 = _0_4; + _0_40 = t1; + _0_4_isSet = true; + } + value = t1[1]; + t1 = A.SassCalculation_clamp0(min, value, (_0_4_isSet ? _0_40 : _0_4)[2]); + break $label0$0; + } + if (_0_10) + A.throwExpression(A.ArgumentError$("clamp() requires exactly 3 arguments.", _null)); + if ("min" === _0_1) { + t1 = A.SassCalculation_min0(_0_4_isSet ? _0_40 : _0_4); + break $label0$0; + } + if ("max" === _0_1) { + t1 = A.SassCalculation_max0(_0_4_isSet ? _0_40 : _0_4); + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$('"' + _0_1 + '" is not a recognized calculation type.', _null)); + } + break $label1$1; + } + t1 = value; + break $label1$1; + } + return t1; + }, + _simplifyCalcArg(value) { + var t1; + $label0$0: { + if (value instanceof A.SassCalculation0) { + t1 = A._simplifyValue(value); + break $label0$0; + } + if (value instanceof A.CalculationOperation0) { + t1 = A.SassCalculation_operateInternal0(value._calculation0$_operator, A._simplifyCalcArg(value._calculation0$_left), A._simplifyCalcArg(value._calculation0$_right), false, true); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + }, + _parseFunctions0(functions, asynch) { + var result; + if (functions == null) + return B.List_empty26; + result = A._setArrayType([], type$.JSArray_AsyncCallable_2); + A.jsForEach(functions, new A._parseFunctions_closure0(asynch, result)); + return result; + }, + compileAsync_closure: function compileAsync_closure(t0, t1, t2, t3) { + var _ = this; + _.path = t0; + _.color = t1; + _.options = t2; + _.logger = t3; + }, + compileAsync__closure: function compileAsync__closure() { + }, + compileStringAsync_closure: function compileStringAsync_closure(t0, t1, t2, t3) { + var _ = this; + _.text = t0; + _.options = t1; + _.color = t2; + _.logger = t3; + }, + compileStringAsync__closure: function compileStringAsync__closure() { + }, + compileStringAsync__closure0: function compileStringAsync__closure0() { + }, + _wrapAsyncSassExceptions_closure: function _wrapAsyncSassExceptions_closure(t0, t1) { + this.color = t0; + this.ascii = t1; + }, + _parseFunctions_closure0: function _parseFunctions_closure0(t0, t1) { + this.asynch = t0; + this.result = t1; + }, + _parseFunctions__closure2: function _parseFunctions__closure2(t0, t1) { + this.callback = t0; + this.callable = t1; + }, + _parseFunctions___closure6: function _parseFunctions___closure6(t0, t1) { + this.callback = t0; + this.$arguments = t1; + }, + _parseFunctions__closure3: function _parseFunctions__closure3(t0, t1) { + this.callback = t0; + this.callable = t1; + }, + _parseFunctions___closure5: function _parseFunctions___closure5(t0, t1) { + this.callback = t0; + this.$arguments = t1; + }, + nodePackageImporterClass_closure: function nodePackageImporterClass_closure() { + }, + nodePackageImporterClass__closure: function nodePackageImporterClass__closure() { + }, + compile(path, charset, fatalDeprecations, functions, futureDeprecations, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, useSpaces, verbose) { + var t3, t4, t0, stylesheet, result, _null = null, + t1 = type$.Deprecation_3, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + t1 = nodeImporter == null; + if (t1) + t2 = syntax == null || syntax === A.Syntax_forPath0(path); + else + t2 = false; + if (t2) { + if (importCache == null) + importCache = A.ImportCache$none(logger); + t2 = $.$get$FilesystemImporter_cwd0(); + t3 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t3 == null ? _null : J.get$platform$x(t3), "win32")) { + t3 = A.isNodeJs() ? self.process : _null; + t3 = J.$eq$(t3 == null ? _null : J.get$platform$x(t3), "darwin"); + } else + t3 = true; + if (t3) { + t3 = $.$get$context(); + t4 = A._realCasePath0(A.absolute(t3.normalize$1(path), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t3 = $.$get$context(); + t4 = t3.canonicalize$1(0, path); + t0 = t4; + t4 = t3; + t3 = t0; + } + t4 = importCache.importCanonical$3$originalUrl(t2, t4.toUri$1(t3), t4.toUri$1(path)); + t4.toString; + stylesheet = t4; + } else { + t2 = A.readFile0(path); + t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; + stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, logger, $.$get$context().toUri$1(path)); + } + result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, $.$get$FilesystemImporter_cwd0(), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); + logger.summarize$1$js(!t1); + return result; + }, + compileString(source, charset, fatalDeprecations, functions, futureDeprecations, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, url, useSpaces, verbose) { + var t3, t4, stylesheet, result, + t1 = type$.Deprecation_3, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_scss0 : syntax, logger, url); + if (importer == null) + t1 = A.isBrowser() ? new A.NoOpImporter0() : $.$get$FilesystemImporter_cwd0(); + else + t1 = importer; + result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, t1, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); + logger.summarize$1$js(nodeImporter != null); + return result; + }, + _compileStylesheet1(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var evaluateResult, serializeResult, resultSourceMap; + if (nodeImporter != null) + A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_EuK, string$.The_le, null, null); + evaluateResult = A._EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet); + serializeResult = A.serialize0(evaluateResult._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, useSpaces); + resultSourceMap = serializeResult._1; + if (resultSourceMap != null && importCache != null) + A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure1(stylesheet, importCache)); + return new A.CompileResult0(evaluateResult, serializeResult); + }, + _compileStylesheet_closure1: function _compileStylesheet_closure1(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + CompileOptions: function CompileOptions() { + }, + CompileStringOptions: function CompileStringOptions() { + }, + NodeCompileResult: function NodeCompileResult() { + }, + CompileResult0: function CompileResult0(t0, t1) { + this._evaluate = t0; + this._compile_result$_serialize = t1; + }, + initCompiler() { + return new A.Compiler(); + }, + initAsyncCompiler() { + return A.futureToPromise0(new A.initAsyncCompiler_closure().call$0()); + }, + Compiler: function Compiler() { + this._disposed = false; + }, + AsyncCompiler: function AsyncCompiler(t0) { + this.compilations = t0; + this._disposed = false; + }, + AsyncCompiler_addCompilation_closure: function AsyncCompiler_addCompilation_closure() { + }, + compilerClass_closure: function compilerClass_closure() { + }, + compilerClass__closure: function compilerClass__closure() { + }, + compilerClass__closure0: function compilerClass__closure0() { + }, + compilerClass__closure1: function compilerClass__closure1() { + }, + compilerClass__closure2: function compilerClass__closure2() { + }, + asyncCompilerClass_closure: function asyncCompilerClass_closure() { + }, + asyncCompilerClass__closure: function asyncCompilerClass__closure() { + }, + asyncCompilerClass__closure0: function asyncCompilerClass__closure0() { + }, + asyncCompilerClass__closure1: function asyncCompilerClass__closure1() { + }, + asyncCompilerClass__closure2: function asyncCompilerClass__closure2() { + }, + asyncCompilerClass___closure: function asyncCompilerClass___closure(t0) { + this.self = t0; + }, + initAsyncCompiler_closure: function initAsyncCompiler_closure() { + }, + ComplexSassNumber0: function ComplexSassNumber0(t0, t1, t2, t3) { + var _ = this; + _._complex0$_numeratorUnits = t0; + _._complex0$_denominatorUnits = t1; + _._number1$_value = t2; + _.hashCache = null; + _.asSlash = t3; + }, + ComplexSelector$0(leadingCombinators, components, span, lineBreak) { + var t1 = A.List_List$unmodifiable(leadingCombinators, type$.CssValue_Combinator_2), + t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent_2); + if (t1.length === 0 && t2.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + return new A.ComplexSelector0(t1, t2, lineBreak, span); + }, + ComplexSelector0: function ComplexSelector0(t0, t1, t2, t3) { + var _ = this; + _.leadingCombinators = t0; + _.components = t1; + _.lineBreak = t2; + _._complex$__ComplexSelector_specificity_FI = $; + _.span = t3; + }, + ComplexSelector_specificity_closure0: function ComplexSelector_specificity_closure0() { + }, + ComplexSelectorComponent0: function ComplexSelectorComponent0(t0, t1, t2) { + this.selector = t0; + this.combinators = t1; + this.span = t2; + }, + ComplexSelectorComponent_toString_closure0: function ComplexSelectorComponent_toString_closure0() { + }, + CompoundSelector$0(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector_2); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.CompoundSelector0(t1, span); + }, + CompoundSelector0: function CompoundSelector0(t0, t1) { + var _ = this; + _.components = t0; + _._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = _._compound$__CompoundSelector_specificity_FI = $; + _.span = t1; + }, + CompoundSelector_specificity_closure0: function CompoundSelector_specificity_closure0() { + }, + CompoundSelector_hasComplicatedSuperselectorSemantics_closure0: function CompoundSelector_hasComplicatedSuperselectorSemantics_closure0() { + }, + Configuration0: function Configuration0(t0, t1) { + this._configuration0$_values = t0; + this._configuration0$__originalConfiguration = t1; + }, + ExplicitConfiguration0: function ExplicitConfiguration0(t0, t1, t2) { + this.nodeWithSpan = t0; + this._configuration0$_values = t1; + this._configuration0$__originalConfiguration = t2; + }, + ConfiguredValue0: function ConfiguredValue0(t0, t1, t2) { + this.value = t0; + this.configurationSpan = t1; + this.assignmentNode = t2; + }, + ConfiguredVariable0: function ConfiguredVariable0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.expression = t1; + _.isGuarded = t2; + _.span = t3; + }, + ContentBlock$0($arguments, children, span) { + var _s8_ = "@content", + t1 = A.stringReplaceAllUnchecked(_s8_, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.ContentBlock0(t1, _s8_, $arguments, span, t2, t3); + }, + ContentBlock0: function ContentBlock0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + ContentRule0: function ContentRule0(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + _disallowedFunctionNames_closure0: function _disallowedFunctionNames_closure0() { + }, + CssParser0: function CssParser0(t0, t1, t2, t3) { + var _ = this; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + _._parser1$_interpolationMap = t3; + }, + DebugRule0: function DebugRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + ModifiableCssDeclaration$0($name, value, span, interleavedRules, parsedAsCustomProperty, trace, valueSpanForMap) { + var t3, + t1 = interleavedRules == null ? B.List_empty23 : A.List_List$unmodifiable(interleavedRules, type$.CssStyleRule_2), + t2 = valueSpanForMap == null ? value.span : valueSpanForMap; + if (parsedAsCustomProperty) + if (!J.startsWith$1$s($name.value, "--")) + A.throwExpression(A.ArgumentError$(string$.parsed, null)); + else { + t3 = value.value; + if (!(t3 instanceof A.SassString0)) + A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeTypeOfDartObject(t3).toString$0(0) + ").", null)); + } + return new A.ModifiableCssDeclaration0($name, value, parsedAsCustomProperty, t1, trace, t2, span); + }, + ModifiableCssDeclaration0: function ModifiableCssDeclaration0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.name = t0; + _.value = t1; + _.parsedAsCustomProperty = t2; + _.interleavedRules = t3; + _.trace = t4; + _.valueSpanForMap = t5; + _.span = t6; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + Declaration$0($name, value, span) { + return new A.Declaration0($name, value, span, null, false); + }, + Declaration$nested0($name, children, span, value) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.Declaration0($name, value, span, t1, t2); + }, + Declaration0: function Declaration0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + SupportsDeclaration0: function SupportsDeclaration0(t0, t1, t2) { + this.name = t0; + this.value = t1; + this.span = t2; + }, + Deprecation_fromId0(id) { + return A.IterableExtension_firstWhereOrNull(B.List_IYb, new A.Deprecation_fromId_closure0(id)); + }, + Deprecation_forVersion0(version) { + var t2, _i, deprecation, $self, t3, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation_3); + for (t2 = A.VersionRange_VersionRange(true, version).get$allows(), _i = 0; _i < 24; ++_i) { + deprecation = B.List_IYb[_i]; + $self = deprecation._deprecation$_deprecatedIn; + t3 = $self == null ? null : A.Version___parse_tearOff($self); + t3 = t3 == null ? null : t2.call$1(t3); + if (t3 == null ? false : t3) + t1.add$1(0, deprecation); + } + return t1; + }, + Deprecation0: function Deprecation0(t0, t1, t2, t3, t4) { + var _ = this; + _.id = t0; + _._deprecation$_deprecatedIn = t1; + _.description = t2; + _.isFuture = t3; + _._name = t4; + }, + Deprecation_fromId_closure0: function Deprecation_fromId_closure0(t0) { + this.id = t0; + }, + DeprecationProcessingLogger0: function DeprecationProcessingLogger0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._deprecation_processing$_warningCounts = t0; + _._deprecation_processing$_inner = t1; + _.silenceDeprecations = t2; + _.fatalDeprecations = t3; + _.futureDeprecations = t4; + _.limitRepetition = t5; + }, + DeprecationProcessingLogger_summarize_closure1: function DeprecationProcessingLogger_summarize_closure1() { + }, + DeprecationProcessingLogger_summarize_closure2: function DeprecationProcessingLogger_summarize_closure2() { + }, + parseDeprecations(logger, deprecations, supportVersions) { + if (deprecations == null) + return null; + return new A.parseDeprecations_closure(deprecations, logger, supportVersions).call$0(); + }, + Deprecation1: function Deprecation1() { + }, + deprecations_closure: function deprecations_closure(t0) { + this.deprecation = t0; + }, + parseDeprecations_closure: function parseDeprecations_closure(t0, t1, t2) { + this.deprecations = t0; + this.logger = t1; + this.supportVersions = t2; + }, + versionClass_closure: function versionClass_closure() { + }, + versionClass__closure: function versionClass__closure() { + }, + versionClass__closure0: function versionClass__closure0() { + }, + DisplayP3ColorSpace0: function DisplayP3ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + DynamicImport0: function DynamicImport0(t0, t1) { + this.urlString = t0; + this.span = t1; + }, + EachRule$0(variables, list, children, span) { + var t1 = A.List_List$unmodifiable(variables, type$.String), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.EachRule0(t1, list, span, t2, t3); + }, + EachRule0: function EachRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.variables = t0; + _.list = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule_toString_closure0: function EachRule_toString_closure0() { + }, + EmptyExtensionStore0: function EmptyExtensionStore0() { + }, + Environment$0() { + var t1 = type$.String, + t2 = type$.Module_Callable_2, + t3 = type$.AstNode_2, + t4 = type$.int, + t5 = type$.Callable_2, + t6 = type$.JSArray_Map_String_Callable_2; + return new A.Environment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); + }, + Environment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { + var t1 = type$.String, + t2 = type$.int; + return new A.Environment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); + }, + _EnvironmentModule__EnvironmentModule1(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty4; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_Callable_2, t3 = type$.List_CssComment_2, t4 = A.MapExtensions_get_pairs0(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment_2; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable1(forwarded); + t3 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure11(), type$.Map_String_Value_2), type$.Value_2); + t4 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure12(), type$.Map_String_AstNode_2), type$.AstNode_2); + t5 = type$.Map_String_Callable_2; + t6 = type$.Callable_2; + t7 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure13(), t5), t6); + t6 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure14(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure15()); + return A._EnvironmentModule$_1(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure16())); + }, + _EnvironmentModule__makeModulesByVariable1(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty10; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable_2); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule1) { + for (t3 = t2._environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll0(modulesByVariable, t5.get$keys(t5), t4); + } + A.setAll0(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._environment0$_environment._environment0$_variables)), t2); + } else { + t3 = t2.get$variables(); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap1(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$0(t1, type$.String, $V); + }, + _EnvironmentModule$_1(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule1(_environment._environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + Environment0: function Environment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._environment0$_modules = t0; + _._environment0$_namespaceNodes = t1; + _._environment0$_globalModules = t2; + _._environment0$_importedModules = t3; + _._environment0$_forwardedModules = t4; + _._environment0$_nestedForwardedModules = t5; + _._environment0$_allModules = t6; + _._environment0$_variables = t7; + _._environment0$_variableNodes = t8; + _._environment0$_variableIndices = t9; + _._environment0$_functions = t10; + _._environment0$_functionIndices = t11; + _._environment0$_mixins = t12; + _._environment0$_mixinIndices = t13; + _._environment0$_content = t14; + _._environment0$_inMixin = false; + _._environment0$_inSemiGlobalScope = true; + _._environment0$_lastVariableIndex = _._environment0$_lastVariableName = null; + }, + Environment__getVariableFromGlobalModule_closure0: function Environment__getVariableFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment_setVariable_closure2: function Environment_setVariable_closure2(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment_setVariable_closure3: function Environment_setVariable_closure3(t0) { + this.name = t0; + }, + Environment_setVariable_closure4: function Environment_setVariable_closure4(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment__getFunctionFromGlobalModule_closure0: function Environment__getFunctionFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment__getMixinFromGlobalModule_closure0: function Environment__getMixinFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment_toModule_closure0: function Environment_toModule_closure0() { + }, + Environment_toDummyModule_closure0: function Environment_toDummyModule_closure0() { + }, + _EnvironmentModule1: function _EnvironmentModule1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._environment0$_environment = t10; + _._environment0$_modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure11: function _EnvironmentModule__EnvironmentModule_closure11() { + }, + _EnvironmentModule__EnvironmentModule_closure12: function _EnvironmentModule__EnvironmentModule_closure12() { + }, + _EnvironmentModule__EnvironmentModule_closure13: function _EnvironmentModule__EnvironmentModule_closure13() { + }, + _EnvironmentModule__EnvironmentModule_closure14: function _EnvironmentModule__EnvironmentModule_closure14() { + }, + _EnvironmentModule__EnvironmentModule_closure15: function _EnvironmentModule__EnvironmentModule_closure15() { + }, + _EnvironmentModule__EnvironmentModule_closure16: function _EnvironmentModule__EnvironmentModule_closure16() { + }, + ErrorRule0: function ErrorRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + _EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t4, + t1 = type$.Uri, + t2 = type$.Module_Callable_2, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode_2); + if (importCache == null) + t4 = nodeImporter == null ? A.ImportCache$none(logger) : null; + else + t4 = importCache; + t1 = new A._EvaluateVisitor1(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.Environment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor1: function _EvaluateVisitor1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._evaluate0$_importCache = t0; + _._nodeImporter = t1; + _._evaluate0$_builtInFunctions = t2; + _._evaluate0$_builtInModules = t3; + _._evaluate0$_modules = t4; + _._evaluate0$_moduleConfigurations = t5; + _._evaluate0$_moduleNodes = t6; + _._evaluate0$_logger = t7; + _._evaluate0$_warningsEmitted = t8; + _._evaluate0$_quietDeps = t9; + _._evaluate0$_sourceMap = t10; + _._evaluate0$_environment = t11; + _._evaluate0$_declarationName = _._evaluate0$__parent = _._evaluate0$_mediaQuerySources = _._evaluate0$_mediaQueries = _._evaluate0$_styleRuleIgnoringAtRoot = null; + _._evaluate0$_member = "root stylesheet"; + _._evaluate0$_importSpan = _._evaluate0$_callableNode = _._evaluate0$_currentCallable = null; + _._evaluate0$_inSupportsDeclaration = _._evaluate0$_inKeyframes = _._evaluate0$_atRootExcludingStyleRule = _._evaluate0$_inUnknownAtRule = _._evaluate0$_inFunction = false; + _._evaluate0$_loadedUrls = t12; + _._evaluate0$_activeModules = t13; + _._evaluate0$_stack = t14; + _._evaluate0$_importer = null; + _._evaluate0$_inDependency = false; + _._evaluate0$__extensionStore = _._evaluate0$_preModuleComments = _._evaluate0$_outOfOrderImports = _._evaluate0$__endOfImports = _._evaluate0$__root = _._evaluate0$__stylesheet = null; + _._evaluate0$_configuration = t15; + }, + _EvaluateVisitor_closure25: function _EvaluateVisitor_closure25(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure26: function _EvaluateVisitor_closure26(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure27: function _EvaluateVisitor_closure27(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure28: function _EvaluateVisitor_closure28(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure29: function _EvaluateVisitor_closure29(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure30: function _EvaluateVisitor_closure30(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure31: function _EvaluateVisitor_closure31(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure32: function _EvaluateVisitor_closure32(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure33: function _EvaluateVisitor_closure33(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure10: function _EvaluateVisitor__closure10(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure34: function _EvaluateVisitor_closure34(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure9: function _EvaluateVisitor__closure9(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure35: function _EvaluateVisitor_closure35(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure36: function _EvaluateVisitor_closure36(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure7: function _EvaluateVisitor__closure7(t0, t1, t2) { + this.values = t0; + this.span = t1; + this.callableNode = t2; + }, + _EvaluateVisitor__closure8: function _EvaluateVisitor__closure8(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure37: function _EvaluateVisitor_closure37(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure1: function _EvaluateVisitor_run_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure1: function _EvaluateVisitor_run__closure1(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor__loadModule_closure3: function _EvaluateVisitor__loadModule_closure3(t0, t1) { + this._box_1 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure4: function _EvaluateVisitor__loadModule_closure4(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure3: function _EvaluateVisitor__loadModule__closure3(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure4: function _EvaluateVisitor__loadModule__closure4(t0, t1, t2) { + this._box_0 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure1: function _EvaluateVisitor__execute_closure1(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure3: function _EvaluateVisitor__combineCss_closure3() { + }, + _EvaluateVisitor__combineCss_closure4: function _EvaluateVisitor__combineCss_closure4(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule1: function _EvaluateVisitor__combineCss_visitModule1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure3: function _EvaluateVisitor__extendModules_closure3(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure4: function _EvaluateVisitor__extendModules_closure4() { + }, + _EvaluateVisitor_visitAtRootRule_closure3: function _EvaluateVisitor_visitAtRootRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure4: function _EvaluateVisitor_visitAtRootRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure11: function _EvaluateVisitor__scopeForAtRoot_closure11(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure12: function _EvaluateVisitor__scopeForAtRoot_closure12(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure13: function _EvaluateVisitor__scopeForAtRoot_closure13(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure1: function _EvaluateVisitor__scopeForAtRoot__closure1(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure14: function _EvaluateVisitor__scopeForAtRoot_closure14(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure15: function _EvaluateVisitor__scopeForAtRoot_closure15() { + }, + _EvaluateVisitor__scopeForAtRoot_closure16: function _EvaluateVisitor__scopeForAtRoot_closure16(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure1: function _EvaluateVisitor_visitContentRule_closure1(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure1: function _EvaluateVisitor_visitDeclaration_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure5: function _EvaluateVisitor_visitEachRule_closure5(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure6: function _EvaluateVisitor_visitEachRule_closure6(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure7: function _EvaluateVisitor_visitEachRule_closure7(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure1: function _EvaluateVisitor_visitEachRule__closure1(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure1: function _EvaluateVisitor_visitEachRule___closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure5: function _EvaluateVisitor_visitAtRule_closure5(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure6: function _EvaluateVisitor_visitAtRule_closure6(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure1: function _EvaluateVisitor_visitAtRule__closure1(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure7: function _EvaluateVisitor_visitAtRule_closure7() { + }, + _EvaluateVisitor_visitForRule_closure9: function _EvaluateVisitor_visitForRule_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure10: function _EvaluateVisitor_visitForRule_closure10(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure11: function _EvaluateVisitor_visitForRule_closure11(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure12: function _EvaluateVisitor_visitForRule_closure12(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure13: function _EvaluateVisitor_visitForRule_closure13(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure1: function _EvaluateVisitor_visitForRule__closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure3: function _EvaluateVisitor_visitForwardRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure4: function _EvaluateVisitor_visitForwardRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure1: function _EvaluateVisitor__registerCommentsForModule_closure1() { + }, + _EvaluateVisitor_visitIfRule_closure1: function _EvaluateVisitor_visitIfRule_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure1: function _EvaluateVisitor_visitIfRule__closure1(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure1: function _EvaluateVisitor_visitIfRule___closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure1: function _EvaluateVisitor__visitDynamicImport_closure1(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure7: function _EvaluateVisitor__visitDynamicImport__closure7(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure8: function _EvaluateVisitor__visitDynamicImport__closure8() { + }, + _EvaluateVisitor__visitDynamicImport__closure9: function _EvaluateVisitor__visitDynamicImport__closure9() { + }, + _EvaluateVisitor__visitDynamicImport__closure10: function _EvaluateVisitor__visitDynamicImport__closure10(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure3: function _EvaluateVisitor__applyMixin_closure3(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure4: function _EvaluateVisitor__applyMixin__closure4(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure4: function _EvaluateVisitor__applyMixin_closure4(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure3: function _EvaluateVisitor__applyMixin__closure3(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure1: function _EvaluateVisitor__applyMixin___closure1(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure1: function _EvaluateVisitor__applyMixin____closure1(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure5: function _EvaluateVisitor_visitIncludeRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure6: function _EvaluateVisitor_visitIncludeRule_closure6(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure7: function _EvaluateVisitor_visitIncludeRule_closure7(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure5: function _EvaluateVisitor_visitMediaRule_closure5(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure6: function _EvaluateVisitor_visitMediaRule_closure6(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure1: function _EvaluateVisitor_visitMediaRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure1: function _EvaluateVisitor_visitMediaRule___closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure7: function _EvaluateVisitor_visitMediaRule_closure7(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure7: function _EvaluateVisitor_visitStyleRule_closure7(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure8: function _EvaluateVisitor_visitStyleRule_closure8() { + }, + _EvaluateVisitor_visitStyleRule_closure10: function _EvaluateVisitor_visitStyleRule_closure10(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure1: function _EvaluateVisitor_visitStyleRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure9: function _EvaluateVisitor_visitStyleRule_closure9() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure1: function _EvaluateVisitor__warnForBogusCombinators_closure1() { + }, + _EvaluateVisitor_visitSupportsRule_closure3: function _EvaluateVisitor_visitSupportsRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure1: function _EvaluateVisitor_visitSupportsRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure4: function _EvaluateVisitor_visitSupportsRule_closure4() { + }, + _EvaluateVisitor__visitSupportsCondition_closure1: function _EvaluateVisitor__visitSupportsCondition_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure5: function _EvaluateVisitor_visitVariableDeclaration_closure5(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure6: function _EvaluateVisitor_visitVariableDeclaration_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure7: function _EvaluateVisitor_visitVariableDeclaration_closure7(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure1: function _EvaluateVisitor_visitUseRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure1: function _EvaluateVisitor_visitWarnRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure1: function _EvaluateVisitor_visitWhileRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure1: function _EvaluateVisitor_visitWhileRule__closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure1: function _EvaluateVisitor_visitBinaryOperationExpression_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation1: function _EvaluateVisitor__slash_recommendation1() { + }, + _EvaluateVisitor_visitVariableExpression_closure1: function _EvaluateVisitor_visitVariableExpression_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure1: function _EvaluateVisitor_visitUnaryOperationExpression_closure1(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitListExpression_closure1: function _EvaluateVisitor_visitListExpression_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure5: function _EvaluateVisitor_visitFunctionExpression_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure6: function _EvaluateVisitor_visitFunctionExpression_closure6() { + }, + _EvaluateVisitor_visitFunctionExpression_closure7: function _EvaluateVisitor_visitFunctionExpression_closure7(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__checkCalculationArguments_check1: function _EvaluateVisitor__checkCalculationArguments_check1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure1: function _EvaluateVisitor__visitCalculationExpression_closure1(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure1: function _EvaluateVisitor__runUserDefinedCallable_closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure1: function _EvaluateVisitor__runUserDefinedCallable__closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure1: function _EvaluateVisitor__runUserDefinedCallable___closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure1: function _EvaluateVisitor__runUserDefinedCallable____closure1() { + }, + _EvaluateVisitor__runFunctionCallable_closure1: function _EvaluateVisitor__runFunctionCallable_closure1(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure5: function _EvaluateVisitor__runBuiltInCallable_closure5(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure6: function _EvaluateVisitor__runBuiltInCallable_closure6(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure7: function _EvaluateVisitor__runBuiltInCallable_closure7() { + }, + _EvaluateVisitor__evaluateArguments_closure7: function _EvaluateVisitor__evaluateArguments_closure7() { + }, + _EvaluateVisitor__evaluateArguments_closure8: function _EvaluateVisitor__evaluateArguments_closure8(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure9: function _EvaluateVisitor__evaluateArguments_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure10: function _EvaluateVisitor__evaluateArguments_closure10() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure7: function _EvaluateVisitor__evaluateMacroArguments_closure7(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure8: function _EvaluateVisitor__evaluateMacroArguments_closure8(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure9: function _EvaluateVisitor__evaluateMacroArguments_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure10: function _EvaluateVisitor__evaluateMacroArguments_closure10(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure1: function _EvaluateVisitor__addRestMap_closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure1: function _EvaluateVisitor__verifyArguments_closure1(t0, t1, t2) { + this.$arguments = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure3: function _EvaluateVisitor_visitCssAtRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure4: function _EvaluateVisitor_visitCssAtRule_closure4() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure3: function _EvaluateVisitor_visitCssKeyframeBlock_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure4: function _EvaluateVisitor_visitCssKeyframeBlock_closure4() { + }, + _EvaluateVisitor_visitCssMediaRule_closure5: function _EvaluateVisitor_visitCssMediaRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure6: function _EvaluateVisitor_visitCssMediaRule_closure6(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure1: function _EvaluateVisitor_visitCssMediaRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure1: function _EvaluateVisitor_visitCssMediaRule___closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure7: function _EvaluateVisitor_visitCssMediaRule_closure7(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure4: function _EvaluateVisitor_visitCssStyleRule_closure4(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure1: function _EvaluateVisitor_visitCssStyleRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure3: function _EvaluateVisitor_visitCssStyleRule_closure3() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure3: function _EvaluateVisitor_visitCssSupportsRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure1: function _EvaluateVisitor_visitCssSupportsRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure4: function _EvaluateVisitor_visitCssSupportsRule_closure4() { + }, + _EvaluateVisitor__performInterpolationHelper_closure1: function _EvaluateVisitor__performInterpolationHelper_closure1(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure1: function _EvaluateVisitor__serialize_closure1(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure1: function _EvaluateVisitor__expressionNode_closure1(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation1: function _EvaluateVisitor__withoutSlash_recommendation1() { + }, + _EvaluateVisitor__stackFrame_closure1: function _EvaluateVisitor__stackFrame_closure1(t0) { + this.$this = t0; + }, + _ImportedCssVisitor1: function _ImportedCssVisitor1(t0) { + this._evaluate0$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure1: function _ImportedCssVisitor_visitCssAtRule_closure1() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure1: function _ImportedCssVisitor_visitCssMediaRule_closure1(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure1: function _ImportedCssVisitor_visitCssStyleRule_closure1() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure1: function _ImportedCssVisitor_visitCssSupportsRule_closure1() { + }, + _EvaluationContext1: function _EvaluationContext1(t0, t1) { + this._evaluate0$_visitor = t0; + this._evaluate0$_defaultWarnNodeWithSpan = t1; + }, + EveryCssVisitor0: function EveryCssVisitor0() { + }, + EveryCssVisitor_visitCssAtRule_closure0: function EveryCssVisitor_visitCssAtRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssKeyframeBlock_closure0: function EveryCssVisitor_visitCssKeyframeBlock_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssMediaRule_closure0: function EveryCssVisitor_visitCssMediaRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStyleRule_closure0: function EveryCssVisitor_visitCssStyleRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStylesheet_closure0: function EveryCssVisitor_visitCssStylesheet_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssSupportsRule_closure0: function EveryCssVisitor_visitCssSupportsRule_closure0(t0) { + this.$this = t0; + }, + throwNodeException(exception, ascii, color, trace) { + var wasAscii, jsException, t1, trace0; + trace = trace; + wasAscii = $._glyphs === B.C_AsciiGlyphSet; + $._glyphs = ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + try { + t1 = A.callConstructor($.$get$exceptionClass(), [exception, B.JSString_methods.replaceFirst$2(exception.toString$1$color(0, color), "Error: ", "")]); + jsException = type$._NodeException._as(t1); + trace0 = A.getTrace0(exception); + trace = trace0 == null ? trace : trace0; + if (trace != null) + A.attachJsStack(jsException, trace); + A.jsThrow(jsException); + } finally { + $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + } + }, + _NodeException: function _NodeException() { + }, + exceptionClass_closure: function exceptionClass_closure() { + }, + exceptionClass__closure: function exceptionClass__closure() { + }, + exceptionClass__closure0: function exceptionClass__closure0() { + }, + exceptionClass__closure1: function exceptionClass__closure1() { + }, + SassException$0(message, span, loadedUrls) { + return new A.SassException0(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassException$0(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassException0(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassRuntimeException$0(message, span, trace, loadedUrls) { + return new A.SassRuntimeException0(trace, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassRuntimeException$0(message, span, primaryLabel, secondarySpans, trace, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassRuntimeException0(trace, primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassFormatException$0(message, span, loadedUrls) { + return new A.SassFormatException0(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassFormatException$0(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassFormatException0(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassScriptException$0(message, argumentName) { + return new A.SassScriptException0(argumentName == null ? message : "$" + argumentName + ": " + message); + }, + MultiSpanSassScriptException$0(message, primaryLabel, secondarySpans) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassScriptException0(primaryLabel, t1, message); + }, + SassException0: function SassException0(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassException0: function MultiSpanSassException0(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassRuntimeException0: function SassRuntimeException0(t0, t1, t2, t3) { + var _ = this; + _.trace = t0; + _.loadedUrls = t1; + _._span_exception$_message = t2; + _._span = t3; + }, + MultiSpanSassRuntimeException0: function MultiSpanSassRuntimeException0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.trace = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _.loadedUrls = t3; + _._span_exception$_message = t4; + _._span = t5; + }, + SassFormatException0: function SassFormatException0(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassFormatException0: function MultiSpanSassFormatException0(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassScriptException0: function SassScriptException0(t0) { + this.message = t0; + }, + MultiSpanSassScriptException0: function MultiSpanSassScriptException0(t0, t1, t2) { + this.primaryLabel = t0; + this.secondarySpans = t1; + this.message = t2; + }, + Exports: function Exports() { + }, + LoggerNamespace: function LoggerNamespace() { + }, + Expression0: function Expression0() { + }, + _IsCalculationSafeVisitor0: function _IsCalculationSafeVisitor0() { + }, + _IsCalculationSafeVisitor_visitListExpression_closure0: function _IsCalculationSafeVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + JSExpressionVisitor: function JSExpressionVisitor(t0) { + this._expression$_inner = t0; + }, + JSExpressionVisitorObject: function JSExpressionVisitorObject() { + }, + expressionToCalc0(expression) { + var t4, + t1 = A._setArrayType([B.C__MakeExpressionCalculationSafe0.visitBinaryOperationExpression$1(0, expression)], type$.JSArray_Expression_2), + t2 = expression.get$span(0), + t3 = type$.Expression_2; + t1 = A.List_List$unmodifiable(t1, t3); + t3 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t3); + t4 = expression.get$span(0); + return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked("calc", "_", "-"), "calc", new A.ArgumentInvocation0(t1, t3, null, null, t2), t4); + }, + _MakeExpressionCalculationSafe0: function _MakeExpressionCalculationSafe0() { + }, + __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0: function __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0() { + }, + ExtendRule0: function ExtendRule0(t0, t1, t2) { + this.selector = t0; + this.isOptional = t1; + this.span = t2; + }, + Extension0: function Extension0(t0, t1, t2, t3, t4) { + var _ = this; + _.extender = t0; + _.target = t1; + _.mediaContext = t2; + _.isOptional = t3; + _.span = t4; + }, + Extender0: function Extender0(t0, t1) { + this.selector = t0; + this.isOriginal = t1; + this._extension$_extension = null; + }, + ExtensionStore__extendOrReplace0(selector, source, targets, mode, span) { + var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, compound, t9, t10, t11, _i0, simple, t12, _i1, t13, t14, + extender = A.ExtensionStore$_mode0(mode); + if (!selector.accept$1(B._IsInvisibleVisitor_true0)) + extender._extension_store$_originals.addAll$1(0, selector.components); + for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector_2, t6 = type$.Extension_2, t7 = type$.SimpleSelector_2, t8 = type$.Map_ComplexSelector_Extension_2, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassScriptException$0("Can't extend complex selector " + A.S(complex) + ".", null)); + t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); + for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { + simple = t10[_i0]; + t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); + for (_i1 = 0; _i1 < t4; ++_i1) { + complex = t3[_i1]; + complex.get$specificity(); + t13 = new A.Extender0(complex, false); + t14 = new A.Extension0(t13, simple, null, true, span); + t13._extension$_extension = t14; + t12.$indexSet(0, complex, t14); + } + t9.$indexSet(0, simple, t12); + } + selector = extender._extension_store$_extendList$2(selector, t9); + } + return selector; + }, + ExtensionStore$0() { + var t1 = type$.SimpleSelector_2; + return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), B.ExtendMode_normal_normal0); + }, + ExtensionStore$_mode0(_mode) { + var t1 = type$.SimpleSelector_2; + return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), _mode); + }, + ExtensionStore0: function ExtensionStore0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._extension_store$_selectors = t0; + _._extension_store$_extensions = t1; + _._extension_store$_extensionsByExtender = t2; + _._extension_store$_mediaContexts = t3; + _._extension_store$_sourceSpecificity = t4; + _._extension_store$_originals = t5; + _._extension_store$_mode = t6; + }, + ExtensionStore_extensionsWhereTarget_closure0: function ExtensionStore_extensionsWhereTarget_closure0() { + }, + ExtensionStore__registerSelector_closure0: function ExtensionStore__registerSelector_closure0() { + }, + ExtensionStore_addExtension_closure2: function ExtensionStore_addExtension_closure2() { + }, + ExtensionStore_addExtension_closure3: function ExtensionStore_addExtension_closure3() { + }, + ExtensionStore_addExtension_closure4: function ExtensionStore_addExtension_closure4(t0) { + this.complex = t0; + }, + ExtensionStore__extendExistingExtensions_closure1: function ExtensionStore__extendExistingExtensions_closure1() { + }, + ExtensionStore__extendExistingExtensions_closure2: function ExtensionStore__extendExistingExtensions_closure2() { + }, + ExtensionStore_addExtensions_closure0: function ExtensionStore_addExtensions_closure0() { + }, + ExtensionStore__extendComplex_closure0: function ExtensionStore__extendComplex_closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendComplex__closure0: function ExtensionStore__extendComplex__closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendCompound_closure2: function ExtensionStore__extendCompound_closure2() { + }, + ExtensionStore__extendCompound_closure3: function ExtensionStore__extendCompound_closure3() { + }, + ExtensionStore__extendCompound_closure4: function ExtensionStore__extendCompound_closure4(t0) { + this.original = t0; + }, + ExtensionStore__extendSimple_withoutPseudo0: function ExtensionStore__extendSimple_withoutPseudo0(t0, t1, t2) { + this.$this = t0; + this.extensions = t1; + this.targetsUsed = t2; + }, + ExtensionStore__extendSimple_closure1: function ExtensionStore__extendSimple_closure1(t0, t1) { + this.$this = t0; + this.withoutPseudo = t1; + }, + ExtensionStore__extendSimple_closure2: function ExtensionStore__extendSimple_closure2() { + }, + ExtensionStore__extendPseudo_closure4: function ExtensionStore__extendPseudo_closure4() { + }, + ExtensionStore__extendPseudo_closure5: function ExtensionStore__extendPseudo_closure5() { + }, + ExtensionStore__extendPseudo_closure6: function ExtensionStore__extendPseudo_closure6() { + }, + ExtensionStore__extendPseudo_closure7: function ExtensionStore__extendPseudo_closure7(t0) { + this.pseudo = t0; + }, + ExtensionStore__extendPseudo_closure8: function ExtensionStore__extendPseudo_closure8(t0, t1) { + this.pseudo = t0; + this.selector = t1; + }, + ExtensionStore__trim_closure1: function ExtensionStore__trim_closure1(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore__trim_closure2: function ExtensionStore__trim_closure2(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore_clone_closure0: function ExtensionStore_clone_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.newSelectors = t1; + _.oldToNewSelectors = t2; + _.newMediaContexts = t3; + }, + FiberClass: function FiberClass() { + }, + Fiber: function Fiber() { + }, + JSToDartFileImporter: function JSToDartFileImporter(t0) { + this._file0$_findFileUrl = t0; + }, + JSToDartFileImporter_canonicalize_closure: function JSToDartFileImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + FilesystemImporter0: function FilesystemImporter0(t0, t1) { + this._filesystem$_loadPath = t0; + this._filesystem$_loadPathDeprecated = t1; + }, + FilesystemImporter_canonicalize_closure0: function FilesystemImporter_canonicalize_closure0() { + }, + ForRule$0(variable, from, to, children, span, exclusive) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.ForRule0(variable, from, to, exclusive, span, t1, t2); + }, + ForRule0: function ForRule0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.variable = t0; + _.from = t1; + _.to = t2; + _.isExclusive = t3; + _.span = t4; + _.children = t5; + _.hasDeclarations = t6; + }, + ForwardRule0: function ForwardRule0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.url = t0; + _.shownMixinsAndFunctions = t1; + _.shownVariables = t2; + _.hiddenMixinsAndFunctions = t3; + _.hiddenVariables = t4; + _.prefix = t5; + _.configuration = t6; + _.span = t7; + }, + ForwardedModuleView_ifNecessary0(inner, rule, $T) { + var t2, + t1 = false; + if (rule.prefix == null) + if (rule.shownMixinsAndFunctions == null) + if (rule.shownVariables == null) { + t2 = rule.hiddenMixinsAndFunctions; + t2 = t2 == null ? null : t2._base.get$isEmpty(0); + if (t2 === true) { + t1 = rule.hiddenVariables; + t1 = t1 == null ? null : t1._base.get$isEmpty(0); + t1 = t1 === true; + } + } + if (t1) + return inner; + else + return A.ForwardedModuleView$0(inner, rule, $T); + }, + ForwardedModuleView$0(_inner, _rule, $T) { + var t1 = _rule.prefix, + t2 = _rule.shownVariables, + t3 = _rule.hiddenVariables, + t4 = _rule.shownMixinsAndFunctions, + t5 = _rule.hiddenMixinsAndFunctions; + return new A.ForwardedModuleView0(_inner, _rule, A.ForwardedModuleView__forwardedMap0(_inner.get$variables(), t1, t2, t3, type$.Value_2), A.ForwardedModuleView__forwardedMap0(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode_2), A.ForwardedModuleView__forwardedMap0(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap0(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView0<0>")); + }, + ForwardedModuleView__forwardedMap0(map, prefix, safelist, blocklist, $V) { + var t1 = prefix == null, + t2 = false; + if (t1) + if (safelist == null) + t2 = blocklist == null || blocklist._base.get$isEmpty(0); + if (t2) + return map; + if (!t1) + map = new A.PrefixedMapView0(map, prefix, $V._eval$1("PrefixedMapView0<0>")); + if (safelist != null) + map = new A.LimitedMapView0(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView0<1,2>")); + else if (blocklist != null && blocklist._base.get$isNotEmpty(0)) + map = A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); + return map; + }, + ForwardedModuleView0: function ForwardedModuleView0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._forwarded_view0$_inner = t0; + _._forwarded_view0$_rule = t1; + _.variables = t2; + _.variableNodes = t3; + _.functions = t4; + _.mixins = t5; + _.$ti = t6; + }, + FunctionExpression0: function FunctionExpression0(t0, t1, t2, t3, t4) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.span = t4; + }, + JSFunction0: function JSFunction0() { + }, + SupportsFunction0: function SupportsFunction0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + functionClass_closure: function functionClass_closure() { + }, + functionClass__closure: function functionClass__closure() { + }, + functionClass__closure0: function functionClass__closure0() { + }, + SassFunction0: function SassFunction0(t0) { + this.callable = t0; + }, + FunctionRule$0($name, $arguments, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.FunctionRule0(t1, $name, $arguments, span, t2, t3); + }, + FunctionRule0: function FunctionRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + unifyComplex0(complexes, span) { + var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, _0_6_isSet, _0_6, t5, newLeadingCombinator, base, _1_1, newTrailingCombinator, _i, t6, t7, t8, _null = null, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) + return complexes; + for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.accept$1(B.C__IsUselessVisitor0)) + return _null; + t4 = t3.components; + _0_6_isSet = t4.length === 1; + if (_0_6_isSet) { + _0_6 = t3.leadingCombinators; + t5 = _0_6.length === 1; + } else { + _0_6 = _null; + t5 = false; + } + if (t5) { + newLeadingCombinator = (_0_6_isSet ? _0_6 : t3.leadingCombinators)[0]; + if (leadingCombinator == null) + leadingCombinator = newLeadingCombinator; + else if (!(leadingCombinator.$ti._is(newLeadingCombinator) && J.$eq$(newLeadingCombinator.value, leadingCombinator.value))) + return _null; + } + base = B.JSArray_methods.get$last(t4); + _1_1 = base.combinators; + if (_1_1.length === 1) { + newTrailingCombinator = _1_1[0]; + if (trailingCombinator != null) + t3 = !(trailingCombinator.$ti._is(newTrailingCombinator) && J.$eq$(newTrailingCombinator.value, trailingCombinator.value)); + else + t3 = false; + if (t3) + return _null; + trailingCombinator = newTrailingCombinator; + } + if (unifiedBase == null) + unifiedBase = base.selector.components; + else + for (t3 = base.selector.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + unifiedBase = t3[_i].unify$1(unifiedBase); + if (unifiedBase == null) + return _null; + } + } + t2 = type$.JSArray_ComplexSelector_2; + t3 = A._setArrayType([], t2); + for (t4 = t1.get$iterator(complexes); t4.moveNext$0();) { + t5 = t4.get$current(t4); + t6 = t5.components; + t7 = t6.length; + if (t7 > 1) { + t8 = t5.leadingCombinators; + t3.push(A.ComplexSelector$0(t8, B.JSArray_methods.take$1(t6, t7 - 1), t5.span, t5.lineBreak)); + } + } + t4 = leadingCombinator == null ? B.List_empty14 : A._setArrayType([leadingCombinator], type$.JSArray_CssValue_Combinator_2); + unifiedBase.toString; + t5 = A.CompoundSelector$0(unifiedBase, span); + t6 = trailingCombinator == null ? B.List_empty14 : A._setArrayType([trailingCombinator], type$.JSArray_CssValue_Combinator_2); + base = A.ComplexSelector$0(t4, A._setArrayType([new A.ComplexSelectorComponent0(t5, A.List_List$unmodifiable(t6, type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2), span, t1.any$1(complexes, new A.unifyComplex_closure0())); + if (t3.length === 0) + t1 = A._setArrayType([base], t2); + else { + t1 = A.List_List$of(A.IterableExtension_get_exceptLast0(t3), true, type$.ComplexSelector_2); + t1.push(B.JSArray_methods.get$last(t3).concatenate$2(base, span)); + } + return A.weave0(t1, span, false); + }, + unifyCompound0(compound1, compound2) { + var t1, t2, _i, unified, + result = compound2.components; + for (t1 = compound1.components, t2 = t1.length, _i = 0; _i < t2; ++_i, result = unified) { + unified = t1[_i].unify$1(result); + if (unified == null) + return null; + } + return A.CompoundSelector$0(result, compound1.span); + }, + unifyUniversalAndElement0(selector1, selector2) { + var namespace, $name, t1, + _0_0 = A._namespaceAndName0(selector1, "selector1"), + namespace1 = _0_0._0, + name1 = _0_0._1, + _1_0 = A._namespaceAndName0(selector2, "selector2"), + namespace2 = _1_0._0, + name2 = _1_0._1; + if (namespace1 == namespace2 || namespace2 === "*") + namespace = namespace1; + else { + if (namespace1 !== "*") + return null; + namespace = namespace2; + } + if (name1 == name2 || name2 == null) + $name = name1; + else { + if (!(name1 == null || name1 === "*")) + return null; + $name = name2; + } + t1 = selector1.span; + return $name == null ? new A.UniversalSelector0(namespace, t1) : new A.TypeSelector0(new A.QualifiedName0($name, namespace), t1); + }, + _namespaceAndName0(selector, $name) { + var t1, _0_4; + $label0$0: { + if (selector instanceof A.UniversalSelector0) { + t1 = new A._Record_2(selector.namespace, null); + break $label0$0; + } + if (selector instanceof A.TypeSelector0) { + _0_4 = selector.name; + t1 = new A._Record_2(_0_4.namespace, _0_4.name); + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$value(selector, $name, string$.must_b)); + } + return t1; + }, + weave0(complexes, span, forceLineBreak) { + var complex, t2, prefixes, t3, t4, t5, t6, i, t7, t8, _i, t9, t10, _i0, parentPrefix, t11, t12, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) { + complex = t1.$index(complexes, 0); + if (!forceLineBreak || complex.lineBreak) + return complexes; + return A._setArrayType([A.ComplexSelector$0(complex.leadingCombinators, complex.components, complex.span, true)], type$.JSArray_ComplexSelector_2); + } + t2 = type$.JSArray_ComplexSelector_2; + prefixes = A._setArrayType([t1.get$first(complexes)], t2); + for (t1 = t1.skip$1(complexes, 1), t3 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t3._eval$1("ListIterator")), t4 = type$.ComplexSelectorComponent_2, t3 = t3._eval$1("ListIterable.E"); t1.moveNext$0();) { + t5 = t1.__internal$_current; + if (t5 == null) + t5 = t3._as(t5); + t6 = t5.components; + if (t6.length === 1) { + for (i = 0; i < prefixes.length; ++i) + prefixes[i] = prefixes[i].concatenate$3$forceLineBreak(t5, span, forceLineBreak); + continue; + } + t7 = A._setArrayType([], t2); + for (t8 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t8 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { + t9 = A._weaveParents0(prefixes[_i], t5, span); + if (t9 == null) + t9 = B.List_empty15; + t10 = t9.length; + _i0 = 0; + for (; _i0 < t9.length; t9.length === t10 || (0, A.throwConcurrentModificationError)(t9), ++_i0) { + parentPrefix = t9[_i0]; + t11 = B.JSArray_methods.get$last(t6); + t12 = A.List_List$of(parentPrefix.components, true, t4); + t12.push(t11); + t11 = parentPrefix.lineBreak || forceLineBreak; + t7.push(A.ComplexSelector$0(parentPrefix.leadingCombinators, t12, span, t11)); + } + } + prefixes = t7; + } + return prefixes; + }, + _weaveParents0(prefix, base, span) { + var t1, queue1, queue2, trailingCombinators, _0_1, _0_3, _0_3_isSet, _0_30, rootish2, t2, rootish1, rootish, t3, rootish_case_0, t0, rootish_case_1, groups1, groups2, lcs, choices, t4, _i, group, t5, t6, t7, _i0, chunk, t8, t9, _null = null, + leadingCombinators = A._mergeLeadingCombinators0(prefix.leadingCombinators, base.leadingCombinators); + if (leadingCombinators == null) + return _null; + t1 = type$.ComplexSelectorComponent_2; + queue1 = A.QueueList_QueueList$from(prefix.components, t1); + queue2 = A.QueueList_QueueList$from(A.IterableExtension_get_exceptLast0(base.components), t1); + trailingCombinators = A._mergeTrailingCombinators0(queue1, queue2, span, _null); + if (trailingCombinators == null) + return _null; + $label0$0: { + _0_1 = A._firstIfRootish0(queue1); + _0_3 = A._firstIfRootish0(queue2); + _0_3_isSet = _0_1 != null; + _0_30 = _null; + rootish2 = _null; + t2 = false; + if (_0_3_isSet) { + rootish1 = _0_1 == null ? t1._as(_0_1) : _0_1; + t2 = _0_3 != null; + if (t2) + rootish2 = _0_3 == null ? t1._as(_0_3) : _0_3; + _0_30 = _0_3; + } else + rootish1 = _null; + if (t2) { + rootish = A.unifyCompound0(rootish1.selector, rootish2.selector); + if (rootish == null) + return _null; + t1 = rootish1.combinators; + t2 = rootish1.span; + t3 = type$.CssValue_Combinator_2; + queue1.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(t1, t3), t2)); + queue2.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(rootish2.combinators, t3), t2)); + break $label0$0; + } + t2 = _null; + t3 = false; + if (_0_1 != null) { + rootish_case_0 = _0_1; + if (_0_3_isSet) + t2 = _0_30; + else { + t2 = _0_3; + _0_30 = t2; + _0_3_isSet = true; + } + t2 = t2 == null; + t3 = t2 ? rootish_case_0 : _null; + t0 = t3; + t3 = t2; + t2 = t0; + } + if (!t3) + if (_0_1 == null) { + if (_0_3_isSet) + t3 = _0_30; + else { + t3 = _0_3; + _0_30 = t3; + _0_3_isSet = true; + } + t3 = t3 != null; + if (t3) { + rootish_case_1 = _0_3_isSet ? _0_30 : _0_3; + if (rootish_case_1 == null) + rootish_case_1 = t1._as(rootish_case_1); + t1 = rootish_case_1; + } else + t1 = t2; + t2 = t3; + } else { + t1 = t2; + t2 = false; + } + else { + t1 = t2; + t2 = true; + } + if (t2) { + queue1.addFirst$1(t1); + queue2.addFirst$1(t1); + } + } + groups1 = A._groupSelectors0(queue1); + groups2 = A._groupSelectors0(queue2); + t1 = type$.List_ComplexSelectorComponent_2; + lcs = A.longestCommonSubsequence0(groups2, groups1, new A._weaveParents_closure3(span), t1); + choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent_2); + for (t2 = lcs.length, t3 = type$.JSArray_Iterable_ComplexSelectorComponent_2, t4 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < lcs.length; lcs.length === t2 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { + group = lcs[_i]; + t5 = A._setArrayType([], t3); + for (t6 = A._chunks0(groups1, groups2, new A._weaveParents_closure4(group), t1), t7 = t6.length, _i0 = 0; _i0 < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i0) { + chunk = t6[_i0]; + t8 = A._setArrayType([], t4); + for (t9 = B.JSArray_methods.get$iterator(chunk); t9.moveNext$0();) + B.JSArray_methods.addAll$1(t8, t9.get$current(0)); + t5.push(t8); + } + choices.push(t5); + choices.push(A._setArrayType([group], t3)); + groups1.removeFirst$0(); + groups2.removeFirst$0(); + } + t2 = A._setArrayType([], t3); + for (t1 = A._chunks0(groups1, groups2, new A._weaveParents_closure5(), t1), t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + chunk = t1[_i]; + t5 = A._setArrayType([], t4); + for (t6 = B.JSArray_methods.get$iterator(chunk); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t5, t6.get$current(0)); + t2.push(t5); + } + choices.push(t2); + B.JSArray_methods.addAll$1(choices, trailingCombinators); + t1 = A._setArrayType([], type$.JSArray_ComplexSelector_2); + for (t2 = J.get$iterator$ax(A.paths0(new A.WhereIterable(choices, new A._weaveParents_closure6(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent_2), type$.Iterable_ComplexSelectorComponent_2)), t3 = !prefix.lineBreak, t5 = base.lineBreak; t2.moveNext$0();) { + t6 = t2.get$current(t2); + t7 = A._setArrayType([], t4); + for (t6 = J.get$iterator$ax(t6); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t7, t6.get$current(t6)); + t1.push(A.ComplexSelector$0(leadingCombinators, t7, span, !t3 || t5)); + } + return t1; + }, + _firstIfRootish0(queue) { + var first, t1, t2, _i, simple, t3; + if (queue.get$length(0) >= 1) { + first = queue.$index(0, 0); + for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + t3 = false; + if (simple instanceof A.PseudoSelector0) + if (simple.isClass) + t3 = $._rootishPseudoClasses0.contains$1(0, simple.normalizedName); + if (t3) { + queue.removeFirst$0(); + return first; + } + } + } + return null; + }, + _mergeLeadingCombinators0(combinators1, combinators2) { + var _0_4, t1, t2, _0_7_isSet, _0_7, t3, _0_4_isSet, _0_11, _0_11_isSet, combinators, _null = null; + $label0$0: { + _0_4 = combinators2; + t1 = _null; + t2 = type$.List_CssValue_Combinator_2; + _0_7_isSet = t2._is(combinators1); + _0_7 = _null; + if (_0_7_isSet) { + _0_7 = combinators1.length; + t3 = _0_7; + t3 = t3 > 1; + } else + t3 = false; + _0_4_isSet = true; + _0_11 = _null; + if (!t3) { + t3 = _0_4; + _0_11_isSet = t2._is(t3); + if (_0_11_isSet) { + t3 = _0_4; + _0_11 = (t3 == null ? t2._as(t3) : t3).length; + t3 = _0_11; + t3 = t3 > 1; + } else + t3 = false; + } else { + _0_11_isSet = false; + t3 = true; + } + if (t3) + break $label0$0; + if (t2._is(combinators1)) { + if (_0_7_isSet) + t3 = _0_7; + else { + _0_7 = combinators1.length; + t3 = _0_7; + } + t3 = t3 <= 0; + if (t3) + if (_0_4_isSet) + combinators = _0_4; + else { + combinators = combinators2; + _0_4 = combinators; + _0_4_isSet = true; + } + else + combinators = t1; + t1 = t3; + } else { + combinators = t1; + t1 = false; + } + if (!t1) { + t1 = false; + if (_0_4_isSet) + t3 = _0_4; + else { + t3 = combinators2; + _0_4 = t3; + _0_4_isSet = true; + } + if (t2._is(t3)) { + if (_0_11_isSet) + t1 = _0_11; + else { + t1 = _0_4_isSet ? _0_4 : combinators2; + _0_11 = (t1 == null ? t2._as(t1) : t1).length; + t1 = _0_11; + } + t1 = t1 <= 0; + } + combinators = combinators1; + } else + t1 = true; + if (t1) { + t1 = combinators; + break $label0$0; + } + t1 = B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; + break $label0$0; + } + return t1; + }, + _mergeTrailingCombinators0(components1, components2, span, result) { + var _0_1, t1, _1_1, t2, t3, _4_1, _4_3, _4_4_isSet, _4_5, _4_4, component1, component2, t4, t5, choices, _2_0, _4_9, _4_6, _4_7, followingComponents, nextComponents, _4_4_isSet0, _4_6_isSet, _4_7_isSet, _4_10_isSet, _4_10, _4_5_isSet, next, following, _3_0, siblingComponents_case_0, siblingComponents_case_1, combinator1, t6, combinator2, unified, t7, combinator_case_0, combinatorComponents_case_0, descendantComponents_case_0, t0, combinator_case_1, descendantComponents_case_1, combinatorComponents_case_1, _null = null; + if (result == null) + result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent_2); + $label0$0: { + _0_1 = components1.get$length(0); + if (_0_1 >= 1) { + t1 = components1.$index(0, _0_1 - 1).combinators; + break $label0$0; + } + t1 = B.List_empty14; + break $label0$0; + } + $label1$1: { + _1_1 = components2.get$length(0); + if (_1_1 >= 1) { + t2 = components2.$index(0, _1_1 - 1).combinators; + break $label1$1; + } + t2 = B.List_empty14; + break $label1$1; + } + t3 = t1.length; + if (t3 === 0 && t2.length === 0) + return result; + if (t3 > 1 || t2.length > 1) + return _null; + $label2$2: { + t3 = A.IterableExtension_get_firstOrNull(t1); + t3 = t3 == null ? _null : t3.value; + t2 = A.IterableExtension_get_firstOrNull(t2); + t2 = [t3, t2 == null ? _null : t2.value, components1, components2]; + _4_1 = t2[0]; + _4_3 = B.Combinator_y180 === _4_1; + _4_4_isSet = _4_3; + _4_5 = _null; + _4_4 = _null; + if (_4_4_isSet) { + _4_4 = t2[1]; + _4_5 = B.Combinator_y180 === _4_4; + t3 = _4_5; + } else + t3 = false; + if (t3) { + component1 = components1.removeLast$0(0); + component2 = components2.removeLast$0(0); + t2 = component1.selector; + t3 = component2.selector; + if (A.compoundIsSuperselector0(t2, t3, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + else { + t4 = type$.JSArray_ComplexSelectorComponent_2; + t5 = type$.JSArray_List_ComplexSelectorComponent_2; + if (A.compoundIsSuperselector0(t3, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component1], t4)], t5)); + else { + choices = A._setArrayType([A._setArrayType([component1, component2], t4), A._setArrayType([component2, component1], t4)], t5); + _2_0 = A.unifyCompound0(t2, t3); + if (_2_0 != null) + choices.push(A._setArrayType([new A.ComplexSelectorComponent0(_2_0, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator_2), type$.CssValue_Combinator_2), span)], t4)); + result.addFirst$1(choices); + } + } + break $label2$2; + } + _4_9 = _null; + _4_6 = _null; + _4_7 = _null; + followingComponents = _null; + nextComponents = _null; + if (_4_3) { + if (_4_4_isSet) { + t3 = _4_4; + _4_4_isSet0 = _4_4_isSet; + } else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet0 = true; + } + _4_9 = B.Combinator_gRV0 === t3; + _4_6_isSet = _4_9; + if (_4_6_isSet) { + _4_6 = t2[2]; + _4_7 = t2[3]; + nextComponents = _4_7; + followingComponents = _4_6; + } + t3 = _4_6_isSet; + _4_7_isSet = t3; + } else { + _4_4_isSet0 = _4_4_isSet; + _4_6_isSet = false; + _4_7_isSet = false; + t3 = false; + } + _4_10_isSet = !t3; + _4_10 = _null; + if (_4_10_isSet) { + _4_10 = B.Combinator_gRV0 === _4_1; + t3 = _4_10; + if (t3) { + if (_4_4_isSet) { + t3 = _4_5; + _4_5_isSet = _4_4_isSet; + _4_4_isSet = _4_4_isSet0; + } else { + if (_4_4_isSet0) { + t3 = _4_4; + _4_4_isSet = _4_4_isSet0; + } else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet = true; + } + _4_5 = B.Combinator_y180 === t3; + t3 = _4_5; + _4_5_isSet = true; + } + if (t3) { + if (_4_6_isSet) + nextComponents = _4_6; + else { + _4_6 = t2[2]; + nextComponents = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + followingComponents = _4_7; + else { + _4_7 = t2[3]; + followingComponents = _4_7; + _4_7_isSet = true; + } + } + } else { + _4_5_isSet = _4_4_isSet; + _4_4_isSet = _4_4_isSet0; + t3 = false; + } + } else { + _4_5_isSet = _4_4_isSet; + _4_4_isSet = _4_4_isSet0; + t3 = true; + } + if (t3) { + next = nextComponents.removeLast$0(0); + following = followingComponents.removeLast$0(0); + t1 = following.selector; + t2 = next.selector; + t3 = type$.JSArray_ComplexSelectorComponent_2; + t4 = type$.JSArray_List_ComplexSelectorComponent_2; + if (A.compoundIsSuperselector0(t1, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([next], t3)], t4)); + else { + t4 = A._setArrayType([A._setArrayType([following, next], t3)], t4); + _3_0 = A.unifyCompound0(t1, t2); + if (_3_0 != null) + t4.push(A._setArrayType([new A.ComplexSelectorComponent0(_3_0, A.List_List$unmodifiable(next.combinators, type$.CssValue_Combinator_2), span)], t3)); + result.addFirst$1(t4); + } + break $label2$2; + } + t3 = _null; + if (B.Combinator_8I80 === _4_1) { + _4_4_isSet0 = true; + if (_4_3) + t4 = _4_9; + else { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_9 = B.Combinator_gRV0 === t4; + t4 = _4_9; + } + if (!t4) + if (_4_5_isSet) + t4 = _4_5; + else { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_5 = B.Combinator_y180 === t4; + t4 = _4_5; + } + else + t4 = true; + if (t4) { + if (_4_7_isSet) + siblingComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + siblingComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t3 = siblingComponents_case_0; + } + } else + t4 = false; + if (!t4) { + if (_4_10_isSet) + t4 = _4_10; + else { + _4_10 = B.Combinator_gRV0 === _4_1; + t4 = _4_10; + } + if (!t4) + t4 = _4_3; + else + t4 = true; + if (t4) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = B.Combinator_8I80 === t4; + if (t4) { + if (_4_6_isSet) + siblingComponents_case_1 = _4_6; + else { + _4_6 = t2[2]; + siblingComponents_case_1 = _4_6; + _4_6_isSet = true; + } + t3 = siblingComponents_case_1; + } + } else + t4 = false; + } else + t4 = true; + if (t4) { + result.addFirst$1(A._setArrayType([A._setArrayType([t3.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + break $label2$2; + } + t3 = _4_1 == null; + t4 = !t3; + t5 = false; + if (t4) { + _4_4_isSet0 = true; + combinator1 = _4_1; + if (_4_4_isSet) + t6 = _4_4; + else { + _4_4 = t2[1]; + t6 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + if (t6 != null) { + if (_4_4_isSet) + combinator2 = _4_4; + else { + _4_4 = t2[1]; + combinator2 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + t5 = combinator1 === (combinator2 == null ? type$.Combinator_2._as(combinator2) : combinator2); + } + } + if (t5) { + unified = A.unifyCompound0(components1.removeLast$0(0).selector, components2.removeLast$0(0).selector); + if (unified == null) + return _null; + result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent0(unified, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator_2), type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + break $label2$2; + } + t1 = _null; + t5 = _null; + t6 = _null; + t7 = false; + if (t4) { + combinator_case_0 = _4_1; + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = t4 == null; + if (t4) { + if (_4_6_isSet) + combinatorComponents_case_0 = _4_6; + else { + _4_6 = t2[2]; + combinatorComponents_case_0 = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + descendantComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + descendantComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t1 = descendantComponents_case_0; + t6 = t1; + t1 = combinator_case_0; + t5 = combinatorComponents_case_0; + } + t0 = t6; + t6 = t4; + t4 = t5; + t5 = t0; + } else { + t4 = t5; + t5 = t6; + t6 = t7; + } + if (!t6) + if (t3) { + if (_4_4_isSet) + t3 = _4_4; + else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet = true; + } + t3 = t3 != null; + if (t3) { + combinator_case_1 = _4_4_isSet ? _4_4 : t2[1]; + if (combinator_case_1 == null) + combinator_case_1 = type$.Combinator_2._as(combinator_case_1); + descendantComponents_case_1 = _4_6_isSet ? _4_6 : t2[2]; + combinatorComponents_case_1 = _4_7_isSet ? _4_7 : t2[3]; + t1 = combinatorComponents_case_1; + t2 = descendantComponents_case_1; + t4 = t2; + t2 = t1; + t1 = combinator_case_1; + } else { + t2 = t4; + t4 = t5; + } + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t3 = t5; + t2 = t4; + t4 = false; + } + else { + t3 = t5; + t2 = t4; + t4 = true; + } + if (t4) { + if (t1 === B.Combinator_8I80) { + t1 = A.IterableExtension_get_lastOrNull(t3); + t1 = t1 == null ? _null : A.compoundIsSuperselector0(t1.selector, t2.get$last(t2).selector, _null); + t1 = t1 === true; + } else + t1 = false; + if (t1) + t3.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([t2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + break $label2$2; + } + return _null; + } + return A._mergeTrailingCombinators0(components1, components2, span, result); + }, + _mustUnify0(complex1, complex2) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2); + for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) + for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions0___isUnique$closure()); t4.moveNext$0();) + t1.add$1(0, t3.get$current(0)); + if (t1._collection$_length === 0) + return false; + return J.any$1$ax(complex2, new A._mustUnify_closure0(t1)); + }, + _isUnique0(simple) { + var t1; + if (!(simple instanceof A.IDSelector0)) + t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; + else + t1 = true; + return t1; + }, + _chunks0(queue1, queue2, done, $T) { + var chunk2, _0_4, _0_5_isSet, _0_1, _0_7, _0_5, chunk, _0_5_isSet0, t2, _null = null, + t1 = $T._eval$1("JSArray<0>"), + chunk1 = A._setArrayType([], t1); + for (; !done.call$1(queue1);) + chunk1.push(queue1.removeFirst$0()); + chunk2 = A._setArrayType([], t1); + for (; !done.call$1(queue2);) + chunk2.push(queue2.removeFirst$0()); + $label0$0: { + _0_4 = chunk1.length <= 0; + _0_5_isSet = _0_4; + _0_1 = chunk1; + _0_7 = _null; + _0_5 = _null; + if (_0_5_isSet) { + _0_7 = chunk2.length <= 0; + t1 = _0_7; + _0_5 = chunk2; + } else + t1 = false; + if (t1) { + t1 = A._setArrayType([], $T._eval$1("JSArray>")); + break $label0$0; + } + if (_0_4) + if (_0_5_isSet) { + chunk = _0_5; + _0_5_isSet0 = _0_5_isSet; + } else { + chunk = chunk2; + _0_5 = chunk; + _0_5_isSet0 = true; + } + else { + chunk = _null; + _0_5_isSet0 = _0_5_isSet; + } + if (!_0_4) { + if (_0_5_isSet) + t1 = _0_7; + else { + _0_7 = (_0_5_isSet0 ? _0_5 : chunk2).length <= 0; + t1 = _0_7; + } + chunk = _0_1; + } else + t1 = true; + if (t1) { + t1 = A._setArrayType([chunk], $T._eval$1("JSArray>")); + break $label0$0; + } + t1 = A.List_List$of(chunk1, true, $T); + B.JSArray_methods.addAll$1(t1, chunk2); + t2 = A.List_List$of(chunk2, true, $T); + B.JSArray_methods.addAll$1(t2, chunk1); + t2 = A._setArrayType([t1, t2], $T._eval$1("JSArray>")); + t1 = t2; + break $label0$0; + } + return t1; + }, + paths0(choices, $T) { + return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure0($T)); + }, + _groupSelectors0(complex) { + var t2, t3, t4, + groups = A.QueueList$(null, type$.List_ComplexSelectorComponent_2), + t1 = type$.JSArray_ComplexSelectorComponent_2, + group = A._setArrayType([], t1); + for (t2 = complex.$ti, t3 = new A.ListIterator(complex, complex.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t3.moveNext$0();) { + t4 = t3.__internal$_current; + if (t4 == null) + t4 = t2._as(t4); + group.push(t4); + if (t4.combinators.length === 0) { + groups._queue_list$_add$1(group); + group = A._setArrayType([], t1); + } + } + if (group.length !== 0) + groups._queue_list$_add$1(group); + return groups; + }, + listIsSuperselector0(list1, list2) { + return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure0(list1)); + }, + _complexIsParentSuperselector0(complex1, complex2) { + var t1, base, t2; + if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) + return false; + t1 = $.$get$bogusSpan0(); + base = new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([new A.PlaceholderSelector0("", t1)], type$.JSArray_SimpleSelector_2), t1), A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), t1); + t1 = type$.ComplexSelectorComponent_2; + t2 = A.List_List$of(complex1, true, t1); + t2.push(base); + t1 = A.List_List$of(complex2, true, t1); + t1.push(base); + return A.complexIsSuperselector0(t2, t1); + }, + complexIsSuperselector0(complex1, complex2) { + var t1, t2, previousCombinator, i1, i2, remaining1, remaining2, component1, t3, t4, endOfSubselector, component2, t5, combinator1, _null = null; + if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) + return false; + if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) + return false; + for (t1 = A._arrayInstanceType(complex2), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), previousCombinator = _null, i1 = 0, i2 = 0; true; previousCombinator = combinator1) { + remaining1 = complex1.length - i1; + remaining2 = complex2.length - i2; + if (remaining1 === 0 || remaining2 === 0) + return false; + if (remaining1 > remaining2) + return false; + component1 = complex1[i1]; + t3 = component1.combinators; + if (t3.length > 1) + return false; + if (remaining1 === 1) + if (B.JSArray_methods.any$1(complex2, new A.complexIsSuperselector_closure1())) + return false; + else { + t1 = component1.selector; + t2 = B.JSArray_methods.get$last(complex2).selector; + return A.compoundIsSuperselector0(t1, t2, t1.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, complex2.length - 1) : _null); + } + for (t4 = component1.selector, endOfSubselector = i2; true;) { + component2 = complex2[endOfSubselector]; + if (component2.combinators.length > 1) + return false; + t5 = component2.selector; + if (A.compoundIsSuperselector0(t4, t5, t4.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, endOfSubselector) : _null)) + break; + ++endOfSubselector; + if (endOfSubselector === complex2.length - 1) + return false; + } + t4 = new A.SubListIterable(complex2, 0, endOfSubselector, t1); + t4.SubListIterable$3(complex2, 0, endOfSubselector, t2); + if (!A._compatibleWithPreviousCombinator0(previousCombinator, t4.skip$1(0, i2))) + return false; + component2 = complex2[endOfSubselector]; + combinator1 = A.IterableExtension_get_firstOrNull(t3); + if (!A._isSupercombinator0(combinator1, A.IterableExtension_get_firstOrNull(component2.combinators))) + return false; + ++i1; + i2 = endOfSubselector + 1; + if (complex1.length - i1 === 1) { + t3 = combinator1 == null; + if (J.$eq$(t3 ? _null : combinator1.value, B.Combinator_y180)) { + t3 = complex2.length - 1; + t4 = new A.SubListIterable(complex2, 0, t3, t1); + t4.SubListIterable$3(complex2, 0, t3, t2); + if (!t4.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure2(combinator1))) + return false; + } else if (!t3) + if (complex2.length - i2 > 1) + return false; + } + } + }, + _compatibleWithPreviousCombinator0(previous, parents) { + if (parents.get$isEmpty(parents)) + return true; + if (previous == null) + return true; + if (previous.value !== B.Combinator_y180) + return false; + return parents.every$1(0, new A._compatibleWithPreviousCombinator_closure0()); + }, + _isSupercombinator0(combinator1, combinator2) { + var t2, t3, + t1 = true; + if (!J.$eq$(combinator1, combinator2)) { + t2 = combinator1 == null; + if (t2) + t3 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_8I80); + else + t3 = false; + if (!t3) + if (J.$eq$(t2 ? null : combinator1.value, B.Combinator_y180)) + t1 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_gRV0); + else + t1 = false; + } + return t1; + }, + compoundIsSuperselector0(compound1, compound2, parents) { + var t1, _0_1, _0_5, _0_5_isSet, _0_50, index1, pseudo2, index2, t2, t3, pseudo1, t4, t5, _i, simple1, _null = null; + if (!compound1.get$hasComplicatedSuperselectorSemantics() && !compound2.get$hasComplicatedSuperselectorSemantics()) { + t1 = compound1.components; + if (t1.length > compound2.components.length) + return false; + return B.JSArray_methods.every$1(t1, new A.compoundIsSuperselector_closure0(compound2)); + } + _0_1 = A._findPseudoElementIndexed0(compound1); + _0_5 = A._findPseudoElementIndexed0(compound2); + t1 = type$.Record_2_nullable_Object_and_nullable_Object; + _0_5_isSet = t1._is(_0_1); + _0_50 = _null; + index1 = _null; + pseudo2 = _null; + index2 = _null; + t2 = false; + if (_0_5_isSet) { + t3 = _0_1 == null; + pseudo1 = (t3 ? t1._as(_0_1) : _0_1)._0; + index1 = (t3 ? t1._as(_0_1) : _0_1)._1; + t2 = t1._is(_0_5); + if (t2) { + t3 = _0_5 == null; + pseudo2 = (t3 ? t1._as(_0_5) : _0_5)._0; + index2 = (t3 ? t1._as(_0_5) : _0_5)._1; + } + t1 = t2; + _0_50 = _0_5; + } else { + t1 = t2; + pseudo1 = _null; + } + if (t1) { + if (pseudo1.isSuperselector$1(pseudo2)) { + t1 = compound1.components; + t2 = type$.int; + t3 = A._arrayInstanceType(t1)._precomputed1; + t4 = compound2.components; + t5 = A._arrayInstanceType(t4)._precomputed1; + t1 = A._compoundComponentsIsSuperselector0(A.SubListIterable$(t1, 0, A.checkNotNullable(index1, "count", t2), t3), A.SubListIterable$(t4, 0, A.checkNotNullable(index2, "count", t2), t5), parents) && A._compoundComponentsIsSuperselector0(A.SubListIterable$(t1, index1 + 1, _null, t3), A.SubListIterable$(t4, index2 + 1, _null, t5), parents); + } else + t1 = false; + return t1; + } + if (_0_1 == null) + t1 = (_0_5_isSet ? _0_50 : _0_5) != null; + else + t1 = true; + if (t1) + return false; + for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { + simple1 = t1[_i]; + if (simple1 instanceof A.PseudoSelector0) + t4 = simple1.selector != null; + else + t4 = false; + if (t4) { + if (!A._selectorPseudoIsSuperselector0(simple1, compound2, parents)) + return false; + } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) + return false; + } + return true; + }, + _findPseudoElementIndexed0(compound) { + var t1, t2, i, simple; + for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { + simple = t1[i]; + if (simple instanceof A.PseudoSelector0 && !simple.isClass) + return new A._Record_2(simple, i); + } + return null; + }, + _compoundComponentsIsSuperselector0(compound1, compound2, parents) { + var t1; + if (compound1.get$length(0) === 0) + return true; + if (compound2.get$length(0) === 0) + compound2 = A._setArrayType([new A.UniversalSelector0("*", $.$get$bogusSpan0())], type$.JSArray_SimpleSelector_2); + t1 = $.$get$bogusSpan0(); + return A.compoundIsSuperselector0(A.CompoundSelector$0(compound1, t1), A.CompoundSelector$0(compound2, t1), parents); + }, + _selectorPseudoIsSuperselector0(pseudo1, compound2, parents) { + var selector1 = pseudo1.selector; + if (selector1 == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); + switch (pseudo1.normalizedName) { + case "is": + case "matches": + case "any": + case "where": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure6(selector1)) || B.JSArray_methods.any$1(selector1.components, new A._selectorPseudoIsSuperselector_closure7(parents, compound2)); + case "has": + case "host": + case "host-context": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure8(selector1)); + case "slotted": + return A._selectorPseudoArgs0(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure9(selector1)); + case "not": + return B.JSArray_methods.every$1(selector1.components, new A._selectorPseudoIsSuperselector_closure10(compound2, pseudo1)); + case "current": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure11(selector1)); + case "nth-child": + case "nth-last-child": + return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure12(pseudo1, selector1)); + default: + throw A.wrapException("unreachable"); + } + }, + _selectorPseudoArgs0(compound, $name, isClass) { + var t1 = type$.WhereTypeIterable_PseudoSelector_2; + return new A.NonNullsIterable(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure1(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure2(), t1._eval$1("MappedIterable")), type$.NonNullsIterable_SelectorList_2); + }, + unifyComplex_closure0: function unifyComplex_closure0() { + }, + _weaveParents_closure3: function _weaveParents_closure3(t0) { + this.span = t0; + }, + _weaveParents_closure4: function _weaveParents_closure4(t0) { + this.group = t0; + }, + _weaveParents_closure5: function _weaveParents_closure5() { + }, + _weaveParents_closure6: function _weaveParents_closure6() { + }, + _mustUnify_closure0: function _mustUnify_closure0(t0) { + this.uniqueSelectors = t0; + }, + _mustUnify__closure0: function _mustUnify__closure0(t0) { + this.uniqueSelectors = t0; + }, + paths_closure0: function paths_closure0(t0) { + this.T = t0; + }, + paths__closure0: function paths__closure0(t0, t1) { + this.paths = t0; + this.T = t1; + }, + paths___closure0: function paths___closure0(t0, t1) { + this.option = t0; + this.T = t1; + }, + listIsSuperselector_closure0: function listIsSuperselector_closure0(t0) { + this.list1 = t0; + }, + listIsSuperselector__closure0: function listIsSuperselector__closure0(t0) { + this.complex1 = t0; + }, + complexIsSuperselector_closure1: function complexIsSuperselector_closure1() { + }, + complexIsSuperselector_closure2: function complexIsSuperselector_closure2(t0) { + this.combinator1 = t0; + }, + _compatibleWithPreviousCombinator_closure0: function _compatibleWithPreviousCombinator_closure0() { + }, + compoundIsSuperselector_closure0: function compoundIsSuperselector_closure0(t0) { + this.compound2 = t0; + }, + _selectorPseudoIsSuperselector_closure6: function _selectorPseudoIsSuperselector_closure6(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure7: function _selectorPseudoIsSuperselector_closure7(t0, t1) { + this.parents = t0; + this.compound2 = t1; + }, + _selectorPseudoIsSuperselector_closure8: function _selectorPseudoIsSuperselector_closure8(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure9: function _selectorPseudoIsSuperselector_closure9(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure10: function _selectorPseudoIsSuperselector_closure10(t0, t1) { + this.compound2 = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector__closure0: function _selectorPseudoIsSuperselector__closure0(t0, t1) { + this.complex = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector___closure1: function _selectorPseudoIsSuperselector___closure1(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector___closure2: function _selectorPseudoIsSuperselector___closure2(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector_closure11: function _selectorPseudoIsSuperselector_closure11(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure12: function _selectorPseudoIsSuperselector_closure12(t0, t1) { + this.pseudo1 = t0; + this.selector1 = t1; + }, + _selectorPseudoArgs_closure1: function _selectorPseudoArgs_closure1(t0, t1) { + this.isClass = t0; + this.name = t1; + }, + _selectorPseudoArgs_closure2: function _selectorPseudoArgs_closure2() { + }, + globalFunctions_closure0: function globalFunctions_closure0() { + }, + GamutMapMethod_GamutMapMethod$fromName0($name) { + var t1; + $label0$0: { + if ("clip" === $name) { + t1 = B.ClipGamutMap_clip0; + break $label0$0; + } + if ("local-minde" === $name) { + t1 = B.LocalMindeGamutMap_Q7f0; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0('Unknown gamut map method "' + $name + '".', null)); + } + return t1; + }, + GamutMapMethod0: function GamutMapMethod0() { + }, + HslColorSpace0: function HslColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + HwbColorSpace0: function HwbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + HwbColorSpace_convert_toRgb0: function HwbColorSpace_convert_toRgb0(t0, t1) { + this._box_0 = t0; + this.factor = t1; + }, + IDSelector0: function IDSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + IDSelector_unify_closure0: function IDSelector_unify_closure0(t0) { + this.$this = t0; + }, + IfExpression0: function IfExpression0(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + IfClause$0(expression, children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2); + return new A.IfClause0(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); + }, + ElseClause$0(children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2); + return new A.ElseClause0(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); + }, + IfRule0: function IfRule0(t0, t1, t2) { + this.clauses = t0; + this.lastClause = t1; + this.span = t2; + }, + IfRule_toString_closure0: function IfRule_toString_closure0() { + }, + IfRuleClause0: function IfRuleClause0() { + }, + IfRuleClause$__closure0: function IfRuleClause$__closure0() { + }, + IfRuleClause$___closure0: function IfRuleClause$___closure0() { + }, + IfClause0: function IfClause0(t0, t1, t2) { + this.expression = t0; + this.children = t1; + this.hasDeclarations = t2; + }, + ElseClause0: function ElseClause0(t0, t1) { + this.children = t0; + this.hasDeclarations = t1; + }, + jsToDartList(list) { + return self.immutable.isOrderedMap(list) ? J.toArray$0$x(type$.ImmutableList._as(list)) : type$.List_dynamic._as(list); + }, + dartMapToImmutableMap(dartMap) { + var t1, t2, + immutableMap = J.asMutable$0$x(new self.immutable.OrderedMap()); + for (t1 = A.MapExtensions_get_pairs0(dartMap, type$.Object, type$.nullable_Object), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + immutableMap = J.$set$2$x(immutableMap, t2._0, t2._1); + } + return J.asImmutable$0$x(immutableMap); + }, + immutableMapToDartMap(immutableMap) { + var dartMap = A.LinkedHashMap_LinkedHashMap$_empty(type$.Object, type$.nullable_Object); + J.forEach$1$ax(immutableMap, A.allowInterop(new A.immutableMapToDartMap_closure(dartMap))); + return dartMap; + }, + ImmutableList0: function ImmutableList0() { + }, + ImmutableMap0: function ImmutableMap0() { + }, + immutableMapToDartMap_closure: function immutableMapToDartMap_closure(t0) { + this.dartMap = t0; + }, + NodeImporter__addSassPath(includePaths) { + return new A._SyncStarIterable(A.NodeImporter__addSassPath$body(includePaths), type$._SyncStarIterable_String); + }, + NodeImporter__addSassPath$body($async$includePaths) { + return function() { + var includePaths = $async$includePaths; + var $async$goto = 0, $async$handler = 2, $async$currentError, sassPath, t1; + return function $async$NodeImporter__addSassPath($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return $async$iterator._yieldStar$1(includePaths); + case 3: + // after yield + sassPath = A.getEnvironmentVariable0("SASS_PATH"); + if (sassPath == null) { + // goto return + $async$goto = 1; + break; + } + t1 = A.isNodeJs() ? self.process : null; + $async$goto = 4; + return $async$iterator._yieldStar$1(A._setArrayType(sassPath.split(J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32") ? ";" : ":"), type$.JSArray_String)); + case 4: + // after yield + case 1: + // return + return 0; + case 2: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + NodeImporter: function NodeImporter(t0, t1, t2) { + this._implementation$_options = t0; + this._includePaths = t1; + this._implementation$_importers = t2; + }, + NodeImporter_load_closure: function NodeImporter_load_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.forImport = t2; + _.url = t3; + _.previousString = t4; + }, + NodeImporter__tryPath_closure: function NodeImporter__tryPath_closure(t0) { + this.path = t0; + }, + NodeImporter__tryPath_closure0: function NodeImporter__tryPath_closure0() { + }, + NodeImporter__callImporterAsync_closure: function NodeImporter__callImporterAsync_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.forImport = t2; + _.url = t3; + _.previousString = t4; + _.completer = t5; + }, + ModifiableCssImport0: function ModifiableCssImport0(t0, t1, t2) { + var _ = this; + _.url = t0; + _.modifiers = t1; + _.span = t2; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + ImportCache$0(importers, loadPaths, logger, packageConfig) { + var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2, + t3 = type$.Uri, + t4 = A.ImportCache__toImporters0(importers, loadPaths, packageConfig); + return new A.ImportCache0(t4, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); + }, + ImportCache$none(logger) { + var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2, + t3 = type$.Uri; + return new A.ImportCache0(B.List_empty25, logger, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); + }, + ImportCache__toImporters0(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable0("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_Importer_2); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_Importer_2); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + if (loadPaths != null) + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + ImportCache_wrapLogger0(logger, silenceDeprecations, fatalDeprecations, futureDeprecations, color) { + var t3, t4, + t1 = type$.Deprecation_3, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + return new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, false); + }, + ImportCache0: function ImportCache0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._import_cache$_importers = t0; + _._import_cache$_logger = t1; + _._import_cache$_canonicalizeCache = t2; + _._import_cache$_perImporterCanonicalizeCache = t3; + _._import_cache$_nonCanonicalRelativeUrls = t4; + _._import_cache$_importCache = t5; + _._import_cache$_resultsCache = t6; + }, + ImportCache_canonicalize_closure0: function ImportCache_canonicalize_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + ImportCache__canonicalize_closure0: function ImportCache__canonicalize_closure0(t0, t1) { + this.importer = t0; + this.url = t1; + }, + ImportCache_importCanonical_closure0: function ImportCache_importCanonical_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + _.quiet = t4; + }, + ImportCache_humanize_closure3: function ImportCache_humanize_closure3(t0) { + this.canonicalUrl = t0; + }, + ImportCache_humanize_closure4: function ImportCache_humanize_closure4() { + }, + ImportCache_humanize_closure5: function ImportCache_humanize_closure5() { + }, + ImportCache_humanize_closure6: function ImportCache_humanize_closure6(t0) { + this.canonicalUrl = t0; + }, + ImportRule0: function ImportRule0(t0, t1) { + this.imports = t0; + this.span = t1; + }, + JSImporter: function JSImporter() { + }, + JSImporterResult: function JSImporterResult() { + }, + Importer0: function Importer0() { + }, + NodeImporterResult0: function NodeImporterResult0() { + }, + IncludeRule0: function IncludeRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.content = t4; + _.span = t5; + }, + InterpolatedFunctionExpression0: function InterpolatedFunctionExpression0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + Interpolation$0(contents, span) { + var t1 = new A.Interpolation0(A.List_List$unmodifiable(contents, type$.Object), span); + t1.Interpolation$20(contents, span); + return t1; + }, + Interpolation0: function Interpolation0(t0, t1) { + this.contents = t0; + this.span = t1; + }, + Interpolation_toString_closure0: function Interpolation_toString_closure0() { + }, + SupportsInterpolation0: function SupportsInterpolation0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + InterpolationBuffer0: function InterpolationBuffer0(t0, t1) { + this._interpolation_buffer0$_text = t0; + this._interpolation_buffer0$_contents = t1; + }, + InterpolationMap$0(_interpolation, targetLocations) { + var t1 = A.List_List$unmodifiable(targetLocations, type$.SourceLocation), + t2 = _interpolation.contents.length, + expectedLocations = Math.max(0, t2 - 1); + if (t1.length !== expectedLocations) + A.throwExpression(A.ArgumentError$("InterpolationMap must have " + A.S(expectedLocations) + string$.x20targe + t2 + " components.", null)); + return new A.InterpolationMap0(_interpolation, t1); + }, + InterpolationMap0: function InterpolationMap0(t0, t1) { + this._interpolation_map$_interpolation = t0; + this._interpolation_map$_targetLocations = t1; + }, + InterpolationMap_mapException_closure0: function InterpolationMap_mapException_closure0() { + }, + InterpolationMethod$0(space, hue) { + var t1; + if (space.get$isPolarInternal()) + t1 = hue == null ? B.HueInterpolationMethod_00 : hue; + else + t1 = null; + if (!space.get$isPolarInternal() && hue != null) + A.throwExpression(A.ArgumentError$(string$.Hue_in + space.toString$0(0) + ".", null)); + return new A.InterpolationMethod0(space, t1); + }, + InterpolationMethod_InterpolationMethod$fromValue0(value, $name) { + var t1, space, hueMethod, + list = value.assertCommonListStyle$2$allowSlash($name, false); + if (list.length === 0) + throw A.wrapException(A.SassScriptException$0(string$.Expecta, $name)); + t1 = B.JSArray_methods.get$first(list).assertString$1($name); + t1.assertUnquoted$1($name); + space = A.ColorSpace_fromName0(t1._string0$_text, $name); + if (list.length === 1) + return A.InterpolationMethod$0(space, null); + hueMethod = A.HueInterpolationMethod_HueInterpolationMethod$_fromValue0(list[1], $name); + if (list.length === 2) + throw A.wrapException(A.SassScriptException$0('Expected unquoted string "hue" after ' + value.toString$0(0) + ".", $name)); + else { + t1 = list[2].assertString$1($name); + t1.assertUnquoted$1($name); + if (t1._string0$_text.toLowerCase() !== "hue") + throw A.wrapException(A.SassScriptException$0(string$.Expectu + value.toString$0(0) + ", was " + A.S(list[2]) + ".", $name)); + else if (list.length > 3) + throw A.wrapException(A.SassScriptException$0('Expected nothing after "hue" in ' + value.toString$0(0) + ".", $name)); + else if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$0('Hue interpolation method "' + hueMethod.toString$0(0) + string$.x20hue__ + space.toString$0(0) + ".", $name)); + } + return A.InterpolationMethod$0(space, hueMethod); + }, + HueInterpolationMethod_HueInterpolationMethod$_fromValue0(value, $name) { + var _0_0, + t1 = value.assertString$1($name); + t1.assertUnquoted$0(); + _0_0 = t1._string0$_text.toLowerCase(); + $label0$0: { + if ("shorter" === _0_0) { + t1 = B.HueInterpolationMethod_00; + break $label0$0; + } + if ("longer" === _0_0) { + t1 = B.HueInterpolationMethod_10; + break $label0$0; + } + if ("increasing" === _0_0) { + t1 = B.HueInterpolationMethod_20; + break $label0$0; + } + if ("decreasing" === _0_0) { + t1 = B.HueInterpolationMethod_30; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0("Unknown hue interpolation method " + value.toString$0(0) + ".", $name)); + } + return t1; + }, + InterpolationMethod0: function InterpolationMethod0(t0, t1) { + this.space = t0; + this.hue = t1; + }, + HueInterpolationMethod0: function HueInterpolationMethod0(t0) { + this._name = t0; + }, + _realCasePath0(path) { + var prefix, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (!t1) + return path; + t1 = A.isNodeJs() ? self.process : _null; + if (J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); + t1 = prefix.length; + if (t1 !== 0 && A.CharacterExtension_get_isAlphabetic0(prefix.charCodeAt(0))) + path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); + } + return new A._realCasePath_helper0().call$1(path); + }, + _realCasePath_helper0: function _realCasePath_helper0() { + }, + _realCasePath_helper_closure0: function _realCasePath_helper_closure0(t0, t1, t2) { + this.helper = t0; + this.dirname = t1; + this.path = t2; + }, + _realCasePath_helper__closure0: function _realCasePath_helper__closure0(t0) { + this.basename = t0; + }, + printError0(message) { + var t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) { + t1 = J.get$stderr$x(t1); + J.write$1$x(t1, A.S(message) + "\n"); + } else { + t1 = self.console; + J.error$1$x(t1, message); + } + }, + readFile0(path) { + var contents, sourceFile, t1, i; + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("readFile() is only supported on Node.js")); + contents = A._asString(A._readFile0(path, "utf8")); + if (!B.JSString_methods.contains$1(contents, "\ufffd")) + return contents; + sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); + for (t1 = contents.length, i = 0; i < t1; ++i) { + if (contents.charCodeAt(i) !== 65533) + continue; + throw A.wrapException(A.SassException$0("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0(), null)); + } + return contents; + }, + _readFile0(path, encoding) { + return A._systemErrorToFileSystemException0(new A._readFile_closure0(path, encoding)); + }, + fileExists0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$(string$.fileEx)); + return A._systemErrorToFileSystemException0(new A.fileExists_closure0(path)); + }, + dirExists0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("dirExists() is only supported on Node.js")); + return A._systemErrorToFileSystemException0(new A.dirExists_closure0(path)); + }, + listDir0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException0(new A.listDir_closure0(false, path)); + }, + getEnvironmentVariable0($name) { + var t1 = A.isNodeJs() ? self.process : null, + env = t1 == null ? null : J.get$env$x(t1); + if (env == null) + t1 = null; + else + t1 = A._asStringQ(env[$name]); + return t1; + }, + _systemErrorToFileSystemException0(callback) { + var error, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + if (!type$.JsSystemError._is(error)) + throw exception; + t1 = error; + t2 = J.getInterceptor$x(t1); + throw A.wrapException(new A.FileSystemException0(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); + } + }, + hasTerminal0() { + var t1 = A.isNodeJs() ? self.process : null; + return J.$eq$(t1 == null ? null : J.get$isTTY$x(J.get$stdout$x(t1)), true); + }, + FileSystemException0: function FileSystemException0(t0, t1) { + this.message = t0; + this.path = t1; + }, + _readFile_closure0: function _readFile_closure0(t0, t1) { + this.path = t0; + this.encoding = t1; + }, + fileExists_closure0: function fileExists_closure0(t0) { + this.path = t0; + }, + dirExists_closure0: function dirExists_closure0(t0) { + this.path = t0; + }, + listDir_closure0: function listDir_closure0(t0, t1) { + this.recursive = t0; + this.path = t1; + }, + listDir__closure1: function listDir__closure1(t0) { + this.path = t0; + }, + listDir__closure2: function listDir__closure2() { + }, + listDir_closure_list0: function listDir_closure_list0() { + }, + listDir__list_closure0: function listDir__list_closure0(t0, t1) { + this.parent = t0; + this.list = t1; + }, + main() { + J.set$compile$x(self.exports, A.allowInteropNamed("sass.compile", A.compile__compile$closure())); + J.set$compileString$x(self.exports, A.allowInteropNamed("sass.compileString", A.compile__compileString$closure())); + J.set$compileAsync$x(self.exports, A.allowInteropNamed("sass.compileAsync", A.compile__compileAsync$closure())); + J.set$compileStringAsync$x(self.exports, A.allowInteropNamed("sass.compileStringAsync", A.compile__compileStringAsync$closure())); + J.set$initCompiler$x(self.exports, A.allowInteropNamed("sass.initCompiler", A.compiler__initCompiler$closure())); + J.set$initAsyncCompiler$x(self.exports, A.allowInteropNamed("sass.initAsyncCompiler", A.compiler__initAsyncCompiler$closure())); + J.set$Compiler$x(self.exports, $.$get$compilerClass()); + J.set$AsyncCompiler$x(self.exports, $.$get$asyncCompilerClass()); + J.set$Value$x(self.exports, $.$get$valueClass()); + J.set$SassBoolean$x(self.exports, $.$get$booleanClass()); + J.set$SassArgumentList$x(self.exports, $.$get$argumentListClass()); + J.set$SassCalculation$x(self.exports, $.$get$calculationClass()); + J.set$CalculationOperation$x(self.exports, $.$get$calculationOperationClass()); + J.set$CalculationInterpolation$x(self.exports, $.$get$calculationInterpolationClass()); + J.set$SassColor$x(self.exports, $.$get$colorClass()); + J.set$SassFunction$x(self.exports, $.$get$functionClass()); + J.set$SassMixin$x(self.exports, $.$get$mixinClass()); + J.set$SassList$x(self.exports, $.$get$listClass()); + J.set$SassMap$x(self.exports, $.$get$mapClass()); + J.set$SassNumber$x(self.exports, $.$get$numberClass()); + J.set$SassString$x(self.exports, $.$get$stringClass()); + J.set$sassNull$x(self.exports, B.C__SassNull0); + J.set$sassTrue$x(self.exports, B.SassBoolean_true0); + J.set$sassFalse$x(self.exports, B.SassBoolean_false0); + J.set$Exception$x(self.exports, $.$get$exceptionClass()); + J.set$Logger$x(self.exports, {silent: {warn: A.allowInteropNamed("sass.Logger.silent.warn", new A.main_closure()), debug: A.allowInteropNamed("sass.Logger.silent.debug", new A.main_closure0())}}); + J.set$NodePackageImporter$x(self.exports, $.$get$nodePackageImporterClass()); + J.set$deprecations$x(self.exports, A.jsify($.$get$deprecations())); + J.set$Version$x(self.exports, $.$get$versionClass()); + J.set$loadParserExports_$x(self.exports, A.allowInterop(A.parser0__loadParserExports$closure())); + J.set$info$x(self.exports, "dart-sass\t1.79.3\t(Sass Compiler)\t[Dart]\ndart2js\t3.5.3\t(Dart Compiler)\t[Dart]"); + A.updateCanonicalizeContextPrototype(); + A.updateSourceSpanPrototype(); + J.set$render$x(self.exports, A.allowInteropNamed("sass.render", A.legacy__render$closure())); + J.set$renderSync$x(self.exports, A.allowInteropNamed("sass.renderSync", A.legacy__renderSync$closure())); + J.set$types$x(self.exports, {Boolean: $.$get$legacyBooleanClass(), Color: $.$get$legacyColorClass(), List: $.$get$legacyListClass(), Map: $.$get$legacyMapClass(), Null: $.$get$legacyNullClass(), Number: $.$get$legacyNumberClass(), String: $.$get$legacyStringClass(), Error: self.Error}); + J.set$NULL$x(self.exports, B.C__SassNull0); + J.set$TRUE$x(self.exports, B.SassBoolean_true0); + J.set$FALSE$x(self.exports, B.SassBoolean_false0); + }, + main_closure: function main_closure() { + }, + main_closure0: function main_closure0() { + }, + JSToDartLogger: function JSToDartLogger(t0, t1, t2) { + this._node = t0; + this._fallback = t1; + this._ascii = t2; + }, + JSToDartLogger_internalWarn_closure: function JSToDartLogger_internalWarn_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.message = t1; + _.span = t2; + _.trace = t3; + _.deprecation = t4; + }, + JSToDartLogger_debug_closure: function JSToDartLogger_debug_closure(t0, t1, t2) { + this.$this = t0; + this.message = t1; + this.span = t2; + }, + ModifiableCssKeyframeBlock$0(selector, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssKeyframeBlock0(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssKeyframeBlock0: function ModifiableCssKeyframeBlock0(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _._node$_children = t3; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + KeyframeSelectorParser$0(contents, interpolationMap, logger) { + var t1 = A.SpanScanner$(contents, null); + return new A.KeyframeSelectorParser0(t1, logger, interpolationMap); + }, + KeyframeSelectorParser0: function KeyframeSelectorParser0(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._parser1$_interpolationMap = t2; + }, + KeyframeSelectorParser_parse_closure0: function KeyframeSelectorParser_parse_closure0(t0) { + this.$this = t0; + }, + LabColorSpace0: function LabColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + LazyFileSpan0: function LazyFileSpan0(t0) { + this._lazy_file_span0$_builder = t0; + this._lazy_file_span0$_span = null; + }, + LchColorSpace0: function LchColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + render(options, callback) { + var _0_0; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The render() method is only available in Node.js.")); + _0_0 = J.get$fiber$x(options); + if (_0_0 != null) + J.run$0$x(_0_0.call$1(A.allowInterop(new A.render_closure(callback, options)))); + else + A._renderAsync(options).then$1$2$onError(0, new A.render_closure0(callback), new A.render_closure1(callback), type$.Null); + }, + _renderAsync(options) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.RenderResult), + $async$returnValue, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, result, start, t1, file, t2, t3, t4, logger, _0_0; + var $async$_renderAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + start = new A.DateTime(Date.now(), 0, false); + t1 = J.getInterceptor$x(options); + file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); + t2 = t1.get$logger(options); + t3 = A.hasTerminal0(); + t4 = $._glyphs; + logger = new A.JSToDartLogger(t2, new A.StderrLogger0(t3), t4 === B.C_AsciiGlyphSet); + _0_0 = t1.get$data(options); + $async$goto = _0_0 != null ? 3 : 5; + break; + case 3: + // then + t2 = A._parseImporter(options, start); + t3 = A._parsePackageImportersAsync(options, start); + t4 = A._parseFunctions(options, start, true); + t5 = t1.get$indentedSyntax(options); + t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_sass0 : null; + t6 = A._parseOutputStyle(t1.get$outputStyle(options)); + t7 = J.$eq$(t1.get$indentType(options), "tab"); + t8 = A._parseIndentWidth(t1.get$indentWidth(options)); + t9 = A._parseLineFeed(t1.get$linefeed(options)); + t10 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); + t11 = t1.get$quietDeps(options); + if (t11 == null) + t11 = false; + t12 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t13 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t14 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t15 = t1.get$verbose(options); + if (t15 == null) + t15 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + $async$goto = 6; + return A._asyncAwait(A.compileStringAsync0(_0_0, t1, t12, t4, t13, t3, null, t8, t9, logger, t2, t11, t14, A._enableSourceMaps(options), t6, t5, t10, !t7, t15), $async$_renderAsync); + case 6: + // returning from await. + result = $async$result; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = file != null ? 7 : 9; + break; + case 7: + // then + t2 = A._parseImporter(options, start); + t3 = A._parsePackageImportersAsync(options, start); + t4 = A._parseFunctions(options, start, true); + t5 = t1.get$indentedSyntax(options); + t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_sass0 : null; + t6 = A._parseOutputStyle(t1.get$outputStyle(options)); + t7 = J.$eq$(t1.get$indentType(options), "tab"); + t8 = A._parseIndentWidth(t1.get$indentWidth(options)); + t9 = A._parseLineFeed(t1.get$linefeed(options)); + t10 = t1.get$quietDeps(options); + if (t10 == null) + t10 = false; + t11 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t12 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t13 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t14 = t1.get$verbose(options); + if (t14 == null) + t14 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + $async$goto = 10; + return A._asyncAwait(A.compileAsync0(file, t1, t11, t4, t12, t3, t8, t9, logger, t2, t10, t13, A._enableSourceMaps(options), t6, t5, !t7, t14), $async$_renderAsync); + case 10: + // returning from await. + result = $async$result; + // goto join + $async$goto = 8; + break; + case 9: + // else + throw A.wrapException(A.ArgumentError$(string$.Either, null)); + case 8: + // join + case 4: + // join + $async$returnValue = A._newRenderResult(options, result, start); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_renderAsync, $async$completer); + }, + renderSync(options) { + var start, result, file, logger, _0_0, data, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, exception, _null = null; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The renderSync() method is only available in Node.js.")); + try { + start = new A.DateTime(Date.now(), 0, false); + result = null; + t1 = J.getInterceptor$x(options); + file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); + t2 = t1.get$logger(options); + t3 = A.hasTerminal0(); + t4 = $._glyphs; + logger = new A.JSToDartLogger(t2, new A.StderrLogger0(t3), t4 === B.C_AsciiGlyphSet); + _0_0 = t1.get$data(options); + data = null; + if (_0_0 != null) { + data = _0_0; + t2 = data; + t3 = A._parseImporter(options, start); + t4 = A._parsePackageImporters(options, start); + t5 = A._parseFunctions(options, start, false); + t6 = t1.get$indentedSyntax(options); + t6 = !J.$eq$(t6, false) && t6 != null ? B.Syntax_Sass_sass0 : _null; + t7 = A._parseOutputStyle(t1.get$outputStyle(options)); + t8 = J.$eq$(t1.get$indentType(options), "tab"); + t9 = A._parseIndentWidth(t1.get$indentWidth(options)); + t10 = A._parseLineFeed(t1.get$linefeed(options)); + t11 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); + t12 = t1.get$quietDeps(options); + if (t12 == null) + t12 = false; + t13 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t14 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t15 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t16 = t1.get$verbose(options); + if (t16 == null) + t16 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + result = A.compileString(t2, t1, t13, new A.CastList(t5, A._arrayInstanceType(t5)._eval$1("CastList<1,Callable>")), t14, t4, _null, t9, t10, logger, t3, t12, t15, A._enableSourceMaps(options), t7, t6, t11, !t8, t16); + } else if (file != null) { + t2 = A._parseImporter(options, start); + t3 = A._parsePackageImporters(options, start); + t4 = A._parseFunctions(options, start, false); + t5 = t1.get$indentedSyntax(options); + t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_sass0 : _null; + t6 = A._parseOutputStyle(t1.get$outputStyle(options)); + t7 = J.$eq$(t1.get$indentType(options), "tab"); + t8 = A._parseIndentWidth(t1.get$indentWidth(options)); + t9 = A._parseLineFeed(t1.get$linefeed(options)); + t10 = t1.get$quietDeps(options); + if (t10 == null) + t10 = false; + t11 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t12 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t13 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t14 = t1.get$verbose(options); + if (t14 == null) + t14 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + result = A.compile(file, t1, t11, new A.CastList(t4, A._arrayInstanceType(t4)._eval$1("CastList<1,Callable>")), t12, t3, t8, t9, logger, t2, t10, t13, A._enableSourceMaps(options), t6, t5, !t7, t14); + } else { + t1 = A.ArgumentError$(string$.Either, _null); + throw A.wrapException(t1); + } + t1 = A._newRenderResult(options, result, start); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.jsThrow(A._wrapException(error, stackTrace)); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = J.toString$0$(error0); + t2 = A.getTrace0(error0); + A.jsThrow(A._newRenderError(t1, t2 == null ? stackTrace0 : t2, _null, _null, _null, 3)); + } + } + }, + _wrapException(exception, stackTrace) { + var t2, t3, t4, t5, + t1 = A.SourceSpanException.prototype.get$span.call(exception, 0), + _0_0 = t1.get$sourceUrl(t1); + $label0$0: { + if (_0_0 == null) { + t1 = "stdin"; + break $label0$0; + } + if ("file" === _0_0.get$scheme()) { + t1 = $.$get$context().style.pathFromUri$1(A._parseUri(_0_0)); + break $label0$0; + } + t1 = _0_0.toString$0(0); + break $label0$0; + } + t2 = B.JSString_methods.replaceFirst$2(exception.toString$0(0), "Error: ", ""); + t3 = A.getTrace0(exception); + if (t3 == null) + t3 = stackTrace; + t4 = A.SourceSpanException.prototype.get$span.call(exception, 0); + t4 = t4.get$start(t4); + t4 = t4.file.getLine$1(t4.offset); + t5 = A.SourceSpanException.prototype.get$span.call(exception, 0); + t5 = t5.get$start(t5); + return A._newRenderError(t2, t3, t5.file.getColumn$1(t5.offset) + 1, t1, t4 + 1, 1); + }, + _parseFunctions(options, start, asynch) { + var result, + functions = J.get$functions$x(options); + if (functions == null) + return B.List_empty26; + result = A._setArrayType([], type$.JSArray_AsyncCallable_2); + A.jsForEach(functions, new A._parseFunctions_closure(options, start, result, asynch)); + return result; + }, + _parseImporter(options, start) { + var t2, t3, contextOptions, _1_0, importers, _box_0 = {}, + t1 = J.getInterceptor$x(options), + _0_0 = t1.get$importer(options); + $label0$0: { + if (_0_0 == null) { + t2 = A._setArrayType([], type$.JSArray_JSFunction); + break $label0$0; + } + if (type$.List_nullable_Object._is(_0_0)) { + t2 = J.cast$1$0$ax(_0_0, type$.JSFunction); + break $label0$0; + } + t2 = A._setArrayType([type$.JSFunction._as(_0_0)], type$.JSArray_JSFunction); + break $label0$0; + } + t3 = J.getInterceptor$asx(t2); + contextOptions = t3.get$isNotEmpty(t2) ? A._contextOptions(options, start) : new A.Object(); + _1_0 = t1.get$fiber(options); + _box_0.fiber = null; + if (_1_0 != null) { + _box_0.fiber = _1_0; + t2 = t3.map$1$1(t2, new A._parseImporter_closure(_box_0), type$.JSFunction); + importers = A.List_List$of(t2, true, t2.$ti._eval$1("ListIterable.E")); + } else + importers = t2; + t1 = t1.get$includePaths(options); + if (t1 == null) + t1 = []; + t2 = type$.String; + return new A.NodeImporter(contextOptions, A.List_List$unmodifiable(A.NodeImporter__addSassPath(A.List_List$from(t1, true, t2)), t2), A.List_List$unmodifiable(J.cast$1$0$ax(importers, type$.dynamic), type$.JSFunction)); + }, + _parsePackageImportersAsync(options, start) { + var t2, t3, t4, + t1 = J.getInterceptor$x(options); + if (t1.get$pkgImporter(options) instanceof A.NodePackageImporter0) { + t1 = t1.get$pkgImporter(options); + t1.toString; + t2 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2; + t3 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2; + t4 = type$.Uri; + t1 = A.List_List$unmodifiable(A._setArrayType([t1], type$.JSArray_AsyncImporter), type$.AsyncImporter); + return new A.AsyncImportCache0(t1, new A.StderrLogger0(false), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult_2)); + } + return null; + }, + _parsePackageImporters(options, start) { + var t2, t3, t4, + t1 = J.getInterceptor$x(options); + if (t1.get$pkgImporter(options) instanceof A.NodePackageImporter0) { + t1 = t1.get$pkgImporter(options); + t1.toString; + t2 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2; + t3 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2; + t4 = type$.Uri; + t1 = A.List_List$unmodifiable(A._setArrayType([t1], type$.JSArray_Importer_2), type$.Importer); + return new A.ImportCache0(t1, new A.StderrLogger0(false), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult_2)); + } + return null; + }, + _contextOptions(options, start) { + var includePaths, t3, t4, t5, t6, t7, + t1 = J.getInterceptor$x(options), + t2 = t1.get$includePaths(options); + if (t2 == null) + t2 = []; + includePaths = A.List_List$from(t2, true, type$.String); + t2 = t1.get$file(options); + t3 = t1.get$data(options); + t4 = A._setArrayType([A.current()], type$.JSArray_String); + B.JSArray_methods.addAll$1(t4, includePaths); + t5 = A.isNodeJs() ? self.process : null; + t4 = B.JSArray_methods.join$1(t4, J.$eq$(t5 == null ? null : J.get$platform$x(t5), "win32") ? ";" : ":"); + t5 = J.$eq$(t1.get$indentType(options), "tab") ? 1 : 0; + t6 = A._parseIndentWidth(t1.get$indentWidth(options)); + if (t6 == null) + t6 = 2; + t7 = A._parseLineFeed(t1.get$linefeed(options)); + t1 = t1.get$file(options); + if (t1 == null) + t1 = "data"; + return {file: t2, data: t3, includePaths: t4, precision: 10, style: 1, indentType: t5, indentWidth: t6, linefeed: t7.text, result: {stats: {start: start._value, entry: t1}}}; + }, + _parseOutputStyle(style) { + var t1; + $label0$0: { + if (style == null || "expanded" === style) { + t1 = B.OutputStyle_00; + break $label0$0; + } + if ("compressed" === style) { + t1 = B.OutputStyle_10; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown output style "' + A.S(style) + '".')); + } + return t1; + }, + _parseIndentWidth(width) { + var t1; + $label0$0: { + if (width == null) { + t1 = null; + break $label0$0; + } + if (A._isInt(width)) { + t1 = width; + break $label0$0; + } + t1 = A.int_parse(J.toString$0$(width), null); + break $label0$0; + } + return t1; + }, + _parseLineFeed(str) { + var t1; + $label0$0: { + if ("cr" === str) { + t1 = B.LineFeed_89t; + break $label0$0; + } + if ("crlf" === str) { + t1 = B.LineFeed_A4L; + break $label0$0; + } + if ("lfcr" === str) { + t1 = B.LineFeed_75j; + break $label0$0; + } + t1 = B.LineFeed_LvD; + break $label0$0; + } + return t1; + }, + _newRenderResult(options, result, start) { + var t2, sourceMapOption, sourceMapPath, t3, sourceMapDir, outFile, _0_0, t4, sourceMapDirUrl, i, source, t5, buffer, indices, url, t6, t7, t8, _null = null, + end = new A.DateTime(Date.now(), 0, false), + t1 = result._compile_result$_serialize, + css = t1._0, + sourceMapBytes = type$.Null._as(self.undefined); + if (A._enableSourceMaps(options)) { + t2 = J.getInterceptor$x(options); + sourceMapOption = t2.get$sourceMap(options); + if (typeof sourceMapOption == "string") + sourceMapPath = sourceMapOption; + else { + t3 = t2.get$outFile(options); + t3.toString; + sourceMapPath = J.$add$ansx(t3, ".map"); + } + t3 = $.$get$context(); + sourceMapDir = t3.dirname$1(sourceMapPath); + t1 = t1._1; + t1.toString; + t1.sourceRoot = t2.get$sourceMapRoot(options); + outFile = t2.get$outFile(options); + if (outFile == null) { + _0_0 = t2.get$file(options); + $label0$0: { + if (_0_0 != null) { + t4 = t3.toUri$1(t3.withoutExtension$1(_0_0) + ".css").toString$0(0); + break $label0$0; + } + t4 = t1.targetUrl = "stdin.css"; + break $label0$0; + } + t1.targetUrl = t4; + } else + t1.targetUrl = t3.toUri$1(t3.relative$2$from(outFile, sourceMapDir)).toString$0(0); + sourceMapDirUrl = t3.toUri$1(sourceMapDir).toString$0(0); + for (t3 = t1.urls, i = 0; i < t3.length; ++i) { + source = t3[i]; + if (source === "stdin") + continue; + t4 = $.$get$url(); + t5 = t4.style; + if (t5.rootLength$1(source) <= 0 || t5.isRootRelative$1(source)) + continue; + t3[i] = t4.relative$2$from(source, sourceMapDirUrl); + } + t3 = t2.get$sourceMapContents(options); + sourceMapBytes = self.Buffer.from(B.C_JsonCodec.encode$2$toEncodable(t1.toJson$1$includeSourceContents(!J.$eq$(t3, false) && t3 != null), _null), "utf8"); + t1 = t2.get$omitSourceMapUrl(options); + if (!(!J.$eq$(t1, false) && t1 != null)) { + t1 = t2.get$sourceMapEmbed(options); + if (!J.$eq$(t1, false) && t1 != null) { + buffer = new A.StringBuffer(""); + indices = A._setArrayType([-1], type$.JSArray_int); + A.UriData__writeUri("application/json", _null, _null, buffer, indices); + indices.push(buffer._contents.length); + t1 = buffer._contents += ";base64,"; + indices.push(t1.length - 1); + t1 = B.C_Base64Encoder.startChunkedConversion$1(new A._StringSinkConversionSink(buffer)); + t2 = sourceMapBytes.length; + A.RangeError_checkValidRange(0, t2, t2); + t1._convert$_add$4(sourceMapBytes, 0, t2, true); + t1 = buffer._contents; + url = new A.UriData(t1.charCodeAt(0) == 0 ? t1 : t1, indices, _null).get$uri(); + } else { + if (outFile == null) + t1 = sourceMapPath; + else { + t1 = $.$get$context(); + t1 = t1.relative$2$from(sourceMapPath, t1.dirname$1(outFile)); + } + url = $.$get$context().toUri$1(t1); + } + t1 = url.toString$0(0); + css += "\n\n/*# sourceMappingURL=" + A.stringReplaceAllUnchecked(t1, "*/", "%2A/") + " */"; + } + } + t1 = self.Buffer.from(css, "utf8"); + t2 = J.get$file$x(options); + if (t2 == null) + t2 = "data"; + t3 = start._value; + t4 = end._value; + t5 = B.JSInt_methods._tdivFast$1(A.Duration$(end._microsecond - start._microsecond, t4 - t3)._duration, 1000); + t6 = A._setArrayType([], type$.JSArray_String); + for (t7 = result._evaluate._0, t7 = t7.get$iterator(t7); t7.moveNext$0();) { + t8 = t7.get$current(t7); + t6.push(t8.get$scheme() === "file" ? $.$get$context().style.pathFromUri$1(A._parseUri(t8)) : t8.toString$0(0)); + } + return {css: t1, map: sourceMapBytes, stats: {entry: t2, start: t3, end: t4, duration: t5, includedFiles: t6}}; + }, + _enableSourceMaps(options) { + var t2, + t1 = J.getInterceptor$x(options); + if (typeof t1.get$sourceMap(options) != "string") { + t2 = t1.get$sourceMap(options); + t1 = !J.$eq$(t2, false) && t2 != null && t1.get$outFile(options) != null; + } else + t1 = true; + return t1; + }, + _newRenderError(message, stackTrace, column, file, line, $status) { + var error = new self.Error(message); + error.formatted = "Error: " + message; + if (line != null) + error.line = line; + if (column != null) + error.column = column; + if (file != null) + error.file = file; + error.status = $status; + A.attachJsStack(error, stackTrace); + return error; + }, + render_closure: function render_closure(t0, t1) { + this.callback = t0; + this.options = t1; + }, + render_closure0: function render_closure0(t0) { + this.callback = t0; + }, + render_closure1: function render_closure1(t0) { + this.callback = t0; + }, + _parseFunctions_closure: function _parseFunctions_closure(t0, t1, t2, t3) { + var _ = this; + _.options = t0; + _.start = t1; + _.result = t2; + _.asynch = t3; + }, + _parseFunctions__closure: function _parseFunctions__closure(t0, t1, t2) { + this._box_0 = t0; + this.callback = t1; + this.context = t2; + }, + _parseFunctions___closure2: function _parseFunctions___closure2(t0) { + this.currentFiber = t0; + }, + _parseFunctions____closure: function _parseFunctions____closure(t0, t1) { + this.currentFiber = t0; + this.result = t1; + }, + _parseFunctions___closure3: function _parseFunctions___closure3(t0, t1, t2) { + this.callback = t0; + this.context = t1; + this.jsArguments = t2; + }, + _parseFunctions___closure4: function _parseFunctions___closure4(t0) { + this._box_0 = t0; + }, + _parseFunctions__closure0: function _parseFunctions__closure0(t0, t1) { + this.callback = t0; + this.context = t1; + }, + _parseFunctions___closure1: function _parseFunctions___closure1(t0, t1, t2) { + this.callback = t0; + this.context = t1; + this.$arguments = t2; + }, + _parseFunctions__closure1: function _parseFunctions__closure1(t0, t1) { + this.callback = t0; + this.context = t1; + }, + _parseFunctions___closure: function _parseFunctions___closure(t0) { + this.completer = t0; + }, + _parseFunctions___closure0: function _parseFunctions___closure0(t0, t1, t2) { + this.callback = t0; + this.context = t1; + this.jsArguments = t2; + }, + _parseImporter_closure: function _parseImporter_closure(t0) { + this._box_0 = t0; + }, + _parseImporter__closure: function _parseImporter__closure(t0, t1) { + this._box_0 = t0; + this.importer = t1; + }, + _parseImporter___closure: function _parseImporter___closure(t0) { + this.currentFiber = t0; + }, + _parseImporter____closure: function _parseImporter____closure(t0, t1) { + this.currentFiber = t0; + this.result = t1; + }, + _parseImporter___closure0: function _parseImporter___closure0(t0) { + this._box_0 = t0; + }, + LimitedMapView$blocklist0(_map, blocklist, $K, $V) { + var t2, key, + t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); + for (t2 = J.get$iterator$ax(_map.get$keys(_map)); t2.moveNext$0();) { + key = t2.get$current(t2); + if (!blocklist.contains$1(0, key)) + t1.add$1(0, key); + } + return new A.LimitedMapView0(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView0<1,2>")); + }, + LimitedMapView0: function LimitedMapView0(t0, t1, t2) { + this._limited_map_view0$_map = t0; + this._limited_map_view0$_keys = t1; + this.$ti = t2; + }, + ListExpression0: function ListExpression0(t0, t1, t2, t3) { + var _ = this; + _.contents = t0; + _.separator = t1; + _.hasBrackets = t2; + _.span = t3; + }, + ListExpression_toString_closure0: function ListExpression_toString_closure0(t0) { + this.$this = t0; + }, + _function11($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:list"); + }, + _length_closure2: function _length_closure2() { + }, + _nth_closure0: function _nth_closure0() { + }, + _setNth_closure0: function _setNth_closure0() { + }, + _join_closure0: function _join_closure0() { + }, + _append_closure2: function _append_closure2() { + }, + _zip_closure0: function _zip_closure0() { + }, + _zip__closure2: function _zip__closure2() { + }, + _zip__closure3: function _zip__closure3(t0) { + this._box_0 = t0; + }, + _zip__closure4: function _zip__closure4(t0) { + this._box_0 = t0; + }, + _index_closure2: function _index_closure2() { + }, + _separator_closure0: function _separator_closure0() { + }, + _isBracketed_closure0: function _isBracketed_closure0() { + }, + _slash_closure0: function _slash_closure0() { + }, + SelectorList$0(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector_2); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.SelectorList0(t1, span); + }, + SelectorList_SelectorList$parse0(contents, allowParent, interpolationMap, logger, plainCss) { + return A.SelectorParser$0(contents, allowParent, interpolationMap, logger, plainCss, null).parse$0(0); + }, + SelectorList0: function SelectorList0(t0, t1) { + this.components = t0; + this.span = t1; + }, + SelectorList_asSassList_closure0: function SelectorList_asSassList_closure0() { + }, + SelectorList_nestWithin_closure0: function SelectorList_nestWithin_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.preserveParentSelectors = t1; + _.implicitParent = t2; + _.parent = t3; + }, + SelectorList_nestWithin__closure1: function SelectorList_nestWithin__closure1(t0) { + this.complex = t0; + }, + SelectorList_nestWithin__closure2: function SelectorList_nestWithin__closure2(t0) { + this.complex = t0; + }, + SelectorList__nestWithinCompound_closure2: function SelectorList__nestWithinCompound_closure2() { + }, + SelectorList__nestWithinCompound_closure3: function SelectorList__nestWithinCompound_closure3(t0) { + this.parent = t0; + }, + SelectorList__nestWithinCompound_closure4: function SelectorList__nestWithinCompound_closure4(t0, t1, t2) { + this.parentSelector = t0; + this.resolvedSimples = t1; + this.component = t2; + }, + SelectorList_withAdditionalCombinators_closure0: function SelectorList_withAdditionalCombinators_closure0(t0) { + this.combinators = t0; + }, + _ParentSelectorVisitor0: function _ParentSelectorVisitor0() { + }, + __ParentSelectorVisitor_Object_SelectorSearchVisitor0: function __ParentSelectorVisitor_Object_SelectorSearchVisitor0() { + }, + listClass_closure: function listClass_closure() { + }, + listClass__closure: function listClass__closure() { + }, + listClass__closure0: function listClass__closure0() { + }, + _ConstructorOptions: function _ConstructorOptions() { + }, + _NodeSassList: function _NodeSassList() { + }, + legacyListClass_closure: function legacyListClass_closure() { + }, + legacyListClass__closure: function legacyListClass__closure() { + }, + legacyListClass_closure0: function legacyListClass_closure0() { + }, + legacyListClass_closure1: function legacyListClass_closure1() { + }, + legacyListClass_closure2: function legacyListClass_closure2() { + }, + legacyListClass_closure3: function legacyListClass_closure3() { + }, + legacyListClass_closure4: function legacyListClass_closure4() { + }, + SassList$0(contents, _separator, brackets) { + var t1 = new A.SassList0(A.List_List$unmodifiable(contents, type$.Value_2), _separator, brackets); + t1.SassList$3$brackets0(contents, _separator, brackets); + return t1; + }, + SassList0: function SassList0(t0, t1, t2) { + this._list1$_contents = t0; + this._list1$_separator = t1; + this._list1$_hasBrackets = t2; + }, + SassList_isBlank_closure0: function SassList_isBlank_closure0() { + }, + ListSeparator0: function ListSeparator0(t0, t1, t2) { + this._list1$_name = t0; + this.separator = t1; + this._name = t2; + }, + LmsColorSpace0: function LmsColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + LocalMindeGamutMap0: function LocalMindeGamutMap0(t0) { + this.name = t0; + }, + JSLogger: function JSLogger() { + }, + WarnOptions: function WarnOptions() { + }, + DebugOptions: function DebugOptions() { + }, + WarnForDeprecation_warnForDeprecation0(_this, deprecation, message, span, trace) { + if (deprecation.isFuture && !(_this instanceof A.DeprecationProcessingLogger0)) + return; + if (_this instanceof A.LoggerWithDeprecationType) + _this.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + else + _this.warn$4$deprecation$span$trace(0, message, true, span, trace); + }, + LoggerWithDeprecationType: function LoggerWithDeprecationType() { + }, + _QuietLogger0: function _QuietLogger0() { + }, + LoudComment0: function LoudComment0(t0) { + this.text = t0; + }, + MapExpression0: function MapExpression0(t0, t1) { + this.pairs = t0; + this.span = t1; + }, + _modify0(map, keys, modify, addNesting) { + var keyIterator = J.get$iterator$ax(keys); + return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap0(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); + }, + _deepMergeImpl0(map1, map2) { + var t2, t3, result, t4, key, value, _1_1, _1_3, _1_3_isSet, _1_30, resultMap, valueMap, merged, + t1 = map1._map0$_contents; + if (t1.get$isEmpty(t1)) + return map2; + t2 = map2._map0$_contents; + if (t2.get$isEmpty(t2)) + return map1; + t3 = type$.Value_2; + result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); + for (t1 = A.MapExtensions_get_pairs0(t2, t3, t3), t1 = t1.get$iterator(t1), t2 = type$.SassMap_2; t1.moveNext$0();) { + t4 = t1.get$current(t1); + key = t4._0; + value = t4._1; + t4 = result.$index(0, key); + _1_1 = t4 == null ? null : t4.tryMap$0(); + _1_3 = value.tryMap$0(); + _1_3_isSet = _1_1 != null; + _1_30 = null; + t4 = false; + if (_1_3_isSet) { + resultMap = _1_1 == null ? t2._as(_1_1) : _1_1; + t4 = _1_3 != null; + _1_30 = _1_3; + } else + resultMap = null; + if (t4) { + valueMap = _1_3_isSet ? _1_30 : _1_3; + merged = A._deepMergeImpl0(resultMap, valueMap == null ? t2._as(valueMap) : valueMap); + if (merged === resultMap) + continue; + result.$indexSet(0, key, merged); + } else + result.$indexSet(0, key, value); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(result, t3, t3)); + }, + _function10($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:map"); + }, + _get_closure0: function _get_closure0() { + }, + _set_closure1: function _set_closure1() { + }, + _set__closure2: function _set__closure2(t0) { + this.$arguments = t0; + }, + _set_closure2: function _set_closure2() { + }, + _set__closure1: function _set__closure1(t0) { + this._box_0 = t0; + }, + _merge_closure1: function _merge_closure1() { + }, + _merge_closure2: function _merge_closure2() { + }, + _merge__closure0: function _merge__closure0(t0) { + this.map2 = t0; + }, + _deepMerge_closure0: function _deepMerge_closure0() { + }, + _deepRemove_closure0: function _deepRemove_closure0() { + }, + _deepRemove__closure0: function _deepRemove__closure0(t0) { + this.keys = t0; + }, + _remove_closure1: function _remove_closure1() { + }, + _remove_closure2: function _remove_closure2() { + }, + _keys_closure0: function _keys_closure0() { + }, + _values_closure0: function _values_closure0() { + }, + _hasKey_closure0: function _hasKey_closure0() { + }, + _modify_modifyNestedMap0: function _modify_modifyNestedMap0(t0, t1, t2) { + this.keyIterator = t0; + this.modify = t1; + this.addNesting = t2; + }, + MapExtensions_get_pairs0(_this, $K, $V) { + return _this.get$entries(_this).map$1$1(0, new A.MapExtensions_get_pairs_closure0($K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("+(1,2)")); + }, + MapExtensions_get_pairs_closure0: function MapExtensions_get_pairs_closure0(t0, t1) { + this.K = t0; + this.V = t1; + }, + mapClass_closure: function mapClass_closure() { + }, + mapClass__closure: function mapClass__closure() { + }, + mapClass__closure0: function mapClass__closure0() { + }, + mapClass__closure1: function mapClass__closure1() { + }, + _NodeSassMap: function _NodeSassMap() { + }, + legacyMapClass_closure: function legacyMapClass_closure() { + }, + legacyMapClass__closure: function legacyMapClass__closure() { + }, + legacyMapClass__closure0: function legacyMapClass__closure0() { + }, + legacyMapClass_closure0: function legacyMapClass_closure0() { + }, + legacyMapClass_closure1: function legacyMapClass_closure1() { + }, + legacyMapClass_closure2: function legacyMapClass_closure2() { + }, + legacyMapClass_closure3: function legacyMapClass_closure3() { + }, + legacyMapClass_closure4: function legacyMapClass_closure4() { + }, + SassMap0: function SassMap0(t0) { + this._map0$_contents = t0; + }, + _singleArgumentMathFunc0($name, mathFunc) { + return A.BuiltInCallable$function0($name, "$number", new A._singleArgumentMathFunc_closure0(mathFunc), "sass:math"); + }, + _numberFunction0($name, transform) { + return A.BuiltInCallable$function0($name, "$number", new A._numberFunction_closure0(transform), "sass:math"); + }, + _function9($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:math"); + }, + global_closure43: function global_closure43() { + }, + module_closure26: function module_closure26() { + }, + _ceil_closure0: function _ceil_closure0() { + }, + _clamp_closure0: function _clamp_closure0() { + }, + _floor_closure0: function _floor_closure0() { + }, + _max_closure0: function _max_closure0() { + }, + _min_closure0: function _min_closure0() { + }, + _round_closure0: function _round_closure0() { + }, + _hypot_closure0: function _hypot_closure0() { + }, + _hypot__closure0: function _hypot__closure0() { + }, + _log_closure0: function _log_closure0() { + }, + _pow_closure0: function _pow_closure0() { + }, + _atan2_closure0: function _atan2_closure0() { + }, + _compatible_closure0: function _compatible_closure0() { + }, + _isUnitless_closure0: function _isUnitless_closure0() { + }, + _unit_closure0: function _unit_closure0() { + }, + _percentage_closure0: function _percentage_closure0() { + }, + _randomFunction_closure0: function _randomFunction_closure0() { + }, + _div_closure0: function _div_closure0() { + }, + _singleArgumentMathFunc_closure0: function _singleArgumentMathFunc_closure0(t0) { + this.mathFunc = t0; + }, + _numberFunction_closure0: function _numberFunction_closure0(t0) { + this.transform = t0; + }, + CssMediaQuery_parseList0(contents, interpolationMap, logger) { + var t1 = A.SpanScanner$(contents, null); + return new A.MediaQueryParser0(t1, logger, interpolationMap).parse$0(0); + }, + CssMediaQuery$type0(type, conditions, modifier) { + return new A.CssMediaQuery0(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); + }, + CssMediaQuery$condition0(conditions, conjunction) { + var t1 = A.List_List$unmodifiable(conditions, type$.String); + if (t1.length > 1 && conjunction == null) + A.throwExpression(A.ArgumentError$(string$.If_con, null)); + return new A.CssMediaQuery0(null, null, conjunction !== false, t1); + }, + CssMediaQuery0: function CssMediaQuery0(t0, t1, t2, t3) { + var _ = this; + _.modifier = t0; + _.type = t1; + _.conjunction = t2; + _.conditions = t3; + }, + _SingletonCssMediaQueryMergeResult0: function _SingletonCssMediaQueryMergeResult0(t0) { + this._name = t0; + }, + MediaQuerySuccessfulMergeResult0: function MediaQuerySuccessfulMergeResult0(t0) { + this.query = t0; + }, + MediaQueryParser0: function MediaQueryParser0(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._parser1$_interpolationMap = t2; + }, + MediaQueryParser_parse_closure0: function MediaQueryParser_parse_closure0(t0) { + this.$this = t0; + }, + ModifiableCssMediaRule$0(queries, span) { + var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery_2), + t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + if (J.get$isEmpty$asx(queries)) + A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); + return new A.ModifiableCssMediaRule0(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode_2), t2); + }, + ModifiableCssMediaRule0: function ModifiableCssMediaRule0(t0, t1, t2, t3) { + var _ = this; + _.queries = t0; + _.span = t1; + _.children = t2; + _._node$_children = t3; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + MediaRule$0(query, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.MediaRule0(query, span, t1, t2); + }, + MediaRule0: function MediaRule0(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + MergedExtension_merge0(left, right) { + var t2, t3, t4, + t1 = left.extender.selector; + if (!t1.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) + throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); + t2 = left.mediaContext; + t3 = t2 == null; + if (!t3) { + t4 = right.mediaContext; + t4 = t4 != null && !B.C_ListEquality.equals$2(0, t2, t4); + } else + t4 = false; + if (t4) + throw A.wrapException(A.SassException$0("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span, null)); + if (right.isOptional && right.mediaContext == null) + return left; + if (left.isOptional && t3) + return right; + if (t3) + t2 = right.mediaContext; + t1.get$specificity(); + t1 = new A.Extender0(t1, false); + return t1._extension$_extension = new A.MergedExtension0(left, right, t1, left.target, t2, true, left.span); + }, + MergedExtension0: function MergedExtension0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.left = t0; + _.right = t1; + _.extender = t2; + _.target = t3; + _.mediaContext = t4; + _.isOptional = t5; + _.span = t6; + }, + MergedMapView$0(maps, $K, $V) { + var t1 = $K._eval$1("@<0>")._bind$1($V); + t1 = new A.MergedMapView0(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView0<1,2>")); + t1.MergedMapView$10(maps, $K, $V); + return t1; + }, + MergedMapView0: function MergedMapView0(t0, t1) { + this._merged_map_view$_mapsByKey = t0; + this.$ti = t1; + }, + _function6($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:meta"); + }, + _shared_closure3: function _shared_closure3() { + }, + _shared_closure4: function _shared_closure4() { + }, + _shared_closure5: function _shared_closure5() { + }, + _shared_closure6: function _shared_closure6() { + }, + moduleFunctions_closure2: function moduleFunctions_closure2() { + }, + moduleFunctions_closure3: function moduleFunctions_closure3() { + }, + moduleFunctions__closure0: function moduleFunctions__closure0() { + }, + moduleFunctions_closure4: function moduleFunctions_closure4() { + }, + mixinClass_closure: function mixinClass_closure() { + }, + mixinClass__closure: function mixinClass__closure() { + }, + mixinClass__closure0: function mixinClass__closure0() { + }, + SassMixin0: function SassMixin0(t0) { + this.callable = t0; + }, + MixinRule$0($name, $arguments, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.MixinRule0(t1, $name, $arguments, span, t2, t3); + }, + MixinRule0: function MixinRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._mixin_rule$__MixinRule_hasContent_FI = $; + _.name = t0; + _.originalName = t1; + _.$arguments = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + _HasContentVisitor0: function _HasContentVisitor0() { + }, + __HasContentVisitor_Object_StatementSearchVisitor0: function __HasContentVisitor_Object_StatementSearchVisitor0() { + }, + ExtendMode0: function ExtendMode0(t0, t1) { + this.name = t0; + this._name = t1; + }, + JSModule0: function JSModule0() { + }, + JSModuleRequire0: function JSModuleRequire0() { + }, + MultiSpan0: function MultiSpan0(t0, t1, t2) { + this._multi_span0$_primary = t0; + this.primaryLabel = t1; + this.secondarySpans = t2; + }, + SupportsNegation0: function SupportsNegation0(t0, t1) { + this.condition = t0; + this.span = t1; + }, + NoOpImporter0: function NoOpImporter0() { + }, + NoSourceMapBuffer0: function NoSourceMapBuffer0(t0) { + this._no_source_map_buffer0$_buffer = t0; + }, + _FakeAstNode0: function _FakeAstNode0(t0) { + this._node0$_callback = t0; + }, + CssNode0: function CssNode0() { + }, + CssParentNode0: function CssParentNode0() { + }, + _IsInvisibleVisitor1: function _IsInvisibleVisitor1(t0, t1) { + this.includeBogus = t0; + this.includeComments = t1; + }, + __IsInvisibleVisitor_Object_EveryCssVisitor0: function __IsInvisibleVisitor_Object_EveryCssVisitor0() { + }, + ModifiableCssNode0: function ModifiableCssNode0() { + }, + ModifiableCssNode_hasFollowingSibling_closure0: function ModifiableCssNode_hasFollowingSibling_closure0() { + }, + ModifiableCssParentNode0: function ModifiableCssParentNode0() { + }, + NodePackageImporter0: function NodePackageImporter0() { + this._node_package$__NodePackageImporter__entryPointDirectory_F = $; + }, + NodePackageImporter__nodePackageExportsResolve_closure3: function NodePackageImporter__nodePackageExportsResolve_closure3() { + }, + NodePackageImporter__nodePackageExportsResolve_closure4: function NodePackageImporter__nodePackageExportsResolve_closure4() { + }, + NodePackageImporter__nodePackageExportsResolve_closure5: function NodePackageImporter__nodePackageExportsResolve_closure5() { + }, + NodePackageImporter__nodePackageExportsResolve_closure6: function NodePackageImporter__nodePackageExportsResolve_closure6(t0, t1, t2) { + this.$this = t0; + this.exports = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure1: function NodePackageImporter__nodePackageExportsResolve__closure1(t0, t1, t2) { + this.$this = t0; + this.variant = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure2: function NodePackageImporter__nodePackageExportsResolve__closure2() { + }, + NodePackageImporter__getMainExport_closure0: function NodePackageImporter__getMainExport_closure0() { + }, + NullExpression0: function NullExpression0(t0) { + this.span = t0; + }, + legacyNullClass_closure: function legacyNullClass_closure() { + }, + legacyNullClass__closure: function legacyNullClass__closure() { + }, + _SassNull0: function _SassNull0() { + }, + NumberExpression0: function NumberExpression0(t0, t1, t2) { + this.value = t0; + this.unit = t1; + this.span = t2; + }, + numberClass_closure: function numberClass_closure() { + }, + numberClass__closure: function numberClass__closure() { + }, + numberClass__closure0: function numberClass__closure0() { + }, + numberClass__closure1: function numberClass__closure1() { + }, + numberClass__closure2: function numberClass__closure2() { + }, + numberClass__closure3: function numberClass__closure3() { + }, + numberClass__closure4: function numberClass__closure4() { + }, + numberClass__closure5: function numberClass__closure5() { + }, + numberClass__closure6: function numberClass__closure6() { + }, + numberClass__closure7: function numberClass__closure7() { + }, + numberClass__closure8: function numberClass__closure8() { + }, + numberClass__closure9: function numberClass__closure9() { + }, + numberClass__closure10: function numberClass__closure10() { + }, + numberClass__closure11: function numberClass__closure11() { + }, + numberClass__closure12: function numberClass__closure12() { + }, + numberClass__closure13: function numberClass__closure13() { + }, + numberClass__closure14: function numberClass__closure14() { + }, + numberClass__closure15: function numberClass__closure15() { + }, + numberClass__closure16: function numberClass__closure16() { + }, + numberClass__closure17: function numberClass__closure17() { + }, + numberClass__closure18: function numberClass__closure18() { + }, + numberClass__closure19: function numberClass__closure19() { + }, + _ConstructorOptions0: function _ConstructorOptions0() { + }, + _parseNumber(value, unit) { + var invalidUnit, operands, t1, numerator, denominator, numeratorUnits, denominatorUnits; + if (unit == null || unit.length === 0) + return A.SassNumber_SassNumber0(value, null); + if (!J.contains$1$asx(unit, "*") && !B.JSString_methods.contains$1(unit, "/")) + return A.SassNumber_SassNumber0(value, unit); + invalidUnit = new A.ArgumentError(true, unit, "unit", "is invalid."); + operands = unit.split("/"); + t1 = operands.length; + if (t1 > 2) + throw A.wrapException(invalidUnit); + numerator = operands[0]; + denominator = t1 === 1 ? null : operands[1]; + t1 = type$.JSArray_String; + numeratorUnits = numerator.length === 0 ? A._setArrayType([], t1) : A._setArrayType(numerator.split("*"), t1); + if (B.JSArray_methods.any$1(numeratorUnits, new A._parseNumber_closure())) + throw A.wrapException(invalidUnit); + denominatorUnits = denominator == null ? A._setArrayType([], t1) : A._setArrayType(denominator.split("*"), t1); + if (B.JSArray_methods.any$1(denominatorUnits, new A._parseNumber_closure0())) + throw A.wrapException(invalidUnit); + return A.SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits); + }, + _NodeSassNumber: function _NodeSassNumber() { + }, + legacyNumberClass_closure: function legacyNumberClass_closure() { + }, + legacyNumberClass_closure0: function legacyNumberClass_closure0() { + }, + legacyNumberClass_closure1: function legacyNumberClass_closure1() { + }, + legacyNumberClass_closure2: function legacyNumberClass_closure2() { + }, + legacyNumberClass_closure3: function legacyNumberClass_closure3() { + }, + _parseNumber_closure: function _parseNumber_closure() { + }, + _parseNumber_closure0: function _parseNumber_closure0() { + }, + conversionFactor0(unit1, unit2) { + var _0_0; + if (unit1 === unit2) + return 1; + _0_0 = B.Map_gQqJO.$index(0, unit1); + if (_0_0 != null) + return _0_0.$index(0, unit2); + return null; + }, + SassNumber_SassNumber0(value, unit) { + return unit == null ? new A.UnitlessSassNumber0(value, null) : new A.SingleUnitSassNumber0(unit, value, null); + }, + SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits) { + var _0_8_isSet, _0_8, _0_10, _0_10_isSet, _0_7, unit, t2, _0_7_isSet, t3, _0_4_isSet, _0_7_isSet0, numerators, denominators, unsimplifiedDenominators, valueDouble, _i, denominator, simplifiedAway, i, factor, _1_2, _1_7_isSet, _1_7, _null = null, + _0_3 = numeratorUnits == null, + t1 = _0_3, + _0_6_isSet = !t1, + _0_6 = _null, + _0_4 = _null; + if (_0_6_isSet) { + _0_4 = J.get$length$asx(numeratorUnits == null ? type$.List_String._as(numeratorUnits) : numeratorUnits); + t1 = _0_4; + _0_6 = t1 <= 0; + _0_8_isSet = _0_6; + } else + _0_8_isSet = true; + _0_8 = _null; + _0_10 = _null; + if (_0_8_isSet) { + _0_8 = denominatorUnits == null; + t1 = _0_8; + _0_10_isSet = !t1; + if (_0_10_isSet) { + _0_10 = J.get$length$asx(denominatorUnits == null ? type$.List_String._as(denominatorUnits) : denominatorUnits) <= 0; + t1 = _0_10; + } else + t1 = true; + _0_7 = denominatorUnits; + } else { + _0_7 = _null; + _0_10_isSet = false; + t1 = false; + } + if (t1) + return new A.UnitlessSassNumber0(value, _null); + t1 = type$.List_String; + unit = _null; + t2 = false; + if (t1._is(numeratorUnits)) { + _0_7_isSet = true; + if (_0_6_isSet) { + t3 = _0_4; + _0_4_isSet = _0_6_isSet; + } else { + _0_4 = J.get$length$asx(numeratorUnits); + t3 = _0_4; + _0_4_isSet = true; + } + if (t3 === 1) { + unit = J.$index$asx(numeratorUnits, 0); + if (_0_8_isSet) { + t2 = _0_8; + _0_7_isSet0 = _0_8_isSet; + } else { + _0_8 = denominatorUnits == null; + t2 = _0_8; + _0_7_isSet0 = _0_7_isSet; + _0_7 = denominatorUnits; + _0_8_isSet = true; + } + if (!t2) + if (_0_10_isSet) { + t2 = _0_10; + _0_7_isSet = _0_7_isSet0; + } else { + if (_0_7_isSet0) { + t2 = _0_7; + _0_7_isSet = _0_7_isSet0; + } else { + t2 = denominatorUnits; + _0_7 = t2; + } + _0_10 = J.get$length$asx(t2 == null ? t1._as(t2) : t2) <= 0; + t2 = _0_10; + _0_10_isSet = true; + } + else { + _0_7_isSet = _0_7_isSet0; + t2 = true; + } + } else + _0_7_isSet = _0_8_isSet; + } else { + _0_7_isSet = _0_8_isSet; + _0_4_isSet = _0_6_isSet; + } + if (t2) + return new A.SingleUnitSassNumber0(unit, value, _null); + t2 = numeratorUnits == null; + t3 = false; + if (!t2) { + _0_7_isSet0 = true; + numerators = numeratorUnits; + if (_0_8_isSet) + t3 = _0_8; + else { + if (_0_7_isSet) + t3 = _0_7; + else { + t3 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t3; + } + _0_8 = t3 == null; + t3 = _0_8; + } + if (!t3) + if (_0_10_isSet) + t3 = _0_10; + else { + if (_0_7_isSet) + t3 = _0_7; + else { + t3 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t3; + } + _0_10 = J.get$length$asx(t3 == null ? t1._as(t3) : t3) <= 0; + t3 = _0_10; + } + else + t3 = true; + } else + numerators = _null; + if (t3) + return new A.ComplexSassNumber0(A.List_List$unmodifiable(numerators, type$.String), B.List_empty, value, _null); + if (!_0_3) + if (_0_6_isSet) + t2 = _0_6; + else { + if (_0_4_isSet) + t2 = _0_4; + else { + _0_4 = J.get$length$asx(t2 ? t1._as(numeratorUnits) : numeratorUnits); + t2 = _0_4; + } + _0_6 = t2 <= 0; + t2 = _0_6; + } + else + t2 = true; + denominators = _null; + if (t2) { + if (_0_7_isSet) + t2 = _0_7; + else { + t2 = denominatorUnits; + _0_7 = t2; + _0_7_isSet = true; + } + t2 = t2 != null; + if (t2) { + denominators = _0_7_isSet ? _0_7 : denominatorUnits; + if (denominators == null) + denominators = t1._as(denominators); + } + t1 = t2; + } else + t1 = false; + if (t1) + return new A.ComplexSassNumber0(B.List_empty, A.List_List$unmodifiable(denominators, type$.String), value, _null); + numeratorUnits.toString; + numerators = J.toList$0$ax(numeratorUnits); + denominatorUnits.toString; + unsimplifiedDenominators = J.toList$0$ax(denominatorUnits); + denominators = A._setArrayType([], type$.JSArray_String); + for (t1 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t1 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { + denominator = unsimplifiedDenominators[_i]; + i = 0; + while (true) { + if (!(i < numerators.length)) { + simplifiedAway = false; + break; + } + c$0: { + factor = A.conversionFactor0(denominator, numerators[i]); + if (factor == null) + break c$0; + valueDouble *= factor; + B.JSArray_methods.removeAt$1(numerators, i); + simplifiedAway = true; + break; + } + ++i; + } + if (!simplifiedAway) + denominators.push(denominator); + } + $label0$1: { + _1_2 = numerators.length; + t1 = _1_2; + _1_7_isSet = t1 <= 0; + if (_1_7_isSet) { + _1_7 = denominators.length <= 0; + t1 = _1_7; + } else { + _1_7 = _null; + t1 = false; + } + if (t1) { + t1 = new A.UnitlessSassNumber0(valueDouble, _null); + break $label0$1; + } + t1 = false; + if (_1_2 === 1) { + unit = numerators[0]; + t1 = _1_7_isSet ? _1_7 : denominators.length <= 0; + } else + unit = _null; + if (t1) { + t1 = new A.SingleUnitSassNumber0(unit, valueDouble, _null); + break $label0$1; + } + t1 = type$.String; + t1 = new A.ComplexSassNumber0(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); + break $label0$1; + } + return t1; + }, + SassNumber0: function SassNumber0() { + }, + SassNumber__coerceOrConvertValue_compatibilityException0: function SassNumber__coerceOrConvertValue_compatibilityException0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.other = t1; + _.otherName = t2; + _.otherHasUnits = t3; + _.name = t4; + _.newNumerators = t5; + _.newDenominators = t6; + }, + SassNumber__coerceOrConvertValue_closure3: function SassNumber__coerceOrConvertValue_closure3(t0, t1) { + this._box_0 = t0; + this.newNumerator = t1; + }, + SassNumber__coerceOrConvertValue_closure4: function SassNumber__coerceOrConvertValue_closure4(t0) { + this.compatibilityException = t0; + }, + SassNumber__coerceOrConvertValue_closure5: function SassNumber__coerceOrConvertValue_closure5(t0, t1) { + this._box_0 = t0; + this.newDenominator = t1; + }, + SassNumber__coerceOrConvertValue_closure6: function SassNumber__coerceOrConvertValue_closure6(t0) { + this.compatibilityException = t0; + }, + SassNumber_plus_closure0: function SassNumber_plus_closure0() { + }, + SassNumber_minus_closure0: function SassNumber_minus_closure0() { + }, + SassNumber_multiplyUnits_closure3: function SassNumber_multiplyUnits_closure3(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure4: function SassNumber_multiplyUnits_closure4(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure5: function SassNumber_multiplyUnits_closure5(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure6: function SassNumber_multiplyUnits_closure6(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber__areAnyConvertible_closure0: function SassNumber__areAnyConvertible_closure0(t0) { + this.units2 = t0; + }, + SassNumber__canonicalizeUnitList_closure0: function SassNumber__canonicalizeUnitList_closure0() { + }, + SassNumber__canonicalMultiplier_closure0: function SassNumber__canonicalMultiplier_closure0(t0) { + this.$this = t0; + }, + SassNumber_unitSuggestion_closure1: function SassNumber_unitSuggestion_closure1() { + }, + SassNumber_unitSuggestion_closure2: function SassNumber_unitSuggestion_closure2() { + }, + OklabColorSpace0: function OklabColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + OklchColorSpace0: function OklchColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + SupportsOperation$0(left, right, operator, span) { + var lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + return new A.SupportsOperation0(left, right, operator, span); + }, + SupportsOperation0: function SupportsOperation0(t0, t1, t2, t3) { + var _ = this; + _.left = t0; + _.right = t1; + _.operator = t2; + _.span = t3; + }, + ParentSelector0: function ParentSelector0(t0, t1) { + this.suffix = t0; + this.span = t1; + }, + ParentStatement0: function ParentStatement0() { + }, + ParentStatement_closure0: function ParentStatement_closure0() { + }, + ParentStatement__closure0: function ParentStatement__closure0() { + }, + ParenthesizedExpression0: function ParenthesizedExpression0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + loadParserExports() { + A._updateAstPrototypes(); + return {parse: A.allowInterop(A.parser0___parse$closure()), createExpressionVisitor: A.allowInterop(new A.loadParserExports_closure()), createStatementVisitor: A.allowInterop(new A.loadParserExports_closure0())}; + }, + _updateAstPrototypes() { + var t2, interpolation, string, _i, t3, t4, + file = A.SourceFile$fromString("", null), + t1 = type$.JSClass; + J.get$$prototype$x(t1._as(file.constructor)).getText = A.allowInteropCaptureThisNamed("getText", new A._updateAstPrototypes_closure()); + A.defineGetter(J.get$$prototype$x(t1._as(file.constructor)), "codeUnits", new A._updateAstPrototypes_closure0(), null); + t2 = $.$get$bogusSpan0(); + interpolation = A.Interpolation$0(B.List_empty28, t2); + A.defineGetter(J.get$$prototype$x(t1._as(interpolation.constructor)), "asPlain", new A._updateAstPrototypes_closure1(), null); + J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(new A.ExtendRule0(interpolation, false, t2).constructor))).constructor)).accept = A.allowInteropCaptureThisNamed("accept", new A._updateAstPrototypes_closure2()); + string = new A.StringExpression0(interpolation, false); + J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(string.constructor))).constructor)).accept = A.allowInteropCaptureThisNamed("accept", new A._updateAstPrototypes_closure3()); + for (t2 = [string, new A.BinaryOperationExpression0(B.BinaryOperator_u150, string, string, false), new A.SupportsExpression0(new A.SupportsAnything0(interpolation, t2)), new A.LoudComment0(interpolation)], _i = 0; _i < 4; ++_i) { + t3 = J.get$$prototype$x(t1._as(t2[_i].constructor)); + t4 = {get: A.allowInteropCaptureThis(new A._updateAstPrototypes_closure4()), enumerable: false}; + self.Object.defineProperty(t3, "span", t4); + } + }, + _parse(css, syntax, path, logger) { + var t1, t2, t3; + $label0$0: { + if ("scss" === syntax) { + t1 = B.Syntax_SCSS_scss0; + break $label0$0; + } + if ("sass" === syntax) { + t1 = B.Syntax_Sass_sass0; + break $label0$0; + } + if ("css" === syntax) { + t1 = B.Syntax_CSS_css0; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$('Unknown syntax "' + syntax + '"')); + } + t2 = A.NullableExtension_andThen0(path, A.path__toUri$closure()); + t3 = $._glyphs; + return A.Stylesheet_Stylesheet$parse0(css, t1, new A.JSToDartLogger(logger, new A.StderrLogger0(false), t3 === B.C_AsciiGlyphSet), t2); + }, + ParserExports: function ParserExports() { + }, + loadParserExports_closure: function loadParserExports_closure() { + }, + loadParserExports_closure0: function loadParserExports_closure0() { + }, + _updateAstPrototypes_closure: function _updateAstPrototypes_closure() { + }, + _updateAstPrototypes_closure0: function _updateAstPrototypes_closure0() { + }, + _updateAstPrototypes_closure1: function _updateAstPrototypes_closure1() { + }, + _updateAstPrototypes_closure2: function _updateAstPrototypes_closure2() { + }, + _updateAstPrototypes_closure3: function _updateAstPrototypes_closure3() { + }, + _updateAstPrototypes_closure4: function _updateAstPrototypes_closure4() { + }, + Parser_isIdentifier0(text) { + var t1, t2, exception, logger = null; + try { + t1 = logger; + t2 = A.SpanScanner$(text, null); + new A.Parser1(t2, t1 == null ? B.StderrLogger_false0 : t1, null)._parser1$_parseIdentifier$0(); + return true; + } catch (exception) { + if (type$.SassFormatException_2._is(A.unwrapException(exception))) + return false; + else + throw exception; + } + }, + Parser1: function Parser1(t0, t1, t2) { + this.scanner = t0; + this.logger = t1; + this._parser1$_interpolationMap = t2; + }, + Parser__parseIdentifier_closure0: function Parser__parseIdentifier_closure0(t0) { + this.$this = t0; + }, + Parser_escape_closure0: function Parser_escape_closure0() { + }, + Parser_scanIdentChar_matches0: function Parser_scanIdentChar_matches0(t0, t1) { + this.caseSensitive = t0; + this.char = t1; + }, + Parser_spanFrom_closure0: function Parser_spanFrom_closure0(t0, t1) { + this.$this = t0; + this.span = t1; + }, + PlaceholderSelector0: function PlaceholderSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + PlainCssCallable0: function PlainCssCallable0(t0) { + this.name = t0; + }, + PrefixedMapView0: function PrefixedMapView0(t0, t1, t2) { + this._prefixed_map_view0$_map = t0; + this._prefixed_map_view0$_prefix = t1; + this.$ti = t2; + }, + _PrefixedKeys0: function _PrefixedKeys0(t0) { + this._prefixed_map_view0$_view = t0; + }, + _PrefixedKeys_iterator_closure0: function _PrefixedKeys_iterator_closure0(t0) { + this.$this = t0; + }, + ProphotoRgbColorSpace0: function ProphotoRgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + PseudoSelector$0($name, span, argument, element, selector) { + var t1 = !element, + t2 = t1 && !A.PseudoSelector__isFakePseudoElement0($name); + return new A.PseudoSelector0($name, A.unvendor0($name), t2, t1, argument, selector, span); + }, + PseudoSelector__isFakePseudoElement0($name) { + switch ($name.charCodeAt(0)) { + case 97: + case 65: + return A.equalsIgnoreCase0($name, "after"); + case 98: + case 66: + return A.equalsIgnoreCase0($name, "before"); + case 102: + case 70: + return A.equalsIgnoreCase0($name, "first-line") || A.equalsIgnoreCase0($name, "first-letter"); + default: + return false; + } + }, + PseudoSelector0: function PseudoSelector0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.name = t0; + _.normalizedName = t1; + _.isClass = t2; + _.isSyntacticClass = t3; + _.argument = t4; + _.selector = t5; + _._pseudo$__PseudoSelector_specificity_FI = $; + _.span = t6; + }, + PseudoSelector_specificity_closure0: function PseudoSelector_specificity_closure0(t0) { + this.$this = t0; + }, + PseudoSelector_specificity__closure1: function PseudoSelector_specificity__closure1() { + }, + PseudoSelector_specificity__closure2: function PseudoSelector_specificity__closure2() { + }, + PseudoSelector_unify_closure0: function PseudoSelector_unify_closure0() { + }, + PublicMemberMapView0: function PublicMemberMapView0(t0, t1) { + this._public_member_map_view0$_inner = t0; + this.$ti = t1; + }, + QualifiedName0: function QualifiedName0(t0, t1) { + this.name = t0; + this.namespace = t1; + }, + Rec2020ColorSpace0: function Rec2020ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + createJSClass($name, $constructor) { + return type$.JSClass._as(A.allowInteropCaptureThisNamed($name, $constructor)); + }, + JSClassExtension_injectSuperclass(_this, superclass) { + var t1 = J.getInterceptor$x(superclass), + t2 = J.getInterceptor$x(_this); + self.Object.setPrototypeOf(t1.get$$prototype(superclass), J.get$$prototype$x(type$.JSClass._as(self.Object.getPrototypeOf(t2.get$$prototype(_this)).constructor))); + self.Object.setPrototypeOf(t2.get$$prototype(_this), self.Object.create(t1.get$$prototype(superclass))); + }, + JSClassExtension_setCustomInspect(_this, inspect) { + if (self.util == null) + return; + J.get$$prototype$x(_this)[self.util.inspect.custom] = A.allowInteropCaptureThis(new A.JSClassExtension_setCustomInspect_closure(inspect)); + }, + JSClassExtension_get_defineStaticMethod(_this) { + return new A.JSClassExtension_get_defineStaticMethod_closure(_this); + }, + JSClassExtension_get_defineMethod(_this) { + return new A.JSClassExtension_get_defineMethod_closure(_this); + }, + JSClassExtension_defineMethods(_this, methods) { + methods.forEach$1(0, A.JSClassExtension_get_defineMethod(_this)); + }, + JSClassExtension_get_defineGetter(_this) { + return new A.JSClassExtension_get_defineGetter_closure(_this); + }, + JSClass0: function JSClass0() { + }, + JSClassExtension_setCustomInspect_closure: function JSClassExtension_setCustomInspect_closure(t0) { + this.inspect = t0; + }, + JSClassExtension_get_defineStaticMethod_closure: function JSClassExtension_get_defineStaticMethod_closure(t0) { + this._this = t0; + }, + JSClassExtension_get_defineMethod_closure: function JSClassExtension_get_defineMethod_closure(t0) { + this._this = t0; + }, + JSClassExtension_get_defineGetter_closure: function JSClassExtension_get_defineGetter_closure(t0) { + this._this = t0; + }, + RenderContext0: function RenderContext0() { + }, + RenderContextOptions0: function RenderContextOptions0() { + }, + RenderContextResult0: function RenderContextResult0() { + }, + RenderContextResultStats0: function RenderContextResultStats0() { + }, + RenderOptions: function RenderOptions() { + }, + RenderResult: function RenderResult() { + }, + RenderResultStats: function RenderResultStats() { + }, + ReplaceExpressionVisitor0: function ReplaceExpressionVisitor0() { + }, + ReplaceExpressionVisitor_visitListExpression_closure0: function ReplaceExpressionVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitArgumentInvocation_closure0: function ReplaceExpressionVisitor_visitArgumentInvocation_closure0(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitInterpolation_closure0: function ReplaceExpressionVisitor_visitInterpolation_closure0(t0) { + this.$this = t0; + }, + ImporterResult$(contents, sourceMapUrl, syntax) { + if ((sourceMapUrl == null ? null : sourceMapUrl.get$scheme()) === "") + A.throwExpression(A.ArgumentError$value(sourceMapUrl, "sourceMapUrl", "must be absolute")); + return new A.ImporterResult0(contents, sourceMapUrl, syntax); + }, + ImporterResult0: function ImporterResult0(t0, t1, t2) { + this.contents = t0; + this._result$_sourceMapUrl = t1; + this.syntax = t2; + }, + ReturnRule0: function ReturnRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + RgbColorSpace0: function RgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + SassParser0: function SassParser0(t0, t1, t2, t3) { + var _ = this; + _._sass0$_currentIndentation = 0; + _._sass0$_spaces = _._sass0$_nextIndentationEnd = _._sass0$_nextIndentation = null; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + _._parser1$_interpolationMap = t3; + }, + SassParser_styleRuleSelector_closure0: function SassParser_styleRuleSelector_closure0() { + }, + SassParser_children_closure0: function SassParser_children_closure0(t0, t1, t2) { + this.$this = t0; + this.child = t1; + this.children = t2; + }, + SassParser__peekIndentation_closure1: function SassParser__peekIndentation_closure1() { + }, + SassParser__peekIndentation_closure2: function SassParser__peekIndentation_closure2() { + }, + _translateReturnValue(val) { + if (val instanceof A._Future) + return A.futureToPromise(val, type$.dynamic); + else + return val; + }, + main2() { + new Uint8Array(0); + A.main(); + J.set$cli_pkg_main_0_$x(self.exports, A._wrapMain(A.sass__main$closure())); + }, + _wrapMain(main) { + if (type$.dynamic_Function._is(main)) + return A.allowInterop(new A._wrapMain_closure(main)); + else + return A.allowInterop(new A._wrapMain_closure0(main)); + }, + _Exports: function _Exports() { + }, + _wrapMain_closure: function _wrapMain_closure(t0) { + this.main = t0; + }, + _wrapMain_closure0: function _wrapMain_closure0(t0) { + this.main = t0; + }, + ScssParser$0(contents, logger, url) { + var t1 = A.SpanScanner$(contents, url), + t2 = logger == null ? B.StderrLogger_false0 : logger; + return new A.ScssParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration_2), t1, t2, null); + }, + ScssParser0: function ScssParser0(t0, t1, t2, t3) { + var _ = this; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t0; + _.lastSilentComment = null; + _.scanner = t1; + _.logger = t2; + _._parser1$_interpolationMap = t3; + }, + Selector0: function Selector0() { + }, + _IsInvisibleVisitor2: function _IsInvisibleVisitor2(t0) { + this.includeBogus = t0; + }, + _IsBogusVisitor0: function _IsBogusVisitor0(t0) { + this.includeLeadingCombinator = t0; + }, + _IsBogusVisitor_visitComplexSelector_closure0: function _IsBogusVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + _IsUselessVisitor0: function _IsUselessVisitor0() { + }, + _IsUselessVisitor_visitComplexSelector_closure0: function _IsUselessVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + __IsBogusVisitor_Object_AnySelectorVisitor0: function __IsBogusVisitor_Object_AnySelectorVisitor0() { + }, + __IsInvisibleVisitor_Object_AnySelectorVisitor0: function __IsInvisibleVisitor_Object_AnySelectorVisitor0() { + }, + __IsUselessVisitor_Object_AnySelectorVisitor0: function __IsUselessVisitor_Object_AnySelectorVisitor0() { + }, + SelectorExpression0: function SelectorExpression0(t0) { + this.span = t0; + }, + _prependParent0(compound) { + var _0_3, _0_4, _0_40, t2, _0_4_isSet, t3, rest, _null = null, + t1 = A.EvaluationContext_currentOrNull0(), + span = (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan(), + _0_0 = compound.components; + $label0$0: { + _0_3 = _0_0.length >= 1; + _0_4 = _null; + if (_0_3) { + _0_40 = _0_0[0]; + t1 = _0_40; + _0_4 = t1; + t1 = t1 instanceof A.UniversalSelector0; + } else + t1 = false; + t2 = _null; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + if (_0_3) { + _0_4_isSet = true; + t3 = _0_4; + if (t3 instanceof A.TypeSelector0) { + t1 = _0_4; + t1 = type$.TypeSelector_2._as(t1).name.namespace != null; + } + } else + _0_4_isSet = _0_3; + if (t1) { + t1 = t2; + break $label0$0; + } + if (_0_3) { + if (_0_4_isSet) + t1 = _0_4; + else { + _0_4 = _0_0[0]; + t1 = _0_4; + _0_4_isSet = true; + } + t1 = t1 instanceof A.TypeSelector0; + } else + t1 = false; + if (t1) { + t1 = _0_4_isSet ? _0_4 : _0_0[0]; + type$.TypeSelector_2._as(t1); + rest = B.JSArray_methods.sublist$1(_0_0, 1); + t1 = A._setArrayType([new A.ParentSelector0(t1.name.name, span)], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, rest); + t1 = A.CompoundSelector$0(t1, span); + break $label0$0; + } + t1 = A._setArrayType([new A.ParentSelector0(_null, span)], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, _0_0); + t1 = A.CompoundSelector$0(t1, span); + break $label0$0; + } + return t1; + }, + _function8($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:selector"); + }, + _nest_closure0: function _nest_closure0() { + }, + _nest__closure1: function _nest__closure1(t0) { + this._box_0 = t0; + }, + _nest__closure2: function _nest__closure2() { + }, + _append_closure1: function _append_closure1() { + }, + _append__closure1: function _append__closure1() { + }, + _append__closure2: function _append__closure2(t0) { + this.span = t0; + }, + _append___closure0: function _append___closure0(t0, t1) { + this.parent = t0; + this.span = t1; + }, + _extend_closure0: function _extend_closure0() { + }, + _replace_closure0: function _replace_closure0() { + }, + _unify_closure0: function _unify_closure0() { + }, + _isSuperselector_closure0: function _isSuperselector_closure0() { + }, + _simpleSelectors_closure0: function _simpleSelectors_closure0() { + }, + _simpleSelectors__closure0: function _simpleSelectors__closure0() { + }, + _parse_closure0: function _parse_closure0() { + }, + SelectorParser$0(contents, allowParent, interpolationMap, logger, plainCss, url) { + var t1 = A.SpanScanner$(contents, url); + return new A.SelectorParser0(allowParent, plainCss, t1, logger == null ? B.StderrLogger_false0 : logger, interpolationMap); + }, + SelectorParser0: function SelectorParser0(t0, t1, t2, t3, t4) { + var _ = this; + _._selector$_allowParent = t0; + _._selector$_plainCss = t1; + _.scanner = t2; + _.logger = t3; + _._parser1$_interpolationMap = t4; + }, + SelectorParser_parse_closure0: function SelectorParser_parse_closure0(t0) { + this.$this = t0; + }, + SelectorParser_parseCompoundSelector_closure0: function SelectorParser_parseCompoundSelector_closure0(t0) { + this.$this = t0; + }, + SelectorSearchVisitor0: function SelectorSearchVisitor0() { + }, + SelectorSearchVisitor_visitComplexSelector_closure0: function SelectorSearchVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + SelectorSearchVisitor_visitCompoundSelector_closure0: function SelectorSearchVisitor_visitCompoundSelector_closure0(t0) { + this.$this = t0; + }, + serialize0(node, charset, indentWidth, inspect, lineFeed, logger, sourceMap, style, useSpaces) { + var t1, css, t2, prefix, + visitor = A._SerializeVisitor$0(indentWidth == null ? 2 : indentWidth, inspect, lineFeed, logger, true, sourceMap, style, useSpaces); + node.accept$1(visitor); + t1 = visitor._serialize0$_buffer; + css = t1.toString$0(0); + if (charset) { + t2 = new A.CodeUnits(css); + t2 = t2.any$1(t2, new A.serialize_closure0()); + } else + t2 = false; + if (t2) + prefix = style === B.OutputStyle_10 ? "\ufeff" : '@charset "UTF-8";\n'; + else + prefix = ""; + t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; + return new A._Record_2_sourceMap(prefix + css, t1); + }, + serializeValue0(value, inspect, quote) { + var _null = null, + visitor = A._SerializeVisitor$0(_null, inspect, _null, _null, quote, false, _null, true); + value.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + serializeSelector0(selector, inspect) { + var _null = null, + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + selector.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + _SerializeVisitor$0(indentWidth, inspect, lineFeed, logger, quote, sourceMap, style, useSpaces) { + var t1 = sourceMap ? new A.SourceMapBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer0(new A.StringBuffer("")), + t2 = style == null ? B.OutputStyle_00 : style, + t3 = useSpaces ? 32 : 9, + t4 = indentWidth == null ? 2 : indentWidth, + t5 = lineFeed == null ? B.LineFeed_LvD : lineFeed, + t6 = logger == null ? B.StderrLogger_false0 : logger; + A.RangeError_checkValueInInterval(t4, 0, 10, "indentWidth"); + return new A._SerializeVisitor0(t1, t2, inspect, quote, t3, t4, t5, t6); + }, + serialize_closure0: function serialize_closure0() { + }, + _SerializeVisitor0: function _SerializeVisitor0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._serialize0$_buffer = t0; + _._serialize0$_indentation = 0; + _._serialize0$_style = t1; + _._serialize0$_inspect = t2; + _._serialize0$_quote = t3; + _._serialize0$_indentCharacter = t4; + _._serialize0$_indentWidth = t5; + _._lineFeed = t6; + _._serialize0$_logger = t7; + }, + _SerializeVisitor_visitCssComment_closure0: function _SerializeVisitor_visitCssComment_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssAtRule_closure0: function _SerializeVisitor_visitCssAtRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssMediaRule_closure0: function _SerializeVisitor_visitCssMediaRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport_closure0: function _SerializeVisitor_visitCssImport_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport__closure0: function _SerializeVisitor_visitCssImport__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssKeyframeBlock_closure0: function _SerializeVisitor_visitCssKeyframeBlock_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssStyleRule_closure0: function _SerializeVisitor_visitCssStyleRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssSupportsRule_closure0: function _SerializeVisitor_visitCssSupportsRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure1: function _SerializeVisitor_visitCssDeclaration_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure2: function _SerializeVisitor_visitCssDeclaration_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitList_closure2: function _SerializeVisitor_visitList_closure2() { + }, + _SerializeVisitor_visitList_closure3: function _SerializeVisitor_visitList_closure3(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor_visitList_closure4: function _SerializeVisitor_visitList_closure4(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitMap_closure0: function _SerializeVisitor_visitMap_closure0(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitSelectorList_closure0: function _SerializeVisitor_visitSelectorList_closure0() { + }, + _SerializeVisitor__write_closure0: function _SerializeVisitor__write_closure0(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor__visitChildren_closure1: function _SerializeVisitor__visitChildren_closure1(t0, t1) { + this.$this = t0; + this.child = t1; + }, + _SerializeVisitor__visitChildren_closure2: function _SerializeVisitor__visitChildren_closure2(t0, t1) { + this.$this = t0; + this.child = t1; + }, + OutputStyle0: function OutputStyle0(t0) { + this._name = t0; + }, + LineFeed0: function LineFeed0(t0, t1, t2) { + this.name = t0; + this.text = t1; + this._name = t2; + }, + ShadowedModuleView_ifNecessary0(inner, functions, mixins, variables, $T) { + return A.ShadowedModuleView__needsBlocklist0(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist0(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist0(inner.get$mixins(), mixins) ? new A.ShadowedModuleView0(inner, A.ShadowedModuleView__shadowedMap0(inner.get$variables(), variables, type$.Value_2), A.ShadowedModuleView__shadowedMap0(inner.get$variableNodes(), variables, type$.AstNode_2), A.ShadowedModuleView__shadowedMap0(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap0(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView0<0>")) : null; + }, + ShadowedModuleView__shadowedMap0(map, blocklist, $V) { + var t1 = A.ShadowedModuleView__needsBlocklist0(map, blocklist); + return !t1 ? map : A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); + }, + ShadowedModuleView__needsBlocklist0(map, blocklist) { + return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); + }, + ShadowedModuleView0: function ShadowedModuleView0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._shadowed_view0$_inner = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.$ti = t5; + }, + SilentComment0: function SilentComment0(t0, t1) { + this.text = t0; + this.span = t1; + }, + SimpleSelector0: function SimpleSelector0() { + }, + SimpleSelector_isSuperselector_closure0: function SimpleSelector_isSuperselector_closure0(t0) { + this.$this = t0; + }, + SimpleSelector_isSuperselector__closure0: function SimpleSelector_isSuperselector__closure0(t0) { + this.$this = t0; + }, + SingleUnitSassNumber0: function SingleUnitSassNumber0(t0, t1, t2) { + var _ = this; + _._single_unit$_unit = t0; + _._number1$_value = t1; + _.hashCache = null; + _.asSlash = t2; + }, + SingleUnitSassNumber__coerceToUnit_closure0: function SingleUnitSassNumber__coerceToUnit_closure0(t0, t1) { + this.$this = t0; + this.unit = t1; + }, + SingleUnitSassNumber__coerceValueToUnit_closure0: function SingleUnitSassNumber__coerceValueToUnit_closure0(t0) { + this.$this = t0; + }, + SingleUnitSassNumber_multiplyUnits_closure1: function SingleUnitSassNumber_multiplyUnits_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SingleUnitSassNumber_multiplyUnits_closure2: function SingleUnitSassNumber_multiplyUnits_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SourceMapBuffer0: function SourceMapBuffer0(t0, t1) { + var _ = this; + _._source_map_buffer0$_buffer = t0; + _._source_map_buffer0$_entries = t1; + _._source_map_buffer0$_column = _._source_map_buffer0$_line = 0; + _._source_map_buffer0$_inSpan = false; + }, + SourceMapBuffer_buildSourceMap_closure0: function SourceMapBuffer_buildSourceMap_closure0(t0, t1) { + this._box_0 = t0; + this.prefixLength = t1; + }, + updateSourceSpanPrototype() { + var t3, t4, _i, t5, + span = A.SourceFile$fromString("", null).span$1(0, 0), + t1 = type$.SourceSpan, + t2 = type$.String; + for (t1 = [span, new A.MultiSpan0(span, "", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), t1, t2)), new A.LazyFileSpan0(new A.updateSourceSpanPrototype_closure(span))], t3 = type$.JSClass, t4 = type$.Function, _i = 0; _i < 3; ++_i) { + t5 = t3._as(t1[_i].constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["start", new A.updateSourceSpanPrototype_closure0(), "end", new A.updateSourceSpanPrototype_closure1(), "url", new A.updateSourceSpanPrototype_closure2(), "text", new A.updateSourceSpanPrototype_closure3(), "context", new A.updateSourceSpanPrototype_closure4()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t5)); + } + t1 = t3._as(A.FileLocation$_(span.file, span._file$_start).constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["line", new A.updateSourceSpanPrototype_closure5(), "column", new A.updateSourceSpanPrototype_closure6()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); + }, + updateSourceSpanPrototype_closure: function updateSourceSpanPrototype_closure(t0) { + this.span = t0; + }, + updateSourceSpanPrototype_closure0: function updateSourceSpanPrototype_closure0() { + }, + updateSourceSpanPrototype_closure1: function updateSourceSpanPrototype_closure1() { + }, + updateSourceSpanPrototype_closure2: function updateSourceSpanPrototype_closure2() { + }, + updateSourceSpanPrototype__closure: function updateSourceSpanPrototype__closure() { + }, + updateSourceSpanPrototype_closure3: function updateSourceSpanPrototype_closure3() { + }, + updateSourceSpanPrototype_closure4: function updateSourceSpanPrototype_closure4() { + }, + updateSourceSpanPrototype_closure5: function updateSourceSpanPrototype_closure5() { + }, + updateSourceSpanPrototype_closure6: function updateSourceSpanPrototype_closure6() { + }, + ColorSpace_fromName0($name, argumentName) { + var t1, + _0_0 = $name.toLowerCase(); + $label0$0: { + if ("rgb" === _0_0) { + t1 = B.RgbColorSpace_mlz0; + break $label0$0; + } + if ("hwb" === _0_0) { + t1 = B.HwbColorSpace_06z0; + break $label0$0; + } + if ("hsl" === _0_0) { + t1 = B.HslColorSpace_gsm0; + break $label0$0; + } + if ("srgb" === _0_0) { + t1 = B.SrgbColorSpace_AD40; + break $label0$0; + } + if ("srgb-linear" === _0_0) { + t1 = B.SrgbLinearColorSpace_sEs0; + break $label0$0; + } + if ("display-p3" === _0_0) { + t1 = B.DisplayP3ColorSpace_NQk0; + break $label0$0; + } + if ("a98-rgb" === _0_0) { + t1 = B.A98RgbColorSpace_bdu0; + break $label0$0; + } + if ("prophoto-rgb" === _0_0) { + t1 = B.ProphotoRgbColorSpace_KiG0; + break $label0$0; + } + if ("rec2020" === _0_0) { + t1 = B.Rec2020ColorSpace_2jN0; + break $label0$0; + } + if ("xyz" === _0_0 || "xyz-d65" === _0_0) { + t1 = B.XyzD65ColorSpace_4CA0; + break $label0$0; + } + if ("xyz-d50" === _0_0) { + t1 = B.XyzD50ColorSpace_2No0; + break $label0$0; + } + if ("lab" === _0_0) { + t1 = B.LabColorSpace_IF20; + break $label0$0; + } + if ("lch" === _0_0) { + t1 = B.LchColorSpace_wv80; + break $label0$0; + } + if ("oklab" === _0_0) { + t1 = B.OklabColorSpace_yrt0; + break $label0$0; + } + if ("oklch" === _0_0) { + t1 = B.OklchColorSpace_li80; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0('Unknown color space "' + $name + '".', argumentName)); + } + return t1; + }, + ColorSpace0: function ColorSpace0() { + }, + SrgbColorSpace0: function SrgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + SrgbLinearColorSpace0: function SrgbLinearColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + Statement0: function Statement0() { + }, + JSStatementVisitor: function JSStatementVisitor(t0) { + this._statement$_inner = t0; + }, + JSStatementVisitorObject: function JSStatementVisitorObject() { + }, + StatementSearchVisitor0: function StatementSearchVisitor0() { + }, + StatementSearchVisitor_visitIfRule_closure1: function StatementSearchVisitor_visitIfRule_closure1(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure2: function StatementSearchVisitor_visitIfRule__closure2(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule_closure2: function StatementSearchVisitor_visitIfRule_closure2(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure1: function StatementSearchVisitor_visitIfRule__closure1(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitChildren_closure0: function StatementSearchVisitor_visitChildren_closure0(t0) { + this.$this = t0; + }, + StaticImport0: function StaticImport0(t0, t1, t2) { + this.url = t0; + this.modifiers = t1; + this.span = t2; + }, + StderrLogger0: function StderrLogger0(t0) { + this.color = t0; + }, + StringExpression_quoteText0(text) { + var t1, + quote = A.StringExpression__bestQuote0(A._setArrayType([text], type$.JSArray_String)), + buffer = new A.StringBuffer(""); + buffer._contents = "" + A.Primitives_stringFromCharCode(quote); + A.StringExpression__quoteInnerText0(text, quote, buffer, true); + t1 = A.Primitives_stringFromCharCode(quote); + t1 = buffer._contents += t1; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + StringExpression__quoteInnerText0(text, quote, buffer, $static) { + var t1, t2, i, _1_0, _0_0, t3, t4, t5, t0; + for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { + _1_0 = text.charCodeAt(i); + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(97); + if (i !== t2) { + _0_0 = text.charCodeAt(i + 1); + t3 = true; + if (!(_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12)) + if (!(_0_0 >= 48 && _0_0 <= 57)) + if (!(_0_0 >= 97 && _0_0 <= 102)) + t3 = _0_0 >= 65 && _0_0 <= 70; + if (t3) + buffer.writeCharCode$1(32); + } + continue; + } + t3 = 92 === _1_0; + if (t3) + t4 = _1_0; + else + t4 = null; + if (!t3) { + t3 = false; + t5 = _1_0 === quote; + if (t5) + t4 = _1_0; + if (!t5) + if (35 === _1_0) + if ($static) + if (i < t2) { + t3 = text.charCodeAt(i + 1) === 123; + if (t3) + t4 = _1_0; + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t3 = t4; + t4 = true; + } + } else { + t3 = t4; + t4 = true; + } + if (t4) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(t3); + continue; + } + buffer.writeCharCode$1(_1_0); + } + }, + StringExpression__bestQuote0(strings) { + var t1, t2, t3, containsDoubleQuote, t4, t5; + for (t1 = J.get$iterator$ax(strings), t2 = type$.CodeUnits, t3 = t2._eval$1("ListIterator"), t2 = t2._eval$1("ListBase.E"), containsDoubleQuote = false; t1.moveNext$0();) + for (t4 = new A.CodeUnits(t1.get$current(t1)), t4 = new A.ListIterator(t4, t4.get$length(0), t3); t4.moveNext$0();) { + t5 = t4.__internal$_current; + if (t5 == null) + t5 = t2._as(t5); + if (t5 === 39) + return 34; + if (t5 === 34) + containsDoubleQuote = true; + } + return containsDoubleQuote ? 39 : 34; + }, + StringExpression0: function StringExpression0(t0, t1) { + this.text = t0; + this.hasQuotes = t1; + }, + _codepointForIndex0(index, lengthInCodepoints, allowNegative) { + var result; + if (index === 0) + return 0; + if (index > 0) + return Math.min(index - 1, lengthInCodepoints); + result = lengthInCodepoints + index; + if (result < 0 && !allowNegative) + return 0; + return result; + }, + _function7($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:string"); + }, + module_closure25: function module_closure25() { + }, + module__closure3: function module__closure3(t0) { + this.string = t0; + }, + module__closure4: function module__closure4(t0) { + this.string = t0; + }, + _unquote_closure0: function _unquote_closure0() { + }, + _quote_closure0: function _quote_closure0() { + }, + _length_closure1: function _length_closure1() { + }, + _insert_closure0: function _insert_closure0() { + }, + _index_closure1: function _index_closure1() { + }, + _slice_closure0: function _slice_closure0() { + }, + _toUpperCase_closure0: function _toUpperCase_closure0() { + }, + _toLowerCase_closure0: function _toLowerCase_closure0() { + }, + _uniqueId_closure0: function _uniqueId_closure0() { + }, + stringClass_closure: function stringClass_closure() { + }, + stringClass__closure: function stringClass__closure() { + }, + stringClass__closure0: function stringClass__closure0() { + }, + stringClass__closure1: function stringClass__closure1() { + }, + stringClass__closure2: function stringClass__closure2() { + }, + stringClass__closure3: function stringClass__closure3() { + }, + _ConstructorOptions1: function _ConstructorOptions1() { + }, + _NodeSassString: function _NodeSassString() { + }, + legacyStringClass_closure: function legacyStringClass_closure() { + }, + legacyStringClass_closure0: function legacyStringClass_closure0() { + }, + legacyStringClass_closure1: function legacyStringClass_closure1() { + }, + SassString$0(_text, quotes) { + return new A.SassString0(_text, quotes); + }, + SassString0: function SassString0(t0, t1) { + var _ = this; + _._string0$_text = t0; + _._string0$_hasQuotes = t1; + _._string0$__SassString__sassLength_FI = $; + _._string0$_hashCache = null; + }, + ModifiableCssStyleRule$0(_selector, span, fromPlainCss, originalSelector) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssStyleRule0(_selector, originalSelector, span, fromPlainCss, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssStyleRule0: function ModifiableCssStyleRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._style_rule0$_selector = t0; + _.originalSelector = t1; + _.span = t2; + _.fromPlainCss = t3; + _.children = t4; + _._node$_children = t5; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + StyleRule$0(selector, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.StyleRule0(selector, span, t1, t2); + }, + StyleRule0: function StyleRule0(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + CssStylesheet0: function CssStylesheet0(t0, t1) { + this.children = t0; + this.span = t1; + }, + ModifiableCssStylesheet$0(span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssStylesheet0(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssStylesheet0: function ModifiableCssStylesheet0(t0, t1, t2) { + var _ = this; + _.span = t0; + _.children = t1; + _._node$_children = t2; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + StylesheetParser0: function StylesheetParser0() { + }, + StylesheetParser_parse_closure0: function StylesheetParser_parse_closure0(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure1: function StylesheetParser_parse__closure1(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure2: function StylesheetParser_parse__closure2() { + }, + StylesheetParser_parseArgumentDeclaration_closure0: function StylesheetParser_parseArgumentDeclaration_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__parseSingleProduction_closure0: function StylesheetParser__parseSingleProduction_closure0(t0, t1, t2) { + this.$this = t0; + this.production = t1; + this.T = t2; + }, + StylesheetParser_parseSignature_closure: function StylesheetParser_parseSignature_closure(t0, t1) { + this.$this = t0; + this.requireParens = t1; + }, + StylesheetParser__statement_closure0: function StylesheetParser__statement_closure0(t0) { + this.$this = t0; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure1: function StylesheetParser_variableDeclarationWithoutNamespace_closure1(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure2: function StylesheetParser_variableDeclarationWithoutNamespace_closure2(t0) { + this.declaration = t0; + }, + StylesheetParser__styleRule_closure0: function StylesheetParser__styleRule_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInStyleRule = t2; + _.start = t3; + }, + StylesheetParser__tryDeclarationChildren_closure0: function StylesheetParser__tryDeclarationChildren_closure0(t0, t1) { + this.name = t0; + this.value = t1; + }, + StylesheetParser__atRootRule_closure1: function StylesheetParser__atRootRule_closure1(t0) { + this.query = t0; + }, + StylesheetParser__atRootRule_closure2: function StylesheetParser__atRootRule_closure2() { + }, + StylesheetParser__eachRule_closure0: function StylesheetParser__eachRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.wasInControlDirective = t1; + _.variables = t2; + _.list = t3; + }, + StylesheetParser__functionRule_closure0: function StylesheetParser__functionRule_closure0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.precedingComment = t2; + }, + StylesheetParser__forRule_closure1: function StylesheetParser__forRule_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__forRule_closure2: function StylesheetParser__forRule_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInControlDirective = t2; + _.variable = t3; + _.from = t4; + _.to = t5; + }, + StylesheetParser__memberList_closure0: function StylesheetParser__memberList_closure0(t0, t1, t2) { + this.$this = t0; + this.variables = t1; + this.identifiers = t2; + }, + StylesheetParser__includeRule_closure0: function StylesheetParser__includeRule_closure0(t0) { + this.contentArguments_ = t0; + }, + StylesheetParser_mediaRule_closure0: function StylesheetParser_mediaRule_closure0(t0) { + this.query = t0; + }, + StylesheetParser__mixinRule_closure0: function StylesheetParser__mixinRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.name = t1; + _.$arguments = t2; + _.precedingComment = t3; + }, + StylesheetParser_mozDocumentRule_closure0: function StylesheetParser_mozDocumentRule_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.name = t2; + _.value = t3; + }, + StylesheetParser_supportsRule_closure0: function StylesheetParser_supportsRule_closure0(t0) { + this.condition = t0; + }, + StylesheetParser__whileRule_closure0: function StylesheetParser__whileRule_closure0(t0, t1, t2) { + this.$this = t0; + this.wasInControlDirective = t1; + this.condition = t2; + }, + StylesheetParser_unknownAtRule_closure0: function StylesheetParser_unknownAtRule_closure0(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__expression_resetState0: function StylesheetParser__expression_resetState0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__expression_resolveOneOperation0: function StylesheetParser__expression_resolveOneOperation0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__expression_resolveOperations0: function StylesheetParser__expression_resolveOperations0(t0, t1) { + this._box_0 = t0; + this.resolveOneOperation = t1; + }, + StylesheetParser__expression_addSingleExpression0: function StylesheetParser__expression_addSingleExpression0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resetState = t2; + _.resolveOperations = t3; + }, + StylesheetParser__expression_addOperator0: function StylesheetParser__expression_addOperator0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOneOperation = t2; + }, + StylesheetParser__expression_resolveSpaceExpressions0: function StylesheetParser__expression_resolveSpaceExpressions0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOperations = t2; + }, + StylesheetParser_expressionUntilComma_closure0: function StylesheetParser_expressionUntilComma_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__isHexColor_closure0: function StylesheetParser__isHexColor_closure0() { + }, + StylesheetParser__unicodeRange_closure1: function StylesheetParser__unicodeRange_closure1() { + }, + StylesheetParser__unicodeRange_closure2: function StylesheetParser__unicodeRange_closure2() { + }, + StylesheetParser_namespacedExpression_closure0: function StylesheetParser_namespacedExpression_closure0(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_trySpecialFunction_closure0: function StylesheetParser_trySpecialFunction_closure0() { + }, + StylesheetParser__expressionUntilComparison_closure0: function StylesheetParser__expressionUntilComparison_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__publicIdentifier_closure0: function StylesheetParser__publicIdentifier_closure0(t0, t1) { + this.$this = t0; + this.start = t1; + }, + Stylesheet$internal0(children, span, plainCss) { + var t1 = A._setArrayType([], type$.JSArray_UseRule_2), + t2 = A._setArrayType([], type$.JSArray_ForwardRule_2), + t3 = A.List_List$unmodifiable(children, type$.Statement_2), + t4 = B.JSArray_methods.any$1(t3, new A.ParentStatement_closure0()); + t1 = new A.Stylesheet0(span, plainCss, t1, t2, t3, t4); + t1.Stylesheet$internal$3$plainCss0(children, span, plainCss); + return t1; + }, + Stylesheet_Stylesheet$parse0(contents, syntax, logger, url) { + var error, stackTrace, url0, t1, exception, t2; + try { + switch (syntax) { + case B.Syntax_Sass_sass0: + t1 = A.SpanScanner$(contents, url); + t1 = new A.SassParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration_2), t1, logger, null).parse$0(0); + return t1; + case B.Syntax_SCSS_scss0: + t1 = A.ScssParser$0(contents, logger, url).parse$0(0); + return t1; + case B.Syntax_CSS_css0: + t1 = A.SpanScanner$(contents, url); + t1 = new A.CssParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.VariableDeclaration_2), t1, logger, null).parse$0(0); + return t1; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + url0 = t1.get$sourceUrl(t1); + if (url0 == null || J.toString$0$(url0) === "stdin") + throw exception; + t1 = type$.Uri; + throw A.wrapException(A.throwWithTrace0(error.withLoadedUrls$1(A.Set_Set$unmodifiable(A.LinkedHashSet_LinkedHashSet$_literal([url0], t1), t1)), error, stackTrace)); + } else + throw exception; + } + }, + Stylesheet0: function Stylesheet0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.span = t0; + _.plainCss = t1; + _._stylesheet1$_uses = t2; + _._stylesheet1$_forwards = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + SupportsExpression0: function SupportsExpression0(t0) { + this.condition = t0; + }, + ModifiableCssSupportsRule$0(condition, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssSupportsRule0(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssSupportsRule0: function ModifiableCssSupportsRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _._node$_children = t3; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + SupportsRule$0(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.SupportsRule0(condition, span, t1, t2); + }, + SupportsRule0: function SupportsRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + JSToDartImporter: function JSToDartImporter(t0, t1, t2) { + this._sync$_canonicalize = t0; + this._sync$_load = t1; + this._sync$_nonCanonicalSchemes = t2; + }, + JSToDartImporter_canonicalize_closure: function JSToDartImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + JSToDartImporter_load_closure: function JSToDartImporter_load_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + Syntax_forPath0(path) { + var t1, + _0_0 = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + $label0$0: { + if (".sass" === _0_0) { + t1 = B.Syntax_Sass_sass0; + break $label0$0; + } + if (".css" === _0_0) { + t1 = B.Syntax_CSS_css0; + break $label0$0; + } + t1 = B.Syntax_SCSS_scss0; + break $label0$0; + } + return t1; + }, + Syntax0: function Syntax0(t0, t1) { + this._syntax0$_name = t0; + this._name = t1; + }, + TypeSelector0: function TypeSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + Types: function Types() { + }, + UnaryOperationExpression0: function UnaryOperationExpression0(t0, t1, t2) { + this.operator = t0; + this.operand = t1; + this.span = t2; + }, + UnaryOperator0: function UnaryOperator0(t0, t1, t2) { + this.name = t0; + this.operator = t1; + this._name = t2; + }, + UnitlessSassNumber0: function UnitlessSassNumber0(t0, t1) { + this._number1$_value = t0; + this.hashCache = null; + this.asSlash = t1; + }, + UniversalSelector0: function UniversalSelector0(t0, t1) { + this.namespace = t0; + this.span = t1; + }, + UnprefixedMapView0: function UnprefixedMapView0(t0, t1, t2) { + this._unprefixed_map_view0$_map = t0; + this._unprefixed_map_view0$_prefix = t1; + this.$ti = t2; + }, + _UnprefixedKeys0: function _UnprefixedKeys0(t0) { + this._unprefixed_map_view0$_view = t0; + }, + _UnprefixedKeys_iterator_closure1: function _UnprefixedKeys_iterator_closure1(t0) { + this.$this = t0; + }, + _UnprefixedKeys_iterator_closure2: function _UnprefixedKeys_iterator_closure2(t0) { + this.$this = t0; + }, + JSUrl0: function JSUrl0() { + }, + UseRule0: function UseRule0(t0, t1, t2, t3) { + var _ = this; + _.url = t0; + _.namespace = t1; + _.configuration = t2; + _.span = t3; + }, + UserDefinedCallable0: function UserDefinedCallable0(t0, t1, t2, t3) { + var _ = this; + _.declaration = t0; + _.environment = t1; + _.inDependency = t2; + _.$ti = t3; + }, + fromImport0() { + var t1 = type$.nullable_CanonicalizeContext_2._as($.Zone__current.$index(0, B.Symbol__canonicalizeContext)); + t1 = t1 == null ? null : t1._canonicalize_context$_fromImport; + return t1 === true; + }, + canonicalizeContext0() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); + $label0$0: { + if (_0_0 == null) + A.throwExpression(A.StateError$(string$.canoni)); + if (_0_0 instanceof A.CanonicalizeContext0) { + t1 = _0_0; + break $label0$0; + } + t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); + } + return t1; + }, + inImportRule(callback, $T) { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); + $label0$0: { + if (_0_0 == null) { + t1 = type$.nullable_Object; + t1 = A.runZoned(callback, A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, new A.CanonicalizeContext0(true, null)], t1, t1), $T); + break $label0$0; + } + if (_0_0 instanceof A.CanonicalizeContext0) { + t1 = _0_0.withFromImport$2(true, callback); + break $label0$0; + } + t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); + } + return t1; + }, + resolveImportPath0(path) { + var t1, + extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + if (extension === ".sass" || extension === ".scss" || extension === ".css") { + t1 = A.fromImport0() ? new A.resolveImportPath_closure1(path, extension).call$0() : null; + return t1 == null ? A._exactlyOne0(A._tryPath0(path)) : t1; + } + t1 = A.fromImport0() ? new A.resolveImportPath_closure2(path).call$0() : null; + if (t1 == null) + t1 = A._exactlyOne0(A._tryPathWithExtensions0(path)); + return t1 == null ? A._tryPathAsDirectory0(path) : t1; + }, + _tryPathWithExtensions0(path) { + var result = A._tryPath0(path + ".sass"); + B.JSArray_methods.addAll$1(result, A._tryPath0(path + ".scss")); + return result.length !== 0 ? result : A._tryPath0(path + ".css"); + }, + _tryPath0(path) { + var t1 = $.$get$context(), + partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); + t1 = A._setArrayType([], type$.JSArray_String); + if (A.fileExists0(partial)) + t1.push(partial); + if (A.fileExists0(path)) + t1.push(path); + return t1; + }, + _tryPathAsDirectory0(path) { + var t1; + if (!A.dirExists0(path)) + return null; + t1 = A.fromImport0() ? new A._tryPathAsDirectory_closure0(path).call$0() : null; + return t1 == null ? A._exactlyOne0(A._tryPathWithExtensions0(A.join(path, "index", null))) : t1; + }, + _exactlyOne0(paths) { + var _0_1, t1, path; + $label0$0: { + _0_1 = paths.length; + if (_0_1 <= 0) { + t1 = null; + break $label0$0; + } + if (_0_1 === 1) { + path = paths[0]; + t1 = path; + break $label0$0; + } + t1 = A.throwExpression(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure0(), type$.String).join$1(0, "\n")); + } + return t1; + }, + resolveImportPath_closure1: function resolveImportPath_closure1(t0, t1) { + this.path = t0; + this.extension = t1; + }, + resolveImportPath_closure2: function resolveImportPath_closure2(t0) { + this.path = t0; + }, + _tryPathAsDirectory_closure0: function _tryPathAsDirectory_closure0(t0) { + this.path = t0; + }, + _exactlyOne_closure0: function _exactlyOne_closure0() { + }, + jsThrow(error) { + return type$.Never._as($.$get$_jsThrow().call$1(error)); + }, + attachJsStack(error, trace) { + var traceString = trace.toString$0(0), + firstRealLine = B.JSString_methods.indexOf$1(traceString, "\n at"); + if (firstRealLine !== -1) + traceString = B.JSString_methods.substring$1(traceString, firstRealLine + 1); + error.stack = "Error: " + A.S(J.get$message$x(error)) + "\n" + traceString; + }, + jsForEach(object, callback) { + var t1, t2; + for (t1 = J.get$iterator$ax(self.Object.keys(object)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + callback.call$2(t2, object[t2]); + } + }, + jsType(value) { + var typeOf = A._asString(new self.Function("value", "return typeof value").call$1(value)); + return typeOf !== "object" ? typeOf : A._asString(new self.Function("value", ' if (value && value.constructor && value.constructor.name) {\n return value.constructor.name;\n }\n return "object";\n ').call$1(value)); + }, + defineGetter(object, $name, get, value) { + self.Object.defineProperty(object, $name, get == null ? {value: value, enumerable: false} : {get: A.allowInteropCaptureThis(get), enumerable: false}); + }, + allowInteropNamed($name, $function) { + $function = A.allowInterop($function); + A.defineGetter($function, "name", null, $name); + A._hideDartProperties($function); + return $function; + }, + allowInteropCaptureThisNamed($name, $function) { + $function = A.allowInteropCaptureThis($function); + A.defineGetter($function, "name", null, $name); + A._hideDartProperties($function); + return $function; + }, + _hideDartProperties(object) { + var t1, t2, t3, t4; + for (t1 = J.cast$1$0$ax(self.Object.getOwnPropertyNames(object), type$.String), t2 = A._instanceType(t1), t1 = new A.ListIterator(t1, t1.get$length(t1), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (B.JSString_methods.startsWith$1(t3, "_")) { + t4 = {value: object[t3], enumerable: false}; + self.Object.defineProperty(object, t3, t4); + } + } + }, + futureToPromise0(future) { + return new self.Promise(A.allowInterop(new A.futureToPromise_closure0(future))); + }, + jsToDartUrl(url) { + return A.Uri_parse(J.toString$0$(url)); + }, + dartToJSUrl(url) { + return new self.URL(url.toString$0(0)); + }, + toJSArray(iterable) { + var t1, t2, + array = new self.Array(); + for (t1 = J.get$iterator$ax(iterable), t2 = J.getInterceptor$x(array); t1.moveNext$0();) + t2.push$1(array, t1.get$current(t1)); + return array; + }, + objectToMap(object) { + var map = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.nullable_Object); + A.jsForEach(object, new A.objectToMap_closure(map)); + return map; + }, + jsToDartSeparator(separator) { + var t1; + $label0$0: { + if (" " === separator) { + t1 = B.ListSeparator_nbm0; + break $label0$0; + } + if ("," === separator) { + t1 = B.ListSeparator_ECn0; + break $label0$0; + } + if ("/" === separator) { + t1 = B.ListSeparator_cQA0; + break $label0$0; + } + if (separator == null) { + t1 = B.ListSeparator_undecided_null_undecided0; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown separator "' + separator + '".')); + } + return t1; + }, + parseSyntax(syntax) { + var t1; + $label0$0: { + if (syntax == null || "scss" === syntax) { + t1 = B.Syntax_SCSS_scss0; + break $label0$0; + } + if ("indented" === syntax) { + t1 = B.Syntax_Sass_sass0; + break $label0$0; + } + if ("css" === syntax) { + t1 = B.Syntax_CSS_css0; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown syntax "' + A.S(syntax) + '".')); + } + return t1; + }, + entrypointFilename() { + var _1_0, _1_5_isSet, _1_5, t2, path, + t1 = self.require.main, + _0_0 = t1 == null ? null : J.get$filename$x(t1); + if (_0_0 != null) + return _0_0; + else { + _1_0 = J.get$argv$x(self.process); + t1 = J.getInterceptor$asx(_1_0); + _1_5_isSet = t1.get$length(_1_0) >= 2; + if (_1_5_isSet) { + _1_5 = t1.$index(_1_0, 1); + t2 = typeof _1_5 == "string"; + } else { + _1_5 = null; + t2 = false; + } + if (t2) { + path = A._asString(_1_5_isSet ? _1_5 : t1.$index(_1_0, 1)); + return J.resolve$1$x(J.createRequire$1$x(self.nodeModule, path), path); + } else + return null; + } + }, + _PropertyDescriptor0: function _PropertyDescriptor0() { + }, + futureToPromise_closure0: function futureToPromise_closure0(t0) { + this.future = t0; + }, + futureToPromise__closure0: function futureToPromise__closure0(t0) { + this.resolve = t0; + }, + futureToPromise__closure1: function futureToPromise__closure1(t0) { + this.reject = t0; + }, + objectToMap_closure: function objectToMap_closure(t0) { + this.map = t0; + }, + _RequireMain0: function _RequireMain0() { + }, + toSentence0(iter, conjunction) { + if (iter.get$length(iter) === 1) + return J.toString$0$(iter.get$first(iter)); + return A.IterableExtension_get_exceptLast0(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter.get$last(iter))); + }, + indent0(string, indentation) { + return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure0(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); + }, + pluralize0($name, number, plural) { + if (number === 1) + return $name; + if (plural != null) + return plural; + return $name + "s"; + }, + trimAscii0(string, excludeEscape) { + var t1, + start = A._firstNonWhitespace0(string); + if (start == null) + t1 = ""; + else { + t1 = A._lastNonWhitespace0(string, true); + t1.toString; + t1 = B.JSString_methods.substring$2(string, start, t1 + 1); + } + return t1; + }, + trimAsciiRight0(string, excludeEscape) { + var end = A._lastNonWhitespace0(string, excludeEscape); + return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); + }, + _firstNonWhitespace0(string) { + var t1, i, t2; + for (t1 = string.length, i = 0; i < t1; ++i) { + t2 = string.charCodeAt(i); + if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) + return i; + } + return null; + }, + _lastNonWhitespace0(string, excludeEscape) { + var i, i0, codeUnit; + for (i = string.length - 1, i0 = i; i0 >= 0; --i0) { + codeUnit = string.charCodeAt(i0); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + if (excludeEscape && i0 !== 0 && i0 !== i && codeUnit === 92) + return i0 + 1; + else + return i0; + } + return null; + }, + isPublic0(member) { + var start = member.charCodeAt(0); + return start !== 45 && start !== 95; + }, + flattenVertically0(iterable, $T) { + var result, + t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), + queues = A.List_List$of(new A.MappedListIterable(iterable, new A.flattenVertically_closure1($T), t1), true, t1._eval$1("ListIterable.E")); + if (queues.length === 1) + return B.JSArray_methods.get$first(queues); + result = A._setArrayType([], $T._eval$1("JSArray<0>")); + for (; queues.length !== 0;) { + if (!!queues.fixed$length) + A.throwExpression(A.UnsupportedError$("removeWhere")); + B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure2(result, $T), true); + } + return result; + }, + codepointIndexToCodeUnitIndex0(string, codepointIndex) { + var codeUnitIndex, i, codeUnitIndex0; + for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { + codeUnitIndex0 = codeUnitIndex + 1; + codeUnitIndex = string.charCodeAt(codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; + } + return codeUnitIndex; + }, + codeUnitIndexToCodepointIndex0(string, codeUnitIndex) { + var codepointIndex, i; + for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (string.charCodeAt(i) >>> 10 === 54 ? i + 1 : i) + 1) + ++codepointIndex; + return codepointIndex; + }, + frameForSpan0(span, member, url) { + var t2, t3, + t1 = url == null ? span.get$sourceUrl(span) : url; + if (t1 == null) + t1 = $.$get$_noSourceUrl0(); + t2 = span.get$start(span); + t2 = t2.file.getLine$1(t2.offset); + t3 = span.get$start(span); + return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); + }, + declarationName0(span) { + var text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(span.file._decodedChars, span._file$_start, span._end), 0, null); + return A.trimAsciiRight0(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); + }, + unvendor0($name) { + var i, + t1 = $name.length; + if (t1 < 2) + return $name; + if ($name.charCodeAt(0) !== 45) + return $name; + if ($name.charCodeAt(1) === 45) + return $name; + for (i = 2; i < t1; ++i) + if ($name.charCodeAt(i) === 45) + return B.JSString_methods.substring$1($name, i + 1); + return $name; + }, + equalsIgnoreCase0(string1, string2) { + var t1, i; + if (string1 === string2) + return true; + if (string1 == null) + return false; + t1 = string1.length; + if (t1 !== string2.length) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase0(string1.charCodeAt(i), string2.charCodeAt(i))) + return false; + return true; + }, + startsWithIgnoreCase0(string, prefix) { + var i, + t1 = prefix.length; + if (string.length < t1) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase0(string.charCodeAt(i), prefix.charCodeAt(i))) + return false; + return true; + }, + mapInPlace0(list, $function) { + var i; + for (i = 0; i < list.length; ++i) + list[i] = $function.call$1(list[i]); + }, + longestCommonSubsequence0(list1, list2, select, $T) { + var t1, _i, selections, i, i0, j, selection, j0, + _length = list1.get$length(0) + 1, + lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); + for (t1 = type$.int, _i = 0; _i < _length; ++_i) + lengths[_i] = A.List_List$filled(((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0) + 1, 0, false, t1); + _length = list1.get$length(0); + selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); + for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) + selections[_i] = A.List_List$filled((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0, null, false, t1); + for (i = 0; i < (list1._queue_list$_tail - list1._queue_list$_head & J.get$length$asx(list1._queue_list$_table) - 1) >>> 0; i = i0) + for (i0 = i + 1, j = 0; j < (list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0; j = j0) { + selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); + selections[i][j] = selection; + t1 = lengths[i0]; + j0 = j + 1; + t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; + } + return new A.longestCommonSubsequence_backtrack0(selections, lengths, $T).call$2(list1.get$length(0) - 1, list2.get$length(0) - 1); + }, + removeFirstWhere0(list, test, orElse) { + var i; + for (i = 0; i < list.length; ++i) { + if (!test.call$1(list[i])) + continue; + B.JSArray_methods.removeAt$1(list, i); + return; + } + orElse.call$0(); + }, + mapAddAll20(destination, source, K1, K2, $V) { + source.forEach$1(0, new A.mapAddAll2_closure0(destination, K1, K2, $V)); + }, + setAll0(map, keys, value) { + var t1; + for (t1 = J.get$iterator$ax(keys); t1.moveNext$0();) + map.$indexSet(0, t1.get$current(t1), value); + }, + rotateSlice0(list, start, end) { + var i, next, + element = list.$index(0, end - 1); + for (i = start; i < end; ++i, element = next) { + next = list.$index(0, i); + list.$indexSet(0, i, element); + } + }, + mapAsync0(iterable, callback, $E, $F) { + return A.mapAsync$body0(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); + }, + mapAsync$body0(iterable, callback, $E, $F, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t2, _i, t1, $async$temp1; + var $async$mapAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); + t2 = iterable.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync0); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$mapAsync0, $async$completer); + }, + putIfAbsentAsync0(map, key, ifAbsent, $K, $V) { + return A.putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $V); + }, + putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t1, value; + var $async$putIfAbsentAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (map.containsKey$1(key)) { + t1 = map.$index(0, key); + $async$returnValue = t1 == null ? $V._as(t1) : t1; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync0); + case 3: + // returning from await. + value = $async$result; + map.$indexSet(0, key, value); + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$putIfAbsentAsync0, $async$completer); + }, + copyMapOfMap0(map, K1, K2, $V) { + var t3, key, child, + t1 = K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty(K1, t1); + for (t1 = A.MapExtensions_get_pairs0(map, K1, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + key = t3._0; + child = t3._1; + t3 = A.LinkedHashMap_LinkedHashMap(null, null, null, K2, $V); + t3.addAll$1(0, child); + t2.$indexSet(0, key, t3); + } + return t2; + }, + copyMapOfList0(map, $K, $E) { + var t3, + t1 = $E._eval$1("List<0>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty($K, t1); + for (t1 = A.MapExtensions_get_pairs0(map, $K, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + t2.$indexSet(0, t3._0, J.toList$0$ax(t3._1)); + } + return t2; + }, + consumeEscapedCharacter0(scanner) { + var _1_0, value, i, next, t1; + scanner.expectChar$1(92); + _1_0 = scanner.peekChar$0(); + if (_1_0 == null) + return 65533; + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) + scanner.error$1(0, "Expected escape sequence."); + if (A.CharacterExtension_get_isHex0(_1_0)) { + for (value = 0, i = 0; i < 6; ++i) { + next = scanner.peekChar$0(); + if (next != null) { + t1 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t1 = next >= 65 && next <= 70; + t1 = !t1; + } else + t1 = true; + if (t1) + break; + value = (value << 4 >>> 0) + A.asHex0(scanner.readChar$0()); + } + t1 = scanner.peekChar$0(); + if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) + scanner.readChar$0(); + $label0$1: { + if (0 !== value) + t1 = value >= 55296 && value <= 57343 || value >= 1114111; + else + t1 = true; + if (t1) { + t1 = 65533; + break $label0$1; + } + t1 = value; + break $label0$1; + } + return t1; + } + return scanner.readChar$0(); + }, + throwWithTrace0(error, originalError, trace) { + var t1 = A.getTrace0(originalError); + A.attachTrace0(error, t1 == null ? trace : t1); + throw A.wrapException(error); + }, + attachTrace0(error, trace) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + return; + if (trace.toString$0(0).length === 0) + return; + t1 = $.$get$_traces0(); + A.Expando__checkType(error); + if (t1._jsWeakMap.get(error) == null) + t1.$indexSet(0, error, trace); + }, + getTrace0(error) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + t1 = null; + else { + t1 = $.$get$_traces0(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap.get(error); + } + return t1; + }, + parseSignature(signature, requireParens) { + var error, stackTrace, t1, exception, t2; + try { + t1 = A.ScssParser$0(signature, null, null).parseSignature$1$requireParens(requireParens); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error._span_exception$_message; + t2 = J.get$span$z(error); + A.throwWithTrace0(new A.SassFormatException0(B.Set_empty, 'Invalid signature "' + signature + '": ' + t1, t2), error, stackTrace); + } else + throw exception; + } + }, + indent_closure0: function indent_closure0(t0) { + this.indentation = t0; + }, + flattenVertically_closure1: function flattenVertically_closure1(t0) { + this.T = t0; + }, + flattenVertically_closure2: function flattenVertically_closure2(t0, t1) { + this.result = t0; + this.T = t1; + }, + longestCommonSubsequence_backtrack0: function longestCommonSubsequence_backtrack0(t0, t1, t2) { + this.selections = t0; + this.lengths = t1; + this.T = t2; + }, + mapAddAll2_closure0: function mapAddAll2_closure0(t0, t1, t2, t3) { + var _ = this; + _.destination = t0; + _.K1 = t1; + _.K2 = t2; + _.V = t3; + }, + CssValue0: function CssValue0(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + ValueExpression0: function ValueExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + valueClass_closure: function valueClass_closure() { + }, + valueClass__closure: function valueClass__closure() { + }, + valueClass__closure0: function valueClass__closure0() { + }, + valueClass__closure1: function valueClass__closure1() { + }, + valueClass__closure2: function valueClass__closure2() { + }, + valueClass__closure3: function valueClass__closure3() { + }, + valueClass__closure4: function valueClass__closure4() { + }, + valueClass__closure5: function valueClass__closure5() { + }, + valueClass__closure6: function valueClass__closure6() { + }, + valueClass__closure7: function valueClass__closure7() { + }, + valueClass__closure8: function valueClass__closure8() { + }, + valueClass__closure9: function valueClass__closure9() { + }, + valueClass__closure10: function valueClass__closure10() { + }, + valueClass__closure11: function valueClass__closure11() { + }, + valueClass__closure12: function valueClass__closure12() { + }, + valueClass__closure13: function valueClass__closure13() { + }, + valueClass__closure14: function valueClass__closure14() { + }, + valueClass__closure15: function valueClass__closure15() { + }, + valueClass__closure16: function valueClass__closure16() { + }, + valueClass__closure17: function valueClass__closure17() { + }, + valueClass__closure18: function valueClass__closure18() { + }, + SassApiValue_assertSelector0(_this, allowParent, $name) { + var error, stackTrace, t1, exception, + string = _this._value$_selectorString$1($name); + try { + t1 = A.SelectorList_SelectorList$parse0(string, allowParent, null, null, false); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace0(new A.SassScriptException0($name == null ? t1 : "$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + SassApiValue_assertCompoundSelector0(_this, $name) { + var error, stackTrace, t1, exception, + allowParent = false, + string = _this._value$_selectorString$1($name); + try { + t1 = A.SelectorParser$0(string, allowParent, null, null, false, null).parseCompoundSelector$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace0(new A.SassScriptException0("$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + Value0: function Value0() { + }, + VariableExpression0: function VariableExpression0(t0, t1, t2) { + this.namespace = t0; + this.name = t1; + this.span = t2; + }, + VariableDeclaration$0($name, expression, span, comment, global, guarded, namespace) { + if (namespace != null && global) + A.throwExpression(A.ArgumentError$(string$.Other_, null)); + return new A.VariableDeclaration0(namespace, $name, expression, guarded, global, span); + }, + VariableDeclaration0: function VariableDeclaration0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.expression = t2; + _.isGuarded = t3; + _.isGlobal = t4; + _.span = t5; + }, + WarnRule0: function WarnRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + WhileRule$0(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.WhileRule0(condition, span, t1, t2); + }, + WhileRule0: function WhileRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + XyzD50ColorSpace0: function XyzD50ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + XyzD65ColorSpace0: function XyzD65ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + AsyncCallable_AsyncCallable$fromSignature(signature, callback, requireParens) { + var _0_0 = A.parseSignature(signature, requireParens); + return new A.AsyncBuiltInCallable0(_0_0._0, _0_0._1, callback, false); + }, + Callable_Callable$fromSignature(signature, callback, requireParens) { + var _0_0 = A.parseSignature(signature, requireParens); + return new A.BuiltInCallable0(_0_0._0, A._setArrayType([new A._Record_2(_0_0._1, callback)], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2), false); + }, + printString(string) { + if (typeof dartPrint == "function") { + dartPrint(string); + return; + } + if (typeof console == "object" && typeof console.log != "undefined") { + console.log(string); + return; + } + if (typeof print == "function") { + print(string); + return; + } + throw "Unable to print message: " + String(string); + }, + mergeMaps(map1, map2, $K, $V) { + var result = A.LinkedHashMap_LinkedHashMap$of(map1, $K, $V); + result.addAll$1(0, map2); + return result; + }, + groupBy(values, key, $S, $T) { + var t1, t2, _i, element, t3, t4, + map = A.LinkedHashMap_LinkedHashMap$_empty($T, $S._eval$1("List<0>")); + for (t1 = values.length, t2 = $S._eval$1("JSArray<0>"), _i = 0; _i < values.length; values.length === t1 || (0, A.throwConcurrentModificationError)(values), ++_i) { + element = values[_i]; + t3 = key.call$1(element); + t4 = map.$index(0, t3); + if (t4 == null) { + t4 = A._setArrayType([], t2); + map.$indexSet(0, t3, t4); + t3 = t4; + } else + t3 = t4; + J.add$1$ax(t3, element); + } + return map; + }, + minBy(values, orderBy) { + var t1, t2, minValue, minOrderBy, element, elementOrderBy; + for (t1 = values.$ti, t2 = new A.MappedIterator(J.get$iterator$ax(values.__internal$_iterable), values._f, t1._eval$1("MappedIterator<1,2>")), t1 = t1._rest[1], minValue = null, minOrderBy = null; t2.moveNext$0();) { + element = t2.__internal$_current; + if (element == null) + element = t1._as(element); + elementOrderBy = orderBy.call$1(element); + if (minOrderBy == null || A.defaultCompare(elementOrderBy, minOrderBy) < 0) { + minOrderBy = elementOrderBy; + minValue = element; + } + } + return minValue; + }, + IterableExtension_firstWhereOrNull(_this, test) { + var t1, element; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + element = t1.get$current(t1); + if (test.call$1(element)) + return element; + } + return null; + }, + IterableExtension_get_firstOrNull(_this) { + var iterator = J.get$iterator$ax(_this); + if (iterator.moveNext$0()) + return iterator.get$current(iterator); + return null; + }, + IterableExtension_get_lastOrNull(_this) { + if (_this.get$length(0) === 0) + return null; + return _this.get$last(_this); + }, + IterableExtension_get_singleOrNull(_this) { + var result, + iterator = J.get$iterator$ax(_this); + if (iterator.moveNext$0()) { + result = iterator.get$current(iterator); + if (!iterator.moveNext$0()) + return result; + } + return null; + }, + IterableNullableExtension_whereNotNull(_this, $T) { + return new A._SyncStarIterable(A.IterableNullableExtension_whereNotNull$body(_this, $T), $T._eval$1("_SyncStarIterable<0>")); + }, + IterableNullableExtension_whereNotNull$body($async$_this, $async$$T) { + return function() { + var _this = $async$_this, + $T = $async$$T; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, element; + return function $async$IterableNullableExtension_whereNotNull($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = _this.get$iterator(_this); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + element = t1.get$current(t1); + $async$goto = element != null ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return $async$iterator._async$_current = element, 1; + case 6: + // after yield + case 5: + // join + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + IterableIntegerExtension_get_maxOrNull(_this) { + var value, newValue, + iterator = _this.get$iterator(_this); + if (iterator.moveNext$0()) { + value = iterator.get$current(iterator); + for (; iterator.moveNext$0();) { + newValue = iterator.get$current(iterator); + if (newValue > value) + value = newValue; + } + return value; + } + return null; + }, + IterableIntegerExtension_get_max(_this) { + var t1 = A.IterableIntegerExtension_get_maxOrNull(_this); + return t1 == null ? A.throwExpression(A.StateError$("No element")) : t1; + }, + IterableIntegerExtension_get_sum(_this) { + var t1, t2, result, t3; + for (t1 = _this.$ti, t2 = new A.MappedIterator(J.get$iterator$ax(_this.__internal$_iterable), _this._f, t1._eval$1("MappedIterator<1,2>")), t1 = t1._rest[1], result = 0; t2.moveNext$0();) { + t3 = t2.__internal$_current; + result += t3 == null ? t1._as(t3) : t3; + } + return result; + }, + ListExtensions_mapIndexed(_this, convert, $E, $R) { + return new A._SyncStarIterable(A.ListExtensions_mapIndexed$body(_this, convert, $E, $R), $R._eval$1("_SyncStarIterable<0>")); + }, + ListExtensions_mapIndexed$body($async$_this, $async$convert, $async$$E, $async$$R) { + return function() { + var _this = $async$_this, + convert = $async$convert, + $E = $async$$E, + $R = $async$$R; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, index; + return function $async$ListExtensions_mapIndexed($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = _this.length, index = 0; + case 2: + // for condition + if (!(index < t1)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return $async$iterator._async$_current = convert.call$2(index, _this[index]), 1; + case 5: + // after yield + case 3: + // for update + ++index; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + ListExtensions_elementAtOrNull(_this, index) { + var t1 = J.getInterceptor$asx(_this); + return index < t1.get$length(_this) ? t1.$index(_this, index) : null; + }, + defaultCompare(value1, value2) { + return J.compareTo$1$ns(type$.Comparable_nullable_Object._as(value1), value2); + }, + current() { + var exception, t1, path, lastIndex, uri = null; + try { + uri = A.Uri_base(); + } catch (exception) { + if (type$.Exception._is(A.unwrapException(exception))) { + t1 = $._current; + if (t1 != null) + return t1; + throw exception; + } else + throw exception; + } + if (J.$eq$(uri, $._currentUriBase)) { + t1 = $._current; + t1.toString; + return t1; + } + $._currentUriBase = uri; + if ($.$get$Style_platform() === $.$get$Style_url()) + t1 = $._current = J.resolve$1$x(uri, ".").toString$0(0); + else { + path = uri.toFilePath$0(); + lastIndex = path.length - 1; + t1 = $._current = lastIndex === 0 ? path : B.JSString_methods.substring$2(path, 0, lastIndex); + } + return t1; + }, + absolute(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { + return $.$get$context().absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15); + }, + join(part1, part2, part3) { + var _null = null; + return $.$get$context().join$16(0, part1, part2, part3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, + toUri(path) { + return $.$get$context().toUri$1(path); + }, + prettyUri(uri) { + var t1 = $.$get$context(); + uri.toString; + return t1.prettyUri$1(uri); + }, + isAlphabetic(char) { + var t1; + if (!(char >= 65 && char <= 90)) + t1 = char >= 97 && char <= 122; + else + t1 = true; + return t1; + }, + driveLetterEnd(path, index) { + var t2, t3, _null = null, + t1 = path.length, + index0 = index + 2; + if (t1 < index0) + return _null; + if (!A.isAlphabetic(path.charCodeAt(index))) + return _null; + t2 = index + 1; + if (path.charCodeAt(t2) !== 58) { + t3 = index + 4; + if (t1 < t3) + return _null; + if (B.JSString_methods.substring$2(path, t2, t3).toLowerCase() !== "%3a") + return _null; + index = index0; + } + t2 = index + 2; + if (t1 === t2) + return t2; + if (path.charCodeAt(t2) !== 47) + return _null; + return index + 3; + }, + main0(args) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + t1; + var $async$main0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + A.printError("sass --embedded is unavailable in pure JS mode."); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 1); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$main0, $async$completer); + }, + EvaluationContext_currentOrNull() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); + $label0$0: { + if (type$.EvaluationContext._is(_0_0)) { + t1 = _0_0; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + warn(message) { + var t1, + _0_0 = A.EvaluationContext_currentOrNull(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, null); + break $label0$0; + } + t1 = B.StderrLogger_false.warn$1(0, message); + break $label0$0; + } + return t1; + }, + warnForDeprecation(message, deprecation) { + var t1, + _0_0 = A.EvaluationContext_currentOrNull(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, deprecation); + break $label0$0; + } + t1 = A.WarnForDeprecation_warnForDeprecation(B.StderrLogger_false, deprecation, message, null, null); + break $label0$0; + } + return t1; + }, + compileStylesheets(options, graph, sourcesToDestinations, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, t2, _1_4, source, t3, _i, t4, printedError, errorWithStackTrace, code, error, stackTrace, buffer, t1, $async$temp1; + var $async$compileStylesheets = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.nullable_String; + t1 = A.List_List$of(A.MapExtensions_get_pairs(sourcesToDestinations, t1, t1), true, type$.Record_2_nullable_String_and_nullable_String); + t2 = t1.length; + $async$goto = t2 === 1 ? 4 : 5; + break; + case 4: + // then + _1_4 = t1[0]; + source = _1_4._0; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait(A.compileStylesheet(options, graph, source, _1_4._1, ifModified), $async$compileStylesheets); + case 6: + // returning from await. + t1 = $async$temp1._setArrayType([$async$result], type$.JSArray_nullable_Record_3_int_and_String_and_nullable_String); + // goto break $label0$0 + $async$goto = 3; + break; + case 5: + // join + t3 = A._setArrayType([], type$.JSArray_Future_nullable_Record_3_int_and_String_and_nullable_String); + for (_i = 0; _i < t2; ++_i) { + t4 = t1[_i]; + t3.push(A.compileStylesheet(options, graph, t4._0, t4._1, ifModified)); + } + $async$goto = 7; + return A._asyncAwait(A.Future_wait(t3, A._asBool(options._options.$index(0, "stop-on-error")), type$.nullable_Record_3_int_and_String_and_nullable_String), $async$compileStylesheets); + case 7: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 3: + // break $label0$0 + for (t1 = J.get$iterator$ax(t1), printedError = false; t1.moveNext$0();) { + errorWithStackTrace = t1.get$current(t1); + if (errorWithStackTrace == null) + continue; + code = errorWithStackTrace._0; + error = errorWithStackTrace._1; + stackTrace = errorWithStackTrace._2; + t2 = self.process; + if (t2 == null) + t2 = null; + else { + t2 = J.get$release$x(t2); + t2 = t2 == null ? null : J.get$name$x(t2); + } + t2 = J.$eq$(t2, "node") ? self.process : null; + t2 = t2 == null ? null : J.get$exitCode$x(t2); + if (t2 == null) + t2 = 0; + t2 = Math.max(t2, code); + t3 = self.process; + if (t3 == null) + t3 = null; + else { + t3 = J.get$release$x(t3); + t3 = t3 == null ? null : J.get$name$x(t3); + } + t3 = J.$eq$(t3, "node") ? self.process : null; + if (t3 != null) + J.set$exitCode$x(t3, t2); + buffer = new A.StringBuffer(""); + t2 = (printedError ? buffer._contents = "" + "\n" : "") + error; + buffer._contents = t2; + if (stackTrace != null) { + t2 += "\n"; + buffer._contents = t2; + t2 += "\n"; + buffer._contents = t2; + buffer._contents = t2 + stackTrace; + } + A.printError(buffer); + printedError = true; + } + $async$returnValue = !printedError; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStylesheets, $async$completer); + }, + repl(options) { + return A.repl$body(options); + }, + repl$body(options) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$handler = 1, $async$currentError, $async$next = [], repl, trackingLogger, logger, evaluator, line, declaration, error, stackTrace, logger0, t4, t5, t6, t7, t8, line0, toZone, exception, t1, t2, t3, repl0; + var $async$repl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], type$.JSArray_String); + t2 = B.JSString_methods.$mul(" ", 3); + t3 = $.$get$alwaysValid(); + repl0 = new A.Repl(">> ", t2, t3, t1); + repl0.__Repl__adapter_A = new A.ReplAdapter(repl0); + repl = repl0; + t1 = options._options; + trackingLogger = new A.TrackingLogger(A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color())); + logger0 = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(type$.Deprecation, type$.int), trackingLogger, options.get$silenceDeprecations(0), options.get$fatalDeprecations(0), options.get$futureDeprecations(0), !A._asBool(t1.$index(0, "verbose"))); + logger0.validate$0(); + logger = logger0; + t2 = $.$get$FilesystemImporter_cwd(); + evaluator = new A.Evaluator(A._EvaluateVisitor$(null, A.ImportCache$(options.get$pkgImporters(), type$.List_String._as(t1.$index(0, "load-path")), logger), logger, null, false, false), t2); + t2 = repl.__Repl__adapter_A; + t2 === $ && A.throwUnnamedLateFieldNI(); + t2 = new A._StreamIterator(A.checkNotNullable(t2.runAsync$0(), "stream", type$.Object)); + $async$handler = 2; + t1 = type$.Expression, t3 = type$.String, t4 = type$.VariableDeclaration; + case 5: + // for condition + $async$goto = 7; + return A._asyncAwait(t2.moveNext$0(), $async$repl); + case 7: + // returning from await. + if (!$async$result) { + // goto after for + $async$goto = 6; + break; + } + line = t2.get$current(0); + if (J.trim$0$s(line).length === 0) { + // goto for condition + $async$goto = 5; + break; + } + try { + if (J.startsWith$1$s(line, "@")) { + t5 = evaluator; + t6 = logger; + t7 = A.SpanScanner$(line, null); + if (t6 == null) + t6 = B.StderrLogger_false; + t6 = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), t7, t6, null).parseUseRule$0(); + t5._visitor.runStatement$2(t5._importer, t6); + // goto for condition + $async$goto = 5; + break; + } + t5 = A.SpanScanner$(line, null); + if (new A.Parser(t5, B.StderrLogger_false, null)._isVariableDeclarationLike$0()) { + t5 = logger; + t6 = A.SpanScanner$(line, null); + if (t5 == null) + t5 = B.StderrLogger_false; + declaration = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), t6, t5, null).parseVariableDeclaration$0(); + t5 = evaluator; + t5._visitor.runStatement$2(t5._importer, declaration); + t5 = evaluator; + t6 = declaration.name; + t7 = declaration.span; + t8 = declaration.namespace; + line0 = t5._visitor.runExpression$2(t5._importer, new A.VariableExpression(t8, t6, t7)).toString$0(0); + toZone = $.printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } else { + t5 = evaluator; + t6 = logger; + t7 = A.SpanScanner$(line, null); + if (t6 == null) + t6 = B.StderrLogger_false; + t6 = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), t7, t6, null); + t6 = t6._parseSingleProduction$1$1(t6.get$_expression(), t1); + line0 = t5._visitor.runExpression$2(t5._importer, t6).toString$0(0); + toZone = $.printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } + } catch (exception) { + t5 = A.unwrapException(exception); + if (t5 instanceof A.SassException) { + error = t5; + stackTrace = A.getTraceFromException(exception); + t5 = error; + t6 = typeof t5 != "string"; + if (!t6 || typeof t5 == "number" || A._isBool(t5)) + t5 = null; + else { + t7 = $.$get$_traces(); + if (A._isBool(t5) || typeof t5 == "number" || !t6 || t5 instanceof A._Record) + A.Expando__badExpandoKey(t5); + t5 = t7._jsWeakMap.get(t5); + } + if (t5 == null) + t5 = stackTrace; + A._logError(error, t5, line, repl, options, trackingLogger); + } else + throw exception; + } + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + $async$next.push(4); + // goto finally + $async$goto = 3; + break; + case 2: + // uncaught + $async$next = [1]; + case 3: + // finally + $async$handler = 1; + $async$goto = 8; + return A._asyncAwait(t2.cancel$0(), $async$repl); + case 8: + // returning from await. + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 4: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$repl, $async$completer); + }, + _logError(error, stackTrace, line, repl, options, logger) { + var t2, spacesBeforeError, t3, + t1 = A.SourceSpanException.prototype.get$span.call(error, 0); + if (t1.get$sourceUrl(t1) == null) + if (!A._asBool(options._options.$index(0, "quiet"))) + t1 = logger._emittedDebug || logger._emittedWarning; + else + t1 = false; + else + t1 = true; + if (t1) { + A.print(error.toString$1$color(0, options.get$color())); + return; + } + t1 = options.get$color() ? "" + "\x1b[31m" : ""; + t2 = A.SourceSpanException.prototype.get$span.call(error, 0); + t2 = t2.get$start(t2); + spacesBeforeError = repl.prompt.length + t2.file.getColumn$1(t2.offset); + if (options.get$color()) { + t2 = A.SourceSpanException.prototype.get$span.call(error, 0); + t2 = t2.get$start(t2); + t2 = t2.file.getColumn$1(t2.offset) < line.length; + } else + t2 = false; + if (t2) + t1 = t1 + ("\x1b[1F\x1b[" + spacesBeforeError + "C") + (A.SourceSpanException.prototype.get$span.call(error, 0).get$text() + "\n"); + t2 = B.JSString_methods.$mul(" ", spacesBeforeError); + t3 = A.SourceSpanException.prototype.get$span.call(error, 0); + t3 = t1 + t2 + (B.JSString_methods.$mul("^", Math.max(1, t3.get$length(t3))) + "\n"); + t1 = options.get$color() ? t3 + "\x1b[0m" : t3; + t1 += "Error: " + error._span_exception$_message + "\n"; + if (A._asBool(options._options.$index(0, "trace"))) + t1 += A.Trace_Trace$from(stackTrace).get$terse().toString$0(0); + A.print(B.JSString_methods.trimRight$0(t1.charCodeAt(0) == 0 ? t1 : t1)); + }, + CharacterExtension_get_isAlphabetic(_this) { + var t1; + if (!(_this >= 97 && _this <= 122)) + t1 = _this >= 65 && _this <= 90; + else + t1 = true; + return t1; + }, + CharacterExtension_get_isHex(_this) { + var t1 = true; + if (!(_this >= 48 && _this <= 57)) + if (!(_this >= 97 && _this <= 102)) + t1 = _this >= 65 && _this <= 70; + return t1; + }, + asHex(character) { + var t1; + $label0$0: { + if (character <= 57) { + t1 = character - 48; + break $label0$0; + } + if (character <= 70) { + t1 = 10 + character - 65; + break $label0$0; + } + t1 = 10 + character - 97; + break $label0$0; + } + return t1; + }, + hexCharFor(number) { + return number < 10 ? 48 + number : 87 + number; + }, + opposite(character) { + var t1; + $label0$0: { + if (40 === character) { + t1 = 41; + break $label0$0; + } + if (123 === character) { + t1 = 125; + break $label0$0; + } + if (91 === character) { + t1 = 93; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); + } + return t1; + }, + characterEqualsIgnoreCase(character1, character2) { + var upperCase1; + if (character1 === character2) + return true; + if ((character1 ^ character2) >>> 0 !== 32) + return false; + upperCase1 = (character1 & 4294967263) >>> 0; + return upperCase1 >= 65 && upperCase1 <= 90; + }, + IterableExtension_search(_this, callback) { + var t1, _0_0; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + _0_0 = callback.call$1(t1.get$current(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + IterableExtension_get_exceptLast(_this) { + var t1 = J.getInterceptor$asx(_this), + size = t1.get$length(_this) - 1; + if (size < 0) + throw A.wrapException(A.StateError$("Iterable may not be empty")); + return t1.take$1(_this, size); + }, + NullableExtension_andThen(_this, fn) { + return _this == null ? null : fn.call$1(_this); + }, + SetExtension_removeNull(_this, $T) { + _this.remove$1(0, null); + return A.Set_castFrom(_this, _this.get$_newSimilarSet(), A._instanceType(_this)._precomputed1, $T); + }, + fuzzyEquals(number1, number2) { + var t1; + if (number1 === number2) + return true; + if (Math.abs(number1 - number2) <= $.$get$_epsilon()) { + t1 = $.$get$_inverseEpsilon(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyEqualsNullable(number1, number2) { + var t1; + if (number1 == number2) + return true; + if (number1 == null || number2 == null) + return false; + if (Math.abs(number1 - number2) <= $.$get$_epsilon()) { + t1 = $.$get$_inverseEpsilon(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyHashCode(number) { + if (!isFinite(number)) + return B.JSNumber_methods.get$hashCode(number); + return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon())); + }, + fuzzyLessThan(number1, number2) { + return number1 < number2 && !A.fuzzyEquals(number1, number2); + }, + fuzzyLessThanOrEquals(number1, number2) { + return number1 < number2 || A.fuzzyEquals(number1, number2); + }, + fuzzyGreaterThan(number1, number2) { + return number1 > number2 && !A.fuzzyEquals(number1, number2); + }, + fuzzyGreaterThanOrEquals(number1, number2) { + return number1 > number2 || A.fuzzyEquals(number1, number2); + }, + fuzzyIsInt(number) { + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return false; + return A.fuzzyEquals(number, B.JSNumber_methods.round$0(number)); + }, + fuzzyAsInt(number) { + var rounded; + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return null; + rounded = B.JSNumber_methods.round$0(number); + return A.fuzzyEquals(number, rounded) ? rounded : null; + }, + fuzzyRound(number) { + var t1; + if (number > 0) { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 && !A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } else { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 || A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } + }, + fuzzyCheckRange(number, min, max) { + if (A.fuzzyEquals(number, min)) + return min; + if (A.fuzzyEquals(number, max)) + return max; + if (number > min && number < max) + return number; + return null; + }, + fuzzyAssertRange(number, min, max, $name) { + var result = A.fuzzyCheckRange(number, min, max); + if (result != null) + return result; + throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); + }, + moduloLikeSass(num1, num2) { + var result; + if (num1 == 1 / 0 || num1 == -1 / 0) + return 0 / 0; + if (num2 == 1 / 0 || num2 == -1 / 0) + return A.DoubleWithSignedZero_get_signIncludingZero(num1) === J.get$sign$in(num2) ? num1 : 0 / 0; + if (num2 > 0) + return B.JSNumber_methods.$mod(num1, num2); + if (num2 === 0) + return 0 / 0; + result = B.JSNumber_methods.$mod(num1, num2); + return result === 0 ? 0 : result + num2; + }, + sqrt(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber(Math.sqrt(number._number$_value), null); + }, + sin(number) { + return A.SassNumber_SassNumber(Math.sin(number.coerceValueToUnit$2("rad", "number")), null); + }, + cos(number) { + return A.SassNumber_SassNumber(Math.cos(number.coerceValueToUnit$2("rad", "number")), null); + }, + tan(number) { + return A.SassNumber_SassNumber(Math.tan(number.coerceValueToUnit$2("rad", "number")), null); + }, + atan(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits(Math.atan(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + asin(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits(Math.asin(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + acos(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits(Math.acos(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + log(number, base) { + if (base != null) + return A.SassNumber_SassNumber(Math.log(number._number$_value) / Math.log(base._number$_value), null); + return A.SassNumber_SassNumber(Math.log(number._number$_value), null); + }, + pow0(base, exponent) { + base.assertNoUnits$1("base"); + exponent.assertNoUnits$1("exponent"); + return A.SassNumber_SassNumber(Math.pow(base._number$_value, exponent._number$_value), null); + }, + DoubleWithSignedZero_get_signIncludingZero(_this) { + if (_this === -0.0) + return -1; + if (_this === 0) + return 1; + return J.get$sign$in(_this); + }, + SpanExtensions_trimLeft(_this) { + var t1, start = 0; + while (true) { + t1 = _this.get$text().charCodeAt(start); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + ++start; + } + return A.FileSpanExtension_subspan(_this, start, null); + }, + SpanExtensions_trimRight(_this) { + var t1, + end = _this.get$text().length - 1; + while (true) { + t1 = _this.get$text().charCodeAt(end); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + --end; + } + return A.FileSpanExtension_subspan(_this, 0, end + 1); + }, + SpanExtensions_initialIdentifier(_this) { + var i, + scanner = A.StringScanner$(_this.get$text(), null, null); + for (i = 0; false; ++i) + scanner.readChar$0(); + A._scanIdentifier(scanner); + return A.FileSpanExtension_subspan(_this, 0, scanner._string_scanner$_position); + }, + SpanExtensions_withoutInitialIdentifier(_this) { + var scanner = A.StringScanner$(_this.get$text(), null, null); + A._scanIdentifier(scanner); + return A.FileSpanExtension_subspan(_this, scanner._string_scanner$_position, null); + }, + _scanIdentifier(scanner) { + var t1, _0_0, t2; + for (t1 = scanner.string.length; scanner._string_scanner$_position !== t1;) { + _0_0 = scanner.peekChar$0(); + if (92 === _0_0) { + A.consumeEscapedCharacter(scanner); + continue; + } + if (A._isInt(_0_0)) { + if (_0_0 !== 95) { + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90; + else + t2 = true; + t2 = t2 || _0_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t2 = true; + } else + t2 = false; + if (t2) { + scanner.readChar$0(); + continue; + } + break; + } + }, + hueToRgb(m1, m2, hue) { + var t1; + if (hue < 0) + ++hue; + if (hue > 1) + --hue; + $label0$0: { + if (hue < 0.16666666666666666) { + t1 = m1 + (m2 - m1) * hue * 6; + break $label0$0; + } + if (hue < 0.5) { + t1 = m2; + break $label0$0; + } + if (hue < 0.6666666666666666) { + t1 = m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; + break $label0$0; + } + t1 = m1; + break $label0$0; + } + return t1; + }, + srgbAndDisplayP3ToLinear(channel) { + var abs = Math.abs(channel); + return abs < 0.04045 ? channel / 12.92 : J.get$sign$in(channel) * Math.pow((abs + 0.055) / 1.055, 2.4); + }, + srgbAndDisplayP3FromLinear(channel) { + var abs = Math.abs(channel); + return abs <= 0.0031308 ? channel * 12.92 : J.get$sign$in(channel) * (1.055 * Math.pow(abs, 0.4166666666666667) - 0.055); + }, + labToLch(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var t3, t4, chroma, hue, + t1 = a == null, + t2 = t1 ? 0 : a; + t2 = Math.pow(t2, 2); + t3 = b == null; + t4 = t3 ? 0 : b; + chroma = Math.sqrt(t2 + Math.pow(t4, 2)); + if (missingHue || A.fuzzyEquals(chroma, 0)) + hue = null; + else { + t2 = t3 ? 0 : b; + t1 = t1 ? 0 : a; + hue = Math.atan2(t2, t1) * 180 / 3.141592653589793; + } + t1 = missingChroma ? null : chroma; + return A.SassColor_SassColor$forSpaceInternal(dest, lightness, t1, hue == null || hue >= 0 ? hue : hue + 360, alpha); + }, + encodeVlq(value) { + var res, signBit, digit, t1; + if (value < $.$get$minInt32() || value > $.$get$maxInt32()) + throw A.wrapException(A.ArgumentError$("expected 32 bit int, got: " + value, null)); + res = A._setArrayType([], type$.JSArray_String); + if (value < 0) { + value = -value; + signBit = 1; + } else + signBit = 0; + value = value << 1 | signBit; + do { + digit = value & 31; + value = value >>> 5; + t1 = value > 0; + res.push(string$.ABCDEF[t1 ? digit | 32 : digit]); + } while (t1); + return res; + }, + isAllTheSame(iter) { + var firstValue, t1, t2, value; + if (iter.get$length(0) === 0) + return true; + firstValue = iter.get$first(0); + for (t1 = A.SubListIterable$(iter, 1, null, iter.$ti._eval$1("ListIterable.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + value = t1.__internal$_current; + if (!J.$eq$(value == null ? t2._as(value) : value, firstValue)) + return false; + } + return true; + }, + replaceFirstNull(list, element) { + var index = B.JSArray_methods.indexOf$1(list, null); + if (index < 0) + throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no null elements.", null)); + list[index] = element; + }, + replaceWithNull(list, element) { + var index = B.JSArray_methods.indexOf$1(list, element); + if (index < 0) + throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no elements matching " + element.toString$0(0) + ".", null)); + list[index] = null; + }, + countCodeUnits(string, codeUnit) { + var t1, t2, count, t3; + for (t1 = new A.CodeUnits(string), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"), count = 0; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if ((t3 == null ? t2._as(t3) : t3) === codeUnit) + ++count; + } + return count; + }, + findLineStart(context, text, column) { + var beginningOfLine, index, lineStart; + if (text.length === 0) + for (beginningOfLine = 0; true;) { + index = B.JSString_methods.indexOf$2(context, "\n", beginningOfLine); + if (index === -1) + return context.length - beginningOfLine >= column ? beginningOfLine : null; + if (index - beginningOfLine >= column) + return beginningOfLine; + beginningOfLine = index + 1; + } + index = B.JSString_methods.indexOf$1(context, text); + for (; index !== -1;) { + lineStart = index === 0 ? 0 : B.JSString_methods.lastIndexOf$2(context, "\n", index - 1) + 1; + if (column === index - lineStart) + return lineStart; + index = B.JSString_methods.indexOf$2(context, text, index + 1); + } + return null; + }, + validateErrorArgs(string, match, position, $length) { + var t2, + t1 = position != null; + if (t1) + if (position < 0) + throw A.wrapException(A.RangeError$("position must be greater than or equal to 0.")); + else if (position > string.length) + throw A.wrapException(A.RangeError$("position must be less than or equal to the string length.")); + t2 = $length != null; + if (t2 && $length < 0) + throw A.wrapException(A.RangeError$("length must be greater than or equal to 0.")); + if (t1 && t2 && position + $length > string.length) + throw A.wrapException(A.RangeError$("position plus length must not go beyond the end of the string.")); + }, + CharacterExtension_get_isAlphabetic0(_this) { + var t1; + if (!(_this >= 97 && _this <= 122)) + t1 = _this >= 65 && _this <= 90; + else + t1 = true; + return t1; + }, + CharacterExtension_get_isHex0(_this) { + var t1 = true; + if (!(_this >= 48 && _this <= 57)) + if (!(_this >= 97 && _this <= 102)) + t1 = _this >= 65 && _this <= 70; + return t1; + }, + asHex0(character) { + var t1; + $label0$0: { + if (character <= 57) { + t1 = character - 48; + break $label0$0; + } + if (character <= 70) { + t1 = 10 + character - 65; + break $label0$0; + } + t1 = 10 + character - 97; + break $label0$0; + } + return t1; + }, + hexCharFor0(number) { + return number < 10 ? 48 + number : 87 + number; + }, + opposite0(character) { + var t1; + $label0$0: { + if (40 === character) { + t1 = 41; + break $label0$0; + } + if (123 === character) { + t1 = 125; + break $label0$0; + } + if (91 === character) { + t1 = 93; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); + } + return t1; + }, + characterEqualsIgnoreCase0(character1, character2) { + var upperCase1; + if (character1 === character2) + return true; + if ((character1 ^ character2) >>> 0 !== 32) + return false; + upperCase1 = (character1 & 4294967263) >>> 0; + return upperCase1 >= 65 && upperCase1 <= 90; + }, + EvaluationContext_currentOrNull0() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); + $label0$0: { + if (type$.EvaluationContext_2._is(_0_0)) { + t1 = _0_0; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + EvaluationContext__currentOrNull() { + var _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); + if (type$.EvaluationContext_2._is(_0_0)) + return _0_0; + else + return null; + }, + warn0(message) { + var t1, + _0_0 = A.EvaluationContext_currentOrNull0(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, null); + break $label0$0; + } + t1 = B.StderrLogger_false0.warn$1(0, message); + break $label0$0; + } + return t1; + }, + warnForDeprecation0(message, deprecation) { + var t1, + _0_0 = A.EvaluationContext_currentOrNull0(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, deprecation); + break $label0$0; + } + t1 = A.WarnForDeprecation_warnForDeprecation0(B.StderrLogger_false0, deprecation, message, null, null); + break $label0$0; + } + return t1; + }, + warnForDeprecationFromApi(message, deprecation) { + var _0_0 = A.EvaluationContext__currentOrNull(); + if (_0_0 != null) + _0_0.warn$2(0, message, deprecation); + else + A.WarnForDeprecation_warnForDeprecation0(new A.StderrLogger0(false), deprecation, message, null, null); + }, + IterableExtension_search0(_this, callback) { + var t1, _0_0; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + _0_0 = callback.call$1(t1.get$current(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + IterableExtension_get_exceptLast0(_this) { + var t1 = J.getInterceptor$asx(_this), + size = t1.get$length(_this) - 1; + if (size < 0) + throw A.wrapException(A.StateError$("Iterable may not be empty")); + return t1.take$1(_this, size); + }, + NullableExtension_andThen0(_this, fn) { + return _this == null ? null : fn.call$1(_this); + }, + fuzzyEquals0(number1, number2) { + var t1; + if (number1 === number2) + return true; + if (Math.abs(number1 - number2) <= $.$get$_epsilon0()) { + t1 = $.$get$_inverseEpsilon0(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyEqualsNullable0(number1, number2) { + var t1; + if (number1 == number2) + return true; + if (number1 == null || number2 == null) + return false; + if (Math.abs(number1 - number2) <= $.$get$_epsilon0()) { + t1 = $.$get$_inverseEpsilon0(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyHashCode0(number) { + if (!isFinite(number)) + return B.JSNumber_methods.get$hashCode(number); + return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon0())); + }, + fuzzyLessThan0(number1, number2) { + return number1 < number2 && !A.fuzzyEquals0(number1, number2); + }, + fuzzyLessThanOrEquals0(number1, number2) { + return number1 < number2 || A.fuzzyEquals0(number1, number2); + }, + fuzzyGreaterThan0(number1, number2) { + return number1 > number2 && !A.fuzzyEquals0(number1, number2); + }, + fuzzyGreaterThanOrEquals0(number1, number2) { + return number1 > number2 || A.fuzzyEquals0(number1, number2); + }, + fuzzyIsInt0(number) { + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return false; + return A.fuzzyEquals0(number, B.JSNumber_methods.round$0(number)); + }, + fuzzyAsInt0(number) { + var rounded; + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return null; + rounded = B.JSNumber_methods.round$0(number); + return A.fuzzyEquals0(number, rounded) ? rounded : null; + }, + fuzzyRound0(number) { + var t1; + if (number > 0) { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 && !A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } else { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 || A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } + }, + fuzzyCheckRange0(number, min, max) { + if (A.fuzzyEquals0(number, min)) + return min; + if (A.fuzzyEquals0(number, max)) + return max; + if (number > min && number < max) + return number; + return null; + }, + fuzzyAssertRange0(number, min, max, $name) { + var result = A.fuzzyCheckRange0(number, min, max); + if (result != null) + return result; + throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); + }, + moduloLikeSass0(num1, num2) { + var result; + if (num1 == 1 / 0 || num1 == -1 / 0) + return 0 / 0; + if (num2 == 1 / 0 || num2 == -1 / 0) + return A.DoubleWithSignedZero_get_signIncludingZero0(num1) === J.get$sign$in(num2) ? num1 : 0 / 0; + if (num2 > 0) + return B.JSNumber_methods.$mod(num1, num2); + if (num2 === 0) + return 0 / 0; + result = B.JSNumber_methods.$mod(num1, num2); + return result === 0 ? 0 : result + num2; + }, + sqrt0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber0(Math.sqrt(number._number1$_value), null); + }, + sin0(number) { + return A.SassNumber_SassNumber0(Math.sin(number.coerceValueToUnit$2("rad", "number")), null); + }, + cos0(number) { + return A.SassNumber_SassNumber0(Math.cos(number.coerceValueToUnit$2("rad", "number")), null); + }, + tan0(number) { + return A.SassNumber_SassNumber0(Math.tan(number.coerceValueToUnit$2("rad", "number")), null); + }, + atan0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits0(Math.atan(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + asin0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits0(Math.asin(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + acos0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits0(Math.acos(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + log0(number, base) { + if (base != null) + return A.SassNumber_SassNumber0(Math.log(number._number1$_value) / Math.log(base._number1$_value), null); + return A.SassNumber_SassNumber0(Math.log(number._number1$_value), null); + }, + pow1(base, exponent) { + base.assertNoUnits$1("base"); + exponent.assertNoUnits$1("exponent"); + return A.SassNumber_SassNumber0(Math.pow(base._number1$_value, exponent._number1$_value), null); + }, + DoubleWithSignedZero_get_signIncludingZero0(_this) { + if (_this === -0.0) + return -1; + if (_this === 0) + return 1; + return J.get$sign$in(_this); + }, + main1(args) { + return A.main$body(args); + }, + main$body(args) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$currentError, options, t1, graph, error, error0, stackTrace, buffer, t2, t3, t4, exception, $async$exception, $async$temp1; + var $async$main1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + if (args.length >= 1 && "--embedded" === args[0]) { + A.main0(B.JSArray_methods.sublist$1(args, 1)); + // goto return + $async$goto = 1; + break; + } + options = null; + $async$handler = 4; + options = A.ExecutableOptions_ExecutableOptions$parse(args); + t2 = options._options; + $._glyphs = !(t2.wasParsed$1("unicode") ? A._asBool(t2.$index(0, "unicode")) : $._glyphs !== B.C_AsciiGlyphSet) ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + $async$goto = A._asBool(options._options.$index(0, "version")) ? 7 : 8; + break; + case 7: + // then + $async$temp1 = A; + $async$goto = 9; + return A._asyncAwait(A._loadVersion(), $async$main1); + case 9: + // returning from await. + $async$temp1.print($async$result); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 0); + // goto return + $async$goto = 1; + break; + case 8: + // join + $async$goto = options.get$interactive() ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(A.repl(options), $async$main1); + case 12: + // returning from await. + // goto return + $async$goto = 1; + break; + case 11: + // join + t1 = A.List_List$of(options.get$pkgImporters(), true, type$.Importer_2); + J.add$1$ax(t1, $.$get$FilesystemImporter_noLoadPath()); + t2 = type$.List_String._as(options._options.$index(0, "load-path")); + t3 = options; + t3 = A._asBool(t3._options.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(t3.get$color()); + t4 = type$.Uri; + graph = new A.StylesheetGraph(A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.StylesheetNode), A.ImportCache$(t1, t2, A.ImportCache_wrapLogger(t3, J.get$silenceDeprecations$x(options), J.get$fatalDeprecations$x(options), J.get$futureDeprecations$x(options))), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.DateTime)); + $async$goto = A._asBool(options._options.$index(0, "watch")) ? 13 : 14; + break; + case 13: + // then + $async$goto = 15; + return A._asyncAwait(A.watch(options, graph), $async$main1); + case 15: + // returning from await. + // goto return + $async$goto = 1; + break; + case 14: + // join + t1 = options; + t2 = options; + t2._ensureSources$0(); + t2 = t2._sourcesToDestinations; + t2.toString; + $async$goto = 16; + return A._asyncAwait(A.compileStylesheets(t1, graph, t2, A._asBool(options._options.$index(0, "update"))), $async$main1); + case 16: + // returning from await. + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.UsageException) { + error = t1; + A.print(error.message + "\n"); + A.print("Usage: sass [output.css]\n sass : : \n"); + t1 = $.$get$ExecutableOptions__parser(); + A.print(new A._Usage(t1._optionsAndSeparators, new A.StringBuffer(""), t1.usageLineLength).generate$0()); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 64); + } else { + error0 = t1; + stackTrace = A.getTraceFromException($async$exception); + buffer = new A.StringBuffer(""); + t1 = options; + t1 = t1 == null ? null : t1.get$color(); + if (t1 === true) + buffer._contents += "\x1b[31m\x1b[1m"; + buffer._contents += "Unexpected exception:"; + t1 = options; + t1 = t1 == null ? null : t1.get$color(); + if (t1 === true) + buffer._contents += "\x1b[0m"; + buffer._contents += "\n"; + t1 = buffer; + t2 = A.S(error0) + "\n"; + t1._contents += t2; + buffer._contents += "\n"; + buffer._contents += "\n"; + t2 = buffer; + t1 = A.getTrace(error0); + t1 = B.JSString_methods.trimRight$0(A.Trace_Trace$from(t1 == null ? stackTrace : t1).get$terse().toString$0(0)); + t2._contents += t1; + A.printError(buffer); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 255); + } + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$main1, $async$completer); + }, + _loadVersion() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue; + var $async$_loadVersion = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = "1.79.3 compiled with dart2js 3.5.3"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_loadVersion, $async$completer); + }, + SpanExtensions_trimLeft0(_this) { + var t1, start = 0; + while (true) { + t1 = _this.get$text().charCodeAt(start); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + ++start; + } + return A.FileSpanExtension_subspan(_this, start, null); + }, + SpanExtensions_trimRight0(_this) { + var t1, + end = _this.get$text().length - 1; + while (true) { + t1 = _this.get$text().charCodeAt(end); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + --end; + } + return A.FileSpanExtension_subspan(_this, 0, end + 1); + }, + SpanExtensions_initialIdentifier0(_this) { + var i, + scanner = A.StringScanner$(_this.get$text(), null, null); + for (i = 0; false; ++i) + scanner.readChar$0(); + A._scanIdentifier0(scanner); + return A.FileSpanExtension_subspan(_this, 0, scanner._string_scanner$_position); + }, + SpanExtensions_withoutInitialIdentifier0(_this) { + var scanner = A.StringScanner$(_this.get$text(), null, null); + A._scanIdentifier0(scanner); + return A.FileSpanExtension_subspan(_this, scanner._string_scanner$_position, null); + }, + _scanIdentifier0(scanner) { + var t1, _0_0, t2; + for (t1 = scanner.string.length; scanner._string_scanner$_position !== t1;) { + _0_0 = scanner.peekChar$0(); + if (92 === _0_0) { + A.consumeEscapedCharacter0(scanner); + continue; + } + if (A._isInt(_0_0)) { + if (_0_0 !== 95) { + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90; + else + t2 = true; + t2 = t2 || _0_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t2 = true; + } else + t2 = false; + if (t2) { + scanner.readChar$0(); + continue; + } + break; + } + }, + validateUrlScheme(scheme) { + var t1 = $.$get$_urlSchemeRegExp(); + if (!t1._nativeRegExp.test(scheme)) + A.jsThrow(new self.Error('"' + scheme + '" isn\'t a valid URL scheme (for example "file").')); + }, + hueToRgb0(m1, m2, hue) { + var t1; + if (hue < 0) + ++hue; + if (hue > 1) + --hue; + $label0$0: { + if (hue < 0.16666666666666666) { + t1 = m1 + (m2 - m1) * hue * 6; + break $label0$0; + } + if (hue < 0.5) { + t1 = m2; + break $label0$0; + } + if (hue < 0.6666666666666666) { + t1 = m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; + break $label0$0; + } + t1 = m1; + break $label0$0; + } + return t1; + }, + srgbAndDisplayP3ToLinear0(channel) { + var abs = Math.abs(channel); + return abs < 0.04045 ? channel / 12.92 : J.get$sign$in(channel) * Math.pow((abs + 0.055) / 1.055, 2.4); + }, + srgbAndDisplayP3FromLinear0(channel) { + var abs = Math.abs(channel); + return abs <= 0.0031308 ? channel * 12.92 : J.get$sign$in(channel) * (1.055 * Math.pow(abs, 0.4166666666666667) - 0.055); + }, + labToLch0(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var t3, t4, chroma, hue, + t1 = a == null, + t2 = t1 ? 0 : a; + t2 = Math.pow(t2, 2); + t3 = b == null; + t4 = t3 ? 0 : b; + chroma = Math.sqrt(t2 + Math.pow(t4, 2)); + if (missingHue || A.fuzzyEquals0(chroma, 0)) + hue = null; + else { + t2 = t3 ? 0 : b; + t1 = t1 ? 0 : a; + hue = Math.atan2(t2, t1) * 180 / 3.141592653589793; + } + t1 = missingChroma ? null : chroma; + return A.SassColor_SassColor$forSpaceInternal0(dest, lightness, t1, hue == null || hue >= 0 ? hue : hue + 360, alpha); + }, + unwrapValue(object) { + var value; + if (object != null) { + if (object instanceof A.Value0) + return object; + value = object.dartValue; + if (value != null && value instanceof A.Value0) + return value; + if (object instanceof self.Error) + throw A.wrapException(object); + } + throw A.wrapException(A.S(object) + " must be a Sass value type."); + }, + wrapValue(value) { + var t1; + $label0$0: { + if (value instanceof A.SassColor0) { + t1 = A.callConstructor($.$get$legacyColorClass(), [null, null, null, null, value]); + break $label0$0; + } + if (value instanceof A.SassList0) { + t1 = A.callConstructor($.$get$legacyListClass(), [null, null, value]); + break $label0$0; + } + if (value instanceof A.SassMap0) { + t1 = A.callConstructor($.$get$legacyMapClass(), [null, value]); + break $label0$0; + } + if (value instanceof A.SassNumber0) { + t1 = A.callConstructor($.$get$legacyNumberClass(), [null, null, value]); + break $label0$0; + } + if (value instanceof A.SassString0) { + t1 = A.callConstructor($.$get$legacyStringClass(), [null, value]); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + } + }, + B = {}; + var holders = [A, J, B]; + var $ = {}; + A.JS_CONST.prototype = {}; + J.Interceptor.prototype = { + $eq(receiver, other) { + return receiver === other; + }, + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); + }, + toString$0(receiver) { + return "Instance of '" + A.Primitives_objectTypeName(receiver) + "'"; + }, + noSuchMethod$1(receiver, invocation) { + throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, invocation)); + }, + get$runtimeType(receiver) { + return A.createRuntimeType(A._instanceTypeFromConstructor(this)); + } + }; + J.JSBool.prototype = { + toString$0(receiver) { + return String(receiver); + }, + get$hashCode(receiver) { + return receiver ? 519018 : 218159; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.bool); + }, + $isTrustedGetRuntimeType: 1, + $isbool: 1 + }; + J.JSNull.prototype = { + $eq(receiver, other) { + return null == other; + }, + toString$0(receiver) { + return "null"; + }, + get$hashCode(receiver) { + return 0; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.Null); + }, + $isTrustedGetRuntimeType: 1, + $isNull: 1 + }; + J.JavaScriptObject.prototype = {}; + J.LegacyJavaScriptObject.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + }, + $isPromise: 1, + $isJsSystemError: 1, + $isImmutableList: 1, + $is_ConstructionOptions: 1, + $is_ChannelOptions: 1, + $is_ToGamutOptions: 1, + $is_InterpolationOptions: 1, + $is_NodeSassColor: 1, + $isCompileOptions: 1, + $isCompileStringOptions: 1, + $isNodeCompileResult: 1, + $isDeprecation1: 1, + $is_NodeException: 1, + $isJSExpressionVisitorObject: 1, + $isFiber: 1, + $isJSFunction0: 1, + $isImmutableList0: 1, + $isImmutableMap0: 1, + $isJSImporter: 1, + $isJSImporterResult: 1, + $isNodeImporterResult0: 1, + $is_ConstructorOptions: 1, + $is_NodeSassList: 1, + $isJSLogger: 1, + $isWarnOptions: 1, + $isDebugOptions: 1, + $is_NodeSassMap: 1, + $is_ConstructorOptions0: 1, + $is_NodeSassNumber: 1, + $isParserExports: 1, + $isJSClass0: 1, + $isRenderContextOptions0: 1, + $isRenderOptions: 1, + $isRenderResult: 1, + $isJSStatementVisitorObject: 1, + $is_ConstructorOptions1: 1, + $is_NodeSassString: 1, + $isJSUrl0: 1, + get$isTTY(obj) { + return obj.isTTY; + }, + get$write(obj) { + return obj.write; + }, + write$1(receiver, p0) { + return receiver.write(p0); + }, + createInterface$1(receiver, p0) { + return receiver.createInterface(p0); + }, + on$2(receiver, p0, p1) { + return receiver.on(p0, p1); + }, + get$close(obj) { + return obj.close; + }, + close$0(receiver) { + return receiver.close(); + }, + setPrompt$1(receiver, p0) { + return receiver.setPrompt(p0); + }, + get$length(obj) { + return obj.length; + }, + toString$0(receiver) { + return receiver.toString(); + }, + get$debug(obj) { + return obj.debug; + }, + debug$2(receiver, p0, p1) { + return receiver.debug(p0, p1); + }, + get$error(obj) { + return obj.error; + }, + error$1(receiver, p0) { + return receiver.error(p0); + }, + error$2(receiver, p0, p1) { + return receiver.error(p0, p1); + }, + log$1(receiver, p0) { + return receiver.log(p0); + }, + get$warn(obj) { + return obj.warn; + }, + warn$1(receiver, p0) { + return receiver.warn(p0); + }, + warn$2(receiver, p0, p1) { + return receiver.warn(p0, p1); + }, + existsSync$1(receiver, p0) { + return receiver.existsSync(p0); + }, + mkdirSync$1(receiver, p0) { + return receiver.mkdirSync(p0); + }, + readdirSync$1(receiver, p0) { + return receiver.readdirSync(p0); + }, + readFileSync$2(receiver, p0, p1) { + return receiver.readFileSync(p0, p1); + }, + statSync$1(receiver, p0) { + return receiver.statSync(p0); + }, + unlinkSync$1(receiver, p0) { + return receiver.unlinkSync(p0); + }, + watch$2(receiver, p0, p1) { + return receiver.watch(p0, p1); + }, + writeFileSync$2(receiver, p0, p1) { + return receiver.writeFileSync(p0, p1); + }, + get$path(obj) { + return obj.path; + }, + isDirectory$0(receiver) { + return receiver.isDirectory(); + }, + isFile$0(receiver) { + return receiver.isFile(); + }, + get$mtime(obj) { + return obj.mtime; + }, + then$1$1(receiver, p0) { + return receiver.then(p0); + }, + then$2(receiver, p0, p1) { + return receiver.then(p0, p1); + }, + getTime$0(receiver) { + return receiver.getTime(); + }, + get$message(obj) { + return obj.message; + }, + message$1(receiver, p0) { + return receiver.message(p0); + }, + get$filename(obj) { + return obj.filename; + }, + get$id(obj) { + return obj.id; + }, + get$code(obj) { + return obj.code; + }, + get$syscall(obj) { + return obj.syscall; + }, + get$argv(obj) { + return obj.argv; + }, + get$env(obj) { + return obj.env; + }, + get$exitCode(obj) { + return obj.exitCode; + }, + set$exitCode(obj, v) { + return obj.exitCode = v; + }, + get$platform(obj) { + return obj.platform; + }, + get$release(obj) { + return obj.release; + }, + get$stderr(obj) { + return obj.stderr; + }, + get$stdin(obj) { + return obj.stdin; + }, + get$stdout(obj) { + return obj.stdout; + }, + get$name(obj) { + return obj.name; + }, + push$1(receiver, p0) { + return receiver.push(p0); + }, + call$0(receiver) { + return receiver.call(); + }, + call$1(receiver, p0) { + return receiver.call(p0); + }, + call$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$3$1(receiver, p0) { + return receiver.call(p0); + }, + call$2$1(receiver, p0) { + return receiver.call(p0); + }, + call$1$1(receiver, p0) { + return receiver.call(p0); + }, + call$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + call$3$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + call$2$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$2$0(receiver) { + return receiver.call(); + }, + call$1$0(receiver) { + return receiver.call(); + }, + call$1$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$2$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + apply$2(receiver, p0, p1) { + return receiver.apply(p0, p1); + }, + toArray$0(receiver) { + return receiver.toArray(); + }, + asMutable$0(receiver) { + return receiver.asMutable(); + }, + asImmutable$0(receiver) { + return receiver.asImmutable(); + }, + $set$2(receiver, p0, p1) { + return receiver.set(p0, p1); + }, + forEach$1(receiver, p0) { + return receiver.forEach(p0); + }, + get$file(obj) { + return obj.file; + }, + get$contents(obj) { + return obj.contents; + }, + get$options(obj) { + return obj.options; + }, + get$data(obj) { + return obj.data; + }, + get$includePaths(obj) { + return obj.includePaths; + }, + get$style(obj) { + return obj.style; + }, + get$indentType(obj) { + return obj.indentType; + }, + get$indentWidth(obj) { + return obj.indentWidth; + }, + get$linefeed(obj) { + return obj.linefeed; + }, + set$context(obj, v) { + return obj.context = v; + }, + createRequire$1(receiver, p0) { + return receiver.createRequire(p0); + }, + resolve$1(receiver, p0) { + return receiver.resolve(p0); + }, + get$$prototype(obj) { + return obj.prototype; + }, + get$red(obj) { + return obj.red; + }, + get$green(obj) { + return obj.green; + }, + get$blue(obj) { + return obj.blue; + }, + get$hue(obj) { + return obj.hue; + }, + get$saturation(obj) { + return obj.saturation; + }, + get$lightness(obj) { + return obj.lightness; + }, + get$whiteness(obj) { + return obj.whiteness; + }, + get$blackness(obj) { + return obj.blackness; + }, + get$alpha(obj) { + return obj.alpha; + }, + get$a(obj) { + return obj.a; + }, + get$b(obj) { + return obj.b; + }, + get$x(obj) { + return obj.x; + }, + get$y(obj) { + return obj.y; + }, + get$z(obj) { + return obj.z; + }, + get$chroma(obj) { + return obj.chroma; + }, + get$space(obj) { + return obj.space; + }, + get$method(obj) { + return obj.method; + }, + get$weight(obj) { + return obj.weight; + }, + get$dartValue(obj) { + return obj.dartValue; + }, + set$dartValue(obj, v) { + return obj.dartValue = v; + }, + get$alertAscii(obj) { + return obj.alertAscii; + }, + get$alertColor(obj) { + return obj.alertColor; + }, + get$loadPaths(obj) { + return obj.loadPaths; + }, + get$quietDeps(obj) { + return obj.quietDeps; + }, + get$verbose(obj) { + return obj.verbose; + }, + get$charset(obj) { + return obj.charset; + }, + get$sourceMap(obj) { + return obj.sourceMap; + }, + get$sourceMapIncludeSources(obj) { + return obj.sourceMapIncludeSources; + }, + get$logger(obj) { + return obj.logger; + }, + get$importers(obj) { + return obj.importers; + }, + get$functions(obj) { + return obj.functions; + }, + get$fatalDeprecations(obj) { + return obj.fatalDeprecations; + }, + get$silenceDeprecations(obj) { + return obj.silenceDeprecations; + }, + get$futureDeprecations(obj) { + return obj.futureDeprecations; + }, + get$syntax(obj) { + return obj.syntax; + }, + get$url(obj) { + return obj.url; + }, + get$importer(obj) { + return obj.importer; + }, + get$_dartException(obj) { + return obj._dartException; + }, + set$renderSync(obj, v) { + return obj.renderSync = v; + }, + set$compileString(obj, v) { + return obj.compileString = v; + }, + set$compileStringAsync(obj, v) { + return obj.compileStringAsync = v; + }, + set$compile(obj, v) { + return obj.compile = v; + }, + set$compileAsync(obj, v) { + return obj.compileAsync = v; + }, + set$initCompiler(obj, v) { + return obj.initCompiler = v; + }, + set$initAsyncCompiler(obj, v) { + return obj.initAsyncCompiler = v; + }, + set$Compiler(obj, v) { + return obj.Compiler = v; + }, + set$AsyncCompiler(obj, v) { + return obj.AsyncCompiler = v; + }, + set$info(obj, v) { + return obj.info = v; + }, + set$Exception(obj, v) { + return obj.Exception = v; + }, + set$Logger(obj, v) { + return obj.Logger = v; + }, + set$NodePackageImporter(obj, v) { + return obj.NodePackageImporter = v; + }, + set$deprecations(obj, v) { + return obj.deprecations = v; + }, + set$Version(obj, v) { + return obj.Version = v; + }, + set$Value(obj, v) { + return obj.Value = v; + }, + set$SassArgumentList(obj, v) { + return obj.SassArgumentList = v; + }, + set$SassCalculation(obj, v) { + return obj.SassCalculation = v; + }, + set$CalculationOperation(obj, v) { + return obj.CalculationOperation = v; + }, + set$CalculationInterpolation(obj, v) { + return obj.CalculationInterpolation = v; + }, + set$SassBoolean(obj, v) { + return obj.SassBoolean = v; + }, + set$SassColor(obj, v) { + return obj.SassColor = v; + }, + set$SassFunction(obj, v) { + return obj.SassFunction = v; + }, + set$SassMixin(obj, v) { + return obj.SassMixin = v; + }, + set$SassList(obj, v) { + return obj.SassList = v; + }, + set$SassMap(obj, v) { + return obj.SassMap = v; + }, + set$SassNumber(obj, v) { + return obj.SassNumber = v; + }, + set$SassString(obj, v) { + return obj.SassString = v; + }, + set$sassNull(obj, v) { + return obj.sassNull = v; + }, + set$sassTrue(obj, v) { + return obj.sassTrue = v; + }, + set$sassFalse(obj, v) { + return obj.sassFalse = v; + }, + set$render(obj, v) { + return obj.render = v; + }, + set$types(obj, v) { + return obj.types = v; + }, + set$NULL(obj, v) { + return obj.NULL = v; + }, + set$TRUE(obj, v) { + return obj.TRUE = v; + }, + set$FALSE(obj, v) { + return obj.FALSE = v; + }, + set$loadParserExports_(obj, v) { + return obj.loadParserExports_ = v; + }, + visitBinaryOperationExpression$1(receiver, p0) { + return receiver.visitBinaryOperationExpression(p0); + }, + visitBooleanExpression$1(receiver, p0) { + return receiver.visitBooleanExpression(p0); + }, + visitColorExpression$1(receiver, p0) { + return receiver.visitColorExpression(p0); + }, + visitInterpolatedFunctionExpression$1(receiver, p0) { + return receiver.visitInterpolatedFunctionExpression(p0); + }, + visitFunctionExpression$1(receiver, p0) { + return receiver.visitFunctionExpression(p0); + }, + visitIfExpression$1(receiver, p0) { + return receiver.visitIfExpression(p0); + }, + visitListExpression$1(receiver, p0) { + return receiver.visitListExpression(p0); + }, + visitMapExpression$1(receiver, p0) { + return receiver.visitMapExpression(p0); + }, + visitNullExpression$1(receiver, p0) { + return receiver.visitNullExpression(p0); + }, + visitNumberExpression$1(receiver, p0) { + return receiver.visitNumberExpression(p0); + }, + visitParenthesizedExpression$1(receiver, p0) { + return receiver.visitParenthesizedExpression(p0); + }, + visitSelectorExpression$1(receiver, p0) { + return receiver.visitSelectorExpression(p0); + }, + visitStringExpression$1(receiver, p0) { + return receiver.visitStringExpression(p0); + }, + visitSupportsExpression$1(receiver, p0) { + return receiver.visitSupportsExpression(p0); + }, + visitUnaryOperationExpression$1(receiver, p0) { + return receiver.visitUnaryOperationExpression(p0); + }, + visitValueExpression$1(receiver, p0) { + return receiver.visitValueExpression(p0); + }, + visitVariableExpression$1(receiver, p0) { + return receiver.visitVariableExpression(p0); + }, + get$current(obj) { + return obj.current; + }, + yield$0(receiver) { + return receiver.yield(); + }, + run$1$1(receiver, p0) { + return receiver.run(p0); + }, + run$1(receiver, p0) { + return receiver.run(p0); + }, + run$0(receiver) { + return receiver.run(); + }, + get$canonicalize(obj) { + return obj.canonicalize; + }, + canonicalize$1(receiver, p0) { + return receiver.canonicalize(p0); + }, + get$load(obj) { + return obj.load; + }, + load$1(receiver, p0) { + return receiver.load(p0); + }, + get$findFileUrl(obj) { + return obj.findFileUrl; + }, + get$nonCanonicalScheme(obj) { + return obj.nonCanonicalScheme; + }, + get$sourceMapUrl(obj) { + return obj.sourceMapUrl; + }, + get$separator(obj) { + return obj.separator; + }, + get$brackets(obj) { + return obj.brackets; + }, + get$numeratorUnits(obj) { + return obj.numeratorUnits; + }, + get$denominatorUnits(obj) { + return obj.denominatorUnits; + }, + get$pkgImporter(obj) { + return obj.pkgImporter; + }, + get$indentedSyntax(obj) { + return obj.indentedSyntax; + }, + get$omitSourceMapUrl(obj) { + return obj.omitSourceMapUrl; + }, + get$outFile(obj) { + return obj.outFile; + }, + get$outputStyle(obj) { + return obj.outputStyle; + }, + get$fiber(obj) { + return obj.fiber; + }, + get$sourceMapContents(obj) { + return obj.sourceMapContents; + }, + get$sourceMapEmbed(obj) { + return obj.sourceMapEmbed; + }, + get$sourceMapRoot(obj) { + return obj.sourceMapRoot; + }, + set$cli_pkg_main_0_(obj, v) { + return obj.cli_pkg_main_0_ = v; + }, + visitAtRootRule$1(receiver, p0) { + return receiver.visitAtRootRule(p0); + }, + visitAtRule$1(receiver, p0) { + return receiver.visitAtRule(p0); + }, + get$visitContentBlock(obj) { + return obj.visitContentBlock; + }, + visitContentBlock$1(receiver, p0) { + return receiver.visitContentBlock(p0); + }, + visitContentRule$1(receiver, p0) { + return receiver.visitContentRule(p0); + }, + visitDebugRule$1(receiver, p0) { + return receiver.visitDebugRule(p0); + }, + visitDeclaration$1(receiver, p0) { + return receiver.visitDeclaration(p0); + }, + visitEachRule$1(receiver, p0) { + return receiver.visitEachRule(p0); + }, + visitErrorRule$1(receiver, p0) { + return receiver.visitErrorRule(p0); + }, + visitExtendRule$1(receiver, p0) { + return receiver.visitExtendRule(p0); + }, + visitForRule$1(receiver, p0) { + return receiver.visitForRule(p0); + }, + visitForwardRule$1(receiver, p0) { + return receiver.visitForwardRule(p0); + }, + visitFunctionRule$1(receiver, p0) { + return receiver.visitFunctionRule(p0); + }, + visitIfRule$1(receiver, p0) { + return receiver.visitIfRule(p0); + }, + visitImportRule$1(receiver, p0) { + return receiver.visitImportRule(p0); + }, + visitIncludeRule$1(receiver, p0) { + return receiver.visitIncludeRule(p0); + }, + visitLoudComment$1(receiver, p0) { + return receiver.visitLoudComment(p0); + }, + visitMediaRule$1(receiver, p0) { + return receiver.visitMediaRule(p0); + }, + visitMixinRule$1(receiver, p0) { + return receiver.visitMixinRule(p0); + }, + visitReturnRule$1(receiver, p0) { + return receiver.visitReturnRule(p0); + }, + visitSilentComment$1(receiver, p0) { + return receiver.visitSilentComment(p0); + }, + visitStyleRule$1(receiver, p0) { + return receiver.visitStyleRule(p0); + }, + visitStylesheet$1(receiver, p0) { + return receiver.visitStylesheet(p0); + }, + visitSupportsRule$1(receiver, p0) { + return receiver.visitSupportsRule(p0); + }, + visitUseRule$1(receiver, p0) { + return receiver.visitUseRule(p0); + }, + visitVariableDeclaration$1(receiver, p0) { + return receiver.visitVariableDeclaration(p0); + }, + visitWarnRule$1(receiver, p0) { + return receiver.visitWarnRule(p0); + }, + visitWhileRule$1(receiver, p0) { + return receiver.visitWhileRule(p0); + }, + get$quotes(obj) { + return obj.quotes; + } + }; + J.PlainJavaScriptObject.prototype = {}; + J.UnknownJavaScriptObject.prototype = {}; + J.JavaScriptFunction.prototype = { + toString$0(receiver) { + var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; + if (dartClosure == null) + return this.super$LegacyJavaScriptObject$toString(receiver); + return "JavaScript function for " + A.S(J.toString$0$(dartClosure)); + }, + $isFunction: 1 + }; + J.JavaScriptBigInt.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + } + }; + J.JavaScriptSymbol.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + } + }; + J.JSArray.prototype = { + cast$1$0(receiver, $R) { + return new A.CastList(receiver, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); + }, + add$1(receiver, value) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("add")); + receiver.push(value); + }, + removeAt$1(receiver, index) { + var t1; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("removeAt")); + t1 = receiver.length; + if (index >= t1) + throw A.wrapException(A.RangeError$value(index, null, null)); + return receiver.splice(index, 1)[0]; + }, + insert$2(receiver, index, value) { + var t1; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("insert")); + t1 = receiver.length; + if (index > t1) + throw A.wrapException(A.RangeError$value(index, null, null)); + receiver.splice(index, 0, value); + }, + insertAll$2(receiver, index, iterable) { + var insertionLength, end; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("insertAll")); + A.RangeError_checkValueInInterval(index, 0, receiver.length, "index"); + if (!type$.EfficientLengthIterable_dynamic._is(iterable)) + iterable = J.toList$0$ax(iterable); + insertionLength = J.get$length$asx(iterable); + receiver.length = receiver.length + insertionLength; + end = index + insertionLength; + this.setRange$4(receiver, end, receiver.length, receiver, index); + this.setRange$3(receiver, index, end, iterable); + }, + removeLast$0(receiver) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("removeLast")); + if (receiver.length === 0) + throw A.wrapException(A.diagnoseIndexError(receiver, -1)); + return receiver.pop(); + }, + _removeWhere$2(receiver, test, removeMatching) { + var i, element, t1, retained = [], + end = receiver.length; + for (i = 0; i < end; ++i) { + element = receiver[i]; + if (!test.call$1(element)) + retained.push(element); + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + t1 = retained.length; + if (t1 === end) + return; + this.set$length(receiver, t1); + for (i = 0; i < retained.length; ++i) + receiver[i] = retained[i]; + }, + where$1(receiver, f) { + return new A.WhereIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("WhereIterable<1>")); + }, + expand$1$1(receiver, f, $T) { + return new A.ExpandIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + addAll$1(receiver, collection) { + var t1; + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("addAll")); + if (Array.isArray(collection)) { + this._addAllFromArray$1(receiver, collection); + return; + } + for (t1 = J.get$iterator$ax(collection); t1.moveNext$0();) + receiver.push(t1.get$current(t1)); + }, + _addAllFromArray$1(receiver, array) { + var i, + len = array.length; + if (len === 0) + return; + if (receiver === array) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + for (i = 0; i < len; ++i) + receiver.push(array[i]); + }, + clear$0(receiver) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("clear")); + receiver.length = 0; + }, + map$1$1(receiver, f, $T) { + return new A.MappedListIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + join$1(receiver, separator) { + var i, + list = A.List_List$filled(receiver.length, "", false, type$.String); + for (i = 0; i < receiver.length; ++i) + list[i] = A.S(receiver[i]); + return list.join(separator); + }, + join$0(receiver) { + return this.join$1(receiver, ""); + }, + take$1(receiver, n) { + return A.SubListIterable$(receiver, 0, A.checkNotNullable(n, "count", type$.int), A._arrayInstanceType(receiver)._precomputed1); + }, + skip$1(receiver, n) { + return A.SubListIterable$(receiver, n, null, A._arrayInstanceType(receiver)._precomputed1); + }, + fold$1$2(receiver, initialValue, combine) { + var value, i, + $length = receiver.length; + for (value = initialValue, i = 0; i < $length; ++i) { + value = combine.call$2(value, receiver[i]); + if (receiver.length !== $length) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return value; + }, + fold$2(receiver, initialValue, combine) { + return this.fold$1$2(receiver, initialValue, combine, type$.dynamic); + }, + firstWhere$1(receiver, test) { + var i, element, + end = receiver.length; + for (i = 0; i < end; ++i) { + element = receiver[i]; + if (test.call$1(element)) + return element; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + throw A.wrapException(A.IterableElementError_noElement()); + }, + elementAt$1(receiver, index) { + return receiver[index]; + }, + sublist$2(receiver, start, end) { + var end0 = receiver.length; + if (start > end0) + throw A.wrapException(A.RangeError$range(start, 0, end0, "start", null)); + if (end == null) + end = end0; + else if (end < start || end > end0) + throw A.wrapException(A.RangeError$range(end, start, end0, "end", null)); + if (start === end) + return A._setArrayType([], A._arrayInstanceType(receiver)); + return A._setArrayType(receiver.slice(start, end), A._arrayInstanceType(receiver)); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + getRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, receiver.length); + return A.SubListIterable$(receiver, start, end, A._arrayInstanceType(receiver)._precomputed1); + }, + get$first(receiver) { + if (receiver.length > 0) + return receiver[0]; + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$last(receiver) { + var t1 = receiver.length; + if (t1 > 0) + return receiver[t1 - 1]; + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$single(receiver) { + var t1 = receiver.length; + if (t1 === 1) + return receiver[0]; + if (t1 === 0) + throw A.wrapException(A.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_tooMany()); + }, + removeRange$2(receiver, start, end) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("removeRange")); + A.RangeError_checkValidRange(start, end, receiver.length); + receiver.splice(start, end - start); + }, + setRange$4(receiver, start, end, iterable, skipCount) { + var $length, otherList, otherStart, t1, i; + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("setRange")); + A.RangeError_checkValidRange(start, end, receiver.length); + $length = end - start; + if ($length === 0) + return; + A.RangeError_checkNotNegative(skipCount, "skipCount"); + if (type$.List_dynamic._is(iterable)) { + otherList = iterable; + otherStart = skipCount; + } else { + otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); + otherStart = 0; + } + t1 = J.getInterceptor$asx(otherList); + if (otherStart + $length > t1.get$length(otherList)) + throw A.wrapException(A.IterableElementError_tooFew()); + if (otherStart < start) + for (i = $length - 1; i >= 0; --i) + receiver[start + i] = t1.$index(otherList, otherStart + i); + else + for (i = 0; i < $length; ++i) + receiver[start + i] = t1.$index(otherList, otherStart + i); + }, + setRange$3(receiver, start, end, iterable) { + return this.setRange$4(receiver, start, end, iterable, 0); + }, + fillRange$3(receiver, start, end, fillValue) { + var i; + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("fill range")); + A.RangeError_checkValidRange(start, end, receiver.length); + A._arrayInstanceType(receiver)._precomputed1._as(fillValue); + for (i = start; i < end; ++i) + receiver[i] = fillValue; + }, + any$1(receiver, test) { + var i, + end = receiver.length; + for (i = 0; i < end; ++i) { + if (test.call$1(receiver[i])) + return true; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + every$1(receiver, test) { + var i, + end = receiver.length; + for (i = 0; i < end; ++i) { + if (!test.call$1(receiver[i])) + return false; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return true; + }, + get$reversed(receiver) { + return new A.ReversedListIterable(receiver, A._arrayInstanceType(receiver)._eval$1("ReversedListIterable<1>")); + }, + sort$1(receiver, compare) { + var len, a, b, undefineds, i; + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("sort")); + len = receiver.length; + if (len < 2) + return; + if (compare == null) + compare = J._interceptors_JSArray__compareAny$closure(); + if (len === 2) { + a = receiver[0]; + b = receiver[1]; + if (compare.call$2(a, b) > 0) { + receiver[0] = b; + receiver[1] = a; + } + return; + } + undefineds = 0; + if (A._arrayInstanceType(receiver)._precomputed1._is(null)) + for (i = 0; i < receiver.length; ++i) + if (receiver[i] === void 0) { + receiver[i] = null; + ++undefineds; + } + receiver.sort(A.convertDartClosureToJS(compare, 2)); + if (undefineds > 0) + this._replaceSomeNullsWithUndefined$1(receiver, undefineds); + }, + sort$0(receiver) { + return this.sort$1(receiver, null); + }, + _replaceSomeNullsWithUndefined$1(receiver, count) { + var i0, + i = receiver.length; + for (; i0 = i - 1, i > 0; i = i0) + if (receiver[i0] === null) { + receiver[i0] = void 0; + --count; + if (count === 0) + break; + } + }, + indexOf$1(receiver, element) { + var i, + $length = receiver.length; + if (0 >= $length) + return -1; + for (i = 0; i < $length; ++i) + if (J.$eq$(receiver[i], element)) + return i; + return -1; + }, + contains$1(receiver, other) { + var i; + for (i = 0; i < receiver.length; ++i) + if (J.$eq$(receiver[i], other)) + return true; + return false; + }, + get$isEmpty(receiver) { + return receiver.length === 0; + }, + get$isNotEmpty(receiver) { + return receiver.length !== 0; + }, + toString$0(receiver) { + return A.Iterable_iterableToFullString(receiver, "[", "]"); + }, + toList$1$growable(receiver, growable) { + var t1 = A._setArrayType(receiver.slice(0), A._arrayInstanceType(receiver)); + return t1; + }, + toList$0(receiver) { + return this.toList$1$growable(receiver, true); + }, + toSet$0(receiver) { + return A.LinkedHashSet_LinkedHashSet$from(receiver, A._arrayInstanceType(receiver)._precomputed1); + }, + get$iterator(receiver) { + return new J.ArrayIterator(receiver, receiver.length, A._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>")); + }, + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); + }, + get$length(receiver) { + return receiver.length; + }, + set$length(receiver, newLength) { + if (!!receiver.fixed$length) + A.throwExpression(A.UnsupportedError$("set length")); + if (newLength < 0) + throw A.wrapException(A.RangeError$range(newLength, 0, null, "newLength", null)); + if (newLength > receiver.length) + A._arrayInstanceType(receiver)._precomputed1._as(null); + receiver.length = newLength; + }, + $index(receiver, index) { + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $indexSet(receiver, index, value) { + if (!!receiver.immutable$list) + A.throwExpression(A.UnsupportedError$("indexed set")); + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + receiver[index] = value; + }, + $add(receiver, other) { + var t1 = A.List_List$of(receiver, true, A._arrayInstanceType(receiver)._precomputed1); + this.addAll$1(t1, other); + return t1; + }, + indexWhere$1(receiver, test) { + var i; + if (0 >= receiver.length) + return -1; + for (i = 0; i < receiver.length; ++i) + if (test.call$1(receiver[i])) + return i; + return -1; + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + J.JSUnmodifiableArray.prototype = {}; + J.ArrayIterator.prototype = { + get$current(_) { + var t1 = this._current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t2, _this = this, + t1 = _this._iterable, + $length = t1.length; + if (_this._length !== $length) + throw A.wrapException(A.throwConcurrentModificationError(t1)); + t2 = _this._index; + if (t2 >= $length) { + _this._current = null; + return false; + } + _this._current = t1[t2]; + _this._index = t2 + 1; + return true; + } + }; + J.JSNumber.prototype = { + compareTo$1(receiver, b) { + var bIsNegative; + if (receiver < b) + return -1; + else if (receiver > b) + return 1; + else if (receiver === b) { + if (receiver === 0) { + bIsNegative = this.get$isNegative(b); + if (this.get$isNegative(receiver) === bIsNegative) + return 0; + if (this.get$isNegative(receiver)) + return -1; + return 1; + } + return 0; + } else if (isNaN(receiver)) { + if (isNaN(b)) + return 0; + return 1; + } else + return -1; + }, + get$isNegative(receiver) { + return receiver === 0 ? 1 / receiver < 0 : receiver < 0; + }, + get$sign(receiver) { + var t1; + if (receiver > 0) + t1 = 1; + else + t1 = receiver < 0 ? -1 : receiver; + return t1; + }, + ceil$0(receiver) { + var truncated, d; + if (receiver >= 0) { + if (receiver <= 2147483647) { + truncated = receiver | 0; + return receiver === truncated ? truncated : truncated + 1; + } + } else if (receiver >= -2147483648) + return receiver | 0; + d = Math.ceil(receiver); + if (isFinite(d)) + return d; + throw A.wrapException(A.UnsupportedError$("" + receiver + ".ceil()")); + }, + floor$0(receiver) { + var truncated, d; + if (receiver >= 0) { + if (receiver <= 2147483647) + return receiver | 0; + } else if (receiver >= -2147483648) { + truncated = receiver | 0; + return receiver === truncated ? truncated : truncated - 1; + } + d = Math.floor(receiver); + if (isFinite(d)) + return d; + throw A.wrapException(A.UnsupportedError$("" + receiver + ".floor()")); + }, + round$0(receiver) { + if (receiver > 0) { + if (receiver !== 1 / 0) + return Math.round(receiver); + } else if (receiver > -1 / 0) + return 0 - Math.round(0 - receiver); + throw A.wrapException(A.UnsupportedError$("" + receiver + ".round()")); + }, + clamp$2(receiver, lowerLimit, upperLimit) { + if (this.compareTo$1(lowerLimit, upperLimit) > 0) + throw A.wrapException(A.argumentErrorValue(lowerLimit)); + if (this.compareTo$1(receiver, lowerLimit) < 0) + return lowerLimit; + if (this.compareTo$1(receiver, upperLimit) > 0) + return upperLimit; + return receiver; + }, + toRadixString$1(receiver, radix) { + var result, match, exponent, t1; + if (radix < 2 || radix > 36) + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", null)); + result = receiver.toString(radix); + if (result.charCodeAt(result.length - 1) !== 41) + return result; + match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); + if (match == null) + A.throwExpression(A.UnsupportedError$("Unexpected toString result: " + result)); + result = match[1]; + exponent = +match[3]; + t1 = match[2]; + if (t1 != null) { + result += t1; + exponent -= t1.length; + } + return result + B.JSString_methods.$mul("0", exponent); + }, + toString$0(receiver) { + if (receiver === 0 && 1 / receiver < 0) + return "-0.0"; + else + return "" + receiver; + }, + get$hashCode(receiver) { + var absolute, floorLog2, factor, scaled, + intValue = receiver | 0; + if (receiver === intValue) + return intValue & 536870911; + absolute = Math.abs(receiver); + floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0; + factor = Math.pow(2, floorLog2); + scaled = absolute < 1 ? absolute / factor : factor / absolute; + return ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259 & 536870911; + }, + $mod(receiver, other) { + var result = receiver % other; + if (result === 0) + return 0; + if (result > 0) + return result; + if (other < 0) + return result - other; + else + return result + other; + }, + $tdiv(receiver, other) { + if ((receiver | 0) === receiver) + if (other >= 1 || other < -1) + return receiver / other | 0; + return this._tdivSlow$1(receiver, other); + }, + _tdivFast$1(receiver, other) { + return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); + }, + _tdivSlow$1(receiver, other) { + var quotient = receiver / other; + if (quotient >= -2147483648 && quotient <= 2147483647) + return quotient | 0; + if (quotient > 0) { + if (quotient !== 1 / 0) + return Math.floor(quotient); + } else if (quotient > -1 / 0) + return Math.ceil(quotient); + throw A.wrapException(A.UnsupportedError$("Result of truncating division is " + A.S(quotient) + ": " + A.S(receiver) + " ~/ " + other)); + }, + _shrOtherPositive$1(receiver, other) { + var t1; + if (receiver > 0) + t1 = this._shrBothPositive$1(receiver, other); + else { + t1 = other > 31 ? 31 : other; + t1 = receiver >> t1 >>> 0; + } + return t1; + }, + _shrReceiverPositive$1(receiver, other) { + if (0 > other) + throw A.wrapException(A.argumentErrorValue(other)); + return this._shrBothPositive$1(receiver, other); + }, + _shrBothPositive$1(receiver, other) { + return other > 31 ? 0 : receiver >>> other; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.num); + }, + $isComparable: 1, + $isdouble: 1, + $isnum: 1 + }; + J.JSInt.prototype = { + get$sign(receiver) { + var t1; + if (receiver > 0) + t1 = 1; + else + t1 = receiver < 0 ? -1 : receiver; + return t1; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.int); + }, + $isTrustedGetRuntimeType: 1, + $isint: 1 + }; + J.JSNumNotInt.prototype = { + get$runtimeType(receiver) { + return A.createRuntimeType(type$.double); + }, + $isTrustedGetRuntimeType: 1 + }; + J.JSString.prototype = { + codeUnitAt$1(receiver, index) { + if (index < 0) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + if (index >= receiver.length) + A.throwExpression(A.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + allMatches$2(receiver, string, start) { + var t1 = string.length; + if (start > t1) + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._StringAllMatchesIterable(string, receiver, start); + }, + allMatches$1(receiver, string) { + return this.allMatches$2(receiver, string, 0); + }, + matchAsPrefix$2(receiver, string, start) { + var t1, i, _null = null; + if (start < 0 || start > string.length) + throw A.wrapException(A.RangeError$range(start, 0, string.length, _null, _null)); + t1 = receiver.length; + if (start + t1 > string.length) + return _null; + for (i = 0; i < t1; ++i) + if (string.charCodeAt(start + i) !== receiver.charCodeAt(i)) + return _null; + return new A.StringMatch(start, receiver); + }, + $add(receiver, other) { + return receiver + other; + }, + endsWith$1(receiver, other) { + var otherLength = other.length, + t1 = receiver.length; + if (otherLength > t1) + return false; + return other === this.substring$1(receiver, t1 - otherLength); + }, + replaceFirst$2(receiver, from, to) { + A.RangeError_checkValueInInterval(0, 0, receiver.length, "startIndex"); + return A.stringReplaceFirstUnchecked(receiver, from, to, 0); + }, + split$1(receiver, pattern) { + if (typeof pattern == "string") + return A._setArrayType(receiver.split(pattern), type$.JSArray_String); + else if (pattern instanceof A.JSSyntaxRegExp && pattern.get$_nativeAnchoredVersion().exec("").length - 2 === 0) + return A._setArrayType(receiver.split(pattern._nativeRegExp), type$.JSArray_String); + else + return this._defaultSplit$1(receiver, pattern); + }, + replaceRange$3(receiver, start, end, replacement) { + var e = A.RangeError_checkValidRange(start, end, receiver.length); + return A.stringReplaceRangeUnchecked(receiver, start, e, replacement); + }, + _defaultSplit$1(receiver, pattern) { + var t1, start, $length, match, matchStart, matchEnd, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), start = 0, $length = 1; t1.moveNext$0();) { + match = t1.get$current(t1); + matchStart = match.get$start(match); + matchEnd = match.get$end(match); + $length = matchEnd - matchStart; + if ($length === 0 && start === matchStart) + continue; + result.push(this.substring$2(receiver, start, matchStart)); + start = matchEnd; + } + if (start < receiver.length || $length > 0) + result.push(this.substring$1(receiver, start)); + return result; + }, + startsWith$2(receiver, pattern, index) { + var endIndex; + if (index < 0 || index > receiver.length) + throw A.wrapException(A.RangeError$range(index, 0, receiver.length, null, null)); + if (typeof pattern == "string") { + endIndex = index + pattern.length; + if (endIndex > receiver.length) + return false; + return pattern === receiver.substring(index, endIndex); + } + return J.matchAsPrefix$2$s(pattern, receiver, index) != null; + }, + startsWith$1(receiver, pattern) { + return this.startsWith$2(receiver, pattern, 0); + }, + substring$2(receiver, start, end) { + return receiver.substring(start, A.RangeError_checkValidRange(start, end, receiver.length)); + }, + substring$1(receiver, start) { + return this.substring$2(receiver, start, null); + }, + trim$0(receiver) { + var startIndex, t1, endIndex0, + result = receiver.trim(), + endIndex = result.length; + if (endIndex === 0) + return result; + if (result.charCodeAt(0) === 133) { + startIndex = J.JSString__skipLeadingWhitespace(result, 1); + if (startIndex === endIndex) + return ""; + } else + startIndex = 0; + t1 = endIndex - 1; + endIndex0 = result.charCodeAt(t1) === 133 ? J.JSString__skipTrailingWhitespace(result, t1) : endIndex; + if (startIndex === 0 && endIndex0 === endIndex) + return result; + return result.substring(startIndex, endIndex0); + }, + trimLeft$0(receiver) { + var result = receiver.trimStart(); + if (result.length === 0) + return result; + if (result.charCodeAt(0) !== 133) + return result; + return result.substring(J.JSString__skipLeadingWhitespace(result, 1)); + }, + trimRight$0(receiver) { + var t1, + result = receiver.trimEnd(), + endIndex = result.length; + if (endIndex === 0) + return result; + t1 = endIndex - 1; + if (result.charCodeAt(t1) !== 133) + return result; + return result.substring(0, J.JSString__skipTrailingWhitespace(result, t1)); + }, + $mul(receiver, times) { + var s, result; + if (0 >= times) + return ""; + if (times === 1 || receiver.length === 0) + return receiver; + if (times !== times >>> 0) + throw A.wrapException(B.C_OutOfMemoryError); + for (s = receiver, result = ""; true;) { + if ((times & 1) === 1) + result = s + result; + times = times >>> 1; + if (times === 0) + break; + s += s; + } + return result; + }, + padLeft$2(receiver, width, padding) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return this.$mul(padding, delta) + receiver; + }, + padRight$1(receiver, width) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return receiver + this.$mul(" ", delta); + }, + indexOf$2(receiver, pattern, start) { + var t1; + if (start < 0 || start > receiver.length) + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); + t1 = receiver.indexOf(pattern, start); + return t1; + }, + indexOf$1(receiver, pattern) { + return this.indexOf$2(receiver, pattern, 0); + }, + lastIndexOf$2(receiver, pattern, start) { + var t1, t2, i; + if (start == null) + start = receiver.length; + else if (start < 0 || start > receiver.length) + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); + if (typeof pattern == "string") { + t1 = pattern.length; + t2 = receiver.length; + if (start + t1 > t2) + start = t2 - t1; + return receiver.lastIndexOf(pattern, start); + } + for (t1 = J.getInterceptor$s(pattern), i = start; i >= 0; --i) + if (t1.matchAsPrefix$2(pattern, receiver, i) != null) + return i; + return -1; + }, + lastIndexOf$1(receiver, pattern) { + return this.lastIndexOf$2(receiver, pattern, null); + }, + contains$2(receiver, other, startIndex) { + var t1 = receiver.length; + if (startIndex > t1) + throw A.wrapException(A.RangeError$range(startIndex, 0, t1, null, null)); + return A.stringContainsUnchecked(receiver, other, startIndex); + }, + contains$1(receiver, other) { + return this.contains$2(receiver, other, 0); + }, + compareTo$1(receiver, other) { + var t1; + if (receiver === other) + t1 = 0; + else + t1 = receiver < other ? -1 : 1; + return t1; + }, + toString$0(receiver) { + return receiver; + }, + get$hashCode(receiver) { + var t1, hash, i; + for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { + hash = hash + receiver.charCodeAt(i) & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + hash ^= hash >> 6; + } + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.String); + }, + get$length(receiver) { + return receiver.length; + }, + $isTrustedGetRuntimeType: 1, + $isComparable: 1, + $isString: 1 + }; + A._CastIterableBase.prototype = { + get$iterator(_) { + return new A.CastIterator(J.get$iterator$ax(this.get$_source()), A._instanceType(this)._eval$1("CastIterator<1,2>")); + }, + get$length(_) { + return J.get$length$asx(this.get$_source()); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.get$_source()); + }, + get$isNotEmpty(_) { + return J.get$isNotEmpty$asx(this.get$_source()); + }, + skip$1(_, count) { + var t1 = A._instanceType(this); + return A.CastIterable_CastIterable(J.skip$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); + }, + take$1(_, count) { + var t1 = A._instanceType(this); + return A.CastIterable_CastIterable(J.take$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); + }, + elementAt$1(_, index) { + return A._instanceType(this)._rest[1]._as(J.elementAt$1$ax(this.get$_source(), index)); + }, + get$first(_) { + return A._instanceType(this)._rest[1]._as(J.get$first$ax(this.get$_source())); + }, + get$last(_) { + return A._instanceType(this)._rest[1]._as(J.get$last$ax(this.get$_source())); + }, + get$single(_) { + return A._instanceType(this)._rest[1]._as(J.get$single$ax(this.get$_source())); + }, + contains$1(_, other) { + return J.contains$1$asx(this.get$_source(), other); + }, + toString$0(_) { + return J.toString$0$(this.get$_source()); + } + }; + A.CastIterator.prototype = { + moveNext$0() { + return this._source.moveNext$0(); + }, + get$current(_) { + var t1 = this._source; + return this.$ti._rest[1]._as(t1.get$current(t1)); + } + }; + A.CastIterable.prototype = { + get$_source() { + return this._source; + } + }; + A._EfficientLengthCastIterable.prototype = {$isEfficientLengthIterable: 1}; + A._CastListBase.prototype = { + $index(_, index) { + return this.$ti._rest[1]._as(J.$index$asx(this._source, index)); + }, + $indexSet(_, index, value) { + J.$indexSet$ax(this._source, index, this.$ti._precomputed1._as(value)); + }, + set$length(_, $length) { + J.set$length$asx(this._source, $length); + }, + add$1(_, value) { + J.add$1$ax(this._source, this.$ti._precomputed1._as(value)); + }, + addAll$1(_, values) { + var t1 = this.$ti; + J.addAll$1$ax(this._source, A.CastIterable_CastIterable(values, t1._rest[1], t1._precomputed1)); + }, + sort$1(_, compare) { + var t1 = compare == null ? null : new A._CastListBase_sort_closure(this, compare); + J.sort$1$ax(this._source, t1); + }, + getRange$2(_, start, end) { + var t1 = this.$ti; + return A.CastIterable_CastIterable(J.getRange$2$ax(this._source, start, end), t1._precomputed1, t1._rest[1]); + }, + setRange$4(_, start, end, iterable, skipCount) { + var t1 = this.$ti; + J.setRange$4$ax(this._source, start, end, A.CastIterable_CastIterable(iterable, t1._rest[1], t1._precomputed1), skipCount); + }, + removeRange$2(_, start, end) { + J.removeRange$2$ax(this._source, start, end); + }, + fillRange$3(_, start, end, fillValue) { + J.fillRange$3$ax(this._source, start, end, this.$ti._precomputed1._as(fillValue)); + }, + $isEfficientLengthIterable: 1, + $isList: 1 + }; + A._CastListBase_sort_closure.prototype = { + call$2(v1, v2) { + var t1 = this.$this.$ti._rest[1]; + return this.compare.call$2(t1._as(v1), t1._as(v2)); + }, + $signature() { + return this.$this.$ti._eval$1("int(1,1)"); + } + }; + A.CastList.prototype = { + cast$1$0(_, $R) { + return new A.CastList(this._source, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); + }, + get$_source() { + return this._source; + } + }; + A.CastSet.prototype = { + add$1(_, value) { + return this._source.add$1(0, this.$ti._precomputed1._as(value)); + }, + addAll$1(_, elements) { + var t1 = this.$ti; + this._source.addAll$1(0, A.CastIterable_CastIterable(elements, t1._rest[1], t1._precomputed1)); + }, + difference$1(other) { + var _this = this; + if (_this._emptySet != null) + return _this._conditionalAdd$2(other, false); + return new A.CastSet(_this._source.difference$1(other), null, _this.$ti); + }, + _conditionalAdd$2(other, otherContains) { + var t3, castElement, + emptySet = this._emptySet, + t1 = this.$ti, + t2 = t1._rest[1], + result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t2) : emptySet.call$1$0(t2); + for (t2 = this._source, t2 = t2.get$iterator(t2), t3 = other._source, t1 = t1._rest[1]; t2.moveNext$0();) { + castElement = t1._as(t2.get$current(t2)); + if (otherContains === t3.contains$1(0, castElement)) + result.add$1(0, castElement); + } + return result; + }, + toSet$0(_) { + var emptySet = this._emptySet, + t1 = this.$ti._rest[1], + result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t1) : emptySet.call$1$0(t1); + result.addAll$1(0, this); + return result; + }, + $isEfficientLengthIterable: 1, + $isSet: 1, + get$_source() { + return this._source; + } + }; + A.CastMap.prototype = { + cast$2$0(_, RK, RV) { + return new A.CastMap(this._source, this.$ti._eval$1("@<1,2>")._bind$1(RK)._bind$1(RV)._eval$1("CastMap<1,2,3,4>")); + }, + containsKey$1(key) { + return this._source.containsKey$1(key); + }, + $index(_, key) { + return this.$ti._eval$1("4?")._as(this._source.$index(0, key)); + }, + $indexSet(_, key, value) { + var t1 = this.$ti; + this._source.$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value)); + }, + addAll$1(_, other) { + this._source.addAll$1(0, new A.CastMap(other, this.$ti._eval$1("CastMap<3,4,1,2>"))); + }, + remove$1(_, key) { + return this.$ti._eval$1("4?")._as(this._source.remove$1(0, key)); + }, + forEach$1(_, f) { + this._source.forEach$1(0, new A.CastMap_forEach_closure(this, f)); + }, + get$keys(_) { + var t1 = this._source, + t2 = this.$ti; + return A.CastIterable_CastIterable(t1.get$keys(t1), t2._precomputed1, t2._rest[2]); + }, + get$values(_) { + var t1 = this._source, + t2 = this.$ti; + return A.CastIterable_CastIterable(t1.get$values(t1), t2._rest[1], t2._rest[3]); + }, + get$length(_) { + var t1 = this._source; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._source; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._source; + return t1.get$isNotEmpty(t1); + }, + get$entries(_) { + var t1 = this._source; + return t1.get$entries(t1).map$1$1(0, new A.CastMap_entries_closure(this), this.$ti._eval$1("MapEntry<3,4>")); + } + }; + A.CastMap_forEach_closure.prototype = { + call$2(key, value) { + var t1 = this.$this.$ti; + this.f.call$2(t1._rest[2]._as(key), t1._rest[3]._as(value)); + }, + $signature() { + return this.$this.$ti._eval$1("~(1,2)"); + } + }; + A.CastMap_entries_closure.prototype = { + call$1(e) { + var t1 = this.$this.$ti; + return new A.MapEntry(t1._rest[2]._as(e.key), t1._rest[3]._as(e.value), t1._eval$1("MapEntry<3,4>")); + }, + $signature() { + return this.$this.$ti._eval$1("MapEntry<3,4>(MapEntry<1,2>)"); + } + }; + A.LateError.prototype = { + toString$0(_) { + return "LateInitializationError: " + this._message; + } + }; + A.ReachabilityError.prototype = { + toString$0(_) { + return "ReachabilityError: " + this._message; + } + }; + A.CodeUnits.prototype = { + get$length(_) { + return this._string.length; + }, + $index(_, i) { + return this._string.charCodeAt(i); + } + }; + A.nullFuture_closure.prototype = { + call$0() { + return A.Future_Future$value(null, type$.Null); + }, + $signature: 2 + }; + A.SentinelValue.prototype = {}; + A.EfficientLengthIterable.prototype = {}; + A.ListIterable.prototype = { + get$iterator(_) { + var _this = this; + return new A.ListIterator(_this, _this.get$length(_this), A._instanceType(_this)._eval$1("ListIterator")); + }, + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$first(_) { + if (this.get$length(this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.elementAt$1(0, 0); + }, + get$last(_) { + var _this = this; + if (_this.get$length(_this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return _this.elementAt$1(0, _this.get$length(_this) - 1); + }, + get$single(_) { + var _this = this; + if (_this.get$length(_this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + if (_this.get$length(_this) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + return _this.elementAt$1(0, 0); + }, + contains$1(_, element) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (J.$eq$(_this.elementAt$1(0, i), element)) + return true; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return false; + }, + every$1(_, test) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (!test.call$1(_this.elementAt$1(0, i))) + return false; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return true; + }, + any$1(_, test) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (test.call$1(_this.elementAt$1(0, i))) + return true; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return false; + }, + join$1(_, separator) { + var first, t1, i, _this = this, + $length = _this.get$length(_this); + if (separator.length !== 0) { + if ($length === 0) + return ""; + first = A.S(_this.elementAt$1(0, 0)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + for (t1 = first, i = 1; i < $length; ++i) { + t1 = t1 + separator + A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + for (i = 0, t1 = ""; i < $length; ++i) { + t1 += A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }, + join$0(_) { + return this.join$1(0, ""); + }, + where$1(_, test) { + return this.super$Iterable$where(0, test); + }, + map$1$1(_, toElement, $T) { + return new A.MappedListIterable(this, toElement, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + reduce$1(_, combine) { + var value, i, _this = this, + $length = _this.get$length(_this); + if ($length === 0) + throw A.wrapException(A.IterableElementError_noElement()); + value = _this.elementAt$1(0, 0); + for (i = 1; i < $length; ++i) { + value = combine.call$2(value, _this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return value; + }, + fold$1$2(_, initialValue, combine) { + var value, i, _this = this, + $length = _this.get$length(_this); + for (value = initialValue, i = 0; i < $length; ++i) { + value = combine.call$2(value, _this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return value; + }, + fold$2(_, initialValue, combine) { + return this.fold$1$2(0, initialValue, combine, type$.dynamic); + }, + skip$1(_, count) { + return A.SubListIterable$(this, count, null, A._instanceType(this)._eval$1("ListIterable.E")); + }, + take$1(_, count) { + return A.SubListIterable$(this, 0, A.checkNotNullable(count, "count", type$.int), A._instanceType(this)._eval$1("ListIterable.E")); + }, + toList$1$growable(_, growable) { + return A.List_List$of(this, true, A._instanceType(this)._eval$1("ListIterable.E")); + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + var i, _this = this, + result = A.LinkedHashSet_LinkedHashSet(A._instanceType(_this)._eval$1("ListIterable.E")); + for (i = 0; i < _this.get$length(_this); ++i) + result.add$1(0, _this.elementAt$1(0, i)); + return result; + } + }; + A.SubListIterable.prototype = { + SubListIterable$3(_iterable, _start, _endOrLength, $E) { + var endOrLength, + t1 = this._start; + A.RangeError_checkNotNegative(t1, "start"); + endOrLength = this._endOrLength; + if (endOrLength != null) { + A.RangeError_checkNotNegative(endOrLength, "end"); + if (t1 > endOrLength) + throw A.wrapException(A.RangeError$range(t1, 0, endOrLength, "start", null)); + } + }, + get$_endIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength > $length) + return $length; + return endOrLength; + }, + get$_startIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + t1 = this._start; + if (t1 > $length) + return $length; + return t1; + }, + get$length(_) { + var endOrLength, + $length = J.get$length$asx(this.__internal$_iterable), + t1 = this._start; + if (t1 >= $length) + return 0; + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength >= $length) + return $length - t1; + return endOrLength - t1; + }, + elementAt$1(_, index) { + var _this = this, + realIndex = _this.get$_startIndex() + index; + if (index < 0 || realIndex >= _this.get$_endIndex()) + throw A.wrapException(A.IndexError$withLength(index, _this.get$length(0), _this, null, "index")); + return J.elementAt$1$ax(_this.__internal$_iterable, realIndex); + }, + skip$1(_, count) { + var newStart, endOrLength, _this = this; + A.RangeError_checkNotNegative(count, "count"); + newStart = _this._start + count; + endOrLength = _this._endOrLength; + if (endOrLength != null && newStart >= endOrLength) + return new A.EmptyIterable(_this.$ti._eval$1("EmptyIterable<1>")); + return A.SubListIterable$(_this.__internal$_iterable, newStart, endOrLength, _this.$ti._precomputed1); + }, + take$1(_, count) { + var endOrLength, t1, newEnd, _this = this; + A.RangeError_checkNotNegative(count, "count"); + endOrLength = _this._endOrLength; + t1 = _this._start; + newEnd = t1 + count; + if (endOrLength == null) + return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); + else { + if (endOrLength < newEnd) + return _this; + return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); + } + }, + toList$1$growable(_, growable) { + var $length, result, i, _this = this, + start = _this._start, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + end = t2.get$length(t1), + endOrLength = _this._endOrLength; + if (endOrLength != null && endOrLength < end) + end = endOrLength; + $length = end - start; + if ($length <= 0) { + t1 = _this.$ti._precomputed1; + return growable ? J.JSArray_JSArray$growable(0, t1) : J.JSArray_JSArray$fixed(0, t1); + } + result = A.List_List$filled($length, t2.elementAt$1(t1, start), growable, _this.$ti._precomputed1); + for (i = 1; i < $length; ++i) { + result[i] = t2.elementAt$1(t1, start + i); + if (t2.get$length(t1) < end) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return result; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + } + }; + A.ListIterator.prototype = { + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t3, _this = this, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + $length = t2.get$length(t1); + if (_this.__internal$_length !== $length) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + t3 = _this.__internal$_index; + if (t3 >= $length) { + _this.__internal$_current = null; + return false; + } + _this.__internal$_current = t2.elementAt$1(t1, t3); + ++_this.__internal$_index; + return true; + } + }; + A.MappedIterable.prototype = { + get$iterator(_) { + return new A.MappedIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, A._instanceType(this)._eval$1("MappedIterator<1,2>")); + }, + get$length(_) { + return J.get$length$asx(this.__internal$_iterable); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.__internal$_iterable); + }, + get$first(_) { + return this._f.call$1(J.get$first$ax(this.__internal$_iterable)); + }, + get$last(_) { + return this._f.call$1(J.get$last$ax(this.__internal$_iterable)); + }, + get$single(_) { + return this._f.call$1(J.get$single$ax(this.__internal$_iterable)); + }, + elementAt$1(_, index) { + return this._f.call$1(J.elementAt$1$ax(this.__internal$_iterable, index)); + } + }; + A.EfficientLengthMappedIterable.prototype = {$isEfficientLengthIterable: 1}; + A.MappedIterator.prototype = { + moveNext$0() { + var _this = this, + t1 = _this._iterator; + if (t1.moveNext$0()) { + _this.__internal$_current = _this._f.call$1(t1.get$current(t1)); + return true; + } + _this.__internal$_current = null; + return false; + }, + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + } + }; + A.MappedListIterable.prototype = { + get$length(_) { + return J.get$length$asx(this._source); + }, + elementAt$1(_, index) { + return this._f.call$1(J.elementAt$1$ax(this._source, index)); + } + }; + A.WhereIterable.prototype = { + get$iterator(_) { + return new A.WhereIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); + }, + map$1$1(_, toElement, $T) { + return new A.MappedIterable(this, toElement, this.$ti._eval$1("@<1>")._bind$1($T)._eval$1("MappedIterable<1,2>")); + } + }; + A.WhereIterator.prototype = { + moveNext$0() { + var t1, t2; + for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();) + if (t2.call$1(t1.get$current(t1))) + return true; + return false; + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.ExpandIterable.prototype = { + get$iterator(_) { + return new A.ExpandIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, B.C_EmptyIterator, this.$ti._eval$1("ExpandIterator<1,2>")); + } + }; + A.ExpandIterator.prototype = { + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + moveNext$0() { + var t2, t3, _this = this, + t1 = _this._currentExpansion; + if (t1 == null) + return false; + for (t2 = _this._iterator, t3 = _this._f; !t1.moveNext$0();) { + _this.__internal$_current = null; + if (t2.moveNext$0()) { + _this._currentExpansion = null; + t1 = J.get$iterator$ax(t3.call$1(t2.get$current(t2))); + _this._currentExpansion = t1; + } else + return false; + } + t1 = _this._currentExpansion; + _this.__internal$_current = t1.get$current(t1); + return true; + } + }; + A.TakeIterable.prototype = { + get$iterator(_) { + return new A.TakeIterator(J.get$iterator$ax(this.__internal$_iterable), this._takeCount, A._instanceType(this)._eval$1("TakeIterator<1>")); + } + }; + A.EfficientLengthTakeIterable.prototype = { + get$length(_) { + var iterableLength = J.get$length$asx(this.__internal$_iterable), + t1 = this._takeCount; + if (iterableLength > t1) + return t1; + return iterableLength; + }, + $isEfficientLengthIterable: 1 + }; + A.TakeIterator.prototype = { + moveNext$0() { + if (--this._remaining >= 0) + return this._iterator.moveNext$0(); + this._remaining = -1; + return false; + }, + get$current(_) { + var t1; + if (this._remaining < 0) { + this.$ti._precomputed1._as(null); + return null; + } + t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.SkipIterable.prototype = { + skip$1(_, count) { + A.ArgumentError_checkNotNull(count, "count"); + A.RangeError_checkNotNegative(count, "count"); + return new A.SkipIterable(this.__internal$_iterable, this._skipCount + count, A._instanceType(this)._eval$1("SkipIterable<1>")); + }, + get$iterator(_) { + return new A.SkipIterator(J.get$iterator$ax(this.__internal$_iterable), this._skipCount); + } + }; + A.EfficientLengthSkipIterable.prototype = { + get$length(_) { + var $length = J.get$length$asx(this.__internal$_iterable) - this._skipCount; + if ($length >= 0) + return $length; + return 0; + }, + skip$1(_, count) { + A.ArgumentError_checkNotNull(count, "count"); + A.RangeError_checkNotNegative(count, "count"); + return new A.EfficientLengthSkipIterable(this.__internal$_iterable, this._skipCount + count, this.$ti); + }, + $isEfficientLengthIterable: 1 + }; + A.SkipIterator.prototype = { + moveNext$0() { + var t1, i; + for (t1 = this._iterator, i = 0; i < this._skipCount; ++i) + t1.moveNext$0(); + this._skipCount = 0; + return t1.moveNext$0(); + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.SkipWhileIterable.prototype = { + get$iterator(_) { + return new A.SkipWhileIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); + } + }; + A.SkipWhileIterator.prototype = { + moveNext$0() { + var t1, t2, _this = this; + if (!_this._hasSkipped) { + _this._hasSkipped = true; + for (t1 = _this._iterator, t2 = _this._f; t1.moveNext$0();) + if (!t2.call$1(t1.get$current(t1))) + return true; + } + return _this._iterator.moveNext$0(); + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.EmptyIterable.prototype = { + get$iterator(_) { + return B.C_EmptyIterator; + }, + get$isEmpty(_) { + return true; + }, + get$length(_) { + return 0; + }, + get$first(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$last(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$single(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + elementAt$1(_, index) { + throw A.wrapException(A.RangeError$range(index, 0, 0, "index", null)); + }, + contains$1(_, element) { + return false; + }, + every$1(_, test) { + return true; + }, + any$1(_, test) { + return false; + }, + join$1(_, separator) { + return ""; + }, + where$1(_, test) { + return this; + }, + map$1$1(_, toElement, $T) { + return new A.EmptyIterable($T._eval$1("EmptyIterable<0>")); + }, + skip$1(_, count) { + A.RangeError_checkNotNegative(count, "count"); + return this; + }, + take$1(_, count) { + A.RangeError_checkNotNegative(count, "count"); + return this; + }, + toList$1$growable(_, growable) { + var t1 = J.JSArray_JSArray$growable(0, this.$ti._precomputed1); + return t1; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet(this.$ti._precomputed1); + } + }; + A.EmptyIterator.prototype = { + moveNext$0() { + return false; + }, + get$current(_) { + throw A.wrapException(A.IterableElementError_noElement()); + } + }; + A.FollowedByIterable.prototype = { + get$iterator(_) { + return new A.FollowedByIterator(J.get$iterator$ax(this.__internal$_first), this._second); + }, + get$length(_) { + var t1 = this._second; + return J.get$length$asx(this.__internal$_first) + t1.get$length(t1); + }, + get$isEmpty(_) { + var t1; + if (J.get$isEmpty$asx(this.__internal$_first)) { + t1 = this._second; + t1 = t1.get$isEmpty(t1); + } else + t1 = false; + return t1; + }, + get$isNotEmpty(_) { + var t1; + if (!J.get$isNotEmpty$asx(this.__internal$_first)) { + t1 = this._second; + t1 = t1.get$isNotEmpty(t1); + } else + t1 = true; + return t1; + }, + contains$1(_, value) { + var t1; + if (!J.contains$1$asx(this.__internal$_first, value)) { + t1 = this._second; + t1 = t1.contains$1(t1, value); + } else + t1 = true; + return t1; + }, + get$first(_) { + var t1, + iterator = J.get$iterator$ax(this.__internal$_first); + if (iterator.moveNext$0()) + return iterator.get$current(iterator); + t1 = this._second; + return t1.get$first(t1); + }, + get$last(_) { + var last, + t1 = this._second, + iterator = t1.get$iterator(t1); + if (iterator.moveNext$0()) { + last = iterator.get$current(iterator); + for (; iterator.moveNext$0();) + last = iterator.get$current(iterator); + return last; + } + return J.get$last$ax(this.__internal$_first); + } + }; + A.EfficientLengthFollowedByIterable.prototype = { + elementAt$1(_, index) { + var t1 = this.__internal$_first, + t2 = J.getInterceptor$asx(t1), + firstLength = t2.get$length(t1); + if (index < firstLength) + return t2.elementAt$1(t1, index); + t1 = this._second; + return t1.elementAt$1(t1, index - firstLength); + }, + get$first(_) { + var t1 = this.__internal$_first, + t2 = J.getInterceptor$asx(t1); + if (t2.get$isNotEmpty(t1)) + return t2.get$first(t1); + t1 = this._second; + return t1.get$first(t1); + }, + get$last(_) { + var t1 = this._second; + if (t1.get$isNotEmpty(t1)) + return t1.get$last(t1); + return J.get$last$ax(this.__internal$_first); + }, + $isEfficientLengthIterable: 1 + }; + A.FollowedByIterator.prototype = { + moveNext$0() { + var t1, _this = this; + if (_this._currentIterator.moveNext$0()) + return true; + t1 = _this._nextIterable; + if (t1 != null) { + t1 = t1.get$iterator(t1); + _this._currentIterator = t1; + _this._nextIterable = null; + return t1.moveNext$0(); + } + return false; + }, + get$current(_) { + var t1 = this._currentIterator; + return t1.get$current(t1); + } + }; + A.WhereTypeIterable.prototype = { + get$iterator(_) { + return new A.WhereTypeIterator(J.get$iterator$ax(this._source), this.$ti._eval$1("WhereTypeIterator<1>")); + } + }; + A.WhereTypeIterator.prototype = { + moveNext$0() { + var t1, t2; + for (t1 = this._source, t2 = this.$ti._precomputed1; t1.moveNext$0();) + if (t2._is(t1.get$current(t1))) + return true; + return false; + }, + get$current(_) { + var t1 = this._source; + return this.$ti._precomputed1._as(t1.get$current(t1)); + } + }; + A.NonNullsIterable.prototype = { + get$_firstNonNull() { + var t1, element; + for (t1 = J.get$iterator$ax(this._source); t1.moveNext$0();) { + element = t1.get$current(t1); + if (element != null) + return element; + } + return null; + }, + get$isEmpty(_) { + return this.get$_firstNonNull() == null; + }, + get$isNotEmpty(_) { + return this.get$_firstNonNull() != null; + }, + get$first(_) { + var t1 = this.get$_firstNonNull(); + return t1 == null ? A.throwExpression(A.IterableElementError_noElement()) : t1; + }, + get$iterator(_) { + return new A.NonNullsIterator(J.get$iterator$ax(this._source)); + } + }; + A.NonNullsIterator.prototype = { + moveNext$0() { + var t1, next; + this.__internal$_current = null; + for (t1 = this._source; t1.moveNext$0();) { + next = t1.get$current(t1); + if (next != null) { + this.__internal$_current = next; + return true; + } + } + return false; + }, + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? A.throwExpression(A.IterableElementError_noElement()) : t1; + } + }; + A.FixedLengthListMixin.prototype = { + set$length(receiver, newLength) { + throw A.wrapException(A.UnsupportedError$("Cannot change the length of a fixed-length list")); + }, + add$1(receiver, value) { + throw A.wrapException(A.UnsupportedError$("Cannot add to a fixed-length list")); + }, + addAll$1(receiver, iterable) { + throw A.wrapException(A.UnsupportedError$("Cannot add to a fixed-length list")); + }, + removeRange$2(receiver, start, end) { + throw A.wrapException(A.UnsupportedError$("Cannot remove from a fixed-length list")); + } + }; + A.UnmodifiableListMixin.prototype = { + $indexSet(_, index, value) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + set$length(_, newLength) { + throw A.wrapException(A.UnsupportedError$("Cannot change the length of an unmodifiable list")); + }, + add$1(_, value) { + throw A.wrapException(A.UnsupportedError$("Cannot add to an unmodifiable list")); + }, + addAll$1(_, iterable) { + throw A.wrapException(A.UnsupportedError$("Cannot add to an unmodifiable list")); + }, + sort$1(_, compare) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + setRange$4(_, start, end, iterable, skipCount) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + removeRange$2(_, start, end) { + throw A.wrapException(A.UnsupportedError$("Cannot remove from an unmodifiable list")); + }, + fillRange$3(_, start, end, fillValue) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + } + }; + A.UnmodifiableListBase.prototype = {}; + A.ReversedListIterable.prototype = { + get$length(_) { + return J.get$length$asx(this._source); + }, + elementAt$1(_, index) { + var t1 = this._source, + t2 = J.getInterceptor$asx(t1); + return t2.elementAt$1(t1, t2.get$length(t1) - 1 - index); + } + }; + A.Symbol.prototype = { + get$hashCode(_) { + var hash = this._hashCode; + if (hash != null) + return hash; + hash = 664597 * B.JSString_methods.get$hashCode(this.__internal$_name) & 536870911; + this._hashCode = hash; + return hash; + }, + toString$0(_) { + return 'Symbol("' + this.__internal$_name + '")'; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Symbol && this.__internal$_name === other.__internal$_name; + }, + $isSymbol0: 1 + }; + A.__CastListBase__CastIterableBase_ListMixin.prototype = {}; + A._Record_1.prototype = {$recipe: "+(1)", $shape: 1}; + A._Record_2.prototype = {$recipe: "+(1,2)", $shape: 2}; + A._Record_2_forImport.prototype = {$recipe: "+forImport(1,2)", $shape: 3}; + A._Record_2_imports_modules.prototype = {$recipe: "+imports,modules(1,2)", $shape: 5}; + A._Record_2_loadedUrls_stylesheet.prototype = {$recipe: "+loadedUrls,stylesheet(1,2)", $shape: 6}; + A._Record_2_sourceMap.prototype = {$recipe: "+sourceMap(1,2)", $shape: 4}; + A._Record_3.prototype = {$recipe: "+(1,2,3)", $shape: 7}; + A._Record_3_forImport.prototype = {$recipe: "+forImport(1,2,3)", $shape: 8}; + A._Record_3_importer_isDependency.prototype = {$recipe: "+importer,isDependency(1,2,3)", $shape: 10}; + A._Record_3_originalUrl.prototype = {$recipe: "+originalUrl(1,2,3)", $shape: 9}; + A._Record_5_named_namedNodes_positional_positionalNodes_separator.prototype = {$recipe: "+named,namedNodes,positional,positionalNodes,separator(1,2,3,4,5)", $shape: 12}; + A.ConstantMapView.prototype = {}; + A.ConstantMap.prototype = { + cast$2$0(_, RK, RV) { + var t1 = A._instanceType(this); + return A.Map_castFrom(this, t1._precomputed1, t1._rest[1], RK, RV); + }, + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(this) !== 0; + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + $indexSet(_, key, value) { + A.ConstantMap__throwUnmodifiable(); + }, + remove$1(_, key) { + A.ConstantMap__throwUnmodifiable(); + }, + addAll$1(_, other) { + A.ConstantMap__throwUnmodifiable(); + }, + get$entries(_) { + return new A._SyncStarIterable(this.entries$body$ConstantMap(0), A._instanceType(this)._eval$1("_SyncStarIterable>")); + }, + entries$body$ConstantMap($async$_) { + var $async$self = this; + return function() { + var _ = $async$_; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, key; + return function $async$get$entries($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.get$keys($async$self), t1 = t1.get$iterator(t1), t2 = A._instanceType($async$self)._eval$1("MapEntry<1,2>"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + key = t1.get$current(t1); + $async$goto = 4; + return $async$iterator._async$_current = new A.MapEntry(key, $async$self.$index(0, key), t2), 1; + case 4: + // after yield + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + $isMap: 1 + }; + A.ConstantStringMap.prototype = { + get$length(_) { + return this._values.length; + }, + get$_keys() { + var keys = this.$keys; + if (keys == null) { + keys = Object.keys(this._jsIndex); + this.$keys = keys; + } + return keys; + }, + containsKey$1(key) { + if (typeof key != "string") + return false; + if ("__proto__" === key) + return false; + return this._jsIndex.hasOwnProperty(key); + }, + $index(_, key) { + if (!this.containsKey$1(key)) + return null; + return this._values[this._jsIndex[key]]; + }, + forEach$1(_, f) { + var t1, i, + keys = this.get$_keys(), + values = this._values; + for (t1 = keys.length, i = 0; i < t1; ++i) + f.call$2(keys[i], values[i]); + }, + get$keys(_) { + return new A._KeysOrValues(this.get$_keys(), this.$ti._eval$1("_KeysOrValues<1>")); + }, + get$values(_) { + return new A._KeysOrValues(this._values, this.$ti._eval$1("_KeysOrValues<2>")); + } + }; + A._KeysOrValues.prototype = { + get$length(_) { + return this._elements.length; + }, + get$isEmpty(_) { + return 0 === this._elements.length; + }, + get$isNotEmpty(_) { + return 0 !== this._elements.length; + }, + get$iterator(_) { + var t1 = this._elements; + return new A._KeysOrValuesOrElementsIterator(t1, t1.length, this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); + } + }; + A._KeysOrValuesOrElementsIterator.prototype = { + get$current(_) { + var t1 = this.__js_helper$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + t1 = _this.__js_helper$_index; + if (t1 >= _this.__js_helper$_length) { + _this.__js_helper$_current = null; + return false; + } + _this.__js_helper$_current = _this._elements[t1]; + _this.__js_helper$_index = t1 + 1; + return true; + } + }; + A.ConstantSet.prototype = { + add$1(_, value) { + A.ConstantSet__throwUnmodifiable(); + }, + addAll$1(_, elements) { + A.ConstantSet__throwUnmodifiable(); + }, + remove$1(_, value) { + A.ConstantSet__throwUnmodifiable(); + } + }; + A.ConstantStringSet.prototype = { + get$length(_) { + return this.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this.__js_helper$_length !== 0; + }, + get$iterator(_) { + var t1, _this = this, + keys = _this.$keys; + if (keys == null) { + keys = Object.keys(_this._jsIndex); + _this.$keys = keys; + } + t1 = keys; + return new A._KeysOrValuesOrElementsIterator(t1, t1.length, _this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); + }, + contains$1(_, key) { + if (typeof key != "string") + return false; + if ("__proto__" === key) + return false; + return this._jsIndex.hasOwnProperty(key); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$of(this, this.$ti._precomputed1); + } + }; + A.GeneralConstantSet.prototype = { + get$length(_) { + return this._elements.length; + }, + get$isEmpty(_) { + return this._elements.length === 0; + }, + get$isNotEmpty(_) { + return this._elements.length !== 0; + }, + get$iterator(_) { + var t1 = this._elements; + return new A._KeysOrValuesOrElementsIterator(t1, t1.length, this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); + }, + _getMap$0() { + var t1, t2, _i, key, _this = this, + backingMap = _this.$map; + if (backingMap == null) { + backingMap = new A.JsConstantLinkedHashMap(_this.$ti._eval$1("JsConstantLinkedHashMap<1,1>")); + for (t1 = _this._elements, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + key = t1[_i]; + backingMap.$indexSet(0, key, key); + } + _this.$map = backingMap; + } + return backingMap; + }, + contains$1(_, key) { + return this._getMap$0().containsKey$1(key); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$of(this, this.$ti._precomputed1); + } + }; + A.Instantiation.prototype = { + Instantiation$1(_genericClosure) { + if (false) + A.instantiatedGenericFunctionType(0, 0); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Instantiation && this._genericClosure.$eq(0, other._genericClosure) && A.getRuntimeTypeOfClosure(this) === A.getRuntimeTypeOfClosure(other); + }, + get$hashCode(_) { + return A.Object_hash(this._genericClosure, A.getRuntimeTypeOfClosure(this), B.C_SentinelValue, B.C_SentinelValue); + }, + toString$0(_) { + var t1 = B.JSArray_methods.join$1(this.get$_types(), ", "); + return this._genericClosure.toString$0(0) + " with " + ("<" + t1 + ">"); + } + }; + A.Instantiation1.prototype = { + get$_types() { + return [A.createRuntimeType(this.$ti._precomputed1)]; + }, + call$0() { + return this._genericClosure.call$1$0(this.$ti._rest[0]); + }, + call$2(a0, a1) { + return this._genericClosure.call$1$2(a0, a1, this.$ti._rest[0]); + }, + call$3(a0, a1, a2) { + return this._genericClosure.call$1$3(a0, a1, a2, this.$ti._rest[0]); + }, + call$4(a0, a1, a2, a3) { + return this._genericClosure.call$1$4(a0, a1, a2, a3, this.$ti._rest[0]); + }, + $signature() { + return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.$ti); + } + }; + A.JSInvocationMirror.prototype = { + get$memberName() { + var t1 = this.__js_helper$_memberName; + if (t1 instanceof A.Symbol) + return t1; + return this.__js_helper$_memberName = new A.Symbol(t1); + }, + get$positionalArguments() { + var t1, t2, argumentCount, list, index, _this = this; + if (_this.__js_helper$_kind === 1) + return B.List_empty6; + t1 = _this._arguments; + t2 = J.getInterceptor$asx(t1); + argumentCount = t2.get$length(t1) - J.get$length$asx(_this._namedArgumentNames) - _this._typeArgumentCount; + if (argumentCount === 0) + return B.List_empty6; + list = []; + for (index = 0; index < argumentCount; ++index) + list.push(t2.$index(t1, index)); + return J.JSArray_markUnmodifiableList(list); + }, + get$namedArguments() { + var t1, t2, namedArgumentCount, t3, t4, namedArgumentsStartIndex, map, i, _this = this; + if (_this.__js_helper$_kind !== 0) + return B.Map_empty3; + t1 = _this._namedArgumentNames; + t2 = J.getInterceptor$asx(t1); + namedArgumentCount = t2.get$length(t1); + t3 = _this._arguments; + t4 = J.getInterceptor$asx(t3); + namedArgumentsStartIndex = t4.get$length(t3) - namedArgumentCount - _this._typeArgumentCount; + if (namedArgumentCount === 0) + return B.Map_empty3; + map = new A.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); + for (i = 0; i < namedArgumentCount; ++i) + map.$indexSet(0, new A.Symbol(t2.$index(t1, i)), t4.$index(t3, namedArgumentsStartIndex + i)); + return new A.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); + } + }; + A.Primitives_functionNoSuchMethod_closure.prototype = { + call$2($name, argument) { + var t1 = this._box_0; + t1.names = t1.names + "$" + $name; + this.namedArgumentList.push($name); + this.$arguments.push(argument); + ++t1.argumentCount; + }, + $signature: 138 + }; + A.TypeErrorDecoder.prototype = { + matchTypeError$1(message) { + var result, t1, _this = this, + match = new RegExp(_this._pattern).exec(message); + if (match == null) + return null; + result = Object.create(null); + t1 = _this._arguments; + if (t1 !== -1) + result.arguments = match[t1 + 1]; + t1 = _this._argumentsExpr; + if (t1 !== -1) + result.argumentsExpr = match[t1 + 1]; + t1 = _this._expr; + if (t1 !== -1) + result.expr = match[t1 + 1]; + t1 = _this._method; + if (t1 !== -1) + result.method = match[t1 + 1]; + t1 = _this._receiver; + if (t1 !== -1) + result.receiver = match[t1 + 1]; + return result; + } + }; + A.NullError.prototype = { + toString$0(_) { + return "Null check operator used on a null value"; + } + }; + A.JsNoSuchMethodError.prototype = { + toString$0(_) { + var t2, _this = this, + _s38_ = "NoSuchMethodError: method not found: '", + t1 = _this._method; + if (t1 == null) + return "NoSuchMethodError: " + _this.__js_helper$_message; + t2 = _this._receiver; + if (t2 == null) + return _s38_ + t1 + "' (" + _this.__js_helper$_message + ")"; + return _s38_ + t1 + "' on '" + t2 + "' (" + _this.__js_helper$_message + ")"; + } + }; + A.UnknownJsTypeError.prototype = { + toString$0(_) { + var t1 = this.__js_helper$_message; + return t1.length === 0 ? "Error" : "Error: " + t1; + } + }; + A.NullThrownFromJavaScriptException.prototype = { + toString$0(_) { + return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)"; + }, + $isException: 1 + }; + A.ExceptionAndStackTrace.prototype = {}; + A._StackTrace.prototype = { + toString$0(_) { + var trace, + t1 = this._trace; + if (t1 != null) + return t1; + t1 = this._exception; + trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; + return this._trace = trace == null ? "" : trace; + }, + $isStackTrace: 1 + }; + A.Closure.prototype = { + toString$0(_) { + var $constructor = this.constructor, + $name = $constructor == null ? null : $constructor.name; + return "Closure '" + A.unminifyOrTag($name == null ? "unknown" : $name) + "'"; + }, + $isFunction: 1, + get$$call() { + return this; + }, + "call*": "call$1", + $requiredArgCount: 1, + $defaultValues: null + }; + A.Closure0Args.prototype = {"call*": "call$0", $requiredArgCount: 0}; + A.Closure2Args.prototype = {"call*": "call$2", $requiredArgCount: 2}; + A.TearOffClosure.prototype = {}; + A.StaticClosure.prototype = { + toString$0(_) { + var $name = this.$static_name; + if ($name == null) + return "Closure of unknown static method"; + return "Closure '" + A.unminifyOrTag($name) + "'"; + } + }; + A.BoundClosure.prototype = { + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + if (!(other instanceof A.BoundClosure)) + return false; + return this.$_target === other.$_target && this._receiver === other._receiver; + }, + get$hashCode(_) { + return (A.objectHashCode(this._receiver) ^ A.Primitives_objectHashCode(this.$_target)) >>> 0; + }, + toString$0(_) { + return "Closure '" + this.$_name + "' of " + ("Instance of '" + A.Primitives_objectTypeName(this._receiver) + "'"); + } + }; + A._CyclicInitializationError.prototype = { + toString$0(_) { + return "Reading static variable '" + this.variableName + "' during its initialization"; + } + }; + A.RuntimeError.prototype = { + toString$0(_) { + return "RuntimeError: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A._Required.prototype = {}; + A.JsLinkedHashMap.prototype = { + get$length(_) { + return this.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this.__js_helper$_length !== 0; + }, + get$keys(_) { + return new A.LinkedHashMapKeyIterable(this, A._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); + }, + get$values(_) { + var t1 = A._instanceType(this); + return A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(this, t1._eval$1("LinkedHashMapKeyIterable<1>")), new A.JsLinkedHashMap_values_closure(this), t1._precomputed1, t1._rest[1]); + }, + containsKey$1(key) { + var strings, nums; + if (typeof key == "string") { + strings = this.__js_helper$_strings; + if (strings == null) + return false; + return strings[key] != null; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this.__js_helper$_nums; + if (nums == null) + return false; + return nums[key] != null; + } else + return this.internalContainsKey$1(key); + }, + internalContainsKey$1(key) { + var rest = this.__js_helper$_rest; + if (rest == null) + return false; + return this.internalFindBucketIndex$2(rest[this.internalComputeHashCode$1(key)], key) >= 0; + }, + addAll$1(_, other) { + other.forEach$1(0, new A.JsLinkedHashMap_addAll_closure(this)); + }, + $index(_, key) { + var strings, cell, t1, nums, _null = null; + if (typeof key == "string") { + strings = this.__js_helper$_strings; + if (strings == null) + return _null; + cell = strings[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; + return t1; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this.__js_helper$_nums; + if (nums == null) + return _null; + cell = nums[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; + return t1; + } else + return this.internalGet$1(key); + }, + internalGet$1(key) { + var bucket, index, + rest = this.__js_helper$_rest; + if (rest == null) + return null; + bucket = rest[this.internalComputeHashCode$1(key)]; + index = this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return null; + return bucket[index].hashMapCellValue; + }, + $indexSet(_, key, value) { + var strings, nums, _this = this; + if (typeof key == "string") { + strings = _this.__js_helper$_strings; + _this.__js_helper$_addHashTableEntry$3(strings == null ? _this.__js_helper$_strings = _this._newHashTable$0() : strings, key, value); + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = _this.__js_helper$_nums; + _this.__js_helper$_addHashTableEntry$3(nums == null ? _this.__js_helper$_nums = _this._newHashTable$0() : nums, key, value); + } else + _this.internalSet$2(key, value); + }, + internalSet$2(key, value) { + var hash, bucket, index, _this = this, + rest = _this.__js_helper$_rest; + if (rest == null) + rest = _this.__js_helper$_rest = _this._newHashTable$0(); + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [_this.__js_helper$_newLinkedCell$2(key, value)]; + else { + index = _this.internalFindBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index].hashMapCellValue = value; + else + bucket.push(_this.__js_helper$_newLinkedCell$2(key, value)); + } + }, + putIfAbsent$2(key, ifAbsent) { + var t1, value, _this = this; + if (_this.containsKey$1(key)) { + t1 = _this.$index(0, key); + return t1 == null ? A._instanceType(_this)._rest[1]._as(t1) : t1; + } + value = ifAbsent.call$0(); + _this.$indexSet(0, key, value); + return value; + }, + remove$1(_, key) { + var _this = this; + if (typeof key == "string") + return _this.__js_helper$_removeHashTableEntry$2(_this.__js_helper$_strings, key); + else if (typeof key == "number" && (key & 0x3fffffff) === key) + return _this.__js_helper$_removeHashTableEntry$2(_this.__js_helper$_nums, key); + else + return _this.internalRemove$1(key); + }, + internalRemove$1(key) { + var hash, bucket, index, cell, _this = this, + rest = _this.__js_helper$_rest; + if (rest == null) + return null; + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + index = _this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return null; + cell = bucket.splice(index, 1)[0]; + _this.__js_helper$_unlinkCell$1(cell); + if (bucket.length === 0) + delete rest[hash]; + return cell.hashMapCellValue; + }, + clear$0(_) { + var _this = this; + if (_this.__js_helper$_length > 0) { + _this.__js_helper$_strings = _this.__js_helper$_nums = _this.__js_helper$_rest = _this.__js_helper$_first = _this.__js_helper$_last = null; + _this.__js_helper$_length = 0; + _this.__js_helper$_modified$0(); + } + }, + forEach$1(_, action) { + var _this = this, + cell = _this.__js_helper$_first, + modifications = _this.__js_helper$_modifications; + for (; cell != null;) { + action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); + if (modifications !== _this.__js_helper$_modifications) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + cell = cell.__js_helper$_next; + } + }, + __js_helper$_addHashTableEntry$3(table, key, value) { + var cell = table[key]; + if (cell == null) + table[key] = this.__js_helper$_newLinkedCell$2(key, value); + else + cell.hashMapCellValue = value; + }, + __js_helper$_removeHashTableEntry$2(table, key) { + var cell; + if (table == null) + return null; + cell = table[key]; + if (cell == null) + return null; + this.__js_helper$_unlinkCell$1(cell); + delete table[key]; + return cell.hashMapCellValue; + }, + __js_helper$_modified$0() { + this.__js_helper$_modifications = this.__js_helper$_modifications + 1 & 1073741823; + }, + __js_helper$_newLinkedCell$2(key, value) { + var t1, _this = this, + cell = new A.LinkedHashMapCell(key, value); + if (_this.__js_helper$_first == null) + _this.__js_helper$_first = _this.__js_helper$_last = cell; + else { + t1 = _this.__js_helper$_last; + t1.toString; + cell.__js_helper$_previous = t1; + _this.__js_helper$_last = t1.__js_helper$_next = cell; + } + ++_this.__js_helper$_length; + _this.__js_helper$_modified$0(); + return cell; + }, + __js_helper$_unlinkCell$1(cell) { + var _this = this, + previous = cell.__js_helper$_previous, + next = cell.__js_helper$_next; + if (previous == null) + _this.__js_helper$_first = next; + else + previous.__js_helper$_next = next; + if (next == null) + _this.__js_helper$_last = previous; + else + next.__js_helper$_previous = previous; + --_this.__js_helper$_length; + _this.__js_helper$_modified$0(); + }, + internalComputeHashCode$1(key) { + return J.get$hashCode$(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].hashMapCellKey, key)) + return i; + return -1; + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + _newHashTable$0() { + var table = Object.create(null); + table[""] = table; + delete table[""]; + return table; + } + }; + A.JsLinkedHashMap_values_closure.prototype = { + call$1(each) { + var t1 = this.$this, + t2 = t1.$index(0, each); + return t2 == null ? A._instanceType(t1)._rest[1]._as(t2) : t2; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("2(1)"); + } + }; + A.JsLinkedHashMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(1,2)"); + } + }; + A.LinkedHashMapCell.prototype = {}; + A.LinkedHashMapKeyIterable.prototype = { + get$length(_) { + return this.__js_helper$_map.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_map.__js_helper$_length === 0; + }, + get$iterator(_) { + var t1 = this.__js_helper$_map, + t2 = new A.LinkedHashMapKeyIterator(t1, t1.__js_helper$_modifications); + t2.__js_helper$_cell = t1.__js_helper$_first; + return t2; + }, + contains$1(_, element) { + return this.__js_helper$_map.containsKey$1(element); + } + }; + A.LinkedHashMapKeyIterator.prototype = { + get$current(_) { + return this.__js_helper$_current; + }, + moveNext$0() { + var cell, _this = this, + t1 = _this.__js_helper$_map; + if (_this.__js_helper$_modifications !== t1.__js_helper$_modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + cell = _this.__js_helper$_cell; + if (cell == null) { + _this.__js_helper$_current = null; + return false; + } else { + _this.__js_helper$_current = cell.hashMapCellKey; + _this.__js_helper$_cell = cell.__js_helper$_next; + return true; + } + } + }; + A.JsIdentityLinkedHashMap.prototype = { + internalComputeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) { + t1 = bucket[i].hashMapCellKey; + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + } + }; + A.JsConstantLinkedHashMap.prototype = { + internalComputeHashCode$1(key) { + return A.constantHashCode(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].hashMapCellKey, key)) + return i; + return -1; + } + }; + A.initHooks_closure.prototype = { + call$1(o) { + return this.getTag(o); + }, + $signature: 101 + }; + A.initHooks_closure0.prototype = { + call$2(o, tag) { + return this.getUnknownTag(o, tag); + }, + $signature: 392 + }; + A.initHooks_closure1.prototype = { + call$1(tag) { + return this.prototypeForTag(tag); + }, + $signature: 171 + }; + A._Record.prototype = { + toString$0(_) { + return this._toString$1(false); + }, + _toString$1(safe) { + var t2, separator, i, key, value, + keys = this._fieldKeys$0(), + values = this._getFieldValues$0(), + t1 = (safe ? "" + "Record " : "") + "("; + for (t2 = keys.length, separator = "", i = 0; i < t2; ++i, separator = ", ") { + t1 += separator; + key = keys[i]; + if (typeof key == "string") + t1 = t1 + key + ": "; + value = values[i]; + t1 = safe ? t1 + A.Primitives_safeToString(value) : t1 + A.S(value); + } + t1 += ")"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _fieldKeys$0() { + var t1, + shapeTag = this.$shape; + for (; $._Record__computedFieldKeys.length <= shapeTag;) + $._Record__computedFieldKeys.push(null); + t1 = $._Record__computedFieldKeys[shapeTag]; + if (t1 == null) { + t1 = this._computeFieldKeys$0(); + $._Record__computedFieldKeys[shapeTag] = t1; + } + return t1; + }, + _computeFieldKeys$0() { + var i, names, last, + recipe = this.$recipe, + position = recipe.indexOf("("), + joinedNames = recipe.substring(1, position), + fields = recipe.substring(position), + arity = fields === "()" ? 0 : fields.replace(/[^,]/g, "").length + 1, + t1 = type$.Object, + result = J.JSArray_JSArray$allocateGrowable(arity, t1); + for (i = 0; i < arity; ++i) + result[i] = i; + if (joinedNames !== "") { + names = joinedNames.split(","); + i = names.length; + for (last = arity; i > 0;) { + --last; + --i; + result[last] = names[i]; + } + } + return A.List_List$unmodifiable(result, t1); + } + }; + A._Record2.prototype = { + _getFieldValues$0() { + return [this._0, this._1]; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._Record2 && this.$shape === other.$shape && J.$eq$(this._0, other._0) && J.$eq$(this._1, other._1); + }, + get$hashCode(_) { + return A.Object_hash(this.$shape, this._0, this._1, B.C_SentinelValue); + } + }; + A._Record1.prototype = { + _getFieldValues$0() { + return [this._0]; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._Record1 && this.$shape === other.$shape && J.$eq$(this._0, other._0); + }, + get$hashCode(_) { + return A.Object_hash(this.$shape, this._0, B.C_SentinelValue, B.C_SentinelValue); + } + }; + A._Record3.prototype = { + _getFieldValues$0() { + return [this._0, this._1, this._2]; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A._Record3 && _this.$shape === other.$shape && J.$eq$(_this._0, other._0) && J.$eq$(_this._1, other._1) && J.$eq$(_this._2, other._2); + }, + get$hashCode(_) { + var _this = this; + return A.Object_hash(_this.$shape, _this._0, _this._1, _this._2); + } + }; + A._RecordN.prototype = { + _getFieldValues$0() { + return this._values; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._RecordN && this.$shape === other.$shape && A._RecordN__equalValues(this._values, other._values); + }, + get$hashCode(_) { + return A.Object_hash(this.$shape, A.Object_hashAll(this._values), B.C_SentinelValue, B.C_SentinelValue); + } + }; + A.JSSyntaxRegExp.prototype = { + toString$0(_) { + return "RegExp/" + this.pattern + "/" + this._nativeRegExp.flags; + }, + get$_nativeGlobalVersion() { + var _this = this, + t1 = _this._nativeGlobalRegExp; + if (t1 != null) + return t1; + t1 = _this._nativeRegExp; + return _this._nativeGlobalRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern, t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); + }, + get$_nativeAnchoredVersion() { + var _this = this, + t1 = _this._nativeAnchoredRegExp; + if (t1 != null) + return t1; + t1 = _this._nativeRegExp; + return _this._nativeAnchoredRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern + "|()", t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); + }, + firstMatch$1(string) { + var m = this._nativeRegExp.exec(string); + if (m == null) + return null; + return new A._MatchImplementation(m); + }, + allMatches$2(_, string, start) { + var t1 = string.length; + if (start > t1) + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._AllMatchesIterable(this, string, start); + }, + allMatches$1(_, string) { + return this.allMatches$2(0, string, 0); + }, + _execGlobal$2(string, start) { + var match, + regexp = this.get$_nativeGlobalVersion(); + regexp.lastIndex = start; + match = regexp.exec(string); + if (match == null) + return null; + return new A._MatchImplementation(match); + }, + _execAnchored$2(string, start) { + var match, + regexp = this.get$_nativeAnchoredVersion(); + regexp.lastIndex = start; + match = regexp.exec(string); + if (match == null) + return null; + if (match.pop() != null) + return null; + return new A._MatchImplementation(match); + }, + matchAsPrefix$2(_, string, start) { + if (start < 0 || start > string.length) + throw A.wrapException(A.RangeError$range(start, 0, string.length, null, null)); + return this._execAnchored$2(string, start); + } + }; + A._MatchImplementation.prototype = { + get$start(_) { + return this._match.index; + }, + get$end(_) { + var t1 = this._match; + return t1.index + t1[0].length; + }, + $isMatch: 1, + $isRegExpMatch: 1 + }; + A._AllMatchesIterable.prototype = { + get$iterator(_) { + return new A._AllMatchesIterator(this._re, this.__js_helper$_string, this.__js_helper$_start); + } + }; + A._AllMatchesIterator.prototype = { + get$current(_) { + var t1 = this.__js_helper$_current; + return t1 == null ? type$.RegExpMatch._as(t1) : t1; + }, + moveNext$0() { + var t1, t2, t3, match, nextIndex, t4, _this = this, + string = _this.__js_helper$_string; + if (string == null) + return false; + t1 = _this._nextIndex; + t2 = string.length; + if (t1 <= t2) { + t3 = _this._regExp; + match = t3._execGlobal$2(string, t1); + if (match != null) { + _this.__js_helper$_current = match; + nextIndex = match.get$end(0); + if (match._match.index === nextIndex) { + t1 = false; + if (t3._nativeRegExp.unicode) { + t3 = _this._nextIndex; + t4 = t3 + 1; + if (t4 < t2) { + t2 = string.charCodeAt(t3); + if (t2 >= 55296 && t2 <= 56319) { + t1 = string.charCodeAt(t4); + t1 = t1 >= 56320 && t1 <= 57343; + } + } + } + nextIndex = (t1 ? nextIndex + 1 : nextIndex) + 1; + } + _this._nextIndex = nextIndex; + return true; + } + } + _this.__js_helper$_string = _this.__js_helper$_current = null; + return false; + } + }; + A.StringMatch.prototype = { + get$end(_) { + return this.start + this.pattern.length; + }, + $isMatch: 1, + get$start(receiver) { + return this.start; + } + }; + A._StringAllMatchesIterable.prototype = { + get$iterator(_) { + return new A._StringAllMatchesIterator(this._input, this._pattern, this.__js_helper$_index); + }, + get$first(_) { + var t1 = this._pattern, + index = this._input.indexOf(t1, this.__js_helper$_index); + if (index >= 0) + return new A.StringMatch(index, t1); + throw A.wrapException(A.IterableElementError_noElement()); + } + }; + A._StringAllMatchesIterator.prototype = { + moveNext$0() { + var index, end, _this = this, + t1 = _this.__js_helper$_index, + t2 = _this._pattern, + t3 = t2.length, + t4 = _this._input, + t5 = t4.length; + if (t1 + t3 > t5) { + _this.__js_helper$_current = null; + return false; + } + index = t4.indexOf(t2, t1); + if (index < 0) { + _this.__js_helper$_index = t5 + 1; + _this.__js_helper$_current = null; + return false; + } + end = index + t3; + _this.__js_helper$_current = new A.StringMatch(index, t2); + _this.__js_helper$_index = end === _this.__js_helper$_index ? end + 1 : end; + return true; + }, + get$current(_) { + var t1 = this.__js_helper$_current; + t1.toString; + return t1; + } + }; + A._Cell.prototype = { + readLocal$1$0() { + var t1 = this.__late_helper$_value; + if (t1 === this) + A.throwExpression(new A.LateError("Local '' has not been initialized.")); + return t1; + }, + readLocal$0() { + return this.readLocal$1$0(type$.dynamic); + }, + _readLocal$0() { + var t1 = this.__late_helper$_value; + if (t1 === this) + throw A.wrapException(new A.LateError("Local '' has not been initialized.")); + return t1; + } + }; + A.NativeByteBuffer.prototype = { + get$runtimeType(receiver) { + return B.Type_ByteBuffer_EOZ; + }, + $isTrustedGetRuntimeType: 1, + $isByteBuffer: 1 + }; + A.NativeTypedData.prototype = { + _invalidPosition$3(receiver, position, $length, $name) { + var t1 = A.RangeError$range(position, 0, $length, $name, null); + throw A.wrapException(t1); + }, + _checkPosition$3(receiver, position, $length, $name) { + if (position >>> 0 !== position || position > $length) + this._invalidPosition$3(receiver, position, $length, $name); + } + }; + A.NativeByteData.prototype = { + get$runtimeType(receiver) { + return B.Type_ByteData_mF8; + }, + $isTrustedGetRuntimeType: 1, + $isByteData: 1 + }; + A.NativeTypedArray.prototype = { + get$length(receiver) { + return receiver.length; + }, + _setRangeFast$4(receiver, start, end, source, skipCount) { + var count, sourceLength, + targetLength = receiver.length; + this._checkPosition$3(receiver, start, targetLength, "start"); + this._checkPosition$3(receiver, end, targetLength, "end"); + if (start > end) + throw A.wrapException(A.RangeError$range(start, 0, end, null, null)); + count = end - start; + if (skipCount < 0) + throw A.wrapException(A.ArgumentError$(skipCount, null)); + sourceLength = source.length; + if (sourceLength - skipCount < count) + throw A.wrapException(A.StateError$("Not enough elements")); + if (skipCount !== 0 || sourceLength !== count) + source = source.subarray(skipCount, skipCount + count); + receiver.set(source, start); + }, + $isJavaScriptIndexingBehavior: 1 + }; + A.NativeTypedArrayOfDouble.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + $indexSet(receiver, index, value) { + A._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + setRange$4(receiver, start, end, iterable, skipCount) { + if (type$.NativeTypedArrayOfDouble._is(iterable)) { + this._setRangeFast$4(receiver, start, end, iterable, skipCount); + return; + } + this.super$ListBase$setRange(receiver, start, end, iterable, skipCount); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.NativeTypedArrayOfInt.prototype = { + $indexSet(receiver, index, value) { + A._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + setRange$4(receiver, start, end, iterable, skipCount) { + if (type$.NativeTypedArrayOfInt._is(iterable)) { + this._setRangeFast$4(receiver, start, end, iterable, skipCount); + return; + } + this.super$ListBase$setRange(receiver, start, end, iterable, skipCount); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.NativeFloat32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Float32List_Ymk; + }, + sublist$2(receiver, start, end) { + return new Float32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isFloat32List: 1 + }; + A.NativeFloat64List.prototype = { + get$runtimeType(receiver) { + return B.Type_Float64List_Ymk; + }, + sublist$2(receiver, start, end) { + return new Float64Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isFloat64List: 1 + }; + A.NativeInt16List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int16List_cot; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Int16Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isInt16List: 1 + }; + A.NativeInt32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int32List_m1p; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Int32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isInt32List: 1 + }; + A.NativeInt8List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int8List_woc; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Int8Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isInt8List: 1 + }; + A.NativeUint16List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint16List_2mh; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint16Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isUint16List: 1 + }; + A.NativeUint32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint32List_2mh; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isUint32List: 1 + }; + A.NativeUint8ClampedList.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint8ClampedList_9Bb; + }, + get$length(receiver) { + return receiver.length; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint8ClampedArray(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isUint8ClampedList: 1 + }; + A.NativeUint8List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint8List_CSc; + }, + get$length(receiver) { + return receiver.length; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint8Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isNativeUint8List: 1, + $isUint8List: 1 + }; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A.Rti.prototype = { + _eval$1(recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, this, recipe); + }, + _bind$1(typeOrTuple) { + return A._Universe_bind(init.typeUniverse, this, typeOrTuple); + } + }; + A._FunctionParameters.prototype = {}; + A._Type.prototype = { + toString$0(_) { + return A._rtiToString(this._rti, null); + } + }; + A._Error.prototype = { + toString$0(_) { + return this.__rti$_message; + } + }; + A._TypeError.prototype = { + get$message(_) { + return this.__rti$_message; + }, + $isTypeError: 1 + }; + A._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { + call$1(_) { + var t1 = this._box_0, + f = t1.storedCallback; + t1.storedCallback = null; + f.call$0(); + }, + $signature: 63 + }; + A._AsyncRun__initializeScheduleImmediate_closure.prototype = { + call$1(callback) { + var t1, t2; + this._box_0.storedCallback = callback; + t1 = this.div; + t2 = this.span; + t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); + }, + $signature: 37 + }; + A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { + call$0() { + this.callback.call$0(); + }, + $signature: 1 + }; + A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { + call$0() { + this.callback.call$0(); + }, + $signature: 1 + }; + A._TimerImpl.prototype = { + _TimerImpl$2(milliseconds, callback) { + if (self.setTimeout != null) + this._handle = self.setTimeout(A.convertDartClosureToJS(new A._TimerImpl_internalCallback(this, callback), 0), milliseconds); + else + throw A.wrapException(A.UnsupportedError$("`setTimeout()` not found.")); + }, + _TimerImpl$periodic$2(milliseconds, callback) { + if (self.setTimeout != null) + this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds); + else + throw A.wrapException(A.UnsupportedError$("Periodic timer.")); + }, + cancel$0() { + if (self.setTimeout != null) { + var t1 = this._handle; + if (t1 == null) + return; + if (this._once) + self.clearTimeout(t1); + else + self.clearInterval(t1); + this._handle = null; + } else + throw A.wrapException(A.UnsupportedError$("Canceling a timer.")); + } + }; + A._TimerImpl_internalCallback.prototype = { + call$0() { + var t1 = this.$this; + t1._handle = null; + t1._tick = 1; + this.callback.call$0(); + }, + $signature: 0 + }; + A._TimerImpl$periodic_closure.prototype = { + call$0() { + var duration, _this = this, + t1 = _this.$this, + tick = t1._tick + 1, + t2 = _this.milliseconds; + if (t2 > 0) { + duration = Date.now() - _this.start; + if (duration > (tick + 1) * t2) + tick = B.JSInt_methods.$tdiv(duration, t2); + } + t1._tick = tick; + _this.callback.call$1(t1); + }, + $signature: 1 + }; + A._AsyncAwaitCompleter.prototype = { + complete$1(value) { + var t1, _this = this; + if (value == null) + value = _this.$ti._precomputed1._as(value); + if (!_this.isSync) + _this._future._asyncComplete$1(value); + else { + t1 = _this._future; + if (_this.$ti._eval$1("Future<1>")._is(value)) + t1._chainFuture$1(value); + else + t1._completeWithValue$1(value); + } + }, + completeError$2(e, st) { + var t1 = this._future; + if (this.isSync) + t1._completeError$2(e, st); + else + t1._asyncCompleteError$2(e, st); + } + }; + A._awaitOnObject_closure.prototype = { + call$1(result) { + return this.bodyFunction.call$2(0, result); + }, + $signature: 74 + }; + A._awaitOnObject_closure0.prototype = { + call$2(error, stackTrace) { + this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, stackTrace)); + }, + $signature: 448 + }; + A._wrapJsFunctionForAsync_closure.prototype = { + call$2(errorCode, result) { + this.$protected(errorCode, result); + }, + $signature: 486 + }; + A._SyncStarIterator.prototype = { + get$current(_) { + return this._async$_current; + }, + _resumeBody$2(errorCode, errorValue) { + var body, t1, exception; + errorCode = errorCode; + errorValue = errorValue; + body = this._body; + for (; true;) + try { + t1 = body(this, errorCode, errorValue); + return t1; + } catch (exception) { + errorValue = exception; + errorCode = 1; + } + }, + moveNext$0() { + var nestedIterator, exception, value, suspendedBodies, _this = this, errorValue = null, errorCode = 0; + for (; true;) { + nestedIterator = _this._nestedIterator; + if (nestedIterator != null) + try { + if (nestedIterator.moveNext$0()) { + _this._async$_current = J.get$current$x(nestedIterator); + return true; + } else + _this._nestedIterator = null; + } catch (exception) { + errorValue = exception; + errorCode = 1; + _this._nestedIterator = null; + } + value = _this._resumeBody$2(errorCode, errorValue); + if (1 === value) + return true; + if (0 === value) { + _this._async$_current = null; + suspendedBodies = _this._suspendedBodies; + if (suspendedBodies == null || suspendedBodies.length === 0) { + _this._body = A._SyncStarIterator__terminatedBody; + return false; + } + _this._body = suspendedBodies.pop(); + errorCode = 0; + errorValue = null; + continue; + } + if (2 === value) { + errorCode = 0; + errorValue = null; + continue; + } + if (3 === value) { + errorValue = _this._datum; + _this._datum = null; + suspendedBodies = _this._suspendedBodies; + if (suspendedBodies == null || suspendedBodies.length === 0) { + _this._async$_current = null; + _this._body = A._SyncStarIterator__terminatedBody; + throw errorValue; + return false; + } + _this._body = suspendedBodies.pop(); + errorCode = 1; + continue; + } + throw A.wrapException(A.StateError$("sync*")); + } + return false; + }, + _yieldStar$1(iterable) { + var t1, t2, _this = this; + if (iterable instanceof A._SyncStarIterable) { + t1 = iterable._outerHelper(); + t2 = _this._suspendedBodies; + if (t2 == null) + t2 = _this._suspendedBodies = []; + t2.push(_this._body); + _this._body = t1; + return 2; + } else { + _this._nestedIterator = J.get$iterator$ax(iterable); + return 2; + } + } + }; + A._SyncStarIterable.prototype = { + get$iterator(_) { + return new A._SyncStarIterator(this._outerHelper()); + } + }; + A.AsyncError.prototype = { + toString$0(_) { + return A.S(this.error); + }, + $isError: 1, + get$stackTrace() { + return this.stackTrace; + } + }; + A.Future_wait_handleError.prototype = { + call$2(theError, theStackTrace) { + var _this = this, + t1 = _this._box_0, + t2 = --t1.remaining; + if (t1.values != null) { + t1.values = null; + t1.error = theError; + t1.stackTrace = theStackTrace; + if (t2 === 0 || _this.eagerError) + _this._future._completeError$2(theError, theStackTrace); + } else if (t2 === 0 && !_this.eagerError) { + t2 = t1.error; + t2.toString; + t1 = t1.stackTrace; + t1.toString; + _this._future._completeError$2(t2, t1); + } + }, + $signature: 67 + }; + A.Future_wait_closure.prototype = { + call$1(value) { + var t1, value0, t3, t4, _i, t5, _this = this, + t2 = _this._box_0, + remainingResults = --t2.remaining, + valueList = t2.values; + if (valueList != null) { + J.$indexSet$ax(valueList, _this.pos, value); + if (J.$eq$(remainingResults, 0)) { + t2 = _this.T; + t1 = A._setArrayType([], t2._eval$1("JSArray<0>")); + for (t3 = valueList, t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + value0 = t3[_i]; + t5 = value0; + if (t5 == null) + t5 = t2._as(t5); + J.add$1$ax(t1, t5); + } + _this._future._completeWithValue$1(t1); + } + } else if (J.$eq$(remainingResults, 0) && !_this.eagerError) { + t1 = t2.error; + t1.toString; + t2 = t2.stackTrace; + t2.toString; + _this._future._completeError$2(t1, t2); + } + }, + $signature() { + return this.T._eval$1("Null(0)"); + } + }; + A._Completer.prototype = { + completeError$2(error, stackTrace) { + var replacement; + A.checkNotNullable(error, "error", type$.Object); + if ((this.future._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + replacement = $.Zone__current.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } else if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); + this._completeError$2(error, stackTrace); + }, + completeError$1(error) { + return this.completeError$2(error, null); + } + }; + A._AsyncCompleter.prototype = { + complete$1(value) { + var t1 = this.future; + if ((t1._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t1._asyncComplete$1(value); + }, + complete$0() { + return this.complete$1(null); + }, + _completeError$2(error, stackTrace) { + this.future._asyncCompleteError$2(error, stackTrace); + } + }; + A._SyncCompleter.prototype = { + complete$1(value) { + var t1 = this.future; + if ((t1._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t1._complete$1(value); + }, + _completeError$2(error, stackTrace) { + this.future._completeError$2(error, stackTrace); + } + }; + A._FutureListener.prototype = { + matchesErrorTest$1(asyncError) { + if ((this.state & 15) !== 6) + return true; + return this.result._zone.runUnary$2$2(this.callback, asyncError.error, type$.bool, type$.Object); + }, + handleError$1(asyncError) { + var exception, + errorCallback = this.errorCallback, + result = null, + t1 = type$.dynamic, + t2 = type$.Object, + t3 = asyncError.error, + t4 = this.result._zone; + if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) + result = t4.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace); + else + result = t4.runUnary$2$2(errorCallback, t3, t1, t2); + try { + t1 = result; + return t1; + } catch (exception) { + if (type$.TypeError._is(A.unwrapException(exception))) { + if ((this.state & 1) !== 0) + throw A.wrapException(A.ArgumentError$("The error handler of Future.then must return a value of the returned future's type", "onError")); + throw A.wrapException(A.ArgumentError$("The error handler of Future.catchError must return a value of the future's type", "onError")); + } else + throw exception; + } + } + }; + A._Future.prototype = { + _setChained$1(source) { + this._state = this._state & 1 | 4; + this._resultOrListeners = source; + }, + then$1$2$onError(_, f, onError, $R) { + var result, t1, + currentZone = $.Zone__current; + if (currentZone === B.C__RootZone) { + if (onError != null && !type$.dynamic_Function_Object_StackTrace._is(onError) && !type$.dynamic_Function_Object._is(onError)) + throw A.wrapException(A.ArgumentError$value(onError, "onError", string$.Error_)); + } else { + f = currentZone.registerUnaryCallback$2$1(f, $R._eval$1("0/"), this.$ti._precomputed1); + if (onError != null) + onError = A._registerErrorHandler(onError, currentZone); + } + result = new A._Future($.Zone__current, $R._eval$1("_Future<0>")); + t1 = onError == null ? 1 : 3; + this._addListener$1(new A._FutureListener(result, t1, f, onError, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); + return result; + }, + then$1$1(_, f, $R) { + return this.then$1$2$onError(0, f, null, $R); + }, + _thenAwait$1$2(f, onError, $E) { + var result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); + this._addListener$1(new A._FutureListener(result, 19, f, onError, this.$ti._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); + return result; + }, + catchError$1(onError) { + var t1 = this.$ti, + t2 = $.Zone__current, + result = new A._Future(t2, t1); + if (t2 !== B.C__RootZone) + onError = A._registerErrorHandler(onError, t2); + this._addListener$1(new A._FutureListener(result, 2, null, onError, t1._eval$1("_FutureListener<1,1>"))); + return result; + }, + whenComplete$1(action) { + var t1 = this.$ti, + t2 = $.Zone__current, + result = new A._Future(t2, t1); + if (t2 !== B.C__RootZone) + action = t2.registerCallback$1$1(action, type$.dynamic); + this._addListener$1(new A._FutureListener(result, 8, action, null, t1._eval$1("_FutureListener<1,1>"))); + return result; + }, + _setErrorObject$1(error) { + this._state = this._state & 1 | 16; + this._resultOrListeners = error; + }, + _cloneResult$1(source) { + this._state = source._state & 30 | this._state & 1; + this._resultOrListeners = source._resultOrListeners; + }, + _addListener$1(listener) { + var _this = this, + t1 = _this._state; + if (t1 <= 3) { + listener._nextListener = _this._resultOrListeners; + _this._resultOrListeners = listener; + } else { + if ((t1 & 4) !== 0) { + t1 = _this._resultOrListeners; + if ((t1._state & 24) === 0) { + t1._addListener$1(listener); + return; + } + _this._cloneResult$1(t1); + } + _this._zone.scheduleMicrotask$1(new A._Future__addListener_closure(_this, listener)); + } + }, + _prependListeners$1(listeners) { + var t1, existingListeners, next, cursor, next0, _this = this, _box_0 = {}; + _box_0.listeners = listeners; + if (listeners == null) + return; + t1 = _this._state; + if (t1 <= 3) { + existingListeners = _this._resultOrListeners; + _this._resultOrListeners = listeners; + if (existingListeners != null) { + next = listeners._nextListener; + for (cursor = listeners; next != null; cursor = next, next = next0) + next0 = next._nextListener; + cursor._nextListener = existingListeners; + } + } else { + if ((t1 & 4) !== 0) { + t1 = _this._resultOrListeners; + if ((t1._state & 24) === 0) { + t1._prependListeners$1(listeners); + return; + } + _this._cloneResult$1(t1); + } + _box_0.listeners = _this._reverseListeners$1(listeners); + _this._zone.scheduleMicrotask$1(new A._Future__prependListeners_closure(_box_0, _this)); + } + }, + _removeListeners$0() { + var current = this._resultOrListeners; + this._resultOrListeners = null; + return this._reverseListeners$1(current); + }, + _reverseListeners$1(listeners) { + var current, prev, next; + for (current = listeners, prev = null; current != null; prev = current, current = next) { + next = current._nextListener; + current._nextListener = prev; + } + return prev; + }, + _chainForeignFuture$1(source) { + var e, s, exception, _this = this; + _this._state ^= 2; + try { + source.then$1$2$onError(0, new A._Future__chainForeignFuture_closure(_this), new A._Future__chainForeignFuture_closure0(_this), type$.Null); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A.scheduleMicrotask(new A._Future__chainForeignFuture_closure1(_this, e, s)); + } + }, + _complete$1(value) { + var listeners, _this = this, + t1 = _this.$ti; + if (t1._eval$1("Future<1>")._is(value)) + if (t1._is(value)) + A._Future__chainCoreFutureSync(value, _this); + else + _this._chainForeignFuture$1(value); + else { + listeners = _this._removeListeners$0(); + _this._state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + } + }, + _completeWithValue$1(value) { + var _this = this, + listeners = _this._removeListeners$0(); + _this._state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + }, + _completeError$2(error, stackTrace) { + var listeners = this._removeListeners$0(); + this._setErrorObject$1(A.AsyncError$(error, stackTrace)); + A._Future__propagateToListeners(this, listeners); + }, + _asyncComplete$1(value) { + if (this.$ti._eval$1("Future<1>")._is(value)) { + this._chainFuture$1(value); + return; + } + this._asyncCompleteWithValue$1(value); + }, + _asyncCompleteWithValue$1(value) { + this._state ^= 2; + this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteWithValue_closure(this, value)); + }, + _chainFuture$1(value) { + if (this.$ti._is(value)) { + A._Future__chainCoreFutureAsync(value, this); + return; + } + this._chainForeignFuture$1(value); + }, + _asyncCompleteError$2(error, stackTrace) { + this._state ^= 2; + this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteError_closure(this, error, stackTrace)); + }, + $isFuture: 1 + }; + A._Future__addListener_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this.listener); + }, + $signature: 0 + }; + A._Future__prependListeners_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this._box_0.listeners); + }, + $signature: 0 + }; + A._Future__chainForeignFuture_closure.prototype = { + call$1(value) { + var error, stackTrace, exception, + t1 = this.$this; + t1._state ^= 2; + try { + t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); + } catch (exception) { + error = A.unwrapException(exception); + stackTrace = A.getTraceFromException(exception); + t1._completeError$2(error, stackTrace); + } + }, + $signature: 63 + }; + A._Future__chainForeignFuture_closure0.prototype = { + call$2(error, stackTrace) { + this.$this._completeError$2(error, stackTrace); + }, + $signature: 55 + }; + A._Future__chainForeignFuture_closure1.prototype = { + call$0() { + this.$this._completeError$2(this.e, this.s); + }, + $signature: 0 + }; + A._Future__chainCoreFutureAsync_closure.prototype = { + call$0() { + A._Future__chainCoreFutureSync(this._box_0.source, this.target); + }, + $signature: 0 + }; + A._Future__asyncCompleteWithValue_closure.prototype = { + call$0() { + this.$this._completeWithValue$1(this.value); + }, + $signature: 0 + }; + A._Future__asyncCompleteError_closure.prototype = { + call$0() { + this.$this._completeError$2(this.error, this.stackTrace); + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { + call$0() { + var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null; + try { + t1 = _this._box_0.listener; + completeResult = t1.result._zone.run$1$1(0, t1.callback, type$.dynamic); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = _this.hasError && _this._box_1.source._resultOrListeners.error === e; + t2 = _this._box_0; + if (t1) + t2.listenerValueOrError = _this._box_1.source._resultOrListeners; + else + t2.listenerValueOrError = A.AsyncError$(e, s); + t2.listenerHasError = true; + return; + } + if (completeResult instanceof A._Future && (completeResult._state & 24) !== 0) { + if ((completeResult._state & 16) !== 0) { + t1 = _this._box_0; + t1.listenerValueOrError = completeResult._resultOrListeners; + t1.listenerHasError = true; + } + return; + } + if (completeResult instanceof A._Future) { + originalSource = _this._box_1.source; + t1 = _this._box_0; + t1.listenerValueOrError = J.then$1$1$x(completeResult, new A._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic); + t1.listenerHasError = false; + } + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { + call$1(_) { + return this.originalSource; + }, + $signature: 415 + }; + A._Future__propagateToListeners_handleValueCallback.prototype = { + call$0() { + var e, s, t1, t2, t3, exception; + try { + t1 = this._box_0; + t2 = t1.listener; + t3 = t2.$ti; + t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t2.callback, this.sourceResult, t3._eval$1("2/"), t3._precomputed1); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = this._box_0; + t1.listenerValueOrError = A.AsyncError$(e, s); + t1.listenerHasError = true; + } + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleError.prototype = { + call$0() { + var asyncError, e, s, t1, exception, t2, _this = this; + try { + asyncError = _this._box_1.source._resultOrListeners; + t1 = _this._box_0; + if (t1.listener.matchesErrorTest$1(asyncError) && t1.listener.errorCallback != null) { + t1.listenerValueOrError = t1.listener.handleError$1(asyncError); + t1.listenerHasError = false; + } + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = _this._box_1.source._resultOrListeners; + t2 = _this._box_0; + if (t1.error === e) + t2.listenerValueOrError = t1; + else + t2.listenerValueOrError = A.AsyncError$(e, s); + t2.listenerHasError = true; + } + }, + $signature: 0 + }; + A._AsyncCallbackEntry.prototype = {}; + A.Stream.prototype = { + get$isBroadcast() { + return false; + }, + get$length(_) { + var t1 = {}, + future = new A._Future($.Zone__current, type$._Future_int); + t1.count = 0; + this.listen$4$cancelOnError$onDone$onError(0, new A.Stream_length_closure(t1, this), true, new A.Stream_length_closure0(t1, future), future.get$_completeError()); + return future; + } + }; + A.Stream_Stream$fromFuture_closure.prototype = { + call$1(value) { + var t1 = this.controller; + t1._async$_add$1(value); + t1._closeUnchecked$0(); + }, + $signature() { + return this.T._eval$1("Null(0)"); + } + }; + A.Stream_Stream$fromFuture_closure0.prototype = { + call$2(error, stackTrace) { + var t1 = this.controller; + t1._addError$2(error, stackTrace); + t1._closeUnchecked$0(); + }, + $signature: 417 + }; + A.Stream_length_closure.prototype = { + call$1(_) { + ++this._box_0.count; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(Stream.T)"); + } + }; + A.Stream_length_closure0.prototype = { + call$0() { + this.future._complete$1(this._box_0.count); + }, + $signature: 0 + }; + A._StreamController.prototype = { + get$stream() { + return new A._ControllerStream(this, A._instanceType(this)._eval$1("_ControllerStream<1>")); + }, + get$_pendingEvents() { + if ((this._state & 8) === 0) + return this._varData; + return this._varData._varData; + }, + _ensurePendingEvents$0() { + var events, state, _this = this; + if ((_this._state & 8) === 0) { + events = _this._varData; + return events == null ? _this._varData = new A._PendingEvents() : events; + } + state = _this._varData; + events = state._varData; + return events == null ? state._varData = new A._PendingEvents() : events; + }, + get$_subscription() { + var varData = this._varData; + return (this._state & 8) !== 0 ? varData._varData : varData; + }, + _badEventState$0() { + if ((this._state & 4) !== 0) + return new A.StateError("Cannot add event after closing"); + return new A.StateError("Cannot add event while adding a stream"); + }, + addStream$2$cancelOnError(source, cancelOnError) { + var t2, t3, t4, _this = this, + t1 = _this._state; + if (t1 >= 4) + throw A.wrapException(_this._badEventState$0()); + if ((t1 & 2) !== 0) { + t1 = new A._Future($.Zone__current, type$._Future_dynamic); + t1._asyncComplete$1(null); + return t1; + } + t1 = _this._varData; + t2 = cancelOnError === true; + t3 = new A._Future($.Zone__current, type$._Future_dynamic); + t4 = t2 ? A._AddStreamState_makeErrorHandler(_this) : _this.get$_addError(); + t4 = source.listen$4$cancelOnError$onDone$onError(0, _this.get$_async$_add(), t2, _this.get$_close(), t4); + t2 = _this._state; + if ((t2 & 1) !== 0 ? (_this.get$_subscription()._state & 4) !== 0 : (t2 & 2) === 0) + t4.pause$0(0); + _this._varData = new A._StreamControllerAddStreamState(t1, t3, t4); + _this._state |= 8; + return t3; + }, + _ensureDoneFuture$0() { + var t1 = this._doneFuture; + if (t1 == null) + t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new A._Future($.Zone__current, type$._Future_void); + return t1; + }, + add$1(_, value) { + if (this._state >= 4) + throw A.wrapException(this._badEventState$0()); + this._async$_add$1(value); + }, + addError$2(error, stackTrace) { + var replacement; + A.checkNotNullable(error, "error", type$.Object); + if (this._state >= 4) + throw A.wrapException(this._badEventState$0()); + replacement = $.Zone__current.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } else if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); + this._addError$2(error, stackTrace); + }, + addError$1(error) { + return this.addError$2(error, null); + }, + close$0(_) { + var _this = this, + t1 = _this._state; + if ((t1 & 4) !== 0) + return _this._ensureDoneFuture$0(); + if (t1 >= 4) + throw A.wrapException(_this._badEventState$0()); + _this._closeUnchecked$0(); + return _this._ensureDoneFuture$0(); + }, + _closeUnchecked$0() { + var t1 = this._state |= 4; + if ((t1 & 1) !== 0) + this._sendDone$0(); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, B.C__DelayedDone); + }, + _async$_add$1(value) { + var t1 = this._state; + if ((t1 & 1) !== 0) + this._sendData$1(value); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, new A._DelayedData(value)); + }, + _addError$2(error, stackTrace) { + var t1 = this._state; + if ((t1 & 1) !== 0) + this._sendError$2(error, stackTrace); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, new A._DelayedError(error, stackTrace)); + }, + _close$0() { + var addState = this._varData; + this._varData = addState._varData; + this._state &= 4294967287; + addState.addStreamFuture._asyncComplete$1(null); + }, + _subscribe$4(onData, onError, onDone, cancelOnError) { + var subscription, pendingEvents, t1, addState, _this = this; + if ((_this._state & 3) !== 0) + throw A.wrapException(A.StateError$("Stream has already been listened to.")); + subscription = A._ControllerSubscription$(_this, onData, onError, onDone, cancelOnError, A._instanceType(_this)._precomputed1); + pendingEvents = _this.get$_pendingEvents(); + t1 = _this._state |= 1; + if ((t1 & 8) !== 0) { + addState = _this._varData; + addState._varData = subscription; + addState.addSubscription.resume$0(0); + } else + _this._varData = subscription; + subscription._setPendingEvents$1(pendingEvents); + subscription._guardCallback$1(new A._StreamController__subscribe_closure(_this)); + return subscription; + }, + _recordCancel$1(subscription) { + var onCancel, cancelResult, e, s, exception, result0, t1, _this = this, result = null; + if ((_this._state & 8) !== 0) + result = _this._varData.cancel$0(); + _this._varData = null; + _this._state = _this._state & 4294967286 | 2; + onCancel = _this.onCancel; + if (onCancel != null) + if (result == null) + try { + cancelResult = onCancel.call$0(); + if (cancelResult instanceof A._Future) + result = cancelResult; + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + result0 = new A._Future($.Zone__current, type$._Future_void); + result0._asyncCompleteError$2(e, s); + result = result0; + } + else + result = result.whenComplete$1(onCancel); + t1 = new A._StreamController__recordCancel_complete(_this); + if (result != null) + result = result.whenComplete$1(t1); + else + t1.call$0(); + return result; + }, + _recordPause$1(subscription) { + if ((this._state & 8) !== 0) + this._varData.addSubscription.pause$0(0); + A._runGuarded(this.onPause); + }, + _recordResume$1(subscription) { + if ((this._state & 8) !== 0) + this._varData.addSubscription.resume$0(0); + A._runGuarded(this.onResume); + }, + $isEventSink: 1, + set$onPause(val) { + return this.onPause = val; + }, + set$onResume(val) { + return this.onResume = val; + }, + set$onCancel(val) { + return this.onCancel = val; + } + }; + A._StreamController__subscribe_closure.prototype = { + call$0() { + A._runGuarded(this.$this.onListen); + }, + $signature: 0 + }; + A._StreamController__recordCancel_complete.prototype = { + call$0() { + var doneFuture = this.$this._doneFuture; + if (doneFuture != null && (doneFuture._state & 30) === 0) + doneFuture._asyncComplete$1(null); + }, + $signature: 0 + }; + A._SyncStreamControllerDispatch.prototype = { + _sendData$1(data) { + this.get$_subscription()._async$_add$1(data); + }, + _sendError$2(error, stackTrace) { + this.get$_subscription()._addError$2(error, stackTrace); + }, + _sendDone$0() { + this.get$_subscription()._close$0(); + } + }; + A._AsyncStreamControllerDispatch.prototype = { + _sendData$1(data) { + this.get$_subscription()._addPending$1(new A._DelayedData(data)); + }, + _sendError$2(error, stackTrace) { + this.get$_subscription()._addPending$1(new A._DelayedError(error, stackTrace)); + }, + _sendDone$0() { + this.get$_subscription()._addPending$1(B.C__DelayedDone); + } + }; + A._AsyncStreamController.prototype = {}; + A._SyncStreamController.prototype = {}; + A._ControllerStream.prototype = { + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + return other instanceof A._ControllerStream && other._controller === this._controller; + } + }; + A._ControllerSubscription.prototype = { + _async$_onCancel$0() { + return this._controller._recordCancel$1(this); + }, + _async$_onPause$0() { + this._controller._recordPause$1(this); + }, + _async$_onResume$0() { + this._controller._recordResume$1(this); + } + }; + A._AddStreamState.prototype = { + cancel$0() { + var cancel = this.addSubscription.cancel$0(); + return cancel.whenComplete$1(new A._AddStreamState_cancel_closure(this)); + } + }; + A._AddStreamState_makeErrorHandler_closure.prototype = { + call$2(e, s) { + var t1 = this.controller; + t1._addError$2(e, s); + t1._close$0(); + }, + $signature: 55 + }; + A._AddStreamState_cancel_closure.prototype = { + call$0() { + this.$this.addStreamFuture._asyncComplete$1(null); + }, + $signature: 1 + }; + A._StreamControllerAddStreamState.prototype = {}; + A._BufferingStreamSubscription.prototype = { + _setPendingEvents$1(pendingEvents) { + var _this = this; + if (pendingEvents == null) + return; + _this._pending = pendingEvents; + if (pendingEvents.lastPendingEvent != null) { + _this._state = (_this._state | 128) >>> 0; + pendingEvents.schedule$1(_this); + } + }, + pause$1(_, resumeSignal) { + var t2, t3, _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + t2 = (t1 + 256 | 4) >>> 0; + _this._state = t2; + if (t1 < 256) { + t3 = _this._pending; + if (t3 != null) + if (t3._state === 1) + t3._state = 3; + } + if ((t1 & 4) === 0 && (t2 & 64) === 0) + _this._guardCallback$1(_this.get$_async$_onPause()); + }, + pause$0(_) { + return this.pause$1(0, null); + }, + resume$0(_) { + var _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + if (t1 >= 256) { + t1 = _this._state = t1 - 256; + if (t1 < 256) + if ((t1 & 128) !== 0 && _this._pending.lastPendingEvent != null) + _this._pending.schedule$1(_this); + else { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + if ((t1 & 64) === 0) + _this._guardCallback$1(_this.get$_async$_onResume()); + } + } + }, + cancel$0() { + var _this = this, + t1 = (_this._state & 4294967279) >>> 0; + _this._state = t1; + if ((t1 & 8) === 0) + _this._cancel$0(); + t1 = _this._cancelFuture; + return t1 == null ? $.$get$Future__nullFuture() : t1; + }, + _cancel$0() { + var t2, _this = this, + t1 = _this._state = (_this._state | 8) >>> 0; + if ((t1 & 128) !== 0) { + t2 = _this._pending; + if (t2._state === 1) + t2._state = 3; + } + if ((t1 & 64) === 0) + _this._pending = null; + _this._cancelFuture = _this._async$_onCancel$0(); + }, + _async$_add$1(data) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 64) + this._sendData$1(data); + else + this._addPending$1(new A._DelayedData(data)); + }, + _addError$2(error, stackTrace) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 64) + this._sendError$2(error, stackTrace); + else + this._addPending$1(new A._DelayedError(error, stackTrace)); + }, + _close$0() { + var _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + t1 = (t1 | 2) >>> 0; + _this._state = t1; + if (t1 < 64) + _this._sendDone$0(); + else + _this._addPending$1(B.C__DelayedDone); + }, + _async$_onPause$0() { + }, + _async$_onResume$0() { + }, + _async$_onCancel$0() { + return null; + }, + _addPending$1($event) { + var t1, _this = this, + pending = _this._pending; + if (pending == null) + pending = _this._pending = new A._PendingEvents(); + pending.add$1(0, $event); + t1 = _this._state; + if ((t1 & 128) === 0) { + t1 = (t1 | 128) >>> 0; + _this._state = t1; + if (t1 < 256) + pending.schedule$1(_this); + } + }, + _sendData$1(data) { + var _this = this, + t1 = _this._state; + _this._state = (t1 | 64) >>> 0; + _this._zone.runUnaryGuarded$1$2(_this._onData, data, A._instanceType(_this)._eval$1("_BufferingStreamSubscription.T")); + _this._state = (_this._state & 4294967231) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _sendError$2(error, stackTrace) { + var cancelFuture, _this = this, + t1 = _this._state, + t2 = new A._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); + if ((t1 & 1) !== 0) { + _this._state = (t1 | 16) >>> 0; + _this._cancel$0(); + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t2); + else + t2.call$0(); + } else { + t2.call$0(); + _this._checkState$1((t1 & 4) !== 0); + } + }, + _sendDone$0() { + var cancelFuture, _this = this, + t1 = new A._BufferingStreamSubscription__sendDone_sendDone(_this); + _this._cancel$0(); + _this._state = (_this._state | 16) >>> 0; + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t1); + else + t1.call$0(); + }, + _guardCallback$1(callback) { + var _this = this, + t1 = _this._state; + _this._state = (t1 | 64) >>> 0; + callback.call$0(); + _this._state = (_this._state & 4294967231) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _checkState$1(wasInputPaused) { + var t2, isInputPaused, _this = this, + t1 = _this._state; + if ((t1 & 128) !== 0 && _this._pending.lastPendingEvent == null) { + t1 = _this._state = (t1 & 4294967167) >>> 0; + t2 = false; + if ((t1 & 4) !== 0) + if (t1 < 256) { + t2 = _this._pending; + t2 = t2 == null ? null : t2.lastPendingEvent == null; + t2 = t2 !== false; + } + if (t2) { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + } + } + for (; true; wasInputPaused = isInputPaused) { + if ((t1 & 8) !== 0) { + _this._pending = null; + return; + } + isInputPaused = (t1 & 4) !== 0; + if (wasInputPaused === isInputPaused) + break; + _this._state = (t1 ^ 64) >>> 0; + if (isInputPaused) + _this._async$_onPause$0(); + else + _this._async$_onResume$0(); + t1 = (_this._state & 4294967231) >>> 0; + _this._state = t1; + } + if ((t1 & 128) !== 0 && t1 < 256) + _this._pending.schedule$1(_this); + }, + $isStreamSubscription: 1 + }; + A._BufferingStreamSubscription__sendError_sendError.prototype = { + call$0() { + var onError, t3, t4, + t1 = this.$this, + t2 = t1._state; + if ((t2 & 8) !== 0 && (t2 & 16) === 0) + return; + t1._state = (t2 | 64) >>> 0; + onError = t1._onError; + t2 = this.error; + t3 = type$.Object; + t4 = t1._zone; + if (type$.void_Function_Object_StackTrace._is(onError)) + t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace); + else + t4.runUnaryGuarded$1$2(onError, t2, t3); + t1._state = (t1._state & 4294967231) >>> 0; + }, + $signature: 0 + }; + A._BufferingStreamSubscription__sendDone_sendDone.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._state; + if ((t2 & 16) === 0) + return; + t1._state = (t2 | 74) >>> 0; + t1._zone.runGuarded$1(t1._onDone); + t1._state = (t1._state & 4294967231) >>> 0; + }, + $signature: 0 + }; + A._StreamImpl.prototype = { + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + return this._controller._subscribe$4(onData, onError, onDone, cancelOnError === true); + }, + listen$1(_, onData) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); + }, + listen$3$onDone$onError(_, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); + } + }; + A._DelayedEvent.prototype = { + get$next() { + return this.next; + }, + set$next(val) { + return this.next = val; + } + }; + A._DelayedData.prototype = { + perform$1(dispatch) { + dispatch._sendData$1(this.value); + } + }; + A._DelayedError.prototype = { + perform$1(dispatch) { + dispatch._sendError$2(this.error, this.stackTrace); + } + }; + A._DelayedDone.prototype = { + perform$1(dispatch) { + dispatch._sendDone$0(); + }, + get$next() { + return null; + }, + set$next(_) { + throw A.wrapException(A.StateError$("No events after a done.")); + } + }; + A._PendingEvents.prototype = { + schedule$1(dispatch) { + var _this = this, + t1 = _this._state; + if (t1 === 1) + return; + if (t1 >= 1) { + _this._state = 1; + return; + } + A.scheduleMicrotask(new A._PendingEvents_schedule_closure(_this, dispatch)); + _this._state = 1; + }, + add$1(_, $event) { + var _this = this, + lastEvent = _this.lastPendingEvent; + if (lastEvent == null) + _this.firstPendingEvent = _this.lastPendingEvent = $event; + else { + lastEvent.set$next($event); + _this.lastPendingEvent = $event; + } + } + }; + A._PendingEvents_schedule_closure.prototype = { + call$0() { + var $event, nextEvent, + t1 = this.$this, + oldState = t1._state; + t1._state = 0; + if (oldState === 3) + return; + $event = t1.firstPendingEvent; + nextEvent = $event.get$next(); + t1.firstPendingEvent = nextEvent; + if (nextEvent == null) + t1.lastPendingEvent = null; + $event.perform$1(this.dispatch); + }, + $signature: 0 + }; + A._StreamIterator.prototype = { + get$current(_) { + if (this._async$_hasValue) + return this._stateData; + return null; + }, + moveNext$0() { + var future, _this = this, + subscription = _this._subscription; + if (subscription != null) { + if (_this._async$_hasValue) { + future = new A._Future($.Zone__current, type$._Future_bool); + _this._stateData = future; + _this._async$_hasValue = false; + subscription.resume$0(0); + return future; + } + throw A.wrapException(A.StateError$("Already waiting for next.")); + } + return _this._initializeOrDone$0(); + }, + _initializeOrDone$0() { + var future, subscription, _this = this, + stateData = _this._stateData; + if (stateData != null) { + future = new A._Future($.Zone__current, type$._Future_bool); + _this._stateData = future; + subscription = stateData.listen$4$cancelOnError$onDone$onError(0, _this.get$_onData(), true, _this.get$_onDone(), _this.get$_onError()); + if (_this._stateData != null) + _this._subscription = subscription; + return future; + } + return $.$get$Future__falseFuture(); + }, + cancel$0() { + var _this = this, + subscription = _this._subscription, + stateData = _this._stateData; + _this._stateData = null; + if (subscription != null) { + _this._subscription = null; + if (!_this._async$_hasValue) + stateData._asyncComplete$1(false); + else + _this._async$_hasValue = false; + return subscription.cancel$0(); + } + return $.$get$Future__nullFuture(); + }, + _onData$1(data) { + var moveNextFuture, t1, _this = this; + if (_this._subscription == null) + return; + moveNextFuture = _this._stateData; + _this._stateData = data; + _this._async$_hasValue = true; + moveNextFuture._complete$1(true); + if (_this._async$_hasValue) { + t1 = _this._subscription; + if (t1 != null) + t1.pause$0(0); + } + }, + _onError$2(error, stackTrace) { + var _this = this, + subscription = _this._subscription, + moveNextFuture = _this._stateData; + _this._stateData = _this._subscription = null; + if (subscription != null) + moveNextFuture._completeError$2(error, stackTrace); + else + moveNextFuture._asyncCompleteError$2(error, stackTrace); + }, + _onDone$0() { + var _this = this, + subscription = _this._subscription, + moveNextFuture = _this._stateData; + _this._stateData = _this._subscription = null; + if (subscription != null) + moveNextFuture._completeWithValue$1(false); + else + moveNextFuture._asyncCompleteWithValue$1(false); + } + }; + A._ForwardingStream.prototype = { + get$isBroadcast() { + return this._async$_source.get$isBroadcast(); + }, + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + var t1 = this.$ti, + t2 = $.Zone__current, + t3 = cancelOnError === true ? 1 : 0, + t4 = onError != null ? 32 : 0, + t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._rest[1]), + t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError), + t7 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2.registerCallback$1$1(t7, type$.void), t2, t3 | t4, t1._eval$1("_ForwardingStreamSubscription<1,2>")); + t1._subscription = this._async$_source.listen$3$onDone$onError(0, t1.get$_handleData(), t1.get$_handleDone(), t1.get$_handleError()); + return t1; + }, + listen$1(_, onData) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); + }, + listen$3$onDone$onError(_, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); + } + }; + A._ForwardingStreamSubscription.prototype = { + _async$_add$1(data) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_add(data); + }, + _addError$2(error, stackTrace) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_addError(error, stackTrace); + }, + _async$_onPause$0() { + var t1 = this._subscription; + if (t1 != null) + t1.pause$0(0); + }, + _async$_onResume$0() { + var t1 = this._subscription; + if (t1 != null) + t1.resume$0(0); + }, + _async$_onCancel$0() { + var subscription = this._subscription; + if (subscription != null) { + this._subscription = null; + return subscription.cancel$0(); + } + return null; + }, + _handleData$1(data) { + this._stream._handleData$2(data, this); + }, + _handleError$2(error, stackTrace) { + this._addError$2(error, stackTrace); + }, + _handleDone$0() { + this._close$0(); + } + }; + A._ExpandStream.prototype = { + _handleData$2(inputEvent, sink) { + var value, e, s, t1, exception, error, stackTrace, replacement; + try { + for (t1 = J.get$iterator$ax(this._expand.call$1(inputEvent)); t1.moveNext$0();) { + value = t1.get$current(t1); + sink._async$_add$1(value); + } + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + error = e; + stackTrace = s; + replacement = $.Zone__current.errorCallback$2(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } + sink._addError$2(error, stackTrace); + } + } + }; + A._ZoneFunction.prototype = {}; + A._ZoneSpecification.prototype = {$isZoneSpecification: 1}; + A._ZoneDelegate.prototype = {$isZoneDelegate: 1}; + A._Zone.prototype = { + _processUncaughtError$3(zone, error, stackTrace) { + var handler, parentDelegate, parentZone, currentZone, e, s, t1, exception, + implementation = this.get$_handleUncaughtError(), + implZone = implementation.zone; + if (implZone === B.C__RootZone) { + A._rootHandleError(error, stackTrace); + return; + } + handler = implementation.$function; + parentDelegate = implZone.get$_parentDelegate(); + t1 = J.get$parent$z(implZone); + t1.toString; + parentZone = t1; + currentZone = $.Zone__current; + try { + $.Zone__current = parentZone; + handler.call$5(implZone, parentDelegate, zone, error, stackTrace); + $.Zone__current = currentZone; + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + $.Zone__current = currentZone; + t1 = error === e ? stackTrace : s; + parentZone._processUncaughtError$3(implZone, e, t1); + } + }, + $isZone: 1 + }; + A._CustomZone.prototype = { + get$_delegate() { + var t1 = this._delegateCache; + return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + return this.parent.get$_delegate(); + }, + get$errorZone() { + return this._handleUncaughtError.zone; + }, + runGuarded$1(f) { + var e, s, exception; + try { + this.run$1$1(0, f, type$.void); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + runUnaryGuarded$1$2(f, arg, $T) { + var e, s, exception; + try { + this.runUnary$2$2(f, arg, type$.void, $T); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + runBinaryGuarded$2$3(f, arg1, arg2, T1, T2) { + var e, s, exception; + try { + this.runBinary$3$3(f, arg1, arg2, type$.void, T1, T2); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + bindCallback$1$1(f, $R) { + return new A._CustomZone_bindCallback_closure(this, this.registerCallback$1$1(f, $R), $R); + }, + bindUnaryCallback$2$1(f, $R, $T) { + return new A._CustomZone_bindUnaryCallback_closure(this, this.registerUnaryCallback$2$1(f, $R, $T), $T, $R); + }, + bindCallbackGuarded$1(f) { + return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback$1$1(f, type$.void)); + }, + $index(_, key) { + var value, + t1 = this._async$_map, + result = t1.$index(0, key); + if (result != null || t1.containsKey$1(key)) + return result; + value = this.parent.$index(0, key); + if (value != null) + t1.$indexSet(0, key, value); + return value; + }, + handleUncaughtError$2(error, stackTrace) { + this._processUncaughtError$3(this, error, stackTrace); + }, + fork$2$specification$zoneValues(specification, zoneValues) { + var implementation = this._fork, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, specification, zoneValues); + }, + run$1$1(_, f) { + var implementation = this._run, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); + }, + runUnary$2$2(f, arg) { + var implementation = this._runUnary, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, f, arg); + }, + runBinary$3$3(f, arg1, arg2) { + var implementation = this._runBinary, + t1 = implementation.zone; + return implementation.$function.call$6(t1, t1.get$_parentDelegate(), this, f, arg1, arg2); + }, + registerCallback$1$1(callback) { + var implementation = this._registerCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + registerUnaryCallback$2$1(callback) { + var implementation = this._registerUnaryCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + registerBinaryCallback$3$1(callback) { + var implementation = this._registerBinaryCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + errorCallback$2(error, stackTrace) { + var implementation, implementationZone; + A.checkNotNullable(error, "error", type$.Object); + implementation = this._errorCallback; + implementationZone = implementation.zone; + if (implementationZone === B.C__RootZone) + return null; + return implementation.$function.call$5(implementationZone, implementationZone.get$_parentDelegate(), this, error, stackTrace); + }, + scheduleMicrotask$1(f) { + var implementation = this._scheduleMicrotask, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); + }, + createTimer$2(duration, f) { + var implementation = this._createTimer, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, duration, f); + }, + print$1(line) { + var implementation = this._print, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, line); + }, + get$_run() { + return this._run; + }, + get$_runUnary() { + return this._runUnary; + }, + get$_runBinary() { + return this._runBinary; + }, + get$_registerCallback() { + return this._registerCallback; + }, + get$_registerUnaryCallback() { + return this._registerUnaryCallback; + }, + get$_registerBinaryCallback() { + return this._registerBinaryCallback; + }, + get$_errorCallback() { + return this._errorCallback; + }, + get$_scheduleMicrotask() { + return this._scheduleMicrotask; + }, + get$_createTimer() { + return this._createTimer; + }, + get$_createPeriodicTimer() { + return this._createPeriodicTimer; + }, + get$_print() { + return this._print; + }, + get$_fork() { + return this._fork; + }, + get$_handleUncaughtError() { + return this._handleUncaughtError; + }, + get$parent(receiver) { + return this.parent; + }, + get$_async$_map() { + return this._async$_map; + } + }; + A._CustomZone_bindCallback_closure.prototype = { + call$0() { + return this.$this.run$1$1(0, this.registered, this.R); + }, + $signature() { + return this.R._eval$1("0()"); + } + }; + A._CustomZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this; + return _this.$this.runUnary$2$2(_this.registered, arg, _this.R, _this.T); + }, + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); + } + }; + A._CustomZone_bindCallbackGuarded_closure.prototype = { + call$0() { + return this.$this.runGuarded$1(this.registered); + }, + $signature: 0 + }; + A._rootHandleError_closure.prototype = { + call$0() { + A.Error_throwWithStackTrace(this.error, this.stackTrace); + }, + $signature: 0 + }; + A._RootZone.prototype = { + get$_run() { + return B._ZoneFunction__RootZone__rootRun; + }, + get$_runUnary() { + return B._ZoneFunction__RootZone__rootRunUnary; + }, + get$_runBinary() { + return B._ZoneFunction__RootZone__rootRunBinary; + }, + get$_registerCallback() { + return B._ZoneFunction__RootZone__rootRegisterCallback; + }, + get$_registerUnaryCallback() { + return B._ZoneFunction_QOa; + }, + get$_registerBinaryCallback() { + return B._ZoneFunction_qxw; + }, + get$_errorCallback() { + return B._ZoneFunction__RootZone__rootErrorCallback; + }, + get$_scheduleMicrotask() { + return B._ZoneFunction__RootZone__rootScheduleMicrotask; + }, + get$_createTimer() { + return B._ZoneFunction__RootZone__rootCreateTimer; + }, + get$_createPeriodicTimer() { + return B._ZoneFunction_kWM; + }, + get$_print() { + return B._ZoneFunction__RootZone__rootPrint; + }, + get$_fork() { + return B._ZoneFunction__RootZone__rootFork; + }, + get$_handleUncaughtError() { + return B._ZoneFunction_NIe; + }, + get$parent(_) { + return null; + }, + get$_async$_map() { + return $.$get$_RootZone__rootMap(); + }, + get$_delegate() { + var t1 = $._RootZone__rootDelegate; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + var t1 = $._RootZone__rootDelegate; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; + }, + get$errorZone() { + return this; + }, + runGuarded$1(f) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$0(); + return; + } + A._rootRun(null, null, this, f); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + runUnaryGuarded$1$2(f, arg) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$1(arg); + return; + } + A._rootRunUnary(null, null, this, f, arg); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + runBinaryGuarded$2$3(f, arg1, arg2) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$2(arg1, arg2); + return; + } + A._rootRunBinary(null, null, this, f, arg1, arg2); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + bindCallback$1$1(f, $R) { + return new A._RootZone_bindCallback_closure(this, f, $R); + }, + bindUnaryCallback$2$1(f, $R, $T) { + return new A._RootZone_bindUnaryCallback_closure(this, f, $T, $R); + }, + bindCallbackGuarded$1(f) { + return new A._RootZone_bindCallbackGuarded_closure(this, f); + }, + $index(_, key) { + return null; + }, + handleUncaughtError$2(error, stackTrace) { + A._rootHandleError(error, stackTrace); + }, + fork$2$specification$zoneValues(specification, zoneValues) { + return A._rootFork(null, null, this, specification, zoneValues); + }, + run$1$1(_, f) { + if ($.Zone__current === B.C__RootZone) + return f.call$0(); + return A._rootRun(null, null, this, f); + }, + runUnary$2$2(f, arg) { + if ($.Zone__current === B.C__RootZone) + return f.call$1(arg); + return A._rootRunUnary(null, null, this, f, arg); + }, + runBinary$3$3(f, arg1, arg2) { + if ($.Zone__current === B.C__RootZone) + return f.call$2(arg1, arg2); + return A._rootRunBinary(null, null, this, f, arg1, arg2); + }, + registerCallback$1$1(f) { + return f; + }, + registerUnaryCallback$2$1(f) { + return f; + }, + registerBinaryCallback$3$1(f) { + return f; + }, + errorCallback$2(error, stackTrace) { + return null; + }, + scheduleMicrotask$1(f) { + A._rootScheduleMicrotask(null, null, this, f); + }, + createTimer$2(duration, f) { + return A.Timer__createTimer(duration, f); + }, + print$1(line) { + A.printString(line); + } + }; + A._RootZone_bindCallback_closure.prototype = { + call$0() { + return this.$this.run$1$1(0, this.f, this.R); + }, + $signature() { + return this.R._eval$1("0()"); + } + }; + A._RootZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this; + return _this.$this.runUnary$2$2(_this.f, arg, _this.R, _this.T); + }, + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); + } + }; + A._RootZone_bindCallbackGuarded_closure.prototype = { + call$0() { + return this.$this.runGuarded$1(this.f); + }, + $signature: 0 + }; + A._HashMap.prototype = { + get$length(_) { + return this._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._collection$_length !== 0; + }, + get$keys(_) { + return new A._HashMapKeyIterable(this, A._instanceType(this)._eval$1("_HashMapKeyIterable<1>")); + }, + get$values(_) { + var t1 = A._instanceType(this); + return A.MappedIterable_MappedIterable(new A._HashMapKeyIterable(this, t1._eval$1("_HashMapKeyIterable<1>")), new A._HashMap_values_closure(this), t1._precomputed1, t1._rest[1]); + }, + containsKey$1(key) { + var strings, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._strings; + return strings == null ? false : strings[key] != null; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._nums; + return nums == null ? false : nums[key] != null; + } else + return this._containsKey$1(key); + }, + _containsKey$1(key) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(this._getBucket$2(rest, key), key) >= 0; + }, + addAll$1(_, other) { + other.forEach$1(0, new A._HashMap_addAll_closure(this)); + }, + $index(_, key) { + var strings, t1, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._strings; + t1 = strings == null ? null : A._HashMap__getTableEntry(strings, key); + return t1; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._nums; + t1 = nums == null ? null : A._HashMap__getTableEntry(nums, key); + return t1; + } else + return this._get$1(key); + }, + _get$1(key) { + var bucket, index, + rest = this._collection$_rest; + if (rest == null) + return null; + bucket = this._getBucket$2(rest, key); + index = this._findBucketIndex$2(bucket, key); + return index < 0 ? null : bucket[index + 1]; + }, + $indexSet(_, key, value) { + var strings, nums, _this = this; + if (typeof key == "string" && key !== "__proto__") { + strings = _this._strings; + _this._addHashTableEntry$3(strings == null ? _this._strings = A._HashMap__newHashTable() : strings, key, value); + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = _this._nums; + _this._addHashTableEntry$3(nums == null ? _this._nums = A._HashMap__newHashTable() : nums, key, value); + } else + _this._set$2(key, value); + }, + _set$2(key, value) { + var hash, bucket, index, _this = this, + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._HashMap__newHashTable(); + hash = _this._computeHashCode$1(key); + bucket = rest[hash]; + if (bucket == null) { + A._HashMap__setTableEntry(rest, hash, [key, value]); + ++_this._collection$_length; + _this._collection$_keys = null; + } else { + index = _this._findBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index + 1] = value; + else { + bucket.push(key, value); + ++_this._collection$_length; + _this._collection$_keys = null; + } + } + }, + remove$1(_, key) { + var _this = this; + if (typeof key == "string" && key !== "__proto__") + return _this._removeHashTableEntry$2(_this._strings, key); + else if (typeof key == "number" && (key & 1073741823) === key) + return _this._removeHashTableEntry$2(_this._nums, key); + else + return _this._remove$1(key); + }, + _remove$1(key) { + var hash, bucket, index, result, _this = this, + rest = _this._collection$_rest; + if (rest == null) + return null; + hash = _this._computeHashCode$1(key); + bucket = rest[hash]; + index = _this._findBucketIndex$2(bucket, key); + if (index < 0) + return null; + --_this._collection$_length; + _this._collection$_keys = null; + result = bucket.splice(index, 2)[1]; + if (0 === bucket.length) + delete rest[hash]; + return result; + }, + forEach$1(_, action) { + var $length, t1, i, key, t2, _this = this, + keys = _this._computeKeys$0(); + for ($length = keys.length, t1 = A._instanceType(_this)._rest[1], i = 0; i < $length; ++i) { + key = keys[i]; + t2 = _this.$index(0, key); + action.call$2(key, t2 == null ? t1._as(t2) : t2); + if (keys !== _this._collection$_keys) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + }, + _computeKeys$0() { + var strings, index, names, entries, i, nums, rest, bucket, $length, i0, _this = this, + result = _this._collection$_keys; + if (result != null) + return result; + result = A.List_List$filled(_this._collection$_length, null, false, type$.dynamic); + strings = _this._strings; + index = 0; + if (strings != null) { + names = Object.getOwnPropertyNames(strings); + entries = names.length; + for (i = 0; i < entries; ++i) { + result[index] = names[i]; + ++index; + } + } + nums = _this._nums; + if (nums != null) { + names = Object.getOwnPropertyNames(nums); + entries = names.length; + for (i = 0; i < entries; ++i) { + result[index] = +names[i]; + ++index; + } + } + rest = _this._collection$_rest; + if (rest != null) { + names = Object.getOwnPropertyNames(rest); + entries = names.length; + for (i = 0; i < entries; ++i) { + bucket = rest[names[i]]; + $length = bucket.length; + for (i0 = 0; i0 < $length; i0 += 2) { + result[index] = bucket[i0]; + ++index; + } + } + } + return _this._collection$_keys = result; + }, + _addHashTableEntry$3(table, key, value) { + if (table[key] == null) { + ++this._collection$_length; + this._collection$_keys = null; + } + A._HashMap__setTableEntry(table, key, value); + }, + _removeHashTableEntry$2(table, key) { + var value; + if (table != null && table[key] != null) { + value = A._HashMap__getTableEntry(table, key); + delete table[key]; + --this._collection$_length; + this._collection$_keys = null; + return value; + } else + return null; + }, + _computeHashCode$1(key) { + return J.get$hashCode$(key) & 1073741823; + }, + _getBucket$2(table, key) { + return table[this._computeHashCode$1(key)]; + }, + _findBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; i += 2) + if (J.$eq$(bucket[i], key)) + return i; + return -1; + } + }; + A._HashMap_values_closure.prototype = { + call$1(each) { + var t1 = this.$this, + t2 = t1.$index(0, each); + return t2 == null ? A._instanceType(t1)._rest[1]._as(t2) : t2; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("2(1)"); + } + }; + A._HashMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(1,2)"); + } + }; + A._IdentityHashMap.prototype = { + _computeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + _findBucketIndex$2(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; i += 2) { + t1 = bucket[i]; + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + } + }; + A._HashMapKeyIterable.prototype = { + get$length(_) { + return this._map._collection$_length; + }, + get$isEmpty(_) { + return this._map._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._map._collection$_length !== 0; + }, + get$iterator(_) { + var t1 = this._map; + return new A._HashMapKeyIterator(t1, t1._computeKeys$0(), this.$ti._eval$1("_HashMapKeyIterator<1>")); + }, + contains$1(_, element) { + return this._map.containsKey$1(element); + } + }; + A._HashMapKeyIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + keys = _this._collection$_keys, + offset = _this._offset, + t1 = _this._map; + if (keys !== t1._collection$_keys) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (offset >= keys.length) { + _this._collection$_current = null; + return false; + } else { + _this._collection$_current = keys[offset]; + _this._offset = offset + 1; + return true; + } + } + }; + A._LinkedCustomHashMap.prototype = { + $index(_, key) { + if (!this._validKey.call$1(key)) + return null; + return this.super$JsLinkedHashMap$internalGet(key); + }, + $indexSet(_, key, value) { + this.super$JsLinkedHashMap$internalSet(key, value); + }, + containsKey$1(key) { + if (!this._validKey.call$1(key)) + return false; + return this.super$JsLinkedHashMap$internalContainsKey(key); + }, + remove$1(_, key) { + if (!this._validKey.call$1(key)) + return null; + return this.super$JsLinkedHashMap$internalRemove(key); + }, + internalComputeHashCode$1(key) { + return this._hashCode.call$1(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, t1, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (t1 = this._equals, i = 0; i < $length; ++i) + if (t1.call$2(bucket[i].hashMapCellKey, key)) + return i; + return -1; + } + }; + A._LinkedCustomHashMap_closure.prototype = { + call$1(v) { + return this.K._is(v); + }, + $signature: 132 + }; + A._LinkedHashSet.prototype = { + _newSet$0() { + return new A._LinkedHashSet(A._instanceType(this)._eval$1("_LinkedHashSet<1>")); + }, + _newSimilarSet$1$0($R) { + return new A._LinkedHashSet($R._eval$1("_LinkedHashSet<0>")); + }, + _newSimilarSet$0() { + return this._newSimilarSet$1$0(type$.dynamic); + }, + get$iterator(_) { + var _this = this, + t1 = new A._LinkedHashSetIterator(_this, _this._modifications, A._instanceType(_this)._eval$1("_LinkedHashSetIterator<1>")); + t1._cell = _this._first; + return t1; + }, + get$length(_) { + return this._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._collection$_length !== 0; + }, + contains$1(_, object) { + var strings, nums; + if (typeof object == "string" && object !== "__proto__") { + strings = this._strings; + if (strings == null) + return false; + return strings[object] != null; + } else if (typeof object == "number" && (object & 1073741823) === object) { + nums = this._nums; + if (nums == null) + return false; + return nums[object] != null; + } else + return this._contains$1(object); + }, + _contains$1(object) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0; + }, + get$first(_) { + var first = this._first; + if (first == null) + throw A.wrapException(A.StateError$("No elements")); + return first._element; + }, + get$last(_) { + var last = this._last; + if (last == null) + throw A.wrapException(A.StateError$("No elements")); + return last._element; + }, + add$1(_, element) { + var strings, nums, _this = this; + if (typeof element == "string" && element !== "__proto__") { + strings = _this._strings; + return _this._addHashTableEntry$2(strings == null ? _this._strings = A._LinkedHashSet__newHashTable() : strings, element); + } else if (typeof element == "number" && (element & 1073741823) === element) { + nums = _this._nums; + return _this._addHashTableEntry$2(nums == null ? _this._nums = A._LinkedHashSet__newHashTable() : nums, element); + } else + return _this._add$1(element); + }, + _add$1(element) { + var hash, bucket, _this = this, + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._LinkedHashSet__newHashTable(); + hash = _this._computeHashCode$1(element); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [_this._newLinkedCell$1(element)]; + else { + if (_this._findBucketIndex$2(bucket, element) >= 0) + return false; + bucket.push(_this._newLinkedCell$1(element)); + } + return true; + }, + remove$1(_, object) { + var _this = this; + if (typeof object == "string" && object !== "__proto__") + return _this._removeHashTableEntry$2(_this._strings, object); + else if (typeof object == "number" && (object & 1073741823) === object) + return _this._removeHashTableEntry$2(_this._nums, object); + else + return _this._remove$1(object); + }, + _remove$1(object) { + var hash, bucket, index, cell, _this = this, + rest = _this._collection$_rest; + if (rest == null) + return false; + hash = _this._computeHashCode$1(object); + bucket = rest[hash]; + index = _this._findBucketIndex$2(bucket, object); + if (index < 0) + return false; + cell = bucket.splice(index, 1)[0]; + if (0 === bucket.length) + delete rest[hash]; + _this._unlinkCell$1(cell); + return true; + }, + _addHashTableEntry$2(table, element) { + if (table[element] != null) + return false; + table[element] = this._newLinkedCell$1(element); + return true; + }, + _removeHashTableEntry$2(table, element) { + var cell; + if (table == null) + return false; + cell = table[element]; + if (cell == null) + return false; + this._unlinkCell$1(cell); + delete table[element]; + return true; + }, + _modified$0() { + this._modifications = this._modifications + 1 & 1073741823; + }, + _newLinkedCell$1(element) { + var t1, _this = this, + cell = new A._LinkedHashSetCell(element); + if (_this._first == null) + _this._first = _this._last = cell; + else { + t1 = _this._last; + t1.toString; + cell._previous = t1; + _this._last = t1._next = cell; + } + ++_this._collection$_length; + _this._modified$0(); + return cell; + }, + _unlinkCell$1(cell) { + var _this = this, + previous = cell._previous, + next = cell._next; + if (previous == null) + _this._first = next; + else + previous._next = next; + if (next == null) + _this._last = previous; + else + next._previous = previous; + --_this._collection$_length; + _this._modified$0(); + }, + _computeHashCode$1(element) { + return J.get$hashCode$(element) & 1073741823; + }, + _findBucketIndex$2(bucket, element) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i]._element, element)) + return i; + return -1; + } + }; + A._LinkedIdentityHashSet.prototype = { + _newSet$0() { + return new A._LinkedIdentityHashSet(this.$ti); + }, + _newSimilarSet$1$0($R) { + return new A._LinkedIdentityHashSet($R._eval$1("_LinkedIdentityHashSet<0>")); + }, + _newSimilarSet$0() { + return this._newSimilarSet$1$0(type$.dynamic); + }, + _computeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + _findBucketIndex$2(bucket, element) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) { + t1 = bucket[i]._element; + if (t1 == null ? element == null : t1 === element) + return i; + } + return -1; + } + }; + A._LinkedHashSetCell.prototype = {}; + A._LinkedHashSetIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + cell = _this._cell, + t1 = _this._set; + if (_this._modifications !== t1._modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (cell == null) { + _this._collection$_current = null; + return false; + } else { + _this._collection$_current = cell._element; + _this._cell = cell._next; + return true; + } + } + }; + A.UnmodifiableListView.prototype = { + cast$1$0(_, $R) { + return new A.UnmodifiableListView(J.cast$1$0$ax(this._collection$_source, $R), $R._eval$1("UnmodifiableListView<0>")); + }, + get$length(_) { + return J.get$length$asx(this._collection$_source); + }, + $index(_, index) { + return J.elementAt$1$ax(this._collection$_source, index); + } + }; + A.HashMap_HashMap$from_closure.prototype = { + call$2(k, v) { + this.result.$indexSet(0, this.K._as(k), this.V._as(v)); + }, + $signature: 166 + }; + A.LinkedHashMap_LinkedHashMap$from_closure.prototype = { + call$2(k, v) { + this.result.$indexSet(0, this.K._as(k), this.V._as(v)); + }, + $signature: 166 + }; + A.ListBase.prototype = { + get$iterator(receiver) { + return new A.ListIterator(receiver, this.get$length(receiver), A.instanceType(receiver)._eval$1("ListIterator")); + }, + elementAt$1(receiver, index) { + return this.$index(receiver, index); + }, + forEach$1(receiver, action) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + action.call$1(this.$index(receiver, i)); + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + }, + get$isEmpty(receiver) { + return this.get$length(receiver) === 0; + }, + get$isNotEmpty(receiver) { + return !this.get$isEmpty(receiver); + }, + get$first(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.$index(receiver, 0); + }, + get$last(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.$index(receiver, this.get$length(receiver) - 1); + }, + get$single(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + if (this.get$length(receiver) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + return this.$index(receiver, 0); + }, + contains$1(receiver, element) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (J.$eq$(this.$index(receiver, i), element)) + return true; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + every$1(receiver, test) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (!test.call$1(this.$index(receiver, i))) + return false; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return true; + }, + any$1(receiver, test) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (test.call$1(this.$index(receiver, i))) + return true; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + lastWhere$2$orElse(receiver, test, orElse) { + var i, element, + $length = this.get$length(receiver); + for (i = $length - 1; i >= 0; --i) { + element = this.$index(receiver, i); + if (test.call$1(element)) + return element; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + if (orElse != null) + return orElse.call$0(); + throw A.wrapException(A.IterableElementError_noElement()); + }, + join$1(receiver, separator) { + var t1; + if (this.get$length(receiver) === 0) + return ""; + t1 = A.StringBuffer__writeAll("", receiver, separator); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + where$1(receiver, test) { + return new A.WhereIterable(receiver, test, A.instanceType(receiver)._eval$1("WhereIterable")); + }, + map$1$1(receiver, f, $T) { + return new A.MappedListIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + expand$1$1(receiver, f, $T) { + return new A.ExpandIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + skip$1(receiver, count) { + return A.SubListIterable$(receiver, count, null, A.instanceType(receiver)._eval$1("ListBase.E")); + }, + take$1(receiver, count) { + return A.SubListIterable$(receiver, 0, A.checkNotNullable(count, "count", type$.int), A.instanceType(receiver)._eval$1("ListBase.E")); + }, + toList$1$growable(receiver, growable) { + var t1, first, result, i, _this = this; + if (_this.get$isEmpty(receiver)) { + t1 = J.JSArray_JSArray$growable(0, A.instanceType(receiver)._eval$1("ListBase.E")); + return t1; + } + first = _this.$index(receiver, 0); + result = A.List_List$filled(_this.get$length(receiver), first, true, A.instanceType(receiver)._eval$1("ListBase.E")); + for (i = 1; i < _this.get$length(receiver); ++i) + result[i] = _this.$index(receiver, i); + return result; + }, + toList$0(receiver) { + return this.toList$1$growable(receiver, true); + }, + toSet$0(receiver) { + var i, + result = A.LinkedHashSet_LinkedHashSet(A.instanceType(receiver)._eval$1("ListBase.E")); + for (i = 0; i < this.get$length(receiver); ++i) + result.add$1(0, this.$index(receiver, i)); + return result; + }, + add$1(receiver, element) { + var t1 = this.get$length(receiver); + this.set$length(receiver, t1 + 1); + this.$indexSet(receiver, t1, element); + }, + addAll$1(receiver, iterable) { + var t1, + i = this.get$length(receiver); + for (t1 = iterable.get$iterator(iterable); t1.moveNext$0();) { + this.add$1(receiver, t1.get$current(t1)); + ++i; + } + }, + _closeGap$2(receiver, start, end) { + var i, _this = this, + $length = _this.get$length(receiver), + size = end - start; + for (i = end; i < $length; ++i) + _this.$indexSet(receiver, i - size, _this.$index(receiver, i)); + _this.set$length(receiver, $length - size); + }, + cast$1$0(receiver, $R) { + return new A.CastList(receiver, A.instanceType(receiver)._eval$1("@")._bind$1($R)._eval$1("CastList<1,2>")); + }, + sort$1(receiver, compare) { + var t1 = compare == null ? A.collection_ListBase__compareAny$closure() : compare; + A.Sort__doSort(receiver, 0, this.get$length(receiver) - 1, t1); + }, + sublist$2(receiver, start, end) { + var listLength = this.get$length(receiver); + A.RangeError_checkValidRange(start, listLength, listLength); + return A.List_List$from(this.getRange$2(receiver, start, listLength), true, A.instanceType(receiver)._eval$1("ListBase.E")); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + getRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + return A.SubListIterable$(receiver, start, end, A.instanceType(receiver)._eval$1("ListBase.E")); + }, + removeRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + if (end > start) + this._closeGap$2(receiver, start, end); + }, + fillRange$3(receiver, start, end, fill) { + var i, + value = fill == null ? A.instanceType(receiver)._eval$1("ListBase.E")._as(fill) : fill; + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + for (i = start; i < end; ++i) + this.$indexSet(receiver, i, value); + }, + setRange$4(receiver, start, end, iterable, skipCount) { + var $length, otherStart, otherList, t1, i; + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + $length = end - start; + if ($length === 0) + return; + A.RangeError_checkNotNegative(skipCount, "skipCount"); + if (A.instanceType(receiver)._eval$1("List")._is(iterable)) { + otherStart = skipCount; + otherList = iterable; + } else { + otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); + otherStart = 0; + } + t1 = J.getInterceptor$asx(otherList); + if (otherStart + $length > t1.get$length(otherList)) + throw A.wrapException(A.IterableElementError_tooFew()); + if (otherStart < start) + for (i = $length - 1; i >= 0; --i) + this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); + else + for (i = 0; i < $length; ++i) + this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); + }, + indexOf$1(receiver, element) { + var i; + for (i = 0; i < this.get$length(receiver); ++i) + if (J.$eq$(this.$index(receiver, i), element)) + return i; + return -1; + }, + get$reversed(receiver) { + return new A.ReversedListIterable(receiver, A.instanceType(receiver)._eval$1("ReversedListIterable")); + }, + toString$0(receiver) { + return A.Iterable_iterableToFullString(receiver, "[", "]"); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.MapBase.prototype = { + cast$2$0(_, RK, RV) { + var t1 = A._instanceType(this); + return A.Map_castFrom(this, t1._eval$1("MapBase.K"), t1._eval$1("MapBase.V"), RK, RV); + }, + forEach$1(_, action) { + var t1, t2, key, t3, _this = this; + for (t1 = J.get$iterator$ax(_this.get$keys(_this)), t2 = A._instanceType(_this)._eval$1("MapBase.V"); t1.moveNext$0();) { + key = t1.get$current(t1); + t3 = _this.$index(0, key); + action.call$2(key, t3 == null ? t2._as(t3) : t3); + } + }, + addAll$1(_, other) { + other.forEach$1(0, new A.MapBase_addAll_closure(this)); + }, + get$entries(_) { + var _this = this; + return J.map$1$1$ax(_this.get$keys(_this), new A.MapBase_entries_closure(_this), A._instanceType(_this)._eval$1("MapEntry")); + }, + removeWhere$1(_, test) { + var t2, key, t3, _i, _this = this, + t1 = A._instanceType(_this), + keysToRemove = A._setArrayType([], t1._eval$1("JSArray")); + for (t2 = J.get$iterator$ax(_this.get$keys(_this)), t1 = t1._eval$1("MapBase.V"); t2.moveNext$0();) { + key = t2.get$current(t2); + t3 = _this.$index(0, key); + if (test.call$2(key, t3 == null ? t1._as(t3) : t3)) + keysToRemove.push(key); + } + for (t1 = keysToRemove.length, _i = 0; _i < keysToRemove.length; keysToRemove.length === t1 || (0, A.throwConcurrentModificationError)(keysToRemove), ++_i) + _this.remove$1(0, keysToRemove[_i]); + }, + containsKey$1(key) { + return J.contains$1$asx(this.get$keys(this), key); + }, + get$length(_) { + return J.get$length$asx(this.get$keys(this)); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.get$keys(this)); + }, + get$isNotEmpty(_) { + return J.get$isNotEmpty$asx(this.get$keys(this)); + }, + get$values(_) { + return new A._MapBaseValueIterable(this, A._instanceType(this)._eval$1("_MapBaseValueIterable")); + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + $isMap: 1 + }; + A.MapBase_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(MapBase.K,MapBase.V)"); + } + }; + A.MapBase_entries_closure.prototype = { + call$1(key) { + var t1 = this.$this, + t2 = t1.$index(0, key); + if (t2 == null) + t2 = A._instanceType(t1)._eval$1("MapBase.V")._as(t2); + return new A.MapEntry(key, t2, A._instanceType(t1)._eval$1("MapEntry")); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("MapEntry(MapBase.K)"); + } + }; + A.MapBase_mapToString_closure.prototype = { + call$2(k, v) { + var t2, + t1 = this._box_0; + if (!t1.first) + this.result._contents += ", "; + t1.first = false; + t1 = this.result; + t2 = A.S(k); + t2 = t1._contents += t2; + t1._contents = t2 + ": "; + t2 = A.S(v); + t1._contents += t2; + }, + $signature: 169 + }; + A.UnmodifiableMapBase.prototype = {}; + A._MapBaseValueIterable.prototype = { + get$length(_) { + var t1 = this._map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._map; + return t1.get$isNotEmpty(t1); + }, + get$first(_) { + var t1 = this._map; + t1 = t1.$index(0, J.get$first$ax(t1.get$keys(t1))); + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + get$single(_) { + var t1 = this._map; + t1 = t1.$index(0, J.get$single$ax(t1.get$keys(t1))); + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + get$last(_) { + var t1 = this._map; + t1 = t1.$index(0, J.get$last$ax(t1.get$keys(t1))); + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + get$iterator(_) { + var t1 = this._map; + return new A._MapBaseValueIterator(J.get$iterator$ax(t1.get$keys(t1)), t1, this.$ti._eval$1("_MapBaseValueIterator<1,2>")); + } + }; + A._MapBaseValueIterator.prototype = { + moveNext$0() { + var _this = this, + t1 = _this._collection$_keys; + if (t1.moveNext$0()) { + _this._collection$_current = _this._map.$index(0, t1.get$current(t1)); + return true; + } + _this._collection$_current = null; + return false; + }, + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + } + }; + A._UnmodifiableMapMixin.prototype = { + $indexSet(_, key, value) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + }, + addAll$1(_, other) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + } + }; + A.MapView.prototype = { + cast$2$0(_, RK, RV) { + return this._map.cast$2$0(0, RK, RV); + }, + $index(_, key) { + return this._map.$index(0, key); + }, + $indexSet(_, key, value) { + this._map.$indexSet(0, key, value); + }, + addAll$1(_, other) { + this._map.addAll$1(0, other); + }, + containsKey$1(key) { + return this._map.containsKey$1(key); + }, + forEach$1(_, action) { + this._map.forEach$1(0, action); + }, + get$isEmpty(_) { + var t1 = this._map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._map; + return t1.get$isNotEmpty(t1); + }, + get$length(_) { + var t1 = this._map; + return t1.get$length(t1); + }, + get$keys(_) { + var t1 = this._map; + return t1.get$keys(t1); + }, + remove$1(_, key) { + return this._map.remove$1(0, key); + }, + toString$0(_) { + return this._map.toString$0(0); + }, + get$values(_) { + var t1 = this._map; + return t1.get$values(t1); + }, + get$entries(_) { + var t1 = this._map; + return t1.get$entries(t1); + }, + $isMap: 1 + }; + A.UnmodifiableMapView.prototype = { + cast$2$0(_, RK, RV) { + return new A.UnmodifiableMapView(this._map.cast$2$0(0, RK, RV), RK._eval$1("@<0>")._bind$1(RV)._eval$1("UnmodifiableMapView<1,2>")); + } + }; + A.ListQueue.prototype = { + get$iterator(_) { + var _this = this; + return new A._ListQueueIterator(_this, _this._tail, _this._modificationCount, _this._head, _this.$ti._eval$1("_ListQueueIterator<1>")); + }, + get$isEmpty(_) { + return this._head === this._tail; + }, + get$length(_) { + return (this._tail - this._head & this._table.length - 1) >>> 0; + }, + get$first(_) { + var _this = this, + t1 = _this._head; + if (t1 === _this._tail) + throw A.wrapException(A.IterableElementError_noElement()); + t1 = _this._table[t1]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + get$last(_) { + var _this = this, + t1 = _this._head, + t2 = _this._tail; + if (t1 === t2) + throw A.wrapException(A.IterableElementError_noElement()); + t1 = _this._table; + t1 = t1[(t2 - 1 & t1.length - 1) >>> 0]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + get$single(_) { + var t1, _this = this; + if (_this._head === _this._tail) + throw A.wrapException(A.IterableElementError_noElement()); + if (_this.get$length(0) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + t1 = _this._table[_this._head]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + elementAt$1(_, index) { + var t1, _this = this; + A.IndexError_check(index, _this.get$length(0), _this, null, null); + t1 = _this._table; + t1 = t1[(_this._head + index & t1.length - 1) >>> 0]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + toList$1$growable(_, growable) { + var t1, list, t2, t3, i, t4, _this = this, + mask = _this._table.length - 1, + $length = (_this._tail - _this._head & mask) >>> 0; + if ($length === 0) { + t1 = J.JSArray_JSArray$growable(0, _this.$ti._precomputed1); + return t1; + } + t1 = _this.$ti._precomputed1; + list = A.List_List$filled($length, _this.get$first(0), true, t1); + for (t2 = _this._table, t3 = _this._head, i = 0; i < $length; ++i) { + t4 = t2[(t3 + i & mask) >>> 0]; + list[i] = t4 == null ? t1._as(t4) : t4; + } + return list; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + addAll$1(_, elements) { + var addCount, $length, t2, t3, t4, newTable, endSpace, preSpace, _i, _this = this, + t1 = _this.$ti; + if (t1._eval$1("List<1>")._is(elements)) { + addCount = elements.length; + $length = _this.get$length(0); + t2 = $length + addCount; + t3 = _this._table; + t4 = t3.length; + if (t2 >= t4) { + newTable = A.List_List$filled(A.ListQueue__nextPowerOf2(t2 + (t2 >>> 1)), null, false, t1._eval$1("1?")); + _this._tail = _this._collection$_writeToList$1(newTable); + _this._table = newTable; + _this._head = 0; + B.JSArray_methods.setRange$4(newTable, $length, t2, elements, 0); + _this._tail += addCount; + } else { + t1 = _this._tail; + endSpace = t4 - t1; + if (addCount < endSpace) { + B.JSArray_methods.setRange$4(t3, t1, t1 + addCount, elements, 0); + _this._tail += addCount; + } else { + preSpace = addCount - endSpace; + B.JSArray_methods.setRange$4(t3, t1, t1 + endSpace, elements, 0); + B.JSArray_methods.setRange$4(_this._table, 0, preSpace, elements, endSpace); + _this._tail = preSpace; + } + } + ++_this._modificationCount; + } else + for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) + _this._add$1(elements[_i]); + }, + clear$0(_) { + var t2, t3, _this = this, + i = _this._head, + t1 = _this._tail; + if (i !== t1) { + for (t2 = _this._table, t3 = t2.length - 1; i !== t1; i = (i + 1 & t3) >>> 0) + t2[i] = null; + _this._head = _this._tail = 0; + ++_this._modificationCount; + } + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + addFirst$1(value) { + var _this = this, + t1 = _this._head, + t2 = _this._table; + t1 = _this._head = (t1 - 1 & t2.length - 1) >>> 0; + t2[t1] = value; + if (t1 === _this._tail) + _this._grow$0(); + ++_this._modificationCount; + }, + removeFirst$0() { + var t2, result, _this = this, + t1 = _this._head; + if (t1 === _this._tail) + throw A.wrapException(A.IterableElementError_noElement()); + ++_this._modificationCount; + t2 = _this._table; + result = t2[t1]; + if (result == null) + result = _this.$ti._precomputed1._as(result); + t2[t1] = null; + _this._head = (t1 + 1 & t2.length - 1) >>> 0; + return result; + }, + _add$1(element) { + var _this = this, + t1 = _this._table, + t2 = _this._tail; + t1[t2] = element; + t1 = (t2 + 1 & t1.length - 1) >>> 0; + _this._tail = t1; + if (_this._head === t1) + _this._grow$0(); + ++_this._modificationCount; + }, + _grow$0() { + var _this = this, + newTable = A.List_List$filled(_this._table.length * 2, null, false, _this.$ti._eval$1("1?")), + t1 = _this._table, + t2 = _this._head, + split = t1.length - t2; + B.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); + B.JSArray_methods.setRange$4(newTable, split, split + _this._head, _this._table, 0); + _this._head = 0; + _this._tail = _this._table.length; + _this._table = newTable; + }, + _collection$_writeToList$1(target) { + var $length, firstPartSize, _this = this, + t1 = _this._head, + t2 = _this._tail, + t3 = _this._table; + if (t1 <= t2) { + $length = t2 - t1; + B.JSArray_methods.setRange$4(target, 0, $length, t3, t1); + return $length; + } else { + firstPartSize = t3.length - t1; + B.JSArray_methods.setRange$4(target, 0, firstPartSize, t3, t1); + B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this._tail, _this._table, 0); + return _this._tail + firstPartSize; + } + }, + $isQueue: 1 + }; + A._ListQueueIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t2, _this = this, + t1 = _this._queue; + if (_this._modificationCount !== t1._modificationCount) + A.throwExpression(A.ConcurrentModificationError$(t1)); + t2 = _this._collection$_position; + if (t2 === _this._collection$_end) { + _this._collection$_current = null; + return false; + } + t1 = t1._table; + _this._collection$_current = t1[t2]; + _this._collection$_position = (t2 + 1 & t1.length - 1) >>> 0; + return true; + } + }; + A.SetBase.prototype = { + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(this) !== 0; + }, + addAll$1(_, elements) { + var t1; + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + this.add$1(0, t1.get$current(t1)); + }, + removeAll$1(elements) { + var t1; + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + this.remove$1(0, t1.get$current(t1)); + }, + difference$1(other) { + var t1, t2, element, + result = this.toSet$0(0); + for (t1 = this.get$iterator(this), t2 = other._source; t1.moveNext$0();) { + element = t1.get$current(t1); + if (t2.contains$1(0, element)) + result.remove$1(0, element); + } + return result; + }, + toList$1$growable(_, growable) { + return A.List_List$of(this, true, A._instanceType(this)._precomputed1); + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + map$1$1(_, f, $T) { + return new A.EfficientLengthMappedIterable(this, f, A._instanceType(this)._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); + }, + get$single(_) { + var it, _this = this; + if (_this.get$length(_this) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + it = _this.get$iterator(_this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + where$1(_, f) { + return new A.WhereIterable(this, f, A._instanceType(this)._eval$1("WhereIterable<1>")); + }, + forEach$1(_, f) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + f.call$1(t1.get$current(t1)); + }, + every$1(_, f) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (!f.call$1(t1.get$current(t1))) + return false; + return true; + }, + any$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (test.call$1(t1.get$current(t1))) + return true; + return false; + }, + take$1(_, n) { + return A.TakeIterable_TakeIterable(this, n, A._instanceType(this)._precomputed1); + }, + skip$1(_, n) { + return A.SkipIterable_SkipIterable(this, n, A._instanceType(this)._precomputed1); + }, + get$first(_) { + var it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + get$last(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + do + result = it.get$current(it); + while (it.moveNext$0()); + return result; + }, + elementAt$1(_, index) { + var iterator, skipCount; + A.RangeError_checkNotNegative(index, "index"); + iterator = this.get$iterator(this); + for (skipCount = index; iterator.moveNext$0();) { + if (skipCount === 0) + return iterator.get$current(iterator); + --skipCount; + } + throw A.wrapException(A.IndexError$withLength(index, index - skipCount, this, null, "index")); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isSet: 1 + }; + A._SetBase.prototype = { + difference$1(other) { + var t1, t2, t3, element, _this = this, + result = _this._newSet$0(); + for (t1 = A._LinkedHashSetIterator$(_this, _this._modifications, A._instanceType(_this)._precomputed1), t2 = other._source, t3 = t1.$ti._precomputed1; t1.moveNext$0();) { + element = t1._collection$_current; + if (element == null) + element = t3._as(element); + if (!t2.contains$1(0, element)) + result.add$1(0, element); + } + return result; + }, + intersection$1(other) { + var t1, t2, t3, element, _this = this, + result = _this._newSet$0(); + for (t1 = A._LinkedHashSetIterator$(_this, _this._modifications, A._instanceType(_this)._precomputed1), t2 = other._baseMap, t3 = t1.$ti._precomputed1; t1.moveNext$0();) { + element = t1._collection$_current; + if (element == null) + element = t3._as(element); + if (t2.containsKey$1(element)) + result.add$1(0, element); + } + return result; + }, + toSet$0(_) { + var t1 = this._newSet$0(); + t1.addAll$1(0, this); + return t1; + } + }; + A._UnmodifiableSetMixin.prototype = { + add$1(_, value) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + }, + addAll$1(_, elements) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + }, + remove$1(_, value) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + } + }; + A.UnmodifiableSetView.prototype = { + contains$1(_, element) { + return this._collection$_source.contains$1(0, element); + }, + get$length(_) { + return this._collection$_source._collection$_length; + }, + get$iterator(_) { + var t1 = this._collection$_source; + return A._LinkedHashSetIterator$(t1, t1._modifications, A._instanceType(t1)._precomputed1); + }, + toSet$0(_) { + return this._collection$_source.toSet$0(0); + } + }; + A._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; + A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin.prototype = {}; + A._JsonMap.prototype = { + $index(_, key) { + var result, + t1 = this._processed; + if (t1 == null) + return this._data.$index(0, key); + else if (typeof key != "string") + return null; + else { + result = t1[key]; + return typeof result == "undefined" ? this._process$1(key) : result; + } + }, + get$length(_) { + return this._processed == null ? this._data.__js_helper$_length : this._convert$_computeKeys$0().length; + }, + get$isEmpty(_) { + return this.get$length(0) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(0) > 0; + }, + get$keys(_) { + var t1; + if (this._processed == null) { + t1 = this._data; + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); + } + return new A._JsonMapKeyIterable(this); + }, + get$values(_) { + var _this = this; + if (_this._processed == null) + return _this._data.get$values(0); + return A.MappedIterable_MappedIterable(_this._convert$_computeKeys$0(), new A._JsonMap_values_closure(_this), type$.String, type$.dynamic); + }, + $indexSet(_, key, value) { + var processed, original, _this = this; + if (_this._processed == null) + _this._data.$indexSet(0, key, value); + else if (_this.containsKey$1(key)) { + processed = _this._processed; + processed[key] = value; + original = _this._original; + if (original == null ? processed != null : original !== processed) + original[key] = null; + } else + _this._upgrade$0().$indexSet(0, key, value); + }, + addAll$1(_, other) { + other.forEach$1(0, new A._JsonMap_addAll_closure(this)); + }, + containsKey$1(key) { + if (this._processed == null) + return this._data.containsKey$1(key); + if (typeof key != "string") + return false; + return Object.prototype.hasOwnProperty.call(this._original, key); + }, + remove$1(_, key) { + if (this._processed != null && !this.containsKey$1(key)) + return null; + return this._upgrade$0().remove$1(0, key); + }, + forEach$1(_, f) { + var keys, i, key, value, _this = this; + if (_this._processed == null) + return _this._data.forEach$1(0, f); + keys = _this._convert$_computeKeys$0(); + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + value = _this._processed[key]; + if (typeof value == "undefined") { + value = A._convertJsonToDartLazy(_this._original[key]); + _this._processed[key] = value; + } + f.call$2(key, value); + if (keys !== _this._data) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + }, + _convert$_computeKeys$0() { + var keys = this._data; + if (keys == null) + keys = this._data = A._setArrayType(Object.keys(this._original), type$.JSArray_String); + return keys; + }, + _upgrade$0() { + var result, keys, i, t1, key, _this = this; + if (_this._processed == null) + return _this._data; + result = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic); + keys = _this._convert$_computeKeys$0(); + for (i = 0; t1 = keys.length, i < t1; ++i) { + key = keys[i]; + result.$indexSet(0, key, _this.$index(0, key)); + } + if (t1 === 0) + keys.push(""); + else + B.JSArray_methods.clear$0(keys); + _this._original = _this._processed = null; + return _this._data = result; + }, + _process$1(key) { + var result; + if (!Object.prototype.hasOwnProperty.call(this._original, key)) + return null; + result = A._convertJsonToDartLazy(this._original[key]); + return this._processed[key] = result; + } + }; + A._JsonMap_values_closure.prototype = { + call$1(each) { + return this.$this.$index(0, each); + }, + $signature: 171 + }; + A._JsonMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature: 138 + }; + A._JsonMapKeyIterable.prototype = { + get$length(_) { + return this._convert$_parent.get$length(0); + }, + elementAt$1(_, index) { + var t1 = this._convert$_parent; + return t1._processed == null ? t1.get$keys(0).elementAt$1(0, index) : t1._convert$_computeKeys$0()[index]; + }, + get$iterator(_) { + var t1 = this._convert$_parent; + if (t1._processed == null) { + t1 = t1.get$keys(0); + t1 = t1.get$iterator(t1); + } else { + t1 = t1._convert$_computeKeys$0(); + t1 = new J.ArrayIterator(t1, t1.length, A._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); + } + return t1; + }, + contains$1(_, key) { + return this._convert$_parent.containsKey$1(key); + } + }; + A._Utf8Decoder__decoder_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: true}); + return t1; + } catch (exception) { + } + return null; + }, + $signature: 57 + }; + A._Utf8Decoder__decoderNonfatal_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: false}); + return t1; + } catch (exception) { + } + return null; + }, + $signature: 57 + }; + A.AsciiCodec.prototype = { + encode$1(source) { + return B.AsciiEncoder_127.convert$1(source); + } + }; + A._UnicodeSubsetEncoder.prototype = { + convert$1(string) { + var t1, i, codeUnit, + end = A.RangeError_checkValidRange(0, null, string.length), + result = new Uint8Array(end); + for (t1 = ~this._subsetMask, i = 0; i < end; ++i) { + codeUnit = string.charCodeAt(i); + if ((codeUnit & t1) !== 0) + throw A.wrapException(A.ArgumentError$value(string, "string", "Contains invalid characters.")); + result[i] = codeUnit; + } + return result; + } + }; + A.AsciiEncoder.prototype = {}; + A.Base64Codec.prototype = { + normalize$3(source, start, end) { + var inverseAlphabet, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t1, t2, endLength, $length, + _s31_ = "Invalid base64 encoding length "; + end = A.RangeError_checkValidRange(start, end, source.length); + inverseAlphabet = $.$get$_Base64Decoder__inverseAlphabet(); + for (i = start, sliceStart = i, buffer = null, firstPadding = -1, firstPaddingSourceIndex = -1, paddingCount = 0; i < end; i = i0) { + i0 = i + 1; + char = source.charCodeAt(i); + if (char === 37) { + i1 = i0 + 2; + if (i1 <= end) { + digit1 = A.hexDigitValue(source.charCodeAt(i0)); + digit2 = A.hexDigitValue(source.charCodeAt(i0 + 1)); + char0 = digit1 * 16 + digit2 - (digit2 & 256); + if (char0 === 37) + char0 = -1; + i0 = i1; + } else + char0 = -1; + } else + char0 = char; + if (0 <= char0 && char0 <= 127) { + value = inverseAlphabet[char0]; + if (value >= 0) { + char0 = string$.ABCDEF.charCodeAt(value); + if (char0 === char) + continue; + char = char0; + } else { + if (value === -1) { + if (firstPadding < 0) { + t1 = buffer == null ? null : buffer._contents.length; + if (t1 == null) + t1 = 0; + firstPadding = t1 + (i - sliceStart); + firstPaddingSourceIndex = i; + } + ++paddingCount; + if (char === 61) + continue; + } + char = char0; + } + if (value !== -2) { + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += B.JSString_methods.substring$2(source, sliceStart, i); + t2 = A.Primitives_stringFromCharCode(char); + t1._contents += t2; + sliceStart = i0; + continue; + } + } + throw A.wrapException(A.FormatException$("Invalid base64 data", source, i)); + } + if (buffer != null) { + t1 = B.JSString_methods.substring$2(source, sliceStart, end); + t1 = buffer._contents += t1; + t2 = t1.length; + if (firstPadding >= 0) + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, t2); + else { + endLength = B.JSInt_methods.$mod(t2 - 1, 4) + 1; + if (endLength === 1) + throw A.wrapException(A.FormatException$(_s31_, source, end)); + for (; endLength < 4;) { + t1 += "="; + buffer._contents = t1; + ++endLength; + } + } + t1 = buffer._contents; + return B.JSString_methods.replaceRange$3(source, start, end, t1.charCodeAt(0) == 0 ? t1 : t1); + } + $length = end - start; + if (firstPadding >= 0) + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, $length); + else { + endLength = B.JSInt_methods.$mod($length, 4); + if (endLength === 1) + throw A.wrapException(A.FormatException$(_s31_, source, end)); + if (endLength > 1) + source = B.JSString_methods.replaceRange$3(source, end, end, endLength === 2 ? "==" : "="); + } + return source; + } + }; + A.Base64Encoder.prototype = { + startChunkedConversion$1(sink) { + return new A._Utf8Base64EncoderSink(new A._Utf8StringSinkAdapter(new A._Utf8Decoder(false), sink, sink._stringSink), new A._Base64Encoder(string$.ABCDEF)); + } + }; + A._Base64Encoder.prototype = { + createBuffer$1(bufferLength) { + return new Uint8Array(bufferLength); + }, + encode$4(bytes, start, end, isLast) { + var output, _this = this, + byteCount = (_this._convert$_state & 3) + (end - start), + fullChunks = B.JSInt_methods._tdivFast$1(byteCount, 3), + bufferLength = fullChunks * 4; + if (isLast && byteCount - fullChunks * 3 > 0) + bufferLength += 4; + output = _this.createBuffer$1(bufferLength); + _this._convert$_state = A._Base64Encoder_encodeChunk(_this._alphabet, bytes, start, end, isLast, output, 0, _this._convert$_state); + if (bufferLength > 0) + return output; + return null; + } + }; + A._Base64EncoderSink.prototype = {}; + A._Utf8Base64EncoderSink.prototype = { + _convert$_add$4(source, start, end, isLast) { + var buffer = this._encoder.encode$4(source, start, end, isLast); + if (buffer != null) + this._sink.addSlice$4(buffer, 0, buffer.length, isLast); + } + }; + A.ByteConversionSink.prototype = {}; + A.Codec.prototype = {}; + A.Converter.prototype = {}; + A.Encoding.prototype = {}; + A.JsonUnsupportedObjectError.prototype = { + toString$0(_) { + var safeString = A.Error_safeToString(this.unsupportedObject); + return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString; + } + }; + A.JsonCyclicError.prototype = { + toString$0(_) { + return "Cyclic error in JSON stringify"; + } + }; + A.JsonCodec.prototype = { + decode$1(source) { + var t1 = A._parseJson(source, this.get$decoder()._reviver); + return t1; + }, + encode$2$toEncodable(value, toEncodable) { + var t1 = A._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); + return t1; + }, + get$encoder() { + return B.JsonEncoder_null; + }, + get$decoder() { + return B.JsonDecoder_null; + } + }; + A.JsonEncoder.prototype = {}; + A.JsonDecoder.prototype = {}; + A._JsonStringifier.prototype = { + writeStringContent$1(s) { + var offset, i, charCode, t1, t2, _this = this, + $length = s.length; + for (offset = 0, i = 0; i < $length; ++i) { + charCode = s.charCodeAt(i); + if (charCode > 92) { + if (charCode >= 55296) { + t1 = charCode & 64512; + if (t1 === 55296) { + t2 = i + 1; + t2 = !(t2 < $length && (s.charCodeAt(t2) & 64512) === 56320); + } else + t2 = false; + if (!t2) + if (t1 === 56320) { + t1 = i - 1; + t1 = !(t1 >= 0 && (s.charCodeAt(t1) & 64512) === 55296); + } else + t1 = false; + else + t1 = true; + if (t1) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + _this.writeCharCode$1(117); + _this.writeCharCode$1(100); + t1 = charCode >>> 8 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + } + } + continue; + } + if (charCode < 32) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + switch (charCode) { + case 8: + _this.writeCharCode$1(98); + break; + case 9: + _this.writeCharCode$1(116); + break; + case 10: + _this.writeCharCode$1(110); + break; + case 12: + _this.writeCharCode$1(102); + break; + case 13: + _this.writeCharCode$1(114); + break; + default: + _this.writeCharCode$1(117); + _this.writeCharCode$1(48); + _this.writeCharCode$1(48); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + break; + } + } else if (charCode === 34 || charCode === 92) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + _this.writeCharCode$1(charCode); + } + } + if (offset === 0) + _this.writeString$1(s); + else if (offset < $length) + _this.writeStringSlice$3(s, offset, $length); + }, + _checkCycle$1(object) { + var t1, t2, i, t3; + for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { + t3 = t1[i]; + if (object == null ? t3 == null : object === t3) + throw A.wrapException(new A.JsonCyclicError(object, null)); + } + t1.push(object); + }, + writeObject$1(object) { + var customJson, e, t1, exception, _this = this; + if (_this.writeJsonValue$1(object)) + return; + _this._checkCycle$1(object); + try { + customJson = _this._toEncodable.call$1(object); + if (!_this.writeJsonValue$1(customJson)) { + t1 = A.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); + throw A.wrapException(t1); + } + _this._seen.pop(); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); + throw A.wrapException(t1); + } + }, + writeJsonValue$1(object) { + var success, _this = this; + if (typeof object == "number") { + if (!isFinite(object)) + return false; + _this.writeNumber$1(object); + return true; + } else if (object === true) { + _this.writeString$1("true"); + return true; + } else if (object === false) { + _this.writeString$1("false"); + return true; + } else if (object == null) { + _this.writeString$1("null"); + return true; + } else if (typeof object == "string") { + _this.writeString$1('"'); + _this.writeStringContent$1(object); + _this.writeString$1('"'); + return true; + } else if (type$.List_dynamic._is(object)) { + _this._checkCycle$1(object); + _this.writeList$1(object); + _this._seen.pop(); + return true; + } else if (type$.Map_dynamic_dynamic._is(object)) { + _this._checkCycle$1(object); + success = _this.writeMap$1(object); + _this._seen.pop(); + return success; + } else + return false; + }, + writeList$1(list) { + var t1, i, _this = this; + _this.writeString$1("["); + t1 = J.getInterceptor$asx(list); + if (t1.get$isNotEmpty(list)) { + _this.writeObject$1(t1.$index(list, 0)); + for (i = 1; i < t1.get$length(list); ++i) { + _this.writeString$1(","); + _this.writeObject$1(t1.$index(list, i)); + } + } + _this.writeString$1("]"); + }, + writeMap$1(map) { + var t1, keyValueList, i, separator, _this = this, _box_0 = {}; + if (map.get$isEmpty(map)) { + _this.writeString$1("{}"); + return true; + } + t1 = map.get$length(map) * 2; + keyValueList = A.List_List$filled(t1, null, false, type$.nullable_Object); + i = _box_0.i = 0; + _box_0.allStringKeys = true; + map.forEach$1(0, new A._JsonStringifier_writeMap_closure(_box_0, keyValueList)); + if (!_box_0.allStringKeys) + return false; + _this.writeString$1("{"); + for (separator = '"'; i < t1; i += 2, separator = ',"') { + _this.writeString$1(separator); + _this.writeStringContent$1(A._asString(keyValueList[i])); + _this.writeString$1('":'); + _this.writeObject$1(keyValueList[i + 1]); + } + _this.writeString$1("}"); + return true; + } + }; + A._JsonStringifier_writeMap_closure.prototype = { + call$2(key, value) { + var t1, t2, t3, i; + if (typeof key != "string") + this._box_0.allStringKeys = false; + t1 = this.keyValueList; + t2 = this._box_0; + t3 = t2.i; + i = t2.i = t3 + 1; + t1[t3] = key; + t2.i = i + 1; + t1[i] = value; + }, + $signature: 169 + }; + A._JsonStringStringifier.prototype = { + get$_partialResult() { + var t1 = this._sink._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + writeNumber$1(number) { + var t1 = this._sink, + t2 = B.JSNumber_methods.toString$0(number); + t1._contents += t2; + }, + writeString$1(string) { + this._sink._contents += string; + }, + writeStringSlice$3(string, start, end) { + this._sink._contents += B.JSString_methods.substring$2(string, start, end); + }, + writeCharCode$1(charCode) { + var t1 = this._sink, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + } + }; + A.StringConversionSink.prototype = {}; + A._StringSinkConversionSink.prototype = { + close$0(_) { + } + }; + A._StringCallbackSink.prototype = { + close$0(_) { + var t1 = this._stringSink, + t2 = t1._contents; + t1._contents = ""; + this._convert$_callback.call$1(t2.charCodeAt(0) == 0 ? t2 : t2); + }, + asUtf8Sink$1(allowMalformed) { + return new A._Utf8StringSinkAdapter(new A._Utf8Decoder(allowMalformed), this, this._stringSink); + } + }; + A._Utf8StringSinkAdapter.prototype = { + close$0(_) { + this._decoder.flush$1(this._stringSink); + this._sink.close$0(0); + }, + add$1(_, chunk) { + this.addSlice$4(chunk, 0, J.get$length$asx(chunk), false); + }, + addSlice$4(codeUnits, startIndex, endIndex, isLast) { + var t1 = this._stringSink, + t2 = this._decoder._convertGeneral$4(codeUnits, startIndex, endIndex, false); + t1._contents += t2; + if (isLast) + this.close$0(0); + } + }; + A.Utf8Codec.prototype = { + encode$1(string) { + return B.C_Utf8Encoder.convert$1(string); + } + }; + A.Utf8Encoder.prototype = { + convert$1(string) { + var t1, encoder, + end = A.RangeError_checkValidRange(0, null, string.length); + if (end === 0) + return new Uint8Array(0); + t1 = new Uint8Array(end * 3); + encoder = new A._Utf8Encoder(t1); + if (encoder._fillBuffer$3(string, 0, end) !== end) + encoder._writeReplacementCharacter$0(); + return B.NativeUint8List_methods.sublist$2(t1, 0, encoder._bufferIndex); + } + }; + A._Utf8Encoder.prototype = { + _writeReplacementCharacter$0() { + var _this = this, + t1 = _this._buffer, + t2 = _this._bufferIndex, + t3 = _this._bufferIndex = t2 + 1; + t1[t2] = 239; + t2 = _this._bufferIndex = t3 + 1; + t1[t3] = 191; + _this._bufferIndex = t2 + 1; + t1[t2] = 189; + }, + _writeSurrogate$2(leadingSurrogate, nextCodeUnit) { + var rune, t1, t2, t3, _this = this; + if ((nextCodeUnit & 64512) === 56320) { + rune = 65536 + ((leadingSurrogate & 1023) << 10) | nextCodeUnit & 1023; + t1 = _this._buffer; + t2 = _this._bufferIndex; + t3 = _this._bufferIndex = t2 + 1; + t1[t2] = rune >>> 18 | 240; + t2 = _this._bufferIndex = t3 + 1; + t1[t3] = rune >>> 12 & 63 | 128; + t3 = _this._bufferIndex = t2 + 1; + t1[t2] = rune >>> 6 & 63 | 128; + _this._bufferIndex = t3 + 1; + t1[t3] = rune & 63 | 128; + return true; + } else { + _this._writeReplacementCharacter$0(); + return false; + } + }, + _fillBuffer$3(str, start, end) { + var t1, t2, stringIndex, codeUnit, t3, stringIndex0, t4, _this = this; + if (start !== end && (str.charCodeAt(end - 1) & 64512) === 55296) + --end; + for (t1 = _this._buffer, t2 = t1.length, stringIndex = start; stringIndex < end; ++stringIndex) { + codeUnit = str.charCodeAt(stringIndex); + if (codeUnit <= 127) { + t3 = _this._bufferIndex; + if (t3 >= t2) + break; + _this._bufferIndex = t3 + 1; + t1[t3] = codeUnit; + } else { + t3 = codeUnit & 64512; + if (t3 === 55296) { + if (_this._bufferIndex + 4 > t2) + break; + stringIndex0 = stringIndex + 1; + if (_this._writeSurrogate$2(codeUnit, str.charCodeAt(stringIndex0))) + stringIndex = stringIndex0; + } else if (t3 === 56320) { + if (_this._bufferIndex + 3 > t2) + break; + _this._writeReplacementCharacter$0(); + } else if (codeUnit <= 2047) { + t3 = _this._bufferIndex; + t4 = t3 + 1; + if (t4 >= t2) + break; + _this._bufferIndex = t4; + t1[t3] = codeUnit >>> 6 | 192; + _this._bufferIndex = t4 + 1; + t1[t4] = codeUnit & 63 | 128; + } else { + t3 = _this._bufferIndex; + if (t3 + 2 >= t2) + break; + t4 = _this._bufferIndex = t3 + 1; + t1[t3] = codeUnit >>> 12 | 224; + t3 = _this._bufferIndex = t4 + 1; + t1[t4] = codeUnit >>> 6 & 63 | 128; + _this._bufferIndex = t3 + 1; + t1[t3] = codeUnit & 63 | 128; + } + } + } + return stringIndex; + } + }; + A.Utf8Decoder.prototype = { + convert$1(codeUnits) { + return new A._Utf8Decoder(this._allowMalformed)._convertGeneral$4(codeUnits, 0, null, true); + } + }; + A._Utf8Decoder.prototype = { + _convertGeneral$4(codeUnits, start, maybeEnd, single) { + var casted, bytes, errorOffset, t1, result, message, _this = this, + end = A.RangeError_checkValidRange(start, maybeEnd, J.get$length$asx(codeUnits)); + if (start === end) + return ""; + if (codeUnits instanceof Uint8Array) { + casted = codeUnits; + bytes = casted; + errorOffset = 0; + } else { + bytes = A._Utf8Decoder__makeNativeUint8List(codeUnits, start, end); + end -= start; + errorOffset = start; + start = 0; + } + if (single && end - start >= 15) { + t1 = _this.allowMalformed; + result = A._Utf8Decoder__convertInterceptedUint8List(t1, bytes, start, end); + if (result != null) { + if (!t1) + return result; + if (result.indexOf("\ufffd") < 0) + return result; + } + } + result = _this._decodeRecursive$4(bytes, start, end, single); + t1 = _this._convert$_state; + if ((t1 & 1) !== 0) { + message = A._Utf8Decoder_errorDescription(t1); + _this._convert$_state = 0; + throw A.wrapException(A.FormatException$(message, codeUnits, errorOffset + _this._charOrIndex)); + } + return result; + }, + _decodeRecursive$4(bytes, start, end, single) { + var mid, s1, _this = this; + if (end - start > 1000) { + mid = B.JSInt_methods._tdivFast$1(start + end, 2); + s1 = _this._decodeRecursive$4(bytes, start, mid, false); + if ((_this._convert$_state & 1) !== 0) + return s1; + return s1 + _this._decodeRecursive$4(bytes, mid, end, single); + } + return _this.decodeGeneral$4(bytes, start, end, single); + }, + flush$1(sink) { + var t1, + state = this._convert$_state; + this._convert$_state = 0; + if (state <= 32) + return; + if (this.allowMalformed) { + t1 = A.Primitives_stringFromCharCode(65533); + sink._contents += t1; + } else + throw A.wrapException(A.FormatException$(A._Utf8Decoder_errorDescription(77), null, null)); + }, + decodeGeneral$4(bytes, start, end, single) { + var t1, type, t2, i0, markEnd, i1, m, _this = this, _65533 = 65533, + state = _this._convert$_state, + char = _this._charOrIndex, + buffer = new A.StringBuffer(""), + i = start + 1, + byte = bytes[start]; + $label0$0: + for (t1 = _this.allowMalformed; true;) { + for (; true; i = i0) { + type = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHIHHHJEEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKCCCCCCCCCCCCDCLONNNMEEEEEEEEEEE".charCodeAt(byte) & 31; + char = state <= 32 ? byte & 61694 >>> type : (byte & 63 | char << 6) >>> 0; + state = " \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA".charCodeAt(state + type); + if (state === 0) { + t2 = A.Primitives_stringFromCharCode(char); + buffer._contents += t2; + if (i === end) + break $label0$0; + break; + } else if ((state & 1) !== 0) { + if (t1) + switch (state) { + case 69: + case 67: + t2 = A.Primitives_stringFromCharCode(_65533); + buffer._contents += t2; + break; + case 65: + t2 = A.Primitives_stringFromCharCode(_65533); + buffer._contents += t2; + --i; + break; + default: + t2 = A.Primitives_stringFromCharCode(_65533); + t2 = buffer._contents += t2; + buffer._contents = t2 + A.Primitives_stringFromCharCode(_65533); + break; + } + else { + _this._convert$_state = state; + _this._charOrIndex = i - 1; + return ""; + } + state = 0; + } + if (i === end) + break $label0$0; + i0 = i + 1; + byte = bytes[i]; + } + i0 = i + 1; + byte = bytes[i]; + if (byte < 128) { + while (true) { + if (!(i0 < end)) { + markEnd = end; + break; + } + i1 = i0 + 1; + byte = bytes[i0]; + if (byte >= 128) { + markEnd = i1 - 1; + i0 = i1; + break; + } + i0 = i1; + } + if (markEnd - i < 20) + for (m = i; m < markEnd; ++m) { + t2 = A.Primitives_stringFromCharCode(bytes[m]); + buffer._contents += t2; + } + else { + t2 = A.String_String$fromCharCodes(bytes, i, markEnd); + buffer._contents += t2; + } + if (markEnd === end) + break $label0$0; + i = i0; + } else + i = i0; + } + if (single && state > 32) + if (t1) { + t1 = A.Primitives_stringFromCharCode(_65533); + buffer._contents += t1; + } else { + _this._convert$_state = 77; + _this._charOrIndex = end; + return ""; + } + _this._convert$_state = state; + _this._charOrIndex = char; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.NoSuchMethodError_toString_closure.prototype = { + call$2(key, value) { + var t1 = this.sb, + t2 = this._box_0, + t3 = t1._contents += t2.comma; + t3 += key.__internal$_name; + t1._contents = t3; + t1._contents = t3 + ": "; + t3 = A.Error_safeToString(value); + t1._contents += t3; + t2.comma = ", "; + }, + $signature: 440 + }; + A.DateTime.prototype = { + $eq(_, other) { + var t1; + if (other == null) + return false; + t1 = false; + if (other instanceof A.DateTime) + if (this._value === other._value) + t1 = this._microsecond === other._microsecond; + return t1; + }, + get$hashCode(_) { + return A.Object_hash(this._value, this._microsecond, B.C_SentinelValue, B.C_SentinelValue); + }, + isAfter$1(other) { + var t1 = this._value, + t2 = other._value; + if (t1 <= t2) + t1 = t1 === t2 && this._microsecond > other._microsecond; + else + t1 = true; + return t1; + }, + compareTo$1(_, other) { + var r = B.JSInt_methods.compareTo$1(this._value, other._value); + if (r !== 0) + return r; + return B.JSInt_methods.compareTo$1(this._microsecond, other._microsecond); + }, + toString$0(_) { + var _this = this, + y = A.DateTime__fourDigits(A.Primitives_getYear(_this)), + m = A.DateTime__twoDigits(A.Primitives_getMonth(_this)), + d = A.DateTime__twoDigits(A.Primitives_getDay(_this)), + h = A.DateTime__twoDigits(A.Primitives_getHours(_this)), + min = A.DateTime__twoDigits(A.Primitives_getMinutes(_this)), + sec = A.DateTime__twoDigits(A.Primitives_getSeconds(_this)), + ms = A.DateTime__threeDigits(A.Primitives_getMilliseconds(_this)), + t1 = _this._microsecond, + us = t1 === 0 ? "" : A.DateTime__threeDigits(t1); + return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + us; + }, + $isComparable: 1 + }; + A.Duration.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Duration && this._duration === other._duration; + }, + get$hashCode(_) { + return B.JSInt_methods.get$hashCode(this._duration); + }, + compareTo$1(_, other) { + return B.JSInt_methods.compareTo$1(this._duration, other._duration); + }, + toString$0(_) { + var sign, minutes, minutesPadding, seconds, secondsPadding, + microseconds = this._duration, + hours = B.JSInt_methods._tdivFast$1(microseconds, 3600000000), + microseconds0 = microseconds % 3600000000; + if (microseconds < 0) { + hours = 0 - hours; + microseconds = 0 - microseconds0; + sign = "-"; + } else { + microseconds = microseconds0; + sign = ""; + } + minutes = B.JSInt_methods._tdivFast$1(microseconds, 60000000); + microseconds %= 60000000; + minutesPadding = minutes < 10 ? "0" : ""; + seconds = B.JSInt_methods._tdivFast$1(microseconds, 1000000); + secondsPadding = seconds < 10 ? "0" : ""; + return sign + hours + ":" + minutesPadding + minutes + ":" + secondsPadding + seconds + "." + B.JSString_methods.padLeft$2(B.JSInt_methods.toString$0(microseconds % 1000000), 6, "0"); + }, + $isComparable: 1 + }; + A._Enum.prototype = { + toString$0(_) { + return this._enumToString$0(); + } + }; + A.Error.prototype = { + get$stackTrace() { + return A.Primitives_extractStackTrace(this); + } + }; + A.AssertionError.prototype = { + toString$0(_) { + var t1 = this.message; + if (t1 != null) + return "Assertion failed: " + A.Error_safeToString(t1); + return "Assertion failed"; + }, + get$message(receiver) { + return this.message; + } + }; + A.TypeError.prototype = {}; + A.ArgumentError.prototype = { + get$_errorName() { + return "Invalid argument" + (!this._hasValue ? "(s)" : ""); + }, + get$_errorExplanation() { + return ""; + }, + toString$0(_) { + var _this = this, + $name = _this.name, + nameString = $name == null ? "" : " (" + $name + ")", + message = _this.message, + messageString = message == null ? "" : ": " + A.S(message), + prefix = _this.get$_errorName() + nameString + messageString; + if (!_this._hasValue) + return prefix; + return prefix + _this.get$_errorExplanation() + ": " + A.Error_safeToString(_this.get$invalidValue()); + }, + get$invalidValue() { + return this.invalidValue; + }, + get$message(receiver) { + return this.message; + } + }; + A.RangeError.prototype = { + get$invalidValue() { + return this.invalidValue; + }, + get$_errorName() { + return "RangeError"; + }, + get$_errorExplanation() { + var explanation, + start = this.start, + end = this.end; + if (start == null) + explanation = end != null ? ": Not less than or equal to " + A.S(end) : ""; + else if (end == null) + explanation = ": Not greater than or equal to " + A.S(start); + else if (end > start) + explanation = ": Not in inclusive range " + A.S(start) + ".." + A.S(end); + else + explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + A.S(start); + return explanation; + } + }; + A.IndexError.prototype = { + get$invalidValue() { + return this.invalidValue; + }, + get$_errorName() { + return "RangeError"; + }, + get$_errorExplanation() { + if (this.invalidValue < 0) + return ": index must not be negative"; + var t1 = this.length; + if (t1 === 0) + return ": no indices are valid"; + return ": index should be less than " + t1; + }, + $isRangeError: 1, + get$length(receiver) { + return this.length; + } + }; + A.NoSuchMethodError.prototype = { + toString$0(_) { + var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, + sb = new A.StringBuffer(""); + _box_0.comma = ""; + $arguments = _this._core$_arguments; + for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { + argument = $arguments[_i]; + sb._contents = t2 + t3; + t2 = A.Error_safeToString(argument); + t2 = sb._contents += t2; + _box_0.comma = ", "; + } + _this._namedArguments.forEach$1(0, new A.NoSuchMethodError_toString_closure(_box_0, sb)); + receiverText = A.Error_safeToString(_this._core$_receiver); + actualParameters = sb.toString$0(0); + return "NoSuchMethodError: method not found: '" + _this._memberName.__internal$_name + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; + } + }; + A.UnsupportedError.prototype = { + toString$0(_) { + return "Unsupported operation: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.UnimplementedError.prototype = { + toString$0(_) { + return "UnimplementedError: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.StateError.prototype = { + toString$0(_) { + return "Bad state: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.ConcurrentModificationError.prototype = { + toString$0(_) { + var t1 = this.modifiedObject; + if (t1 == null) + return "Concurrent modification during iteration."; + return "Concurrent modification during iteration: " + A.Error_safeToString(t1) + "."; + } + }; + A.OutOfMemoryError.prototype = { + toString$0(_) { + return "Out of Memory"; + }, + get$stackTrace() { + return null; + }, + $isError: 1 + }; + A.StackOverflowError.prototype = { + toString$0(_) { + return "Stack Overflow"; + }, + get$stackTrace() { + return null; + }, + $isError: 1 + }; + A._Exception.prototype = { + toString$0(_) { + return "Exception: " + this.message; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.FormatException.prototype = { + toString$0(_) { + var t1, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, prefix, postfix, end, start, + message = this.message, + report = "" !== message ? "FormatException: " + message : "FormatException", + offset = this.offset, + source = this.source; + if (typeof source == "string") { + if (offset != null) + t1 = offset < 0 || offset > source.length; + else + t1 = false; + if (t1) + offset = null; + if (offset == null) { + if (source.length > 78) + source = B.JSString_methods.substring$2(source, 0, 75) + "..."; + return report + "\n" + source; + } + for (lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { + char = source.charCodeAt(i); + if (char === 10) { + if (lineStart !== i || !previousCharWasCR) + ++lineNum; + lineStart = i + 1; + previousCharWasCR = false; + } else if (char === 13) { + ++lineNum; + lineStart = i + 1; + previousCharWasCR = true; + } + } + report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n"); + lineEnd = source.length; + for (i = offset; i < lineEnd; ++i) { + char = source.charCodeAt(i); + if (char === 10 || char === 13) { + lineEnd = i; + break; + } + } + prefix = ""; + if (lineEnd - lineStart > 78) { + postfix = "..."; + if (offset - lineStart < 75) { + end = lineStart + 75; + start = lineStart; + } else { + if (lineEnd - offset < 75) { + start = lineEnd - 75; + end = lineEnd; + postfix = ""; + } else { + start = offset - 36; + end = offset + 36; + } + prefix = "..."; + } + } else { + end = lineEnd; + start = lineStart; + postfix = ""; + } + return report + prefix + B.JSString_methods.substring$2(source, start, end) + postfix + "\n" + B.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; + } else + return offset != null ? report + (" (at offset " + A.S(offset) + ")") : report; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.Iterable.prototype = { + cast$1$0(_, $R) { + return A.CastIterable_CastIterable(this, A._instanceType(this)._eval$1("Iterable.E"), $R); + }, + followedBy$1(_, other) { + var _this = this, + t1 = A._instanceType(_this); + if (t1._eval$1("EfficientLengthIterable")._is(_this)) + return A.FollowedByIterable_FollowedByIterable$firstEfficient(_this, other, t1._eval$1("Iterable.E")); + return new A.FollowedByIterable(_this, other, t1._eval$1("FollowedByIterable")); + }, + map$1$1(_, toElement, $T) { + return A.MappedIterable_MappedIterable(this, toElement, A._instanceType(this)._eval$1("Iterable.E"), $T); + }, + where$1(_, test) { + return new A.WhereIterable(this, test, A._instanceType(this)._eval$1("WhereIterable")); + }, + expand$1$1(_, toElements, $T) { + return new A.ExpandIterable(this, toElements, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + contains$1(_, element) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (J.$eq$(t1.get$current(t1), element)) + return true; + return false; + }, + forEach$1(_, action) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + action.call$1(t1.get$current(t1)); + }, + fold$1$2(_, initialValue, combine) { + var t1, value; + for (t1 = this.get$iterator(this), value = initialValue; t1.moveNext$0();) + value = combine.call$2(value, t1.get$current(t1)); + return value; + }, + fold$2(_, initialValue, combine) { + return this.fold$1$2(0, initialValue, combine, type$.dynamic); + }, + every$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (!test.call$1(t1.get$current(t1))) + return false; + return true; + }, + join$1(_, separator) { + var first, t1, + iterator = this.get$iterator(this); + if (!iterator.moveNext$0()) + return ""; + first = J.toString$0$(iterator.get$current(iterator)); + if (!iterator.moveNext$0()) + return first; + if (separator.length === 0) { + t1 = first; + do + t1 += A.S(J.toString$0$(iterator.get$current(iterator))); + while (iterator.moveNext$0()); + } else { + t1 = first; + do + t1 = t1 + separator + A.S(J.toString$0$(iterator.get$current(iterator))); + while (iterator.moveNext$0()); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + any$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (test.call$1(t1.get$current(t1))) + return true; + return false; + }, + toList$1$growable(_, growable) { + return A.List_List$of(this, growable, A._instanceType(this)._eval$1("Iterable.E")); + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$of(this, A._instanceType(this)._eval$1("Iterable.E")); + }, + get$length(_) { + var count, + it = this.get$iterator(this); + for (count = 0; it.moveNext$0();) + ++count; + return count; + }, + get$isEmpty(_) { + return !this.get$iterator(this).moveNext$0(); + }, + get$isNotEmpty(_) { + return !this.get$isEmpty(this); + }, + take$1(_, count) { + return A.TakeIterable_TakeIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); + }, + skip$1(_, count) { + return A.SkipIterable_SkipIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); + }, + skipWhile$1(_, test) { + return new A.SkipWhileIterable(this, test, A._instanceType(this)._eval$1("SkipWhileIterable")); + }, + get$first(_) { + var it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + get$last(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + do + result = it.get$current(it); + while (it.moveNext$0()); + return result; + }, + get$single(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + result = it.get$current(it); + if (it.moveNext$0()) + throw A.wrapException(A.IterableElementError_tooMany()); + return result; + }, + elementAt$1(_, index) { + var iterator, skipCount; + A.RangeError_checkNotNegative(index, "index"); + iterator = this.get$iterator(this); + for (skipCount = index; iterator.moveNext$0();) { + if (skipCount === 0) + return iterator.get$current(iterator); + --skipCount; + } + throw A.wrapException(A.IndexError$withLength(index, index - skipCount, this, null, "index")); + }, + toString$0(_) { + return A.Iterable_iterableToShortString(this, "(", ")"); + } + }; + A._GeneratorIterable.prototype = { + elementAt$1(_, index) { + A.IndexError_check(index, this.length, this, null, null); + return this._generator.call$1(index); + }, + get$length(receiver) { + return this.length; + } + }; + A.MapEntry.prototype = { + toString$0(_) { + return "MapEntry(" + A.S(this.key) + ": " + A.S(this.value) + ")"; + } + }; + A.Null.prototype = { + get$hashCode(_) { + return A.Object.prototype.get$hashCode.call(this, 0); + }, + toString$0(_) { + return "null"; + } + }; + A.Object.prototype = {$isObject: 1, + $eq(_, other) { + return this === other; + }, + get$hashCode(_) { + return A.Primitives_objectHashCode(this); + }, + toString$0(_) { + return "Instance of '" + A.Primitives_objectTypeName(this) + "'"; + }, + noSuchMethod$1(_, invocation) { + throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, invocation)); + }, + get$runtimeType(_) { + return A.getRuntimeTypeOfDartObject(this); + }, + toString() { + return this.toString$0(this); + } + }; + A._StringStackTrace.prototype = { + toString$0(_) { + return this._stackTrace; + }, + $isStackTrace: 1 + }; + A.Runes.prototype = { + get$iterator(_) { + return new A.RuneIterator(this.string); + }, + get$last(_) { + var code, previousCode, + t1 = this.string, + t2 = t1.length; + if (t2 === 0) + throw A.wrapException(A.StateError$("No elements.")); + code = t1.charCodeAt(t2 - 1); + if ((code & 64512) === 56320 && t2 > 1) { + previousCode = t1.charCodeAt(t2 - 2); + if ((previousCode & 64512) === 55296) + return A._combineSurrogatePair(previousCode, code); + } + return code; + } + }; + A.RuneIterator.prototype = { + get$current(_) { + return this._currentCodePoint; + }, + moveNext$0() { + var codeUnit, nextPosition, nextCodeUnit, _this = this, + t1 = _this._position = _this._nextPosition, + t2 = _this.string, + t3 = t2.length; + if (t1 === t3) { + _this._currentCodePoint = -1; + return false; + } + codeUnit = t2.charCodeAt(t1); + nextPosition = t1 + 1; + if ((codeUnit & 64512) === 55296 && nextPosition < t3) { + nextCodeUnit = t2.charCodeAt(nextPosition); + if ((nextCodeUnit & 64512) === 56320) { + _this._nextPosition = nextPosition + 1; + _this._currentCodePoint = A._combineSurrogatePair(codeUnit, nextCodeUnit); + return true; + } + } + _this._nextPosition = nextPosition; + _this._currentCodePoint = codeUnit; + return true; + } + }; + A.StringBuffer.prototype = { + get$length(_) { + return this._contents.length; + }, + write$1(_, obj) { + var t1 = A.S(obj); + this._contents += t1; + }, + writeCharCode$1(charCode) { + var t1 = A.Primitives_stringFromCharCode(charCode); + this._contents += t1; + }, + toString$0(_) { + var t1 = this._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.Uri__parseIPv4Address_error.prototype = { + call$2(msg, position) { + throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); + }, + $signature: 539 + }; + A.Uri_parseIPv6Address_error.prototype = { + call$2(msg, position) { + throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); + }, + $signature: 275 + }; + A.Uri_parseIPv6Address_parseHex.prototype = { + call$2(start, end) { + var value; + if (end - start > 4) + this.error.call$2("an IPv6 part can only contain a maximum of 4 hex digits", start); + value = A.int_parse(B.JSString_methods.substring$2(this.host, start, end), 16); + if (value < 0 || value > 65535) + this.error.call$2("each part must be in the range of `0x0..0xFFFF`", start); + return value; + }, + $signature: 285 + }; + A._Uri.prototype = { + get$_text() { + var t1, t2, t3, t4, _this = this, + value = _this.___Uri__text_FI; + if (value === $) { + t1 = _this.scheme; + t2 = t1.length !== 0 ? "" + t1 + ":" : ""; + t3 = _this._host; + t4 = t3 == null; + if (!t4 || t1 === "file") { + t1 = t2 + "//"; + t2 = _this._userInfo; + if (t2.length !== 0) + t1 = t1 + t2 + "@"; + if (!t4) + t1 += t3; + t2 = _this._port; + if (t2 != null) + t1 = t1 + ":" + A.S(t2); + } else + t1 = t2; + t1 += _this.path; + t2 = _this._query; + if (t2 != null) + t1 = t1 + "?" + t2; + t2 = _this._fragment; + if (t2 != null) + t1 = t1 + "#" + t2; + value !== $ && A.throwUnnamedLateFieldADI(); + value = _this.___Uri__text_FI = t1.charCodeAt(0) == 0 ? t1 : t1; + } + return value; + }, + get$pathSegments() { + var pathToSplit, result, _this = this, + value = _this.___Uri_pathSegments_FI; + if (value === $) { + pathToSplit = _this.path; + if (pathToSplit.length !== 0 && pathToSplit.charCodeAt(0) === 47) + pathToSplit = B.JSString_methods.substring$1(pathToSplit, 1); + result = pathToSplit.length === 0 ? B.List_empty : A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(pathToSplit.split("/"), type$.JSArray_String), A.core_Uri_decodeComponent$closure(), type$.MappedListIterable_String_dynamic), type$.String); + _this.___Uri_pathSegments_FI !== $ && A.throwUnnamedLateFieldADI(); + value = _this.___Uri_pathSegments_FI = result; + } + return value; + }, + get$hashCode(_) { + var result, _this = this, + value = _this.___Uri_hashCode_FI; + if (value === $) { + result = B.JSString_methods.get$hashCode(_this.get$_text()); + _this.___Uri_hashCode_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.___Uri_hashCode_FI = result; + value = result; + } + return value; + }, + get$userInfo() { + return this._userInfo; + }, + get$host() { + var host = this._host; + if (host == null) + return ""; + if (B.JSString_methods.startsWith$1(host, "[")) + return B.JSString_methods.substring$2(host, 1, host.length - 1); + return host; + }, + get$port(_) { + var t1 = this._port; + return t1 == null ? A._Uri__defaultPort(this.scheme) : t1; + }, + get$query() { + var t1 = this._query; + return t1 == null ? "" : t1; + }, + get$fragment() { + var t1 = this._fragment; + return t1 == null ? "" : t1; + }, + isScheme$1(scheme) { + var thisScheme = this.scheme; + if (scheme.length !== thisScheme.length) + return false; + return A._caseInsensitiveCompareStart(scheme, thisScheme, 0) >= 0; + }, + replace$1$scheme(scheme) { + var isFile, userInfo, port, host, currentPath, t1, path, _this = this; + scheme = A._Uri__makeScheme(scheme, 0, scheme.length); + isFile = scheme === "file"; + userInfo = _this._userInfo; + port = _this._port; + if (scheme !== _this.scheme) + port = A._Uri__makePort(port, scheme); + host = _this._host; + if (!(host != null)) + host = userInfo.length !== 0 || port != null || isFile ? "" : null; + currentPath = _this.path; + if (!isFile) + t1 = host != null && currentPath.length !== 0; + else + t1 = true; + if (t1 && !B.JSString_methods.startsWith$1(currentPath, "/")) + currentPath = "/" + currentPath; + path = currentPath; + return A._Uri$_internal(scheme, userInfo, host, port, path, _this._query, _this._fragment); + }, + _mergePaths$2(base, reference) { + var backCount, refStart, baseEnd, newEnd, delta, t1, t2; + for (backCount = 0, refStart = 0; B.JSString_methods.startsWith$2(reference, "../", refStart);) { + refStart += 3; + ++backCount; + } + baseEnd = B.JSString_methods.lastIndexOf$1(base, "/"); + while (true) { + if (!(baseEnd > 0 && backCount > 0)) + break; + newEnd = B.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); + if (newEnd < 0) + break; + delta = baseEnd - newEnd; + t1 = delta !== 2; + t2 = false; + if (!t1 || delta === 3) + if (base.charCodeAt(newEnd + 1) === 46) + t1 = !t1 || base.charCodeAt(newEnd + 2) === 46; + else + t1 = t2; + else + t1 = t2; + if (t1) + break; + --backCount; + baseEnd = newEnd; + } + return B.JSString_methods.replaceRange$3(base, baseEnd + 1, null, B.JSString_methods.substring$1(reference, refStart - 3 * backCount)); + }, + resolve$1(_, reference) { + return this.resolveUri$1(A.Uri_parse(reference)); + }, + resolveUri$1(reference) { + var targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, split, packageNameEnd, packageName, mergedPath, t1, fragment, _this = this, _null = null; + if (reference.get$scheme().length !== 0) { + if (type$._PlatformUri._is(reference)) + return reference; + targetScheme = reference.get$scheme(); + if (reference.get$hasAuthority()) { + targetUserInfo = reference.get$userInfo(); + targetHost = reference.get$host(); + targetPort = reference.get$hasPort() ? reference.get$port(reference) : _null; + } else { + targetPort = _null; + targetHost = targetPort; + targetUserInfo = ""; + } + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + split = 0; + } else { + targetScheme = _this.scheme; + if (reference.get$hasAuthority()) { + if (type$._PlatformUri._is(reference)) + return reference.replace$1$scheme(targetScheme); + targetUserInfo = reference.get$userInfo(); + targetHost = reference.get$host(); + targetPort = A._Uri__makePort(reference.get$hasPort() ? reference.get$port(reference) : _null, targetScheme); + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + split = 1; + } else { + targetUserInfo = _this._userInfo; + targetHost = _this._host; + targetPort = _this._port; + targetPath = _this.path; + if (reference.get$hasEmptyPath()) + if (reference.get$hasQuery()) { + targetQuery = reference.get$query(); + split = 3; + } else { + targetQuery = _this._query; + split = 4; + } + else { + packageNameEnd = A._Uri__packageNameEnd(_this, targetPath); + if (packageNameEnd > 0) { + packageName = B.JSString_methods.substring$2(targetPath, 0, packageNameEnd); + targetPath = reference.get$hasAbsolutePath() ? packageName + A._Uri__removeDotSegments(reference.get$path(reference)) : packageName + A._Uri__removeDotSegments(_this._mergePaths$2(B.JSString_methods.substring$1(targetPath, packageName.length), reference.get$path(reference))); + } else if (reference.get$hasAbsolutePath()) + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + else if (targetPath.length === 0) + if (targetHost == null) + targetPath = targetScheme.length === 0 ? reference.get$path(reference) : A._Uri__removeDotSegments(reference.get$path(reference)); + else + targetPath = A._Uri__removeDotSegments("/" + reference.get$path(reference)); + else { + mergedPath = _this._mergePaths$2(targetPath, reference.get$path(reference)); + t1 = targetScheme.length === 0; + if (!t1 || targetHost != null || B.JSString_methods.startsWith$1(targetPath, "/")) + targetPath = A._Uri__removeDotSegments(mergedPath); + else + targetPath = A._Uri__normalizeRelativePath(mergedPath, !t1 || targetHost != null); + } + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + split = 2; + } + } + } + fragment = reference.get$hasFragment() ? reference.get$fragment() : _null; + if (!type$._PlatformUri._is(reference)) { + if (split === 0) + targetScheme = A._Uri__makeScheme(targetScheme, 0, targetScheme.length); + if (split <= 1) { + targetUserInfo = A._Uri__makeUserInfo(targetUserInfo, 0, targetUserInfo.length); + if (targetPort != null) + targetPort = A._Uri__makePort(targetPort, targetScheme); + if (targetHost != null && targetHost.length !== 0) + targetHost = A._Uri__makeHost(targetHost, 0, targetHost.length, false); + } + t1 = split <= 3; + if (t1) + targetPath = A._Uri__makePath(targetPath, 0, targetPath.length, _null, targetScheme, targetHost != null); + if (t1 && targetQuery != null) + targetQuery = A._Uri__makeQuery(targetQuery, 0, targetQuery.length, _null); + if (fragment != null) + fragment = A._Uri__makeFragment(fragment, 0, fragment.length); + } + return A._Uri$_internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, fragment); + }, + get$hasAuthority() { + return this._host != null; + }, + get$hasPort() { + return this._port != null; + }, + get$hasQuery() { + return this._query != null; + }, + get$hasFragment() { + return this._fragment != null; + }, + get$hasEmptyPath() { + return this.path.length === 0; + }, + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$1(this.path, "/"); + }, + toFilePath$0() { + var pathSegments, _this = this, + t1 = _this.scheme; + if (t1 !== "" && t1 !== "file") + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + t1 + " URI")); + t1 = _this._query; + if ((t1 == null ? "" : t1) !== "") + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + t1 = _this._fragment; + if ((t1 == null ? "" : t1) !== "") + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + t1 = $.$get$_Uri__isWindowsCached(); + if (t1) + t1 = A._Uri__toWindowsFilePath(_this); + else { + if (_this._host != null && _this.get$host() !== "") + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + pathSegments = _this.get$pathSegments(); + A._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); + t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "" + "/" : "", pathSegments, "/"); + t1 = t1.charCodeAt(0) == 0 ? t1 : t1; + } + return t1; + }, + toString$0(_) { + return this.get$_text(); + }, + $eq(_, other) { + var t1, t2, t3, _this = this; + if (other == null) + return false; + if (_this === other) + return true; + t1 = false; + if (type$.Uri._is(other)) + if (_this.scheme === other.get$scheme()) + if (_this._host != null === other.get$hasAuthority()) + if (_this._userInfo === other.get$userInfo()) + if (_this.get$host() === other.get$host()) + if (_this.get$port(0) === other.get$port(other)) + if (_this.path === other.get$path(other)) { + t2 = _this._query; + t3 = t2 == null; + if (!t3 === other.get$hasQuery()) { + if (t3) + t2 = ""; + if (t2 === other.get$query()) { + t2 = _this._fragment; + t3 = t2 == null; + if (!t3 === other.get$hasFragment()) { + t1 = t3 ? "" : t2; + t1 = t1 === other.get$fragment(); + } + } + } + } + return t1; + }, + $isUri: 1, + $is_PlatformUri: 1, + get$scheme() { + return this.scheme; + }, + get$path(receiver) { + return this.path; + } + }; + A._Uri__makePath_closure.prototype = { + call$1(s) { + return A._Uri__uriEncode(B.List_M2I0, s, B.C_Utf8Codec, false); + }, + $signature: 6 + }; + A.UriData.prototype = { + get$uri() { + var t2, queryIndex, end, query, _this = this, _null = null, + t1 = _this._uriCache; + if (t1 == null) { + t1 = _this._text; + t2 = _this._separatorIndices[0] + 1; + queryIndex = B.JSString_methods.indexOf$2(t1, "?", t2); + end = t1.length; + if (queryIndex >= 0) { + query = A._Uri__normalizeOrSubstring(t1, queryIndex + 1, end, B.List_42A, false, false); + end = queryIndex; + } else + query = _null; + t1 = _this._uriCache = new A._DataUri("data", "", _null, _null, A._Uri__normalizeOrSubstring(t1, t2, end, B.List_M2I, false, false), query, _null); + } + return t1; + }, + toString$0(_) { + var t1 = this._text; + return this._separatorIndices[0] === -1 ? "data:" + t1 : t1; + } + }; + A._createTables_build.prototype = { + call$2(state, defaultTransition) { + var t1 = this.tables[state]; + B.NativeUint8List_methods.fillRange$3(t1, 0, 96, defaultTransition); + return t1; + }, + $signature: 327 + }; + A._createTables_setChars.prototype = { + call$3(target, chars, transition) { + var t1, i; + for (t1 = chars.length, i = 0; i < t1; ++i) + target[chars.charCodeAt(i) ^ 96] = transition; + }, + $signature: 213 + }; + A._createTables_setRange.prototype = { + call$3(target, range, transition) { + var i, n; + for (i = range.charCodeAt(0), n = range.charCodeAt(1); i <= n; ++i) + target[(i ^ 96) >>> 0] = transition; + }, + $signature: 213 + }; + A._SimpleUri.prototype = { + get$hasAuthority() { + return this._hostStart > 0; + }, + get$hasPort() { + return this._hostStart > 0 && this._portStart + 1 < this._pathStart; + }, + get$hasQuery() { + return this._queryStart < this._fragmentStart; + }, + get$hasFragment() { + return this._fragmentStart < this._uri.length; + }, + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$2(this._uri, "/", this._pathStart); + }, + get$hasEmptyPath() { + return this._pathStart === this._queryStart; + }, + get$scheme() { + var t1 = this._schemeCache; + return t1 == null ? this._schemeCache = this._computeScheme$0() : t1; + }, + _computeScheme$0() { + var t2, _this = this, + t1 = _this._schemeEnd; + if (t1 <= 0) + return ""; + t2 = t1 === 4; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "http")) + return "http"; + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) + return "https"; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "file")) + return "file"; + if (t1 === 7 && B.JSString_methods.startsWith$1(_this._uri, "package")) + return "package"; + return B.JSString_methods.substring$2(_this._uri, 0, t1); + }, + get$userInfo() { + var t1 = this._hostStart, + t2 = this._schemeEnd + 3; + return t1 > t2 ? B.JSString_methods.substring$2(this._uri, t2, t1 - 1) : ""; + }, + get$host() { + var t1 = this._hostStart; + return t1 > 0 ? B.JSString_methods.substring$2(this._uri, t1, this._portStart) : ""; + }, + get$port(_) { + var t1, _this = this; + if (_this.get$hasPort()) + return A.int_parse(B.JSString_methods.substring$2(_this._uri, _this._portStart + 1, _this._pathStart), null); + t1 = _this._schemeEnd; + if (t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "http")) + return 80; + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) + return 443; + return 0; + }, + get$path(_) { + return B.JSString_methods.substring$2(this._uri, this._pathStart, this._queryStart); + }, + get$query() { + var t1 = this._queryStart, + t2 = this._fragmentStart; + return t1 < t2 ? B.JSString_methods.substring$2(this._uri, t1 + 1, t2) : ""; + }, + get$fragment() { + var t1 = this._fragmentStart, + t2 = this._uri; + return t1 < t2.length ? B.JSString_methods.substring$1(t2, t1 + 1) : ""; + }, + get$pathSegments() { + var parts, i, + start = this._pathStart, + end = this._queryStart, + t1 = this._uri; + if (B.JSString_methods.startsWith$2(t1, "/", start)) + ++start; + if (start === end) + return B.List_empty; + parts = A._setArrayType([], type$.JSArray_String); + for (i = start; i < end; ++i) + if (t1.charCodeAt(i) === 47) { + parts.push(B.JSString_methods.substring$2(t1, start, i)); + start = i + 1; + } + parts.push(B.JSString_methods.substring$2(t1, start, end)); + return A.List_List$unmodifiable(parts, type$.String); + }, + _isPort$1(port) { + var portDigitStart = this._portStart + 1; + return portDigitStart + port.length === this._pathStart && B.JSString_methods.startsWith$2(this._uri, port, portDigitStart); + }, + removeFragment$0() { + var _this = this, + t1 = _this._fragmentStart, + t2 = _this._uri; + if (t1 >= t2.length) + return _this; + return new A._SimpleUri(B.JSString_methods.substring$2(t2, 0, t1), _this._schemeEnd, _this._hostStart, _this._portStart, _this._pathStart, _this._queryStart, t1, _this._schemeCache); + }, + replace$1$scheme(scheme) { + var schemeChanged, isFile, t1, userInfo, port, host, t2, path, t3, query, fragment, _this = this, _null = null; + scheme = A._Uri__makeScheme(scheme, 0, scheme.length); + schemeChanged = !(_this._schemeEnd === scheme.length && B.JSString_methods.startsWith$1(_this._uri, scheme)); + isFile = scheme === "file"; + t1 = _this._hostStart; + userInfo = t1 > 0 ? B.JSString_methods.substring$2(_this._uri, _this._schemeEnd + 3, t1) : ""; + port = _this.get$hasPort() ? _this.get$port(0) : _null; + if (schemeChanged) + port = A._Uri__makePort(port, scheme); + t1 = _this._hostStart; + if (t1 > 0) + host = B.JSString_methods.substring$2(_this._uri, t1, _this._portStart); + else + host = userInfo.length !== 0 || port != null || isFile ? "" : _null; + t1 = _this._uri; + t2 = _this._queryStart; + path = B.JSString_methods.substring$2(t1, _this._pathStart, t2); + if (!isFile) + t3 = host != null && path.length !== 0; + else + t3 = true; + if (t3 && !B.JSString_methods.startsWith$1(path, "/")) + path = "/" + path; + t3 = _this._fragmentStart; + query = t2 < t3 ? B.JSString_methods.substring$2(t1, t2 + 1, t3) : _null; + t2 = _this._fragmentStart; + fragment = t2 < t1.length ? B.JSString_methods.substring$1(t1, t2 + 1) : _null; + return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragment); + }, + resolve$1(_, reference) { + return this.resolveUri$1(A.Uri_parse(reference)); + }, + resolveUri$1(reference) { + if (reference instanceof A._SimpleUri) + return this._simpleMerge$2(this, reference); + return this._toNonSimple$0().resolveUri$1(reference); + }, + _simpleMerge$2(base, ref) { + var t2, t3, t4, isSimple, delta, refStart, basePathStart, packageNameEnd, basePathStart0, baseStart, baseEnd, baseUri, baseStart0, backCount, refStart0, insert, + t1 = ref._schemeEnd; + if (t1 > 0) + return ref; + t2 = ref._hostStart; + if (t2 > 0) { + t3 = base._schemeEnd; + if (t3 <= 0) + return ref; + t4 = t3 === 4; + if (t4 && B.JSString_methods.startsWith$1(base._uri, "file")) + isSimple = ref._pathStart !== ref._queryStart; + else if (t4 && B.JSString_methods.startsWith$1(base._uri, "http")) + isSimple = !ref._isPort$1("80"); + else + isSimple = !(t3 === 5 && B.JSString_methods.startsWith$1(base._uri, "https")) || !ref._isPort$1("443"); + if (isSimple) { + delta = t3 + 1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, delta) + B.JSString_methods.substring$1(ref._uri, t1 + 1), t3, t2 + delta, ref._portStart + delta, ref._pathStart + delta, ref._queryStart + delta, ref._fragmentStart + delta, base._schemeCache); + } else + return this._toNonSimple$0().resolveUri$1(ref); + } + refStart = ref._pathStart; + t1 = ref._queryStart; + if (refStart === t1) { + t2 = ref._fragmentStart; + if (t1 < t2) { + t3 = base._queryStart; + delta = t3 - t1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(ref._uri, t1), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, t1 + delta, t2 + delta, base._schemeCache); + } + t1 = ref._uri; + if (t2 < t1.length) { + t3 = base._fragmentStart; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(t1, t2), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, base._queryStart, t2 + (t3 - t2), base._schemeCache); + } + return base.removeFragment$0(); + } + t2 = ref._uri; + if (B.JSString_methods.startsWith$2(t2, "/", refStart)) { + basePathStart = base._pathStart; + packageNameEnd = A._SimpleUri__packageNameEnd(this); + basePathStart0 = packageNameEnd > 0 ? packageNameEnd : basePathStart; + delta = basePathStart0 - refStart; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, basePathStart0) + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, basePathStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + } + baseStart = base._pathStart; + baseEnd = base._queryStart; + if (baseStart === baseEnd && base._hostStart > 0) { + for (; B.JSString_methods.startsWith$2(t2, "../", refStart);) + refStart += 3; + delta = baseStart - refStart + 1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, baseStart) + "/" + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + } + baseUri = base._uri; + packageNameEnd = A._SimpleUri__packageNameEnd(this); + if (packageNameEnd >= 0) + baseStart0 = packageNameEnd; + else + for (baseStart0 = baseStart; B.JSString_methods.startsWith$2(baseUri, "../", baseStart0);) + baseStart0 += 3; + backCount = 0; + while (true) { + refStart0 = refStart + 3; + if (!(refStart0 <= t1 && B.JSString_methods.startsWith$2(t2, "../", refStart))) + break; + ++backCount; + refStart = refStart0; + } + for (insert = ""; baseEnd > baseStart0;) { + --baseEnd; + if (baseUri.charCodeAt(baseEnd) === 47) { + if (backCount === 0) { + insert = "/"; + break; + } + --backCount; + insert = "/"; + } + } + if (baseEnd === baseStart0 && base._schemeEnd <= 0 && !B.JSString_methods.startsWith$2(baseUri, "/", baseStart)) { + refStart -= backCount * 3; + insert = ""; + } + delta = baseEnd - refStart + insert.length; + return new A._SimpleUri(B.JSString_methods.substring$2(baseUri, 0, baseEnd) + insert + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + }, + toFilePath$0() { + var t2, t3, _this = this, + t1 = _this._schemeEnd; + if (t1 >= 0) { + t2 = !(t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "file")); + t1 = t2; + } else + t1 = false; + if (t1) + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + _this.get$scheme() + " URI")); + t1 = _this._queryStart; + t2 = _this._uri; + if (t1 < t2.length) { + if (t1 < _this._fragmentStart) + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + } + t3 = $.$get$_Uri__isWindowsCached(); + if (t3) + t1 = A._Uri__toWindowsFilePath(_this); + else { + if (_this._hostStart < _this._portStart) + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + t1 = B.JSString_methods.substring$2(t2, _this._pathStart, t1); + } + return t1; + }, + get$hashCode(_) { + var t1 = this._hashCodeCache; + return t1 == null ? this._hashCodeCache = B.JSString_methods.get$hashCode(this._uri) : t1; + }, + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + return type$.Uri._is(other) && this._uri === other.toString$0(0); + }, + _toNonSimple$0() { + var _this = this, _null = null, + t1 = _this.get$scheme(), + t2 = _this.get$userInfo(), + t3 = _this._hostStart > 0 ? _this.get$host() : _null, + t4 = _this.get$hasPort() ? _this.get$port(0) : _null, + t5 = _this._uri, + t6 = _this._queryStart, + t7 = B.JSString_methods.substring$2(t5, _this._pathStart, t6), + t8 = _this._fragmentStart; + t6 = t6 < t8 ? _this.get$query() : _null; + return A._Uri$_internal(t1, t2, t3, t4, t7, t6, t8 < t5.length ? _this.get$fragment() : _null); + }, + toString$0(_) { + return this._uri; + }, + $isUri: 1, + $is_PlatformUri: 1 + }; + A._DataUri.prototype = {}; + A.Expando.prototype = { + $indexSet(_, object, value) { + if (object instanceof A._Record) + A.Expando__badExpandoKey(object); + this._jsWeakMap.set(object, value); + }, + toString$0(_) { + return "Expando:null"; + } + }; + A.jsify__convert.prototype = { + call$1(o) { + var t1, convertedMap, key, convertedList; + if (A._noJsifyRequired(o)) + return o; + t1 = this._convertedObjects; + if (t1.containsKey$1(o)) + return t1.$index(0, o); + if (type$.Map_of_nullable_Object_and_nullable_Object._is(o)) { + convertedMap = {}; + t1.$indexSet(0, o, convertedMap); + for (t1 = J.get$iterator$ax(o.get$keys(o)); t1.moveNext$0();) { + key = t1.get$current(t1); + convertedMap[key] = this.call$1(o.$index(0, key)); + } + return convertedMap; + } else if (type$.Iterable_nullable_Object._is(o)) { + convertedList = []; + t1.$indexSet(0, o, convertedList); + B.JSArray_methods.addAll$1(convertedList, J.map$1$1$ax(o, this, type$.dynamic)); + return convertedList; + } else + return o; + }, + $signature: 391 + }; + A.promiseToFuture_closure1.prototype = { + call$1(r) { + return this.completer.complete$1(r); + }, + $signature: 74 + }; + A.promiseToFuture_closure2.prototype = { + call$1(e) { + if (e == null) + return this.completer.completeError$1(new A.NullRejectionException(e === undefined)); + return this.completer.completeError$1(e); + }, + $signature: 74 + }; + A.NullRejectionException.prototype = { + toString$0(_) { + return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; + }, + $isException: 1 + }; + A._JSRandom.prototype = { + nextInt$1(max) { + if (max <= 0 || max > 4294967296) + throw A.wrapException(A.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); + return Math.random() * max >>> 0; + }, + nextDouble$0() { + return Math.random(); + } + }; + A.ArgParser.prototype = { + addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, defaultsTo, help, hide, negatable) { + var _null = null; + this._addOption$12$aliases$hide$negatable($name, abbr, help, _null, _null, _null, defaultsTo, _null, B.OptionType_I6i, B.List_empty, hide, negatable); + }, + addFlag$2$hide($name, hide) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, null, hide, true); + }, + addFlag$2$help($name, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, true); + }, + addFlag$3$defaultsTo$help($name, defaultsTo, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, defaultsTo, help, false, true); + }, + addFlag$3$help$negatable($name, help, negatable) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, negatable); + }, + addFlag$3$abbr$help($name, abbr, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, true); + }, + addFlag$4$abbr$help$negatable($name, abbr, help, negatable) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, negatable); + }, + addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, hide, valueHelp) { + this._addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, null, defaultsTo, null, B.OptionType_tew, B.List_empty, hide, false); + }, + addOption$2$hide($name, hide) { + var _null = null; + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, _null, _null, _null, _null, hide, _null); + }, + addOption$6$abbr$allowed$defaultsTo$help$valueHelp($name, abbr, allowed, defaultsTo, help, valueHelp) { + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, false, valueHelp); + }, + addOption$4$allowed$defaultsTo$help($name, allowed, defaultsTo, help) { + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, null, allowed, defaultsTo, help, false, null); + }, + addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, allowed, allowedHelp, help, splitCommas, valueHelp) { + var t1 = A._setArrayType([], type$.JSArray_String); + this._addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, t1, null, B.OptionType_yPm, B.List_empty, false, splitCommas); + }, + addMultiOption$5$abbr$help$splitCommas$valueHelp($name, abbr, help, splitCommas, valueHelp) { + return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, null, null, help, splitCommas, valueHelp); + }, + addMultiOption$6$abbr$allowed$allowedHelp$help$valueHelp($name, abbr, allowed, allowedHelp, help, valueHelp) { + return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, allowed, allowedHelp, help, true, valueHelp); + }, + addMultiOption$2$help($name, help) { + var _null = null; + return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, _null, _null, _null, help, true, _null); + }, + _addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory, negatable, splitCommas) { + var existing, t2, t3, option, _i, _this = this, _null = null, + t1 = A._setArrayType([$name], type$.JSArray_String); + B.JSArray_methods.addAll$1(t1, aliases); + if (B.JSArray_methods.any$1(t1, new A.ArgParser__addOption_closure(_this))) + throw A.wrapException(A.ArgumentError$('Duplicate option or alias "' + $name + '".', _null)); + t1 = abbr != null; + if (t1) { + existing = _this.findByAbbreviation$1(abbr); + if (existing != null) + throw A.wrapException(A.ArgumentError$('Abbreviation "' + abbr + '" is already used by "' + existing.name + '".', _null)); + } + t2 = allowed == null ? _null : A.List_List$unmodifiable(allowed, type$.String); + if (allowedHelp == null) + t3 = _null; + else { + t3 = type$.String; + t3 = A.ConstantMap_ConstantMap$from(allowedHelp, t3, t3); + } + option = new A.Option($name, abbr, help, valueHelp, t2, t3, defaultsTo, negatable, callback, type, splitCommas == null ? type === B.OptionType_yPm : splitCommas, false, hide); + if ($name.length === 0) + A.throwExpression(A.ArgumentError$("Name cannot be empty.", _null)); + else if (B.JSString_methods.startsWith$1($name, "-")) + A.throwExpression(A.ArgumentError$("Name " + $name + ' cannot start with "-".', _null)); + t2 = $.$get$Option__invalidChars()._nativeRegExp; + if (t2.test($name)) + A.throwExpression(A.ArgumentError$('Name "' + $name + '" contains invalid characters.', _null)); + if (t1) { + if (abbr.length !== 1) + A.throwExpression(A.ArgumentError$("Abbreviation must be null or have length 1.", _null)); + else if (abbr === "-") + A.throwExpression(A.ArgumentError$('Abbreviation cannot be "-".', _null)); + if (t2.test(abbr)) + A.throwExpression(A.ArgumentError$("Abbreviation is an invalid character.", _null)); + } + _this._arg_parser$_options.$indexSet(0, $name, option); + _this._optionsAndSeparators.push(option); + for (t1 = _this._aliases, _i = 0; false; ++_i) + t1.$indexSet(0, aliases[_i], $name); + }, + _addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, splitCommas) { + return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, false, splitCommas); + }, + _addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory) { + return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory, false, null); + }, + _addOption$12$aliases$hide$negatable($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, negatable) { + return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, negatable, null); + }, + findByAbbreviation$1(abbr) { + var t1, t2; + for (t1 = this.options._map, t1 = t1.get$values(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2.abbr === abbr) + return t2; + } + return null; + }, + findByNameOrAlias$1($name) { + var t1 = this._aliases.$index(0, $name); + if (t1 == null) + t1 = $name; + return this.options._map.$index(0, t1); + } + }; + A.ArgParser__addOption_closure.prototype = { + call$1($name) { + return this.$this.findByNameOrAlias$1($name) != null; + }, + $signature: 5 + }; + A.ArgParserException.prototype = {}; + A.ArgResults.prototype = { + $index(_, $name) { + var t1 = this._parser.options._map; + if (!t1.containsKey$1($name)) + throw A.wrapException(A.ArgumentError$('Could not find an option named "' + $name + '".', null)); + t1 = t1.$index(0, $name); + t1.toString; + return t1.valueOrDefault$1(this._parsed.$index(0, $name)); + }, + wasParsed$1($name) { + if (!this._parser.options._map.containsKey$1($name)) + throw A.wrapException(A.ArgumentError$('Could not find an option named "' + $name + '".', null)); + return this._parsed.containsKey$1($name); + } + }; + A.Option.prototype = { + valueOrDefault$1(value) { + var t1; + if (value != null) + return value; + if (this.type === B.OptionType_yPm) { + t1 = this.defaultsTo; + return t1 == null ? A._setArrayType([], type$.JSArray_String) : t1; + } + return this.defaultsTo; + } + }; + A.OptionType.prototype = {}; + A.Parser0.prototype = { + parse$0(_) { + var commandResults, commandName, commandParser, error, t1, t3, t4, t5, t6, t7, t8, command, exception, _this = this, + t2 = _this._args; + t2.toList$0(0); + commandResults = null; + for (t3 = _this._parser$_rest, t4 = _this._grammar, t5 = t4.commands, t6 = t2.$ti._precomputed1; !t2.get$isEmpty(0);) { + t7 = t2._head; + if (t7 === t2._tail) + A.throwExpression(A.IterableElementError_noElement()); + t7 = t2._table[t7]; + t8 = t7 == null; + if ((t8 ? t6._as(t7) : t7) === "--") { + t2.removeFirst$0(); + break; + } + if (t8) + t7 = t6._as(t7); + command = t5._map.$index(0, t7); + if (command != null) { + if (t3.length !== 0) + A.throwExpression(A.ArgParserException$("Cannot specify arguments before a command.", null)); + commandName = t2.removeFirst$0(); + t5 = type$.JSArray_String; + t6 = A._setArrayType([], t5); + B.JSArray_methods.addAll$1(t6, t3); + commandParser = new A.Parser0(commandName, _this, command, t2, t6, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); + try { + commandResults = J.parse$0$z(commandParser); + } catch (exception) { + t2 = A.unwrapException(exception); + if (t2 instanceof A.ArgParserException) { + error = t2; + t2 = error.message; + t1 = A._setArrayType([commandName], t5); + J.addAll$1$ax(t1, error.commands); + throw A.wrapException(A.ArgParserException$(t2, t1)); + } else + throw exception; + } + B.JSArray_methods.clear$0(t3); + break; + } + if (_this._parseSoloOption$0()) + continue; + if (_this._parseAbbreviation$1(_this)) + continue; + if (_this._parseLongOption$0()) + continue; + t3.push(t2.removeFirst$0()); + } + t4.options._map.forEach$1(0, new A.Parser_parse_closure(_this)); + B.JSArray_methods.addAll$1(t3, t2); + t2.clear$0(0); + return new A.ArgResults(t4, _this._results, _this._commandName, new A.UnmodifiableListView(t3, type$.UnmodifiableListView_String)); + }, + _readNextArgAsValue$1(option) { + var t1 = this._args; + if (t1.get$isEmpty(0)) + A.throwExpression(A.ArgParserException$('Missing argument for "' + option.name + '".', null)); + this._setOption$3(this._results, option, t1.get$first(0)); + t1.removeFirst$0(); + }, + _parseSoloOption$0() { + var opt, + t1 = this._args; + if (t1.get$first(0).length !== 2) + return false; + if (!B.JSString_methods.startsWith$1(t1.get$first(0), "-")) + return false; + opt = t1.get$first(0)[1]; + if (!A._isLetterOrDigit(opt.charCodeAt(0))) + return false; + this._handleSoloOption$1(opt); + return true; + }, + _handleSoloOption$1(opt) { + var t1, _this = this, + option = _this._grammar.findByAbbreviation$1(opt); + if (option == null) { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$('Could not find an option or flag "-' + opt + '".', null)); + t1._handleSoloOption$1(opt); + return true; + } + _this._args.removeFirst$0(); + if (option.type === B.OptionType_I6i) + _this._results.$indexSet(0, option.name, true); + else + _this._readNextArgAsValue$1(option); + return true; + }, + _parseAbbreviation$1(innermostCommand) { + var t2, index, t3, t4, t5, lettersAndDigits, rest, + t1 = this._args; + if (t1.get$first(0).length < 2) + return false; + if (!B.JSString_methods.startsWith$1(t1.get$first(0), "-")) + return false; + t2 = t1.$ti._precomputed1; + index = 1; + while (true) { + t3 = t1._head; + if (t3 === t1._tail) + A.throwExpression(A.IterableElementError_noElement()); + t3 = t1._table[t3]; + t4 = t3 == null; + if (index < (t4 ? t2._as(t3) : t3).length) { + t5 = true; + t3 = (t4 ? t2._as(t3) : t3).charCodeAt(index); + if (!(t3 >= 65 && t3 <= 90)) + if (!(t3 >= 97 && t3 <= 122)) + t3 = t3 >= 48 && t3 <= 57; + else + t3 = t5; + else + t3 = t5; + } else + t3 = false; + if (!t3) + break; + ++index; + } + if (index === 1) + return false; + lettersAndDigits = B.JSString_methods.substring$2(t1.get$first(0), 1, index); + rest = B.JSString_methods.substring$1(t1.get$first(0), index); + if (B.JSString_methods.contains$1(rest, "\n") || B.JSString_methods.contains$1(rest, "\r")) + return false; + this._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); + return true; + }, + _handleAbbreviation$3(lettersAndDigits, rest, innermostCommand) { + var t1, i, i0, _this = this, + c = B.JSString_methods.substring$2(lettersAndDigits, 0, 1), + first = _this._grammar.findByAbbreviation$1(c); + if (first == null) { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(string$.Could_ + c + '".', null)); + t1._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); + return true; + } else if (first.type !== B.OptionType_I6i) + _this._setOption$3(_this._results, first, B.JSString_methods.substring$1(lettersAndDigits, 1) + rest); + else { + t1 = B.JSString_methods.substring$1(lettersAndDigits, 1); + if (rest !== "") + A.throwExpression(A.ArgParserException$('Option "-' + c + '" is a flag and cannot handle value "' + t1 + rest + '".', null)); + for (t1 = lettersAndDigits.length, i = 0; i < t1; i = i0) { + i0 = i + 1; + innermostCommand._parseShortFlag$1(B.JSString_methods.substring$2(lettersAndDigits, i, i0)); + } + } + _this._args.removeFirst$0(); + return true; + }, + _parseShortFlag$1(c) { + var t1, + option = this._grammar.findByAbbreviation$1(c); + if (option == null) { + t1 = this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(string$.Could_ + c + '".', null)); + t1._parseShortFlag$1(c); + return; + } + if (option.type !== B.OptionType_I6i) + A.throwExpression(A.ArgParserException$('Option "-' + c + '" must be a flag to be in a collapsed "-".', null)); + this._results.$indexSet(0, option.name, true); + }, + _parseLongOption$0() { + var index, t2, $name, t3, i, t4, t5, value, + t1 = this._args; + if (!B.JSString_methods.startsWith$1(t1.get$first(0), "--")) + return false; + index = B.JSString_methods.indexOf$1(t1.get$first(0), "="); + t2 = index === -1; + $name = t2 ? B.JSString_methods.substring$1(t1.get$first(0), 2) : B.JSString_methods.substring$2(t1.get$first(0), 2, index); + for (t3 = $name.length, i = 0; i !== t3; ++i) { + t4 = $name.charCodeAt(i); + t5 = true; + if (!(t4 >= 65 && t4 <= 90)) + if (!(t4 >= 97 && t4 <= 122)) + t5 = t4 >= 48 && t4 <= 57; + if (!(t5 || t4 === 45 || t4 === 95)) + return false; + } + value = t2 ? null : B.JSString_methods.substring$1(t1.get$first(0), index + 1); + if (value != null) + t1 = B.JSString_methods.contains$1(value, "\n") || B.JSString_methods.contains$1(value, "\r"); + else + t1 = false; + if (t1) + return false; + this._handleLongOption$2($name, value); + return true; + }, + _handleLongOption$2($name, value) { + var _this = this, _null = null, + _s32_ = 'Could not find an option named "', + t1 = _this._grammar, + option = t1.findByNameOrAlias$1($name); + if (option != null) { + _this._args.removeFirst$0(); + if (option.type === B.OptionType_I6i) { + if (value != null) + A.throwExpression(A.ArgParserException$('Flag option "' + $name + '" should not be given a value.', _null)); + _this._results.$indexSet(0, option.name, true); + } else if (value != null) + _this._setOption$3(_this._results, option, value); + else + _this._readNextArgAsValue$1(option); + } else if (B.JSString_methods.startsWith$1($name, "no-")) { + option = t1.findByNameOrAlias$1(B.JSString_methods.substring$1($name, 3)); + if (option == null) { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(_s32_ + $name + '".', _null)); + t1._handleLongOption$2($name, value); + return true; + } + _this._args.removeFirst$0(); + if (option.type !== B.OptionType_I6i) + A.throwExpression(A.ArgParserException$('Cannot negate non-flag option "' + $name + '".', _null)); + if (!option.negatable) + A.throwExpression(A.ArgParserException$('Cannot negate option "' + $name + '".', _null)); + _this._results.$indexSet(0, option.name, false); + } else { + t1 = _this._parser$_parent; + if (t1 == null) + A.throwExpression(A.ArgParserException$(_s32_ + $name + '".', _null)); + t1._handleLongOption$2($name, value); + return true; + } + return true; + }, + _setOption$3(results, option, value) { + var list, t1, t2, t3, _i, element; + if (option.type !== B.OptionType_yPm) { + this._validateAllowed$2(option, value); + results.$indexSet(0, option.name, value); + return; + } + list = type$.List_dynamic._as(results.putIfAbsent$2(option.name, new A.Parser__setOption_closure())); + if (option.splitCommas) + for (t1 = value.split(","), t2 = t1.length, t3 = J.getInterceptor$ax(list), _i = 0; _i < t2; ++_i) { + element = t1[_i]; + this._validateAllowed$2(option, element); + t3.add$1(list, element); + } + else { + this._validateAllowed$2(option, value); + J.add$1$ax(list, value); + } + }, + _validateAllowed$2(option, value) { + var t1 = option.allowed; + if (t1 == null) + return; + if (!B.JSArray_methods.contains$1(t1, value)) + A.throwExpression(A.ArgParserException$('"' + value + '" is not an allowed value for option "' + option.name + '".', null)); + } + }; + A.Parser_parse_closure.prototype = { + call$2($name, option) { + var parsedOption = this.$this._results.$index(0, $name), + callback = option.callback; + if (callback == null) + return; + callback.call$1(option.valueOrDefault$1(parsedOption)); + }, + $signature: 398 + }; + A.Parser__setOption_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_String); + }, + $signature: 131 + }; + A._Usage.prototype = { + get$_columnWidths() { + var result, _this = this, + value = _this.___Usage__columnWidths_FI; + if (value === $) { + result = _this._calculateColumnWidths$0(); + _this.___Usage__columnWidths_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.___Usage__columnWidths_FI = result; + value = result; + } + return value; + }, + generate$0() { + var t1, t2, t3, t4, _i, optionOrSeparator, t5, _this = this; + for (t1 = _this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.Option, t4 = _this._usage$_buffer, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + optionOrSeparator = t1[_i]; + if (typeof optionOrSeparator == "string") { + t5 = t4._contents; + t4._contents = (t5.length !== 0 ? t4._contents = t5 + "\n\n" : t5) + optionOrSeparator; + _this._newlinesNeeded = 1; + continue; + } + t3._as(optionOrSeparator); + if (optionOrSeparator.hide) + continue; + _this._writeOption$1(optionOrSeparator); + } + t1 = t4._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeOption$1(option) { + var allowedNames, t2, t3, t4, _i, $name, t5, _this = this, + t1 = option.abbr; + _this._write$2(0, t1 == null ? "" : "-" + t1 + ", "); + t1 = _this._longOption$1(option); + _this._write$2(1, t1); + t1 = option.help; + if (t1 != null) + _this._write$2(2, t1); + t1 = option.allowedHelp; + if (t1 != null) { + allowedNames = J.toList$0$ax(t1.get$keys(t1)); + B.JSArray_methods.sort$0(allowedNames); + _this._newline$0(); + for (t2 = allowedNames.length, t3 = option.defaultsTo, t4 = type$.List_dynamic._is(t3), _i = 0; _i < allowedNames.length; allowedNames.length === t2 || (0, A.throwConcurrentModificationError)(allowedNames), ++_i) { + $name = allowedNames[_i]; + t5 = (t4 ? B.JSArray_methods.contains$1(t3, $name) : t3 === $name) ? " (default)" : ""; + _this._write$2(1, " [" + $name + "]" + t5); + t5 = t1.$index(0, $name); + t5.toString; + _this._write$2(2, t5); + } + _this._newline$0(); + } else if (option.allowed != null) + _this._write$2(2, _this._buildAllowedList$1(option)); + else { + t1 = option.type; + if (t1 === B.OptionType_I6i) { + if (option.defaultsTo === true) + _this._write$2(2, "(defaults to on)"); + } else if (t1 === B.OptionType_yPm) { + t1 = option.defaultsTo; + if (t1 != null && type$.Iterable_dynamic._as(t1).length !== 0) { + type$.List_dynamic._as(t1); + _this._write$2(2, "(defaults to " + new A.MappedListIterable(t1, new A._Usage__writeOption_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + ")"); + } + } else { + t1 = option.defaultsTo; + if (t1 != null) + _this._write$2(2, '(defaults to "' + A.S(t1) + '")'); + } + } + }, + _longOption$1(option) { + var t1 = option.name, + result = option.negatable ? "--[no-]" + t1 : "--" + t1; + t1 = option.valueHelp; + return t1 != null ? result + ("=<" + t1 + ">") : result; + }, + _calculateColumnWidths$0() { + var t1, t2, t3, abbr, title, _i, option, t4, t5, t6, t7, t8; + for (t1 = this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.List_dynamic, abbr = 0, title = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + option = t1[_i]; + if (!(option instanceof A.Option)) + continue; + if (option.hide) + continue; + t4 = option.abbr; + abbr = Math.max(abbr, (t4 == null ? "" : "-" + t4 + ", ").length); + t4 = this._longOption$1(option); + title = Math.max(title, t4.length); + t4 = option.allowedHelp; + if (t4 != null) + for (t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = option.defaultsTo, t6 = t3._is(t5); t4.moveNext$0();) { + t7 = t4.get$current(t4); + t8 = (t6 ? B.JSArray_methods.contains$1(t5, t7) : t5 === t7) ? " (default)" : ""; + title = Math.max(title, (" [" + t7 + "]" + t8).length); + } + } + return A._setArrayType([abbr, title + 4], type$.JSArray_int); + }, + _newline$0() { + ++this._newlinesNeeded; + this._currentColumn = 0; + }, + _write$2(column, text) { + var t1, _i, + lines = A._setArrayType(text.split("\n"), type$.JSArray_String); + this.get$_columnWidths(); + while (true) { + if (!(lines.length !== 0 && J.trim$0$s(B.JSArray_methods.get$first(lines)) === "")) + break; + B.JSArray_methods.removeAt$1(lines, 0); + } + while (true) { + if (!(lines.length !== 0 && J.trim$0$s(B.JSArray_methods.get$last(lines)) === "")) + break; + lines.pop(); + } + for (t1 = lines.length, _i = 0; _i < lines.length; lines.length === t1 || (0, A.throwConcurrentModificationError)(lines), ++_i) + this._writeLine$2(column, lines[_i]); + }, + _writeLine$2(column, text) { + var t1, t2, _this = this; + for (t1 = _this._usage$_buffer; t2 = _this._newlinesNeeded, t2 > 0;) { + t1._contents += "\n"; + _this._newlinesNeeded = t2 - 1; + } + for (; t2 = _this._currentColumn, t2 !== column;) { + if (t2 < 2) { + t2 = B.JSString_methods.$mul(" ", _this.get$_columnWidths()[_this._currentColumn]); + t1._contents += t2; + } else + t1._contents += "\n"; + _this._currentColumn = (_this._currentColumn + 1) % 3; + } + _this.get$_columnWidths(); + if (column < 2) { + t2 = B.JSString_methods.padRight$1(text, _this.get$_columnWidths()[column]); + t1._contents += t2; + } else + t1._contents += text; + _this._currentColumn = (_this._currentColumn + 1) % 3; + if (column === 2) + ++_this._newlinesNeeded; + }, + _buildAllowedList$1(option) { + var t2, t3, first, _i, allowed, + t1 = option.defaultsTo, + isDefault = type$.List_dynamic._is(t1) ? B.JSArray_methods.get$contains(t1) : new A._Usage__buildAllowedList_closure(option); + t1 = "" + "["; + for (t2 = option.allowed, t3 = t2.length, first = true, _i = 0; _i < t3; ++_i, first = false) { + allowed = t2[_i]; + if (!first) + t1 += ", "; + t1 += A.S(allowed); + if (isDefault.call$1(allowed)) + t1 += " (default)"; + } + t1 += "]"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._Usage__writeOption_closure.prototype = { + call$1(value) { + return '"' + A.S(value) + '"'; + }, + $signature: 121 + }; + A._Usage__buildAllowedList_closure.prototype = { + call$1(value) { + return value === this.option.defaultsTo; + }, + $signature: 132 + }; + A.FutureGroup.prototype = { + add$1(_, task) { + var t1, index, _this = this; + if (_this._future_group$_closed) + throw A.wrapException(A.StateError$("The FutureGroup is closed.")); + t1 = _this._future_group$_values; + index = t1.length; + t1.push(null); + ++_this._future_group$_pending; + task.then$1$1(0, new A.FutureGroup_add_closure(_this, index), type$.Null).catchError$1(new A.FutureGroup_add_closure0(_this)); + }, + close$0(_) { + var t1, t2, _this = this; + _this._future_group$_closed = true; + if (_this._future_group$_pending !== 0) + return; + t1 = _this._future_group$_completer; + if ((t1.future._state & 30) !== 0) + return; + t2 = _this.$ti._eval$1("WhereTypeIterable<1>"); + t1.complete$1(A.List_List$of(new A.WhereTypeIterable(_this._future_group$_values, t2), true, t2._eval$1("Iterable.E"))); + } + }; + A.FutureGroup_add_closure.prototype = { + call$1(value) { + var t3, t4, + t1 = this.$this, + t2 = t1._future_group$_completer; + if ((t2.future._state & 30) !== 0) + return null; + t3 = --t1._future_group$_pending; + t4 = t1._future_group$_values; + t4[this.index] = value; + if (t3 !== 0) + return null; + if (!t1._future_group$_closed) + return null; + t1 = t1.$ti._eval$1("WhereTypeIterable<1>"); + t2.complete$1(A.List_List$of(new A.WhereTypeIterable(t4, t1), true, t1._eval$1("Iterable.E"))); + }, + $signature() { + return this.$this.$ti._eval$1("Null(1)"); + } + }; + A.FutureGroup_add_closure0.prototype = { + call$2(error, stackTrace) { + var t1 = this.$this._future_group$_completer; + if ((t1.future._state & 30) !== 0) + return null; + t1.completeError$2(error, stackTrace); + }, + $signature: 55 + }; + A.ErrorResult.prototype = { + complete$1(completer) { + completer.completeError$2(this.error, this.stackTrace); + }, + get$hashCode(_) { + return (J.get$hashCode$(this.error) ^ A.Primitives_objectHashCode(this.stackTrace) ^ 492929599) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ErrorResult && J.$eq$(this.error, other.error) && this.stackTrace === other.stackTrace; + }, + $isResult: 1 + }; + A.ValueResult.prototype = { + complete$1(completer) { + completer.complete$1(this.value); + }, + get$hashCode(_) { + return (J.get$hashCode$(this.value) ^ 842997089) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ValueResult && J.$eq$(this.value, other.value); + }, + $isResult: 1 + }; + A.StreamCompleter.prototype = { + setSourceStream$1(sourceStream) { + var t1 = this._stream_completer$_stream; + if (t1._sourceStream != null) + throw A.wrapException(A.StateError$("Source stream already set")); + t1._sourceStream = sourceStream; + if (t1._stream_completer$_controller != null) + t1._linkStreamToController$0(); + }, + setError$2(error, stackTrace) { + var t1 = this.$ti._precomputed1; + this.setSourceStream$1(A.Stream_Stream$fromFuture(A.Future_Future$error(error, stackTrace, t1), t1)); + }, + setError$1(error) { + return this.setError$2(error, null); + } + }; + A._CompleterStream.prototype = { + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + var sourceStream, t1, _this = this, _null = null; + if (_this._stream_completer$_controller == null) { + sourceStream = _this._sourceStream; + if (sourceStream != null && !sourceStream.get$isBroadcast()) + return sourceStream.listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); + if (_this._stream_completer$_controller == null) + _this._stream_completer$_controller = A.StreamController_StreamController(_null, _null, _null, _null, true, _this.$ti._precomputed1); + if (_this._sourceStream != null) + _this._linkStreamToController$0(); + } + t1 = _this._stream_completer$_controller; + t1.toString; + return new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); + }, + listen$1(_, onData) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); + }, + listen$3$onDone$onError(_, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); + }, + _linkStreamToController$0() { + var t2, + t1 = this._stream_completer$_controller; + t1.toString; + t2 = this._sourceStream; + t2.toString; + t1.addStream$2$cancelOnError(t2, false).whenComplete$1(t1.get$close(t1)); + } + }; + A.StreamGroup.prototype = { + add$1(_, stream) { + var t1, _this = this; + if (_this._closed) + throw A.wrapException(A.StateError$("Can't add a Stream to a closed StreamGroup.")); + t1 = _this._stream_group$_state; + if (t1 === B._StreamGroupState_dormant) + _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure()); + else if (t1 === B._StreamGroupState_canceled) + return stream.listen$1(0, null).cancel$0(); + else + _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure0(_this, stream)); + return null; + }, + remove$1(_, stream) { + var t1 = this._subscriptions, + subscription = t1.remove$1(0, stream), + future = subscription == null ? null : subscription.cancel$0(); + if (t1.__js_helper$_length === 0) + if (this._closed) { + t1 = this.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + A.scheduleMicrotask(t1.get$close(t1)); + } + return future; + }, + _onListen$0() { + var stream, t1, t2, t3, _i, entry, exception, _this = this; + _this._stream_group$_state = B._StreamGroupState_listening; + for (t1 = _this._subscriptions, t2 = A.List_List$of(t1.get$entries(0), true, _this.$ti._eval$1("MapEntry,StreamSubscription<1>?>")), t3 = t2.length, _i = 0; _i < t3; ++_i) { + entry = t2[_i]; + if (entry.value != null) + continue; + stream = entry.key; + try { + t1.$indexSet(0, stream, _this._listenToStream$1(stream)); + } catch (exception) { + t1 = _this._onCancel$0(); + if (t1 != null) + t1.catchError$1(new A.StreamGroup__onListen_closure()); + throw exception; + } + } + }, + _onPause$0() { + var t1, t2, t3; + this._stream_group$_state = B._StreamGroupState_paused; + for (t1 = this._subscriptions.get$values(0), t2 = A._instanceType(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f, t2._eval$1("MappedIterator<1,2>")), t2 = t2._rest[1]; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).pause$0(0); + } + }, + _onResume$0() { + var t1, t2, t3; + this._stream_group$_state = B._StreamGroupState_listening; + for (t1 = this._subscriptions.get$values(0), t2 = A._instanceType(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f, t2._eval$1("MappedIterator<1,2>")), t2 = t2._rest[1]; t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).resume$0(0); + } + }, + _onCancel$0() { + var t1, t2, futures; + this._stream_group$_state = B._StreamGroupState_canceled; + t1 = this._subscriptions; + t2 = A.IterableNullableExtension_whereNotNull(t1.get$entries(0).map$1$1(0, new A.StreamGroup__onCancel_closure(this), type$.nullable_Future_void), type$.Future_void); + futures = A.List_List$of(t2, true, t2.$ti._eval$1("Iterable.E")); + t1.clear$0(0); + return futures.length === 0 ? null : A.Future_wait(futures, false, type$.void); + }, + _listenToStream$1(stream) { + var subscription, + t1 = this.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + subscription = stream.listen$3$onDone$onError(0, t1.get$add(t1), new A.StreamGroup__listenToStream_closure(this, stream), t1.get$addError()); + if (this._stream_group$_state === B._StreamGroupState_paused) + subscription.pause$0(0); + return subscription; + } + }; + A.StreamGroup_add_closure.prototype = { + call$0() { + return null; + }, + $signature: 1 + }; + A.StreamGroup_add_closure0.prototype = { + call$0() { + return this.$this._listenToStream$1(this.stream); + }, + $signature() { + return this.$this.$ti._eval$1("StreamSubscription<1>()"); + } + }; + A.StreamGroup__onListen_closure.prototype = { + call$1(_) { + }, + $signature: 63 + }; + A.StreamGroup__onCancel_closure.prototype = { + call$1(entry) { + var t1, exception, + subscription = entry.value; + try { + if (subscription != null) { + t1 = subscription.cancel$0(); + return t1; + } + t1 = J.listen$1$z(entry.key, null).cancel$0(); + return t1; + } catch (exception) { + return null; + } + }, + $signature() { + return this.$this.$ti._eval$1("Future<~>?(MapEntry,StreamSubscription<1>?>)"); + } + }; + A.StreamGroup__listenToStream_closure.prototype = { + call$0() { + return this.$this.remove$1(0, this.stream); + }, + $signature: 0 + }; + A._StreamGroupState.prototype = { + toString$0(_) { + return this.name; + } + }; + A.StreamQueue.prototype = { + _updateRequests$0() { + var t1, t2, t3, t4, _this = this; + for (t1 = _this._requestQueue, t2 = _this._eventQueue, t3 = t1.$ti._precomputed1; !t1.get$isEmpty(0);) { + t4 = t1._head; + if (t4 === t1._tail) + A.throwExpression(A.IterableElementError_noElement()); + t4 = t1._table[t4]; + if (t4 == null) + t4 = t3._as(t4); + if (t4.update$2(t2, _this._isDone)) + t1.removeFirst$0(); + else + return; + } + if (!_this._isDone) + _this._stream_queue$_subscription.pause$0(0); + }, + _ensureListening$0() { + var t1, _this = this; + if (_this._isDone) + return; + t1 = _this._stream_queue$_subscription; + if (t1 == null) + _this._stream_queue$_subscription = _this._stream_queue$_source.listen$3$onDone$onError(0, new A.StreamQueue__ensureListening_closure(_this), new A.StreamQueue__ensureListening_closure0(_this), new A.StreamQueue__ensureListening_closure1(_this)); + else + t1.resume$0(0); + }, + _addResult$1(result) { + ++this._eventsReceived; + this._eventQueue._queue_list$_add$1(result); + this._updateRequests$0(); + }, + _addRequest$1(request) { + var _this = this, + t1 = _this._requestQueue; + if (t1._head === t1._tail) { + if (request.update$2(_this._eventQueue, _this._isDone)) + return; + _this._ensureListening$0(); + } + t1._add$1(request); + } + }; + A.StreamQueue__ensureListening_closure.prototype = { + call$1(data) { + var t1 = this.$this; + t1._addResult$1(new A.ValueResult(data, t1.$ti._eval$1("ValueResult<1>"))); + }, + $signature() { + return this.$this.$ti._eval$1("~(1)"); + } + }; + A.StreamQueue__ensureListening_closure1.prototype = { + call$2(error, stackTrace) { + this.$this._addResult$1(new A.ErrorResult(error, stackTrace)); + }, + $signature: 55 + }; + A.StreamQueue__ensureListening_closure0.prototype = { + call$0() { + var t1 = this.$this; + t1._stream_queue$_subscription = null; + t1._isDone = true; + t1._updateRequests$0(); + }, + $signature: 0 + }; + A._NextRequest.prototype = { + update$2(events, isDone) { + if (!events.get$isEmpty(events)) { + events.removeFirst$0().complete$1(this._completer); + return true; + } + if (isDone) { + this._completer.completeError$2(new A.StateError("No elements"), A.StackTrace_current()); + return true; + } + return false; + }, + $is_EventRequest: 1 + }; + A._isStrictMode_closure.prototype = { + call$0() { + var exception; + try { + "".name = null; + return false; + } catch (exception) { + return true; + } + }, + $signature: 23 + }; + A.Repl.prototype = {}; + A.alwaysValid_closure.prototype = { + call$1(text) { + return true; + }, + $signature: 5 + }; + A.ReplAdapter.prototype = { + runAsync$0() { + var rl, runController, _this = this, t1 = {}, + t2 = J.get$isTTY$x(self.process.stdin), + output = (t2 == null ? false : t2) ? self.process.stdout : null; + t2 = _this.repl.prompt; + rl = J.createInterface$1$x($.$get$readline(), {input: self.process.stdin, output: output, prompt: t2}); + _this.rl = rl; + t1.statement = ""; + t1.prompt = t2; + runController = A._Cell$(); + runController.__late_helper$_value = A.StreamController_StreamController(_this.get$exit(_this), new A.ReplAdapter_runAsync_closure(t1, _this, rl, runController), null, null, false, type$.String); + return runController._readLocal$0().get$stream(); + }, + exit$0(_) { + var t1 = this.rl; + if (t1 != null) + J.close$0$x(t1); + this.rl = null; + } + }; + A.ReplAdapter_runAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$handler = 1, $async$currentError, $async$self = this, lineController, lineQueue, line, error, stackTrace, t1, t2, t3, t4, $prompt, prompt0, t5, t6, t7, t8, line0, toZone, statement, exception, $async$exception; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 3; + lineController = A.StreamController_StreamController(null, null, null, null, false, type$.String); + t1 = lineController; + t2 = A.QueueList$(null, type$.Result_String); + t3 = A.ListQueue$(type$._EventRequest_dynamic); + lineQueue = new A.StreamQueue(new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")), t2, t3, type$.StreamQueue_String); + t1 = $async$self.rl; + t2 = J.getInterceptor$x(t1); + t2.on$2(t1, "line", A.allowInterop(new A.ReplAdapter_runAsync__closure(lineController))); + t3 = $async$self._box_0, t4 = $async$self.$this.repl, $prompt = t4.continuation, prompt0 = t4.prompt, t5 = $async$self.runController; + case 6: + // for condition + // trivial condition + t6 = J.get$isTTY$x(self.process.stdin); + if (t6 == null ? false : t6) + J.write$1$x(self.process.stdout, t3.prompt); + t6 = lineQueue; + t6.toString; + t7 = t6.$ti; + t8 = new A._Future($.Zone__current, t7._eval$1("_Future<1>")); + t6._addRequest$1(new A._NextRequest(new A._AsyncCompleter(t8, t7._eval$1("_AsyncCompleter<1>")), t7._eval$1("_NextRequest<1>"))); + $async$goto = 8; + return A._asyncAwait(t8, $async$call$0); + case 8: + // returning from await. + line = $async$result; + t6 = J.get$isTTY$x(self.process.stdin); + if (!(t6 == null ? false : t6)) { + line0 = t3.prompt + A.S(line); + toZone = $.printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } + statement = B.JSString_methods.$add(t3.statement, line); + t3.statement = statement; + if (t4.validator.call$1(statement)) { + t6 = t5.__late_helper$_value; + if (t6 === t5) + A.throwExpression(A.LateError$localNI("")); + J.add$1$ax(t6, t3.statement); + t3.statement = ""; + t3.prompt = prompt0; + t2.setPrompt$1(t1, prompt0); + } else { + t3.statement += "\n"; + t3.prompt = $prompt; + t2.setPrompt$1(t1, $prompt); + } + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + $async$handler = 1; + // goto after finally + $async$goto = 5; + break; + case 3: + // catch + $async$handler = 2; + $async$exception = $async$currentError; + error = A.unwrapException($async$exception); + stackTrace = A.getTraceFromException($async$exception); + t1 = $async$self.runController; + t1._readLocal$0().addError$2(error, stackTrace); + t2 = $async$self.$this.exit$0(0); + t2 = A._Future$value(t2, type$.void); + $async$goto = 9; + return A._asyncAwait(t2, $async$call$0); + case 9: + // returning from await. + J.close$0$x(t1._readLocal$0()); + // goto after finally + $async$goto = 5; + break; + case 2: + // uncaught + // goto rethrow + $async$goto = 1; + break; + case 5: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A.ReplAdapter_runAsync__closure.prototype = { + call$1(value) { + return this.lineController.add$1(0, A._asString(value)); + }, + $signature: 74 + }; + A.Stdin.prototype = {}; + A.Stdout.prototype = {}; + A.ReadlineModule.prototype = {}; + A.ReadlineOptions.prototype = {}; + A.ReadlineInterface.prototype = {}; + A.EmptyUnmodifiableSet.prototype = { + get$iterator(_) { + return B.C_EmptyIterator; + }, + get$length(_) { + return 0; + }, + contains$1(_, element) { + return false; + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$_empty(this.$ti._precomputed1); + }, + $isEfficientLengthIterable: 1, + $isSet: 1 + }; + A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin.prototype = {}; + A.DefaultEquality.prototype = {}; + A.IterableEquality.prototype = { + equals$2(_, elements1, elements2) { + var it1, it2, hasNext; + if (elements1 === elements2) + return true; + it1 = J.get$iterator$ax(elements1); + it2 = J.get$iterator$ax(elements2); + for (; true;) { + hasNext = it1.moveNext$0(); + if (hasNext !== it2.moveNext$0()) + return false; + if (!hasNext) + return true; + if (!J.$eq$(it1.get$current(it1), it2.get$current(it2))) + return false; + } + }, + hash$1(elements) { + var t1, hash, _i; + for (t1 = elements.length, hash = 0, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) { + hash = hash + J.get$hashCode$(elements[_i]) & 2147483647; + hash = hash + (hash << 10 >>> 0) & 2147483647; + hash ^= hash >>> 6; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A.ListEquality.prototype = { + equals$2(_, list1, list2) { + var t1, $length, t2, i; + if (list1 == null ? list2 == null : list1 === list2) + return true; + if (list1 == null || list2 == null) + return false; + t1 = J.getInterceptor$asx(list1); + $length = t1.get$length(list1); + t2 = J.getInterceptor$asx(list2); + if ($length !== t2.get$length(list2)) + return false; + for (i = 0; i < $length; ++i) + if (!J.$eq$(t1.$index(list1, i), t2.$index(list2, i))) + return false; + return true; + }, + hash$1(list) { + var hash, i; + for (hash = 0, i = 0; i < list.length; ++i) { + hash = hash + J.get$hashCode$(list[i]) & 2147483647; + hash = hash + (hash << 10 >>> 0) & 2147483647; + hash ^= hash >>> 6; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A._MapEntry.prototype = { + get$hashCode(_) { + return 3 * J.get$hashCode$(this.key) + 7 * J.get$hashCode$(this.value) & 2147483647; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._MapEntry && J.$eq$(this.key, other.key) && J.$eq$(this.value, other.value); + } + }; + A.MapEquality.prototype = { + equals$2(_, map1, map2) { + var equalElementCounts, t1, key, entry, count; + if (map1 === map2) + return true; + if (map1.get$length(map1) !== map2.get$length(map2)) + return false; + equalElementCounts = A.HashMap_HashMap(type$._MapEntry, type$.int); + for (t1 = J.get$iterator$ax(map1.get$keys(map1)); t1.moveNext$0();) { + key = t1.get$current(t1); + entry = new A._MapEntry(this, key, map1.$index(0, key)); + count = equalElementCounts.$index(0, entry); + equalElementCounts.$indexSet(0, entry, (count == null ? 0 : count) + 1); + } + for (t1 = J.get$iterator$ax(map2.get$keys(map2)); t1.moveNext$0();) { + key = t1.get$current(t1); + entry = new A._MapEntry(this, key, map2.$index(0, key)); + count = equalElementCounts.$index(0, entry); + if (count == null || count === 0) + return false; + equalElementCounts.$indexSet(0, entry, count - 1); + } + return true; + }, + hash$1(map) { + var t1, t2, hash, key, keyHash, t3; + for (t1 = J.get$iterator$ax(map.get$keys(map)), t2 = this.$ti._rest[1], hash = 0; t1.moveNext$0();) { + key = t1.get$current(t1); + keyHash = J.get$hashCode$(key); + t3 = map.$index(0, key); + hash = hash + 3 * keyHash + 7 * J.get$hashCode$(t3 == null ? t2._as(t3) : t3) & 2147483647; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A.QueueList.prototype = { + add$1(_, element) { + this._queue_list$_add$1(element); + }, + addAll$1(_, iterable) { + var addCount, $length, t1, endSpace, t2, preSpace, _this = this; + if (type$.List_dynamic._is(iterable)) { + addCount = J.get$length$asx(iterable); + $length = _this.get$length(0); + t1 = $length + addCount; + if (t1 >= J.get$length$asx(_this._queue_list$_table)) { + _this._preGrow$1(t1); + J.setRange$4$ax(_this._queue_list$_table, $length, t1, iterable, 0); + _this.set$_queue_list$_tail(_this.get$_queue_list$_tail() + addCount); + } else { + endSpace = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_tail(); + t1 = _this._queue_list$_table; + t2 = J.getInterceptor$ax(t1); + if (addCount < endSpace) { + t2.setRange$4(t1, _this.get$_queue_list$_tail(), _this.get$_queue_list$_tail() + addCount, iterable, 0); + _this.set$_queue_list$_tail(_this.get$_queue_list$_tail() + addCount); + } else { + preSpace = addCount - endSpace; + t2.setRange$4(t1, _this.get$_queue_list$_tail(), _this.get$_queue_list$_tail() + endSpace, iterable, 0); + J.setRange$4$ax(_this._queue_list$_table, 0, preSpace, iterable, endSpace); + _this.set$_queue_list$_tail(preSpace); + } + } + } else + for (t1 = J.get$iterator$ax(iterable); t1.moveNext$0();) + _this._queue_list$_add$1(t1.get$current(t1)); + }, + cast$1$0(_, $T) { + return new A._CastQueueList(this, J.cast$1$0$ax(this._queue_list$_table, $T), -1, -1, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("_CastQueueList<1,2>")); + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + addFirst$1(element) { + var _this = this; + _this.set$_queue_list$_head((_this.get$_queue_list$_head() - 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_head(), element); + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + _this._queue_list$_grow$0(); + }, + removeFirst$0() { + var result, _this = this; + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + throw A.wrapException(A.StateError$("No element")); + result = J.$index$asx(_this._queue_list$_table, _this.get$_queue_list$_head()); + if (result == null) + result = A._instanceType(_this)._eval$1("QueueList.E")._as(result); + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_head(), null); + _this.set$_queue_list$_head((_this.get$_queue_list$_head() + 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + return result; + }, + removeLast$0(_) { + var result, _this = this; + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + throw A.wrapException(A.StateError$("No element")); + _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() - 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + result = J.$index$asx(_this._queue_list$_table, _this.get$_queue_list$_tail()); + if (result == null) + result = A._instanceType(_this)._eval$1("QueueList.E")._as(result); + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_tail(), null); + return result; + }, + get$length(_) { + return (this.get$_queue_list$_tail() - this.get$_queue_list$_head() & J.get$length$asx(this._queue_list$_table) - 1) >>> 0; + }, + set$length(_, value) { + var delta, newTail, t1, t2, _this = this; + if (value < 0) + throw A.wrapException(A.RangeError$("Length " + value + " may not be negative.")); + if (value > _this.get$length(0) && !A._instanceType(_this)._eval$1("QueueList.E")._is(null)) + throw A.wrapException(A.UnsupportedError$("The length can only be increased when the element type is nullable, but the current element type is `" + A.createRuntimeType(A._instanceType(_this)._eval$1("QueueList.E")).toString$0(0) + "`.")); + delta = value - _this.get$length(0); + if (delta >= 0) { + if (J.get$length$asx(_this._queue_list$_table) <= value) + _this._preGrow$1(value); + _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() + delta & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + return; + } + newTail = _this.get$_queue_list$_tail() + delta; + t1 = _this._queue_list$_table; + if (newTail >= 0) + J.fillRange$3$ax(t1, newTail, _this.get$_queue_list$_tail(), null); + else { + newTail += J.get$length$asx(t1); + J.fillRange$3$ax(_this._queue_list$_table, 0, _this.get$_queue_list$_tail(), null); + t1 = _this._queue_list$_table; + t2 = J.getInterceptor$asx(t1); + t2.fillRange$3(t1, newTail, t2.get$length(t1), null); + } + _this.set$_queue_list$_tail(newTail); + }, + $index(_, index) { + var t1, _this = this; + if (index < 0 || index >= _this.get$length(0)) + throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(0) + ").")); + t1 = J.$index$asx(_this._queue_list$_table, (_this.get$_queue_list$_head() + index & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + return t1 == null ? A._instanceType(_this)._eval$1("QueueList.E")._as(t1) : t1; + }, + $indexSet(_, index, value) { + var _this = this; + if (index < 0 || index >= _this.get$length(0)) + throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(0) + ").")); + J.$indexSet$ax(_this._queue_list$_table, (_this.get$_queue_list$_head() + index & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0, value); + }, + _queue_list$_add$1(element) { + var _this = this; + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_tail(), element); + _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() + 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + _this._queue_list$_grow$0(); + }, + _queue_list$_grow$0() { + var _this = this, + newTable = A.List_List$filled(J.get$length$asx(_this._queue_list$_table) * 2, null, false, A._instanceType(_this)._eval$1("QueueList.E?")), + split = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_head(); + B.JSArray_methods.setRange$4(newTable, 0, split, _this._queue_list$_table, _this.get$_queue_list$_head()); + B.JSArray_methods.setRange$4(newTable, split, split + _this.get$_queue_list$_head(), _this._queue_list$_table, 0); + _this.set$_queue_list$_head(0); + _this.set$_queue_list$_tail(J.get$length$asx(_this._queue_list$_table)); + _this._queue_list$_table = newTable; + }, + _writeToList$1(target) { + var $length, firstPartSize, _this = this; + if (_this.get$_queue_list$_head() <= _this.get$_queue_list$_tail()) { + $length = _this.get$_queue_list$_tail() - _this.get$_queue_list$_head(); + B.JSArray_methods.setRange$4(target, 0, $length, _this._queue_list$_table, _this.get$_queue_list$_head()); + return $length; + } else { + firstPartSize = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_head(); + B.JSArray_methods.setRange$4(target, 0, firstPartSize, _this._queue_list$_table, _this.get$_queue_list$_head()); + B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this.get$_queue_list$_tail(), _this._queue_list$_table, 0); + return _this.get$_queue_list$_tail() + firstPartSize; + } + }, + _preGrow$1(newElementCount) { + var _this = this, + newTable = A.List_List$filled(A.QueueList__nextPowerOf2(newElementCount + B.JSInt_methods._shrOtherPositive$1(newElementCount, 1)), null, false, A._instanceType(_this)._eval$1("QueueList.E?")); + _this.set$_queue_list$_tail(_this._writeToList$1(newTable)); + _this._queue_list$_table = newTable; + _this.set$_queue_list$_head(0); + }, + $isEfficientLengthIterable: 1, + $isQueue: 1, + $isIterable: 1, + $isList: 1, + get$_queue_list$_head() { + return this._queue_list$_head; + }, + get$_queue_list$_tail() { + return this._queue_list$_tail; + }, + set$_queue_list$_head(val) { + return this._queue_list$_head = val; + }, + set$_queue_list$_tail(val) { + return this._queue_list$_tail = val; + } + }; + A._CastQueueList.prototype = { + get$_queue_list$_head() { + return this._queue_list$_delegate.get$_queue_list$_head(); + }, + set$_queue_list$_head(value) { + this._queue_list$_delegate.set$_queue_list$_head(value); + }, + get$_queue_list$_tail() { + return this._queue_list$_delegate.get$_queue_list$_tail(); + }, + set$_queue_list$_tail(value) { + this._queue_list$_delegate.set$_queue_list$_tail(value); + } + }; + A._QueueList_Object_ListMixin.prototype = {}; + A.UnionSet.prototype = { + get$length(_) { + var t1 = this.get$_union_set$_iterable().get$length(0); + return t1; + }, + get$iterator(_) { + var t1 = this.get$_union_set$_iterable(); + return t1.get$iterator(t1); + }, + get$_union_set$_iterable() { + var t1 = this._sets, + t2 = this.$ti._precomputed1, + t3 = A._instanceType(t1)._eval$1("@<1>")._bind$1(t2)._eval$1("ExpandIterable<1,2>"); + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + return new A.WhereIterable(new A.ExpandIterable(t1, new A.UnionSet__iterable_closure(this), t3), t2.get$add(t2), t3._eval$1("WhereIterable")); + }, + contains$1(_, element) { + return this._sets.any$1(0, new A.UnionSet_contains_closure(this, element)); + }, + toSet$0(_) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(this.$ti._precomputed1); + for (t2 = this._sets, t2 = A._LinkedHashSetIterator$(t2, t2._modifications, A._instanceType(t2)._precomputed1), t3 = t2.$ti._precomputed1; t2.moveNext$0();) { + t4 = t2._collection$_current; + t1.addAll$1(0, t4 == null ? t3._as(t4) : t4); + } + return t1; + } + }; + A.UnionSet__iterable_closure.prototype = { + call$1(set) { + return set; + }, + $signature() { + return this.$this.$ti._eval$1("Set<1>(Set<1>)"); + } + }; + A.UnionSet_contains_closure.prototype = { + call$1(set) { + return set.contains$1(0, this.element); + }, + $signature() { + return this.$this.$ti._eval$1("bool(Set<1>)"); + } + }; + A._UnionSet_SetBase_UnmodifiableSetMixin.prototype = {}; + A.UnmodifiableSetView0.prototype = {}; + A.UnmodifiableSetMixin.prototype = { + add$1(_, value) { + return A.UnmodifiableSetMixin__throw(); + }, + addAll$1(_, elements) { + return A.UnmodifiableSetMixin__throw(); + }, + remove$1(_, value) { + return A.UnmodifiableSetMixin__throw(); + } + }; + A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin.prototype = {}; + A._DelegatingIterableBase.prototype = { + any$1(_, test) { + return J.any$1$ax(this.get$_base(), test); + }, + contains$1(_, element) { + return J.contains$1$asx(this.get$_base(), element); + }, + elementAt$1(_, index) { + return J.elementAt$1$ax(this.get$_base(), index); + }, + every$1(_, test) { + return J.every$1$ax(this.get$_base(), test); + }, + get$first(_) { + return J.get$first$ax(this.get$_base()); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.get$_base()); + }, + get$isNotEmpty(_) { + return J.get$isNotEmpty$asx(this.get$_base()); + }, + get$iterator(_) { + return J.get$iterator$ax(this.get$_base()); + }, + get$last(_) { + return J.get$last$ax(this.get$_base()); + }, + get$length(_) { + return J.get$length$asx(this.get$_base()); + }, + map$1$1(_, f, $T) { + return J.map$1$1$ax(this.get$_base(), f, $T); + }, + get$single(_) { + return J.get$single$ax(this.get$_base()); + }, + skip$1(_, n) { + return J.skip$1$ax(this.get$_base(), n); + }, + take$1(_, n) { + return J.take$1$ax(this.get$_base(), n); + }, + toList$1$growable(_, growable) { + return J.toList$1$growable$ax(this.get$_base(), true); + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + return J.toSet$0$ax(this.get$_base()); + }, + where$1(_, test) { + return J.where$1$ax(this.get$_base(), test); + }, + toString$0(_) { + return J.toString$0$(this.get$_base()); + }, + $isIterable: 1 + }; + A.DelegatingSet.prototype = { + add$1(_, value) { + return this._base.add$1(0, value); + }, + addAll$1(_, elements) { + this._base.addAll$1(0, elements); + }, + toSet$0(_) { + return new A.DelegatingSet(this._base.toSet$0(0), A._instanceType(this)._eval$1("DelegatingSet<1>")); + }, + $isEfficientLengthIterable: 1, + $isSet: 1, + get$_base() { + return this._base; + } + }; + A.MapKeySet.prototype = { + get$_base() { + var t1 = this._baseMap; + return t1.get$keys(t1); + }, + contains$1(_, element) { + return this._baseMap.containsKey$1(element); + }, + get$isEmpty(_) { + var t1 = this._baseMap; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._baseMap; + return t1.get$isNotEmpty(t1); + }, + get$length(_) { + var t1 = this._baseMap; + return t1.get$length(t1); + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + difference$1(other) { + return J.where$1$ax(this.get$_base(), new A.MapKeySet_difference_closure(this, other)).toSet$0(0); + }, + $isEfficientLengthIterable: 1, + $isSet: 1 + }; + A.MapKeySet_difference_closure.prototype = { + call$1(element) { + return !this.other._source.contains$1(0, element); + }, + $signature() { + return this.$this.$ti._eval$1("bool(1)"); + } + }; + A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin.prototype = {}; + A.BufferModule.prototype = {}; + A.BufferConstants.prototype = {}; + A.Buffer.prototype = {}; + A.ConsoleModule.prototype = {}; + A.Console.prototype = {}; + A.EventEmitter.prototype = {}; + A.FS.prototype = {}; + A.FSConstants.prototype = {}; + A.FSWatcher.prototype = {}; + A.ReadStream.prototype = {}; + A.ReadStreamOptions.prototype = {}; + A.WriteStream.prototype = {}; + A.WriteStreamOptions.prototype = {}; + A.FileOptions.prototype = {}; + A.StatOptions.prototype = {}; + A.MkdirOptions.prototype = {}; + A.RmdirOptions.prototype = {}; + A.WatchOptions.prototype = {}; + A.WatchFileOptions.prototype = {}; + A.Stats.prototype = {}; + A.Promise.prototype = {}; + A.Date.prototype = {}; + A.JsError.prototype = {}; + A.Atomics.prototype = {}; + A.Modules.prototype = {}; + A.Module.prototype = {}; + A.Net.prototype = {}; + A.Socket.prototype = {}; + A.NetAddress.prototype = {}; + A.NetServer.prototype = {}; + A.NodeJsError.prototype = {}; + A.JsAssertionError.prototype = {}; + A.JsRangeError.prototype = {}; + A.JsReferenceError.prototype = {}; + A.JsSyntaxError.prototype = {}; + A.JsTypeError.prototype = {}; + A.JsSystemError.prototype = {}; + A.Process.prototype = {}; + A.CPUUsage.prototype = {}; + A.Release.prototype = {}; + A.StreamModule.prototype = {}; + A.Readable.prototype = {}; + A.Writable.prototype = {}; + A.Duplex.prototype = {}; + A.Transform.prototype = {}; + A.WritableOptions.prototype = {}; + A.ReadableOptions.prototype = {}; + A.Immediate.prototype = {}; + A.Timeout.prototype = {}; + A.TTY.prototype = {}; + A.TTYReadStream.prototype = {}; + A.TTYWriteStream.prototype = {}; + A.Util.prototype = {}; + A.promiseToFuture_closure.prototype = { + call$1(value) { + this.completer.complete$1(value); + }, + $signature: 63 + }; + A.promiseToFuture_closure0.prototype = { + call$1(error) { + this.completer.completeError$1(error); + }, + $signature: 63 + }; + A.futureToPromise_closure.prototype = { + call$2(resolve, reject) { + this.future.then$1$2$onError(0, new A.futureToPromise__closure(resolve, this.T), reject, type$.dynamic); + }, + $signature: 482 + }; + A.futureToPromise__closure.prototype = { + call$1(result) { + return this.resolve.call$1(result); + }, + $signature() { + return this.T._eval$1("@(0)"); + } + }; + A.Context.prototype = { + absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { + var t1; + A._validateArgList("absolute", A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15], type$.JSArray_nullable_String)); + if (part2 == null) { + t1 = this.style; + t1 = t1.rootLength$1(part1) > 0 && !t1.isRootRelative$1(part1); + } else + t1 = false; + if (t1) + return part1; + t1 = this._context$_current; + return this.join$16(0, t1 == null ? A.current() : t1, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15); + }, + absolute$1(part1) { + var _null = null; + return this.absolute$15(part1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, + dirname$1(path) { + var t1, t2, + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + parsed.removeTrailingSeparators$0(); + t1 = parsed.parts; + t2 = t1.length; + if (t2 === 0) { + t1 = parsed.root; + return t1 == null ? "." : t1; + } + if (t2 === 1) { + t1 = parsed.root; + return t1 == null ? "." : t1; + } + B.JSArray_methods.removeLast$0(t1); + parsed.separators.pop(); + parsed.removeTrailingSeparators$0(); + return parsed.toString$0(0); + }, + join$16(_, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15, part16) { + var parts = A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15, part16], type$.JSArray_nullable_String); + A._validateArgList("join", parts); + return this.joinAll$1(new A.WhereTypeIterable(parts, type$.WhereTypeIterable_String)); + }, + join$2(_, part1, part2) { + var _null = null; + return this.join$16(0, part1, part2, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, + joinAll$1(parts) { + var t1, t2, t3, needsSeparator, isAbsoluteAndNotRootRelative, t4, t5, parsed, path; + for (t1 = J.where$1$ax(parts, new A.Context_joinAll_closure()), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new A.WhereIterator(t2, t1._f), t3 = this.style, needsSeparator = false, isAbsoluteAndNotRootRelative = false, t4 = ""; t1.moveNext$0();) { + t5 = t2.get$current(t2); + if (t3.isRootRelative$1(t5) && isAbsoluteAndNotRootRelative) { + parsed = A.ParsedPath_ParsedPath$parse(t5, t3); + path = t4.charCodeAt(0) == 0 ? t4 : t4; + t4 = B.JSString_methods.substring$2(path, 0, t3.rootLength$2$withDrive(path, true)); + parsed.root = t4; + if (t3.needsSeparator$1(t4)) + parsed.separators[0] = t3.get$separator(t3); + t4 = "" + parsed.toString$0(0); + } else if (t3.rootLength$1(t5) > 0) { + isAbsoluteAndNotRootRelative = !t3.isRootRelative$1(t5); + t4 = "" + t5; + } else { + if (!(t5.length !== 0 && t3.containsSeparator$1(t5[0]))) + if (needsSeparator) + t4 += t3.get$separator(t3); + t4 += t5; + } + needsSeparator = t3.needsSeparator$1(t5); + } + return t4.charCodeAt(0) == 0 ? t4 : t4; + }, + split$1(_, path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this.style), + t1 = parsed.parts, + t2 = A._arrayInstanceType(t1)._eval$1("WhereIterable<1>"); + t2 = A.List_List$of(new A.WhereIterable(t1, new A.Context_split_closure(), t2), true, t2._eval$1("Iterable.E")); + parsed.parts = t2; + t1 = parsed.root; + if (t1 != null) + B.JSArray_methods.insert$2(t2, 0, t1); + return parsed.parts; + }, + canonicalize$1(_, path) { + var t1, parsed; + path = this.absolute$1(path); + t1 = this.style; + if (t1 !== $.$get$Style_windows() && !this._needsNormalization$1(path)) + return path; + parsed = A.ParsedPath_ParsedPath$parse(path, t1); + parsed.normalize$1$canonicalize(true); + return parsed.toString$0(0); + }, + normalize$1(path) { + var parsed; + if (!this._needsNormalization$1(path)) + return path; + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + parsed.normalize$0(); + return parsed.toString$0(0); + }, + _needsNormalization$1(path) { + var i, start, previous, t2, t3, previousPrevious, codeUnit, t4, + t1 = this.style, + root = t1.rootLength$1(path); + if (root !== 0) { + if (t1 === $.$get$Style_windows()) + for (i = 0; i < root; ++i) + if (path.charCodeAt(i) === 47) + return true; + start = root; + previous = 47; + } else { + start = 0; + previous = null; + } + for (t2 = new A.CodeUnits(path)._string, t3 = t2.length, i = start, previousPrevious = null; i < t3; ++i, previousPrevious = previous, previous = codeUnit) { + codeUnit = t2.charCodeAt(i); + if (t1.isSeparator$1(codeUnit)) { + if (t1 === $.$get$Style_windows() && codeUnit === 47) + return true; + if (previous != null && t1.isSeparator$1(previous)) + return true; + if (previous === 46) + t4 = previousPrevious == null || previousPrevious === 46 || t1.isSeparator$1(previousPrevious); + else + t4 = false; + if (t4) + return true; + } + } + if (previous == null) + return true; + if (t1.isSeparator$1(previous)) + return true; + if (previous === 46) + t1 = previousPrevious == null || t1.isSeparator$1(previousPrevious) || previousPrevious === 46; + else + t1 = false; + if (t1) + return true; + return false; + }, + relative$2$from(path, from) { + var fromParsed, pathParsed, t2, t3, _this = this, + _s26_ = 'Unable to find a path to "', + t1 = from == null; + if (t1 && _this.style.rootLength$1(path) <= 0) + return _this.normalize$1(path); + if (t1) { + t1 = _this._context$_current; + from = t1 == null ? A.current() : t1; + } else + from = _this.absolute$1(from); + t1 = _this.style; + if (t1.rootLength$1(from) <= 0 && t1.rootLength$1(path) > 0) + return _this.normalize$1(path); + if (t1.rootLength$1(path) <= 0 || t1.isRootRelative$1(path)) + path = _this.absolute$1(path); + if (t1.rootLength$1(path) <= 0 && t1.rootLength$1(from) > 0) + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + fromParsed = A.ParsedPath_ParsedPath$parse(from, t1); + fromParsed.normalize$0(); + pathParsed = A.ParsedPath_ParsedPath$parse(path, t1); + pathParsed.normalize$0(); + t2 = fromParsed.parts; + if (t2.length !== 0 && J.$eq$(t2[0], ".")) + return pathParsed.toString$0(0); + t2 = fromParsed.root; + t3 = pathParsed.root; + if (t2 != t3) + t2 = t2 == null || t3 == null || !t1.pathsEqual$2(t2, t3); + else + t2 = false; + if (t2) + return pathParsed.toString$0(0); + while (true) { + t2 = fromParsed.parts; + if (t2.length !== 0) { + t3 = pathParsed.parts; + t2 = t3.length !== 0 && t1.pathsEqual$2(t2[0], t3[0]); + } else + t2 = false; + if (!t2) + break; + B.JSArray_methods.removeAt$1(fromParsed.parts, 0); + B.JSArray_methods.removeAt$1(fromParsed.separators, 1); + B.JSArray_methods.removeAt$1(pathParsed.parts, 0); + B.JSArray_methods.removeAt$1(pathParsed.separators, 1); + } + t2 = fromParsed.parts; + if (t2.length !== 0 && J.$eq$(t2[0], "..")) + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + t2 = type$.String; + B.JSArray_methods.insertAll$2(pathParsed.parts, 0, A.List_List$filled(fromParsed.parts.length, "..", false, t2)); + t3 = pathParsed.separators; + t3[0] = ""; + B.JSArray_methods.insertAll$2(t3, 1, A.List_List$filled(fromParsed.parts.length, t1.get$separator(t1), false, t2)); + t1 = pathParsed.parts; + t2 = t1.length; + if (t2 === 0) + return "."; + if (t2 > 1 && J.$eq$(B.JSArray_methods.get$last(t1), ".")) { + B.JSArray_methods.removeLast$0(pathParsed.parts); + t1 = pathParsed.separators; + t1.pop(); + t1.pop(); + t1.push(""); + } + pathParsed.root = ""; + pathParsed.removeTrailingSeparators$0(); + return pathParsed.toString$0(0); + }, + relative$1(path) { + return this.relative$2$from(path, null); + }, + _isWithinOrEquals$2($parent, child) { + var relative, t1, parentIsAbsolute, childIsAbsolute, childIsRootRelative, parentIsRootRelative, result, exception, _this = this; + $parent = $parent; + child = child; + t1 = _this.style; + parentIsAbsolute = t1.rootLength$1($parent) > 0; + childIsAbsolute = t1.rootLength$1(child) > 0; + if (parentIsAbsolute && !childIsAbsolute) { + child = _this.absolute$1(child); + if (t1.isRootRelative$1($parent)) + $parent = _this.absolute$1($parent); + } else if (childIsAbsolute && !parentIsAbsolute) { + $parent = _this.absolute$1($parent); + if (t1.isRootRelative$1(child)) + child = _this.absolute$1(child); + } else if (childIsAbsolute && parentIsAbsolute) { + childIsRootRelative = t1.isRootRelative$1(child); + parentIsRootRelative = t1.isRootRelative$1($parent); + if (childIsRootRelative && !parentIsRootRelative) + child = _this.absolute$1(child); + else if (parentIsRootRelative && !childIsRootRelative) + $parent = _this.absolute$1($parent); + } + result = _this._isWithinOrEqualsFast$2($parent, child); + if (result !== B._PathRelation_inconclusive) + return result; + relative = null; + try { + relative = _this.relative$2$from(child, $parent); + } catch (exception) { + if (A.unwrapException(exception) instanceof A.PathException) + return B._PathRelation_different; + else + throw exception; + } + if (t1.rootLength$1(relative) > 0) + return B._PathRelation_different; + if (J.$eq$(relative, ".")) + return B._PathRelation_equal; + if (J.$eq$(relative, "..")) + return B._PathRelation_different; + return J.get$length$asx(relative) >= 3 && J.startsWith$1$s(relative, "..") && t1.isSeparator$1(J.codeUnitAt$1$s(relative, 2)) ? B._PathRelation_different : B._PathRelation_within; + }, + _isWithinOrEqualsFast$2($parent, child) { + var t1, parentRootLength, childRootLength, i, t2, t3, childIndex, parentIndex, lastCodeUnit, lastParentSeparator, parentCodeUnit, childCodeUnit, parentIndex0, direction, _this = this; + if ($parent === ".") + $parent = ""; + t1 = _this.style; + parentRootLength = t1.rootLength$1($parent); + childRootLength = t1.rootLength$1(child); + if (parentRootLength !== childRootLength) + return B._PathRelation_different; + for (i = 0; i < parentRootLength; ++i) + if (!t1.codeUnitsEqual$2($parent.charCodeAt(i), child.charCodeAt(i))) + return B._PathRelation_different; + t2 = child.length; + t3 = $parent.length; + childIndex = childRootLength; + parentIndex = parentRootLength; + lastCodeUnit = 47; + lastParentSeparator = null; + while (true) { + if (!(parentIndex < t3 && childIndex < t2)) + break; + c$0: { + parentCodeUnit = $parent.charCodeAt(parentIndex); + childCodeUnit = child.charCodeAt(childIndex); + if (t1.codeUnitsEqual$2(parentCodeUnit, childCodeUnit)) { + if (t1.isSeparator$1(parentCodeUnit)) + lastParentSeparator = parentIndex; + ++parentIndex; + ++childIndex; + lastCodeUnit = parentCodeUnit; + break c$0; + } + if (t1.isSeparator$1(parentCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { + parentIndex0 = parentIndex + 1; + lastParentSeparator = parentIndex; + parentIndex = parentIndex0; + break c$0; + } else if (t1.isSeparator$1(childCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { + ++childIndex; + break c$0; + } + if (parentCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { + ++parentIndex; + if (parentIndex === t3) + break; + parentCodeUnit = $parent.charCodeAt(parentIndex); + if (t1.isSeparator$1(parentCodeUnit)) { + parentIndex0 = parentIndex + 1; + lastParentSeparator = parentIndex; + parentIndex = parentIndex0; + break c$0; + } + if (parentCodeUnit === 46) { + ++parentIndex; + if (parentIndex === t3 || t1.isSeparator$1($parent.charCodeAt(parentIndex))) + return B._PathRelation_inconclusive; + } + } + if (childCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { + ++childIndex; + if (childIndex === t2) + break; + childCodeUnit = child.charCodeAt(childIndex); + if (t1.isSeparator$1(childCodeUnit)) { + ++childIndex; + break c$0; + } + if (childCodeUnit === 46) { + ++childIndex; + if (childIndex === t2 || t1.isSeparator$1(child.charCodeAt(childIndex))) + return B._PathRelation_inconclusive; + } + } + if (_this._pathDirection$2(child, childIndex) !== B._PathDirection_yLX) + return B._PathRelation_inconclusive; + if (_this._pathDirection$2($parent, parentIndex) !== B._PathDirection_yLX) + return B._PathRelation_inconclusive; + return B._PathRelation_different; + } + } + if (childIndex === t2) { + if (parentIndex === t3 || t1.isSeparator$1($parent.charCodeAt(parentIndex))) + lastParentSeparator = parentIndex; + else if (lastParentSeparator == null) + lastParentSeparator = Math.max(0, parentRootLength - 1); + direction = _this._pathDirection$2($parent, lastParentSeparator); + if (direction === B._PathDirection_8OV) + return B._PathRelation_equal; + return direction === B._PathDirection_3KU ? B._PathRelation_inconclusive : B._PathRelation_different; + } + direction = _this._pathDirection$2(child, childIndex); + if (direction === B._PathDirection_8OV) + return B._PathRelation_equal; + if (direction === B._PathDirection_3KU) + return B._PathRelation_inconclusive; + return t1.isSeparator$1(child.charCodeAt(childIndex)) || t1.isSeparator$1(lastCodeUnit) ? B._PathRelation_within : B._PathRelation_different; + }, + _pathDirection$2(path, index) { + var t1, t2, i, depth, reachedRoot, i0, t3; + for (t1 = path.length, t2 = this.style, i = index, depth = 0, reachedRoot = false; i < t1;) { + while (true) { + if (!(i < t1 && t2.isSeparator$1(path.charCodeAt(i)))) + break; + ++i; + } + if (i === t1) + break; + i0 = i; + while (true) { + if (!(i0 < t1 && !t2.isSeparator$1(path.charCodeAt(i0)))) + break; + ++i0; + } + t3 = i0 - i; + if (!(t3 === 1 && path.charCodeAt(i) === 46)) + if (t3 === 2 && path.charCodeAt(i) === 46 && path.charCodeAt(i + 1) === 46) { + --depth; + if (depth < 0) + break; + if (depth === 0) + reachedRoot = true; + } else + ++depth; + if (i0 === t1) + break; + i = i0 + 1; + } + if (depth < 0) + return B._PathDirection_3KU; + if (depth === 0) + return B._PathDirection_8OV; + if (reachedRoot) + return B._PathDirection_e7w; + return B._PathDirection_yLX; + }, + hash$1(path) { + var result, parsed, t1, _this = this; + path = _this.absolute$1(path); + result = _this._hashFast$1(path); + if (result != null) + return result; + parsed = A.ParsedPath_ParsedPath$parse(path, _this.style); + parsed.normalize$0(); + t1 = _this._hashFast$1(parsed.toString$0(0)); + t1.toString; + return t1; + }, + _hashFast$1(path) { + var t1, t2, hash, beginning, wasSeparator, i, codeUnit, t3, next; + for (t1 = path.length, t2 = this.style, hash = 4603, beginning = true, wasSeparator = true, i = 0; i < t1; ++i) { + codeUnit = t2.canonicalizeCodeUnit$1(path.charCodeAt(i)); + if (t2.isSeparator$1(codeUnit)) { + wasSeparator = true; + continue; + } + if (codeUnit === 46 && wasSeparator) { + t3 = i + 1; + if (t3 === t1) + break; + next = path.charCodeAt(t3); + if (t2.isSeparator$1(next)) + continue; + t3 = false; + if (!beginning) + if (next === 46) { + t3 = i + 2; + t3 = t3 === t1 || t2.isSeparator$1(path.charCodeAt(t3)); + } + if (t3) + return null; + } + hash = ((hash & 67108863) * 33 ^ codeUnit) >>> 0; + beginning = false; + wasSeparator = false; + } + return hash; + }, + withoutExtension$1(path) { + var i, + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + for (i = parsed.parts.length - 1; i >= 0; --i) + if (J.get$length$asx(parsed.parts[i]) !== 0) { + parsed.parts[i] = parsed._splitExtension$0()[0]; + break; + } + return parsed.toString$0(0); + }, + toUri$1(path) { + var t2, + t1 = this.style; + if (t1.rootLength$1(path) <= 0) + return t1.relativePathToUri$1(path); + else { + t2 = this._context$_current; + return t1.absolutePathToUri$1(this.join$2(0, t2 == null ? A.current() : t2, path)); + } + }, + prettyUri$1(uri) { + var path, rel, _this = this, + typedUri = A._parseUri(uri); + if (typedUri.get$scheme() === "file" && _this.style === $.$get$Style_url()) + return typedUri.toString$0(0); + else if (typedUri.get$scheme() !== "file" && typedUri.get$scheme() !== "" && _this.style !== $.$get$Style_url()) + return typedUri.toString$0(0); + path = _this.normalize$1(_this.style.pathFromUri$1(A._parseUri(typedUri))); + rel = _this.relative$1(path); + return _this.split$1(0, rel).length > _this.split$1(0, path).length ? path : rel; + } + }; + A.Context_joinAll_closure.prototype = { + call$1(part) { + return part !== ""; + }, + $signature: 5 + }; + A.Context_split_closure.prototype = { + call$1(part) { + return part.length !== 0; + }, + $signature: 5 + }; + A._validateArgList_closure.prototype = { + call$1(arg) { + return arg == null ? "null" : '"' + arg + '"'; + }, + $signature: 626 + }; + A._PathDirection.prototype = { + toString$0(_) { + return this.name; + } + }; + A._PathRelation.prototype = { + toString$0(_) { + return this.name; + } + }; + A.InternalStyle.prototype = { + getRoot$1(path) { + var $length = this.rootLength$1(path); + if ($length > 0) + return B.JSString_methods.substring$2(path, 0, $length); + return this.isRootRelative$1(path) ? path[0] : null; + }, + relativePathToUri$1(path) { + var segments, _null = null, + t1 = path.length; + if (t1 === 0) + return A._Uri__Uri(_null, _null, _null, _null); + segments = A.Context_Context(this).split$1(0, path); + if (this.isSeparator$1(path.charCodeAt(t1 - 1))) + B.JSArray_methods.add$1(segments, ""); + return A._Uri__Uri(_null, _null, segments, _null); + }, + codeUnitsEqual$2(codeUnit1, codeUnit2) { + return codeUnit1 === codeUnit2; + }, + pathsEqual$2(path1, path2) { + return path1 === path2; + }, + canonicalizeCodeUnit$1(codeUnit) { + return codeUnit; + }, + canonicalizePart$1(part) { + return part; + } + }; + A.ParsedPath.prototype = { + get$basename() { + var _this = this, + t1 = type$.String, + copy = new A.ParsedPath(_this.style, _this.root, _this.isRootRelative, A.List_List$from(_this.parts, true, t1), A.List_List$from(_this.separators, true, t1)); + copy.removeTrailingSeparators$0(); + t1 = copy.parts; + if (t1.length === 0) { + t1 = _this.root; + return t1 == null ? "" : t1; + } + return B.JSArray_methods.get$last(t1); + }, + get$hasTrailingSeparator() { + var t1 = this.parts; + if (t1.length !== 0) + t1 = J.$eq$(B.JSArray_methods.get$last(t1), "") || !J.$eq$(B.JSArray_methods.get$last(this.separators), ""); + else + t1 = false; + return t1; + }, + removeTrailingSeparators$0() { + var t1, t2, _this = this; + while (true) { + t1 = _this.parts; + if (!(t1.length !== 0 && J.$eq$(B.JSArray_methods.get$last(t1), ""))) + break; + B.JSArray_methods.removeLast$0(_this.parts); + _this.separators.pop(); + } + t1 = _this.separators; + t2 = t1.length; + if (t2 !== 0) + t1[t2 - 1] = ""; + }, + normalize$1$canonicalize(canonicalize) { + var t1, t2, t3, leadingDoubles, _i, part, t4, _this = this, + newParts = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.parts, t2 = t1.length, t3 = _this.style, leadingDoubles = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + part = t1[_i]; + t4 = J.getInterceptor$(part); + if (!(t4.$eq(part, ".") || t4.$eq(part, ""))) + if (t4.$eq(part, "..")) + if (newParts.length !== 0) + newParts.pop(); + else + ++leadingDoubles; + else + newParts.push(canonicalize ? t3.canonicalizePart$1(part) : part); + } + if (_this.root == null) + B.JSArray_methods.insertAll$2(newParts, 0, A.List_List$filled(leadingDoubles, "..", false, type$.String)); + if (newParts.length === 0 && _this.root == null) + newParts.push("."); + _this.parts = newParts; + _this.separators = A.List_List$filled(newParts.length + 1, t3.get$separator(t3), true, type$.String); + t1 = _this.root; + if (t1 == null || newParts.length === 0 || !t3.needsSeparator$1(t1)) + _this.separators[0] = ""; + t1 = _this.root; + if (t1 != null && t3 === $.$get$Style_windows()) { + if (canonicalize) + t1 = _this.root = t1.toLowerCase(); + t1.toString; + _this.root = A.stringReplaceAllUnchecked(t1, "/", "\\"); + } + _this.removeTrailingSeparators$0(); + }, + normalize$0() { + return this.normalize$1$canonicalize(false); + }, + toString$0(_) { + var i, _this = this, + t1 = _this.root; + t1 = t1 != null ? "" + t1 : ""; + for (i = 0; i < _this.parts.length; ++i) + t1 = t1 + A.S(_this.separators[i]) + A.S(_this.parts[i]); + t1 += A.S(B.JSArray_methods.get$last(_this.separators)); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _kthLastIndexOf$3(path, character, k) { + var index, count, leftMostIndexedCharacter; + for (index = path.length - 1, count = 0, leftMostIndexedCharacter = 0; index >= 0; --index) + if (path[index] === character) { + ++count; + if (count === k) + return index; + leftMostIndexedCharacter = index; + } + return leftMostIndexedCharacter; + }, + _splitExtension$1(level) { + var t1, file, lastDot; + if (level <= 0) + throw A.wrapException(A.RangeError$value(level, "level", "level's value must be greater than 0")); + t1 = this.parts; + t1 = new A.CastList(t1, A._arrayInstanceType(t1)._eval$1("CastList<1,String?>")); + file = t1.lastWhere$2$orElse(t1, new A.ParsedPath__splitExtension_closure(), new A.ParsedPath__splitExtension_closure0()); + if (file == null) + return A._setArrayType(["", ""], type$.JSArray_String); + if (file === "..") + return A._setArrayType(["..", ""], type$.JSArray_String); + lastDot = this._kthLastIndexOf$3(file, ".", level); + if (lastDot <= 0) + return A._setArrayType([file, ""], type$.JSArray_String); + return A._setArrayType([B.JSString_methods.substring$2(file, 0, lastDot), B.JSString_methods.substring$1(file, lastDot)], type$.JSArray_String); + }, + _splitExtension$0() { + return this._splitExtension$1(1); + } + }; + A.ParsedPath__splitExtension_closure.prototype = { + call$1(p) { + return p !== ""; + }, + $signature: 226 + }; + A.ParsedPath__splitExtension_closure0.prototype = { + call$0() { + return null; + }, + $signature: 1 + }; + A.PathException.prototype = { + toString$0(_) { + return "PathException: " + this.message; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.PathMap.prototype = {}; + A.PathMap__create_closure.prototype = { + call$2(path1, path2) { + if (path1 == null) + return path2 == null; + if (path2 == null) + return false; + return this._box_0.context._isWithinOrEquals$2(path1, path2) === B._PathRelation_equal; + }, + $signature: 664 + }; + A.PathMap__create_closure0.prototype = { + call$1(path) { + return path == null ? 0 : this._box_0.context.hash$1(path); + }, + $signature: 316 + }; + A.PathMap__create_closure1.prototype = { + call$1(path) { + return typeof path == "string" || path == null; + }, + $signature: 132 + }; + A.Style.prototype = { + toString$0(_) { + return this.get$name(this); + } + }; + A.PosixStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47; + }, + needsSeparator$1(path) { + var t1 = path.length; + return t1 !== 0 && path.charCodeAt(t1 - 1) !== 47; + }, + rootLength$2$withDrive(path, withDrive) { + if (path.length !== 0 && path.charCodeAt(0) === 47) + return 1; + return 0; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return false; + }, + pathFromUri$1(uri) { + var t1; + if (uri.get$scheme() === "" || uri.get$scheme() === "file") { + t1 = uri.get$path(uri); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); + } + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); + }, + absolutePathToUri$1(path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.parts; + if (t1.length === 0) + B.JSArray_methods.addAll$1(t1, A._setArrayType(["", ""], type$.JSArray_String)); + else if (parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(null, null, parsed.parts, "file"); + }, + get$name() { + return "posix"; + }, + get$separator() { + return "/"; + } + }; + A.UrlStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47; + }, + needsSeparator$1(path) { + var t1 = path.length; + if (t1 === 0) + return false; + if (path.charCodeAt(t1 - 1) !== 47) + return true; + return B.JSString_methods.endsWith$1(path, "://") && this.rootLength$1(path) === t1; + }, + rootLength$2$withDrive(path, withDrive) { + var i, codeUnit, index, + t1 = path.length; + if (t1 === 0) + return 0; + if (path.charCodeAt(0) === 47) + return 1; + for (i = 0; i < t1; ++i) { + codeUnit = path.charCodeAt(i); + if (codeUnit === 47) + return 0; + if (codeUnit === 58) { + if (i === 0) + return 0; + index = B.JSString_methods.indexOf$2(path, "/", B.JSString_methods.startsWith$2(path, "//", i + 1) ? i + 3 : i); + if (index <= 0) + return t1; + if (!withDrive || t1 < index + 3) + return index; + if (!B.JSString_methods.startsWith$1(path, "file://")) + return index; + t1 = A.driveLetterEnd(path, index + 1); + return t1 == null ? index : t1; + } + } + return 0; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return path.length !== 0 && path.charCodeAt(0) === 47; + }, + pathFromUri$1(uri) { + return uri.toString$0(0); + }, + relativePathToUri$1(path) { + return A.Uri_parse(path); + }, + absolutePathToUri$1(path) { + return A.Uri_parse(path); + }, + get$name() { + return "url"; + }, + get$separator() { + return "/"; + } + }; + A.WindowsStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47 || codeUnit === 92; + }, + needsSeparator$1(path) { + var t1 = path.length; + if (t1 === 0) + return false; + t1 = path.charCodeAt(t1 - 1); + return !(t1 === 47 || t1 === 92); + }, + rootLength$2$withDrive(path, withDrive) { + var index, + t1 = path.length; + if (t1 === 0) + return 0; + if (path.charCodeAt(0) === 47) + return 1; + if (path.charCodeAt(0) === 92) { + if (t1 < 2 || path.charCodeAt(1) !== 92) + return 1; + index = B.JSString_methods.indexOf$2(path, "\\", 2); + if (index > 0) { + index = B.JSString_methods.indexOf$2(path, "\\", index + 1); + if (index > 0) + return index; + } + return t1; + } + if (t1 < 3) + return 0; + if (!A.isAlphabetic(path.charCodeAt(0))) + return 0; + if (path.charCodeAt(1) !== 58) + return 0; + t1 = path.charCodeAt(2); + if (!(t1 === 47 || t1 === 92)) + return 0; + return 3; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return this.rootLength$1(path) === 1; + }, + pathFromUri$1(uri) { + var path, t1; + if (uri.get$scheme() !== "" && uri.get$scheme() !== "file") + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); + path = uri.get$path(uri); + if (uri.get$host() === "") { + if (path.length >= 3 && B.JSString_methods.startsWith$1(path, "/") && A.driveLetterEnd(path, 1) != null) + path = B.JSString_methods.replaceFirst$2(path, "/", ""); + } else + path = "\\\\" + uri.get$host() + path; + t1 = A.stringReplaceAllUnchecked(path, "/", "\\"); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); + }, + absolutePathToUri$1(path) { + var rootParts, t2, + parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.root; + t1.toString; + if (B.JSString_methods.startsWith$1(t1, "\\\\")) { + rootParts = new A.WhereIterable(A._setArrayType(t1.split("\\"), type$.JSArray_String), new A.WindowsStyle_absolutePathToUri_closure(), type$.WhereIterable_String); + B.JSArray_methods.insert$2(parsed.parts, 0, rootParts.get$last(0)); + if (parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(rootParts.get$first(0), null, parsed.parts, "file"); + } else { + if (parsed.parts.length === 0 || parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + t1 = parsed.parts; + t2 = parsed.root; + t2.toString; + t2 = A.stringReplaceAllUnchecked(t2, "/", ""); + B.JSArray_methods.insert$2(t1, 0, A.stringReplaceAllUnchecked(t2, "\\", "")); + return A._Uri__Uri(null, null, parsed.parts, "file"); + } + }, + codeUnitsEqual$2(codeUnit1, codeUnit2) { + var upperCase1; + if (codeUnit1 === codeUnit2) + return true; + if (codeUnit1 === 47) + return codeUnit2 === 92; + if (codeUnit1 === 92) + return codeUnit2 === 47; + if ((codeUnit1 ^ codeUnit2) !== 32) + return false; + upperCase1 = codeUnit1 | 32; + return upperCase1 >= 97 && upperCase1 <= 122; + }, + pathsEqual$2(path1, path2) { + var t1, i; + if (path1 === path2) + return true; + t1 = path1.length; + if (t1 !== path2.length) + return false; + for (i = 0; i < t1; ++i) + if (!this.codeUnitsEqual$2(path1.charCodeAt(i), path2.charCodeAt(i))) + return false; + return true; + }, + canonicalizeCodeUnit$1(codeUnit) { + if (codeUnit === 47) + return 92; + if (codeUnit < 65) + return codeUnit; + if (codeUnit > 90) + return codeUnit; + return codeUnit | 32; + }, + canonicalizePart$1(part) { + return part.toLowerCase(); + }, + get$name() { + return "windows"; + }, + get$separator() { + return "\\"; + } + }; + A.WindowsStyle_absolutePathToUri_closure.prototype = { + call$1(part) { + return part !== ""; + }, + $signature: 5 + }; + A.Version.prototype = { + get$min() { + return this; + }, + get$max() { + return this; + }, + get$includeMin() { + return true; + }, + get$includeMax() { + return true; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.Version && _this.major === other.major && _this.minor === other.minor && _this.patch === other.patch && B.C_IterableEquality.equals$2(0, _this.preRelease, other.preRelease) && B.C_IterableEquality.equals$2(0, _this.build, other.build); + }, + get$hashCode(_) { + var _this = this; + return (_this.major ^ _this.minor ^ _this.patch ^ B.C_IterableEquality.hash$1(_this.preRelease) ^ B.C_IterableEquality.hash$1(_this.build)) >>> 0; + }, + compareTo$1(_, other) { + var t1, t2, t3, comparison, _this = this; + if (other instanceof A.Version) { + t1 = _this.major; + t2 = other.major; + if (t1 !== t2) + return B.JSInt_methods.compareTo$1(t1, t2); + t1 = _this.minor; + t2 = other.minor; + if (t1 !== t2) + return B.JSInt_methods.compareTo$1(t1, t2); + t1 = _this.patch; + t2 = other.patch; + if (t1 !== t2) + return B.JSInt_methods.compareTo$1(t1, t2); + t1 = _this.preRelease; + t2 = t1.length === 0; + if (t2 && other.preRelease.length !== 0) + return 1; + t3 = other.preRelease; + if (t3.length === 0 && !t2) + return -1; + comparison = _this._compareLists$2(t1, t3); + if (comparison !== 0) + return comparison; + t1 = _this.build; + t2 = t1.length === 0; + if (t2 && other.build.length !== 0) + return -1; + t3 = other.build; + if (t3.length === 0 && !t2) + return 1; + return _this._compareLists$2(t1, t3); + } else + return -other.compareTo$1(0, _this); + }, + toString$0(_) { + return this._version$_text; + }, + _compareLists$2(a, b) { + var i, t1, t2, aPart, bPart; + for (i = 0; t1 = a.length, t2 = b.length, i < Math.max(t1, t2); ++i) { + aPart = i < t1 ? a[i] : null; + bPart = i < t2 ? b[i] : null; + if (J.$eq$(aPart, bPart)) + continue; + if (aPart == null) + return -1; + if (bPart == null) + return 1; + if (typeof aPart == "number") + if (typeof bPart == "number") + return B.JSNumber_methods.compareTo$1(aPart, bPart); + else + return -1; + else if (typeof bPart == "number") + return 1; + else { + A._asString(aPart); + A._asString(bPart); + if (aPart === bPart) + t1 = 0; + else + t1 = aPart < bPart ? -1 : 1; + return t1; + } + } + return 0; + }, + $isComparable: 1, + $isVersionRange: 1 + }; + A.Version__splitParts_closure.prototype = { + call$1(part) { + var t1 = A.Primitives_parseInt(part, null); + return t1 == null ? part : t1; + }, + $signature: 379 + }; + A.VersionRange.prototype = { + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!type$.VersionRange._is(other)) + return false; + t1 = false; + if (this.min == other.get$min()) + if (J.$eq$(this.max, other.get$max())) { + t1 = !other.get$includeMin(); + if (t1) + other.get$includeMax(); + } + return t1; + }, + get$hashCode(_) { + var t1 = B.JSNull_methods.get$hashCode(this.min), + t2 = J.get$hashCode$(this.max); + return (t1 ^ t2 * 3 ^ 1090795 ^ 3633126) >>> 0; + }, + allows$1(other) { + var t1 = this.max; + if (t1 != null) + if (other.compareTo$1(0, t1) > 0) + return false; + return true; + }, + compareTo$1(_, other) { + if (other.get$min() == null) + return this._compareMax$1(other); + return -1; + }, + _compareMax$1(other) { + var t2, result, + t1 = this.max; + if (t1 == null) { + if (other.get$max() == null) + return 0; + return 1; + } else if (other.get$max() == null) + return -1; + t2 = other.get$max(); + t2.toString; + result = t1.compareTo$1(0, t2); + if (result !== 0) + return result; + other.get$includeMax(); + return 0; + }, + toString$0(_) { + var t2, + max = this.max, + t1 = max == null; + if (!t1) + t2 = "" + "<=" + max.toString$0(0); + else + t2 = ""; + t1 = t1 ? t2 + "any" : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isComparable: 1, + get$min() { + return this.min; + }, + get$max() { + return this.max; + }, + get$includeMin() { + return this.includeMin; + }, + get$includeMax() { + return this.includeMax; + } + }; + A.CssMediaQuery.prototype = { + merge$1(other) { + var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; + if (!_this.conjunction || !other.conjunction) + return B._SingletonCssMediaQueryMergeResult_1; + t1 = _this.modifier; + ourModifier = t1 == null ? _null : t1.toLowerCase(); + t2 = _this.type; + t3 = t2 == null; + ourType = t3 ? _null : t2.toLowerCase(); + t4 = other.modifier; + theirModifier = t4 == null ? _null : t4.toLowerCase(); + t5 = other.type; + t6 = t5 == null; + theirType = t6 ? _null : t5.toLowerCase(); + t7 = ourType == null; + if (t7 && theirType == null) { + t1 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t1, other.conditions); + return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$condition(t1, true)); + } + t8 = ourModifier === "not"; + if (t8 !== (theirModifier === "not")) { + if (ourType == theirType) { + negativeConditions = t8 ? _this.conditions : other.conditions; + if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) + return B._SingletonCssMediaQueryMergeResult_0; + else + return B._SingletonCssMediaQueryMergeResult_1; + } else if (t3 || A.equalsIgnoreCase(t2, _s3_) || t6 || A.equalsIgnoreCase(t5, _s3_)) + return B._SingletonCssMediaQueryMergeResult_1; + if (t8) { + conditions = other.conditions; + type = theirType; + modifier = theirModifier; + } else { + conditions = _this.conditions; + type = ourType; + modifier = ourModifier; + } + } else if (t8) { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_1; + fewerConditions = _this.conditions; + fewerConditions0 = other.conditions; + t3 = fewerConditions.length > fewerConditions0.length; + moreConditions = t3 ? fewerConditions : fewerConditions0; + if (t3) + fewerConditions = fewerConditions0; + if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) + return B._SingletonCssMediaQueryMergeResult_1; + conditions = moreConditions; + type = ourType; + modifier = ourModifier; + } else if (t3 || A.equalsIgnoreCase(t2, _s3_)) { + type = (t6 || A.equalsIgnoreCase(t5, _s3_)) && t7 ? _null : theirType; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = theirModifier; + } else { + if (t6 || A.equalsIgnoreCase(t5, _s3_)) { + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = ourModifier; + } else { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_0; + else { + modifier = ourModifier == null ? theirModifier : ourModifier; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + } + conditions = t3; + } + type = ourType; + } + t2 = type == ourType ? t2 : t5; + return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$type(t2, conditions, modifier == ourModifier ? t1 : t4)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CssMediaQuery && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); + }, + get$hashCode(_) { + return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.modifier; + t1 = t1 != null ? "" + (t1 + " ") : ""; + t2 = _this.type; + if (t2 != null) { + t1 += t2; + if (_this.conditions.length !== 0) + t1 += " and "; + } + t2 = _this.conjunction ? " and " : " or "; + t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._SingletonCssMediaQueryMergeResult.prototype = { + _enumToString$0() { + return "_SingletonCssMediaQueryMergeResult." + this._name; + } + }; + A.MediaQuerySuccessfulMergeResult.prototype = { + toString$0(_) { + return this.query.toString$0(0); + } + }; + A.ModifiableCssAtRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssAtRule) { + t1 = this.name; + t2 = other.name; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value) && J.$eq$(this.value, other.value) && this.isChildless === other.isChildless; + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + var _this = this; + return A.ModifiableCssAtRule$(_this.name, _this.span, _this.isChildless, _this.value); + }, + addChild$1(child) { + this.super$ModifiableCssParentNode$addChild(child); + }, + get$isChildless() { + return this.isChildless; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssComment.prototype = { + accept$1$1(visitor) { + return visitor.visitCssComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssComment: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssDeclaration.prototype = { + accept$1$1(visitor) { + return visitor.visitCssDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssImport.prototype = { + accept$1$1(visitor) { + return visitor.visitCssImport$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssKeyframeBlock.prototype = { + accept$1$1(visitor) { + return visitor.visitCssKeyframeBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssKeyframeBlock && B.C_ListEquality.equals$2(0, this.selector.value, other.selector.value); + }, + copyWithoutChildren$0() { + return A.ModifiableCssKeyframeBlock$(this.selector, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssMediaRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssMediaRule && B.C_ListEquality.equals$2(0, this.queries, other.queries); + }, + copyWithoutChildren$0() { + return A.ModifiableCssMediaRule$(this.queries, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssNode.prototype = { + get$parent(_) { + return this._parent; + }, + get$hasFollowingSibling() { + var t2, + t1 = this._parent; + if (t1 == null) + t1 = null; + else { + t1 = t1.children; + t2 = this._indexInParent; + t2.toString; + t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListBase.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure()); + } + return t1 === true; + }, + get$isGroupEnd() { + return this.isGroupEnd; + } + }; + A.ModifiableCssNode_hasFollowingSibling_closure.prototype = { + call$1(sibling) { + return !sibling.accept$1(B._IsInvisibleVisitor_true_false); + }, + $signature: 487 + }; + A.ModifiableCssParentNode.prototype = { + get$isChildless() { + return false; + }, + addChild$1(child) { + var t1; + child._parent = this; + t1 = this._children; + child._indexInParent = t1.length; + t1.push(child); + }, + clearChildren$0() { + var t1, t2, _i, child; + for (t1 = this._children, t2 = t1.length, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + child._indexInParent = child._parent = null; + } + B.JSArray_methods.clear$0(t1); + }, + $isCssParentNode: 1, + get$children(receiver) { + return this.children; + } + }; + A.ModifiableCssStyleRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1; + if (other instanceof A.ModifiableCssStyleRule) + t1 = B.C_ListEquality.equals$2(0, other._style_rule$_selector._box$_inner.value.components, this._style_rule$_selector._box$_inner.value.components); + else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStyleRule$(this._style_rule$_selector, this.span, false, this.originalSelector); + }, + $isCssStyleRule: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssStylesheet.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssStylesheet; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStylesheet$(this.span); + }, + $isCssStylesheet: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssSupportsRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssSupportsRule) { + t1 = this.condition; + t2 = other.condition; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value); + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssSupportsRule$(this.condition, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.CssNode.prototype = { + toString$0(_) { + var _null = null; + return A.serialize(this, true, _null, true, _null, _null, false, _null, true)._0; + }, + $isAstNode: 1 + }; + A.CssParentNode.prototype = {}; + A._IsInvisibleVisitor.prototype = { + visitCssAtRule$1(rule) { + return false; + }, + visitCssComment$1(comment) { + return this.includeComments && comment.text.charCodeAt(2) !== 33; + }, + visitCssStyleRule$1(rule) { + var t1 = rule._style_rule$_selector._box$_inner; + return (this.includeBogus ? t1.value.accept$1(B._IsInvisibleVisitor_true) : t1.value.accept$1(B._IsInvisibleVisitor_false)) || this.super$EveryCssVisitor$visitCssStyleRule(rule); + } + }; + A.__IsInvisibleVisitor_Object_EveryCssVisitor.prototype = {}; + A.CssStylesheet.prototype = { + get$parent(_) { + return null; + }, + get$isGroupEnd() { + return false; + }, + get$isChildless() { + return false; + }, + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$children(receiver) { + return this.children; + }, + get$span(receiver) { + return this.span; + } + }; + A.CssValue.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && J.$eq$(other.value, this.value); + }, + get$hashCode(_) { + return J.get$hashCode$(this.value); + }, + toString$0(_) { + return J.toString$0$(this.value); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A._FakeAstNode.prototype = { + get$span(_) { + return this._callback.call$0(); + }, + $isAstNode: 1 + }; + A.Argument.prototype = { + toString$0(_) { + var t1 = this.defaultValue, + t2 = this.name; + return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration.prototype = { + get$spanWithName() { + var t3, t4, + t1 = this.span, + t2 = t1.file, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, 0, null), 0, null), + i = A.FileLocation$_(t2, t1._file$_start).offset - 1; + while (true) { + if (i > 0) { + t3 = text.charCodeAt(i); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = text.charCodeAt(i); + if (!(t3 === 95 || A.CharacterExtension_get_isAlphabetic(t3) || t3 >= 128)) + t3 = t3 >= 48 && t3 <= 57 || t3 === 45; + else + t3 = true; + if (!t3) + return t1; + --i; + while (true) { + if (i >= 0) { + t3 = text.charCodeAt(i); + if (t3 !== 95) { + if (!(t3 >= 97 && t3 <= 122)) + t4 = t3 >= 65 && t3 <= 90; + else + t4 = true; + t4 = t4 || t3 >= 128; + } else + t4 = true; + if (!t4) + t3 = t3 >= 48 && t3 <= 57 || t3 === 45; + else + t3 = true; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = i + 1; + t4 = text.charCodeAt(t3); + if (!(t4 === 95 || A.CharacterExtension_get_isAlphabetic(t4) || t4 >= 128)) + return t1; + return A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, t3, A.FileLocation$_(t2, t1._end).offset))); + }, + verify$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument, t4, unknownNames, _this = this, + _s10_ = "invocation", + _s8_ = "argument"; + for (t1 = _this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + t4 = argument.name; + if (t3.containsKey$1(t4)) + throw A.wrapException(A.SassScriptException$("Argument " + _this._originalArgumentName$1(t4) + string$.x20was_p, null)); + } else { + t4 = argument.name; + if (t3.containsKey$1(t4)) + ++namedUsed; + else if (argument.defaultValue == null) + throw A.wrapException(A.MultiSpanSassScriptException$("Missing argument " + _this._originalArgumentName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + } + if (_this.restArgument != null) + return; + if (positional > t2) { + t1 = names.get$isEmpty(0) ? "" : "positional "; + throw A.wrapException(A.MultiSpanSassScriptException$("Only " + t2 + " " + t1 + A.pluralize(_s8_, t2, null) + " allowed, but " + positional + " " + A.pluralize("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + if (namedUsed < t3.get$length(t3)) { + t2 = type$.String; + unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); + unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ArgumentDeclaration_verify_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); + throw A.wrapException(A.MultiSpanSassScriptException$("No " + A.pluralize(_s8_, unknownNames._collection$_length, null) + " named " + A.toSentence(unknownNames.map$1$1(0, new A.ArgumentDeclaration_verify_closure0(), type$.Object), "or") + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); + } + }, + _originalArgumentName$1($name) { + var t1, text, t2, _i, argument, t3, t4, end, _null = null; + if ($name === this.restArgument) { + t1 = this.span; + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, _null); + return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); + } + for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (argument.name === $name) { + t1 = argument.defaultValue; + t2 = argument.span; + t3 = t2.file; + t4 = t2._file$_start; + t2 = t2._end; + if (t1 == null) { + t1 = t3._decodedChars; + t1 = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + } else { + t1 = t3._decodedChars; + text = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); + end = A._lastNonWhitespace(t1, false); + t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); + } + return t1; + } + } + throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', _null)); + }, + matches$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument; + for (t1 = this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + if (t3.containsKey$1(argument.name)) + return false; + } else if (t3.containsKey$1(argument.name)) + ++namedUsed; + else if (argument.defaultValue == null) + return false; + } + if (this.restArgument != null) + return true; + if (positional > t2) + return false; + if (namedUsed < t3.get$length(t3)) + return false; + return true; + }, + toString$0(_) { + var t2, t3, _i, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.$arguments, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push("$" + A.S(t2[_i])); + t2 = this.restArgument; + if (t2 != null) + t1.push("$" + t2 + "..."); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration_verify_closure.prototype = { + call$1(argument) { + return argument.name; + }, + $signature: 341 + }; + A.ArgumentDeclaration_verify_closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A.ArgumentInvocation.prototype = { + get$isEmpty(_) { + var t1; + if (this.positional.length === 0) { + t1 = this.named; + t1 = t1.get$isEmpty(t1) && this.rest == null; + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t2, t3, _i, _1_0, _2_0, _this = this, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = _this.positional, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._parenthesizeArgument$1(t2[_i])); + for (t2 = A.MapExtensions_get_pairs(_this.named, type$.String, type$.Expression), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + _this._parenthesizeArgument$1(t3._1)); + } + _1_0 = _this.rest; + if (_1_0 != null) + t1.push(_this._parenthesizeArgument$1(_1_0) + "..."); + _2_0 = _this.keywordRest; + if (_2_0 != null) + t1.push(_this._parenthesizeArgument$1(_2_0) + "..."); + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + _parenthesizeArgument$1(argument) { + var t1; + $label0$0: { + if (argument instanceof A.ListExpression && B.ListSeparator_ECn === argument.separator && !argument.hasBrackets && argument.contents.length >= 2) { + t1 = "(" + argument.toString$0(0) + ")"; + break $label0$0; + } + t1 = argument.toString$0(0); + break $label0$0; + } + return t1; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.AtRootQuery.prototype = { + excludes$1(node) { + var t1, _this = this; + if (_this._all) + return !_this.include; + $label0$0: { + if (node instanceof A.ModifiableCssStyleRule) { + t1 = _this._at_root_query$_rule !== _this.include; + break $label0$0; + } + if (node instanceof A.ModifiableCssMediaRule) { + t1 = _this.excludesName$1("media"); + break $label0$0; + } + if (node instanceof A.ModifiableCssSupportsRule) { + t1 = _this.excludesName$1("supports"); + break $label0$0; + } + if (node instanceof A.ModifiableCssAtRule) { + t1 = _this.excludesName$1(node.name.value.toLowerCase()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + excludesName$1($name) { + var t1 = this._all || this.names.contains$1(0, $name); + return t1 !== this.include; + } + }; + A.ConfiguredVariable.prototype = { + toString$0(_) { + var t1 = this.expression.toString$0(0), + t2 = this.isGuarded ? " !default" : ""; + return "$" + this.name + ": " + t1 + t2; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Expression.prototype = {$isAstNode: 1}; + A._IsCalculationSafeVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + var t1; + if (B.Set_mqKz.contains$1(0, node.operator)) + t1 = node.left.accept$1(this) || node.right.accept$1(this); + else + t1 = false; + return t1; + }, + visitBooleanExpression$1(_, node) { + return false; + }, + visitColorExpression$1(_, node) { + return false; + }, + visitFunctionExpression$1(_, node) { + return true; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return true; + }, + visitIfExpression$1(_, node) { + return true; + }, + visitListExpression$1(_, node) { + var t1 = false; + if (node.separator === B.ListSeparator_nbm) + if (!node.hasBrackets) { + t1 = node.contents; + t1 = t1.length > 1 && B.JSArray_methods.every$1(t1, new A._IsCalculationSafeVisitor_visitListExpression_closure(this)); + } + return t1; + }, + visitMapExpression$1(_, node) { + return false; + }, + visitNullExpression$1(_, node) { + return false; + }, + visitNumberExpression$1(_, node) { + return true; + }, + visitParenthesizedExpression$1(_, node) { + return node.expression.accept$1(this); + }, + visitSelectorExpression$1(_, node) { + return false; + }, + visitStringExpression$1(_, node) { + var text, t1, t2; + if (node.hasQuotes) + return false; + text = node.text.get$initialPlain(); + t1 = false; + if (!B.JSString_methods.startsWith$1(text, "!")) + if (!B.JSString_methods.startsWith$1(text, "#")) { + t2 = text.length; + if ((1 >= t2 ? null : text.charCodeAt(1)) !== 43) + t1 = (3 >= t2 ? null : text.charCodeAt(3)) !== 40; + } + return t1; + }, + visitSupportsExpression$1(_, node) { + return false; + }, + visitUnaryOperationExpression$1(_, node) { + return false; + }, + visitValueExpression$1(_, node) { + return false; + }, + visitVariableExpression$1(_, node) { + return true; + } + }; + A._IsCalculationSafeVisitor_visitListExpression_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 120 + }; + A.BinaryOperationExpression.prototype = { + get$span(_) { + var right, + left = this.left; + for (; left instanceof A.BinaryOperationExpression;) + left = left.left; + right = this.right; + for (; right instanceof A.BinaryOperationExpression;) + right = right.right; + return left.get$span(left).expand$1(0, right.get$span(right)); + }, + get$operatorSpan() { + var t3, t4, + t1 = this.left, + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = this.right; + t4 = t3.get$span(t3); + if (t2 === t4.get$file(t4)) { + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + t4 = t2.offset < t4.get$start(t4).offset; + t2 = t4; + } else + t2 = false; + if (t2) { + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + t3 = A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, t1.offset, t3.get$start(t3).offset))); + t1 = t3; + } else + t1 = this.get$span(0); + return t1; + }, + accept$1$1(visitor) { + return visitor.visitBinaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, t2, right, t3, operator, _this = this, + _0_0 = _this.left; + $label0$0: { + if (_0_0 instanceof A.BinaryOperationExpression) { + t1 = _0_0.operator.precedence < _this.operator.precedence; + break $label0$0; + } + if (_0_0 instanceof A.ListExpression && !_0_0.hasBrackets && _0_0.contents.length >= 2) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + t2 = t1 ? "" + A.Primitives_stringFromCharCode(40) : ""; + t2 += _0_0.toString$0(0); + t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; + t2 = _this.operator; + t1 = t1 + A.Primitives_stringFromCharCode(32) + t2.operator + A.Primitives_stringFromCharCode(32); + right = _this.right; + $label1$1: { + t3 = false; + if (right instanceof A.BinaryOperationExpression) { + operator = right.operator; + if (operator.precedence <= t2.precedence) { + t3 = !(operator === t2 && operator.isAssociative); + t2 = t3; + } else + t2 = t3; + break $label1$1; + } + if (right instanceof A.ListExpression && !right.hasBrackets && right.contents.length >= 2) { + t2 = true; + break $label1$1; + } + t2 = t3; + break $label1$1; + } + if (t2) + t1 += A.Primitives_stringFromCharCode(40); + t1 += right.toString$0(0); + if (t2) + t1 += A.Primitives_stringFromCharCode(41); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.BinaryOperator.prototype = { + _enumToString$0() { + return "BinaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.BooleanExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitBooleanExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return String(this.value); + }, + get$span(receiver) { + return this.span; + } + }; + A.ColorExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitColorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue(this.value, true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.FunctionExpression.prototype = { + get$nameSpan() { + if (this.namespace == null) + return A.SpanExtensions_initialIdentifier(this.span); + return A.SpanExtensions_initialIdentifier(A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier(this.span), 1, null)); + }, + accept$1$1(visitor) { + return visitor.visitFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += this.originalName + this.$arguments.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitIfExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "if" + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedFunctionExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitInterpolatedFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitListExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, t4, t5, _this = this, + t1 = _this.hasBrackets; + if (t1) + t2 = "" + A.Primitives_stringFromCharCode(91); + else { + t2 = _this.contents.length; + if (t2 !== 0) + t2 = t2 === 1 && _this.separator === B.ListSeparator_ECn; + else + t2 = true; + t2 = t2 ? "" + A.Primitives_stringFromCharCode(40) : ""; + } + t3 = _this.contents; + t4 = _this.separator === B.ListSeparator_ECn; + t5 = t4 ? ", " : " "; + t5 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t5); + if (t1) + t1 = t5 + A.Primitives_stringFromCharCode(93); + else { + t1 = t3.length; + if (t1 === 0) + t1 = t5 + A.Primitives_stringFromCharCode(41); + else + t1 = t1 === 1 && t4 ? t5 + ",)" : t5; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _list0$_elementNeedsParens$1(expression) { + var childSeparator, t1, _0_13; + $label0$0: { + if (expression instanceof A.ListExpression && expression.contents.length >= 2 && !expression.hasBrackets) { + childSeparator = expression.separator; + t1 = this.separator === B.ListSeparator_ECn ? childSeparator === B.ListSeparator_ECn : childSeparator !== B.ListSeparator_undecided_null_undecided; + break $label0$0; + } + if (expression instanceof A.UnaryOperationExpression) { + _0_13 = expression.operator; + if (B.UnaryOperator_cLp !== _0_13) + t1 = B.UnaryOperator_AiQ === _0_13; + else + t1 = true; + } else + t1 = false; + if (t1) { + t1 = this.separator === B.ListSeparator_nbm; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression_toString_closure.prototype = { + call$1(element) { + return this.$this._list0$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); + }, + $signature: 129 + }; + A.MapExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitMapExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, _i, t4, key, value, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + value = t4._1; + t1.push(key.toString$0(0) + ": " + value.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.NullExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitNullExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "null"; + }, + get$span(receiver) { + return this.span; + } + }; + A.NumberExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitNumberExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue(A.SassNumber_SassNumber(this.value, this.unit), true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.ParenthesizedExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitParenthesizedExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SelectorExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitSelectorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "&"; + }, + get$span(receiver) { + return this.span; + } + }; + A.StringExpression.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitStringExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + asInterpolation$1$static($static) { + var t1, t2, quote, t3, t4, buffer, t5, _i, value; + if (!this.hasQuotes) + return this.text; + t1 = this.text; + t2 = t1.contents; + quote = A.StringExpression__bestQuote(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t5 = A.Primitives_stringFromCharCode(quote); + t3._contents += t5; + for (t5 = t2.length, _i = 0; _i < t5; ++_i) { + value = t2[_i]; + if (value instanceof A.Expression) { + buffer._flushText$0(); + t4.push(value); + continue; + } + if (typeof value == "string") + A.StringExpression__quoteInnerText(value, quote, buffer, $static); + } + t2 = A.Primitives_stringFromCharCode(quote); + t3._contents += t2; + return buffer.interpolation$1(t1.span); + }, + asInterpolation$0() { + return this.asInterpolation$1$static(false); + }, + toString$0(_) { + return this.asInterpolation$0().toString$0(0); + } + }; + A.SupportsExpression.prototype = { + get$span(_) { + var t1 = this.condition; + return t1.get$span(t1); + }, + accept$1$1(visitor) { + return visitor.visitSupportsExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.condition.toString$0(0); + } + }; + A.UnaryOperationExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitUnaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var operand, + t1 = this.operator, + t2 = t1.operator; + t1 = t1 === B.UnaryOperator_not_not_not ? t2 + A.Primitives_stringFromCharCode(32) : t2; + operand = this.operand; + $label0$0: { + t2 = true; + if (!(operand instanceof A.BinaryOperationExpression)) + if (!(operand instanceof A.UnaryOperationExpression)) + t2 = operand instanceof A.ListExpression && !operand.hasBrackets && operand.contents.length >= 2; + if (t2) + break $label0$0; + break $label0$0; + } + if (t2) + t1 += "40"; + t1 += operand.toString$0(0); + if (t2) + t1 += "41"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.UnaryOperator.prototype = { + _enumToString$0() { + return "UnaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.ValueExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitValueExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.value.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.VariableExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.span; + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); + }, + get$span(receiver) { + return this.span; + } + }; + A.DynamicImport.prototype = { + toString$0(_) { + return A.StringExpression_quoteText(this.urlString); + }, + $isAstNode: 1, + $isImport: 1, + get$span(receiver) { + return this.span; + } + }; + A.StaticImport.prototype = { + toString$0(_) { + var t1 = this.url.toString$0(0), + t2 = this.modifiers; + return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); + }, + $isAstNode: 1, + $isImport: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation.prototype = { + get$asPlain() { + var _0_1, t1, _0_6_isSet, _0_6, _0_60, first, + _0_0 = this.contents; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 <= 0) { + t1 = ""; + break $label0$0; + } + _0_6_isSet = _0_1 === 1; + _0_6 = null; + if (_0_6_isSet) { + _0_60 = _0_0[0]; + t1 = _0_60; + _0_6 = t1; + t1 = typeof t1 == "string"; + } else + t1 = false; + if (t1) { + first = A._asString(_0_6_isSet ? _0_6 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + get$initialPlain() { + var _0_4_isSet, _0_4, _0_40, t1, first, + _0_0 = this.contents; + $label0$0: { + _0_4_isSet = _0_0.length >= 1; + _0_4 = null; + if (_0_4_isSet) { + _0_40 = _0_0[0]; + t1 = _0_40; + _0_4 = t1; + t1 = typeof t1 == "string"; + } else + t1 = false; + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + Interpolation$2(contents, span) { + var t1, t2, i, t3, t4, + _s8_ = "contents"; + for (t1 = this.contents, t2 = t1.length, i = 0; i < t2; ++i) { + t3 = t1[i]; + t4 = typeof t3 == "string"; + if (!t4 && !(t3 instanceof A.Expression)) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, string$.May_on)); + if (i !== 0 && typeof t1[i - 1] == "string" && t4) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); + } + }, + toString$0(_) { + var t1 = this.contents; + return new A.MappedListIterable(t1, new A.Interpolation_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation_toString_closure.prototype = { + call$1(value) { + return typeof value == "string" ? value : "#{" + A.S(value) + "}"; + }, + $signature: 118 + }; + A.Statement.prototype = {$isAstNode: 1}; + A.AtRootRule.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRootRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var buffer = new A.StringBuffer("@at-root "), + t1 = this.query; + if (t1 != null) + buffer._contents = "@at-root " + (t1.toString$0(0) + " "); + t1 = this.children; + return buffer.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.AtRule.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var children, + t1 = "@" + this.name.toString$0(0), + buffer = new A.StringBuffer(t1), + t2 = this.value; + if (t2 != null) + buffer._contents = t1 + (" " + t2.toString$0(0)); + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.CallableDeclaration.prototype = { + get$span(receiver) { + return this.span; + } + }; + A.ContentBlock.prototype = { + accept$1$1(visitor) { + return visitor.visitContentBlock$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, + t1 = this.$arguments; + t1 = t1.$arguments.length === 0 && t1.restArgument == null ? "" : " using (" + t1.toString$0(0) + ")"; + t2 = this.children; + return t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + } + }; + A.ContentRule.prototype = { + accept$1$1(visitor) { + return visitor.visitContentRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.$arguments; + return t1.get$isEmpty(0) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; + }, + get$span(receiver) { + return this.span; + } + }; + A.DebugRule.prototype = { + accept$1$1(visitor) { + return visitor.visitDebugRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@debug " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Declaration.prototype = { + accept$1$1(visitor) { + return visitor.visitDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t3, _0_0, + buffer = new A.StringBuffer(""), + t1 = this.name, + t2 = "" + t1.toString$0(0); + buffer._contents = t2; + t2 = buffer._contents = t2 + A.Primitives_stringFromCharCode(58); + t3 = this.value; + if (t3 != null) { + t1 = !B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--") ? buffer._contents = t2 + A.Primitives_stringFromCharCode(32) : t2; + buffer._contents = t1 + t3.toString$0(0); + } + _0_0 = this.children; + if (_0_0 != null) + return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(_0_0, " ") + "}"; + else + return buffer.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule.prototype = { + accept$1$1(visitor) { + return visitor.visitEachRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.variables, + t2 = this.children; + return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule_toString_closure.prototype = { + call$1(variable) { + return "$" + variable; + }, + $signature: 6 + }; + A.ErrorRule.prototype = { + accept$1$1(visitor) { + return visitor.visitErrorRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@error " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ExtendRule.prototype = { + accept$1$1(visitor) { + return visitor.visitExtendRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector.toString$0(0), + t2 = this.isOptional ? " !optional" : ""; + return "@extend " + t1 + t2 + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForRule.prototype = { + accept$1$1(visitor) { + return visitor.visitForRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.from.toString$0(0), + t2 = _this.isExclusive ? "to" : "through", + t3 = _this.children; + return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + (t3 && B.JSArray_methods).join$1(t3, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardRule.prototype = { + accept$1$1(visitor) { + return visitor.visitForwardRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, prefix, _this = this, + t1 = "@forward " + A.StringExpression_quoteText(_this.url.toString$0(0)), + shownMixinsAndFunctions = _this.shownMixinsAndFunctions, + hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; + if (shownMixinsAndFunctions != null) { + t2 = _this.shownVariables; + t2.toString; + t2 = t1 + " show " + _this._forward_rule$_memberList$2(shownMixinsAndFunctions, t2); + t1 = t2; + } else if (hiddenMixinsAndFunctions != null && hiddenMixinsAndFunctions._base.get$isNotEmpty(0)) { + t2 = _this.hiddenVariables; + t2.toString; + t2 = t1 + " hide " + _this._forward_rule$_memberList$2(hiddenMixinsAndFunctions, t2); + t1 = t2; + } + prefix = _this.prefix; + if (prefix != null) + t1 += " as " + prefix + "*"; + t2 = _this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _forward_rule$_memberList$2(mixinsAndFunctions, variables) { + var t2, + t1 = A.List_List$of(mixinsAndFunctions, true, type$.String); + for (t2 = variables._base.get$iterator(0); t2.moveNext$0();) + t1.push("$" + t2.get$current(0)); + return B.JSArray_methods.join$1(t1, ", "); + }, + get$span(receiver) { + return this.span; + } + }; + A.FunctionRule.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@function " + this.name + "(" + this.$arguments.toString$0(0) + ") {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + } + }; + A.IfRule.prototype = { + accept$1$1(visitor) { + return visitor.visitIfRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure(), type$.IfClause, type$.String).join$1(0, " "), + lastClause = this.lastClause; + return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfRule_toString_closure.prototype = { + call$2(index, clause) { + var t1 = index === 0 ? "if" : "else if"; + return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; + }, + $signature: 360 + }; + A.IfRuleClause.prototype = {}; + A.IfRuleClause$__closure.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration || child instanceof A.FunctionRule || child instanceof A.MixinRule) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule) { + t1 = B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 153 + }; + A.IfRuleClause$___closure.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport; + }, + $signature: 154 + }; + A.IfClause.prototype = { + toString$0(_) { + return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ElseClause.prototype = { + toString$0(_) { + return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ImportRule.prototype = { + accept$1$1(visitor) { + return visitor.visitImportRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IncludeRule.prototype = { + get$spanWithoutContent() { + var t2, t3, + t1 = this.span; + if (!(this.content == null)) { + t2 = t1.file; + t3 = this.$arguments.span; + t3 = A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, A.FileLocation$_(t2, t1._file$_start).offset, t3.get$end(t3).offset))); + t1 = t3; + } + return t1; + }, + get$nameSpan() { + var startSpan, scanner, _null = null, + t1 = this.span, + t2 = t1._file$_start, + t3 = t1._end, + t4 = t1.file._decodedChars; + if (B.JSString_methods.startsWith$1(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), "+")) + startSpan = A.SpanExtensions_trimLeft(A.FileSpanExtension_subspan(t1, 1, _null)); + else { + scanner = A.StringScanner$(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), _null, _null); + scanner.expectChar$1(64); + A._scanIdentifier(scanner); + startSpan = A.SpanExtensions_trimLeft(A.FileSpanExtension_subspan(t1, scanner._string_scanner$_position, _null)); + } + return A.SpanExtensions_initialIdentifier(this.namespace != null ? A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier(startSpan), 1, _null) : startSpan); + }, + accept$1$1(visitor) { + return visitor.visitIncludeRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.namespace; + t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; + t1 += _this.name; + t2 = _this.$arguments; + if (!t2.get$isEmpty(0)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = _this.content; + t1 += t2 == null ? ";" : " " + t2.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.LoudComment.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitLoudComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + } + }; + A.MediaRule.prototype = { + accept$1$1(visitor) { + return visitor.visitMediaRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@media " + this.query.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.MixinRule.prototype = { + get$hasContent() { + var result, _this = this, + value = _this.__MixinRule_hasContent_FI; + if (value === $) { + result = J.$eq$(B.C__HasContentVisitor.visitChildren$1(_this.children), true); + _this.__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__MixinRule_hasContent_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitMixinRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = "@mixin " + this.name, + t2 = this.$arguments; + if (!(t2.$arguments.length === 0 && t2.restArgument == null)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = this.children; + t2 = t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._HasContentVisitor.prototype = { + visitContentRule$1(_, _0) { + return true; + } + }; + A.__HasContentVisitor_Object_StatementSearchVisitor.prototype = {}; + A.ParentStatement.prototype = {}; + A.ParentStatement_closure.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration || child instanceof A.FunctionRule || child instanceof A.MixinRule) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule) { + t1 = B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 153 + }; + A.ParentStatement__closure.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport; + }, + $signature: 154 + }; + A.ReturnRule.prototype = { + accept$1$1(visitor) { + return visitor.visitReturnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@return " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SilentComment.prototype = { + accept$1$1(visitor) { + return visitor.visitSilentComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text; + }, + get$span(receiver) { + return this.span; + } + }; + A.StyleRule.prototype = { + accept$1$1(visitor) { + return visitor.visitStyleRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return this.selector.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Stylesheet.prototype = { + Stylesheet$internal$3$plainCss(children, span, plainCss) { + var t1, t2, t3, t4, _i, child; + for (t1 = this.children, t2 = t1.length, t3 = this._forwards, t4 = this._uses, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + if (child instanceof A.UseRule) { + t4.push(child); + continue; + } + if (child instanceof A.ForwardRule) { + t3.push(child); + continue; + } + if (child instanceof A.SilentComment || child instanceof A.LoudComment || child instanceof A.VariableDeclaration) + continue; + break; + } + }, + accept$1$1(visitor) { + return visitor.visitStylesheet$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return (t1 && B.JSArray_methods).join$1(t1, " "); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsRule.prototype = { + accept$1$1(visitor) { + return visitor.visitSupportsRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@supports " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.UseRule.prototype = { + UseRule$4$configuration(url, namespace, span, configuration) { + var t1, t2, _i, variable; + for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (variable.isGuarded) + throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); + } + }, + accept$1$1(visitor) { + return visitor.visitUseRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.url, + t2 = "@use " + A.StringExpression_quoteText(t1.toString$0(0)), + basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = this.namespace; + if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) + t1 = t2 + (" as " + (t1 == null ? "*" : t1)); + else + t1 = t2; + t2 = this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.VariableDeclaration.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.WarnRule.prototype = { + accept$1$1(visitor) { + return visitor.visitWarnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@warn " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.WhileRule.prototype = { + accept$1$1(visitor) { + return visitor.visitWhileRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@while " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsAnything.prototype = { + toString$0(_) { + return "(" + this.contents.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsDeclaration.prototype = { + get$isCustomProperty() { + var t1, + _0_0 = this.name; + $label0$0: { + if (_0_0 instanceof A.StringExpression && !_0_0.hasQuotes) { + t1 = B.JSString_methods.startsWith$1(_0_0.text.get$initialPlain(), "--"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + toString$0(_) { + return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsFunction.prototype = { + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsInterpolation.prototype = { + toString$0(_) { + return "#{" + this.expression.toString$0(0) + "}"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsNegation.prototype = { + toString$0(_) { + var t1 = this.condition; + if (t1 instanceof A.SupportsNegation || t1 instanceof A.SupportsOperation) + return "not (" + t1.toString$0(0) + ")"; + else + return "not " + t1.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsOperation.prototype = { + toString$0(_) { + var _this = this; + return _this._operation$_parenthesize$1(_this.left) + " " + _this.operator + " " + _this._operation$_parenthesize$1(_this.right); + }, + _operation$_parenthesize$1(condition) { + var t1; + if (!(condition instanceof A.SupportsNegation)) + t1 = condition instanceof A.SupportsOperation && condition.operator === this.operator; + else + t1 = true; + return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Selector.prototype = { + assertNotBogus$1$name($name) { + if (!this.accept$1(B._IsBogusVisitor_true)) + return; + A.warnForDeprecation("$" + $name + ": " + (this.toString$0(0) + string$.x20is_nov), B.Deprecation_ido); + }, + toString$0(_) { + var _null = null, + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + this.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A._IsInvisibleVisitor0.prototype = { + visitSelectorList$1(list) { + return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); + }, + visitComplexSelector$1(complex) { + var t1; + if (!this.super$AnySelectorVisitor$visitComplexSelector(complex)) + t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false); + else + t1 = true; + return t1; + }, + visitPlaceholderSelector$1(placeholder) { + return true; + }, + visitPseudoSelector$1(pseudo) { + var t1, + _0_0 = pseudo.selector; + if (_0_0 != null) { + if (pseudo.name === "not") + t1 = this.includeBogus && _0_0.accept$1(B._IsBogusVisitor_true); + else + t1 = this.visitSelectorList$1(_0_0); + return t1; + } else + return false; + } + }; + A._IsBogusVisitor.prototype = { + visitComplexSelector$1(complex) { + var t2, + t1 = complex.components; + if (t1.length === 0) + return complex.leadingCombinators.length !== 0; + else { + t2 = this.includeLeadingCombinator ? 0 : 1; + return complex.leadingCombinators.length > t2 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure(this)); + } + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + if (selector == null) + return false; + return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false) : selector.accept$1(B._IsBogusVisitor_true); + } + }; + A._IsBogusVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 53 + }; + A._IsUselessVisitor.prototype = { + visitComplexSelector$1(complex) { + return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure(this)); + }, + visitPseudoSelector$1(pseudo) { + return pseudo.accept$1(B._IsBogusVisitor_true); + } + }; + A._IsUselessVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 53 + }; + A.__IsBogusVisitor_Object_AnySelectorVisitor.prototype = {}; + A.__IsInvisibleVisitor_Object_AnySelectorVisitor.prototype = {}; + A.__IsUselessVisitor_Object_AnySelectorVisitor.prototype = {}; + A.AttributeSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitAttributeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.AttributeSelector && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.name; + return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; + } + }; + A.AttributeOperator.prototype = { + _enumToString$0() { + return "AttributeOperator." + this._name; + }, + toString$0(_) { + return this._attribute$_text; + } + }; + A.ClassSelector.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ClassSelector && other.name === this.name; + }, + accept$1$1(visitor) { + return visitor.visitClassSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.ClassSelector(this.name + suffix, this.span); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.Combinator.prototype = { + _enumToString$0() { + return "Combinator." + this._name; + }, + toString$0(_) { + return this._combinator$_text; + } + }; + A.ComplexSelector.prototype = { + get$specificity() { + var result, _this = this, + value = _this.__ComplexSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure()); + _this.__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__ComplexSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$singleCompound() { + var _0_0, t1, _0_4, t2, selector, _null = null; + if (this.leadingCombinators.length !== 0) + return _null; + _0_0 = this.components; + $label0$0: { + t1 = false; + if (_0_0.length === 1) { + _0_4 = _0_0[0]; + t2 = _0_4; + selector = t2.selector; + t1 = _0_4.combinators.length <= 0; + } else + selector = _null; + if (t1) { + t1 = selector; + break $label0$0; + } + t1 = _null; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitComplexSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + isSuperselector$1(other) { + return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var _0_0, _0_1, t1, initial, last, _this = this; + if (combinators.length === 0) + return _this; + _0_0 = _this.components; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t1 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t1); + last = _0_0[t1]; + t1 = A.List_List$of(initial, true, type$.ComplexSelectorComponent); + t1.push(last.withAdditionalCombinators$1(combinators)); + t1 = A.ComplexSelector$(_this.leadingCombinators, t1, _this.span, _this.lineBreak); + break $label0$0; + } + if (_0_1 <= 0) { + t1 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator); + B.JSArray_methods.addAll$1(t1, combinators); + t1 = A.ComplexSelector$(t1, B.List_empty2, _this.span, _this.lineBreak); + break $label0$0; + } + throw A.wrapException(A.ReachabilityError$(string$.None_o)); + } + return t1; + }, + concatenate$3$forceLineBreak(child, span, forceLineBreak) { + var t2, _0_1, initial, last, _this = this, + t1 = child.leadingCombinators, + _0_0 = _this.components; + if (t1.length === 0) { + t1 = A.List_List$of(_0_0, true, type$.ComplexSelectorComponent); + B.JSArray_methods.addAll$1(t1, child.components); + t2 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$(_this.leadingCombinators, t1, span, t2); + } else { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t2 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + t2 = A.List_List$of(initial, true, type$.ComplexSelectorComponent); + t2.push(last.withAdditionalCombinators$1(t1)); + B.JSArray_methods.addAll$1(t2, child.components); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$(_this.leadingCombinators, t2, span, t1); + } else { + t2 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator); + B.JSArray_methods.addAll$1(t2, t1); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$(t2, child.components, span, t1); + } + } + }, + concatenate$2(child, span) { + return this.concatenate$3$forceLineBreak(child, span, false); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ComplexSelector && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.ComplexSelector_specificity_closure.prototype = { + call$2(sum, component) { + return sum + component.selector.get$specificity(); + }, + $signature: 541 + }; + A.ComplexSelectorComponent.prototype = { + withAdditionalCombinators$1(combinators) { + var t1, t2, _this = this; + if (combinators.length === 0) + t1 = _this; + else { + t1 = type$.CssValue_Combinator; + t2 = A.List_List$of(_this.combinators, true, t1); + B.JSArray_methods.addAll$1(t2, combinators); + t1 = new A.ComplexSelectorComponent(_this.selector, A.List_List$unmodifiable(t2, t1), _this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (other instanceof A.ComplexSelectorComponent) { + t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); + t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t1 = this.combinators; + return A.serializeSelector(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); + } + }; + A.ComplexSelectorComponent_toString_closure.prototype = { + call$1(combinator) { + return " " + combinator.toString$0(0); + }, + $signature: 340 + }; + A.CompoundSelector.prototype = { + get$specificity() { + var result, _this = this, + value = _this.__CompoundSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure()); + _this.__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__CompoundSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$hasComplicatedSuperselectorSemantics() { + var result, _this = this, + value = _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI; + if (value === $) { + result = B.JSArray_methods.any$1(_this.components, new A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure()); + _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitCompoundSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CompoundSelector && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.CompoundSelector_specificity_closure.prototype = { + call$2(sum, component) { + return sum + component.get$specificity(); + }, + $signature: 346 + }; + A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure.prototype = { + call$1(component) { + return component.get$hasComplicatedSuperselectorSemantics(); + }, + $signature: 13 + }; + A.IDSelector.prototype = { + get$specificity() { + return A._asInt(Math.pow(A.SimpleSelector.prototype.get$specificity.call(this), 2)); + }, + accept$1$1(visitor) { + return visitor.visitIDSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.IDSelector(this.name + suffix, this.span); + }, + unify$1(compound) { + if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure(this))) + return null; + return this.super$SimpleSelector$unify(compound); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.IDSelector && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.IDSelector_unify_closure.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.IDSelector) + t1 = this.$this.name !== simple.name; + else + t1 = false; + return t1; + }, + $signature: 13 + }; + A.SelectorList.prototype = { + get$asSassList() { + var t1 = this.components; + return A.SassList$(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_ECn, false); + }, + accept$1$1(visitor) { + return visitor.visitSelectorList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(other) { + var t3, t4, t5, t6, _i, complex1, _i0, t7, + t1 = type$.JSArray_ComplexSelector, + t2 = A._setArrayType([], t1); + for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { + complex1 = t3[_i]; + for (_i0 = 0; _i0 < t6; ++_i0) { + t7 = A.unifyComplex(A._setArrayType([complex1, t5[_i0]], t1), complex1.span); + if (t7 != null) + B.JSArray_methods.addAll$1(t2, t7); + } + } + return t2.length === 0 ? null : A.SelectorList$(t2, this.span); + }, + nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, preserveParentSelectors) { + var parentSelector, t1, _this = this; + if ($parent == null) { + if (preserveParentSelectors) + return _this; + parentSelector = B.C__ParentSelectorVisitor.visitSelectorList$1(_this); + if (parentSelector == null) + return _this; + throw A.wrapException(A.SassException$(string$.Top_les, parentSelector.span, null)); + } + t1 = _this.components; + return A.SelectorList$(A.flattenVertically(new A.MappedListIterable(t1, new A.SelectorList_nestWithin_closure(_this, preserveParentSelectors, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector), _this.span); + }, + nestWithin$1($parent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, true, false); + }, + nestWithin$2$implicitParent($parent, implicitParent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, false); + }, + _nestWithinCompound$2(component, $parent) { + var resolvedSimples, parentSelector, error, stackTrace, t2, resolvedSimples0, exception, + t1 = component.selector, + simples = t1.components, + containsSelectorPseudo = J.any$1$ax(simples, new A.SelectorList__nestWithinCompound_closure()); + if (!containsSelectorPseudo && !(J.get$first$ax(simples) instanceof A.ParentSelector)) + return null; + if (containsSelectorPseudo) { + t2 = simples; + resolvedSimples0 = new A.MappedListIterable(t2, new A.SelectorList__nestWithinCompound_closure0($parent), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,SimpleSelector>")); + } else + resolvedSimples0 = simples; + resolvedSimples = resolvedSimples0; + parentSelector = J.get$first$ax(simples); + try { + if (!(parentSelector instanceof A.ParentSelector)) { + t2 = component.span; + t2 = A._setArrayType([A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(resolvedSimples, t1.span), A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator), t2)], type$.JSArray_ComplexSelectorComponent), t2, false)], type$.JSArray_ComplexSelector); + return t2; + } else if (J.get$length$asx(simples) === 1 && parentSelector.suffix == null) { + t1 = $parent.withAdditionalCombinators$1(component.combinators); + return t1.components; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withAdditionalSpan$2(parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + t1 = $parent.components; + return new A.MappedListIterable(t1, new A.SelectorList__nestWithinCompound_closure1(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); + }, + isSuperselector$1(other) { + return A.listIsSuperselector(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1; + if (combinators.length === 0) + t1 = this; + else { + t1 = this.components; + t1 = A.SelectorList$(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")), this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SelectorList && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.SelectorList_asSassList_closure.prototype = { + call$1(complex) { + var t3, t4, _i, component, t5, visitor, t6, t7, _i0, _null = null, + t1 = type$.JSArray_Value, + t2 = A._setArrayType([], t1); + for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) + t2.push(new A.SassString(J.toString$0$(t3[_i].value), false)); + for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + t5 = component.selector; + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + t5.accept$1(visitor); + t5 = A._setArrayType([new A.SassString(visitor._serialize$_buffer.toString$0(0), false)], t1); + for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) + t5.push(new A.SassString(J.toString$0$(t6[_i0].value), false)); + B.JSArray_methods.addAll$1(t2, t5); + } + return A.SassList$(t2, B.ListSeparator_nbm, false); + }, + $signature: 387 + }; + A.SelectorList_nestWithin_closure.prototype = { + call$1(complex) { + var t1, newComplexes, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, _i, component, resolved, i, t12, t13, t14, _i0, newComplex, t15, _this = this; + if (_this.preserveParentSelectors || complex.accept$1(B.C__ParentSelectorVisitor) == null) { + if (!_this.implicitParent) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + t1 = _this.parent.components; + return new A.MappedListIterable(t1, new A.SelectorList_nestWithin__closure(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); + } + t1 = type$.JSArray_ComplexSelector; + newComplexes = A._setArrayType([], t1); + for (t2 = complex.components, t3 = t2.length, t4 = _this.$this, t5 = _this.parent, t6 = type$.ComplexSelector, t7 = complex.leadingCombinators, t8 = t7.length === 0, t9 = complex.span, t10 = type$.ComplexSelectorComponent, t11 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < t3; ++_i) { + component = t2[_i]; + resolved = t4._nestWithinCompound$2(component, t5); + if (resolved == null) + if (newComplexes.length === 0) + newComplexes.push(A.ComplexSelector$(t7, A._setArrayType([component], t11), t9, false)); + else + for (i = 0; i < newComplexes.length; ++i) { + t12 = newComplexes[i]; + t13 = t12.leadingCombinators; + t14 = A.List_List$of(t12.components, true, t10); + t14.push(component); + t12 = t12.lineBreak; + newComplexes[i] = A.ComplexSelector$(t13, t14, t9, t12); + } + else if (newComplexes.length === 0) + B.JSArray_methods.addAll$1(newComplexes, t8 ? resolved : J.map$1$1$ax(resolved, new A.SelectorList_nestWithin__closure0(complex), t6)); + else { + t12 = A._setArrayType([], t1); + for (t13 = newComplexes.length, t14 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t13 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { + newComplex = newComplexes[_i0]; + for (t15 = t14.get$iterator(resolved); t15.moveNext$0();) + t12.push(newComplex.concatenate$2(t15.get$current(t15), newComplex.span)); + } + newComplexes = t12; + } + } + return newComplexes; + }, + $signature: 412 + }; + A.SelectorList_nestWithin__closure.prototype = { + call$1(parentComplex) { + var t1 = this.complex; + return parentComplex.concatenate$2(t1, t1.span); + }, + $signature: 60 + }; + A.SelectorList_nestWithin__closure0.prototype = { + call$1(resolvedComplex) { + var t1 = resolvedComplex.leadingCombinators, + t2 = this.complex, + t3 = t2.leadingCombinators; + if (t1.length === 0) + t1 = t3; + else { + t3 = A.List_List$of(t3, true, type$.CssValue_Combinator); + B.JSArray_methods.addAll$1(t3, t1); + t1 = t3; + } + return A.ComplexSelector$(t1, resolvedComplex.components, t2.span, resolvedComplex.lineBreak); + }, + $signature: 60 + }; + A.SelectorList__nestWithinCompound_closure.prototype = { + call$1(simple) { + var selector; + if (!(simple instanceof A.PseudoSelector)) + return false; + selector = simple.selector; + return selector != null && selector.accept$1(B.C__ParentSelectorVisitor) != null; + }, + $signature: 13 + }; + A.SelectorList__nestWithinCompound_closure0.prototype = { + call$1(simple) { + var selector, t1, _0_2; + $label0$0: { + selector = null; + t1 = false; + if (simple instanceof A.PseudoSelector) { + _0_2 = simple.selector; + if (_0_2 != null) { + selector = _0_2 == null ? type$.SelectorList._as(_0_2) : _0_2; + t1 = selector.accept$1(B.C__ParentSelectorVisitor) != null; + } + } + if (t1) { + t1 = simple.withSelector$1(selector.nestWithin$2$implicitParent(this.parent, false)); + break $label0$0; + } + t1 = simple; + break $label0$0; + } + return t1; + }, + $signature: 439 + }; + A.SelectorList__nestWithinCompound_closure1.prototype = { + call$1(complex) { + var lastComponent, suffix, lastSimples, t1, t2, last, t3, error, stackTrace, t4, t5, t6, t7, exception, _this = this; + try { + t4 = complex.components; + lastComponent = B.JSArray_methods.get$last(t4); + if (lastComponent.combinators.length !== 0) { + t1 = A.MultiSpanSassException$('Selector "' + complex.toString$0(0) + string$.x22x20can_, A.SpanExtensions_trimRight(lastComponent.span), "outer selector", A.LinkedHashMap_LinkedHashMap$_literal([_this.parentSelector.span, "parent selector"], type$.FileSpan, type$.String), null); + throw A.wrapException(t1); + } + suffix = _this.parentSelector.suffix; + lastSimples = lastComponent.selector.components; + t5 = type$.SimpleSelector; + t6 = _this.resolvedSimples; + t7 = J.getInterceptor$ax(t6); + if (suffix == null) { + t1 = A.List_List$of(lastSimples, true, t5); + J.addAll$1$ax(t1, t7.skip$1(t6, 1)); + t1 = t1; + } else { + t2 = A.List_List$of(A.IterableExtension_get_exceptLast(lastSimples), true, t5); + J.add$1$ax(t2, J.get$last$ax(lastSimples).addSuffix$1(suffix)); + J.addAll$1$ax(t2, t7.skip$1(t6, 1)); + t1 = t2; + } + t2 = _this.component; + last = A.CompoundSelector$(t1, t2.selector.span); + t3 = A.List_List$of(A.IterableExtension_get_exceptLast(t4), true, type$.ComplexSelectorComponent); + t4 = t2.span; + J.add$1$ax(t3, new A.ComplexSelectorComponent(last, A.List_List$unmodifiable(t2.combinators, type$.CssValue_Combinator), t4)); + t4 = A.ComplexSelector$(complex.leadingCombinators, t3, t4, complex.lineBreak); + return t4; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withAdditionalSpan$2(_this.parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + }, + $signature: 60 + }; + A.SelectorList_withAdditionalCombinators_closure.prototype = { + call$1(complex) { + return complex.withAdditionalCombinators$1(this.combinators); + }, + $signature: 60 + }; + A._ParentSelectorVisitor.prototype = { + visitParentSelector$1(selector) { + return selector; + } + }; + A.__ParentSelectorVisitor_Object_SelectorSearchVisitor.prototype = {}; + A.ParentSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitParentSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); + } + }; + A.PlaceholderSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitPlaceholderSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.PlaceholderSelector(this.name + suffix, this.span); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlaceholderSelector && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.PseudoSelector.prototype = { + get$isHostContext() { + return this.isClass && this.name === "host-context" && this.selector != null; + }, + get$hasComplicatedSuperselectorSemantics() { + return !this.isClass || this.selector != null; + }, + get$specificity() { + var result, _this = this, + value = _this.__PseudoSelector_specificity_FI; + if (value === $) { + result = new A.PseudoSelector_specificity_closure(_this).call$0(); + _this.__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__PseudoSelector_specificity_FI = result; + value = result; + } + return value; + }, + withSelector$1(selector) { + var _this = this; + return A.PseudoSelector$(_this.name, _this.span, _this.argument, !_this.isClass, selector); + }, + addSuffix$1(suffix) { + var _this = this; + if (_this.argument != null || _this.selector != null) + _this.super$SimpleSelector$addSuffix(suffix); + return A.PseudoSelector$(_this.name + suffix, _this.span, null, !_this.isClass, null); + }, + unify$1(compound) { + var other, result, t2, addedThis, _i, simple, _this = this, + t1 = _this.name; + if (t1 === "host" || t1 === "host-context") { + if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure())) + return null; + } else { + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector)) { + if (other instanceof A.PseudoSelector) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector); + for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (simple instanceof A.PseudoSelector && !simple.isClass) { + if (t2) + return null; + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var selector, t1, t2, _this = this; + if (_this.super$SimpleSelector$isSuperselector(other)) + return true; + selector = _this.selector; + if (selector == null) + return _this.$eq(0, other); + if (other instanceof A.PseudoSelector && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { + t1 = A.NullableExtension_andThen(other.selector, selector.get$isSuperselector()); + return t1 == null ? false : t1; + } + t1 = type$.JSArray_SimpleSelector; + t2 = _this.span; + return A.compoundIsSuperselector(A.CompoundSelector$(A._setArrayType([_this], t1), t2), A.CompoundSelector$(A._setArrayType([other], t1), t2), null); + }, + accept$1$1(visitor) { + return visitor.visitPseudoSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.PseudoSelector && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); + }, + get$hashCode(_) { + var _this = this, + t1 = B.JSString_methods.get$hashCode(_this.name), + t2 = !_this.isClass ? 519018 : 218159; + return t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector); + } + }; + A.PseudoSelector_specificity_closure.prototype = { + call$0() { + var selector, t2, + t1 = this.$this; + if (!t1.isClass) + return 1; + selector = t1.selector; + if (selector == null) + return A.SimpleSelector.prototype.get$specificity.call(t1); + switch (t1.normalizedName) { + case "where": + return 0; + case "is": + case "not": + case "has": + case "matches": + t1 = selector.components; + return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); + case "nth-child": + case "nth-last-child": + t1 = A.SimpleSelector.prototype.get$specificity.call(t1); + t2 = selector.components; + return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); + default: + return A.SimpleSelector.prototype.get$specificity.call(t1); + } + }, + $signature: 10 + }; + A.PseudoSelector_specificity__closure.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 173 + }; + A.PseudoSelector_specificity__closure0.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 173 + }; + A.PseudoSelector_unify_closure.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.PseudoSelector) + t1 = simple.isClass && simple.name === "host" || simple.selector != null; + else + t1 = false; + return t1; + }, + $signature: 13 + }; + A.QualifiedName.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.QualifiedName && other.name === this.name && other.namespace == this.namespace; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? t2 : t1 + "|" + t2; + } + }; + A.SimpleSelector.prototype = { + get$specificity() { + return 1000; + }, + get$hasComplicatedSuperselectorSemantics() { + return false; + }, + addSuffix$1(suffix) { + return A.throwExpression(A.MultiSpanSassException$('Selector "' + this.toString$0(0) + "\" can't have a suffix", this.span, "outer selector", A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String), null)); + }, + unify$1(compound) { + var other, result, addedThis, _i, simple, _this = this, + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector)) { + if (other instanceof A.PseudoSelector) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector); + for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (!addedThis && simple instanceof A.PseudoSelector) { + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var list; + if (this.$eq(0, other)) + return true; + if (other instanceof A.PseudoSelector && other.isClass) { + list = other.selector; + if (list != null && $._subselectorPseudos.contains$1(0, other.normalizedName)) + return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure(this)); + } + return false; + } + }; + A.SimpleSelector_isSuperselector_closure.prototype = { + call$1(complex) { + var t1 = complex.components; + return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure(this.$this)); + }, + $signature: 19 + }; + A.SimpleSelector_isSuperselector__closure.prototype = { + call$1(simple) { + return this.$this.isSuperselector$1(simple); + }, + $signature: 13 + }; + A.TypeSelector.prototype = { + get$specificity() { + return 1; + }, + accept$1$1(visitor) { + return visitor.visitTypeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + var t1 = this.name; + return new A.TypeSelector(new A.QualifiedName(t1.name + suffix, t1.namespace), this.span); + }, + unify$1(compound) { + var unified, t1, + _0_0 = B.JSArray_methods.get$first(compound); + if (_0_0 instanceof A.UniversalSelector || _0_0 instanceof A.TypeSelector) { + unified = A.unifyUniversalAndElement(this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + t1 = A._setArrayType([this], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + }, + isSuperselector$1(other) { + var t1, t2, t3; + if (!this.super$SimpleSelector$isSuperselector(other)) { + t1 = false; + if (other instanceof A.TypeSelector) { + t2 = this.name; + t3 = other.name; + if (t2.name === t3.name) { + t1 = t2.namespace; + t1 = t1 === "*" || t1 == t3.namespace; + } + } + } else + t1 = true; + return t1; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.TypeSelector && other.name.$eq(0, this.name); + }, + get$hashCode(_) { + var t1 = this.name; + return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); + } + }; + A.UniversalSelector.prototype = { + get$specificity() { + return 0; + }, + accept$1$1(visitor) { + return visitor.visitUniversalSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + var _0_40, t1, rest, unified, t2, _this = this, _null = null, + _0_1 = compound.length, + _0_4_isSet = _0_1 >= 1, + _0_4 = _null; + if (_0_4_isSet) { + _0_40 = compound[0]; + t1 = _0_40; + _0_4 = t1; + if (!(t1 instanceof A.UniversalSelector)) + t1 = _0_4 instanceof A.TypeSelector; + else + t1 = true; + rest = t1 ? B.JSArray_methods.sublist$1(compound, 1) : _null; + } else { + rest = _null; + t1 = false; + } + if (t1) { + unified = A.unifyUniversalAndElement(_this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return _null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, rest); + return t1; + } + t1 = false; + if (_0_1 === 1) { + if (_0_4_isSet) + t2 = _0_4; + else { + _0_4 = compound[0]; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2 instanceof A.PseudoSelector) { + t2 = _0_4_isSet ? _0_4 : compound[0]; + type$.PseudoSelector._as(t2); + t1 = t2.isClass && t2.name === "host" || t2.get$isHostContext(); + } + } + if (t1) + return _null; + if (_0_1 <= 0) + return A._setArrayType([_this], type$.JSArray_SimpleSelector); + t1 = _this.namespace; + if (t1 == null || t1 === "*") + t1 = compound; + else { + t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, compound); + } + return t1; + }, + isSuperselector$1(other) { + var t1 = this.namespace; + if (t1 === "*") + return true; + if (other instanceof A.TypeSelector) + return t1 == other.name.namespace; + if (other instanceof A.UniversalSelector) + return t1 == other.namespace; + return t1 == null || this.super$SimpleSelector$isSuperselector(other); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UniversalSelector && other.namespace == this.namespace; + }, + get$hashCode(_) { + return J.get$hashCode$(this.namespace); + } + }; + A._compileStylesheet_closure0.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 6 + }; + A.AsyncEnvironment.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._async_environment$_forwardedModules, + t2 = _this._async_environment$_nestedForwardedModules, + t3 = _this._async_environment$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._async_environment$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._async_environment$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._async_environment$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.AsyncEnvironment$_(_this._async_environment$_modules, _this._async_environment$_namespaceNodes, _this._async_environment$_globalModules, _this._async_environment$_importedModules, t1, t2, _this._async_environment$_allModules, t3, t4, t5, t6, _this._async_environment$_content); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._async_environment$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); + view = A.ForwardedModuleView_ifNecessary(module, rule, type$.AsyncCallable); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._async_environment$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._async_environment$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._async_environment$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._async_environment$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _async_environment$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._async_environment$_forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : J.get$span$z(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, + forwarded = module._async_environment$_environment._async_environment$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._async_environment$_forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_AsyncCallable; + t2 = type$.AstNode; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._async_environment$_globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._async_environment$_variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._async_environment$_importedModules, t6 = type$.Module_AsyncCallable, t7 = type$.AstNode, t8 = A.MapExtensions_get_pairs(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.AsyncCallable, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + node = t11._1; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t11 = shadowed.variables; + t12 = false; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.functions; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.mixins; + if (t11.get$isEmpty(t11)) { + t11 = shadowed._shadowed_view$_inner; + t11 = t11.get$css(t11); + t11 = J.get$isEmpty$asx(t11.get$children(t11)); + } else + t11 = t12; + } else + t11 = t12; + } else + t11 = t12; + if (!t11) + t5.$indexSet(0, shadowed, node); + } + } + for (t6 = A.MapExtensions_get_pairs(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + node = t8._1; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t8 = shadowed.variables; + t9 = false; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.functions; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.mixins; + if (t8.get$isEmpty(t8)) { + t8 = shadowed._shadowed_view$_inner; + t8 = t8.get$css(t8); + t8 = J.get$isEmpty$asx(t8.get$children(t8)); + } else + t8 = t9; + } else + t8 = t9; + } else + t8 = t9; + if (!t8) + forwardedModules.$indexSet(0, shadowed, node); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._async_environment$_nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable); + for (t5 = type$.JSArray_Module_AsyncCallable, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._async_environment$_nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._async_environment$_variableIndices, t6 = _this._async_environment$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + J.remove$1$z(B.JSArray_methods.get$last(t4), t8); + J.remove$1$z(B.JSArray_methods.get$last(t6), t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._async_environment$_functionIndices, t4 = _this._async_environment$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._async_environment$_mixinIndices, t3 = _this._async_environment$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment$_variables[t1], $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._async_environment$_variables[_0_0], $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment$_variables[_1_0], $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _async_environment$_getVariableFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment$_variableNodes[t1], $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._async_environment$_variableNodes[_0_0], $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment$_variableNodes[_1_0], $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getVariableNodeFromGlobalModule$1($name); + } + }, + _async_environment$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._async_environment$_importedModules, t2 = this._async_environment$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._async_environment$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._async_environment$_variables).containsKey$1($name)) + return true; + return this._async_environment$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _async_environment$_variableIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._async_environment$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._async_environment$_variables.length === 1) { + _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure(_this, $name)); + t1 = _this._async_environment$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._async_environment$_fromOneModule$3($name, "variable", new A.AsyncEnvironment_setVariable_closure0($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._async_environment$_variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._async_environment$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._async_environment$_variableIndices.containsKey$1($name) && _this._async_environment$_variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure1(_this, $name)); + if (!_this._async_environment$_inSemiGlobalScope && index === 0) { + index = _this._async_environment$_variables.length - 1; + _this._async_environment$_variableIndices.$indexSet(0, $name, index); + } + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = index; + J.$indexSet$ax(_this._async_environment$_variables[index], $name, value); + J.$indexSet$ax(_this._async_environment$_variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._async_environment$_variables, + t2 = t1.length; + _this._async_environment$_lastVariableName = $name; + index = _this._async_environment$_lastVariableIndex = t2 - 1; + _this._async_environment$_variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._async_environment$_variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._async_environment$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._async_environment$_functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._async_environment$_functions[_0_0], $name); + return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment$_functions[_1_0], $name); + return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _async_environment$_getFunctionFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure($name)); + }, + _async_environment$_functionIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._async_environment$_mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._async_environment$_mixins[_0_0], $name); + return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment$_mixins[_1_0], $name); + return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getMixinFromGlobalModule$1($name); + } + }, + _async_environment$_getMixinFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure($name)); + }, + _async_environment$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + return this.withContent$body$AsyncEnvironment($content, callback); + }, + withContent$body$AsyncEnvironment($content, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldContent; + var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldContent = $async$self._async_environment$_content; + $async$self._async_environment$_content = $content; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$withContent$2); + case 2: + // returning from await. + $async$self._async_environment$_content = oldContent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$withContent$2, $async$completer); + }, + asMixin$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldInMixin; + var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInMixin = $async$self._async_environment$_inMixin; + $async$self._async_environment$_inMixin = true; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$asMixin$1); + case 2: + // returning from await. + $async$self._async_environment$_inMixin = oldInMixin; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$asMixin$1, $async$completer); + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { + return this.scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $T); + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; + var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + semiGlobal = semiGlobal && $async$self._async_environment$_inSemiGlobalScope; + wasInSemiGlobalScope = $async$self._async_environment$_inSemiGlobalScope; + $async$self._async_environment$_inSemiGlobalScope = semiGlobal; + $async$goto = !when ? 3 : 4; + break; + case 3: + // then + $async$handler = 5; + $async$goto = 8; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 8: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 6; + break; + $async$next.push(7); + // goto finally + $async$goto = 6; + break; + case 5: + // uncaught + $async$next = [2]; + case 6: + // finally + $async$handler = 2; + $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 7: + // after finally + case 4: + // join + t1 = $async$self._async_environment$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); + t3 = $async$self._async_environment$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); + t4 = $async$self._async_environment$_functions; + t5 = type$.AsyncCallable; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = $async$self._async_environment$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = $async$self._async_environment$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable)); + $async$handler = 9; + $async$goto = 12; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 12: + // returning from await. + t2 = $async$result; + $async$returnValue = t2; + $async$next = [1]; + // goto finally + $async$goto = 10; + break; + $async$next.push(11); + // goto finally + $async$goto = 10; + break; + case 9: + // uncaught + $async$next = [2]; + case 10: + // finally + $async$handler = 2; + $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; + $async$self._async_environment$_lastVariableIndex = $async$self._async_environment$_lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = $async$self._async_environment$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = $async$self._async_environment$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = $async$self._async_environment$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = $async$self._async_environment$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 11: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, i, values, nodes, t5, t6, $name, value, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue); + for (t2 = this._async_environment$_variables, t3 = type$.Value, t4 = this._async_environment$_variableNodes, i = 0; i < t2.length; ++i) { + values = t2[i]; + nodes = t4[i]; + for (t5 = A.MapExtensions_get_pairs(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + t6 = nodes.$index(0, $name); + t6.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue(value, null, t6)); + } + } + return new A.Configuration(configuration, null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule0(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toModule_closure())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule0(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty7, B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure())); + }, + _async_environment$_getModule$1(namespace) { + var _0_0 = this._async_environment$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); + }, + _async_environment$_fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._async_environment$_nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._async_environment$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._async_environment$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.AsyncCallable, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs(t1, type$.Module_AsyncCallable, type$.AstNode), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _async_environment$_fromOneModule$3($name, type, callback) { + return this._async_environment$_fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.AsyncEnvironment__getVariableFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 451 + }; + A.AsyncEnvironment_setVariable_closure.prototype = { + call$0() { + var t1 = this.$this; + t1._async_environment$_lastVariableName = this.name; + return t1._async_environment$_lastVariableIndex = 0; + }, + $signature: 10 + }; + A.AsyncEnvironment_setVariable_closure0.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 457 + }; + A.AsyncEnvironment_setVariable_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._async_environment$_variableIndex$1(this.name); + return t2 == null ? t1._async_environment$_variables.length - 1 : t2; + }, + $signature: 10 + }; + A.AsyncEnvironment__getFunctionFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 178 + }; + A.AsyncEnvironment__getMixinFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 178 + }; + A.AsyncEnvironment_toModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); + }, + $signature: 180 + }; + A.AsyncEnvironment_toDummyModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); + }, + $signature: 180 + }; + A._EnvironmentModule0.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._async_environment$_modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._async_environment$_environment; + t2 = t1._async_environment$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._async_environment$_variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._async_environment$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet(_this.css, _this.extensionStore); + return A._EnvironmentModule$_0(_this._async_environment$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._async_environment$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule0: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure5.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 509 + }; + A._EnvironmentModule__EnvironmentModule_closure6.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 522 + }; + A._EnvironmentModule__EnvironmentModule_closure7.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 181 + }; + A._EnvironmentModule__EnvironmentModule_closure8.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 181 + }; + A._EnvironmentModule__EnvironmentModule_closure9.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 117 + }; + A._EnvironmentModule__EnvironmentModule_closure10.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 117 + }; + A.AsyncImportCache.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + return this.canonicalize$body$AsyncImportCache(0, url, baseImporter, baseUrl, forImport); + }, + canonicalize$body$AsyncImportCache(_, url, baseImporter, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), + $async$returnValue, $async$self = this, t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j; + var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter) && $async$self._async_import_cache$_importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Custom); + $async$goto = baseImporter != null && url.get$scheme() === "" ? 3 : 4; + break; + case 3: + // then + resolvedUrl = baseUrl == null ? null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + $async$goto = 5; + return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_perImporterCanonicalizeCache, key, new A.AsyncImportCache_canonicalize_closure($async$self, baseImporter, resolvedUrl, baseUrl, forImport, key, url), type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport, type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 5: + // returning from await. + relativeResult = $async$result; + if (relativeResult != null) { + $async$returnValue = relativeResult; + // goto return + $async$goto = 1; + break; + } + case 4: + // join + key = new A._Record_2_forImport(url, forImport); + t1 = $async$self._async_import_cache$_canonicalizeCache; + if (t1.containsKey$1(key)) { + $async$returnValue = t1.$index(0, key); + // goto return + $async$goto = 1; + break; + } + t2 = $async$self._async_import_cache$_importers, t3 = type$.Record_1_nullable_Object, t4 = $async$self._async_import_cache$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl, t6 = type$.Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl, cacheable = true, i = 0; + case 6: + // for condition + if (!(i < t2.length)) { + // goto after for + $async$goto = 8; + break; + } + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = null; + _1_2_isSet = t3._is(_1_0); + result = null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = null; + t7 = false; + } + if (t7) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) { + // goto for update + $async$goto = 7; + break; + } + $async$goto = 10; + return A._asyncAwait($async$self._async_import_cache$_canonicalize$4(importer, url, baseUrl, forImport), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 10: + // returning from await. + _2_0 = $async$result; + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = null; + _2_3 = null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = null; + if (t7) { + t1.$indexSet(0, key, result); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + // goto break $label0$1 + $async$goto = 9; + break; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), null); + cacheable = false; + } + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + } + case 9: + // break $label0$1 + case 7: + // for update + ++i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + if (cacheable) + t1.$indexSet(0, key, null); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); + }, + _async_import_cache$_canonicalize$4(importer, url, baseUrl, forImport) { + return this._canonicalize$body$AsyncImportCache(importer, url, baseUrl, forImport); + }, + _canonicalize$body$AsyncImportCache(importer, url, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool), + $async$returnValue, $async$self = this, t1, passContainingUrl, canonicalizeContext, result, cacheable; + var $async$_async_import_cache$_canonicalize$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = baseUrl != null ? 3 : 5; + break; + case 3: + // then + $async$goto = url.get$scheme() !== "" ? 6 : 8; + break; + case 6: + // then + t1 = A._Future$value(importer.isNonCanonicalScheme$1(url.get$scheme()), type$.bool); + $async$goto = 9; + return A._asyncAwait(t1, $async$_async_import_cache$_canonicalize$4); + case 9: + // returning from await. + t1 = $async$result; + passContainingUrl = t1; + // goto join + $async$goto = 7; + break; + case 8: + // else + passContainingUrl = true; + case 7: + // join + // goto join + $async$goto = 4; + break; + case 5: + // else + passContainingUrl = false; + case 4: + // join + canonicalizeContext = new A.CanonicalizeContext(forImport, passContainingUrl ? baseUrl : null); + t1 = type$.nullable_Object; + t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.FutureOr_nullable_Uri); + $async$goto = 10; + return A._asyncAwait(type$.Future_nullable_Uri._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Uri), $async$_async_import_cache$_canonicalize$4); + case 10: + // returning from await. + result = $async$result; + cacheable = !passContainingUrl || !canonicalizeContext._wasContainingUrlAccessed; + if (result == null) { + $async$returnValue = new A._Record_2(null, cacheable); + // goto return + $async$goto = 1; + break; + } + $async$goto = result.get$scheme() === "" ? 11 : 13; + break; + case 11: + // then + A.WarnForDeprecation_warnForDeprecation($async$self._async_import_cache$_logger, B.Deprecation_IMm, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2e_Rela, null, null); + // goto join + $async$goto = 12; + break; + case 13: + // else + t1 = A._Future$value(importer.isNonCanonicalScheme$1(result.get$scheme()), type$.bool); + $async$goto = 14; + return A._asyncAwait(t1, $async$_async_import_cache$_canonicalize$4); + case 14: + // returning from await. + if ($async$result) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + case 12: + // join + $async$returnValue = new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_import_cache$_canonicalize$4, $async$completer); + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this.importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl, quiet); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl, quiet) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), + $async$returnValue, $async$self = this; + var $async$importCanonical$4$originalUrl$quiet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure($async$self, importer, canonicalUrl, originalUrl, quiet), type$.Uri, type$.nullable_Stylesheet), $async$importCanonical$4$originalUrl$quiet); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$importCanonical$4$originalUrl$quiet, $async$completer); + }, + humanize$1(canonicalUrl) { + var t1 = type$.NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl; + t1 = A.NullableExtension_andThen(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._async_import_cache$_canonicalizeCache.get$values(0), t1), new A.AsyncImportCache_humanize_closure(canonicalUrl), t1._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure0(), t1._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure1()), new A.AsyncImportCache_humanize_closure2(canonicalUrl)); + return t1 == null ? canonicalUrl : t1; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._async_import_cache$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + } + }; + A.AsyncImportCache_canonicalize_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), + $async$returnValue, $async$self = this, t1, t2, _0_0, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.baseUrl; + $async$goto = 3; + return A._asyncAwait(t1._async_import_cache$_canonicalize$4($async$self.baseImporter, $async$self.resolvedUrl, t2, $async$self.forImport), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + _0_0._1; + if (t2 != null) + t1._async_import_cache$_nonCanonicalRelativeUrls.$indexSet(0, $async$self.key, $async$self.url); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 540 + }; + A.AsyncImportCache__canonicalize_closure.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 186 + }; + A.AsyncImportCache_importCanonical_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), + $async$returnValue, $async$self = this, t3, t4, t1, t2, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.canonicalUrl; + t2 = A._Future$value($async$self.importer.load$1(0, t1), type$.nullable_ImporterResult); + $async$goto = 3; + return A._asyncAwait(t2, $async$call$0); + case 3: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t2 = $async$self.$this; + t2._async_import_cache$_resultsCache.$indexSet(0, t1, result); + t3 = result.contents; + t4 = result.syntax; + t1 = $async$self.originalUrl.resolveUri$1(t1); + $async$returnValue = A.Stylesheet_Stylesheet$parse(t3, t4, $async$self.quiet ? $.$get$Logger_quiet() : t2._async_import_cache$_logger, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 571 + }; + A.AsyncImportCache_humanize_closure.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 597 + }; + A.AsyncImportCache_humanize_closure0.prototype = { + call$1(result) { + return result._2; + }, + $signature: 644 + }; + A.AsyncImportCache_humanize_closure1.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.AsyncImportCache_humanize_closure2.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 48 + }; + A.AsyncBuiltInCallable.prototype = { + callbackFor$2(positional, names) { + return new A._Record_2(this._async_built_in$_arguments, this._async_built_in$_callback); + }, + withDeprecationWarning$1(module) { + return new A.AsyncBuiltInCallable(this.name, this._async_built_in$_arguments, new A.AsyncBuiltInCallable_withDeprecationWarning_closure(this, module, null), false); + }, + $isAsyncCallable: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.AsyncBuiltInCallable$mixin_closure.prototype = { + call$1($arguments) { + return this.$call$body$AsyncBuiltInCallable$mixin_closure($arguments); + }, + $call$body$AsyncBuiltInCallable$mixin_closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callback.call$1($arguments); + $async$goto = 3; + return A._asyncAwait(t1 instanceof A._Future ? t1 : A._Future$value(t1, type$.void), $async$call$1); + case 3: + // returning from await. + $async$returnValue = B.C__SassNull; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 193 + }; + A.AsyncBuiltInCallable_withDeprecationWarning_closure.prototype = { + call$1(args) { + A.warnForDeprecation(string$.Global, B.Deprecation_IIf); + return this.$this._async_built_in$_callback.call$1(args); + }, + $signature: 301 + }; + A.BuiltInCallable.prototype = { + callbackFor$2(positional, names) { + var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; + for (t1 = this._overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + overload = t1[_i]; + t3 = overload._0; + if (t3.matches$2(positional, names)) + return overload; + mismatchDistance = t3.$arguments.length - positional; + if (minMismatchDistance != null) { + t3 = Math.abs(mismatchDistance); + t4 = Math.abs(minMismatchDistance); + if (t3 > t4) + continue; + if (t3 === t4 && mismatchDistance < 0) + continue; + } + minMismatchDistance = mismatchDistance; + fuzzyMatch = overload; + } + if (fuzzyMatch != null) + return fuzzyMatch; + throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); + }, + withName$1($name) { + return new A.BuiltInCallable($name, this._overloads, this.acceptsContent); + }, + withDeprecationWarning$2(module, newName) { + var t2, t3, _i, t4, t5, _this = this, + t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value); + for (t2 = _this._overloads, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = {}; + t5 = t2[_i]; + t4.$function = null; + t4.$function = t5._1; + t1.push(new A._Record_2(t5._0, new A.BuiltInCallable_withDeprecationWarning_closure(t4, _this, module, newName))); + } + return new A.BuiltInCallable(_this.name, t1, _this.acceptsContent); + }, + withDeprecationWarning$1(module) { + return this.withDeprecationWarning$2(module, null); + }, + $isCallable0: 1, + $isAsyncCallable: 1, + $isAsyncBuiltInCallable: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.BuiltInCallable$mixin_closure.prototype = { + call$1($arguments) { + this.callback.call$1($arguments); + return B.C__SassNull; + }, + $signature: 4 + }; + A.BuiltInCallable_withDeprecationWarning_closure.prototype = { + call$1(args) { + A.warnForDeprecation(string$.Global, B.Deprecation_IIf); + return this._box_0.$function.call$1(args); + }, + $signature: 4 + }; + A.PlainCssCallable.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlainCssCallable && this.name === other.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + }, + $isCallable0: 1, + $isAsyncCallable: 1, + get$name(receiver) { + return this.name; + } + }; + A.UserDefinedCallable.prototype = { + get$name(_) { + return this.declaration.name; + }, + $isCallable0: 1, + $isAsyncCallable: 1 + }; + A._compileStylesheet_closure.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 6 + }; + A.CompileResult.prototype = {}; + A.Configuration.prototype = { + throughForward$1($forward) { + var _0_0, _1_0, _2_0, t1, hiddenVariables, + newValues = this._configuration$_values; + if (newValues.get$isEmpty(newValues)) + return B.Configuration_Map_empty_null; + _0_0 = $forward.prefix; + if (_0_0 != null) + newValues = new A.UnprefixedMapView(newValues, _0_0, type$.UnprefixedMapView_ConfiguredValue); + _1_0 = $forward.shownVariables; + if (_1_0 != null) + newValues = new A.LimitedMapView(newValues, _1_0._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue); + else { + _2_0 = $forward.hiddenVariables; + if (_2_0 != null) { + t1 = _2_0._base.get$isNotEmpty(0); + hiddenVariables = _2_0; + } else { + hiddenVariables = null; + t1 = false; + } + if (t1) + newValues = A.LimitedMapView$blocklist(newValues, hiddenVariables, type$.String, type$.ConfiguredValue); + } + return this._withValues$1(newValues); + }, + _withValues$1(values) { + var t1 = this.__originalConfiguration; + return new A.Configuration(values, t1 == null ? this : t1); + }, + toString$0(_) { + var t2, t3, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(this._configuration$_values, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + t3._1.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ",") + ")"; + } + }; + A.ExplicitConfiguration.prototype = { + _withValues$1(values) { + var t1 = this.__originalConfiguration; + if (t1 == null) + t1 = this; + return new A.ExplicitConfiguration(this.nodeWithSpan, values, t1); + } + }; + A.ConfiguredValue.prototype = { + toString$0(_) { + return this.value.toString$0(0); + } + }; + A.Deprecation.prototype = { + _enumToString$0() { + return "Deprecation." + this._name; + }, + toString$0(_) { + return this.id; + } + }; + A.Deprecation_fromId_closure.prototype = { + call$1(deprecation) { + return deprecation.id === this.id; + }, + $signature: 303 + }; + A.Environment.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._forwardedModules, + t2 = _this._nestedForwardedModules, + t3 = _this._variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.Environment$_(_this._environment$_modules, _this._namespaceNodes, _this._globalModules, _this._importedModules, t1, t2, _this._allModules, t3, t4, t5, t6, _this._content); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); + view = A.ForwardedModuleView_ifNecessary(module, rule, type$.Callable); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : J.get$span$z(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, + forwarded = module._environment$_environment._forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_Callable; + t2 = type$.AstNode; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._importedModules, t6 = type$.Module_Callable, t7 = type$.AstNode, t8 = A.MapExtensions_get_pairs(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.Callable, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + node = t11._1; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t11 = shadowed.variables; + t12 = false; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.functions; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.mixins; + if (t11.get$isEmpty(t11)) { + t11 = shadowed._shadowed_view$_inner; + t11 = t11.get$css(t11); + t11 = J.get$isEmpty$asx(t11.get$children(t11)); + } else + t11 = t12; + } else + t11 = t12; + } else + t11 = t12; + if (!t11) + t5.$indexSet(0, shadowed, node); + } + } + for (t6 = A.MapExtensions_get_pairs(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + node = t8._1; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t8 = shadowed.variables; + t9 = false; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.functions; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.mixins; + if (t8.get$isEmpty(t8)) { + t8 = shadowed._shadowed_view$_inner; + t8 = t8.get$css(t8); + t8 = J.get$isEmpty$asx(t8.get$children(t8)); + } else + t8 = t9; + } else + t8 = t9; + } else + t8 = t9; + if (!t8) + forwardedModules.$indexSet(0, shadowed, node); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable); + for (t5 = type$.JSArray_Module_Callable, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._variableIndices, t6 = _this._variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + J.remove$1$z(B.JSArray_methods.get$last(t4), t8); + J.remove$1$z(B.JSArray_methods.get$last(t6), t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._functionIndices, t4 = _this._functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._mixinIndices, t3 = _this._mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$variables().$index(0, $name); + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._variables[t1], $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._variables[_0_0], $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._variableIndex$1($name); + if (_1_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._variables[_1_0], $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } else + return _this._getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _getVariableFromGlobalModule$1($name) { + return this._fromOneModule$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._variableNodes[t1], $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._variableNodes[_0_0], $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._variableIndex$1($name); + if (_1_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._variableNodes[_1_0], $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._getVariableNodeFromGlobalModule$1($name); + } + }, + _getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._importedModules, t2 = this._globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._variables).containsKey$1($name)) + return true; + return this._getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _variableIndex$1($name) { + var t1, i; + for (t1 = this._variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._variables.length === 1) { + _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure(_this, $name)); + t1 = _this._variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._fromOneModule$3($name, "variable", new A.Environment_setVariable_closure0($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._nestedForwardedModules; + if (nestedForwardedModules != null && !_this._variableIndices.containsKey$1($name) && _this._variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure1(_this, $name)); + if (!_this._inSemiGlobalScope && index === 0) { + index = _this._variables.length - 1; + _this._variableIndices.$indexSet(0, $name, index); + } + _this._lastVariableName = $name; + _this._lastVariableIndex = index; + J.$indexSet$ax(_this._variables[index], $name, value); + J.$indexSet$ax(_this._variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._variables, + t2 = t1.length; + _this._lastVariableName = $name; + index = _this._lastVariableIndex = t2 - 1; + _this._variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._functions[_0_0], $name); + return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._functions[_1_0], $name); + return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _getFunctionFromGlobalModule$1($name) { + return this._fromOneModule$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure($name)); + }, + _functionIndex$1($name) { + var t1, i; + for (t1 = this._functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._mixins[_0_0], $name); + return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._mixins[_1_0], $name); + return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; + } else + return _this._getMixinFromGlobalModule$1($name); + } + }, + _getMixinFromGlobalModule$1($name) { + return this._fromOneModule$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure($name)); + }, + _mixinIndex$1($name) { + var t1, i; + for (t1 = this._mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + var oldContent = this._content; + this._content = $content; + callback.call$0(); + this._content = oldContent; + }, + asMixin$1(callback) { + var oldInMixin = this._inMixin; + this._inMixin = true; + callback.call$0(); + this._inMixin = oldInMixin; + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when) { + var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; + semiGlobal = semiGlobal && _this._inSemiGlobalScope; + wasInSemiGlobalScope = _this._inSemiGlobalScope; + _this._inSemiGlobalScope = semiGlobal; + if (!when) + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._inSemiGlobalScope = wasInSemiGlobalScope; + } + t1 = _this._variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); + t3 = _this._variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); + t4 = _this._functions; + t5 = type$.Callable; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = _this._mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = _this._nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_Callable)); + try { + t2 = callback.call$0(); + return t2; + } finally { + _this._inSemiGlobalScope = wasInSemiGlobalScope; + _this._lastVariableIndex = _this._lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = _this._variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = _this._functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = _this._mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = _this._nestedForwardedModules; + if (t1 != null) + t1.pop(); + } + }, + scope$1$1(callback) { + return this.scope$1$3$semiGlobal$when(callback, false, true); + }, + scope$1$2$when(callback, when) { + return this.scope$1$3$semiGlobal$when(callback, false, when); + }, + scope$1$2$semiGlobal(callback, semiGlobal) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, i, values, nodes, t5, t6, $name, value, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue); + for (t2 = this._variables, t3 = type$.Value, t4 = this._variableNodes, i = 0; i < t2.length; ++i) { + values = t2[i]; + nodes = t4[i]; + for (t5 = A.MapExtensions_get_pairs(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + t6 = nodes.$index(0, $name); + t6.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue(value, null, t6)); + } + } + return new A.Configuration(configuration, null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toModule_closure())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty0, B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toDummyModule_closure())); + }, + _getModule$1(namespace) { + var _0_0 = this._environment$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); + }, + _fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.Callable, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs(t1, type$.Module_Callable, type$.AstNode), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _fromOneModule$3($name, type, callback) { + return this._fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.Environment__getVariableFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 305 + }; + A.Environment_setVariable_closure.prototype = { + call$0() { + var t1 = this.$this; + t1._lastVariableName = this.name; + return t1._lastVariableIndex = 0; + }, + $signature: 10 + }; + A.Environment_setVariable_closure0.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 308 + }; + A.Environment_setVariable_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._variableIndex$1(this.name); + return t2 == null ? t1._variables.length - 1 : t2; + }, + $signature: 10 + }; + A.Environment__getFunctionFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 197 + }; + A.Environment__getMixinFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 197 + }; + A.Environment_toModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); + }, + $signature: 201 + }; + A.Environment_toDummyModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); + }, + $signature: 201 + }; + A._EnvironmentModule.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._environment$_environment; + t2 = t1._variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet(_this.css, _this.extensionStore); + return A._EnvironmentModule$_(_this._environment$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule0: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 321 + }; + A._EnvironmentModule__EnvironmentModule_closure0.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 322 + }; + A._EnvironmentModule__EnvironmentModule_closure1.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 204 + }; + A._EnvironmentModule__EnvironmentModule_closure2.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 204 + }; + A._EnvironmentModule__EnvironmentModule_closure3.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 113 + }; + A._EnvironmentModule__EnvironmentModule_closure4.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 113 + }; + A.SassException.prototype = { + get$trace(_) { + return A.Trace$(A._setArrayType([A.frameForSpan(A.SourceSpanException.prototype.get$span.call(this, 0), "root stylesheet", null)], type$.JSArray_Frame), null); + }, + get$span(_) { + return A.SourceSpanException.prototype.get$span.call(this, 0); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassException$(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withTrace$1(trace) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(this.loadedUrls, type$.Uri); + return new A.SassRuntimeException(trace, t2, this._span_exception$_message, t1); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassException(t2, this._span_exception$_message, t1); + }, + toString$1$color(_, color) { + var t2, _i, frame, t3, _this = this, + buffer = new A.StringBuffer(""), + t1 = "" + ("Error: " + _this._span_exception$_message + "\n"); + buffer._contents = t1; + buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, 0).highlight$1$color(color); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + t3 = buffer._contents += "\n"; + buffer._contents = t3 + (" " + A.S(frame)); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + toCssString$0() { + var commentMessage, stringMessage, rune, + t1 = $._glyphs, + t2 = $._glyphs = B.C_AsciiGlyphSet, + t3 = this.toString$1$color(0, false); + t3 = A.stringReplaceAllUnchecked(t3, "*/", "*\u2215"); + commentMessage = A.stringReplaceAllUnchecked(t3, "\r\n", "\n"); + $._glyphs = t1 === B.C_AsciiGlyphSet ? t2 : B.C_UnicodeGlyphSet; + stringMessage = new A.StringBuffer(""); + for (t1 = new A.RuneIterator(A.serializeValue(new A.SassString(this.toString$1$color(0, false), true), true, true)); t1.moveNext$0();) { + rune = t1._currentCodePoint; + if (rune > 127) { + t2 = A.Primitives_stringFromCharCode(92); + stringMessage._contents += t2; + t2 = B.JSInt_methods.toRadixString$1(rune, 16); + stringMessage._contents += t2; + t2 = A.Primitives_stringFromCharCode(32); + stringMessage._contents += t2; + } else { + t2 = A.Primitives_stringFromCharCode(rune); + stringMessage._contents += t2; + } + } + return "/* " + B.JSArray_methods.join$1(A._setArrayType(commentMessage.split("\n"), type$.JSArray_String), "\n * ") + ' */\n\nbody::before {\n font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",\n "Droid Sans Mono", monospace, monospace;\n white-space: pre;\n display: block;\n padding: 1em;\n margin-bottom: 1em;\n border-bottom: 2px solid black;\n content: ' + stringMessage.toString$0(0) + ";\n}"; + } + }; + A.MultiSpanSassException.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withTrace$1(trace) { + var _this = this; + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + toString$1$color(_, color) { + var t1, t2, _i, frame, t3, _this = this, + useColor = color === true, + buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); + A.NullableExtension_andThen(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + buffer._contents += "\n"; + t3 = " " + A.S(frame); + buffer._contents += t3; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + get$primaryLabel() { + return this.primaryLabel; + }, + get$secondarySpans() { + return this.secondarySpans; + } + }; + A.SassRuntimeException.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this; + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassRuntimeException(this.trace, t2, this._span_exception$_message, t1); + }, + get$trace(receiver) { + return this.trace; + } + }; + A.MultiSpanSassRuntimeException.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, _this.trace, loadedUrls); + }, + $isSassRuntimeException: 1, + get$trace(receiver) { + return this.trace; + } + }; + A.SassFormatException.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassFormatException$(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassFormatException(t2, this._span_exception$_message, t1); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1 + }; + A.MultiSpanSassFormatException.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassFormatException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassFormatException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + $isFormatException: 1, + $isSassFormatException: 1, + $isSourceSpanFormatException: 1, + $isMultiSourceSpanFormatException: 1 + }; + A.SassScriptException.prototype = { + withSpan$1(span) { + return new A.SassException(B.Set_empty, this.message, span); + }, + toString$0(_) { + return this.message + string$.x0a_BUG_; + }, + get$message(receiver) { + return this.message; + } + }; + A.MultiSpanSassScriptException.prototype = { + withSpan$1(span) { + return A.MultiSpanSassException$(this.message, span, this.primaryLabel, this.secondarySpans, null); + } + }; + A._writeSourceMap_closure.prototype = { + call$1(url) { + return this.options.sourceMapUrl$2(0, A.Uri_parse(url), this.destination).toString$0(0); + }, + $signature: 6 + }; + A.ExecutableOptions.prototype = { + get$interactive() { + var result, _this = this, + value = _this.__ExecutableOptions_interactive_FI; + if (value === $) { + result = new A.ExecutableOptions_interactive_closure(_this).call$0(); + _this.__ExecutableOptions_interactive_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__ExecutableOptions_interactive_FI = result; + value = result; + } + return value; + }, + get$color() { + var t1 = this._options; + return t1.wasParsed$1("color") ? A._asBool(t1.$index(0, "color")) : A.hasTerminal(); + }, + get$pkgImporters() { + var t2, t3, t4, _null = null, + t1 = A._setArrayType([], type$.JSArray_Importer); + for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "pkg-importer"))); t2.moveNext$0();) { + t2.get$current(t2); + t3 = new A.NodePackageImporter(); + t4 = self.process; + if (t4 == null) + t4 = _null; + else { + t4 = J.get$release$x(t4); + t4 = t4 == null ? _null : J.get$name$x(t4); + } + if (!J.$eq$(t4, "node") && self.document != null && typeof self.document.querySelector == "function") + A.throwExpression(string$.The_No); + t3.__NodePackageImporter__entryPointDirectory_F = $.$get$context().absolute$15(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + t1.push(t3); + } + return t1; + }, + get$emitErrorCss() { + var t1 = A._asBoolQ(this._options.$index(0, "error-css")); + if (t1 == null) { + this._ensureSources$0(); + t1 = this._sourcesToDestinations; + t1 = t1.get$values(t1).any$1(0, new A.ExecutableOptions_emitErrorCss_closure()); + } + return t1; + }, + _ensureSources$0() { + var t1, stdin, t2, t3, $directories, t4, t5, t6, colonArgs, positionalArgs, t7, t8, t9, message, target, source, destination, seen, _0_0, _this = this, _null = null, + _s18_ = 'Duplicate source "'; + if (_this._sourcesToDestinations != null) + return; + t1 = _this._options; + stdin = A._asBool(t1.$index(0, "stdin")); + t2 = t1.rest; + if (t2.get$length(0) === 0 && !stdin) + A.ExecutableOptions__fail("Compile Sass to CSS."); + t3 = type$.String; + $directories = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (t4 = t2.$ti, t5 = t4._eval$1("ListIterator"), t6 = new A.ListIterator(t2, t2.get$length(0), t5), t4 = t4._eval$1("ListBase.E"), colonArgs = false, positionalArgs = false; t6.moveNext$0();) { + t7 = t6.__internal$_current; + if (t7 == null) + t7 = t4._as(t7); + t8 = t7.length; + if (t8 === 0) + A.ExecutableOptions__fail('Invalid argument "".'); + if (A.stringContainsUnchecked(t7, ":", 0)) { + if (t8 > 2) { + t9 = t7.charCodeAt(0); + if (!(t9 >= 97 && t9 <= 122)) + t9 = t9 >= 65 && t9 <= 90; + else + t9 = true; + t9 = t9 && t7.charCodeAt(1) === 58; + } else + t9 = false; + if (t9) { + if (2 > t8) + A.throwExpression(A.RangeError$range(2, 0, t8, _null, _null)); + t8 = A.stringContainsUnchecked(t7, ":", 2); + } else + t8 = true; + } else + t8 = false; + if (t8) + colonArgs = true; + else if (A.dirExists(t7)) + $directories.add$1(0, t7); + else + positionalArgs = true; + } + if (positionalArgs || t2.get$length(0) === 0) { + if (colonArgs) + A.ExecutableOptions__fail('Positional and ":" arguments may not both be used.'); + else if (stdin) { + if (J.get$length$asx(t2._collection$_source) > 1) + A.ExecutableOptions__fail("Only one argument is allowed with --stdin."); + else if (A._asBool(t1.$index(0, "update"))) + A.ExecutableOptions__fail("--update is not allowed with --stdin."); + else if (A._asBool(t1.$index(0, "watch"))) + A.ExecutableOptions__fail("--watch is not allowed with --stdin."); + t1 = t2.get$length(0) === 0 ? _null : t2.get$first(t2); + t2 = type$.dynamic; + t3 = type$.nullable_String; + _this._sourcesToDestinations = A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([null, t1], t2, t2), t3, t3); + } else { + t3 = t2._collection$_source; + t4 = J.getInterceptor$asx(t3); + if (t4.get$length(t3) > 2) + A.ExecutableOptions__fail("Only two positional args may be passed."); + else if ($directories._collection$_length !== 0) { + message = 'Directory "' + A.S($directories.get$first(0)) + '" may not be a positional arg.'; + target = t2.get$last(t2); + A.ExecutableOptions__fail(J.$eq$($directories.get$first(0), t2.get$first(t2)) && !A.fileExists(target) ? message + ('\nTo compile all CSS in "' + A.S($directories.get$first(0)) + '" to "' + target + '", use `sass ' + A.S($directories.get$first(0)) + ":" + target + "`.") : message); + } else { + source = J.$eq$(t2.get$first(t2), "-") ? _null : t2.get$first(t2); + destination = t4.get$length(t3) === 1 ? _null : t2.get$last(t2); + if (destination == null) + if (A._asBool(t1.$index(0, "update"))) + A.ExecutableOptions__fail("--update is not allowed when printing to stdout."); + else if (A._asBool(t1.$index(0, "watch"))) + A.ExecutableOptions__fail("--watch is not allowed when printing to stdout."); + t1 = A.PathMap__create(_null, type$.nullable_String); + t1.$indexSet(0, source, destination); + _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, type$.PathMap_nullable_String), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); + } + } + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = B.Map_empty; + return; + } + if (stdin) + A.ExecutableOptions__fail('--stdin may not be used with ":" arguments.'); + seen = A.LinkedHashSet_LinkedHashSet$_empty(t3); + t1 = A.PathMap__create(_null, t3); + t6 = type$.PathMap_String; + t3 = A.PathMap__create(_null, t3); + for (t2 = new A.ListIterator(t2, t2.get$length(0), t5); t2.moveNext$0();) { + t5 = t2.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if ($directories.contains$1(0, t5)) { + if (!seen.add$1(0, t5)) + A.ExecutableOptions__fail(_s18_ + t5 + '".'); + t3.$indexSet(0, t5, t5); + t1.addAll$1(0, _this._listSourceDirectory$2(t5, t5)); + continue; + } + _0_0 = _this._splitSourceAndDestination$1(t5); + source = _0_0._0; + destination = _0_0._1; + if (!seen.add$1(0, source)) + A.ExecutableOptions__fail(_s18_ + source + '".'); + if (source === "-") + t1.$indexSet(0, _null, destination); + else if (A.dirExists(source)) { + t3.$indexSet(0, source, destination); + t1.addAll$1(0, _this._listSourceDirectory$2(source, destination)); + } else + t1.$indexSet(0, source, destination); + } + _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, t6), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = new A.UnmodifiableMapView(new A.PathMap(t3, t6), type$.UnmodifiableMapView_of_nullable_String_and_String); + }, + _splitSourceAndDestination$1(argument) { + var t1, i, t2, t3, nextColon; + for (t1 = argument.length, i = 0; i < t1; ++i) { + t2 = false; + if (i === 1) { + t3 = i - 1; + if (t1 > t3 + 2) { + t2 = argument.charCodeAt(t3); + if (!(t2 >= 97 && t2 <= 122)) + t2 = t2 >= 65 && t2 <= 90; + else + t2 = true; + t2 = t2 && argument.charCodeAt(t3 + 1) === 58; + } + } + if (t2) + continue; + if (argument.charCodeAt(i) === 58) { + t2 = i + 1; + nextColon = B.JSString_methods.indexOf$2(argument, ":", t2); + t3 = false; + if (nextColon === i + 2) + if (t1 > t2 + 2) { + t1 = argument.charCodeAt(t2); + if (!(t1 >= 97 && t1 <= 122)) + t1 = t1 >= 65 && t1 <= 90; + else + t1 = true; + t1 = t1 && argument.charCodeAt(t2 + 1) === 58; + } else + t1 = t3; + else + t1 = t3; + if ((t1 ? B.JSString_methods.indexOf$2(argument, ":", nextColon + 1) : nextColon) !== -1) + A.ExecutableOptions__fail('"' + argument + '" may only contain one ":".'); + return new A._Record_2(B.JSString_methods.substring$2(argument, 0, i), B.JSString_methods.substring$1(argument, t2)); + } + } + throw A.wrapException(A.ArgumentError$('Expected "' + argument + '" to contain a colon.', null)); + }, + _listSourceDirectory$2(source, destination) { + var t2, t3, t4, t5, + t1 = type$.String; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = J.get$iterator$ax(A.listDir(source, true)), t3 = source === destination; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (this._isEntrypoint$1(t4)) + t5 = !(t3 && A.ParsedPath_ParsedPath$parse(t4, $.$get$context().style)._splitExtension$1(1)[1] === ".css"); + else + t5 = false; + if (t5) { + t5 = $.$get$context(); + t1.$indexSet(0, t4, A.join(destination, t5.withoutExtension$1(t5.relative$2$from(t4, source)) + ".css", null)); + } + } + return t1; + }, + _isEntrypoint$1(path) { + var extension, + t1 = $.$get$context().style; + if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(path, t1).get$basename(), "_")) + return false; + extension = A.ParsedPath_ParsedPath$parse(path, t1)._splitExtension$1(1)[1]; + return extension === ".scss" || extension === ".sass" || extension === ".css"; + }, + get$_writeToStdout() { + var t1, _this = this; + _this._ensureSources$0(); + t1 = _this._sourcesToDestinations; + if (t1.get$length(t1) === 1) { + _this._ensureSources$0(); + t1 = _this._sourcesToDestinations; + t1 = t1.get$values(t1); + t1 = t1.get$single(t1) == null; + } else + t1 = false; + return t1; + }, + get$emitSourceMap() { + var _this = this, + _s10_ = "source-map", + _s15_ = "source-map-urls", + _s13_ = "embed-sources", + _s16_ = "embed-source-map", + t1 = _this._options; + if (!A._asBool(t1.$index(0, _s10_))) + if (t1.wasParsed$1(_s15_)) + A.ExecutableOptions__fail("--source-map-urls isn't allowed with --no-source-map."); + else if (t1.wasParsed$1(_s13_)) + A.ExecutableOptions__fail("--embed-sources isn't allowed with --no-source-map."); + else if (t1.wasParsed$1(_s16_)) + A.ExecutableOptions__fail("--embed-source-map isn't allowed with --no-source-map."); + if (!_this.get$_writeToStdout()) + return A._asBool(t1.$index(0, _s10_)); + if (J.$eq$(_this._ifParsed$1(_s15_), "relative")) + A.ExecutableOptions__fail("--source-map-urls=relative isn't allowed when printing to stdout."); + if (A._asBool(t1.$index(0, _s16_))) + return A._asBool(t1.$index(0, _s10_)); + else if (J.$eq$(_this._ifParsed$1(_s10_), true)) + A.ExecutableOptions__fail("When printing to stdout, --source-map requires --embed-source-map."); + else if (t1.wasParsed$1(_s15_)) + A.ExecutableOptions__fail("When printing to stdout, --source-map-urls requires --embed-source-map."); + else if (A._asBool(t1.$index(0, _s13_))) + A.ExecutableOptions__fail("When printing to stdout, --embed-sources requires --embed-source-map."); + else + return false; + }, + sourceMapUrl$2(_, url, destination) { + var t1, path, t2, _null = null; + if (url.get$scheme().length !== 0 && url.get$scheme() !== "file") + return url; + t1 = $.$get$context(); + path = t1.style.pathFromUri$1(A._parseUri(url)); + if (J.$eq$(this._options.$index(0, "source-map-urls"), "relative") && !this.get$_writeToStdout()) { + destination.toString; + t2 = t1.relative$2$from(path, t1.dirname$1(destination)); + } else + t2 = A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + return t1.toUri$1(t2); + }, + get$silenceDeprecations(_) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "silence-deprecation"))); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4 = A.Deprecation_fromId(t3); + t1.add$1(0, t4 == null ? A.ExecutableOptions__fail('Invalid deprecation "' + t3 + '".') : t4); + } + return t1; + }, + get$fatalDeprecations(_) { + var t1 = this._fatalDeprecations; + return t1 == null ? this._fatalDeprecations = new A.ExecutableOptions_fatalDeprecations_closure(this).call$0() : t1; + }, + get$futureDeprecations(_) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "future-deprecation"))); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4 = A.Deprecation_fromId(t3); + t1.add$1(0, t4 == null ? A.ExecutableOptions__fail('Invalid deprecation "' + t3 + '".') : t4); + } + return t1; + }, + _ifParsed$1($name) { + var t1 = this._options; + return t1.wasParsed$1($name) ? t1.$index(0, $name) : null; + } + }; + A.ExecutableOptions__parser_closure.prototype = { + call$0() { + var t1 = type$.String, + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Option), + t3 = [], + parser = new A.ArgParser(t2, A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), new A.UnmodifiableMapView(t2, type$.UnmodifiableMapView_String_Option), new A.UnmodifiableMapView(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ArgParser), type$.UnmodifiableMapView_String_ArgParser), t3, true, null); + parser.addOption$2$hide("precision", true); + parser.addFlag$2$hide("async", true); + t3.push(A.ExecutableOptions__separator("Input and Output")); + parser.addFlag$2$help("stdin", "Read the stylesheet from stdin."); + parser.addFlag$2$help("indented", "Use the indented syntax for input from stdin."); + parser.addMultiOption$5$abbr$help$splitCommas$valueHelp("load-path", "I", "A path to use when resolving imports.\nMay be passed multiple times.", false, "PATH"); + t2 = type$.JSArray_String; + parser.addMultiOption$6$abbr$allowed$allowedHelp$help$valueHelp("pkg-importer", "p", A._setArrayType(["node"], t2), A.LinkedHashMap_LinkedHashMap$_literal(["node", "Load files like Node.js package resolution."], t1, t1), "Built-in importer(s) to use for pkg: URLs.", "TYPE"); + parser.addOption$6$abbr$allowed$defaultsTo$help$valueHelp("style", "s", A._setArrayType(["expanded", "compressed"], t2), "expanded", "Output style.", "NAME"); + parser.addFlag$3$defaultsTo$help("charset", true, "Emit a @charset or BOM for CSS with non-ASCII characters."); + parser.addFlag$3$defaultsTo$help("error-css", null, "When an error occurs, emit a stylesheet describing it.\nDefaults to true when compiling to a file."); + parser.addFlag$3$help$negatable("update", "Only compile out-of-date stylesheets.", false); + t3.push(A.ExecutableOptions__separator("Source Maps")); + parser.addFlag$3$defaultsTo$help("source-map", true, "Whether to generate source maps."); + parser.addOption$4$allowed$defaultsTo$help("source-map-urls", A._setArrayType(["relative", "absolute"], t2), "relative", "How to link from source maps to source files."); + parser.addFlag$3$defaultsTo$help("embed-sources", false, "Embed source file contents in source maps."); + parser.addFlag$3$defaultsTo$help("embed-source-map", false, "Embed source map contents in CSS."); + t3.push(A.ExecutableOptions__separator("Warnings")); + parser.addFlag$3$abbr$help("quiet", "q", "Don't print warnings."); + parser.addFlag$2$help("quiet-deps", "Don't print compiler warnings from dependencies.\nStylesheets imported through load paths count as dependencies."); + parser.addFlag$2$help("verbose", "Print all deprecation warnings even when they're repetitive."); + parser.addMultiOption$2$help("fatal-deprecation", "Deprecations to treat as errors. You may also pass a Sass\nversion to include any behavior deprecated in or before it.\nSee https://sass-lang.com/documentation/breaking-changes for \na complete list."); + parser.addMultiOption$2$help("silence-deprecation", "Deprecations to ignore."); + parser.addMultiOption$2$help("future-deprecation", "Opt in to a deprecation early."); + t3.push(A.ExecutableOptions__separator("Other")); + parser.addFlag$4$abbr$help$negatable("watch", "w", "Watch stylesheets and recompile when they change.", false); + parser.addFlag$2$help("poll", "Manually check for changes rather than using a native watcher.\nOnly valid with --watch."); + parser.addFlag$2$help("stop-on-error", "Don't compile more files once an error is encountered."); + parser.addFlag$4$abbr$help$negatable("interactive", "i", "Run an interactive SassScript shell.", false); + parser.addFlag$3$abbr$help("color", "c", "Whether to use terminal colors for messages."); + parser.addFlag$2$help("unicode", "Whether to use Unicode characters for messages."); + parser.addFlag$2$help("trace", "Print full Dart stack traces for exceptions."); + parser.addFlag$4$abbr$help$negatable("help", "h", "Print this usage information.", false); + parser.addFlag$3$help$negatable("version", "Print the version of Dart Sass.", false); + return parser; + }, + $signature: 331 + }; + A.ExecutableOptions_interactive_closure.prototype = { + call$0() { + var _0_0, + t1 = this.$this._options; + if (!A._asBool(t1.$index(0, "interactive"))) + return false; + _0_0 = A.IterableExtension_firstWhereOrNull(A._setArrayType(["stdin", "indented", "style", "source-map", "source-map-urls", "embed-sources", "embed-source-map", "update", "watch"], type$.JSArray_String), t1.get$wasParsed()); + if (_0_0 != null) + throw A.wrapException(A.UsageException$("--" + _0_0 + " isn't allowed with --interactive.")); + return true; + }, + $signature: 23 + }; + A.ExecutableOptions_emitErrorCss_closure.prototype = { + call$1(destination) { + return destination != null; + }, + $signature: 226 + }; + A.ExecutableOptions_fatalDeprecations_closure.prototype = { + call$0() { + var id, argVersion, sassVersion, t1, t2, _0_0, exception, + deprecations = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t1 = J.get$iterator$ax(type$.List_String._as(this.$this._options.$index(0, "fatal-deprecation"))), t2 = type$.FormatException; t1.moveNext$0();) { + id = t1.get$current(t1); + _0_0 = A.Deprecation_fromId(id); + if (_0_0 != null) { + J.add$1$ax(deprecations, _0_0); + continue; + } + try { + argVersion = A.Version_Version$parse(id); + sassVersion = A.Version_Version$parse("1.79.3"); + if (J.compareTo$1$ns(argVersion, sassVersion) > 0) + A.ExecutableOptions__fail("Invalid version " + A.S(argVersion) + ". --fatal-deprecation requires a version less than or equal to the current Dart Sass version."); + J.addAll$1$ax(deprecations, A.Deprecation_forVersion(argVersion)); + } catch (exception) { + if (t2._is(A.unwrapException(exception))) + A.ExecutableOptions__fail('Invalid deprecation "' + A.S(id) + '".'); + else + throw exception; + } + } + return deprecations; + }, + $signature: 335 + }; + A.UsageException.prototype = {$isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.watch_closure.prototype = { + call$1(dir) { + for (; !A.dirExists(dir);) + dir = $.$get$context().dirname$1(dir); + return this.dirWatcher.watch$1(0, dir); + }, + $signature: 336 + }; + A._Watcher.prototype = { + _delete$1(path) { + var buffer, t1, exception; + try { + A.deleteFile(path); + buffer = new A.StringBuffer(""); + t1 = this._watch$_options; + if (t1.get$color()) + buffer._contents += "\x1b[33m"; + buffer._contents += "Deleted " + path + "."; + if (t1.get$color()) + buffer._contents += "\x1b[0m"; + A.print(buffer); + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + }, + watch$1(_, watcher) { + return this.watch$body$_Watcher(0, watcher); + }, + watch$body$_Watcher(_, watcher) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, $event, extension, success, success0, success1, t2, t1; + var $async$watch$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = watcher._group.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + t1 = new A._StreamIterator(A.checkNotNullable($async$self._debounceEvents$1(new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>"))), "stream", type$.Object)); + $async$handler = 3; + t2 = $async$self._watch$_options._options; + case 6: + // for condition + $async$goto = 8; + return A._asyncAwait(t1.moveNext$0(), $async$watch$1); + case 8: + // returning from await. + if (!$async$result) { + // goto after for + $async$goto = 7; + break; + } + $event = t1.get$current(0); + extension = A.ParsedPath_ParsedPath$parse($event.path, $.$get$context().style)._splitExtension$1(1)[1]; + if (!J.$eq$(extension, ".sass") && !J.$eq$(extension, ".scss") && !J.$eq$(extension, ".css")) { + // goto for condition + $async$goto = 6; + break; + } + case 9: + // switch + switch ($event.type) { + case B.ChangeType_modify: + // goto case + $async$goto = 11; + break; + case B.ChangeType_add: + // goto case + $async$goto = 12; + break; + case B.ChangeType_remove: + // goto case + $async$goto = 13; + break; + default: + // goto after switch + $async$goto = 10; + break; + } + break; + case 11: + // case + $async$goto = 14; + return A._asyncAwait($async$self._handleModify$1($event.path), $async$watch$1); + case 14: + // returning from await. + success = $async$result; + if (!success && A._asBool(t2.$index(0, "stop-on-error"))) { + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + } + // goto after switch + $async$goto = 10; + break; + case 12: + // case + $async$goto = 15; + return A._asyncAwait($async$self._handleAdd$1($event.path), $async$watch$1); + case 15: + // returning from await. + success0 = $async$result; + if (!success0 && A._asBool(t2.$index(0, "stop-on-error"))) { + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + } + // goto after switch + $async$goto = 10; + break; + case 13: + // case + $async$goto = 16; + return A._asyncAwait($async$self._handleRemove$1($event.path), $async$watch$1); + case 16: + // returning from await. + success1 = $async$result; + if (!success1 && A._asBool(t2.$index(0, "stop-on-error"))) { + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + } + // goto after switch + $async$goto = 10; + break; + case 10: + // after switch + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [2]; + case 4: + // finally + $async$handler = 2; + $async$goto = 17; + return A._asyncAwait(t1.cancel$0(), $async$watch$1); + case 17: + // returning from await. + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$watch$1, $async$completer); + }, + _handleModify$1(path) { + return this._handleModify$body$_Watcher(path); + }, + _handleModify$body$_Watcher(path) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, t2, t0, url, _0_0, t1; + var $async$_handleModify$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : null; + t1 = J.$eq$(t1 == null ? null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (t1) { + t1 = $.$get$context(); + t2 = A._realCasePath(A.absolute(t1.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, path); + t0 = t2; + t2 = t1; + t1 = t0; + } + url = t2.toUri$1(t1); + t1 = $async$self._graph; + _0_0 = t1._nodes.$index(0, url); + $async$goto = _0_0 != null ? 3 : 5; + break; + case 3: + // then + t1.reload$1(url); + $async$goto = 6; + return A._asyncAwait($async$self._recompileDownstream$1(A._setArrayType([_0_0], type$.JSArray_StylesheetNode)), $async$_handleModify$1); + case 6: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$returnValue = $async$self._handleAdd$1(path); + // goto return + $async$goto = 1; + break; + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_handleModify$1, $async$completer); + }, + _handleAdd$1(path) { + return this._handleAdd$body$_Watcher(path); + }, + _handleAdd$body$_Watcher(path) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, t1, success, t2, t3, t0, destination; + var $async$_handleAdd$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + destination = $async$self._destinationFor$1(path); + $async$goto = destination != null ? 3 : 5; + break; + case 3: + // then + t1 = type$.nullable_String; + $async$goto = 6; + return A._asyncAwait(A.compileStylesheets($async$self._watch$_options, $async$self._graph, A.LinkedHashMap_LinkedHashMap$_literal([path, destination], t1, t1), true), $async$_handleAdd$1); + case 6: + // returning from await. + success = $async$result; + // goto join + $async$goto = 4; + break; + case 5: + // else + success = true; + case 4: + // join + t1 = $.$get$FilesystemImporter_cwd(); + t2 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t2 == null ? null : J.get$platform$x(t2), "win32")) { + t2 = A.isNodeJs() ? self.process : null; + t2 = J.$eq$(t2 == null ? null : J.get$platform$x(t2), "darwin"); + } else + t2 = true; + if (t2) { + t2 = $.$get$context(); + t3 = A._realCasePath(A.absolute(t2.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); + t0 = t3; + t3 = t2; + t2 = t0; + } else { + t2 = $.$get$context(); + t3 = t2.canonicalize$1(0, path); + t0 = t3; + t3 = t2; + t2 = t0; + } + $async$goto = 7; + return A._asyncAwait($async$self._recompileDownstream$1($async$self._graph.addCanonical$3(t1, t3.toUri$1(t2), t3.toUri$1(path))), $async$_handleAdd$1); + case 7: + // returning from await. + $async$returnValue = $async$result && success; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_handleAdd$1, $async$completer); + }, + _handleRemove$1(path) { + return this._handleRemove$body$_Watcher(path); + }, + _handleRemove$body$_Watcher(path) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, t2, t0, url, _0_0, t3, node, toRecompile, t1; + var $async$_handleRemove$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : null; + t1 = J.$eq$(t1 == null ? null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (t1) { + t1 = $.$get$context(); + t2 = A._realCasePath(A.absolute(t1.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, path); + t0 = t2; + t2 = t1; + t1 = t0; + } + url = t2.toUri$1(t1); + t1 = $async$self._graph; + t2 = t1._nodes; + if (t2.containsKey$1(url)) { + _0_0 = $async$self._destinationFor$1(path); + if (_0_0 != null) + $async$self._delete$1(_0_0); + } + t3 = $.$get$FilesystemImporter_cwd(); + node = t2.remove$1(0, url); + t2 = node != null; + if (t2) { + t1._transitiveModificationTimes.clear$0(0); + t1.importCache.clearImport$1(url); + node._stylesheet_graph$_remove$0(); + } + toRecompile = t1._recanonicalizeImports$2(t3, url); + if (t2) + toRecompile.addAll$1(0, node._downstream); + $async$goto = 3; + return A._asyncAwait($async$self._recompileDownstream$1(toRecompile), $async$_handleRemove$1); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_handleRemove$1, $async$completer); + }, + _debounceEvents$1(events) { + var t1 = type$.WatchEvent; + t1 = A.RateLimit__debounceAggregate(events, A.Duration$(0, 25), A.instantiate1(A.rate_limit___collect$closure(), t1), false, true, t1, type$.List_WatchEvent); + return new A._ExpandStream(new A._Watcher__debounceEvents_closure(), t1, A._instanceType(t1)._eval$1("_ExpandStream")); + }, + _recompileDownstream$1(nodes) { + return this._recompileDownstream$body$_Watcher(nodes); + }, + _recompileDownstream$body$_Watcher(nodes) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, allSucceeded, t6, t7, t8, sourcesToDestinations, success, _i, seen; + var $async$_recompileDownstream$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + seen = A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode); + t1 = type$.UnmodifiableSetView_StylesheetNode, t2 = type$.JSArray_StylesheetNode, t3 = $async$self._watch$_options, t4 = $async$self._graph, t5 = t3._options, allSucceeded = true; + case 3: + // for condition + if (!(t6 = J.getInterceptor$asx(nodes), t6.get$isNotEmpty(nodes))) { + // goto after for + $async$goto = 5; + break; + } + t7 = A._setArrayType([], t2); + for (t6 = t6.get$iterator(nodes); t6.moveNext$0();) { + t8 = t6.get$current(t6); + if (seen.add$1(0, t8)) + t7.push(t8); + } + sourcesToDestinations = $async$self._sourceEntrypointsToDestinations$1(t7); + $async$goto = sourcesToDestinations.__js_helper$_length !== 0 ? 6 : 7; + break; + case 6: + // then + $async$goto = 8; + return A._asyncAwait(A.compileStylesheets(t3, t4, sourcesToDestinations, true), $async$_recompileDownstream$1); + case 8: + // returning from await. + success = $async$result; + if (!success && A._asBool(t5.$index(0, "stop-on-error"))) { + $async$returnValue = false; + // goto return + $async$goto = 1; + break; + } + allSucceeded = allSucceeded && success; + case 7: + // join + t6 = A._setArrayType([], t2); + for (t8 = t7.length, _i = 0; _i < t7.length; t7.length === t8 || (0, A.throwConcurrentModificationError)(t7), ++_i) + B.JSArray_methods.addAll$1(t6, new A.UnmodifiableSetView0(t7[_i]._downstream, t1)); + case 4: + // for update + nodes = t6; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = allSucceeded; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_recompileDownstream$1, $async$completer); + }, + _sourceEntrypointsToDestinations$1(nodes) { + var _i, url, source, _0_0, + t1 = type$.String, + entrypoints = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t1 = nodes.length, _i = 0; _i < nodes.length; nodes.length === t1 || (0, A.throwConcurrentModificationError)(nodes), ++_i) { + url = nodes[_i].canonicalUrl; + if (url.get$scheme() !== "file") + continue; + source = $.$get$context().style.pathFromUri$1(A._parseUri(url)); + _0_0 = this._destinationFor$1(source); + if (_0_0 != null) + entrypoints.$indexSet(0, source, _0_0); + } + return entrypoints; + }, + _destinationFor$1(source) { + var t2, _0_0, t3, sourceDir, destinationDir, destination, + t1 = this._watch$_options; + t1._ensureSources$0(); + t2 = type$.String; + _0_0 = t1._sourcesToDestinations.cast$2$0(0, t2, t2).$index(0, source); + if (_0_0 != null) + return _0_0; + t3 = $.$get$context(); + if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(source, t3.style).get$basename(), "_")) + return null; + t1._ensureSources$0(); + t1 = t1.__ExecutableOptions__sourceDirectoriesToDestinations_F; + t1 === $ && A.throwUnnamedLateFieldNI(); + t2 = A.MapExtensions_get_pairs(t1.cast$2$0(0, t2, t2), t2, t2); + t2 = t2.get$iterator(t2); + for (; t2.moveNext$0();) { + t1 = t2.get$current(t2); + sourceDir = t1._0; + destinationDir = t1._1; + if (t3._isWithinOrEquals$2(sourceDir, source) !== B._PathRelation_within) + continue; + destination = A.join(destinationDir, t3.withoutExtension$1(t3.relative$2$from(source, sourceDir)) + ".css", null); + if (t3._isWithinOrEquals$2(destination, source) !== B._PathRelation_equal) + return destination; + } + return null; + } + }; + A._Watcher__debounceEvents_closure.prototype = { + call$1(buffer) { + var t3, t4, t5, oldType, newType, _1_1, + t1 = type$.ChangeType, + t2 = A.PathMap__create(null, t1); + for (t3 = J.get$iterator$ax(buffer); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.path; + oldType = t2.$index(0, t5); + newType = t4.type; + $label0$0: { + if (oldType == null) { + t4 = newType; + break $label0$0; + } + if (B.ChangeType_remove === newType) { + t4 = B.ChangeType_remove; + break $label0$0; + } + if (B.ChangeType_add === oldType) { + t4 = B.ChangeType_add; + break $label0$0; + } + t4 = B.ChangeType_modify; + break $label0$0; + } + t2.$indexSet(0, t5, t4); + } + t3 = A._setArrayType([], type$.JSArray_WatchEvent); + for (t1 = A.MapExtensions_get_pairs(new A.PathMap(t2, type$.PathMap_ChangeType), type$.nullable_String, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + _1_1 = t2._0; + _1_1.toString; + t3.push(new A.WatchEvent(t2._1, _1_1)); + } + return t3; + }, + $signature: 338 + }; + A.EmptyExtensionStore.prototype = { + get$_extensions() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__extensions, "get$_empty_extension_store$_extensions", 1, [], [], 0))); + }, + get$_sourceSpecificity() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__sourceSpecificity, "get$_empty_extension_store$_sourceSpecificity", 1, [], [], 0))); + }, + get$isEmpty(_) { + return true; + }, + get$simpleSelectors() { + return B.C_EmptyUnmodifiableSet; + }, + extensionsWhereTarget$1(callback) { + return B.List_empty5; + }, + addExtensions$1(extenders) { + throw A.wrapException(A.UnsupportedError$(string$.addExt)); + }, + clone$0() { + return B.Record2_EmptyExtensionStore_Map_empty; + }, + $isExtensionStore: 1 + }; + A.Extension.prototype = { + toString$0(_) { + var t1 = this.extender.toString$0(0), + t2 = this.target.toString$0(0), + t3 = this.isOptional ? " !optional" : ""; + return t1 + " {@extend " + t2 + t3 + "}"; + } + }; + A.Extender.prototype = { + assertCompatibleMediaContext$1(mediaContext) { + var expectedMediaContext, + extension = this._extension; + if (extension == null) + return; + expectedMediaContext = extension.mediaContext; + if (expectedMediaContext == null) + return; + if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) + return; + throw A.wrapException(A.SassException$(string$.You_ma, extension.span, null)); + }, + toString$0(_) { + return A.serializeSelector(this.selector, true); + } + }; + A.ExtensionStore.prototype = { + get$isEmpty(_) { + return this._extensions.__js_helper$_length === 0; + }, + get$simpleSelectors() { + return new A.MapKeySet(this._selectors, type$.MapKeySet_SimpleSelector); + }, + extensionsWhereTarget$1(callback) { + return new A._SyncStarIterable(this.extensionsWhereTarget$body$ExtensionStore(callback), type$._SyncStarIterable_Extension); + }, + extensionsWhereTarget$body$ExtensionStore($async$callback) { + var $async$self = this; + return function() { + var callback = $async$callback; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, simple, sources, t3; + return function $async$extensionsWhereTarget$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A.MapExtensions_get_pairs($async$self._extensions, type$.SimpleSelector, type$.Map_ComplexSelector_Extension), t1 = t1.get$iterator(t1); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t2 = t1.get$current(t1); + simple = t2._0; + sources = t2._1; + if (!callback.call$1(simple)) { + // goto for condition + $async$goto = 2; + break; + } + t2 = sources.get$values(sources), t2 = t2.get$iterator(t2); + case 4: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 5; + break; + } + t3 = t2.get$current(t2); + $async$goto = t3 instanceof A.MergedExtension ? 6 : 8; + break; + case 6: + // then + t3 = t3.unmerge$0(); + $async$goto = 9; + return $async$iterator._yieldStar$1(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure(), t3.$ti._eval$1("WhereIterable"))); + case 9: + // after yield + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = !t3.isOptional ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return $async$iterator._async$_current = t3, 1; + case 12: + // after yield + case 11: + // join + case 7: + // join + // goto for condition + $async$goto = 4; + break; + case 5: + // after for + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + addSelector$2(selector, mediaContext) { + var originalSelector, error, stackTrace, t1, exception, t2, t3, t4, modifiableSelector, _this = this; + selector = selector; + originalSelector = selector; + if (!originalSelector.accept$1(B._IsInvisibleVisitor_true)) + _this._originals.addAll$1(0, originalSelector.components); + t1 = _this._extensions; + if (t1.__js_helper$_length !== 0) + try { + selector = _this._extendList$3(originalSelector, t1, mediaContext); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, ""); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + A.throwWithTrace(new A.SassException(B.Set_empty, "From " + t1 + "\n" + t2, t3), error, stackTrace); + } else + throw exception; + } + modifiableSelector = new A.ModifiableBox(selector, type$.ModifiableBox_SelectorList); + if (mediaContext != null) + _this._mediaContexts.$indexSet(0, modifiableSelector, mediaContext); + _this._registerSelector$2(selector, modifiableSelector); + return new A.Box(modifiableSelector, type$.Box_SelectorList); + }, + _registerSelector$2(list, selector) { + var t1, t2, t3, t4, _i, t5, t6, _i0, t7, t8, _i1, simple, _0_2_isSet, _0_2, t9, selectorInPseudo; + for (t1 = list.components, t2 = t1.length, t3 = this._selectors, t4 = type$.SelectorList, _i = 0; _i < t2; ++_i) + for (t5 = t1[_i].components, t6 = t5.length, _i0 = 0; _i0 < t6; ++_i0) + for (t7 = t5[_i0].selector.components, t8 = t7.length, _i1 = 0; _i1 < t8; ++_i1) { + simple = t7[_i1]; + J.add$1$ax(t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure()), selector); + _0_2_isSet = simple instanceof A.PseudoSelector; + if (_0_2_isSet) { + _0_2 = simple.selector; + t9 = _0_2 != null; + } else { + _0_2 = null; + t9 = false; + } + if (t9) { + selectorInPseudo = _0_2_isSet ? _0_2 : simple.selector; + this._registerSelector$2(selectorInPseudo == null ? t4._as(selectorInPseudo) : selectorInPseudo, selector); + } + } + }, + addExtension$4(extender, target, extend, mediaContext) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, newExtensions, _i, complex, t11, extension, _0_0, t12, newExtensionsByTarget, additionalExtensions, _this = this, + selectors = _this._selectors.$index(0, target), + t1 = _this._extensionsByExtender, + existingExtensions = t1.$index(0, target), + sources = _this._extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure()); + for (t2 = extender.components, t3 = t2.length, t4 = selectors == null, t5 = _this._sourceSpecificity, t6 = extend.span, t7 = extend.isOptional, t8 = existingExtensions != null, t9 = type$.ComplexSelector, t10 = type$.Extension, newExtensions = null, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (complex.accept$1(B.C__IsUselessVisitor)) + continue; + complex.get$specificity(); + t11 = new A.Extender(complex, false); + extension = t11._extension = new A.Extension(t11, target, mediaContext, t7, t6); + _0_0 = sources.$index(0, complex); + if (_0_0 != null) { + sources.$indexSet(0, complex, A.MergedExtension_merge(_0_0, extension)); + continue; + } + sources.$indexSet(0, complex, extension); + for (t11 = new A._SyncStarIterator(_this._simpleSelectors$1(complex)._outerHelper()); t11.moveNext$0();) { + t12 = t11._async$_current; + J.add$1$ax(t1.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure0()), extension); + t5.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure1(complex)); + } + if (!t4 || t8) { + if (newExtensions == null) + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t9, t10); + newExtensions.$indexSet(0, complex, extension); + } + } + if (newExtensions == null) + return; + t1 = type$.SimpleSelector; + newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension); + if (t8) { + additionalExtensions = _this._extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); + if (additionalExtensions != null) + A.mapAddAll2(newExtensionsByTarget, additionalExtensions, t1, t9, t10); + } + if (!t4) + _this._extendExistingSelectors$2(selectors, newExtensionsByTarget); + }, + _simpleSelectors$1(complex) { + return new A._SyncStarIterable(this._simpleSelectors$body$ExtensionStore(complex), type$._SyncStarIterable_SimpleSelector); + }, + _simpleSelectors$body$ExtensionStore($async$complex) { + var $async$self = this; + return function() { + var complex = $async$complex; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3, _i, t4, t5, _i0, simple, _0_2_isSet, _0_2, t6, selector, t7, _i1; + return function $async$_simpleSelectors$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = complex.components, t2 = t1.length, t3 = type$.SelectorList, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + t4 = t1[_i].selector.components, t5 = t4.length, _i0 = 0; + case 5: + // for condition + if (!(_i0 < t5)) { + // goto after for + $async$goto = 7; + break; + } + simple = t4[_i0]; + $async$goto = 8; + return $async$iterator._async$_current = simple, 1; + case 8: + // after yield + _0_2_isSet = simple instanceof A.PseudoSelector; + if (_0_2_isSet) { + _0_2 = simple.selector; + t6 = _0_2 != null; + } else { + _0_2 = null; + t6 = false; + } + $async$goto = t6 ? 9 : 10; + break; + case 9: + // then + selector = _0_2_isSet ? _0_2 : simple.selector; + t6 = (selector == null ? t3._as(selector) : selector).components, t7 = t6.length, _i1 = 0; + case 11: + // for condition + if (!(_i1 < t7)) { + // goto after for + $async$goto = 13; + break; + } + $async$goto = 14; + return $async$iterator._yieldStar$1($async$self._simpleSelectors$1(t6[_i1])); + case 14: + // after yield + case 12: + // for update + ++_i1; + // goto for condition + $async$goto = 11; + break; + case 13: + // after for + case 10: + // join + case 6: + // for update + ++_i0; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + _extendExistingExtensions$2(extensions, newExtensions) { + var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, selectors0, t10, t11, t12, t13, t14, withExtender, _0_0, _i0, _i1; + for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extensionsByExtender, t4 = type$.SimpleSelector, t5 = type$.Map_ComplexSelector_Extension, t6 = this._extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + extension = t1[_i]; + t7 = t6.$index(0, extension.target); + t7.toString; + selectors = null; + try { + selectors = this._extendComplex$3(extension.extender.selector, newExtensions, extension.mediaContext); + if (selectors == null) + continue; + } catch (exception) { + t8 = A.unwrapException(exception); + if (t8 instanceof A.SassException) { + error = t8; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withAdditionalSpan$2(extension.extender.selector.span, "target selector"), error, stackTrace); + } else + throw exception; + } + t8 = J.get$first$ax(selectors); + t9 = extension.extender.selector; + if (B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components)) { + t8 = selectors; + t9 = A._arrayInstanceType(t8); + selectors0 = new A.SubListIterable(t8, 1, null, t9._eval$1("SubListIterable<1>")); + selectors0.SubListIterable$3(t8, 1, null, t9._precomputed1); + selectors = selectors0; + } + for (t8 = J.get$iterator$ax(selectors); t8.moveNext$0();) { + t9 = t8.get$current(t8); + t10 = extension; + t11 = t10.target; + t12 = t10.span; + t13 = t10.mediaContext; + t10 = t10.isOptional; + t9.get$specificity(); + t14 = new A.Extender(t9, false); + withExtender = t14._extension = new A.Extension(t14, t11, t13, t10, t12); + _0_0 = t7.$index(0, t9); + if (_0_0 != null) + t7.$indexSet(0, t9, A.MergedExtension_merge(_0_0, withExtender)); + else { + t7.$indexSet(0, t9, withExtender); + for (t10 = t9.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) + for (t12 = t10[_i0].selector.components, t13 = t12.length, _i1 = 0; _i1 < t13; ++_i1) + J.add$1$ax(t3.putIfAbsent$2(t12[_i1], new A.ExtensionStore__extendExistingExtensions_closure()), withExtender); + if (newExtensions.containsKey$1(extension.target)) { + if (additionalExtensions == null) + additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); + additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure0()).$indexSet(0, t9, withExtender); + } + } + } + } + return additionalExtensions; + }, + _extendExistingSelectors$2(selectors, newExtensions) { + var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4, t5, t6; + for (t1 = selectors.get$iterator(selectors), t2 = this._mediaContexts; t1.moveNext$0();) { + selector = t1.get$current(t1); + oldValue = selector.value; + try { + selector.value = this._extendList$3(selector.value, newExtensions, t2.$index(0, selector)); + } catch (exception) { + t3 = A.unwrapException(exception); + if (t3 instanceof A.SassException) { + error = t3; + stackTrace = A.getTraceFromException(exception); + t3 = selector.value.span.message$1(0, ""); + t4 = error._span_exception$_message; + t5 = error; + t6 = J.getInterceptor$z(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + A.throwWithTrace(new A.SassException(B.Set_empty, "From " + t3 + "\n" + t4, t5), error, stackTrace); + } else + throw exception; + } + if (oldValue === selector.value) + continue; + this._registerSelector$2(selector.value, selector); + } + }, + addExtensions$1(extensionStores) { + var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, selectorsToExtend, extensionsToExtend, t12, t13, target, newSources, first, extensionsForTarget, t14, selectorsForTarget, t15, _2_0, t16, extender, extension, _this = this, _null = null; + for (t1 = J.get$iterator$ax(extensionStores), t2 = type$.SimpleSelector, t3 = type$.Map_ComplexSelector_Extension, t4 = _this._extensions, t5 = type$.ComplexSelector, t6 = type$.Extension, t7 = _this._selectors, t8 = _this._extensionsByExtender, t9 = type$.JSArray_Extension, t10 = type$.ModifiableBox_SelectorList, t11 = _this._sourceSpecificity, newExtensions = _null, selectorsToExtend = newExtensions, extensionsToExtend = selectorsToExtend; t1.moveNext$0();) { + t12 = t1.get$current(t1); + if (t12.get$isEmpty(t12)) + continue; + t11.addAll$1(0, t12.get$_sourceSpecificity()); + for (t12 = A.MapExtensions_get_pairs(t12.get$_extensions(), t2, t3), t12 = t12.get$iterator(t12); t12.moveNext$0();) { + t13 = t12.get$current(t12); + target = t13._0; + newSources = t13._1; + if (target instanceof A.PlaceholderSelector) { + first = target.name.charCodeAt(0); + t13 = first === 45 || first === 95; + } else + t13 = false; + if (t13) + continue; + extensionsForTarget = t8.$index(0, target); + t13 = extensionsForTarget == null; + if (!t13) { + if (extensionsToExtend == null) { + extensionsToExtend = A._setArrayType([], t9); + t14 = extensionsToExtend; + } else + t14 = extensionsToExtend; + B.JSArray_methods.addAll$1(t14, extensionsForTarget); + } + selectorsForTarget = t7.$index(0, target); + t14 = selectorsForTarget != null; + if (t14) { + if (selectorsToExtend == null) { + selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(t10); + t15 = selectorsToExtend; + } else + t15 = selectorsToExtend; + t15.addAll$1(0, selectorsForTarget); + } + _2_0 = t4.$index(0, target); + if (_2_0 != null) + for (t15 = A.MapExtensions_get_pairs(newSources, t5, t6), t15 = t15.get$iterator(t15); t15.moveNext$0();) { + t16 = t15.get$current(t15); + extender = t16._0; + extension = t16._1; + if (_2_0.containsKey$1(extender)) { + t16 = _2_0.$index(0, extender); + extension = A.MergedExtension_merge(t16 == null ? t6._as(t16) : t16, extension); + _2_0.$indexSet(0, extender, extension); + } else + _2_0.$indexSet(0, extender, extension); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t16 = newExtensions; + } else + t16 = newExtensions; + J.$indexSet$ax(t16.putIfAbsent$2(target, new A.ExtensionStore_addExtensions_closure()), extender, extension); + } + } + else { + t15 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t15.addAll$1(0, newSources); + t4.$indexSet(0, target, t15); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t13 = newExtensions; + } else + t13 = newExtensions; + t14 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t14.addAll$1(0, newSources); + t13.$indexSet(0, target, t14); + } + } + } + } + if (newExtensions != null) { + if (extensionsToExtend != null) + _this._extendExistingExtensions$2(extensionsToExtend, newExtensions); + if (selectorsToExtend != null) + _this._extendExistingSelectors$2(selectorsToExtend, newExtensions); + } + }, + _extendList$3(list, extensions, mediaQueryContext) { + var t1, t2, t3, extended, i, complex, result, t4; + for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector, extended = null, i = 0; i < t2; ++i) { + complex = t1[i]; + result = this._extendComplex$3(complex, extensions, mediaQueryContext); + if (result == null) { + if (extended != null) + extended.push(complex); + } else { + if (extended == null) + if (i === 0) + extended = A._setArrayType([], t3); + else { + t4 = B.JSArray_methods.sublist$2(t1, 0, i); + extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + } + B.JSArray_methods.addAll$1(extended, result); + } + } + if (extended == null) + return list; + t1 = this._originals; + return A.SelectorList$(this._trim$2(extended, t1.get$contains(t1)), list.span); + }, + _extendList$2(list, extensions) { + return this._extendList$3(list, extensions, null); + }, + _extendComplex$3(complex, extensions, mediaQueryContext) { + var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, extendedNotExpanded, i, component, extended, t11, t12, t13, t14, _box_0 = {}, + t1 = complex.leadingCombinators, + t2 = t1.length; + if (t2 > 1) + return null; + isOriginal = this._originals.contains$1(0, complex); + for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector, t6 = complex.lineBreak, t7 = !t6, t8 = complex.span, t9 = type$.JSArray_ComplexSelector, t2 = t2 === 0, t10 = type$.JSArray_ComplexSelectorComponent, extendedNotExpanded = null, i = 0; i < t4; ++i) { + component = t3[i]; + extended = this._extendCompound$4$inOriginal(component, extensions, mediaQueryContext, isOriginal); + if (extended == null) { + if (extendedNotExpanded != null) + extendedNotExpanded.push(A._setArrayType([A.ComplexSelector$(B.List_empty0, A._setArrayType([component], t10), t8, t6)], t9)); + } else if (extendedNotExpanded != null) + extendedNotExpanded.push(extended); + else if (i !== 0) { + t11 = A._arrayInstanceType(t3); + t12 = new A.SubListIterable(t3, 0, i, t11._eval$1("SubListIterable<1>")); + t12.SubListIterable$3(t3, 0, i, t11._precomputed1); + extendedNotExpanded = A._setArrayType([A._setArrayType([A.ComplexSelector$(t1, t12, t8, t6)], t9), extended], t5); + } else if (t2) + extendedNotExpanded = A._setArrayType([extended], t5); + else { + t11 = A._setArrayType([], t9); + for (t12 = J.get$iterator$ax(extended); t12.moveNext$0();) { + t13 = t12.get$current(t12); + t14 = t13.leadingCombinators; + if (t14.length === 0 || B.C_ListEquality.equals$2(0, t1, t14)) { + t14 = t13.components; + t11.push(A.ComplexSelector$(t1, t14, t8, !t7 || t13.lineBreak)); + } + } + extendedNotExpanded = A._setArrayType([t11], t5); + } + } + if (extendedNotExpanded == null) + return null; + _box_0.first = true; + t1 = type$.ComplexSelector; + t1 = J.expand$1$1$ax(A.paths(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure(_box_0, this, complex), t1); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + _extendCompound$4$inOriginal(component, extensions, mediaQueryContext, inOriginal) { + var t3, t4, t5, t6, t7, t8, t9, t10, t11, options, i, simple, extended, t12, result, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, + t1 = _this._mode, + targetsUsed = t1 === B.ExtendMode_normal_normal || extensions.__js_helper$_length < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector), + t2 = component.selector, + simples = t2.components; + for (t3 = simples.length, t4 = type$.JSArray_List_Extender, t5 = type$.JSArray_Extender, t6 = type$.CssValue_Combinator, t7 = type$.JSArray_ComplexSelectorComponent, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = component.span, t11 = type$.SimpleSelector, options = _null, i = 0; i < t3; ++i) { + simple = simples[i]; + extended = _this._extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed); + if (extended == null) { + if (options != null) + options.push(A._setArrayType([_this._extenderForSimple$1(simple)], t5)); + } else { + if (options == null) { + options = A._setArrayType([], t4); + if (i !== 0) { + t12 = new A.SubListIterable(simples, 0, i, t8); + t12.SubListIterable$3(simples, 0, i, t9); + result = A.List_List$from(t12, false, t11); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + compound = new A.CompoundSelector(t12, t10); + if (t12.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", _null)); + result = A.List_List$from(B.List_empty0, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(compound, result, t10)], t7), t10, false); + _this._sourceSpecificityFor$1(compound); + options.push(A._setArrayType([new A.Extender(t12, true)], t5)); + } + } + B.JSArray_methods.addAll$1(options, extended); + } + } + if (options == null) + return _null; + if (targetsUsed != null && targetsUsed._collection$_length !== extensions.__js_helper$_length) + return _null; + if (options.length === 1) { + for (t1 = J.get$iterator$ax(options[0]), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector, result = _null; t1.moveNext$0();) { + t4 = t1.get$current(t1); + t4.assertCompatibleMediaContext$1(mediaQueryContext); + complex = t4.selector.withAdditionalCombinators$1(t2); + if (complex.accept$1(B.C__IsUselessVisitor)) + continue; + if (result == null) + result = A._setArrayType([], t3); + result.push(complex); + } + return result; + } + extenderPaths = A.paths(options, type$.Extender); + t3 = A._setArrayType([], type$.JSArray_ComplexSelector); + t1 = t1 === B.ExtendMode_replace_replace; + t4 = !t1; + if (t4) + t3.push(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure(), t11), t2.span), A.List_List$unmodifiable(component.combinators, t6), t10)], t7), t10, false)); + t2 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); + t5 = t2.$ti; + t2 = new A.ListIterator(t2, t2.get$length(0), t5._eval$1("ListIterator")); + t6 = component.combinators; + t5 = t5._eval$1("ListIterable.E"); + for (; t2.moveNext$0();) { + t1 = t2.__internal$_current; + extended = _this._unifyExtenders$3(t1 == null ? t5._as(t1) : t1, mediaQueryContext, t10); + if (extended == null) + continue; + for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { + withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t6); + if (!withCombinators.accept$1(B.C__IsUselessVisitor)) + t3.push(withCombinators); + } + } + isOriginal = new A.ExtensionStore__extendCompound_closure0(); + return _this._trim$2(t3, inOriginal && t4 ? new A.ExtensionStore__extendCompound_closure1(B.JSArray_methods.get$first(t3)) : isOriginal); + }, + _unifyExtenders$3(extenders, mediaQueryContext, span) { + var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, + toUnify = A.QueueList$(_null, type$.ComplexSelector); + for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (t4.isOriginal) { + if (originals == null) + originals = A._setArrayType([], t3); + t4 = t4.selector; + B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); + originalsLineBreak = originalsLineBreak || t4.lineBreak; + } else { + t4 = t4.selector; + if (t4.accept$1(B.C__IsUselessVisitor)) + return _null; + else + toUnify._queue_list$_add$1(t4); + } + } + if (originals != null) + toUnify.addFirst$1(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(originals, span), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent), span, originalsLineBreak)); + complexes = A.unifyComplex(toUnify, span); + if (complexes == null) + return _null; + for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) + t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); + return complexes; + }, + _extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed) { + var t2, _1_0, + t1 = new A.ExtensionStore__extendSimple_withoutPseudo(this, extensions, targetsUsed); + if (simple instanceof A.PseudoSelector) + t2 = simple.selector != null; + else + t2 = false; + if (t2) { + _1_0 = this._extendPseudo$3(simple, extensions, mediaQueryContext); + if (_1_0 != null) + return new A.MappedListIterable(_1_0, new A.ExtensionStore__extendSimple_closure(this, t1), A._arrayInstanceType(_1_0)._eval$1("MappedListIterable<1,List>")); + } + return A.NullableExtension_andThen(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure0()); + }, + _extenderForSimple$1(simple) { + var t1 = simple.span; + t1 = A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([simple], type$.JSArray_SimpleSelector), t1), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t1)], type$.JSArray_ComplexSelectorComponent), t1, false); + this._sourceSpecificity.$index(0, simple); + return new A.Extender(t1, true); + }, + _extendPseudo$3(pseudo, extensions, mediaQueryContext) { + var extended, complexes, t1, result, + selector = pseudo.selector; + if (selector == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); + extended = this._extendList$3(selector, extensions, mediaQueryContext); + if (extended === selector) + return null; + complexes = extended.components; + t1 = pseudo.normalizedName === "not"; + if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure0())) + complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure1(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); + complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure2(pseudo), type$.ComplexSelector); + if (t1 && selector.components.length === 1) { + t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure3(pseudo, selector), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector); + result = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + return result.length === 0 ? null : result; + } else + return A._setArrayType([pseudo.withSelector$1(A.SelectorList$(complexes, selector.span))], type$.JSArray_PseudoSelector); + }, + _trim$2(selectors, isOriginal) { + var i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity, + result = A.QueueList$(null, type$.ComplexSelector); + $label0$0: + for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { + _box_0 = {}; + complex1 = selectors[i]; + if (isOriginal.call$1(complex1)) { + for (j = 0; j < numOriginals; ++j) + if (J.$eq$(result.$index(0, j), complex1)) { + A.rotateSlice(result, 0, j + 1); + continue $label0$0; + } + ++numOriginals; + result.addFirst$1(complex1); + continue $label0$0; + } + _box_0.maxSpecificity = 0; + for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { + maxSpecificity = Math.max(t5, this._sourceSpecificityFor$1(t3[_i].selector)); + _box_0.maxSpecificity = maxSpecificity; + } + if (result.any$1(result, new A.ExtensionStore__trim_closure(_box_0, complex1))) + continue $label0$0; + t3 = new A.SubListIterable(selectors, 0, i, t1); + t3.SubListIterable$3(selectors, 0, i, t2); + if (t3.any$1(0, new A.ExtensionStore__trim_closure0(_box_0, complex1))) + continue $label0$0; + result.addFirst$1(complex1); + } + return result; + }, + _sourceSpecificityFor$1(compound) { + var t1, t2, t3, specificity, _i, t4; + for (t1 = compound.components, t2 = t1.length, t3 = this._sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { + t4 = t3.$index(0, t1[_i]); + specificity = Math.max(specificity, A.checkNum(t4 == null ? 0 : t4)); + } + return specificity; + }, + clone$0() { + var t2, t3, t4, _this = this, + t1 = type$.SimpleSelector, + newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), + newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), + oldToNewSelectors = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList); + _this._selectors.forEach$1(0, new A.ExtensionStore_clone_closure(_this, newSelectors, oldToNewSelectors, newMediaContexts)); + t2 = type$.Extension; + t3 = A.copyMapOfMap(_this._extensions, t1, type$.ComplexSelector, t2); + t2 = A.copyMapOfList(_this._extensionsByExtender, t1, t2); + t1 = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int); + t1.addAll$1(0, _this._sourceSpecificity); + t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector); + t4.addAll$1(0, _this._originals); + return new A._Record_2(new A.ExtensionStore(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_normal), oldToNewSelectors); + }, + get$_extensions() { + return this._extensions; + }, + get$_sourceSpecificity() { + return this._sourceSpecificity; + } + }; + A.ExtensionStore_extensionsWhereTarget_closure.prototype = { + call$1(extension) { + return !extension.isOptional; + }, + $signature: 342 + }; + A.ExtensionStore__registerSelector_closure.prototype = { + call$0() { + return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList); + }, + $signature: 348 + }; + A.ExtensionStore_addExtension_closure.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 112 + }; + A.ExtensionStore_addExtension_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension); + }, + $signature: 214 + }; + A.ExtensionStore_addExtension_closure1.prototype = { + call$0() { + return this.complex.get$specificity(); + }, + $signature: 10 + }; + A.ExtensionStore__extendExistingExtensions_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension); + }, + $signature: 214 + }; + A.ExtensionStore__extendExistingExtensions_closure0.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 112 + }; + A.ExtensionStore_addExtensions_closure.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 112 + }; + A.ExtensionStore__extendComplex_closure.prototype = { + call$1(path) { + var t1 = this.complex; + return J.map$1$1$ax(A.weave(path, t1.span, t1.lineBreak), new A.ExtensionStore__extendComplex__closure(this._box_0, this.$this, t1), type$.ComplexSelector); + }, + $signature: 351 + }; + A.ExtensionStore__extendComplex__closure.prototype = { + call$1(outputComplex) { + var _this = this, + t1 = _this._box_0; + if (t1.first && _this.$this._originals.contains$1(0, _this.complex)) + _this.$this._originals.add$1(0, outputComplex); + t1.first = false; + return outputComplex; + }, + $signature: 60 + }; + A.ExtensionStore__extendCompound_closure.prototype = { + call$1(extender) { + return B.JSArray_methods.get$last(extender.selector.components).selector.components; + }, + $signature: 352 + }; + A.ExtensionStore__extendCompound_closure0.prototype = { + call$1(_) { + return false; + }, + $signature: 19 + }; + A.ExtensionStore__extendCompound_closure1.prototype = { + call$1(complex) { + return complex.$eq(0, this.original); + }, + $signature: 19 + }; + A.ExtensionStore__extendSimple_withoutPseudo.prototype = { + call$1(simple) { + var t1, t2, + extensionsForSimple = this.extensions.$index(0, simple); + if (extensionsForSimple == null) + return null; + t1 = this.targetsUsed; + if (t1 != null) + t1.add$1(0, simple); + t1 = A._setArrayType([], type$.JSArray_Extender); + t2 = this.$this; + if (t2._mode !== B.ExtendMode_replace_replace) + t1.push(t2._extenderForSimple$1(simple)); + for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(t2).extender); + return t1; + }, + $signature: 354 + }; + A.ExtensionStore__extendSimple_closure.prototype = { + call$1(pseudo) { + var t1 = this.withoutPseudo.call$1(pseudo); + return t1 == null ? A._setArrayType([this.$this._extenderForSimple$1(pseudo)], type$.JSArray_Extender) : t1; + }, + $signature: 356 + }; + A.ExtensionStore__extendSimple_closure0.prototype = { + call$1(result) { + return A._setArrayType([result], type$.JSArray_List_Extender); + }, + $signature: 666 + }; + A.ExtensionStore__extendPseudo_closure.prototype = { + call$1(complex) { + return complex.components.length > 1; + }, + $signature: 19 + }; + A.ExtensionStore__extendPseudo_closure0.prototype = { + call$1(complex) { + return complex.components.length === 1; + }, + $signature: 19 + }; + A.ExtensionStore__extendPseudo_closure1.prototype = { + call$1(complex) { + return complex.components.length <= 1; + }, + $signature: 19 + }; + A.ExtensionStore__extendPseudo_closure2.prototype = { + call$1(complex) { + var innerPseudo, innerSelector, + t1 = complex.get$singleCompound(); + if (t1 == null) + innerPseudo = null; + else { + t1 = t1.components; + innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; + } + if (!(innerPseudo instanceof A.PseudoSelector)) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + innerSelector = innerPseudo.selector; + if (innerSelector == null) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + t1 = this.pseudo; + switch (t1.normalizedName) { + case "not": + if (!B.Set_mlzm2.contains$1(0, innerPseudo.normalizedName)) + return A._setArrayType([], type$.JSArray_ComplexSelector); + return innerSelector.components; + case "is": + case "matches": + case "where": + case "any": + case "current": + case "nth-child": + case "nth-last-child": + if (innerPseudo.name !== t1.name) + return A._setArrayType([], type$.JSArray_ComplexSelector); + if (innerPseudo.argument != t1.argument) + return A._setArrayType([], type$.JSArray_ComplexSelector); + return innerSelector.components; + case "has": + case "host": + case "host-context": + case "slotted": + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + default: + return A._setArrayType([], type$.JSArray_ComplexSelector); + } + }, + $signature: 358 + }; + A.ExtensionStore__extendPseudo_closure3.prototype = { + call$1(complex) { + return this.pseudo.withSelector$1(A.SelectorList$(A._setArrayType([complex], type$.JSArray_ComplexSelector), this.selector.span)); + }, + $signature: 369 + }; + A.ExtensionStore__trim_closure.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 19 + }; + A.ExtensionStore__trim_closure0.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 19 + }; + A.ExtensionStore_clone_closure.prototype = { + call$2(simple, selectors) { + var t2, t3, t4, t5, t6, t7, newSelector, _0_0, _this = this, + t1 = type$.ModifiableBox_SelectorList, + newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(t1); + _this.newSelectors.$indexSet(0, simple, newSelectorSet); + for (t2 = selectors.get$iterator(selectors), t3 = _this.oldToNewSelectors, t4 = type$.Box_SelectorList, t5 = _this.$this._mediaContexts, t6 = _this.newMediaContexts; t2.moveNext$0();) { + t7 = t2.get$current(t2); + newSelector = new A.ModifiableBox(t7.value, t1); + newSelectorSet.add$1(0, newSelector); + t3.$indexSet(0, t7.value, new A.Box(newSelector, t4)); + _0_0 = t5.$index(0, t7); + if (_0_0 != null) + t6.$indexSet(0, newSelector, _0_0); + } + }, + $signature: 370 + }; + A.unifyComplex_closure.prototype = { + call$1(complex) { + return complex.lineBreak; + }, + $signature: 19 + }; + A._weaveParents_closure.prototype = { + call$2(group1, group2) { + var t1, unified; + if (B.C_ListEquality.equals$2(0, group1, group2)) + return group1; + if (A._complexIsParentSuperselector(group1, group2)) + return group2; + if (A._complexIsParentSuperselector(group2, group1)) + return group1; + if (!A._mustUnify(group1, group2)) + return null; + t1 = this.span; + unified = A.unifyComplex(A._setArrayType([A.ComplexSelector$(B.List_empty0, group1, t1, false), A.ComplexSelector$(B.List_empty0, group2, t1, false)], type$.JSArray_ComplexSelector), t1); + if (unified == null) + t1 = null; + else { + t1 = A.IterableExtension_get_singleOrNull(unified); + t1 = t1 == null ? null : t1.components; + } + return t1; + }, + $signature: 386 + }; + A._weaveParents_closure0.prototype = { + call$1(sequence) { + return A._complexIsParentSuperselector(sequence.get$first(sequence), this.group); + }, + $signature: 222 + }; + A._weaveParents_closure1.prototype = { + call$1(sequence) { + return sequence.get$length(0) === 0; + }, + $signature: 222 + }; + A._weaveParents_closure2.prototype = { + call$1(choice) { + return J.get$isNotEmpty$asx(choice); + }, + $signature: 388 + }; + A._mustUnify_closure.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure(this.uniqueSelectors)); + }, + $signature: 53 + }; + A._mustUnify__closure.prototype = { + call$1(simple) { + var t1; + if (!(simple instanceof A.IDSelector)) + t1 = simple instanceof A.PseudoSelector && !simple.isClass; + else + t1 = true; + return t1 && this.uniqueSelectors.contains$1(0, simple); + }, + $signature: 13 + }; + A.paths_closure.prototype = { + call$2(paths, choice) { + var t1 = this.T; + t1 = J.expand$1$1$ax(choice, new A.paths__closure(paths, t1), t1._eval$1("List<0>")); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + $signature() { + return this.T._eval$1("List>(List>,List<0>)"); + } + }; + A.paths__closure.prototype = { + call$1(option) { + var t1 = this.T; + return J.map$1$1$ax(this.paths, new A.paths___closure(option, t1), t1._eval$1("List<0>")); + }, + $signature() { + return this.T._eval$1("Iterable>(0)"); + } + }; + A.paths___closure.prototype = { + call$1(path) { + var t1 = A.List_List$of(path, true, this.T); + t1.push(this.option); + return t1; + }, + $signature() { + return this.T._eval$1("List<0>(List<0>)"); + } + }; + A.listIsSuperselector_closure.prototype = { + call$1(complex1) { + return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure(complex1)); + }, + $signature: 19 + }; + A.listIsSuperselector__closure.prototype = { + call$1(complex2) { + return complex2.isSuperselector$1(this.complex1); + }, + $signature: 19 + }; + A.complexIsSuperselector_closure.prototype = { + call$1($parent) { + return $parent.combinators.length > 1; + }, + $signature: 53 + }; + A.complexIsSuperselector_closure0.prototype = { + call$1(component) { + return A._isSupercombinator(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); + }, + $signature: 53 + }; + A._compatibleWithPreviousCombinator_closure.prototype = { + call$1(component) { + var t1 = component.combinators, + t2 = A.IterableExtension_get_firstOrNull(t1); + if (!J.$eq$(t2 == null ? null : t2.value, B.Combinator_y18)) { + t1 = A.IterableExtension_get_firstOrNull(t1); + t1 = J.$eq$(t1 == null ? null : t1.value, B.Combinator_gRV); + } else + t1 = true; + return t1; + }, + $signature: 53 + }; + A.compoundIsSuperselector_closure.prototype = { + call$1(simple1) { + return B.JSArray_methods.any$1(this.compound2.components, simple1.get$isSuperselector()); + }, + $signature: 13 + }; + A._selectorPseudoIsSuperselector_closure.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 71 + }; + A._selectorPseudoIsSuperselector_closure0.prototype = { + call$1(complex1) { + var t1, t2; + if (complex1.leadingCombinators.length === 0) { + t1 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); + t2 = this.parents; + if (t2 != null) + B.JSArray_methods.addAll$1(t1, t2); + t2 = this.compound2; + t1.push(new A.ComplexSelectorComponent(t2, A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t2.span)); + t1 = A.complexIsSuperselector(complex1.components, t1); + } else + t1 = false; + return t1; + }, + $signature: 19 + }; + A._selectorPseudoIsSuperselector_closure1.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 71 + }; + A._selectorPseudoIsSuperselector_closure2.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 71 + }; + A._selectorPseudoIsSuperselector_closure3.prototype = { + call$1(complex) { + if (complex.accept$1(B._IsBogusVisitor_true)) + return false; + return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure(complex, this.pseudo1)); + }, + $signature: 19 + }; + A._selectorPseudoIsSuperselector__closure.prototype = { + call$1(simple2) { + var t1, selector2, _0_4, _this = this; + $label0$1: { + if (simple2 instanceof A.TypeSelector) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure(simple2)); + break $label0$1; + } + if (simple2 instanceof A.IDSelector) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure0(simple2)); + break $label0$1; + } + selector2 = null; + t1 = false; + if (simple2 instanceof A.PseudoSelector) { + _0_4 = simple2.selector; + if (_0_4 != null) { + selector2 = _0_4 == null ? type$.SelectorList._as(_0_4) : _0_4; + t1 = simple2.name === _this.pseudo1.name; + } + } + if (t1) { + t1 = A.listIsSuperselector(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector)); + break $label0$1; + } + t1 = false; + break $label0$1; + } + return t1; + }, + $signature: 13 + }; + A._selectorPseudoIsSuperselector___closure.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.TypeSelector) { + t1 = this.simple2; + t1 = !(t1 instanceof A.TypeSelector && t1.name.$eq(0, simple1.name)); + } else + t1 = false; + return t1; + }, + $signature: 13 + }; + A._selectorPseudoIsSuperselector___closure0.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.IDSelector) { + t1 = this.simple2; + t1 = !(t1 instanceof A.IDSelector && t1.name === simple1.name); + } else + t1 = false; + return t1; + }, + $signature: 13 + }; + A._selectorPseudoIsSuperselector_closure4.prototype = { + call$1(selector2) { + var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); + return t1; + }, + $signature: 71 + }; + A._selectorPseudoIsSuperselector_closure5.prototype = { + call$1(pseudo2) { + var t1, selector2; + if (!(pseudo2 instanceof A.PseudoSelector)) + return false; + t1 = this.pseudo1; + if (pseudo2.name !== t1.name) + return false; + if (pseudo2.argument != t1.argument) + return false; + selector2 = pseudo2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 13 + }; + A._selectorPseudoArgs_closure.prototype = { + call$1(pseudo) { + return pseudo.isClass === this.isClass && pseudo.name === this.name; + }, + $signature: 389 + }; + A._selectorPseudoArgs_closure0.prototype = { + call$1(pseudo) { + return pseudo.selector; + }, + $signature: 390 + }; + A.MergedExtension.prototype = { + unmerge$0() { + return new A._SyncStarIterable(this.unmerge$body$MergedExtension(), type$._SyncStarIterable_Extension); + }, + unmerge$body$MergedExtension() { + var $async$self = this; + return function() { + var $async$goto = 0, $async$handler = 1, $async$currentError, right, left; + return function $async$unmerge$0($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + left = $async$self.left; + $async$goto = left instanceof A.MergedExtension ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return $async$iterator._yieldStar$1(left.unmerge$0()); + case 5: + // after yield + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 6; + return $async$iterator._async$_current = left, 1; + case 6: + // after yield + case 3: + // join + right = $async$self.right; + $async$goto = right instanceof A.MergedExtension ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return $async$iterator._yieldStar$1(right.unmerge$0()); + case 10: + // after yield + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = 11; + return $async$iterator._async$_current = right, 1; + case 11: + // after yield + case 8: + // join + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + } + }; + A.ExtendMode.prototype = { + _enumToString$0() { + return "ExtendMode." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.globalFunctions_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); + }, + $signature: 4 + }; + A.global_closure0.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "red")); + }, + $signature: 66 + }; + A.global_closure1.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "green")); + }, + $signature: 66 + }; + A.global_closure2.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "blue")); + }, + $signature: 66 + }; + A.global_closure3.prototype = { + call$1($arguments) { + return A._rgb("rgb", $arguments); + }, + $signature: 4 + }; + A.global_closure4.prototype = { + call$1($arguments) { + return A._rgb("rgb", $arguments); + }, + $signature: 4 + }; + A.global_closure5.prototype = { + call$1($arguments) { + return A._rgbTwoArg("rgb", $arguments); + }, + $signature: 4 + }; + A.global_closure6.prototype = { + call$1($arguments) { + return A._parseChannels("rgb", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz); + }, + $signature: 4 + }; + A.global_closure7.prototype = { + call$1($arguments) { + return A._rgb("rgba", $arguments); + }, + $signature: 4 + }; + A.global_closure8.prototype = { + call$1($arguments) { + return A._rgb("rgba", $arguments); + }, + $signature: 4 + }; + A.global_closure9.prototype = { + call$1($arguments) { + return A._rgbTwoArg("rgba", $arguments); + }, + $signature: 4 + }; + A.global_closure10.prototype = { + call$1($arguments) { + return A._parseChannels("rgba", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz); + }, + $signature: 4 + }; + A.global_closure11.prototype = { + call$1($arguments) { + return A._invert($arguments, true); + }, + $signature: 4 + }; + A.global_closure12.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_gsm, "hue"); + }, + $signature: 45 + }; + A.global_closure13.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_gsm, "saturation"); + }, + $signature: 45 + }; + A.global_closure14.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_gsm, "lightness"); + }, + $signature: 45 + }; + A.global_closure15.prototype = { + call$1($arguments) { + return A._hsl("hsl", $arguments); + }, + $signature: 4 + }; + A.global_closure16.prototype = { + call$1($arguments) { + return A._hsl("hsl", $arguments); + }, + $signature: 4 + }; + A.global_closure17.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString("hsl", $arguments); + else + throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); + }, + $signature: 18 + }; + A.global_closure18.prototype = { + call$1($arguments) { + return A._parseChannels("hsl", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm); + }, + $signature: 4 + }; + A.global_closure19.prototype = { + call$1($arguments) { + return A._hsl("hsla", $arguments); + }, + $signature: 4 + }; + A.global_closure20.prototype = { + call$1($arguments) { + return A._hsl("hsla", $arguments); + }, + $signature: 4 + }; + A.global_closure21.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString("hsla", $arguments); + else + throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); + }, + $signature: 18 + }; + A.global_closure22.prototype = { + call$1($arguments) { + return A._parseChannels("hsla", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm); + }, + $signature: 4 + }; + A.global_closure23.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString("grayscale", $arguments); + else { + A.warnForDeprecation(string$.Global, B.Deprecation_IIf); + return A._grayscale(t1.$index($arguments, 0)); + } + }, + $signature: 4 + }; + A.global_closure24.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + degrees = A._angleValue(t1.$index($arguments, 1), "degrees"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.adjusto, null)); + A.warnForDeprecation(string$.adjustd + A.SassNumber_SassNumber(degrees, "deg").toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_ukt); + return color.changeHsl$1$hue(color._legacyChannel$2(B.HslColorSpace_gsm, "hue") + degrees); + }, + $signature: 24 + }; + A.global_closure25.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.lighte, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s9_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("lighten() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_ukt); + return result; + }, + $signature: 24 + }; + A.global_closure26.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.darken, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s9_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("darken() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_ukt); + return result; + }, + $signature: 24 + }; + A.global_closure27.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString("saturate", $arguments); + return new A.SassString("saturate(" + A.serializeValue(t1.$index($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); + }, + $signature: 18 + }; + A.global_closure28.prototype = { + call$1($arguments) { + var t1, color, amount, result, + _s10_ = "saturation"; + A.warnForDeprecation(string$.Global, B.Deprecation_IIf); + t1 = J.getInterceptor$asx($arguments); + color = t1.$index($arguments, 0).assertColor$1("color"); + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.satura, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s10_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("saturate() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_ukt); + return result; + }, + $signature: 24 + }; + A.global_closure29.prototype = { + call$1($arguments) { + var result, + _s10_ = "saturation", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.desatu, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s10_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("desaturate() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_ukt); + return result; + }, + $signature: 24 + }; + A.global_closure30.prototype = { + call$1($arguments) { + return A._opacify("opacify", $arguments); + }, + $signature: 24 + }; + A.global_closure31.prototype = { + call$1($arguments) { + return A._opacify("fade-in", $arguments); + }, + $signature: 24 + }; + A.global_closure32.prototype = { + call$1($arguments) { + return A._transparentize("transparentize", $arguments); + }, + $signature: 24 + }; + A.global_closure33.prototype = { + call$1($arguments) { + return A._transparentize("fade-out", $arguments); + }, + $signature: 24 + }; + A.global_closure34.prototype = { + call$1($arguments) { + var _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString) + if (!_0_0._hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string$_text, $.$get$_microsoftFilterStart()); + if (t1) + return A._functionString("alpha", $arguments); + if (_0_0 instanceof A.SassColor && !_0_0._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.alpha_, null)); + A.warnForDeprecation(string$.Global, B.Deprecation_IIf); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 4 + }; + A.global_closure35.prototype = { + call$1($arguments) { + var t1, + argList = J.$index$asx($arguments, 0).get$asList(); + if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure())) + return A._functionString("alpha", $arguments); + t1 = argList.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$("Missing argument $color.", null)); + else + throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1 + " were passed.", null)); + }, + $signature: 18 + }; + A.global__closure.prototype = { + call$1(argument) { + return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); + }, + $signature: 76 + }; + A.global_closure36.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString("opacity", $arguments); + A.warnForDeprecation(string$.Global, B.Deprecation_IIf); + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 4 + }; + A.global_closure37.prototype = { + call$1($arguments) { + return A._parseChannels("color", J.$index$asx($arguments, 0), "description", null); + }, + $signature: 4 + }; + A.global_closure38.prototype = { + call$1($arguments) { + return A._parseChannels("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z); + }, + $signature: 4 + }; + A.global_closure39.prototype = { + call$1($arguments) { + return A._parseChannels("lab", J.$index$asx($arguments, 0), "channels", B.LabColorSpace_IF2); + }, + $signature: 4 + }; + A.global_closure40.prototype = { + call$1($arguments) { + return A._parseChannels("lch", J.$index$asx($arguments, 0), "channels", B.LchColorSpace_wv8); + }, + $signature: 4 + }; + A.global_closure41.prototype = { + call$1($arguments) { + return A._parseChannels("oklab", J.$index$asx($arguments, 0), "channels", B.OklabColorSpace_yrt); + }, + $signature: 4 + }; + A.global_closure42.prototype = { + call$1($arguments) { + return A._parseChannels("oklch", J.$index$asx($arguments, 0), "channels", B.OklchColorSpace_li8); + }, + $signature: 4 + }; + A.module_closure1.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "red")); + }, + $signature: 66 + }; + A.module_closure2.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "green")); + }, + $signature: 66 + }; + A.module_closure3.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "blue")); + }, + $signature: 66 + }; + A.module_closure4.prototype = { + call$1($arguments) { + var result = A._invert($arguments, false); + if (result instanceof A.SassString) + A.warnForDeprecation("Passing a number (" + A.S(J.$index$asx($arguments, 0)) + string$.x29x20to_ci + result.toString$0(0), B.Deprecation_iDZ); + return result; + }, + $signature: 4 + }; + A.module_closure5.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_gsm, "hue"); + }, + $signature: 45 + }; + A.module_closure6.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_gsm, "saturation"); + }, + $signature: 45 + }; + A.module_closure7.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_gsm, "lightness"); + }, + $signature: 45 + }; + A.module_closure8.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + result = A._functionString("grayscale", t1.take$1($arguments, 1)); + A.warnForDeprecation("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x29x20to_cg + result.toString$0(0), B.Deprecation_iDZ); + return result; + } + return A._grayscale(t1.$index($arguments, 0)); + }, + $signature: 4 + }; + A.module_closure9.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = type$.JSArray_Value; + return A._parseChannels("hwb", A.SassList$(A._setArrayType([A.SassList$(A._setArrayType([t1.$index($arguments, 0), t1.$index($arguments, 1), t1.$index($arguments, 2)], t2), B.ListSeparator_nbm, false), t1.$index($arguments, 3)], t2), B.ListSeparator_cQA, false), null, B.HwbColorSpace_06z); + }, + $signature: 4 + }; + A.module_closure10.prototype = { + call$1($arguments) { + return A._parseChannels("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z); + }, + $signature: 4 + }; + A.module_closure11.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HwbColorSpace_06z, "whiteness"); + }, + $signature: 45 + }; + A.module_closure12.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HwbColorSpace_06z, "blackness"); + }, + $signature: 45 + }; + A.module_closure13.prototype = { + call$1($arguments) { + var result, + _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString) + if (!_0_0._hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string$_text, $.$get$_microsoftFilterStart()); + if (t1) { + result = A._functionString("alpha", $arguments); + A.warnForDeprecation(string$.Using_c + result.toString$0(0), B.Deprecation_iDZ); + return result; + } + if (_0_0 instanceof A.SassColor && !_0_0._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.color_a, null)); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 4 + }; + A.module_closure14.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure2())) { + result = A._functionString("alpha", $arguments); + A.warnForDeprecation(string$.Using_c + result.toString$0(0), B.Deprecation_iDZ); + return result; + } + throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); + }, + $signature: 18 + }; + A.module__closure2.prototype = { + call$1(argument) { + return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); + }, + $signature: 76 + }; + A.module_closure15.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + result = A._functionString("opacity", $arguments); + A.warnForDeprecation("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x20to_co + result.toString$0(0), B.Deprecation_iDZ); + return result; + } + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 4 + }; + A.module_closure16.prototype = { + call$1($arguments) { + return new A.SassString(J.get$first$ax($arguments).assertColor$1("color")._space.name, false); + }, + $signature: 18 + }; + A.module_closure17.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 1), false); + }, + $signature: 24 + }; + A.module_closure18.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertColor$1("color")._space.get$isLegacyInternal() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A.module_closure19.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertColor$1("color").isChannelMissing$3$channelName$colorName(A._channelName(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A.module_closure20.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 1), true).get$isInGamut() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A.module_closure21.prototype = { + call$1($arguments) { + var space, method, _s5_ = "space", _s6_ = "method", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = t1.$index($arguments, 1); + if (t2.$eq(0, B.C__SassNull)) + space = color._space; + else { + t2 = t2.assertString$1(_s5_); + t2.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName(t2._string$_text, _s5_); + } + if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull)) + throw A.wrapException(A.SassScriptException$(string$.color_t, _s6_)); + t1 = t1.$index($arguments, 2).assertString$1(_s6_); + t1.assertUnquoted$1(_s6_); + method = A.GamutMapMethod_GamutMapMethod$fromName(t1._string$_text); + if (!space.get$isBoundedInternal()) + return color; + t1 = color.toSpace$1(space); + t1 = t1.get$isInGamut() ? t1 : method.map$1(0, t1); + return t1.toSpace$2$legacyMissing(color._space, false); + }, + $signature: 24 + }; + A.module_closure22.prototype = { + call$1($arguments) { + var channelIndex, channelInfo, channelValue, unit, + t1 = J.getInterceptor$asx($arguments), + color = A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 2), true), + channelName = A._channelName(t1.$index($arguments, 1)); + if (channelName === "alpha") { + t1 = color.alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + } + t1 = color._space._channels; + channelIndex = B.JSArray_methods.indexWhere$1(t1, new A.module__closure1(channelName)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$("Color " + color.toString$0(0) + " has no channel named " + channelName + ".", "channel")); + channelInfo = t1[channelIndex]; + channelValue = color.get$channels()[channelIndex]; + unit = channelInfo.associatedUnit; + return A.SassNumber_SassNumber(unit === "%" ? channelValue * 100 / type$.LinearChannel._as(channelInfo).max : channelValue, unit); + }, + $signature: 25 + }; + A.module__closure1.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 100 + }; + A.module_closure23.prototype = { + call$1($arguments) { + var t2, t3, + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"); + t1 = new A.module_closure_toXyzNoMissing(); + if (color1._space === color2._space) { + t1 = color1.channel0OrNull; + t2 = false; + if (t1 == null) + t1 = 0; + t3 = color2.channel0OrNull; + if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel1OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel1OrNull; + if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel2OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel2OrNull; + if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + t1 = A.fuzzyEquals(t1, t2 == null ? 0 : t2); + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = J.$eq$(t1.call$1(color1), t1.call$1(color2)); + return t1 ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A.module_closure_toXyzNoMissing.prototype = { + call$1(color) { + var _1_1, _1_3, t1, _1_7, channel0, _1_8, channel1, _1_9, channel2, _1_10, alpha, _null = null; + $label0$0: { + _1_1 = color._space; + _1_3 = B.XyzD65ColorSpace_4CA === _1_1; + t1 = _1_3; + if (t1) + t1 = !(color.channel0OrNull == null || color.channel1OrNull == null || color.channel2OrNull == null || color.alphaOrNull == null); + else + t1 = false; + if (t1) { + t1 = color; + break $label0$0; + } + if (_1_3) { + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = A.SassColor$_forSpace(B.XyzD65ColorSpace_4CA, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = _1_1.convert$5(B.XyzD65ColorSpace_4CA, channel0, channel1, channel2, alpha); + break $label0$0; + } + return t1; + }, + $signature: 452 + }; + A.module_closure24.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 2), true).isChannelPowerless$3$channelName$colorName(A._channelName(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._mix_closure.prototype = { + call$1($arguments) { + var _s6_ = "weight", + _s41_ = string$.To_usem, + _s29_ = ", you must provide a $method.", + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"), + weight = t1.$index($arguments, 2).assertNumber$1(_s6_); + if (!J.$eq$(t1.$index($arguments, 3), B.C__SassNull)) + return color1.interpolate$4$legacyMissing$weight(color2, A.InterpolationMethod_InterpolationMethod$fromValue(t1.$index($arguments, 3), "method"), false, weight.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100); + A._checkPercent(weight, _s6_); + if (!color1._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(_s41_ + color1.toString$0(0) + _s29_, "color1")); + else if (!color2._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(_s41_ + color2.toString$0(0) + _s29_, "color2")); + return A._mixLegacy(color1, color2, weight); + }, + $signature: 24 + }; + A._complement_closure.prototype = { + call$1($arguments) { + var space, t3, colorInSpace, t4, t5, t6, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = color._space; + if (t2.get$isLegacyInternal() && J.$eq$(t1.$index($arguments, 1), B.C__SassNull)) + space = B.HslColorSpace_gsm; + else { + t3 = t1.$index($arguments, 1).assertString$1(_s5_); + t3.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName(t3._string$_text, _s5_); + } + if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$("Color space " + space.toString$0(0) + " doesn't have a hue channel.", _s5_)); + colorInSpace = color.toSpace$2$legacyMissing(space, !J.$eq$(t1.$index($arguments, 1), B.C__SassNull)); + t1 = space._channels; + t3 = colorInSpace.channel0OrNull; + t4 = colorInSpace.channel1OrNull; + t5 = colorInSpace.channel2OrNull; + t6 = colorInSpace.alphaOrNull; + return (space.get$isLegacyInternal() ? A.SassColor_SassColor$forSpaceInternal(space, A._adjustChannel(colorInSpace, t1[0], t3, A.SassNumber_SassNumber(180, null)), t4, t5, t6) : A.SassColor_SassColor$forSpaceInternal(space, t3, t4, A._adjustChannel(colorInSpace, t1[2], t5, A.SassNumber_SassNumber(180, null)), t6)).toSpace$2$legacyMissing(t2, false); + }, + $signature: 24 + }; + A._adjust_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, true, false, false); + }, + $signature: 24 + }; + A._scale_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, false, false, true); + }, + $signature: 24 + }; + A._change_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, false, true, false); + }, + $signature: 24 + }; + A._ieHexStr_closure.prototype = { + call$1($arguments) { + var t1, t2, t3, t4, t5, + color = J.$index$asx($arguments, 0).assertColor$1("color").toSpace$1(B.RgbColorSpace_mlz); + color = color.get$isInGamut() ? color : B.LocalMindeGamutMap_Q7f.map$1(0, color); + t1 = new A._ieHexStr_closure_hexString(); + t2 = color.alphaOrNull; + t2 = A.S(t1.call$1((t2 == null ? 0 : t2) * 255)); + t3 = color.channel0OrNull; + t3 = A.S(t1.call$1(t3 == null ? 0 : t3)); + t4 = color.channel1OrNull; + t4 = A.S(t1.call$1(t4 == null ? 0 : t4)); + t5 = color.channel2OrNull; + return new A.SassString("#" + t2 + t3 + t4 + A.S(t1.call$1(t5 == null ? 0 : t5)), false); + }, + $signature: 18 + }; + A._ieHexStr_closure_hexString.prototype = { + call$1(component) { + return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(A.fuzzyRound(component), 16), 2, "0").toUpperCase(); + }, + $signature: 237 + }; + A._updateComponents_closure.prototype = { + call$1(space) { + return this.originalColor.toSpace$2$legacyMissing(space, false); + }, + $signature: 467 + }; + A._updateComponents_closure0.prototype = { + call$1(info) { + return this._box_0.name === info.name; + }, + $signature: 100 + }; + A._changeColor_closure.prototype = { + call$0() { + var t1 = this.alphaArg; + A.warnForDeprecation("$alpha: Passing a unit other than % (" + A.S(t1) + string$.x29x20is_d + t1.unitSuggestion$1("alpha") + string$.x0a_See_, B.Deprecation_2jN); + return t1.valueInRange$3(0, 1, "alpha"); + }, + $signature: 241 + }; + A._adjustColor_closure.prototype = { + call$1(alpha) { + return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); + }, + $signature: 16 + }; + A._functionString_closure.prototype = { + call$1(argument) { + return A.serializeValue(argument, false, true); + }, + $signature: 500 + }; + A._removedColorFunction_closure.prototype = { + call$1($arguments) { + var t1 = this.name, + t2 = J.getInterceptor$asx($arguments), + t3 = A.S(t2.$index($arguments, 0)), + t4 = this.negative ? "-" : ""; + throw A.wrapException(A.SassScriptException$("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + A.S(t2.$index($arguments, 1)) + string$.x29x0a_Moro + t1, null)); + }, + $signature: 559 + }; + A._rgb_closure.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 264 + }; + A._hsl_closure.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 264 + }; + A._parseChannels_closure.prototype = { + call$1($name) { + return $name + " channel"; + }, + $signature: 6 + }; + A._parseChannels_closure0.prototype = { + call$1(channel) { + return channel.get$isSpecialNumber(); + }, + $signature: 76 + }; + A._colorFromChannels_closure.prototype = { + call$1(channel0) { + return A._angleValue(channel0, "hue"); + }, + $signature: 111 + }; + A._colorFromChannels_closure0.prototype = { + call$1(channel0) { + return A._angleValue(channel0, "hue"); + }, + $signature: 111 + }; + A._channelFromValue_closure.prototype = { + call$1(value) { + var t1, _0_8, t2, _0_5, _0_8_isSet, upperClamped, t3, + _0_0 = this.channel; + $label0$0: { + t1 = _0_0 instanceof A.LinearChannel; + if (t1 && _0_0.requiresPercent && !value.hasUnit$1("%")) + A.throwExpression(A.SassScriptException$("Expected " + value.toString$0(0) + ' to have unit "%".', _0_0.name)); + _0_8 = null; + t2 = false; + if (t1) { + _0_5 = _0_0.lowerClamped; + _0_8_isSet = !_0_5; + if (_0_8_isSet) { + _0_8 = _0_0.upperClamped; + t2 = !_0_8; + } + } else { + _0_5 = null; + _0_8_isSet = false; + } + if (t2) { + t1 = A._percentageOrUnitless(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1 && !this.clamp) { + t1 = A._percentageOrUnitless(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1) { + upperClamped = _0_8_isSet ? _0_8 : _0_0.upperClamped; + t1 = _0_0.max; + t2 = A._percentageOrUnitless(value, t1, _0_0.name); + t3 = _0_5 ? _0_0.min : -1 / 0; + t1 = upperClamped ? t1 : 1 / 0; + t1 = isNaN(t2) ? t3 : B.JSNumber_methods.clamp$2(t2, t3, t1); + break $label0$0; + } + t1 = B.JSNumber_methods.$mod(value.coerceValueToUnit$2("deg", _0_0.name), 360); + break $label0$0; + } + return t1; + }, + $signature: 111 + }; + A._channelFunction_closure.prototype = { + call$1($arguments) { + var _this = this, + result = A.SassNumber_SassNumber(_this.getter.call$1(J.get$first$ax($arguments).assertColor$1("color")), _this.unit), + t1 = _this.global ? "" : "color.", + t2 = _this.name; + A.warnForDeprecation(t1 + t2 + string$.x28__is_d + t2 + '", $space: ' + _this.space.toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_ukt); + return result; + }, + $signature: 25 + }; + A._suggestScaleAndAdjust_closure.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 100 + }; + A._length_closure0.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).get$asList().length, null); + }, + $signature: 25 + }; + A._nth_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1); + return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; + }, + $signature: 4 + }; + A._setNth_closure.prototype = { + call$1($arguments) { + var newList, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1), + value = t1.$index($arguments, 2); + t1 = list.get$asList(); + newList = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + newList[list.sassIndexToListIndex$2(index, "n")] = value; + return list.withListContents$1(newList); + }, + $signature: 27 + }; + A._join_closure.prototype = { + call$1($arguments) { + var _0_1, _0_4, _0_3, t2, t3, _0_40, separator, bracketed, _null = null, + t1 = J.getInterceptor$asx($arguments), + list1 = t1.$index($arguments, 0), + list2 = t1.$index($arguments, 1), + separatorParam = t1.$index($arguments, 2).assertString$1("separator"), + bracketedParam = t1.$index($arguments, 3), + _1_0 = separatorParam._string$_text; + $label1$1: { + if ("auto" === _1_0) { + _0_1 = list1.get$separator(list1); + _0_4 = list2.get$separator(list2); + $label0$0: { + t1 = _null; + _0_3 = B.ListSeparator_undecided_null_undecided === _0_1; + t2 = _0_3; + if (t2) { + t3 = B.ListSeparator_undecided_null_undecided === _0_4; + _0_40 = _0_4; + } else { + _0_40 = _null; + t3 = false; + } + if (t3) { + t1 = B.ListSeparator_nbm; + break $label0$0; + } + if (_0_3) + separator = t2 ? _0_40 : _0_4; + else + separator = t1; + if (!_0_3) + separator = _0_1; + t1 = separator; + break $label0$0; + } + break $label1$1; + } + if ("space" === _1_0) { + t1 = B.ListSeparator_nbm; + break $label1$1; + } + if ("comma" === _1_0) { + t1 = B.ListSeparator_ECn; + break $label1$1; + } + if ("slash" === _1_0) { + t1 = B.ListSeparator_cQA; + break $label1$1; + } + t1 = A.throwExpression(A.SassScriptException$(string$.x24separ, _null)); + } + bracketed = bracketedParam instanceof A.SassString && bracketedParam._string$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); + t2 = A.List_List$of(list1.get$asList(), true, type$.Value); + B.JSArray_methods.addAll$1(t2, list2.get$asList()); + return A.SassList$(t2, t1, bracketed); + }, + $signature: 27 + }; + A._append_closure0.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + value = t1.$index($arguments, 1), + _0_0 = t1.$index($arguments, 2).assertString$1("separator")._string$_text; + $label0$0: { + if ("auto" === _0_0) { + t1 = list.get$separator(list) === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_nbm : list.get$separator(list); + break $label0$0; + } + if ("space" === _0_0) { + t1 = B.ListSeparator_nbm; + break $label0$0; + } + if ("comma" === _0_0) { + t1 = B.ListSeparator_ECn; + break $label0$0; + } + if ("slash" === _0_0) { + t1 = B.ListSeparator_cQA; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$(string$.x24separ, null)); + } + t2 = A.List_List$of(list.get$asList(), true, type$.Value); + t2.push(value); + return list.withListContents$2$separator(t2, t1); + }, + $signature: 27 + }; + A._zip_closure.prototype = { + call$1($arguments) { + var results, result, _box_0 = {}, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), + lists = A.List_List$of(new A.MappedListIterable(t1, new A._zip__closure(), t2), true, t2._eval$1("ListIterable.E")); + if (lists.length === 0) + return B.SassList_bdS; + _box_0.i = 0; + results = A._setArrayType([], type$.JSArray_SassList); + for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value>"), t2 = type$.Value; B.JSArray_methods.every$1(lists, new A._zip__closure0(_box_0));) { + result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure1(_box_0), t1), false, t2); + result.fixed$length = Array; + result.immutable$list = Array; + results.push(new A.SassList(result, B.ListSeparator_nbm, false)); + ++_box_0.i; + } + return A.SassList$(results, B.ListSeparator_ECn, false); + }, + $signature: 27 + }; + A._zip__closure.prototype = { + call$1(list) { + return list.get$asList(); + }, + $signature: 662 + }; + A._zip__closure0.prototype = { + call$1(list) { + return this._box_0.i !== J.get$length$asx(list); + }, + $signature: 663 + }; + A._zip__closure1.prototype = { + call$1(list) { + return J.$index$asx(list, this._box_0.i); + }, + $signature: 4 + }; + A._index_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); + return index === -1 ? B.C__SassNull : A.SassNumber_SassNumber(index + 1, null); + }, + $signature: 4 + }; + A._separator_closure.prototype = { + call$1($arguments) { + var t1, + _0_0 = J.get$separator$x(J.$index$asx($arguments, 0)); + $label0$0: { + if (B.ListSeparator_ECn === _0_0) { + t1 = new A.SassString("comma", false); + break $label0$0; + } + if (B.ListSeparator_cQA === _0_0) { + t1 = new A.SassString("slash", false); + break $label0$0; + } + t1 = new A.SassString("space", false); + break $label0$0; + } + return t1; + }, + $signature: 18 + }; + A._isBracketed_closure.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._slash_closure.prototype = { + call$1($arguments) { + var list = J.$index$asx($arguments, 0).get$asList(); + if (list.length < 2) + throw A.wrapException(A.SassScriptException$("At least two elements are required.", null)); + return A.SassList$(list, B.ListSeparator_cQA, false); + }, + $signature: 27 + }; + A._get_closure.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap)) + return B.C__SassNull; + } + t1 = map._map$_contents.$index(0, B.JSArray_methods.get$last(t2)); + return t1 == null ? B.C__SassNull : t1; + }, + $signature: 4 + }; + A._set_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._modify(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value), new A._set__closure0($arguments), true); + }, + $signature: 4 + }; + A._set__closure0.prototype = { + call$1(_) { + return J.$index$asx(this.$arguments, 2); + }, + $signature: 44 + }; + A._set_closure0.prototype = { + call$1($arguments) { + var keys, t3, t1 = {}, + t2 = J.getInterceptor$asx($arguments), + map = t2.$index($arguments, 0).assertMap$1("map"), + _0_0 = t2.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a value.", null)); + keys = t1.value = null; + t2 = _0_1 >= 1; + if (t2) { + t3 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t3); + t1.value = _0_0[t3]; + } + if (t2) + return A._modify(map, keys, new A._set__closure(t1), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 4 + }; + A._set__closure.prototype = { + call$1(_) { + return this._box_0.value; + }, + $signature: 44 + }; + A._merge_closure.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + map2 = t1.$index($arguments, 1).assertMap$1("map2"); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map$_contents, t1, t1); + t2.addAll$1(0, map2._map$_contents); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._merge_closure0.prototype = { + call$1($arguments) { + var last, t2, keys, _null = null, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + _0_0 = t1.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", _null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a map.", _null)); + t1 = _0_1 >= 1; + last = _null; + if (t1) { + t2 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + } else + keys = _null; + if (t1) + return A._modify(map1, keys, new A._merge__closure(last.assertMap$1("map2")), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 4 + }; + A._merge__closure.prototype = { + call$1(oldValue) { + var t1, t2, + nestedMap = oldValue.tryMap$0(); + if (nestedMap == null) + return this.map2; + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); + t2.addAll$1(0, this.map2._map$_contents); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 298 + }; + A._deepMerge_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._deepMergeImpl(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); + }, + $signature: 38 + }; + A._deepRemove_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + return A._modify(map, A.IterableExtension_get_exceptLast(t2), new A._deepRemove__closure(t2), false); + }, + $signature: 4 + }; + A._deepRemove__closure.prototype = { + call$1(value) { + var t1, nestedMap, t2, + _0_0 = value.tryMap$0(); + if (_0_0 != null) { + t1 = _0_0._map$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys)); + nestedMap = _0_0; + } else { + nestedMap = null; + t1 = false; + } + if (t1) { + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); + t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } + return value; + }, + $signature: 44 + }; + A._remove_closure.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertMap$1("map"); + }, + $signature: 38 + }; + A._remove_closure0.prototype = { + call$1($arguments) { + var mutableMap, t3, _i, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + t1 = type$.Value; + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1); + for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) + mutableMap.remove$1(0, t2[_i]); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 38 + }; + A._keys_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; + return A.SassList$(t1.get$keys(t1), B.ListSeparator_ECn, false); + }, + $signature: 27 + }; + A._values_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; + return A.SassList$(t1.get$values(t1), B.ListSeparator_ECn, false); + }, + $signature: 27 + }; + A._hasKey_closure.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap)) + return B.SassBoolean_false; + } + return map._map$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._modify_modifyNestedMap.prototype = { + call$1(map) { + var nestedMap, _this = this, + t1 = type$.Value, + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1), + t2 = _this.keyIterator, + key = t2.get$current(t2); + if (!t2.moveNext$0()) { + t2 = mutableMap.$index(0, key); + if (t2 == null) + t2 = B.C__SassNull; + mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + } + t2 = mutableMap.$index(0, key); + nestedMap = t2 == null ? null : t2.tryMap$0(); + t2 = nestedMap == null; + if (t2 && !_this.addNesting) + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty : nestedMap)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 318 + }; + A.global_closure.prototype = { + call$1($arguments) { + var t1, + number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.hasUnit$1("%")) + A.warnForDeprecation(string$.Passinp + number.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + number.toString$0(0) + string$.x7d__Mor, B.Deprecation_GFc); + else + A.warnForDeprecation(string$.Global, B.Deprecation_IIf); + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(Math.abs(number._number$_value), number.get$denominatorUnits(number), t1); + }, + $signature: 25 + }; + A.module_closure0.prototype = { + call$1(value) { + return Math.abs(value); + }, + $signature: 16 + }; + A._ceil_closure.prototype = { + call$1(value) { + return B.JSNumber_methods.ceil$0(value); + }, + $signature: 16 + }; + A._clamp_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + min = t1.$index($arguments, 0).assertNumber$1("min"), + number = t1.$index($arguments, 1).assertNumber$1("number"), + max = t1.$index($arguments, 2).assertNumber$1("max"); + number.convertValueToMatch$3(min, "number", "min"); + max.convertValueToMatch$3(min, "max", "min"); + if (min.greaterThanOrEquals$1(max).value) + return min; + if (min.greaterThanOrEquals$1(number).value) + return min; + if (number.greaterThanOrEquals$1(max).value) + return max; + return number; + }, + $signature: 25 + }; + A._floor_closure.prototype = { + call$1(value) { + return B.JSNumber_methods.floor$0(value); + }, + $signature: 16 + }; + A._max_closure.prototype = { + call$1($arguments) { + var t1, t2, max, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (max == null || max.lessThan$1(number).value) + max = number; + } + if (max != null) + return max; + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + }, + $signature: 25 + }; + A._min_closure.prototype = { + call$1($arguments) { + var t1, t2, min, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (min == null || min.greaterThan$1(number).value) + min = number; + } + if (min != null) + return min; + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + }, + $signature: 25 + }; + A._round_closure.prototype = { + call$1(number) { + return B.JSNumber_methods.round$0(number); + }, + $signature: 16 + }; + A._hypot_closure.prototype = { + call$1($arguments) { + var subtotal, i, i0, t3, t4, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber>"), + numbers = A.List_List$of(new A.MappedListIterable(t1, new A._hypot__closure(), t2), true, t2._eval$1("ListIterable.E")); + t1 = numbers.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + for (subtotal = 0, i = 0; i < t1; i = i0) { + i0 = i + 1; + subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); + } + t1 = Math.sqrt(subtotal); + t2 = numbers[0]; + t3 = J.getInterceptor$x(t2); + t4 = t3.get$numeratorUnits(t2); + return A.SassNumber_SassNumber$withUnits(t1, t3.get$denominatorUnits(t2), t4); + }, + $signature: 25 + }; + A._hypot__closure.prototype = { + call$1(argument) { + return argument.assertNumber$0(); + }, + $signature: 419 + }; + A._log_closure.prototype = { + call$1($arguments) { + var base, + _s18_ = " to have no units.", + _null = null, + t1 = J.getInterceptor$asx($arguments), + number = t1.$index($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + _s18_, _null)); + else if (J.$eq$(t1.$index($arguments, 1), B.C__SassNull)) + return A.SassNumber_SassNumber(Math.log(number._number$_value), _null); + base = t1.$index($arguments, 1).assertNumber$1("base"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$base: Expected " + base.toString$0(0) + _s18_, _null)); + else + return A.SassNumber_SassNumber(Math.log(number._number$_value) / Math.log(base._number$_value), _null); + }, + $signature: 25 + }; + A._pow_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A.pow0(t1.$index($arguments, 0).assertNumber$1("base"), t1.$index($arguments, 1).assertNumber$1("exponent")); + }, + $signature: 25 + }; + A._atan2_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + y = t1.$index($arguments, 0).assertNumber$1("y"); + return A.SassNumber_SassNumber$withUnits(Math.atan2(y._number$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 25 + }; + A._compatible_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._isUnitless_closure.prototype = { + call$1($arguments) { + return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._unit_closure.prototype = { + call$1($arguments) { + return new A.SassString(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); + }, + $signature: 18 + }; + A._percentage_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber(number._number$_value * 100, "%"); + }, + $signature: 25 + }; + A._randomFunction_closure.prototype = { + call$1($arguments) { + var limit, limitScalar, + t1 = J.getInterceptor$asx($arguments); + if (J.$eq$(t1.$index($arguments, 0), B.C__SassNull)) + return A.SassNumber_SassNumber($.$get$_random0().nextDouble$0(), null); + limit = t1.$index($arguments, 0).assertNumber$1("limit"); + if (limit.get$hasUnits()) + A.warnForDeprecation(string$.math_r + limit.toString$0(0) + string$.x29x20in_a + limit.get$unitString() + ")) * 1" + limit.get$unitString() + string$.x0a_To_p + limit.get$unitString() + string$.x29x29__Mo, B.Deprecation_2jN); + limitScalar = limit.assertInt$1("limit"); + if (limitScalar < 1) + throw A.wrapException(A.SassScriptException$("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); + return A.SassNumber_SassNumber($.$get$_random0().nextInt$1(limitScalar) + 1, null); + }, + $signature: 25 + }; + A._div_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + number1 = t1.$index($arguments, 0), + number2 = t1.$index($arguments, 1); + if (!(number1 instanceof A.SassNumber) || !(number2 instanceof A.SassNumber)) + A.warn(string$.math_d); + return number1.dividedBy$1(number2); + }, + $signature: 4 + }; + A._singleArgumentMathFunc_closure.prototype = { + call$1($arguments) { + return this.mathFunc.call$1(J.$index$asx($arguments, 0).assertNumber$1("number")); + }, + $signature: 25 + }; + A._numberFunction_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"), + t1 = this.transform.call$1(number._number$_value), + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(t1, number.get$denominatorUnits(number), t2); + }, + $signature: 25 + }; + A._shared_closure.prototype = { + call$1($arguments) { + A.warnForDeprecation(string$.The_fe, B.Deprecation_E6M); + return $._features.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._shared_closure0.prototype = { + call$1($arguments) { + return new A.SassString(A.serializeValue(J.get$first$ax($arguments), true, true), false); + }, + $signature: 18 + }; + A._shared_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + _0_0 = t1.$index($arguments, 0); + $label0$0: { + if (_0_0 instanceof A.SassArgumentList) { + t1 = "arglist"; + break $label0$0; + } + if (_0_0 instanceof A.SassBoolean) { + t1 = "bool"; + break $label0$0; + } + if (_0_0 instanceof A.SassColor) { + t1 = "color"; + break $label0$0; + } + if (_0_0 instanceof A.SassList) { + t1 = "list"; + break $label0$0; + } + if (_0_0 instanceof A.SassMap) { + t1 = "map"; + break $label0$0; + } + if (B.C__SassNull === _0_0) { + t1 = "null"; + break $label0$0; + } + if (_0_0 instanceof A.SassNumber) { + t1 = "number"; + break $label0$0; + } + if (_0_0 instanceof A.SassFunction) { + t1 = "function"; + break $label0$0; + } + if (_0_0 instanceof A.SassMixin) { + t1 = "mixin"; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation) { + t1 = "calculation"; + break $label0$0; + } + if (_0_0 instanceof A.SassString) { + t1 = "string"; + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unknown value type " + A.S(t1.$index($arguments, 0))); + } + return new A.SassString(t1, false); + }, + $signature: 18 + }; + A._shared_closure2.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + _1_0 = t1.$index($arguments, 0); + if (_1_0 instanceof A.SassArgumentList) { + _1_0._wereKeywordsAccessed = true; + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(_1_0._keywords, type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, false), t4._1); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } else + throw A.wrapException("$args: " + A.S(t1.$index($arguments, 0)) + " is not an argument list."); + }, + $signature: 38 + }; + A.moduleFunctions_closure.prototype = { + call$1($arguments) { + return new A.SassString(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); + }, + $signature: 18 + }; + A.moduleFunctions_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; + return A.SassList$(new A.MappedListIterable(t1, new A.moduleFunctions__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_ECn, false); + }, + $signature: 27 + }; + A.moduleFunctions__closure.prototype = { + call$1(argument) { + return argument instanceof A.Value ? argument : new A.SassString(J.toString$0$(argument), false); + }, + $signature: 278 + }; + A.moduleFunctions_closure1.prototype = { + call$1($arguments) { + var _0_2_isSet, _0_2, acceptsContent, t1, _0_5_isSet, _0_5, hasContent, + mixin = J.$index$asx($arguments, 0).assertMixin$1("mixin"), + _0_0 = mixin.callable; + $label0$0: { + _0_2_isSet = type$.AsyncBuiltInCallable._is(_0_0); + if (_0_2_isSet) { + _0_2 = _0_0.get$acceptsContent(); + acceptsContent = _0_2; + } else + acceptsContent = null; + if (!_0_2_isSet) { + _0_2_isSet = _0_0 instanceof A.BuiltInCallable; + if (_0_2_isSet) { + _0_2 = _0_0.acceptsContent; + acceptsContent = _0_2; + } + t1 = _0_2_isSet; + } else + t1 = true; + if (t1) { + t1 = acceptsContent; + break $label0$0; + } + _0_5_isSet = _0_0 instanceof A.UserDefinedCallable; + if (_0_5_isSet) { + _0_5 = _0_0.declaration; + t1 = _0_5 instanceof A.MixinRule; + } else { + _0_5 = null; + t1 = false; + } + if (t1) { + t1 = _0_5_isSet ? _0_5 : _0_0.declaration; + hasContent = type$.MixinRule._as(t1).get$hasContent(); + t1 = hasContent; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + return t1 ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._nest_closure.prototype = { + call$1($arguments) { + var t1 = {}, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$(string$.x24selec, null)); + t1.first = true; + return new A.MappedListIterable(selectors, new A._nest__closure(t1), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList>")).reduce$1(0, new A._nest__closure0()).get$asSassList(); + }, + $signature: 27 + }; + A._nest__closure.prototype = { + call$1(selector) { + var t1 = this._box_0, + result = A.SassApiValue_assertSelector(selector, !t1.first, null); + t1.first = false; + return result; + }, + $signature: 142 + }; + A._nest__closure0.prototype = { + call$2($parent, child) { + return child.nestWithin$1($parent); + }, + $signature: 143 + }; + A._append_closure.prototype = { + call$1($arguments) { + var t1, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$(string$.x24selec, null)); + t1 = A.EvaluationContext_currentOrNull(); + return new A.MappedListIterable(selectors, new A._append__closure(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList>")).reduce$1(0, new A._append__closure0((t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan())).get$asSassList(); + }, + $signature: 27 + }; + A._append__closure.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector(selector, false, null); + }, + $signature: 142 + }; + A._append__closure0.prototype = { + call$2($parent, child) { + var t1 = child.components, + t2 = this.span; + return A.SelectorList$(new A.MappedListIterable(t1, new A._append___closure($parent, t2), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")), t2).nestWithin$1($parent); + }, + $signature: 143 + }; + A._append___closure.prototype = { + call$1(complex) { + var _0_0, t1, component, rest, newCompound, t2, _null = null; + if (complex.leadingCombinators.length !== 0) + throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + _0_0 = complex.components; + t1 = _0_0.length >= 1; + if (t1) { + component = _0_0[0]; + rest = B.JSArray_methods.sublist$1(_0_0, 1); + } else { + rest = _null; + component = rest; + } + if (!t1) + throw A.wrapException(A.StateError$("Pattern matching error")); + newCompound = A._prependParent(component.selector); + if (newCompound == null) + throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + t1 = this.span; + t2 = A._setArrayType([new A.ComplexSelectorComponent(newCompound, A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator), t1)], type$.JSArray_ComplexSelectorComponent); + B.JSArray_methods.addAll$1(t2, rest); + return A.ComplexSelector$(B.List_empty0, t2, t1, false); + }, + $signature: 60 + }; + A._extend_closure.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "extendee", + _s8_1 = "extender", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s8_1); + source.assertNotBogus$1$name(_s8_1); + t1 = A.EvaluationContext_currentOrNull(); + return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_allTargets_allTargets, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 27 + }; + A._replace_closure.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "original", + _s11_ = "replacement", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s11_); + source.assertNotBogus$1$name(_s11_); + t1 = A.EvaluationContext_currentOrNull(); + return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_replace_replace, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 27 + }; + A._unify_closure.prototype = { + call$1($arguments) { + var selector2, + _s9_ = "selector1", + _s9_0 = "selector2", + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s9_); + selector1.assertNotBogus$1$name(_s9_); + selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s9_0); + selector2.assertNotBogus$1$name(_s9_0); + t1 = selector1.unify$1(selector2); + t1 = t1 == null ? null : t1.get$asSassList(); + return t1 == null ? B.C__SassNull : t1; + }, + $signature: 4 + }; + A._isSuperselector_closure.prototype = { + call$1($arguments) { + var selector2, + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, "super"); + selector1.assertNotBogus$1$name("super"); + selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, "sub"); + selector2.assertNotBogus$1$name("sub"); + return A.listIsSuperselector(selector1.components, selector2.components) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._simpleSelectors_closure.prototype = { + call$1($arguments) { + var t1 = A.SassApiValue_assertCompoundSelector(J.$index$asx($arguments, 0), "selector").components; + return A.SassList$(new A.MappedListIterable(t1, new A._simpleSelectors__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_ECn, false); + }, + $signature: 27 + }; + A._simpleSelectors__closure.prototype = { + call$1(simple) { + return new A.SassString(A.serializeSelector(simple, true), false); + }, + $signature: 361 + }; + A._parse_closure.prototype = { + call$1($arguments) { + return A.SassApiValue_assertSelector(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); + }, + $signature: 27 + }; + A.module_closure.prototype = { + call$1($arguments) { + var limit, t2, chunks, i, lastEnd, match, t3, + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + separator = t1.$index($arguments, 1).assertString$1("separator"); + t1 = t1.$index($arguments, 2).get$realNull(); + limit = t1 == null ? null : t1.assertNumber$1("limit").assertInt$1("limit"); + if (limit != null && limit < 1) + throw A.wrapException(A.SassScriptException$("$limit: Must be 1 or greater, was " + A.S(limit) + ".", null)); + t1 = string._string$_text; + if (t1.length === 0) + return B.SassList_bdS0; + else { + t2 = separator._string$_text; + if (t2.length === 0) + return A.SassList$(A.MappedIterable_MappedIterable(new A.Runes(t1), new A.module__closure(string), type$.Runes._eval$1("Iterable.E"), type$.Value), B.ListSeparator_ECn, true); + } + chunks = A._setArrayType([], type$.JSArray_String); + for (t2 = B.JSString_methods.allMatches$1(t2, t1), t2 = new A._StringAllMatchesIterator(t2._input, t2._pattern, t2.__js_helper$_index), i = 0, lastEnd = 0; t2.moveNext$0();) { + match = t2.__js_helper$_current; + t3 = match.start; + chunks.push(B.JSString_methods.substring$2(t1, lastEnd, t3)); + lastEnd = t3 + match.pattern.length; + ++i; + if (i === limit) + break; + } + chunks.push(B.JSString_methods.substring$1(t1, lastEnd)); + return A.SassList$(new A.MappedListIterable(chunks, new A.module__closure0(string), type$.MappedListIterable_String_Value), B.ListSeparator_ECn, true); + }, + $signature: 27 + }; + A.module__closure.prototype = { + call$1(rune) { + return new A.SassString(A.Primitives_stringFromCharCode(rune), this.string._hasQuotes); + }, + $signature: 367 + }; + A.module__closure0.prototype = { + call$1(chunk) { + return new A.SassString(chunk, this.string._hasQuotes); + }, + $signature: 368 + }; + A._unquote_closure.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (!string._hasQuotes) + return string; + return new A.SassString(string._string$_text, false); + }, + $signature: 18 + }; + A._quote_closure.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (string._hasQuotes) + return string; + return new A.SassString(string._string$_text, true); + }, + $signature: 18 + }; + A._length_closure.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).assertString$1("string").get$_sassLength(), null); + }, + $signature: 25 + }; + A._insert_closure.prototype = { + call$1($arguments) { + var indexInt, codeUnitIndex, _s5_ = "index", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + insert = t1.$index($arguments, 1).assertString$1("insert"), + index = t1.$index($arguments, 2).assertNumber$1(_s5_); + index.assertNoUnits$1(_s5_); + indexInt = index.assertInt$1(_s5_); + if (indexInt < 0) + indexInt = Math.max(string.get$_sassLength() + indexInt + 2, 0); + t1 = string._string$_text; + codeUnitIndex = A.codepointIndexToCodeUnitIndex(t1, A._codepointForIndex(indexInt, string.get$_sassLength(), false)); + return new A.SassString(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string$_text), string._hasQuotes); + }, + $signature: 18 + }; + A._index_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = t1.$index($arguments, 0).assertString$1("string")._string$_text, + codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string$_text); + if (codeUnitIndex === -1) + return B.C__SassNull; + return A.SassNumber_SassNumber(A.codeUnitIndexToCodepointIndex(t2, codeUnitIndex) + 1, null); + }, + $signature: 4 + }; + A._slice_closure.prototype = { + call$1($arguments) { + var lengthInCodepoints, endInt, startCodepoint, endCodepoint, + _s8_ = "start-at", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + start = t1.$index($arguments, 1).assertNumber$1(_s8_), + end = t1.$index($arguments, 2).assertNumber$1("end-at"); + start.assertNoUnits$1(_s8_); + end.assertNoUnits$1("end-at"); + lengthInCodepoints = string.get$_sassLength(); + endInt = end.assertInt$0(); + if (endInt === 0) + return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); + startCodepoint = A._codepointForIndex(start.assertInt$0(), lengthInCodepoints, false); + endCodepoint = A._codepointForIndex(endInt, lengthInCodepoints, true); + if (endCodepoint === lengthInCodepoints) + --endCodepoint; + if (endCodepoint < startCodepoint) + return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); + t1 = string._string$_text; + return new A.SassString(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex(t1, startCodepoint), A.codepointIndexToCodeUnitIndex(t1, endCodepoint + 1)), string._hasQuotes); + }, + $signature: 18 + }; + A._toUpperCase_closure.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); + } + return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); + }, + $signature: 18 + }; + A._toLowerCase_closure.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); + } + return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); + }, + $signature: 18 + }; + A._uniqueId_closure.prototype = { + call$1($arguments) { + var t1 = $.$get$_previousUniqueId() + ($.$get$_random().nextInt$1(36) + 1); + $._previousUniqueId = t1; + if (t1 > Math.pow(36, 6)) + $._previousUniqueId = B.JSInt_methods.$mod($.$get$_previousUniqueId(), A._asInt(Math.pow(36, 6))); + return new A.SassString("u" + B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1($.$get$_previousUniqueId(), 36), 6, "0"), false); + }, + $signature: 18 + }; + A.ImportCache.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + var t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j, _this = this, _null = null; + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter) && _this._importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Custom); + if (baseImporter != null && url.get$scheme() === "") { + resolvedUrl = baseUrl == null ? _null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + relativeResult = _this._perImporterCanonicalizeCache.putIfAbsent$2(key, new A.ImportCache_canonicalize_closure(_this, baseImporter, resolvedUrl, baseUrl, forImport, key, url)); + if (relativeResult != null) + return relativeResult; + } + key = new A._Record_2_forImport(url, forImport); + t1 = _this._canonicalizeCache; + if (t1.containsKey$1(key)) + return t1.$index(0, key); + for (t2 = _this._importers, t3 = type$.Record_1_nullable_Object, t4 = _this._perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl, t6 = type$.Record_3_Importer_and_Uri_and_Uri_originalUrl, cacheable = true, i = 0; i < t2.length; ++i) { + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = _null; + _1_2_isSet = t3._is(_1_0); + result = _null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = _null; + t7 = false; + } + if (t7) + return result; + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) + continue; + $label0$1: { + _2_0 = _this._canonicalize$4(importer, url, baseUrl, forImport); + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = _null; + _2_3 = _null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = _null; + if (t7) { + t1.$indexSet(0, key, result); + return result; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) + return _2_1; + break $label0$1; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), _null); + cacheable = false; + } + if (_2_1 != null) + return _2_1; + } + } + } + if (cacheable) + t1.$indexSet(0, key, _null); + return _null; + }, + canonicalize$3$baseImporter$baseUrl(_, url, baseImporter, baseUrl) { + return this.canonicalize$4$baseImporter$baseUrl$forImport(0, url, baseImporter, baseUrl, false); + }, + _canonicalize$4(importer, url, baseUrl, forImport) { + var passContainingUrl, canonicalizeContext, t1, result, cacheable, _null = null; + if (baseUrl != null) + passContainingUrl = url.get$scheme() === "" || importer.isNonCanonicalScheme$1(url.get$scheme()); + else + passContainingUrl = false; + canonicalizeContext = new A.CanonicalizeContext(forImport, passContainingUrl ? baseUrl : _null); + t1 = type$.nullable_Object; + result = A.runZoned(new A.ImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.nullable_Uri); + cacheable = !passContainingUrl || !canonicalizeContext._wasContainingUrlAccessed; + if (result == null) + return new A._Record_2(_null, cacheable); + if (result.get$scheme() === "") + A.WarnForDeprecation_warnForDeprecation(this._logger, B.Deprecation_IMm, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2e_Rela, _null, _null); + else if (importer.isNonCanonicalScheme$1(result.get$scheme())) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + return new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this._importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure(this, importer, canonicalUrl, originalUrl, quiet)); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + importCanonical$2(importer, canonicalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, null, false); + }, + humanize$1(canonicalUrl) { + var t1 = type$.NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl; + t1 = A.NullableExtension_andThen(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._canonicalizeCache.get$values(0), t1), new A.ImportCache_humanize_closure(canonicalUrl), t1._eval$1("WhereIterable")), new A.ImportCache_humanize_closure0(), t1._eval$1("MappedIterable")), new A.ImportCache_humanize_closure1()), new A.ImportCache_humanize_closure2(canonicalUrl)); + return t1 == null ? canonicalUrl : t1; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + }, + clearCanonicalize$1(url) { + var t1 = this._canonicalizeCache; + t1.remove$1(0, new A._Record_2_forImport(url, false)); + t1.remove$1(0, new A._Record_2_forImport(url, true)); + this._perImporterCanonicalizeCache.removeWhere$1(0, new A.ImportCache_clearCanonicalize_closure(this, url)); + }, + clearImport$1(canonicalUrl) { + this._resultsCache.remove$1(0, canonicalUrl); + this._importCache.remove$1(0, canonicalUrl); + } + }; + A.ImportCache_canonicalize_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.baseUrl, + _0_0 = t1._canonicalize$4(_this.baseImporter, _this.resolvedUrl, t2, _this.forImport); + if (t2 != null) + t1._nonCanonicalRelativeUrls.$indexSet(0, _this.key, _this.url); + return _0_0._0; + }, + $signature: 116 + }; + A.ImportCache__canonicalize_closure.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 144 + }; + A.ImportCache_importCanonical_closure.prototype = { + call$0() { + var t2, t3, t4, t5, _this = this, + t1 = _this.canonicalUrl, + result = _this.importer.load$1(0, t1); + if (result == null) + return null; + t2 = _this.$this; + t2._resultsCache.$indexSet(0, t1, result); + t3 = result.contents; + t4 = result.syntax; + t5 = _this.originalUrl; + t1 = t5 == null ? t1 : t5.resolveUri$1(t1); + return A.Stylesheet_Stylesheet$parse(t3, t4, _this.quiet ? $.$get$Logger_quiet() : t2._logger, t1); + }, + $signature: 98 + }; + A.ImportCache_humanize_closure.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 424 + }; + A.ImportCache_humanize_closure0.prototype = { + call$1(result) { + return result._2; + }, + $signature: 447 + }; + A.ImportCache_humanize_closure1.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.ImportCache_humanize_closure2.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 48 + }; + A.ImportCache_clearCanonicalize_closure.prototype = { + call$2(key, _) { + var t1 = this.url; + return key._1.$eq(0, t1) || J.$eq$(this.$this._nonCanonicalRelativeUrls.$index(0, key), t1); + }, + $signature: 470 + }; + A.Importer.prototype = { + modificationTime$1(url) { + return new A.DateTime(Date.now(), 0, false); + }, + couldCanonicalize$2(url, canonicalUrl) { + return true; + }, + isNonCanonicalScheme$1(scheme) { + return false; + } + }; + A.AsyncImporter.prototype = {}; + A.CanonicalizeContext.prototype = {}; + A.FilesystemImporter.prototype = { + canonicalize$1(_, url) { + var resolved, _0_0; + if (url.get$scheme() === "file") + resolved = A.resolveImportPath($.$get$context().style.pathFromUri$1(A._parseUri(url))); + else if (url.get$scheme() !== "") + return null; + else { + _0_0 = this._loadPath; + if (_0_0 != null) { + resolved = A.resolveImportPath(A.join(_0_0, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)); + if (resolved != null && this._loadPathDeprecated) + A.warnForDeprecation(string$.Using_t, B.Deprecation_B4v); + } else + return null; + } + return A.NullableExtension_andThen(resolved, new A.FilesystemImporter_canonicalize_closure()); + }, + load$1(_, url) { + var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)), + t1 = A.readFile(path), + t2 = A.Syntax_forPath(path), + t3 = url.get$scheme(); + if (t3 === "") + A.throwExpression(A.ArgumentError$value(url, "sourceMapUrl", "must be absolute")); + return new A.ImporterResult(t1, url, t2); + }, + modificationTime$1(url) { + return A.modificationTime($.$get$context().style.pathFromUri$1(A._parseUri(url))); + }, + couldCanonicalize$2(url, canonicalUrl) { + var t1, t2, basename, canonicalBasename; + if (url.get$scheme() !== "file" && url.get$scheme() !== "") + return false; + if (canonicalUrl.get$scheme() !== "file") + return false; + t1 = $.$get$url(); + t2 = t1.style; + basename = A.ParsedPath_ParsedPath$parse(url.get$path(url), t2).get$basename(); + canonicalBasename = A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t2).get$basename(); + if (!B.JSString_methods.startsWith$1(basename, "_") && B.JSString_methods.startsWith$1(canonicalBasename, "_")) + canonicalBasename = B.JSString_methods.substring$1(canonicalBasename, 1); + return basename === canonicalBasename || basename === t1.withoutExtension$1(canonicalBasename); + }, + toString$0(_) { + var t1 = this._loadPath; + return t1 == null ? "" : t1; + } + }; + A.FilesystemImporter_canonicalize_closure.prototype = { + call$1(resolved) { + var t2, t0, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (t1) { + t1 = $.$get$context(); + t2 = A._realCasePath(A.absolute(t1.normalize$1(resolved), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, resolved); + t0 = t2; + t2 = t1; + t1 = t0; + } + return t2.toUri$1(t1); + }, + $signature: 122 + }; + A.NoOpImporter.prototype = {}; + A.NodePackageImporter.prototype = { + isNonCanonicalScheme$1(scheme) { + return scheme === "pkg"; + }, + canonicalize$1(_, url) { + var packageName, jsonPath, jsonString, packageManifest, e, t1, t2, t3, t4, baseDirectory, parts, t5, $name, subpath, packageRoot, exception, _1_0, rootPath, subpathInRoot, _this = this, _null = null; + if (url.get$scheme() === "file") + return $.$get$FilesystemImporter_cwd().canonicalize$1(0, url); + if (url.get$scheme() !== "pkg") + return _null; + if (url.get$hasAuthority()) + throw A.wrapException(string$.A_pkg_h); + else { + t1 = $.$get$url(); + t2 = t1.style; + if (t2.rootLength$1(url.get$path(url)) > 0) + throw A.wrapException("A pkg: URL's path must not begin with /."); + else if (url.get$path(url).length === 0) + throw A.wrapException("A pkg: URL must not have an empty path."); + else if (url.get$hasQuery() || url.get$hasFragment()) + throw A.wrapException(string$.A_pkg_q); + } + t3 = A.canonicalizeContext(); + t3._wasContainingUrlAccessed = true; + t3 = t3._containingUrl; + if ((t3 == null ? _null : t3.get$scheme()) === "file") { + t3 = A.canonicalizeContext(); + t3._wasContainingUrlAccessed = true; + t3 = t3._containingUrl; + t3.toString; + t4 = $.$get$context(); + baseDirectory = t4.dirname$1(t4.style.pathFromUri$1(A._parseUri(t3))); + } else { + t3 = _this.__NodePackageImporter__entryPointDirectory_F; + t3 === $ && A.throwUnnamedLateFieldNI(); + baseDirectory = t3; + } + packageName = null; + parts = t1.split$1(0, url.get$path(url)); + t3 = B.JSArray_methods.removeAt$1(parts, 0); + t4 = $.$get$context(); + t3.toString; + t5 = t4.style; + $name = t5.pathFromUri$1(A._parseUri(t3)); + if (B.JSString_methods.startsWith$1($name, "@")) + $name = parts.length !== 0 ? t1.join$2(0, $name, B.JSArray_methods.removeAt$1(parts, 0)) : $name; + subpath = parts.length !== 0 ? t5.pathFromUri$1(A._parseUri(t1.joinAll$1(parts))) : _null; + packageName = $name; + t1 = true; + if (!J.startsWith$1$s(packageName, ".")) + if (!J.contains$1$asx(packageName, "\\")) + if (!J.contains$1$asx(packageName, "%")) + t1 = J.startsWith$1$s(packageName, "@") && !J.contains$1$asx(packageName, t2.get$separator(t2)); + if (t1) + return _null; + packageRoot = _this._resolvePackageRoot$2(packageName, baseDirectory); + if (packageRoot == null) + return _null; + jsonPath = A.join(packageRoot, "package.json", _null); + jsonString = A.readFile(jsonPath); + packageManifest = null; + try { + packageManifest = type$.Map_String_dynamic._as(B.C_JsonCodec.decode$1(jsonString)); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.S(jsonPath); + t2 = A.S(packageName); + t3 = A.S(e); + throw A.wrapException("Failed to parse " + t1 + ' for "pkg:' + t2 + '": ' + t3); + } + _1_0 = _this._resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName); + if (_1_0 != null) + if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, t5)._splitExtension$1(1)[1])) + return t4.toUri$1(t4.canonicalize$1(0, _1_0)); + else { + t1 = subpath == null ? "root" : subpath; + throw A.wrapException("The export for '" + t1 + "' in '" + A.S(packageName) + "' resolved to '" + _1_0 + string$.x27x2c_whi); + } + if (subpath == null) { + rootPath = _this._resolvePackageRootValues$2(packageRoot, packageManifest); + return rootPath != null ? t4.toUri$1(t4.canonicalize$1(0, rootPath)) : _null; + } + subpathInRoot = A.join(packageRoot, subpath, _null); + return $.$get$FilesystemImporter_cwd().canonicalize$1(0, t4.toUri$1(subpathInRoot)); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd().load$1(0, url); + }, + _resolvePackageRoot$2(packageName, baseDirectory) { + var potentialPackage, t1; + for (; true;) { + potentialPackage = A.join(baseDirectory, "node_modules", packageName); + if (A.dirExists(potentialPackage)) + return potentialPackage; + t1 = $.$get$context(); + if (t1.split$1(0, baseDirectory).length === 1) + return null; + baseDirectory = t1.dirname$1(baseDirectory); + } + }, + _resolvePackageRootValues$2(packageRoot, packageManifest) { + var t1, sassValue, _1_0, styleValue, _null = null, + _0_0 = packageManifest.$index(0, "sass"); + if (typeof _0_0 == "string") { + t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_0_0, $.$get$url().style)._splitExtension$1(1)[1]); + sassValue = _0_0; + } else { + sassValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, sassValue, _null); + else { + _1_0 = packageManifest.$index(0, "style"); + if (typeof _1_0 == "string") { + t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, $.$get$url().style)._splitExtension$1(1)[1]); + styleValue = _1_0; + } else { + styleValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, styleValue, _null); + } + return A.resolveImportPath(A.join(packageRoot, "index", _null)); + }, + _resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName) { + var _0_0, _1_0, _this = this, + exports = packageManifest.$index(0, "exports"); + if (exports == null) + return null; + _0_0 = _this._nodePackageExportsResolve$5(packageRoot, _this._exportsToCheck$1(subpath), exports, subpath, packageName); + if (_0_0 != null) + return _0_0; + if (subpath != null && A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1].length !== 0) + return null; + _1_0 = _this._nodePackageExportsResolve$5(packageRoot, _this._exportsToCheck$2$addIndex(subpath, true), exports, subpath, packageName); + if (_1_0 != null) + return _1_0; + return null; + }, + _nodePackageExportsResolve$5(packageRoot, subpathVariants, exports, subpath, packageName) { + var t1, matches, _1_1, path; + if (type$.Map_String_dynamic._is(exports) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure()) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure0())) + throw A.wrapException("`exports` in " + packageName + string$.x20can_n + J.map$1$1$ax(J.get$keys$z(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure1(), type$.String).join$1(0, ",") + " in " + A.join(packageRoot, "package.json", null) + "."); + t1 = type$.NonNullsIterable_String; + matches = A.List_List$of(new A.NonNullsIterable(new A.MappedListIterable(subpathVariants, new A.NodePackageImporter__nodePackageExportsResolve_closure2(this, exports, packageRoot), A._arrayInstanceType(subpathVariants)._eval$1("MappedListIterable<1,String?>")), t1), true, t1._eval$1("Iterable.E")); + $label0$1: { + _1_1 = matches.length; + if (_1_1 === 1) { + path = matches[0]; + t1 = path; + break $label0$1; + } + if (_1_1 <= 0) { + t1 = null; + break $label0$1; + } + t1 = subpath == null ? "root" : subpath; + t1 = A.throwExpression(string$.Unable + t1 + " in " + packageName + " should be used. \n\nFound:\n" + B.JSArray_methods.join$1(matches, "\n")); + } + return t1; + }, + _compareExpansionKeys$2(keyA, keyB) { + var t1 = B.JSString_methods.contains$1(keyA, "*"), + baseLengthA = t1 ? B.JSString_methods.indexOf$1(keyA, "*") + 1 : keyA.length, + t2 = B.JSString_methods.contains$1(keyB, "*"), + baseLengthB = t2 ? B.JSString_methods.indexOf$1(keyB, "*") + 1 : keyB.length; + if (baseLengthA > baseLengthB) + return -1; + if (baseLengthB > baseLengthA) + return 1; + if (!t1) + return 1; + if (!t2) + return -1; + t1 = keyA.length; + t2 = keyB.length; + if (t1 > t2) + return -1; + if (t2 > t1) + return 1; + return 0; + }, + _packageTargetResolve$4(subpath, exports, packageRoot, patternMatch) { + var t2, string, path, map, key, value, _1_0, array, _2_0, _null = null, + t1 = typeof exports == "string"; + if (t1) { + t2 = !B.JSString_methods.startsWith$1(exports, "./"); + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) + throw A.wrapException("Export '" + A.S(string) + string$.x27x20must + packageRoot + "'."); + if (t1) { + t2 = patternMatch != null; + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) { + t1 = J.replaceFirst$2$s(string, "*", patternMatch); + t2 = $.$get$context(); + path = t2.normalize$1(A.join(packageRoot, t2.style.pathFromUri$1(A._parseUri(t1)), _null)); + return A.fileExists(path) ? path : _null; + } + string = t1 ? exports : _null; + if (t1) { + t1 = $.$get$context(); + string.toString; + return A.join(packageRoot, t1.style.pathFromUri$1(A._parseUri(string)), _null); + } + t1 = type$.Map_String_dynamic._is(exports); + map = t1 ? exports : _null; + if (t1) { + for (t1 = A.MapExtensions_get_pairs(map, type$.String, type$.dynamic), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + key = t2._0; + value = t2._1; + if (!B.Set_TnQrk.contains$1(0, key)) + continue; + if (value == null) + continue; + _1_0 = this._packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_1_0 != null) + return _1_0; + } + return _null; + } + if (type$.List_nullable_Object._is(exports) && J.get$length$asx(exports) <= 0) + return _null; + t1 = type$.List_dynamic._is(exports); + array = t1 ? exports : _null; + if (t1) { + for (t1 = J.get$iterator$ax(array); t1.moveNext$0();) { + value = t1.get$current(t1); + if (value == null) + continue; + _2_0 = this._packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_2_0 != null) + return _2_0; + } + return _null; + } + throw A.wrapException("Invalid 'exports' value " + A.S(exports) + " in " + A.join(packageRoot, "package.json", _null) + "."); + }, + _packageTargetResolve$3(subpath, exports, packageRoot) { + return this._packageTargetResolve$4(subpath, exports, packageRoot, null); + }, + _getMainExport$1(exports) { + var t1, t2, t3, map, _0_4, t4, $export; + $label0$0: { + t1 = null; + if (typeof exports == "string") { + t1 = exports; + break $label0$0; + } + if (type$.List_String._is(exports)) { + t1 = exports; + break $label0$0; + } + t2 = type$.Map_String_dynamic._is(exports); + if (t2) { + t3 = !J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__getMainExport_closure()); + map = exports; + } else { + map = t1; + t3 = false; + } + if (t3) { + t1 = map; + break $label0$0; + } + t3 = false; + if (t2) { + _0_4 = exports.$index(0, "."); + if (_0_4 == null) + t4 = exports.containsKey$1("."); + else + t4 = true; + if (t4) + t3 = _0_4 != null; + } else + _0_4 = null; + if (t3) { + $export = t2 ? _0_4 : J.$index$asx(exports, "."); + t1 = $export; + break $label0$0; + } + break $label0$0; + } + return t1; + }, + _exportsToCheck$2$addIndex(subpath, addIndex) { + var basename, dirname, t3, t4, _i, path, + t1 = type$.JSArray_String, + paths = A._setArrayType([], t1), + t2 = subpath == null; + if (t2 && addIndex) + subpath = "index"; + else if (!t2 && addIndex) + subpath = A.join(subpath, "index", null); + if (subpath == null) + return A._setArrayType([null], type$.JSArray_nullable_String); + if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1])) + paths.push(subpath); + else + B.JSArray_methods.addAll$1(paths, A._setArrayType([subpath, subpath + ".scss", subpath + ".sass", subpath + ".css"], t1)); + t1 = $.$get$context(); + t2 = t1.style; + basename = A.ParsedPath_ParsedPath$parse(subpath, t2).get$basename(); + dirname = t1.dirname$1(subpath); + if (B.JSString_methods.startsWith$1(basename, "_")) + return paths; + t1 = A.List_List$of(paths, true, type$.nullable_String); + for (t3 = paths.length, t4 = dirname === ".", _i = 0; _i < paths.length; paths.length === t3 || (0, A.throwConcurrentModificationError)(paths), ++_i) { + path = paths[_i]; + if (t4) + t1.push("_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename()); + else + t1.push(A.join(dirname, "_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename(), null)); + } + return t1; + }, + _exportsToCheck$1(subpath) { + return this._exportsToCheck$2$addIndex(subpath, false); + } + }; + A.NodePackageImporter__nodePackageExportsResolve_closure.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure0.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure1.prototype = { + call$1(key) { + return '"' + key + '"'; + }, + $signature: 6 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure2.prototype = { + call$1(variant) { + var t1, matchKey, t2, t3, t4, t5, t6, _i, expansionKey, _0_0, t7, patternBase, patternTrailer, t8, target, _this = this, _null = null; + if (variant == null) { + t1 = _this.$this; + return A.NullableExtension_andThen(t1._getMainExport$1(_this.exports), new A.NodePackageImporter__nodePackageExportsResolve__closure(t1, variant, _this.packageRoot)); + } else { + t1 = _this.exports; + if (!type$.Map_String_dynamic._is(t1) || J.every$1$ax(t1.get$keys(t1), new A.NodePackageImporter__nodePackageExportsResolve__closure0())) + return _null; + } + matchKey = "./" + $.$get$context().toUri$1(variant).toString$0(0); + if (t1.containsKey$1(matchKey) && J.$index$asx(t1, matchKey) != null && !B.JSString_methods.contains$1(matchKey, "*")) { + t1 = J.$index$asx(t1, matchKey); + if (t1 == null) + t1 = type$.Object._as(t1); + return _this.$this._packageTargetResolve$3(matchKey, t1, _this.packageRoot); + } + t2 = A._setArrayType([], type$.JSArray_String); + for (t3 = J.getInterceptor$z(t1), t4 = J.get$iterator$ax(t3.get$keys(t1)); t4.moveNext$0();) { + t5 = t4.get$current(t4); + if (B.JSString_methods.allMatches$1("*", t5).get$length(0) === 1) + t2.push(t5); + } + t4 = _this.$this; + B.JSArray_methods.sort$1(t2, t4.get$_compareExpansionKeys()); + for (t5 = t2.length, t6 = matchKey.length, _i = 0; _i < t2.length; t2.length === t5 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + expansionKey = t2[_i]; + _0_0 = expansionKey.split("*"); + t7 = _0_0.length === 2; + if (t7) { + patternBase = _0_0[0]; + patternTrailer = _0_0[1]; + patternTrailer = patternTrailer; + } else { + patternTrailer = _null; + patternBase = patternTrailer; + } + if (!t7) + throw A.wrapException(A.StateError$("Pattern matching error")); + if (!B.JSString_methods.startsWith$1(matchKey, patternBase)) + continue; + if (matchKey === patternBase) + continue; + t7 = patternTrailer.length; + if (t7 !== 0) + t8 = B.JSString_methods.endsWith$1(matchKey, patternTrailer) && t6 >= expansionKey.length; + else + t8 = true; + if (t8) { + target = t3.$index(t1, expansionKey); + if (target == null) + continue; + return t4._packageTargetResolve$4(variant, target, _this.packageRoot, B.JSString_methods.substring$2(matchKey, patternBase.length, t6 - t7)); + } + } + return _null; + }, + $signature: 146 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure.prototype = { + call$1(mainExport) { + return this.$this._packageTargetResolve$3(this.variant, mainExport, this.packageRoot); + }, + $signature: 147 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure0.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.NodePackageImporter__getMainExport_closure.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.ImporterResult.prototype = { + get$sourceMapUrl(_) { + return this._sourceMapUrl; + } + }; + A.resolveImportPath_closure.prototype = { + call$0() { + return A._exactlyOne(A._tryPath($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); + }, + $signature: 49 + }; + A.resolveImportPath_closure0.prototype = { + call$0() { + return A._exactlyOne(A._tryPathWithExtensions(this.path + ".import")); + }, + $signature: 49 + }; + A._tryPathAsDirectory_closure.prototype = { + call$0() { + return A._exactlyOne(A._tryPathWithExtensions(A.join(this.path, "index.import", null))); + }, + $signature: 49 + }; + A._exactlyOne_closure.prototype = { + call$1(path) { + var t1 = $.$get$context(); + return " " + t1.prettyUri$1(t1.toUri$1(path)); + }, + $signature: 6 + }; + A.InterpolationBuffer.prototype = { + writeCharCode$1(character) { + var t1 = this._interpolation_buffer$_text, + t2 = A.Primitives_stringFromCharCode(character); + t1._contents += t2; + return null; + }, + addInterpolation$1(interpolation) { + var _0_4_isSet, _0_4, _0_40, first, rest, t2, _this = this, + toAdd = interpolation.contents, + t1 = toAdd.length; + if (t1 === 0) + return; + _0_4_isSet = t1 >= 1; + _0_4 = null; + if (_0_4_isSet) { + _0_40 = toAdd[0]; + t1 = _0_40; + _0_4 = t1; + t1 = typeof t1 == "string"; + } else + t1 = false; + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : toAdd[0]); + rest = B.JSArray_methods.sublist$1(toAdd, 1); + t1 = _this._interpolation_buffer$_text; + t1._contents += first; + toAdd = rest; + } + _this._flushText$0(); + t1 = _this._interpolation_buffer$_contents; + B.JSArray_methods.addAll$1(t1, toAdd); + if (typeof B.JSArray_methods.get$last(t1) == "string") { + t2 = _this._interpolation_buffer$_text; + t1 = A.S(t1.pop()); + t2._contents += t1; + } + }, + _flushText$0() { + var t1 = this._interpolation_buffer$_text, + t2 = t1._contents; + if (t2.length === 0) + return; + this._interpolation_buffer$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); + t1._contents = ""; + }, + interpolation$1(span) { + var t1 = A.List_List$of(this._interpolation_buffer$_contents, true, type$.Object), + t2 = this._interpolation_buffer$_text._contents; + if (t2.length !== 0) + t1.push(t2.charCodeAt(0) == 0 ? t2 : t2); + return A.Interpolation$(t1, span); + }, + toString$0(_) { + var t1, t2, _i, t3, element; + for (t1 = this._interpolation_buffer$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + element = t1[_i]; + t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); + } + t1 = t3 + this._interpolation_buffer$_text.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.InterpolationMap.prototype = { + mapException$1(error) { + var t3, t4, _this = this, + target = error.get$span(error), + source = _this.mapSpan$1(target), + startIndex = _this._indexInContents$1(target.get$start(target)), + endIndex = _this._indexInContents$1(target.get$end(target)), + t1 = _this._interpolation.contents, + t2 = error._span_exception$_message; + if (!A.SubListIterable$(t1, startIndex, null, A._arrayInstanceType(t1)._precomputed1).take$1(0, endIndex - startIndex + 1).any$1(0, new A.InterpolationMap_mapException_closure())) + return new A.SourceSpanFormatException(error.get$source(), t2, source); + else { + t1 = type$.SourceSpan; + t3 = type$.String; + t4 = A.LinkedHashMap_LinkedHashMap$_literal([target, "error in interpolated output"], t1, t3); + return new A.MultiSourceSpanFormatException(error.get$source(), "", A.ConstantMap_ConstantMap$from(t4, t1, t3), t2, source); + } + }, + mapSpan$1(target) { + var _0_10, t1, _0_2_isSet, _0_20, t2, start, end, _this = this, _null = null, + _0_1 = _this._mapLocation$1(target.get$start(target)), + _0_2 = _this._mapLocation$1(target.get$end(target)); + $label0$0: { + _0_10 = _0_1; + t1 = type$.FileSpan; + _0_2_isSet = t1._is(_0_1); + _0_20 = _null; + t2 = false; + if (_0_2_isSet) { + t1._as(_0_10); + _0_20 = _0_2; + t2 = t1._is(_0_2); + start = _0_10; + _0_1 = start; + } else { + start = _null; + _0_1 = _0_10; + } + if (t2) { + t1 = start.expand$1(0, t1._as(_0_2_isSet ? _0_20 : _0_2)); + break $label0$0; + } + t2 = false; + if (t1._is(_0_1)) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t2 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t2) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation.span; + t1 = t2.get$file(t2).span$2(0, _this._expandInterpolationSpanLeft$1(start.get$start(start)), t1.offset); + break $label0$0; + } + t2 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t1._is(t2); + start = _0_1; + } else + start = _null; + if (t2) { + end = t1._as(_0_2_isSet ? _0_20 : _0_2); + t1 = _this._interpolation.span; + t1 = t1.get$file(t1).span$2(0, start.offset, _this._expandInterpolationSpanRight$1(end.get$end(end))); + break $label0$0; + } + t1 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t1 = _0_20; + else { + t1 = _0_2; + _0_20 = t1; + _0_2_isSet = true; + } + t1 = t1 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t1) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation.span; + t1 = t2.get$file(t2).span$2(0, start.offset, t1.offset); + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unreachable"); + } + return t1; + }, + _mapLocation$1(target) { + var t3, previousLocation, _this = this, + index = _this._indexInContents$1(target), + t1 = _this._interpolation, + t2 = t1.contents, + _0_0 = t2[index]; + if (_0_0 instanceof A.Expression) + return _0_0.get$span(_0_0); + t3 = index === 0; + t1 = t1.span; + if (t3) + previousLocation = t1.get$start(t1); + else { + t1 = t1.get$file(t1); + t2 = type$.Expression._as(t2[index - 1]); + t2 = t2.get$span(t2); + previousLocation = A.FileLocation$_(t1, _this._expandInterpolationSpanRight$1(t2.get$end(t2))); + } + t1 = t3 ? 0 : _this._targetLocations[index - 1].get$offset(); + return A.FileLocation$_(previousLocation.file, previousLocation.offset + (target.offset - t1)); + }, + _indexInContents$1(target) { + var t1, t2, t3, i; + for (t1 = this._targetLocations, t2 = t1.length, t3 = target.offset, i = 0; i < t2; ++i) + if (t3 < t1[i].get$offset()) + return i; + return this._interpolation.contents.length - 1; + }, + _expandInterpolationSpanLeft$1(start) { + var i0, prev, char, + source = start.file._decodedChars, + i = start.offset - 1; + for (; i >= 0;) { + i0 = i - 1; + prev = source[i]; + if (prev === 123) { + if (source[i0] === 35) { + i = i0; + break; + } + i = i0; + } else if (prev === 47) { + i = i0 - 1; + if (source[i0] === 42) + for (; true;) { + i0 = i - 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i - 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + }, + _expandInterpolationSpanRight$1(end) { + var t1, i0, next, second, t2, char, + source = end.file._decodedChars, + i = end.offset; + for (t1 = source.length; i < t1;) { + i0 = i + 1; + next = source[i]; + if (next === 125) { + i = i0; + break; + } + if (next === 47) { + i = i0 + 1; + second = source[i0]; + if (second === 47) { + while (true) { + i0 = i + 1; + t2 = source[i]; + if (!!(t2 === 10 || t2 === 13 || t2 === 12)) + break; + i = i0; + } + i = i0; + } else if (second === 42) + for (; true;) { + i0 = i + 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i + 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + } + }; + A.InterpolationMap_mapException_closure.prototype = { + call$1($content) { + return $content instanceof A.Expression; + }, + $signature: 69 + }; + A._realCasePath_helper.prototype = { + call$1(path) { + var dirname = $.$get$context().dirname$1(path); + if (dirname === path) + return path; + return $._realCaseCache.putIfAbsent$2(path, new A._realCasePath_helper_closure(this, dirname, path)); + }, + $signature: 6 + }; + A._realCasePath_helper_closure.prototype = { + call$0() { + var matches, t1, _0_0, match, exception, + realDirname = this.helper.call$1(this.dirname), + t2 = this.path, + basename = A.ParsedPath_ParsedPath$parse(t2, $.$get$context().style).get$basename(); + try { + matches = J.where$1$ax(A.listDir(realDirname, false), new A._realCasePath_helper__closure(basename)).toList$0(0); + t1 = null; + _0_0 = matches; + $label0$0: { + match = null; + if (J.get$length$asx(_0_0) === 1) { + match = J.$index$asx(_0_0, 0); + t1 = match; + break $label0$0; + } + t1 = A.join(realDirname, basename, null); + break $label0$0; + } + t1 = t1; + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException) + return t2; + else + throw exception; + } + }, + $signature: 29 + }; + A._realCasePath_helper__closure.prototype = { + call$1(realPath) { + return A.equalsIgnoreCase(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); + }, + $signature: 5 + }; + A.FileSystemException.prototype = { + toString$0(_) { + var t1 = $.$get$context(); + return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A._readFile_closure.prototype = { + call$0() { + return J.readFileSync$2$x(A.fs(), this.path, this.encoding); + }, + $signature: 57 + }; + A.writeFile_closure.prototype = { + call$0() { + return J.writeFileSync$2$x(A.fs(), this.path, this.contents); + }, + $signature: 0 + }; + A.deleteFile_closure.prototype = { + call$0() { + return J.unlinkSync$1$x(A.fs(), this.path); + }, + $signature: 0 + }; + A.readStdin_closure.prototype = { + call$1(result) { + this._box_0.contents = result; + this.completer.complete$1(result); + }, + $signature: 95 + }; + A.readStdin_closure0.prototype = { + call$1(chunk) { + this.sink.add$1(0, type$.List_int._as(chunk)); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 80 + }; + A.readStdin_closure1.prototype = { + call$1(arg) { + this.sink.close$0(0); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 80 + }; + A.readStdin_closure2.prototype = { + call$1(e) { + A.printError("Failed to read from stdin"); + A.printError(e); + e.toString; + this.completer.completeError$1(e); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 80 + }; + A.fileExists_closure.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 23 + }; + A.dirExists_closure.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 23 + }; + A.ensureDir_closure.prototype = { + call$0() { + var error, systemError, exception, t1; + try { + J.mkdirSync$1$x(A.fs(), this.path); + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "EEXIST")) + return; + if (!J.$eq$(J.get$code$x(systemError), "ENOENT")) + throw exception; + t1 = this.path; + A.ensureDir($.$get$context().dirname$1(t1)); + J.mkdirSync$1$x(A.fs(), t1); + } + }, + $signature: 0 + }; + A.listDir_closure.prototype = { + call$0() { + var t1 = this.path; + if (!this.recursive) + return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure(t1), type$.String).super$Iterable$where(0, new A.listDir__closure0()); + else + return new A.listDir_closure_list().call$1(t1); + }, + $signature: 148 + }; + A.listDir__closure.prototype = { + call$1(child) { + return A.join(this.path, A._asString(child), null); + }, + $signature: 121 + }; + A.listDir__closure0.prototype = { + call$1(child) { + return !A.dirExists(child); + }, + $signature: 5 + }; + A.listDir_closure_list.prototype = { + call$1($parent) { + return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure($parent, this), type$.String); + }, + $signature: 149 + }; + A.listDir__list_closure.prototype = { + call$1(child) { + var path = A.join(this.parent, A._asString(child), null); + return A.dirExists(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); + }, + $signature: 150 + }; + A.modificationTime_closure.prototype = { + call$0() { + var t1 = J.getTime$0$x(J.get$mtime$x(J.statSync$1$x(A.fs(), this.path))); + if (t1 < -864e13 || t1 > 864e13) + A.throwExpression(A.RangeError$range(t1, -864e13, 864e13, "millisecondsSinceEpoch", null)); + A.checkNotNullable(false, "isUtc", type$.bool); + return new A.DateTime(t1, 0, false); + }, + $signature: 151 + }; + A.watchDir_closure.prototype = { + call$2(path, _) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_add, path)); + }, + call$1(path) { + return this.call$2(path, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 152 + }; + A.watchDir_closure0.prototype = { + call$2(path, _) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_modify, path)); + }, + call$1(path) { + return this.call$2(path, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 152 + }; + A.watchDir_closure1.prototype = { + call$1(path) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_remove, path)); + }, + $signature: 95 + }; + A.watchDir_closure2.prototype = { + call$1(error) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.addError$1(error); + }, + $signature: 90 + }; + A.watchDir_closure3.prototype = { + call$0() { + var controller = A.StreamController_StreamController(new A.watchDir__closure(this.watcher), null, null, null, false, type$.WatchEvent); + this._box_0.controller = controller; + this.completer.complete$1(new A._ControllerStream(controller, A._instanceType(controller)._eval$1("_ControllerStream<1>"))); + }, + $signature: 1 + }; + A.watchDir__closure.prototype = { + call$0() { + J.close$0$x(this.watcher); + }, + $signature: 1 + }; + A.JSArray0.prototype = {}; + A.Chokidar.prototype = {}; + A.ChokidarOptions.prototype = {}; + A.ChokidarWatcher.prototype = {}; + A.JSFunction.prototype = {}; + A.ImmutableList.prototype = {}; + A.ImmutableMap.prototype = {}; + A.NodeImporterResult.prototype = {}; + A.RenderContext.prototype = {}; + A.RenderContextOptions.prototype = {}; + A.RenderContextResult.prototype = {}; + A.RenderContextResultStats.prototype = {}; + A.JSModule.prototype = {}; + A.JSModuleRequire.prototype = {}; + A.JSClass.prototype = {}; + A.JSUrl.prototype = {}; + A._PropertyDescriptor.prototype = {}; + A._RequireMain.prototype = {}; + A.LoggerWithDeprecationType0.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + this.internalWarn$4$deprecation$span$trace(message, deprecation ? B.Deprecation_JeE : null, span, trace); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + warn$2$span(_, message, span) { + return this.warn$4$deprecation$span$trace(0, message, false, span, null); + }, + warn$2$trace(_, message, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, null, trace); + } + }; + A._QuietLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + warn$2$span(_, message, span) { + return this.warn$4$deprecation$span$trace(0, message, false, span, null); + }, + debug$2(_, message, span) { + } + }; + A.DeprecationProcessingLogger.prototype = { + validate$0() { + var t1, t2, t3, t4, t5, t6, _1_7, _this = this, _null = null; + for (t1 = _this.fatalDeprecations, t1 = t1.get$iterator(t1), t2 = _this.silenceDeprecations, t3 = _this.futureDeprecations, t4 = _this._inner; t1.moveNext$0();) { + t5 = t1.get$current(t1); + if (t5.isFuture && !t3.contains$1(0, t5)) { + t5 = t5.toString$0(0); + t4.warn$3$span$trace(0, "Future " + t5 + string$.x20deprex20m, _null, _null); + continue; + } + t6 = t2.contains$1(0, t5); + if (t6) { + t5 = t5.toString$0(0); + t4.warn$3$span$trace(0, "Ignoring setting to silence " + t5 + string$.x20deprex2c, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t2, t2._modifications, A._instanceType(t2)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t2._as(t5); + if (B.Deprecation_JeE === t5) { + t4.warn$3$span$trace(0, string$.User_a, _null, _null); + continue; + } + _1_7 = t5.isFuture; + if (_1_7 && t3.contains$1(0, t5)) { + t5 = t5.toString$0(0); + t4.warn$3$span$trace(0, "Conflicting options for future " + t5 + " deprecation cancel each other out.", _null, _null); + continue; + } + if (_1_7) { + t5 = t5.toString$0(0); + t4.warn$3$span$trace(0, "Future " + t5 + string$.x20deprex20i, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t3, t3._modifications, A._instanceType(t3)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + if (!t3.isFuture) { + t3 = t3.toString$0(0); + t4.warn$3$span$trace(0, t3 + string$.x20is_noaf, _null, _null); + } + } + }, + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + if (deprecation != null) + this._handleDeprecation$4$span$trace(deprecation, message, span, trace); + else + this._inner.warn$3$span$trace(0, message, span, trace); + }, + _handleDeprecation$4$span$trace(deprecation, message, span, trace) { + var _0_3_isSet, _0_3, t1, span0, t2, count, _this = this, _null = null; + if (deprecation.isFuture && !_this.futureDeprecations.contains$1(0, deprecation)) + return; + if (_this.fatalDeprecations.contains$1(0, deprecation)) { + message += string$.x0a_This + deprecation.toString$0(0) + string$.x20deprex20t; + $label0$0: { + _0_3_isSet = span != null; + _0_3 = _null; + t1 = false; + if (_0_3_isSet) { + span0 = span == null ? type$.FileSpan._as(span) : span; + t1 = trace != null; + _0_3 = trace; + } else + span0 = _null; + if (t1) { + if (_0_3_isSet) + trace = _0_3; + t1 = A.SassRuntimeException$(message, span0, trace == null ? type$.Trace._as(trace) : trace, _null); + break $label0$0; + } + t1 = false; + if (span != null) + t1 = (_0_3_isSet ? _0_3 : trace) == null; + else + span = _null; + if (t1) { + t1 = A.SassException$(message, span, _null); + break $label0$0; + } + t1 = A.SassScriptException$(message, _null); + break $label0$0; + } + throw A.wrapException(t1); + } + if (_this.silenceDeprecations.contains$1(0, deprecation)) + return; + if (_this.limitRepetition) { + t1 = _this._warningCounts; + t2 = t1.$index(0, deprecation); + count = (t2 == null ? 0 : t2) + 1; + t1.$indexSet(0, deprecation, count); + if (count > 5) + return; + } + _this._inner.warn$4$deprecation$span$trace(0, message, true, span, trace); + }, + debug$2(_, message, span) { + return this._inner.debug$2(0, message, span); + }, + summarize$1$js(js) { + var t1 = this._warningCounts.get$values(0), + t2 = A._instanceType(t1), + total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(t1, new A.DeprecationProcessingLogger_summarize_closure(), t2._eval$1("WhereIterable")), new A.DeprecationProcessingLogger_summarize_closure0(), t2._eval$1("MappedIterable"))); + if (total > 0) { + t1 = js ? "" : string$.x0aRun_i; + this._inner.warn$1(0, "" + total + string$.x20repet + t1); + } + } + }; + A.DeprecationProcessingLogger_summarize_closure.prototype = { + call$1(count) { + return count > 5; + }, + $signature: 50 + }; + A.DeprecationProcessingLogger_summarize_closure0.prototype = { + call$1(count) { + return count - 5; + }, + $signature: 155 + }; + A.StderrLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + var t2, + result = new A.StringBuffer(""), + t1 = this.color; + if (t1) { + t2 = result._contents = "" + "\x1b[33m\x1b[1m"; + t2 = result._contents = (deprecation ? result._contents = t2 + "Deprecation " : t2) + "Warning\x1b[0m"; + } else + t2 = result._contents = (deprecation ? result._contents = "" + "DEPRECATION " : "") + "WARNING"; + if (span == null) + t1 = result._contents = t2 + (": " + message + "\n"); + else if (trace != null) { + t1 = t2 + (": " + message + "\n\n" + span.highlight$1$color(t1) + "\n"); + result._contents = t1; + } else { + t1 = t2 + (" on " + span.message$2$color(0, "\n" + message, t1) + "\n"); + result._contents = t1; + } + if (trace != null) + result._contents = t1 + (A.indent(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4) + "\n"); + A.printError(result); + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + warn$2$span(_, message, span) { + return this.warn$4$deprecation$span$trace(0, message, false, span, null); + }, + warn$2$trace(_, message, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, null, trace); + }, + debug$2(_, message, span) { + var url, t3, t4, + t1 = span.file, + t2 = span._file$_start; + if (A.FileLocation$_(t1, t2).file.url == null) + url = "-"; + else { + t3 = A.FileLocation$_(t1, t2).file.url; + t4 = $.$get$context(); + t3.toString; + url = t4.prettyUri$1(t3); + } + t1 = A.FileLocation$_(t1, t2); + t1 = t1.file.getLine$1(t1.offset); + t2 = this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"; + t2 = "" + (url + ":" + (t1 + 1) + " ") + t2 + (": " + message); + A.printError(t2.charCodeAt(0) == 0 ? t2 : t2); + } + }; + A.TrackingLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + this._emittedWarning = true; + this._tracking$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, trace); + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + debug$2(_, message, span) { + this._emittedDebug = true; + this._tracking$_logger.debug$2(0, message, span); + } + }; + A.BuiltInModule.prototype = { + get$upstream() { + return B.List_empty7; + }, + get$variableNodes() { + return B.Map_empty4; + }, + get$extensionStore() { + return B.C_EmptyExtensionStore; + }, + get$css(_) { + return new A.CssStylesheet(B.List_empty3, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); + }, + get$preModuleComments() { + return B.Map_empty2; + }, + get$transitivelyContainsCss() { + return false; + }, + get$transitivelyContainsExtensions() { + return false; + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + throw A.wrapException(A.SassScriptException$("Cannot modify built-in variable.", null)); + }, + variableIdentity$1($name) { + return this; + }, + cloneCss$0() { + return this; + }, + $isModule0: 1, + get$url(receiver) { + return this.url; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$variables() { + return this.variables; + } + }; + A.ForwardedModuleView.prototype = { + get$url(_) { + var t1 = this._forwarded_view$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._forwarded_view$_inner.get$upstream(); + }, + get$extensionStore() { + return this._forwarded_view$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._forwarded_view$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._forwarded_view$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._forwarded_view$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._forwarded_view$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + var t2, _1_0, _2_0, + _s19_ = "Undefined variable.", + t1 = this._rule, + _0_0 = t1.shownVariables; + if (_0_0 != null) + t2 = !_0_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + else { + _1_0 = t1.hiddenVariables; + if (_1_0 != null) + t2 = _1_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + } + _2_0 = t1.prefix; + if (_2_0 != null) { + if (!B.JSString_methods.startsWith$1($name, _2_0)) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + $name = B.JSString_methods.substring$1($name, _2_0.length); + } + return this._forwarded_view$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + var _0_0 = this._rule.prefix; + if (_0_0 != null) + $name = B.JSString_methods.substring$1($name, _0_0.length); + return this._forwarded_view$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ForwardedModuleView && this._forwarded_view$_inner.$eq(0, other._forwarded_view$_inner) && this._rule === other._rule; + }, + get$hashCode(_) { + var t1 = this._forwarded_view$_inner; + return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._rule)) >>> 0; + }, + cloneCss$0() { + return A.ForwardedModuleView$(this._forwarded_view$_inner.cloneCss$0(), this._rule, this.$ti._precomputed1); + }, + toString$0(_) { + return "forwarded " + this._forwarded_view$_inner.toString$0(0); + }, + $isModule0: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.ShadowedModuleView.prototype = { + get$url(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._shadowed_view$_inner.get$upstream(); + }, + get$extensionStore() { + return this._shadowed_view$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._shadowed_view$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._shadowed_view$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._shadowed_view$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + else + this._shadowed_view$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + return this._shadowed_view$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + var t1, t2, t3, _this = this; + if (other == null) + return false; + t1 = false; + if (other instanceof A.ShadowedModuleView) + if (_this._shadowed_view$_inner.$eq(0, other._shadowed_view$_inner)) { + t2 = _this.variables; + t2 = t2.get$keys(t2); + t3 = other.variables; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t2 = _this.functions; + t2 = t2.get$keys(t2); + t3 = other.functions; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t1 = _this.mixins; + t1 = t1.get$keys(t1); + t2 = other.mixins; + t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); + t1 = t2; + } + } + } + return t1; + }, + get$hashCode(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$hashCode(t1); + }, + cloneCss$0() { + var _this = this; + return new A.ShadowedModuleView(_this._shadowed_view$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); + }, + toString$0(_) { + return "shadowed " + this._shadowed_view$_inner.toString$0(0); + }, + $isModule0: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.AtRootQueryParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure(this)); + } + }; + A.AtRootQueryParser_parse_closure.prototype = { + call$0() { + var include, atRules, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$1(40); + t1.whitespace$0(); + include = t1.scanIdentifier$1("with"); + if (!include) + t1.expectIdentifier$2$name("without", '"with" or "without"'); + t1.whitespace$0(); + t2.expectChar$1(58); + t1.whitespace$0(); + atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + do { + atRules.add$1(0, t1.identifier$0().toLowerCase()); + t1.whitespace$0(); + } while (t1.lookingAtIdentifier$0()); + t2.expectChar$1(41); + t2.expectDone$0(); + return new A.AtRootQuery(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); + }, + $signature: 456 + }; + A._disallowedFunctionNames_closure.prototype = { + call$1($function) { + return $function.name; + }, + $signature: 459 + }; + A.CssParser.prototype = { + get$plainCss() { + return true; + }, + silentComment$0() { + var t1, t2, _this = this; + if (_this._inExpression) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.super$Parser$silentComment(); + _this.error$2(0, string$.Silent, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + atRule$2$root(child, root) { + var $name, _0_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(64); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + _0_0 = $name.get$asPlain(); + $label0$0: { + if ("at-root" === _0_0 || "content" === _0_0 || "debug" === _0_0 || "each" === _0_0 || "error" === _0_0 || "extend" === _0_0 || "for" === _0_0 || "function" === _0_0 || "if" === _0_0 || "include" === _0_0 || "mixin" === _0_0 || "return" === _0_0 || "warn" === _0_0 || "while" === _0_0) + _this._forbiddenAtRule$1(start); + if ("import" === _0_0) { + t1 = _this._cssImportRule$1(start); + break $label0$0; + } + if ("media" === _0_0) { + t1 = _this.mediaRule$1(start); + break $label0$0; + } + if ("-moz-document" === _0_0) { + t1 = _this.mozDocumentRule$2(start, $name); + break $label0$0; + } + if ("supports" === _0_0) { + t1 = _this.supportsRule$1(start); + break $label0$0; + } + t1 = _this.unknownAtRule$2(start, $name); + break $label0$0; + } + return t1; + }, + _forbiddenAtRule$1(start) { + this.almostAnyValue$0(); + this.error$2(0, "This at-rule isn't allowed in plain CSS.", this.scanner.spanFrom$1(start)); + }, + _cssImportRule$1(start) { + var t2, urlSpan, modifiers, _this = this, + t1 = _this.scanner, + urlStart = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = t1.peekChar$0(); + $label0$0: { + if (117 === _0_0 || 85 === _0_0) { + t2 = _this.dynamicUrl$0(); + break $label0$0; + } + t2 = new A.StringExpression(_this.interpolatedString$0().asInterpolation$1$static(true), false); + break $label0$0; + } + urlSpan = t1.spanFrom$1(urlStart); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + _this.expectStatementSeparator$1("@import rule"); + t2 = A._setArrayType([new A.StaticImport(A.Interpolation$(A._setArrayType([t2], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(urlStart))], type$.JSArray_Import); + t1 = t1.spanFrom$1(start); + return new A.ImportRule(A.List_List$unmodifiable(t2, type$.Import), t1); + }, + parentheses$0() { + var expression, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + this.whitespace$0(); + expression = this.expressionUntilComma$0(); + t1.expectChar$1(41); + return new A.ParenthesizedExpression(expression, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + identifierLike$0() { + var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = plain.toLowerCase(), + _0_0 = _this.trySpecialFunction$2(lower, start); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + if (t1.scanChar$1(46)) + return _this.namespacedExpression$2(plain, start); + if (!t1.scanChar$1(40)) + return new A.StringExpression(identifier, false); + allowEmptySecondArg = lower === "var"; + $arguments = A._setArrayType([], type$.JSArray_Expression); + if (!t1.scanChar$1(41)) { + do { + _this.whitespace$0(); + if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { + t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t4 = t3.offset; + t4 = A._FileSpan$(t3.file, t4, t4); + $arguments.push(new A.StringExpression(A.Interpolation$(A._setArrayType([""], type$.JSArray_Object), t4), false)); + break; + } + $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + t1.expectChar$1(41); + } + if ($.$get$_disallowedFunctionNames().contains$1(0, plain)) + _this.error$2(0, string$.This_f, t1.spanFrom$1(start)); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + t3 = type$.Expression; + t4 = A.List_List$unmodifiable($arguments, t3); + t3 = A.ConstantMap_ConstantMap$from(B.Map_empty6, type$.String, t3); + t1 = t1.spanFrom$1(start); + return new A.FunctionExpression(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, new A.ArgumentInvocation(t4, t3, null, null, t2), t1); + }, + namespacedExpression$2(namespace, start) { + var expression = this.super$StylesheetParser$namespacedExpression(namespace, start); + this.error$2(0, string$.Modulen, expression.get$span(expression)); + } + }; + A.KeyframeSelectorParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure(this)); + }, + _percentage$0() { + var $self, _0_0, + t1 = this.scanner, + t2 = t1.scanChar$1(43) ? "" + A.Primitives_stringFromCharCode(43) : "", + second = t1.peekChar$0(); + if (!(second != null && second >= 48 && second <= 57) && second !== 46) + t1.error$1(0, "Expected number."); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + if (t1.peekChar$0() === 46) { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + if (this.scanIdentChar$1(101)) { + t2 += A.Primitives_stringFromCharCode(101); + _0_0 = t1.peekChar$0(); + if (43 === _0_0 || 45 === _0_0) + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + } + t1.expectChar$1(37); + t2 += A.Primitives_stringFromCharCode(37); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A.KeyframeSelectorParser_parse_closure.prototype = { + call$0() { + var selectors = A._setArrayType([], type$.JSArray_String), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + if (t1.lookingAtIdentifier$0()) + if (t1.scanIdentifier$1("from")) + selectors.push("from"); + else { + t1.expectIdentifier$2$name("to", '"to" or "from"'); + selectors.push("to"); + } + else + selectors.push(t1._percentage$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return selectors; + }, + $signature: 131 + }; + A.MediaQueryParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure(this)); + }, + _mediaQuery$0() { + var conditions, conjunction, t1, identifier1, identifier2, type, modifier, _this = this, _s3_ = "and", _null = null; + if (_this.scanner.peekChar$0() === 40) { + conditions = A._setArrayType([_this._mediaInParens$0()], type$.JSArray_String); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1(_s3_)); + conjunction = true; + } else { + t1 = _this.scanIdentifier$1("or"); + if (t1) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1("or")); + } + conjunction = !t1; + } + return A.CssMediaQuery$condition(conditions, conjunction); + } + identifier1 = _this.identifier$0(); + if (A.equalsIgnoreCase(identifier1, "not")) { + _this.expectWhitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$condition(A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), _null); + } + _this.whitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$type(identifier1, _null, _null); + identifier2 = _this.identifier$0(); + if (A.equalsIgnoreCase(identifier2, _s3_)) { + _this.expectWhitespace$0(); + type = identifier1; + modifier = _null; + } else { + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) + _this.expectWhitespace$0(); + else + return A.CssMediaQuery$type(identifier2, _null, identifier1); + type = identifier2; + modifier = identifier1; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + return A.CssMediaQuery$type(type, A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), modifier); + } + return A.CssMediaQuery$type(type, _this._mediaLogicSequence$1(_s3_), modifier); + }, + _mediaLogicSequence$1(operator) { + var t1, t2, _this = this, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.scanner; true;) { + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = _this.declarationValue$0(); + t1.expectChar$1(41); + result.push("(" + t2 + ")"); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return result; + _this.expectWhitespace$0(); + } + }, + _mediaInParens$0() { + var t2, + t1 = this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = this.declarationValue$0(); + t1.expectChar$1(41); + return "(" + t2 + ")"; + } + }; + A.MediaQueryParser_parse_closure.prototype = { + call$0() { + var queries = A._setArrayType([], type$.JSArray_CssMediaQuery), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + queries.push(t1._mediaQuery$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return queries; + }, + $signature: 468 + }; + A.Parser.prototype = { + _parseIdentifier$0() { + return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure(this)); + }, + _isVariableDeclarationLike$0() { + var _this = this, + t1 = _this.scanner; + if (!t1.scanChar$1(36)) + return false; + if (!_this.lookingAtIdentifier$0()) + return false; + _this.identifier$0(); + _this.whitespace$0(); + return t1.scanChar$1(58); + }, + whitespace$0() { + do + this.whitespaceWithoutComments$0(); + while (this.scanComment$0()); + }, + whitespaceWithoutComments$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + spaces$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + scanComment$0() { + var _0_0, + t1 = this.scanner; + if (t1.peekChar$0() !== 47) + return false; + _0_0 = t1.peekChar$1(1); + if (47 === _0_0) + return this.silentComment$0(); + if (42 === _0_0) { + this.loudComment$0(); + return true; + } + return false; + }, + expectWhitespace$0() { + var t2, t3, + t1 = this.scanner; + if (t1._string_scanner$_position !== t1.string.length) { + t2 = t1.peekChar$0(); + t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); + t2 = t3; + } else + t2 = true; + if (t2) + t1.error$1(0, "Expected whitespace."); + this.whitespace$0(); + }, + silentComment$0() { + var t2, t3, + t1 = this.scanner; + t1.expect$1("//"); + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + return true; + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + if (t1.readChar$0() !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + identifier$2$normalize$unit(normalize, unit) { + var t2, _0_0, _this = this, + _s20_ = "Expected identifier.", + text = new A.StringBuffer(""), + t1 = _this.scanner; + if (t1.scanChar$1(45)) { + t2 = text._contents = "" + A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + text._contents = t2 + A.Primitives_stringFromCharCode(45); + _this._identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + } else + t2 = ""; + $label0$0: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s20_); + if (95 === _0_0 && normalize) { + t1.readChar$0(); + text._contents = t2 + A.Primitives_stringFromCharCode(45); + break $label0$0; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128) { + text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + if (92 === _0_0) { + text._contents = t2 + _this.escape$1$identifierStart(true); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + identifier$0() { + return this.identifier$2$normalize$unit(false, false); + }, + identifier$1$normalize(normalize) { + return this.identifier$2$normalize$unit(normalize, false); + }, + identifier$1$unit(unit) { + return this.identifier$2$normalize$unit(false, unit); + }, + _identifierBody$3$normalize$unit(text, normalize, unit) { + var t1, _1_0, _0_0, t2; + for (t1 = this.scanner; true;) { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + break; + if (45 === _1_0 && unit) { + _0_0 = t1.peekChar$1(1); + if (46 !== _0_0) + t2 = A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57; + else + t2 = true; + if (t2) + break; + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (95 === _1_0 && normalize) { + t1.readChar$0(); + t2 = A.Primitives_stringFromCharCode(45); + text._contents += t2; + continue; + } + if (_1_0 !== 95) { + if (!(_1_0 >= 97 && _1_0 <= 122)) + t2 = _1_0 >= 65 && _1_0 <= 90; + else + t2 = true; + t2 = t2 || _1_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _1_0 >= 48 && _1_0 <= 57 || _1_0 === 45; + else + t2 = true; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (92 === _1_0) { + t2 = this.escape$0(); + text._contents += t2; + continue; + } + break; + } + }, + _identifierBody$1(text) { + return this._identifierBody$3$normalize$unit(text, false, false); + }, + string$0() { + var buffer, _0_0, t2, + t1 = this.scanner, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); + buffer = new A.StringBuffer(""); + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 === quote) { + t1.readChar$0(); + break; + } + if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _0_0) { + t2 = t1.peekChar$1(1); + if (t2 === 10 || t2 === 13 || t2 === 12) { + t1.readChar$0(); + t1.readChar$0(); + } else { + t2 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); + buffer._contents += t2; + } + continue; + } + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$1$allowEmpty(allowEmpty) { + var t1, t2, wroteNewline, next, wroteNewline0, t3, start, end, _0_0, _this = this, + buffer = new A.StringBuffer(""), + brackets = A._setArrayType([], type$.JSArray_int); + for (t1 = _this.scanner, t2 = _this.get$string(), wroteNewline = false; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + wroteNewline0 = false; + if (92 === next) { + t3 = _this.escape$1$identifierStart(true); + buffer._contents += t3; + wroteNewline = wroteNewline0; + continue; + } + if (34 === next || 39 === next) { + start = t1._string_scanner$_position; + t2.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + wroteNewline = wroteNewline0; + continue; + } + if (47 === next) { + if (t1.peekChar$1(1) === 42) { + t3 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t3.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + } else { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + } + wroteNewline = wroteNewline0; + continue; + } + if (32 === next || 9 === next) { + if (!wroteNewline) { + t3 = t1.peekChar$1(1); + t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = true; + if (t3) { + t3 = A.Primitives_stringFromCharCode(32); + buffer._contents += t3; + } + t1.readChar$0(); + continue; + } + if (10 === next || 13 === next || 12 === next) { + t3 = t1.peekChar$1(-1); + if (!(t3 === 10 || t3 === 13 || t3 === 12)) + buffer._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + continue; + } + if (40 === next || 123 === next || 91 === next) { + t3 = A.Primitives_stringFromCharCode(next); + buffer._contents += t3; + brackets.push(A.opposite(t1.readChar$0())); + wroteNewline = wroteNewline0; + continue; + } + if (41 === next || 125 === next || 93 === next) { + if (brackets.length === 0) + break; + t3 = A.Primitives_stringFromCharCode(next); + buffer._contents += t3; + t1.expectChar$1(brackets.pop()); + wroteNewline = wroteNewline0; + continue; + } + if (59 === next) { + if (brackets.length === 0) + break; + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + continue; + } + if (117 === next || 85 === next) { + _0_0 = _this.tryUrl$0(); + if (_0_0 != null) + buffer._contents += _0_0; + else { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + } + wroteNewline = wroteNewline0; + continue; + } + if (_this.lookingAtIdentifier$0()) { + t3 = _this.identifier$0(); + buffer._contents += t3; + } else { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + } + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._contents.length === 0) + t1.error$1(0, "Expected token."); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$0() { + return this.declarationValue$1$allowEmpty(false); + }, + tryUrl$0() { + var buffer, _0_0, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this.scanIdentifier$1("url")) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + _this.whitespace$0(); + buffer = new A.StringBuffer(""); + buffer._contents = "" + "url("; + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + break; + if (92 === _0_0) { + t2 = _this.escape$0(); + buffer._contents += t2; + continue; + } + t2 = true; + if (37 !== _0_0) + if (38 !== _0_0) + if (35 !== _0_0) + t2 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + continue; + } + if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { + _this.whitespace$0(); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2 = buffer._contents += t2; + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + break; + } + t1.set$state(start); + return null; + }, + variableName$0() { + this.scanner.expectChar$1(36); + return this.identifier$1$normalize(true); + }, + escape$1$identifierStart(identifierStart) { + var value, _0_0, i, next, t2, exception, + _s25_ = "Expected escape sequence.", + t1 = this.scanner, + start = t1._string_scanner$_position; + t1.expectChar$1(92); + value = 0; + $label0$1: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s25_); + if (_0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, _s25_); + if (A.CharacterExtension_get_isHex(_0_0)) { + for (i = 0; i < 6; ++i) { + next = t1.peekChar$0(); + if (next != null) { + t2 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t2 = next >= 65 && next <= 70; + t2 = !t2; + } else + t2 = true; + if (t2) + break; + value *= 16; + value += A.asHex(t1.readChar$0()); + } + this.scanCharIf$1(new A.Parser_escape_closure()); + break $label0$1; + } + value = t1.readChar$0(); + } + if (identifierStart) { + t2 = value; + t2 = t2 === 95 || A.CharacterExtension_get_isAlphabetic(t2) || t2 >= 128; + } else { + t2 = value; + if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic(t2) || t2 >= 128)) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + } + if (t2) + try { + t2 = A.Primitives_stringFromCharCode(value); + return t2; + } catch (exception) { + if (type$.RangeError._is(A.unwrapException(exception))) + t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); + else + throw exception; + } + else { + t1 = true; + if (!(value <= 31)) + if (!J.$eq$(value, 127)) + if (identifierStart) { + t1 = value; + t1 = t1 >= 48 && t1 <= 57; + } else + t1 = false; + if (t1) { + t1 = "" + A.Primitives_stringFromCharCode(92); + if (value > 15) + t1 += A.Primitives_stringFromCharCode(A.hexCharFor(B.JSNumber_methods._shrOtherPositive$1(value, 4))); + t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor(value & 15)) + A.Primitives_stringFromCharCode(32); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else + return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); + } + }, + escape$0() { + return this.escape$1$identifierStart(false); + }, + scanCharIf$1(condition) { + var t1 = this.scanner; + if (!condition.call$1(t1.peekChar$0())) + return false; + t1.readChar$0(); + return true; + }, + scanIdentChar$2$caseSensitive(char, caseSensitive) { + var t3, + t1 = new A.Parser_scanIdentChar_matches(caseSensitive, char), + t2 = this.scanner, + _0_0 = t2.peekChar$0(); + if (_0_0 != null) { + t3 = t1.call$1(_0_0); + t3 = t3; + } else + t3 = false; + if (t3) { + t2.readChar$0(); + return true; + } + if (92 === _0_0) { + t3 = t2._string_scanner$_position; + if (t1.call$1(A.consumeEscapedCharacter(t2))) + return true; + t2.set$state(new A._SpanScannerState(t2, t3)); + } + return false; + }, + scanIdentChar$1(char) { + return this.scanIdentChar$2$caseSensitive(char, false); + }, + expectIdentChar$1(letter) { + var t1; + if (this.scanIdentChar$2$caseSensitive(letter, false)) + return; + t1 = this.scanner; + t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); + }, + lookingAtIdentifier$1($forward) { + var t1, _1_0, t2, _0_0; + if ($forward == null) + $forward = 0; + t1 = this.scanner; + _1_0 = t1.peekChar$1($forward); + $label0$0: { + if (A._isInt(_1_0)) + t2 = _1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128; + else + t2 = false; + if (t2 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1($forward + 1); + $label1$1: { + if (A._isInt(_0_0)) + t1 = _0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128; + else + t1 = false; + t1 = t1 || 92 === _0_0 || 45 === _0_0; + if (t1) + break $label1$1; + break $label1$1; + } + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + lookingAtIdentifier$0() { + return this.lookingAtIdentifier$1(null); + }, + lookingAtIdentifierBody$0() { + var t1, + next = this.scanner.peekChar$0(); + if (next != null) { + if (!(next === 95 || A.CharacterExtension_get_isAlphabetic(next) || next >= 128)) + t1 = next >= 48 && next <= 57 || next === 45; + else + t1 = true; + t1 = t1 || next === 92; + } else + t1 = false; + return t1; + }, + scanIdentifier$2$caseSensitive(text, caseSensitive) { + var t1, t2, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + if (_this._consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) + return true; + else { + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + } + }, + scanIdentifier$1(text) { + return this.scanIdentifier$2$caseSensitive(text, false); + }, + _consumeIdentifier$2(text, caseSensitive) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) + return false; + } + return true; + }, + expectIdentifier$2$name(text, $name) { + var t1, start, t2, t3, t4, t5, t6; + if ($name == null) + $name = '"' + text + '"'; + t1 = this.scanner; + start = t1._string_scanner$_position; + for (t2 = new A.CodeUnits(text), t3 = type$.CodeUnits, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = "Expected " + $name, t5 = t4 + ".", t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t6 = t2.__internal$_current; + if (this.scanIdentChar$2$caseSensitive(t6 == null ? t3._as(t6) : t6, false)) + continue; + t1.error$2$position(0, t5, start); + } + if (!this.lookingAtIdentifierBody$0()) + return; + t1.error$2$position(0, t4, start); + }, + expectIdentifier$1(text) { + return this.expectIdentifier$2$name(text, null); + }, + rawText$1(consumer) { + var t1 = this.scanner, + start = t1._string_scanner$_position; + consumer.call$0(); + return t1.substring$1(0, start); + }, + spanFrom$1(state) { + var span = this.scanner.spanFrom$1(state); + return this._interpolationMap == null ? span : new A.LazyFileSpan(new A.Parser_spanFrom_closure(this, span)); + }, + error$3(_, message, span, trace) { + var exception = new A.StringScannerException(this.scanner.string, message, span); + if (trace == null) + throw A.wrapException(exception); + else + A.throwWithTrace(exception, this.get$error(this), trace); + }, + error$2(_, message, span) { + return this.error$3(0, message, span, null); + }, + withErrorMessage$1$2(message, callback) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = J.get$span$z(error); + A.throwWithTrace(new A.SourceSpanFormatException(error.get$source(), message, t1), error, stackTrace); + } else + throw exception; + } + }, + withErrorMessage$2(message, callback) { + return this.withErrorMessage$1$2(message, callback, type$.dynamic); + }, + wrapSpanFormatException$1$1(callback) { + var error, stackTrace, map, error0, stackTrace0, span, error1, stackTrace1, span0, secondarySpans, t1, t2, span1, description, _0_0, t3, exception, t4, _this = this, + _s8_ = "expected"; + try { + try { + t3 = callback.call$0(); + return t3; + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t3)) { + error = t3; + stackTrace = A.getTraceFromException(exception); + map = _this._interpolationMap; + if (map == null) + throw exception; + A.throwWithTrace(map.mapException$1(error), error, stackTrace); + } else + throw exception; + } + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t3)) { + error0 = t3; + stackTrace0 = A.getTraceFromException(exception); + span = J.get$span$z(error0); + if (A.startsWithIgnoreCase(error0._span_exception$_message, _s8_)) + span = _this._adjustExceptionSpan$1(span); + t1 = error0._span_exception$_message; + t2 = span; + A.throwWithTrace(new A.SassFormatException(B.Set_empty, t1, t2), error0, stackTrace0); + } else if (type$.MultiSourceSpanFormatException._is(t3)) { + error1 = t3; + stackTrace1 = A.getTraceFromException(exception); + span0 = J.get$span$z(error1); + t3 = type$.FileSpan; + t4 = type$.String; + secondarySpans = error1.get$secondarySpans().cast$2$0(0, t3, t4); + if (A.startsWithIgnoreCase(error1._span_exception$_message, _s8_)) { + span0 = _this._adjustExceptionSpan$1(span0); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + for (t3 = A.MapExtensions_get_pairs(secondarySpans, t3, t4), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t2 = t3.get$current(t3); + span1 = null; + description = null; + _0_0 = t2; + span1 = _0_0._0; + description = _0_0._1; + J.$indexSet$ax(t1, _this._adjustExceptionSpan$1(span1), description); + } + secondarySpans = t1; + } + A.throwWithTrace(A.MultiSpanSassFormatException$(error1._span_exception$_message, span0, error1.get$primaryLabel(), secondarySpans, null), error1, stackTrace1); + } else + throw exception; + } + }, + wrapSpanFormatException$1(callback) { + return this.wrapSpanFormatException$1$1(callback, type$.dynamic); + }, + _adjustExceptionSpan$1(span) { + var start, t1; + if (span.get$length(span) > 0) + return span; + start = this._firstNewlineBefore$1(span.get$start(span)); + if (start.$eq(0, span.get$start(span))) + t1 = span; + else { + t1 = start.offset; + t1 = A._FileSpan$(start.file, t1, t1); + } + return t1; + }, + _firstNewlineBefore$1($location) { + var lastNewline, codeUnit, + t1 = $location.file, + t2 = $location.offset, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, 0, t2), 0, null), + index = t2 - 1; + for (lastNewline = null; index >= 0;) { + codeUnit = text.charCodeAt(index); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) { + if (lastNewline == null) + t1 = $location; + else { + t2 = new A.FileLocation(t1, lastNewline); + t2.FileLocation$_$2(t1, lastNewline); + t1 = t2; + } + return t1; + } + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) + lastNewline = index; + --index; + } + return $location; + } + }; + A.Parser__parseIdentifier_closure.prototype = { + call$0() { + var t1 = this.$this, + result = t1.identifier$0(); + t1.scanner.expectDone$0(); + return result; + }, + $signature: 29 + }; + A.Parser_escape_closure.prototype = { + call$1(char) { + return char === 32 || char === 9 || char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A.Parser_scanIdentChar_matches.prototype = { + call$1(actual) { + var t1 = this.char; + return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase(t1, actual); + }, + $signature: 50 + }; + A.Parser_spanFrom_closure.prototype = { + call$0() { + return this.$this._interpolationMap.mapSpan$1(this.span); + }, + $signature: 30 + }; + A.SassParser.prototype = { + get$currentIndentation() { + return this._currentIndentation; + }, + get$indented() { + return true; + }, + styleRuleSelector$0() { + var t4, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + do { + buffer.addInterpolation$1(this.almostAnyValue$1$omitComments(true)); + t4 = A.Primitives_stringFromCharCode(10); + t4 = t3._contents += t4; + } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && this.scanCharIf$1(new A.SassParser_styleRuleSelector_closure())); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + expectStatementSeparator$1($name) { + var t1, _this = this; + if (!_this.atEndOfStatement$0()) + _this._expectNewline$0(); + if (_this._peekIndentation$0() <= _this._currentIndentation) + return; + t1 = $name == null ? "here" : "beneath a " + $name; + _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._nextIndentationEnd.position); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var t1 = this.scanner.peekChar$0(); + if (t1 == null) + t1 = null; + else + t1 = t1 === 10 || t1 === 13 || t1 === 12; + return t1 !== false; + }, + lookingAtChildren$0() { + return this.atEndOfStatement$0() && this._peekIndentation$0() > this._currentIndentation; + }, + importArgument$0() { + var url, span, innerError, stackTrace, t1, _0_0, start, next, t2, exception, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("url")) + if (t1.scanChar$1(40)) { + t1.set$state(start); + return _this.super$StylesheetParser$importArgument(); + } else + t1.set$state(start); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) + return _this.super$StylesheetParser$importArgument(); + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + next = t1.peekChar$0(); + while (true) { + t2 = false; + if (next != null) + if (next !== 44) + if (next !== 59) + t2 = !(next === 10 || next === 13 || next === 12); + if (!t2) + break; + t1.readChar$0(); + next = t1.peekChar$0(); + } + url = t1.substring$1(0, start.position); + span = t1.spanFrom$1(start); + if (_this.isPlainImportUrl$1(url)) + return new A.StaticImport(A.Interpolation$(A._setArrayType([A.serializeValue(new A.SassString(url, true), true, true)], type$.JSArray_Object), span), null, span); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport(t1, span); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); + } else + throw exception; + } + }, + scanElse$1(ifIndentation) { + var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; + if (_this._peekIndentation$0() !== ifIndentation) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + startIndentation = _this._currentIndentation; + startNextIndentation = _this._nextIndentation; + startNextIndentationEnd = _this._nextIndentationEnd; + _this._readIndentation$0(); + if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) + return true; + t1.set$state(new A._SpanScannerState(t1, t2)); + _this._currentIndentation = startIndentation; + _this._nextIndentation = startNextIndentation; + _this._nextIndentationEnd = startNextIndentationEnd; + return false; + }, + children$1(_, child) { + var children = A._setArrayType([], type$.JSArray_Statement); + this._whileIndentedLower$1(new A.SassParser_children_closure(this, child, children)); + return children; + }, + statements$1(statement) { + var statements, t2, _1_0, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (9 === _0_0 || 32 === _0_0) + t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); + statements = A._setArrayType([], type$.JSArray_Statement); + for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + _1_0 = this._child$1(statement); + if (_1_0 != null) + statements.push(_1_0); + this._readIndentation$0(); + } + return statements; + }, + _child$1(child) { + var _0_0, _this = this, + t1 = _this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + if (13 === _1_0 || 10 === _1_0 || 12 === _1_0) { + t1 = null; + break $label0$0; + } + if (36 === _1_0) { + t1 = _this.variableDeclarationWithoutNamespace$0(); + break $label0$0; + } + if (47 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (47 === _0_0) { + t1 = _this._silentComment$0(); + break $label1$1; + } + if (42 === _0_0) { + t1 = _this._loudComment$0(); + break $label1$1; + } + t1 = child.call$0(); + break $label1$1; + } + break $label0$0; + } + t1 = child.call$0(); + break $label0$0; + } + return t1; + }, + _silentComment$0() { + var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("//"); + buffer = new A.StringBuffer(""); + parentIndentation = _this._currentIndentation; + t3 = t1.string.length; + t4 = 1 + parentIndentation; + t5 = 2 + parentIndentation; + $label0$0: + do { + commentPrefix = t1.scanChar$1(47) ? "///" : "//"; + for (i = commentPrefix.length; true;) { + t6 = buffer._contents += commentPrefix; + for (i0 = i; i0 < _this._currentIndentation - parentIndentation; ++i0) { + t6 += A.Primitives_stringFromCharCode(32); + buffer._contents = t6; + } + while (true) { + if (t1._string_scanner$_position !== t3) { + t7 = t1.peekChar$0(); + t7 = !(t7 === 10 || t7 === 13 || t7 === 12); + } else + t7 = false; + if (!t7) + break; + t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents = t6; + } + buffer._contents = t6 + "\n"; + if (_this._peekIndentation$0() < parentIndentation) + break $label0$0; + if (_this._peekIndentation$0() === parentIndentation) { + if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) + _this._readIndentation$0(); + break; + } + _this._readIndentation$0(); + } + } while (t1.scan$1("//")); + t3 = buffer._contents; + return _this.lastSilentComment = new A.SilentComment(t3.charCodeAt(0) == 0 ? t3 : t3, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _loudComment$0() { + var t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _0_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t3._contents = "" + "/*"; + parentIndentation = _this._currentIndentation; + for (t5 = t1.string, t6 = t5.length, first = true; true; first = false) { + if (first) { + beginningOfComment = t1._string_scanner$_position; + _this.spaces$0(); + t7 = t1.peekChar$0(); + if (t7 === 10 || t7 === 13 || t7 === 12) { + _this._readIndentation$0(); + t7 = A.Primitives_stringFromCharCode(32); + t3._contents += t7; + } else { + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); + } + } else { + t7 = t3._contents += "\n"; + t3._contents = t7 + " * "; + } + for (i = 3; i < _this._currentIndentation - parentIndentation; ++i) { + t7 = A.Primitives_stringFromCharCode(32); + t3._contents += t7; + } + for (; t1._string_scanner$_position !== t6;) { + _0_0 = t1.peekChar$0(); + if (10 === _0_0 || 13 === _0_0 || 12 === _0_0) + break; + if (35 === _0_0) { + if (t1.peekChar$1(1) === 123) { + t7 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t7); + } else { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + continue; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + if (_this._peekIndentation$0() <= parentIndentation) + break; + for (; _this._lookingAtDoubleNewline$0();) { + _this._expectNewline$0(); + t7 = t3._contents += "\n"; + t3._contents = t7 + " *"; + } + _this._readIndentation$0(); + } + return new A.LoudComment(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); + }, + whitespaceWithoutComments$0() { + var t1, t2, next; + for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + if (next !== 9 && next !== 32) + break; + t1.readChar$0(); + } + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + next = t1.readChar$0(); + if (next === 10 || next === 13 || next === 12) + t1.error$1(0, "expected */."); + if (next !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + _expectNewline$0() { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (59 === _0_0) + t1.error$1(0, string$.semico); + if (13 === _0_0) { + t1.readChar$0(); + if (t1.peekChar$0() === 10) + t1.readChar$0(); + return; + } + if (10 === _0_0 || 12 === _0_0) { + t1.readChar$0(); + return; + } + t1.error$1(0, "expected newline."); + }, + _lookingAtDoubleNewline$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label1$1: { + t2 = false; + if (13 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label0$0: { + if (10 === _0_0) { + t1 = t1.peekChar$1(2); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label0$0; + } + if (13 === _0_0 || 12 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + break $label1$1; + } + if (10 === _1_0 || 12 === _1_0) { + t1 = t1.peekChar$1(1); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + return t1; + }, + _whileIndentedLower$1(body) { + var t1, t2, childIndentation, indentation, t3, t4, _this = this, + parentIndentation = _this._currentIndentation; + for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._peekIndentation$0() > parentIndentation;) { + indentation = _this._readIndentation$0(); + if (childIndentation == null) + childIndentation = indentation; + if (childIndentation !== indentation) { + t3 = t1._string_scanner$_position; + t4 = t2.getColumn$1(t3); + t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); + } + body.call$0(); + } + }, + _readIndentation$0() { + var t1, _this = this, + currentIndentation = _this._nextIndentation; + if (currentIndentation == null) + currentIndentation = _this._nextIndentation = _this._peekIndentation$0(); + _this._currentIndentation = currentIndentation; + t1 = _this._nextIndentationEnd; + t1.toString; + _this.scanner.set$state(t1); + _this._nextIndentationEnd = _this._nextIndentation = null; + return currentIndentation; + }, + _peekIndentation$0() { + var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, _1_0, t4, _this = this, + _0_0 = _this._nextIndentation; + if (_0_0 != null) + return _0_0; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = t1.string.length; + if (t2 === t3) { + _this._nextIndentation = 0; + _this._nextIndentationEnd = new A._SpanScannerState(t1, t2); + return 0; + } + start = new A._SpanScannerState(t1, t2); + if (!_this.scanCharIf$1(new A.SassParser__peekIndentation_closure())) + t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); + containsTab = A._Cell$(); + containsSpace = A._Cell$(); + nextIndentation = A._Cell$(); + do { + containsSpace.__late_helper$_value = containsTab.__late_helper$_value = false; + nextIndentation.__late_helper$_value = 0; + for (; true;) { + $label0$0: { + _1_0 = t1.peekChar$0(); + if (32 === _1_0) { + containsSpace.__late_helper$_value = true; + break $label0$0; + } + if (9 === _1_0) { + containsTab.__late_helper$_value = true; + break $label0$0; + } + break; + } + t2 = nextIndentation.__late_helper$_value; + if (t2 === nextIndentation) + A.throwExpression(A.LateError$localNI("")); + nextIndentation.__late_helper$_value = t2 + 1; + t1.readChar$0(); + } + t2 = t1._string_scanner$_position; + if (t2 === t3) { + _this._nextIndentation = 0; + _this._nextIndentationEnd = new A._SpanScannerState(t1, t2); + t1.set$state(start); + return 0; + } + } while (_this.scanCharIf$1(new A.SassParser__peekIndentation_closure0())); + t2 = containsTab._readLocal$0(); + t3 = containsSpace._readLocal$0(); + if (t2) { + if (t3) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } else if (_this._spaces === true) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + } else if (t3 && _this._spaces === false) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + _this._nextIndentation = nextIndentation._readLocal$0(); + if (nextIndentation._readLocal$0() > 0) + if (_this._spaces == null) + _this._spaces = containsSpace._readLocal$0(); + _this._nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.set$state(start); + return nextIndentation._readLocal$0(); + } + }; + A.SassParser_styleRuleSelector_closure.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A.SassParser_children_closure.prototype = { + call$0() { + var _0_0 = this.$this._child$1(this.child); + if (_0_0 != null) + this.children.push(_0_0); + }, + $signature: 0 + }; + A.SassParser__peekIndentation_closure.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A.SassParser__peekIndentation_closure0.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A.ScssParser.prototype = { + get$indented() { + return false; + }, + get$currentIndentation() { + return 0; + }, + styleRuleSelector$0() { + return this.almostAnyValue$0(); + }, + expectStatementSeparator$1($name) { + var t1, _0_0; + this.whitespaceWithoutComments$0(); + t1 = this.scanner; + if (t1._string_scanner$_position === t1.string.length) + return; + _0_0 = t1.peekChar$0(); + if (59 === _0_0 || 125 === _0_0) + return; + t1.expectChar$1(59); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 59 || next === 125 || next === 123; + }, + lookingAtChildren$0() { + return this.scanner.peekChar$0() === 123; + }, + scanElse$1(ifIndentation) { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + _this.whitespace$0(); + t3 = t1._string_scanner$_position; + if (t1.scanChar$1(64)) { + if (_this.scanIdentifier$2$caseSensitive("else", true)) + return true; + if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { + A.WarnForDeprecation_warnForDeprecation(_this.logger, B.Deprecation_EJz, string$.x40elsei, t1.spanFrom$1(new A._SpanScannerState(t1, t3)), null); + t1.set$position(t1._string_scanner$_position - 2); + return true; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + }, + children$1(_, child) { + var children, _this = this, + t1 = _this.scanner; + t1.expectChar$1(123); + _this.whitespaceWithoutComments$0(); + children = A._setArrayType([], type$.JSArray_Statement); + for (; true;) + switch (t1.peekChar$0()) { + case 36: + children.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + children.push(_this._scss$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + children.push(_this._scss$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + children.push(child.call$0()); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + case 125: + t1.expectChar$1(125); + return children; + default: + children.push(child.call$0()); + } + }, + statements$1(statement) { + var t1, t2, _0_0, _1_0, _this = this, + statements = A._setArrayType([], type$.JSArray_Statement); + _this.whitespaceWithoutComments$0(); + for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) + switch (t1.peekChar$0()) { + case 36: + statements.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + statements.push(_this._scss$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + statements.push(_this._scss$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + _0_0 = statement.call$0(); + if (_0_0 != null) + statements.push(_0_0); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + default: + _1_0 = statement.call$0(); + if (_1_0 != null) + statements.push(_1_0); + } + return statements; + }, + _scss$_silentComment$0() { + var t2, t3, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expect$1("//"); + t2 = t1.string.length; + do { + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.readChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + } + if (t1._string_scanner$_position === t2) + break; + _this.spaces$0(); + } while (t1.scan$1("//")); + if (_this.get$plainCss()) + _this.error$2(0, string$.Silent, t1.spanFrom$1(start)); + return _this.lastSilentComment = new A.SilentComment(t1.substring$1(0, start.position), t1.spanFrom$1(start)); + }, + _scss$_loudComment$0() { + var t3, t4, buffer, t5, endPosition, t6, result, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t3._contents = "" + "/*"; + $label0$1: + for (; true;) + switch (t1.peekChar$0()) { + case 35: + if (t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t5); + } else { + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + } + break; + case 42: + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + if (t1.peekChar$0() !== 47) + continue $label0$1; + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._SpanScannerState(t1, t2).position; + t1 = new A._FileSpan(t5, t6, endPosition); + t1._FileSpan$3(t5, t6, endPosition); + t6 = type$.Object; + t5 = A.List_List$of(t4, true, t6); + t2 = t3._contents; + if (t2.length !== 0) + t5.push(t2.charCodeAt(0) == 0 ? t2 : t2); + result = A.List_List$from(t5, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation(result, t1); + t2.Interpolation$2(t5, t1); + return new A.LoudComment(t2); + case 13: + t1.readChar$0(); + if (t1.peekChar$0() !== 10) { + t5 = A.Primitives_stringFromCharCode(10); + t3._contents += t5; + } + break; + case 12: + t1.readChar$0(); + t5 = A.Primitives_stringFromCharCode(10); + t3._contents += t5; + break; + default: + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + } + } + }; + A.SelectorParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure(this)); + }, + parseCompoundSelector$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure(this)); + }, + _selectorList$0() { + var t4, t5, lineBreak, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = t1._sourceFile, + previousLine = t3.getLine$1(t2), + components = A._setArrayType([_this._complexSelector$0()], type$.JSArray_ComplexSelector); + _this.whitespace$0(); + for (t4 = t1.string.length; t1.scanChar$1(44);) { + _this.whitespace$0(); + if (t1.peekChar$0() === 44) + continue; + t5 = t1._string_scanner$_position; + if (t5 === t4) + break; + lineBreak = t3.getLine$1(t5) !== previousLine; + if (lineBreak) + previousLine = t3.getLine$1(t1._string_scanner$_position); + components.push(_this._complexSelector$1$lineBreak(lineBreak)); + } + return A.SelectorList$(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _complexSelector$1$lineBreak(lineBreak) { + var t4, lastCompound, initialCombinators, _0_0, t5, result, _this = this, + _s18_ = "expected selector.", + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + componentStart = new A._SpanScannerState(t1, t2), + t3 = type$.JSArray_CssValue_Combinator, + combinators = A._setArrayType([], t3), + components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); + for (t4 = type$.CssValue_Combinator, lastCompound = null, initialCombinators = null; true;) { + _this.whitespace$0(); + _0_0 = t1.peekChar$0(); + if (43 === _0_0) { + t5 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue(B.Combinator_gRV, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); + continue; + } + if (62 === _0_0) { + t5 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue(B.Combinator_8I8, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); + continue; + } + if (126 === _0_0) { + t5 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue(B.Combinator_y18, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); + continue; + } + if (_0_0 == null) + break; + t5 = true; + if (91 !== _0_0) + if (46 !== _0_0) + if (35 !== _0_0) + if (37 !== _0_0) + if (58 !== _0_0) + if (38 !== _0_0) + if (42 !== _0_0) + if (124 !== _0_0) + t5 = _this.lookingAtIdentifier$0(); + if (t5) { + if (lastCompound != null) { + t5 = _this.spanFrom$1(componentStart); + result = A.List_List$from(combinators, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + components.push(new A.ComplexSelectorComponent(lastCompound, result, t5)); + } else if (combinators.length !== 0) { + componentStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + initialCombinators = combinators; + } + lastCompound = _this._compoundSelector$0(); + combinators = A._setArrayType([], t3); + if (t1.peekChar$0() === 38) + t1.error$1(0, string$.x22x26__ma); + continue; + } + break; + } + t3 = combinators.length !== 0; + if (t3 && _this._plainCss) + t1.error$1(0, _s18_); + else if (lastCompound != null) { + t3 = _this.spanFrom$1(componentStart); + components.push(new A.ComplexSelectorComponent(lastCompound, A.List_List$unmodifiable(combinators, t4), t3)); + } else if (t3) + initialCombinators = combinators; + else + t1.error$1(0, _s18_); + t3 = initialCombinators == null ? B.List_empty0 : initialCombinators; + return A.ComplexSelector$(t3, components, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), lineBreak); + }, + _complexSelector$0() { + return this._complexSelector$1$lineBreak(false); + }, + _compoundSelector$0() { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + components = A._setArrayType([_this._simpleSelector$0()], type$.JSArray_SimpleSelector); + for (t3 = _this._plainCss; _this._isSimpleSelectorStart$1(t1.peekChar$0());) + components.push(_this._simpleSelector$1$allowParent(t3)); + return A.CompoundSelector$(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _simpleSelector$1$allowParent(allowParent) { + var t2, $name, text, t3, suffix, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (allowParent == null) + allowParent = _this._allowParent; + switch (t1.peekChar$0()) { + case 91: + return _this._attributeSelector$0(); + case 46: + t2 = t1._string_scanner$_position; + t1.expectChar$1(46); + return new A.ClassSelector(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 35: + t2 = t1._string_scanner$_position; + t1.expectChar$1(35); + return new A.IDSelector(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 37: + t2 = t1._string_scanner$_position; + t1.expectChar$1(37); + $name = _this.identifier$0(); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this._plainCss) + _this.error$2(0, string$.Placeh, t1.spanFrom$1(start)); + return new A.PlaceholderSelector($name, t2); + case 58: + return _this._pseudoSelector$0(); + case 38: + t2 = t1._string_scanner$_position; + t1.expectChar$1(38); + if (_this.lookingAtIdentifierBody$0()) { + text = new A.StringBuffer(""); + _this._identifierBody$1(text); + if (text._contents.length === 0) + t1.error$1(0, "Expected identifier body."); + t3 = text._contents; + suffix = t3.charCodeAt(0) == 0 ? t3 : t3; + } else + suffix = null; + if (_this._plainCss && suffix != null) + t1.error$3$length$position(0, string$.Parent, t1._string_scanner$_position - t2, t2); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (!allowParent) + _this.error$2(0, "Parent selectors aren't allowed here.", t1.spanFrom$1(start)); + return new A.ParentSelector(suffix, t2); + default: + return _this._typeOrUniversalSelector$0(); + } + }, + _simpleSelector$0() { + return this._simpleSelector$1$allowParent(null); + }, + _attributeSelector$0() { + var $name, operator, next, value, modifier, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(91); + _this.whitespace$0(); + $name = _this._attributeName$0(); + _this.whitespace$0(); + if (t1.scanChar$1(93)) + return new A.AttributeSelector($name, _null, _null, _null, _this.spanFrom$1(start)); + operator = _this._attributeOperator$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + modifier = next != null && A.CharacterExtension_get_isAlphabetic(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; + t1.expectChar$1(93); + return new A.AttributeSelector($name, operator, value, modifier, _this.spanFrom$1(start)); + }, + _attributeName$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner; + if (t1.scanChar$1(42)) { + t1.expectChar$1(124); + return new A.QualifiedName(_this.identifier$0(), "*"); + } + if (t1.scanChar$1(124)) + return new A.QualifiedName(_this.identifier$0(), ""); + nameOrNamespace = _this.identifier$0(); + if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) + return new A.QualifiedName(nameOrNamespace, null); + t1.readChar$0(); + return new A.QualifiedName(_this.identifier$0(), nameOrNamespace); + }, + _attributeOperator$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + switch (t1.readChar$0()) { + case 61: + return B.AttributeOperator_4QF; + case 126: + t1.expectChar$1(61); + return B.AttributeOperator_yT8; + case 124: + t1.expectChar$1(61); + return B.AttributeOperator_jqB; + case 94: + t1.expectChar$1(61); + return B.AttributeOperator_cMb; + case 36: + t1.expectChar$1(61); + return B.AttributeOperator_qhE; + case 42: + t1.expectChar$1(61); + return B.AttributeOperator_61T; + default: + t1.error$2$position(0, 'Expected "]".', t2); + } + }, + _pseudoSelector$0() { + var element, $name, unvendored, argument, selector, t2, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(58); + element = t1.scanChar$1(58); + $name = _this.identifier$0(); + if (!t1.scanChar$1(40)) + return A.PseudoSelector$($name, _this.spanFrom$1(start), _null, element, _null); + _this.whitespace$0(); + unvendored = A.unvendor($name); + argument = _null; + selector = _null; + if (element) + if ($._selectorPseudoElements.contains$1(0, unvendored)) + selector = _this._selectorList$0(); + else + argument = _this.declarationValue$1$allowEmpty(true); + else if ($._selectorPseudoClasses.contains$1(0, unvendored)) + selector = _this._selectorList$0(); + else if (unvendored === "nth-child" || unvendored === "nth-last-child") { + argument = _this._aNPlusB$0(); + _this.whitespace$0(); + t2 = t1.peekChar$1(-1); + if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { + _this.expectIdentifier$1("of"); + argument += " of"; + _this.whitespace$0(); + selector = _this._selectorList$0(); + } + } else + argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); + t1.expectChar$1(41); + return A.PseudoSelector$($name, _this.spanFrom$1(start), argument, element, selector); + }, + _aNPlusB$0() { + var t1, _0_0, t2, $self, next, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (101 === _0_0 || 69 === _0_0) { + _this.expectIdentifier$1("even"); + return "even"; + } + if (111 === _0_0 || 79 === _0_0) { + _this.expectIdentifier$1("odd"); + return "odd"; + } + if (43 === _0_0 || 45 === _0_0) { + t2 = "" + A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + t2 = ""; + } + $self = t1.peekChar$0(); + if ($self != null && $self >= 48 && $self <= 57) { + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + _this.whitespace$0(); + if (!_this.scanIdentChar$1(110)) + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + _this.expectIdentChar$1(110); + t2 += A.Primitives_stringFromCharCode(110); + _this.whitespace$0(); + next = t1.peekChar$0(); + if (next !== 43 && next !== 45) + return t2.charCodeAt(0) == 0 ? t2 : t2; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + _this.whitespace$0(); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected a number."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + _typeOrUniversalSelector$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.scanChar$1(42)) { + if (!t1.scanChar$1(124)) + return new A.UniversalSelector(null, _this.spanFrom$1(start)); + return t1.scanChar$1(42) ? new A.UniversalSelector("*", _this.spanFrom$1(start)) : new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), "*"), _this.spanFrom$1(start)); + } else if (t1.scanChar$1(124)) + return t1.scanChar$1(42) ? new A.UniversalSelector("", _this.spanFrom$1(start)) : new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), ""), _this.spanFrom$1(start)); + nameOrNamespace = _this.identifier$0(); + if (!t1.scanChar$1(124)) + return new A.TypeSelector(new A.QualifiedName(nameOrNamespace, null), _this.spanFrom$1(start)); + else if (t1.scanChar$1(42)) + return new A.UniversalSelector(nameOrNamespace, _this.spanFrom$1(start)); + else + return new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), nameOrNamespace), _this.spanFrom$1(start)); + }, + _isSimpleSelectorStart$1(character) { + var t1; + $label0$0: { + if (42 === character || 91 === character || 46 === character || 35 === character || 37 === character || 58 === character) { + t1 = true; + break $label0$0; + } + if (38 === character) { + t1 = this._plainCss; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + } + }; + A.SelectorParser_parse_closure.prototype = { + call$0() { + var t1 = this.$this, + selector = t1._selectorList$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return selector; + }, + $signature: 507 + }; + A.SelectorParser_parseCompoundSelector_closure.prototype = { + call$0() { + var t1 = this.$this, + compound = t1._compoundSelector$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return compound; + }, + $signature: 531 + }; + A.StylesheetParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure(this)); + }, + parseArgumentDeclaration$0() { + return this._parseSingleProduction$1$1(new A.StylesheetParser_parseArgumentDeclaration_closure(this), type$.ArgumentDeclaration); + }, + parseVariableDeclaration$0() { + return this._parseSingleProduction$1$1(new A.StylesheetParser_parseVariableDeclaration_closure(this), type$.VariableDeclaration); + }, + parseUseRule$0() { + return this._parseSingleProduction$1$1(new A.StylesheetParser_parseUseRule_closure(this), type$.UseRule); + }, + _parseSingleProduction$1$1(production, $T) { + return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure(this, production, $T)); + }, + _statement$1$root(root) { + var t2, _this = this, + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + if (64 === _0_0) + return _this.atRule$2$root(new A.StylesheetParser__statement_closure(_this), root); + if (43 === _0_0) { + if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) + return _this._styleRule$0(); + _this._isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + return _this._includeRule$1(new A._SpanScannerState(t1, t2)); + } + if (61 === _0_0) { + if (!_this.get$indented()) + return _this._styleRule$0(); + _this._isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$0(); + return _this._mixinRule$1(new A._SpanScannerState(t1, t2)); + } + if (125 === _0_0) + t1.error$2$length(0, 'unmatched "}".', 1); + return _this._inStyleRule || _this._stylesheet$_inUnknownAtRule || _this._stylesheet$_inMixin || _this._inContentBlock ? _this._declarationOrStyleRule$0() : _this._variableDeclarationOrStyleRule$0(); + }, + _statement$0() { + return this._statement$1$root(false); + }, + _variableDeclarationWithNamespace$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position, + namespace = this.identifier$0(); + t1.expectChar$1(46); + return this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); + }, + variableDeclarationWithoutNamespace$2(namespace, start_) { + var t1, start, $name, t2, value, flagStart, t3, guarded, global, _0_0, endPosition, t4, t5, t6, declaration, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + if (start_ == null) { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + } else + start = start_; + $name = _this.variableName$0(); + t1 = namespace != null; + if (t1) + _this._assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure(_this, start)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sassx20v, _this.scanner.spanFrom$1(start)); + _this.whitespace$0(); + t2 = _this.scanner; + t2.expectChar$1(58); + _this.whitespace$0(); + value = _this._expression$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + for (t3 = _this.logger, guarded = false, global = false; t2.scanChar$1(33);) { + $label0$0: { + _0_0 = _this.identifier$0(); + if ("default" === _0_0) { + if (guarded) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.WarnForDeprecation_warnForDeprecation(t3, B.Deprecation_zrt, string$.x21defau, t6, null); + } + guarded = true; + break $label0$0; + } + if ("global" === _0_0) { + if (t1) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + _this.error$2(0, string$.x21globai, t6); + } else if (global) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.WarnForDeprecation_warnForDeprecation(t3, B.Deprecation_zrt, string$.x21globas, t6, null); + } + global = true; + break $label0$0; + } + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + _this.error$2(0, "Invalid flag name.", t6); + } + _this.whitespace$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + } + _this.expectStatementSeparator$1("variable declaration"); + declaration = A.VariableDeclaration$($name, value, t2.spanFrom$1(start), precedingComment, global, guarded, namespace); + if (global) + _this._globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure0(declaration)); + return declaration; + }, + variableDeclarationWithoutNamespace$0() { + return this.variableDeclarationWithoutNamespace$2(null, null); + }, + _variableDeclarationOrStyleRule$0() { + var t1, t2, variableOrInterpolation, t3, _this = this; + if (_this.get$plainCss()) + return _this._styleRule$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._styleRule$0(); + if (!_this.lookingAtIdentifier$0()) + return _this._styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + t1 = variableOrInterpolation; + else { + t3 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t3.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); + t2 = _this._styleRule$2(t3, new A._SpanScannerState(t1, t2)); + t1 = t2; + } + return t1; + }, + _declarationOrStyleRule$0() { + var t1, t2, declarationOrBuffer, _this = this; + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + declarationOrBuffer = _this._declarationOrBuffer$0(); + return declarationOrBuffer instanceof A.Statement ? declarationOrBuffer : _this._styleRule$2(type$.InterpolationBuffer._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); + }, + _declarationOrBuffer$0() { + var midBuffer, couldBeSelector, beforeDeclaration, value, additional, t2, t3, variableOrInterpolation, t4, t5, $name, postColonWhitespace, _0_0, exception, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + nameBuffer = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)), + startsWithPunctuation = _this._lookingAtPotentialPropertyHack$0(); + if (startsWithPunctuation) { + t2 = t1.readChar$0(); + t3 = nameBuffer._interpolation_buffer$_text; + t2 = A.Primitives_stringFromCharCode(t2); + t3._contents += t2; + t2 = _this.rawText$1(_this.get$whitespace()); + t3 = nameBuffer._interpolation_buffer$_text; + t3._contents += t2; + } + if (!_this._lookingAtInterpolatedIdentifier$0()) + return nameBuffer; + variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + return variableOrInterpolation; + else + nameBuffer.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); + _this._isUseAllowed = false; + if (t1.matches$1("/*")) { + t2 = _this.rawText$1(_this.get$loudComment()); + t3 = nameBuffer._interpolation_buffer$_text; + t3._contents += t2; + } + midBuffer = new A.StringBuffer(""); + t2 = midBuffer; + t3 = _this.get$whitespace(); + t4 = _this.rawText$1(t3); + t2._contents += t4; + t4 = t1._string_scanner$_position; + if (!t1.scanChar$1(58)) { + if (midBuffer._contents.length !== 0) { + t1 = nameBuffer._interpolation_buffer$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + } + return nameBuffer; + } + t2 = midBuffer; + t5 = A.Primitives_stringFromCharCode(58); + t2._contents += t5; + $name = nameBuffer.interpolation$1(t1.spanFrom$2(start, new A._SpanScannerState(t1, t4))); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) { + t2 = _this._interpolatedDeclarationValue$1$silentComments(false); + _this.expectStatementSeparator$1("custom property"); + return A.Declaration$($name, new A.StringExpression(t2, false), t1.spanFrom$1(start)); + } + if (t1.scanChar$1(58)) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer$_text; + t3 = A.S(midBuffer); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(58); + t2._contents += t3; + return t1; + } else if (_this.get$indented() && _this._lookingAtInterpolatedIdentifier$0()) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer$_text; + t3 = A.S(midBuffer); + t2._contents += t3; + return t1; + } + postColonWhitespace = _this.rawText$1(t3); + _0_0 = _this._tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + midBuffer._contents += postColonWhitespace; + couldBeSelector = postColonWhitespace.length === 0 && _this._lookingAtInterpolatedIdentifier$0(); + beforeDeclaration = new A._SpanScannerState(t1, t1._string_scanner$_position); + value = null; + try { + value = _this._expression$0(); + if (_this.lookingAtChildren$0()) { + if (couldBeSelector) + _this.expectStatementSeparator$0(); + } else if (!_this.atEndOfStatement$0()) + _this.expectStatementSeparator$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + if (!couldBeSelector) + throw exception; + t1.set$state(beforeDeclaration); + additional = _this.almostAnyValue$0(); + if (!_this.get$indented() && t1.peekChar$0() === 59) + throw exception; + t1 = nameBuffer._interpolation_buffer$_text; + t2 = A.S(midBuffer); + t1._contents += t2; + nameBuffer.addInterpolation$1(additional); + return nameBuffer; + } else + throw exception; + } + _1_0 = _this._tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$($name, value, t1.spanFrom$1(start)); + } + }, + _variableDeclarationOrInterpolation$0() { + var t1, start, identifier, t2, buffer, _this = this; + if (!_this.lookingAtIdentifier$0()) + return _this.interpolatedIdentifier$0(); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + if (t1.matches$1(".$")) { + t1.readChar$0(); + return _this.variableDeclarationWithoutNamespace$2(identifier, start); + } else { + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object)); + t2._contents = "" + identifier; + if (_this._lookingAtInterpolatedIdentifierBody$0()) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + }, + _styleRule$2(buffer, start_) { + var t2, start, interpolation, wasInStyleRule, _this = this, t1 = {}; + _this._isUseAllowed = false; + if (start_ == null) { + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + } else + start = start_; + interpolation = t1.interpolation = _this.styleRuleSelector$0(); + if (buffer != null) { + buffer.addInterpolation$1(interpolation); + t2 = t1.interpolation = buffer.interpolation$1(_this.scanner.spanFrom$1(start)); + } else + t2 = interpolation; + if (t2.contents.length === 0) + _this.scanner.error$1(0, 'expected "}".'); + wasInStyleRule = _this._inStyleRule; + _this._inStyleRule = true; + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__styleRule_closure(t1, _this, wasInStyleRule, start)); + }, + _styleRule$0() { + return this._styleRule$2(null, null); + }, + _propertyOrVariableDeclaration$1$parseCustomProperties(parseCustomProperties) { + var t2, nameBuffer, t3, $name, variableOrInterpolation, _0_0, value, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._lookingAtPotentialPropertyHack$0()) { + t2 = new A.StringBuffer(""); + nameBuffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + t3 = _this.rawText$1(_this.get$whitespace()); + t2._contents += t3; + nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + $name = nameBuffer.interpolation$1(t1.spanFrom$1(start)); + } else if (!_this.get$plainCss()) { + variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + return variableOrInterpolation; + else + type$.Interpolation._as(variableOrInterpolation); + $name = variableOrInterpolation; + } else + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + _0_0 = _this._tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + value = _this._expression$0(); + _1_0 = _this._tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$($name, value, t1.spanFrom$1(start)); + } + }, + _tryDeclarationChildren$3$value($name, start, value) { + var _this = this; + if (!_this.lookingAtChildren$0()) + return null; + if (_this.get$plainCss()) + _this.scanner.error$1(0, string$.Nested); + return _this._withChildren$3(_this.get$_declarationChild(), start, new A.StylesheetParser__tryDeclarationChildren_closure($name, value)); + }, + _tryDeclarationChildren$2($name, start) { + return this._tryDeclarationChildren$3$value($name, start, null); + }, + _declarationChild$0() { + return this.scanner.peekChar$0() === 64 ? this._declarationAtRule$0() : this._propertyOrVariableDeclaration$1$parseCustomProperties(false); + }, + atRule$2$root(child, root) { + var $name, wasUseAllowed, value, optional, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$2$name(64, "@-rule"); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + wasUseAllowed = _this._isUseAllowed; + _this._isUseAllowed = false; + switch ($name.get$asPlain()) { + case "at-root": + return _this._atRootRule$1(start); + case "content": + return _this._contentRule$1(start); + case "debug": + return _this._debugRule$1(start); + case "each": + return _this._eachRule$2(start, child); + case "else": + return _this._disallowedAtRule$1(start); + case "error": + return _this._errorRule$1(start); + case "extend": + if (!_this._inStyleRule && !_this._stylesheet$_inMixin && !_this._inContentBlock) + _this.error$2(0, string$.x40exten, t1.spanFrom$1(start)); + value = _this.almostAnyValue$0(); + optional = t1.scanChar$1(33); + if (optional) { + _this.expectIdentifier$1("optional"); + _this.whitespace$0(); + } + _this.expectStatementSeparator$1("@extend rule"); + return new A.ExtendRule(value, optional, t1.spanFrom$1(start)); + case "for": + return _this._forRule$2(start, child); + case "forward": + _this._isUseAllowed = wasUseAllowed; + if (!root) + _this._disallowedAtRule$1(start); + return _this._forwardRule$1(start); + case "function": + return _this._functionRule$1(start); + case "if": + return _this._ifRule$2(start, child); + case "import": + return _this._importRule$1(start); + case "include": + return _this._includeRule$1(start); + case "media": + return _this.mediaRule$1(start); + case "mixin": + return _this._mixinRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "return": + return _this._disallowedAtRule$1(start); + case "supports": + return _this.supportsRule$1(start); + case "use": + _this._isUseAllowed = wasUseAllowed; + if (!root) + _this._disallowedAtRule$1(start); + return _this._useRule$1(start); + case "warn": + return _this._warnRule$1(start); + case "while": + return _this._whileRule$2(start, child); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + _declarationAtRule$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = _this._plainAtRuleName$0(); + $label0$0: { + if ("content" === _0_0) { + t1 = _this._contentRule$1(start); + break $label0$0; + } + if ("debug" === _0_0) { + t1 = _this._debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._eachRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._forRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._ifRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + if ("include" === _0_0) { + t1 = _this._includeRule$1(start); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._whileRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + t1 = _this._disallowedAtRule$1(start); + } + return t1; + }, + _functionChild$0() { + var state, variableDeclarationError, stackTrace, statement, t2, exception, t3, start, _0_0, value, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() !== 64) { + state = new A._SpanScannerState(t1, t1._string_scanner$_position); + try { + t2 = _this._variableDeclarationWithNamespace$0(); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + t3 = type$.SourceSpanFormatException; + if (t3._is(t2)) { + variableDeclarationError = t2; + stackTrace = A.getTraceFromException(exception); + t1.set$state(state); + statement = null; + try { + statement = _this._declarationOrStyleRule$0(); + } catch (exception) { + if (t3._is(A.unwrapException(exception))) + throw A.wrapException(variableDeclarationError); + else + throw exception; + } + t2 = statement instanceof A.StyleRule ? "style rules" : "declarations"; + _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$z(statement), stackTrace); + } else + throw exception; + } + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _0_0 = _this._plainAtRuleName$0(); + $label0$0: { + if ("debug" === _0_0) { + t1 = _this._debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._eachRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._forRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._ifRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + if ("return" === _0_0) { + value = _this._expression$0(); + _this.expectStatementSeparator$1("@return rule"); + t1 = new A.ReturnRule(value, t1.spanFrom$1(start)); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._whileRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + t1 = _this._disallowedAtRule$1(start); + } + return t1; + }, + _plainAtRuleName$0() { + this.scanner.expectChar$2$name(64, "@-rule"); + var $name = this.identifier$0(); + this.whitespace$0(); + return $name; + }, + _atRootRule$1(start) { + var t2, t3, buffer, t4, query, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 40) { + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + t1.expectChar$1(40); + t4 = A.Primitives_stringFromCharCode(40); + t3._contents += t4; + _this.whitespace$0(); + _this._addOrInject$2(buffer, _this._expression$0()); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t4 = A.Primitives_stringFromCharCode(58); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + _this._addOrInject$2(buffer, _this._expression$0()); + } + t1.expectChar$1(41); + _this.whitespace$0(); + t4 = A.Primitives_stringFromCharCode(41); + t3._contents += t4; + query = buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + _this.whitespace$0(); + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure(query)); + } else { + if (!_this.lookingAtChildren$0()) + t2 = _this.get$indented() && _this.atEndOfStatement$0(); + else + t2 = true; + if (t2) + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure0()); + else + return A.AtRootRule$(A._setArrayType([_this._styleRule$0()], type$.JSArray_Statement), t1.spanFrom$1(start), null); + } + }, + _contentRule$1(start) { + var t1, beforeWhitespace, $arguments, t2, _this = this; + if (!_this._stylesheet$_inMixin) + _this.error$2(0, string$.x40conte, _this.scanner.spanFrom$1(start)); + t1 = _this.scanner; + beforeWhitespace = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + _this.whitespace$0(); + if (t1.peekChar$0() === 40) { + $arguments = _this._argumentInvocation$1$mixin(true); + _this.whitespace$0(); + } else { + t2 = beforeWhitespace.offset; + $arguments = A.ArgumentInvocation$empty(A._FileSpan$(beforeWhitespace.file, t2, t2)); + } + _this.expectStatementSeparator$1("@content rule"); + return new A.ContentRule($arguments, t1.spanFrom$1(start)); + }, + _debugRule$1(start) { + var value = this._expression$0(); + this.expectStatementSeparator$1("@debug rule"); + return new A.DebugRule(value, this.scanner.spanFrom$1(start)); + }, + _eachRule$2(start, child) { + var variables, t1, _this = this, + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); + _this.whitespace$0(); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$0(); + t1.expectChar$1(36); + variables.push(_this.identifier$1$normalize(true)); + _this.whitespace$0(); + } + _this.expectIdentifier$1("in"); + _this.whitespace$0(); + return _this._withChildren$3(child, start, new A.StylesheetParser__eachRule_closure(_this, wasInControlDirective, variables, _this._expression$0())); + }, + _errorRule$1(start) { + var value = this._expression$0(); + this.expectStatementSeparator$1("@error rule"); + return new A.ErrorRule(value, this.scanner.spanFrom$1(start)); + }, + _functionRule$1(start) { + var t1, t2, $name, $arguments, _0_0, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + $name = _this.identifier$0(); + if (B.JSString_methods.startsWith$1($name, "--")) + A.WarnForDeprecation_warnForDeprecation(_this.logger, B.Deprecation_HJ0, string$.Sassx20_fm, t1.spanFrom$1(new A._SpanScannerState(t1, t2)), null); + _this.whitespace$0(); + $arguments = _this._argumentDeclaration$0(); + if (_this._stylesheet$_inMixin || _this._inContentBlock) + _this.error$2(0, string$.Mixinscf, t1.spanFrom$1(start)); + else if (_this._inControlDirective) + _this.error$2(0, string$.Functi, t1.spanFrom$1(start)); + _0_0 = A.unvendor($name); + if ("calc" === _0_0 || "element" === _0_0 || "expression" === _0_0 || "url" === _0_0 || "and" === _0_0 || "or" === _0_0 || "not" === _0_0 || "clamp" === _0_0) + _this.error$2(0, "Invalid function name.", t1.spanFrom$1(start)); + _this.whitespace$0(); + return _this._withChildren$3(_this.get$_functionChild(), start, new A.StylesheetParser__functionRule_closure($name, $arguments, precedingComment)); + }, + _forRule$2(start, child) { + var variable, from, _this = this, t1 = {}, + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + variable = _this.variableName$0(); + _this.whitespace$0(); + _this.expectIdentifier$1("from"); + _this.whitespace$0(); + t1.exclusive = null; + from = _this._expression$1$until(new A.StylesheetParser__forRule_closure(t1, _this)); + if (t1.exclusive == null) + _this.scanner.error$1(0, 'Expected "to" or "through".'); + _this.whitespace$0(); + return _this._withChildren$3(child, start, new A.StylesheetParser__forRule_closure0(t1, _this, wasInControlDirective, variable, from, _this._expression$0())); + }, + _forwardRule$1(start) { + var prefix, hiddenMixinsAndFunctions, hiddenVariables, _0_0, shownMixinsAndFunctions, shownVariables, _1_0, configuration, span, t1, t2, t3, t4, _this = this, _null = null, + url = _this._urlString$0(); + _this.whitespace$0(); + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + prefix = _this.identifier$1$normalize(true); + _this.scanner.expectChar$1(42); + _this.whitespace$0(); + } else + prefix = _null; + hiddenMixinsAndFunctions = _null; + hiddenVariables = _null; + if (_this.scanIdentifier$1("show")) { + _0_0 = _this._memberList$0(); + shownMixinsAndFunctions = _0_0._0; + shownVariables = _0_0._1; + } else { + if (_this.scanIdentifier$1("hide")) { + _1_0 = _this._memberList$0(); + hiddenMixinsAndFunctions = _1_0._0; + hiddenVariables = _1_0._1; + } + shownVariables = _null; + shownMixinsAndFunctions = shownVariables; + } + configuration = _this._stylesheet$_configuration$1$allowGuarded(true); + _this.whitespace$0(); + _this.expectStatementSeparator$1("@forward rule"); + span = _this.scanner.spanFrom$1(start); + if (!_this._isUseAllowed) + _this.error$2(0, string$.x40forwa, span); + if (shownMixinsAndFunctions != null) { + shownVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); + t4 = configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); + return new A.ForwardRule(url, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), _null, _null, prefix, t4, span); + } else if (hiddenMixinsAndFunctions != null) { + hiddenVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); + t4 = configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); + return new A.ForwardRule(url, _null, _null, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), prefix, t4, span); + } else + return new A.ForwardRule(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); + }, + _memberList$0() { + var _this = this, + t1 = type$.String, + identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), + variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t1 = _this.scanner; + do { + _this.whitespace$0(); + _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure(_this, variables, identifiers)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + return new A._Record_2(identifiers, variables); + }, + _ifRule$2(start, child) { + var condition, children, clauses, lastClause, span, _this = this, + ifIndentation = _this.get$currentIndentation(), + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + condition = _this._expression$0(); + children = _this.children$1(0, child); + _this.whitespaceWithoutComments$0(); + clauses = A._setArrayType([A.IfClause$(condition, children)], type$.JSArray_IfClause); + while (true) { + if (!_this.scanElse$1(ifIndentation)) { + lastClause = null; + break; + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("if")) { + _this.whitespace$0(); + clauses.push(A.IfClause$(_this._expression$0(), _this.children$1(0, child))); + } else { + lastClause = A.ElseClause$(_this.children$1(0, child)); + break; + } + } + _this._inControlDirective = wasInControlDirective; + span = _this.scanner.spanFrom$1(start); + _this.whitespaceWithoutComments$0(); + return new A.IfRule(A.List_List$unmodifiable(clauses, type$.IfClause), lastClause, span); + }, + _importRule$1(start) { + var argument, t3, _this = this, + imports = A._setArrayType([], type$.JSArray_Import), + t1 = _this.scanner, + t2 = _this.logger; + do { + _this.whitespace$0(); + argument = _this.importArgument$0(); + t3 = argument instanceof A.DynamicImport; + if (t3) + A.WarnForDeprecation_warnForDeprecation(t2, B.Deprecation_import_null_true_import, string$.Sassx20_i, argument.span, null); + if ((_this._inControlDirective || _this._stylesheet$_inMixin) && t3) + _this._disallowedAtRule$1(start); + imports.push(argument); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + _this.expectStatementSeparator$1("@import rule"); + t1 = t1.spanFrom$1(start); + return new A.ImportRule(A.List_List$unmodifiable(imports, type$.Import), t1); + }, + importArgument$0() { + var url, urlSpan, innerError, stackTrace, modifiers, t2, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + url = _this.dynamicUrl$0(); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + return new A.StaticImport(A.Interpolation$(A._setArrayType([url], type$.JSArray_Object), t1.spanFrom$1(start)), modifiers, t1.spanFrom$1(start)); + } + url = _this.string$0(); + urlSpan = t1.spanFrom$1(start); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + if (_this.isPlainImportUrl$1(url) || modifiers != null) { + t2 = urlSpan; + return new A.StaticImport(A.Interpolation$(A._setArrayType([A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null)], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(start)); + } else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport(t1, urlSpan); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); + } else + throw exception; + } + }, + parseImportUrl$1(url) { + var t1 = $.$get$windows(); + if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) + return t1.toUri$1(url).toString$0(0); + A.Uri_parse(url); + return url; + }, + isPlainImportUrl$1(url) { + var _0_0, t1; + if (url.length < 5) + return false; + if (B.JSString_methods.endsWith$1(url, ".css")) + return true; + _0_0 = url.charCodeAt(0); + $label0$0: { + if (47 === _0_0) { + t1 = url.charCodeAt(1) === 47; + break $label0$0; + } + if (104 === _0_0) { + t1 = B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + tryImportModifiers$0() { + var t1, start, t2, t3, buffer, t4, identifier, $name, query, t5, endPosition, result, _this = this; + if (!_this._lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t2, t3); + for (; true;) + if (_this._lookingAtInterpolatedIdentifier$0()) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t4 = A.Primitives_stringFromCharCode(32); + t2._contents += t4; + } + identifier = _this.interpolatedIdentifier$0(); + buffer.addInterpolation$1(identifier); + t4 = identifier.get$asPlain(); + $name = t4 == null ? null : t4.toLowerCase(); + if ($name !== "and" && t1.scanChar$1(40)) { + if ($name === "supports") { + query = _this._importSupportsQuery$0(); + t4 = !(query instanceof A.SupportsDeclaration); + if (t4) { + t5 = A.Primitives_stringFromCharCode(40); + t2._contents += t5; + } + buffer._flushText$0(); + t3.push(new A.SupportsExpression(query)); + if (t4) { + t4 = A.Primitives_stringFromCharCode(41); + t2._contents += t4; + } + } else { + t4 = A.Primitives_stringFromCharCode(40); + t2._contents += t4; + buffer.addInterpolation$1(_this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true)); + t4 = A.Primitives_stringFromCharCode(41); + t2._contents += t4; + } + t1.expectChar$1(41); + _this.whitespace$0(); + } else { + _this.whitespace$0(); + if (t1.scanChar$1(44)) { + t2._contents += ", "; + buffer.addInterpolation$1(_this._mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t4, t5, endPosition); + t1._FileSpan$3(t4, t5, endPosition); + t5 = type$.Object; + t4 = A.List_List$of(t3, true, t5); + t3 = t2._contents; + if (t3.length !== 0) + t4.push(t3.charCodeAt(0) == 0 ? t3 : t3); + result = A.List_List$from(t4, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation(result, t1); + t2.Interpolation$2(t4, t1); + return t2; + } + } + } else if (t1.peekChar$0() === 40) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t4 = A.Primitives_stringFromCharCode(32); + t2._contents += t4; + } + buffer.addInterpolation$1(_this._mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation(result, t5); + t1.Interpolation$2(t3, t5); + return t1; + } else { + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation(result, t5); + t1.Interpolation$2(t3, t5); + return t1; + } + }, + _importSupportsQuery$0() { + var t1, t2, _0_0, $name, _this = this; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + return new A.SupportsNegation(_this._supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else { + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + return _this._supportsCondition$0(); + else { + _0_0 = _this._tryImportSupportsFunction$0(); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + $name = _this._expression$0(); + t1.expectChar$1(58); + return _this._supportsDeclarationValue$2($name, new A._SpanScannerState(t1, t2)); + } + } + }, + _tryImportSupportsFunction$0() { + var t1, start, $name, value, _this = this; + if (!_this._lookingAtInterpolatedIdentifier$0()) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $name = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + value = _this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction($name, value, t1.spanFrom$1(start)); + }, + _includeRule$1(start) { + var name0, namespace, $arguments, t2, t3, contentArguments, contentArguments_, wasInContentBlock, $content, span, _this = this, _null = null, + $name = _this.identifier$0(), + t1 = _this.scanner; + if (t1.scanChar$1(46)) { + name0 = _this._publicIdentifier$0(); + namespace = $name; + $name = name0; + } else + namespace = _null; + _this.whitespace$0(); + if (t1.peekChar$0() === 40) + $arguments = _this._argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentInvocation$empty(A._FileSpan$(t2.file, t3, t3)); + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("using")) { + _this.whitespace$0(); + contentArguments = _this._argumentDeclaration$0(); + _this.whitespace$0(); + } else + contentArguments = _null; + t2 = contentArguments == null; + if (!t2 || _this.lookingAtChildren$0()) { + if (t2) { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + contentArguments_ = new A.ArgumentDeclaration(B.List_empty12, _null, A._FileSpan$(t2.file, t3, t3)); + } else + contentArguments_ = contentArguments; + wasInContentBlock = _this._inContentBlock; + _this._inContentBlock = true; + $content = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__includeRule_closure(contentArguments_)); + _this._inContentBlock = wasInContentBlock; + } else { + _this.expectStatementSeparator$0(); + $content = _null; + } + t1 = t1.spanFrom$2(start, start); + t2 = $content == null ? $arguments : $content; + span = t1.expand$1(0, t2.get$span(t2)); + return new A.IncludeRule(namespace, A.stringReplaceAllUnchecked($name, "_", "-"), $name, $arguments, $content, span); + }, + mediaRule$1(start) { + return this._withChildren$3(this.get$_statement(), start, new A.StylesheetParser_mediaRule_closure(this._mediaQueryList$0())); + }, + _mixinRule$1(start) { + var t1, t2, $name, $arguments, t3, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + $name = _this.identifier$0(); + if (B.JSString_methods.startsWith$1($name, "--")) + A.WarnForDeprecation_warnForDeprecation(_this.logger, B.Deprecation_HJ0, string$.Sassx20_m, t1.spanFrom$1(new A._SpanScannerState(t1, t2)), null); + _this.whitespace$0(); + if (t1.peekChar$0() === 40) + $arguments = _this._argumentDeclaration$0(); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = new A.ArgumentDeclaration(B.List_empty12, null, A._FileSpan$(t2.file, t3, t3)); + } + if (_this._stylesheet$_inMixin || _this._inContentBlock) + _this.error$2(0, string$.Mixinscm, t1.spanFrom$1(start)); + else if (_this._inControlDirective) + _this.error$2(0, string$.Mixinsb, t1.spanFrom$1(start)); + _this.whitespace$0(); + _this._stylesheet$_inMixin = true; + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__mixinRule_closure(_this, $name, $arguments, precedingComment)); + }, + mozDocumentRule$2(start, $name) { + var t5, t6, identifier, _0_0, argument, trailing, endPosition, t7, t8, start0, end, _this = this, _box_0 = {}, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + t4 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer(t3, t4); + _box_0.needsDeprecationWarning = false; + for (t5 = _this.get$whitespace(); true;) { + if (t1.peekChar$0() === 35) { + t6 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t6); + _box_0.needsDeprecationWarning = true; + } else { + t6 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + $label0$0: { + if ("url" === identifier || "url-prefix" === identifier || "domain" === identifier) { + _0_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t6), identifier); + if (_0_0 != null) + buffer.addInterpolation$1(_0_0); + else { + t1.expectChar$1(40); + _this.whitespace$0(); + argument = _this.interpolatedString$0(); + t1.expectChar$1(41); + t3._contents += identifier; + t6 = A.Primitives_stringFromCharCode(40); + t3._contents += t6; + buffer.addInterpolation$1(argument.asInterpolation$0()); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + } + t6 = t3._contents; + trailing = t6.charCodeAt(0) == 0 ? t6 : t6; + if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + if ("regexp" === identifier) { + t3._contents += "regexp("; + t1.expectChar$1(40); + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + t1.expectChar$1(41); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + endPosition = t1._string_scanner$_position; + t7 = t1._sourceFile; + t8 = new A._FileSpan(t7, t6, endPosition); + t8._FileSpan$3(t7, t6, endPosition); + _this.error$2(0, "Invalid function name.", t8); + } + } + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t6 = A.Primitives_stringFromCharCode(44); + t3._contents += t6; + start0 = t1._string_scanner$_position; + t5.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t1.string, start0, end); + } + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure(_box_0, _this, $name, buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))))); + }, + supportsRule$1(start) { + var _this = this, + condition = _this._supportsCondition$0(); + _this.whitespace$0(); + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_supportsRule_closure(condition)); + }, + _useRule$1(start) { + var namespace, configuration, span, t1, _this = this, + url = _this._urlString$0(); + _this.whitespace$0(); + namespace = _this._useNamespace$2(url, start); + _this.whitespace$0(); + configuration = _this._stylesheet$_configuration$0(); + _this.whitespace$0(); + span = _this.scanner.spanFrom$1(start); + if (!_this._isUseAllowed) + _this.error$2(0, string$.x40use_r, span); + _this.expectStatementSeparator$1("@use rule"); + t1 = new A.UseRule(url, namespace, configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); + t1.UseRule$4$configuration(url, namespace, span, configuration); + return t1; + }, + _useNamespace$2(url, start) { + var namespace, basename, dot, t1, exception, _this = this; + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); + } + basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; + namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); + try { + t1 = A.SpanScanner$(namespace, null); + t1 = new A.Parser(t1, _this.logger, null)._parseIdentifier$0(); + return t1; + } catch (exception) { + if (type$.SassFormatException._is(A.unwrapException(exception))) + _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.scanner.spanFrom$1(start)); + else + throw exception; + } + }, + _stylesheet$_configuration$1$allowGuarded(allowGuarded) { + var variableNames, configuration, t1, t2, $name, expression, t3, guarded, endPosition, t4, t5, span, _this = this; + if (!_this.scanIdentifier$1("with")) + return null; + variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable); + _this.whitespace$0(); + t1 = _this.scanner; + t1.expectChar$1(40); + for (; true;) { + _this.whitespace$0(); + t2 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + expression = _this.expressionUntilComma$0(); + t3 = t1._string_scanner$_position; + if (allowGuarded && t1.scanChar$1(33)) { + guarded = _this.identifier$0() === "default"; + if (guarded) + _this.whitespace$0(); + else { + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = new A._FileSpan(t4, t3, endPosition); + t5._FileSpan$3(t4, t3, endPosition); + _this.error$2(0, "Invalid flag name.", t5); + } + } else + guarded = false; + endPosition = t1._string_scanner$_position; + t3 = t1._sourceFile; + span = new A._FileSpan(t3, t2, endPosition); + span._FileSpan$3(t3, t2, endPosition); + if (variableNames.contains$1(0, $name)) + _this.error$2(0, string$.The_sa, span); + variableNames.add$1(0, $name); + configuration.push(new A.ConfiguredVariable($name, expression, guarded, span)); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + if (!_this._lookingAtExpression$0()) + break; + } + t1.expectChar$1(41); + return configuration; + }, + _stylesheet$_configuration$0() { + return this._stylesheet$_configuration$1$allowGuarded(false); + }, + _warnRule$1(start) { + var value = this._expression$0(); + this.expectStatementSeparator$1("@warn rule"); + return new A.WarnRule(value, this.scanner.spanFrom$1(start)); + }, + _whileRule$2(start, child) { + var _this = this, + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + return _this._withChildren$3(child, start, new A.StylesheetParser__whileRule_closure(_this, wasInControlDirective, _this._expression$0())); + }, + unknownAtRule$2(start, $name) { + var t2, t3, rule, _this = this, t1 = {}, + wasInUnknownAtRule = _this._stylesheet$_inUnknownAtRule; + _this._stylesheet$_inUnknownAtRule = true; + t1.value = null; + t2 = _this.scanner; + t3 = t2.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this._interpolatedDeclarationValue$1$allowOpenBrace(false) : null; + if (_this.lookingAtChildren$0()) + rule = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_unknownAtRule_closure(t1, $name)); + else { + _this.expectStatementSeparator$0(); + rule = A.AtRule$($name, t2.spanFrom$1(start), null, t3); + } + _this._stylesheet$_inUnknownAtRule = wasInUnknownAtRule; + return rule; + }, + _disallowedAtRule$1(start) { + this._interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(true, false); + this.error$2(0, "This at-rule is not allowed here.", this.scanner.spanFrom$1(start)); + }, + _argumentDeclaration$0() { + var $arguments, named, restArgument, t3, $name, defaultValue, endPosition, t4, t5, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + $arguments = A._setArrayType([], type$.JSArray_Argument); + named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + for (; restArgument = null, t1.peekChar$0() === 36;) { + t3 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + defaultValue = _this.expressionUntilComma$0(); + } else { + if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + _this.whitespace$0(); + restArgument = $name; + break; + } + defaultValue = null; + } + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = new A._FileSpan(t4, t3, endPosition); + t5._FileSpan$3(t4, t3, endPosition); + $arguments.push(new A.Argument($name, defaultValue, t5)); + if (!named.add$1(0, $name)) + _this.error$2(0, "Duplicate argument.", B.JSArray_methods.get$last($arguments).span); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentDeclaration(A.List_List$unmodifiable($arguments, type$.Argument), restArgument, t1); + }, + _argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { + var positional, t3, t4, named, t5, rest, keywordRest, expression, t6, t7, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + positional = A._setArrayType([], type$.JSArray_Expression); + t3 = type$.String; + t4 = type$.Expression; + named = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + for (t5 = !mixin, rest = null; keywordRest = null, _this._lookingAtExpression$0();) { + expression = _this.expressionUntilComma$1$singleEquals(t5); + _this.whitespace$0(); + if (expression instanceof A.VariableExpression && t1.scanChar$1(58)) { + _this.whitespace$0(); + t6 = expression.name; + if (named.containsKey$1(t6)) + _this.error$2(0, "Duplicate argument.", expression.span); + named.$indexSet(0, t6, _this.expressionUntilComma$1$singleEquals(t5)); + } else if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + if (rest != null) { + _this.whitespace$0(); + keywordRest = expression; + break; + } + rest = expression; + } else if (named.__js_helper$_length !== 0) + _this.error$2(0, string$.Positi, expression.get$span(expression)); + else + positional.push(expression); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { + t5 = t1._sourceFile; + t6 = t1._string_scanner$_position; + new A.FileLocation(t5, t6).FileLocation$_$2(t5, t6); + t7 = new A._FileSpan(t5, t6, t6); + t7._FileSpan$3(t5, t6, t6); + t6 = A._setArrayType([""], type$.JSArray_Object); + result = A.List_List$from(t6, false, type$.Object); + result.fixed$length = Array; + result.immutable$list = Array; + t5 = new A.Interpolation(result, t7); + t5.Interpolation$2(t6, t7); + positional.push(new A.StringExpression(t5, false)); + break; + } + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentInvocation(A.List_List$unmodifiable(positional, t4), A.ConstantMap_ConstantMap$from(named, t3, t4), rest, keywordRest, t1); + }, + _argumentInvocation$0() { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, false); + }, + _argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); + }, + _argumentInvocation$1$mixin(mixin) { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); + }, + _expression$3$bracketList$singleEquals$until(bracketList, singleEquals, until) { + var t2, beforeBracket, start, wasInExpression, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, _3_0, _1_0, t4, _3_28, _2_0, _3_32, _3_40, commaExpressions, spaceExpressions, singleExpression, _this = this, + _s20_ = "Expected expression.", + _box_0 = {}, + t1 = until != null; + if (t1 && until.call$0()) + _this.scanner.error$1(0, _s20_); + if (bracketList) { + t2 = _this.scanner; + beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); + t2.expectChar$1(91); + _this.whitespace$0(); + if (t2.scanChar$1(93)) { + t1 = A._setArrayType([], type$.JSArray_Expression); + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(t1, type$.Expression), B.ListSeparator_undecided_null_undecided, true, t2); + } + } else + beforeBracket = null; + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + wasInExpression = _this._inExpression; + wasInParentheses = _this._inParentheses; + _this._inExpression = true; + _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; + _box_0.allowSlash = true; + _box_0.singleExpression_ = _this._singleExpression$0(); + resetState = new A.StylesheetParser__expression_resetState(_box_0, _this, start); + resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation(_box_0, _this); + resolveOperations = new A.StylesheetParser__expression_resolveOperations(_box_0, resolveOneOperation); + addSingleExpression = new A.StylesheetParser__expression_addSingleExpression(_box_0, _this, resetState, resolveOperations); + addOperator = new A.StylesheetParser__expression_addOperator(_box_0, _this, resolveOneOperation); + resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions(_box_0, _this, resolveOperations); + for (t3 = type$.JSArray_Expression; true;) { + _this.whitespace$0(); + if (t1 && until.call$0()) + break; + _3_0 = t2.peekChar$0(); + if (_3_0 == null) + break; + if (40 === _3_0) { + addSingleExpression.call$1(_this.parentheses$0()); + continue; + } + if (91 === _3_0) { + addSingleExpression.call$1(_this._expression$1$bracketList(true)); + continue; + } + if (36 === _3_0) { + addSingleExpression.call$1(_this._variable$0()); + continue; + } + if (38 === _3_0) { + addSingleExpression.call$1(_this._selector$0()); + continue; + } + if (39 === _3_0 || 34 === _3_0) { + addSingleExpression.call$1(_this.interpolatedString$0()); + continue; + } + if (35 === _3_0) { + addSingleExpression.call$1(_this._hashExpression$0()); + continue; + } + if (61 === _3_0) { + t2.readChar$0(); + if (singleEquals && t2.peekChar$0() !== 61) + addOperator.call$1(B.BinaryOperator_wdM); + else { + t2.expectChar$1(61); + addOperator.call$1(B.BinaryOperator_g8k); + } + continue; + } + if (33 === _3_0) { + $label0$1: { + _1_0 = t2.peekChar$1(1); + if (61 === _1_0) { + t2.readChar$0(); + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_icU); + break $label0$1; + } + t4 = true; + if (_1_0 != null) + if (105 !== _1_0) + if (73 !== _1_0) + t4 = _1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12; + if (t4) { + addSingleExpression.call$1(_this._importantExpression$0()); + break $label0$1; + } + break; + } + continue; + } + if (60 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_SPQ : B.BinaryOperator_miq); + continue; + } + if (62 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_oEm : B.BinaryOperator_bEa); + continue; + } + if (42 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_2No); + continue; + } + _3_28 = 43 === _3_0; + if (_3_28 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._unaryOperation$0()); + continue; + } + if (_3_28) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_u15); + continue; + } + if (45 === _3_0) { + _2_0 = t2.peekChar$1(1); + if (A._isInt(_2_0) && _2_0 >= 48 && _2_0 <= 57 || 46 === _2_0) + if (_box_0.singleExpression_ != null) { + t4 = t2.peekChar$1(-1); + t4 = t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12; + } else + t4 = true; + else + t4 = false; + if (t4) + addSingleExpression.call$1(_this._number$0()); + else if (_this._lookingAtInterpolatedIdentifier$0()) + addSingleExpression.call$1(_this.identifierLike$0()); + else if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_SjO); + } + continue; + } + _3_32 = 47 === _3_0; + if (_3_32 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._unaryOperation$0()); + continue; + } + if (_3_32) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_U77); + continue; + } + if (37 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_KNx); + continue; + } + if (_3_0 >= 48 && _3_0 <= 57) { + addSingleExpression.call$1(_this._number$0()); + continue; + } + _3_40 = 46 === _3_0; + if (_3_40 && t2.peekChar$1(1) === 46) + break; + if (_3_40) { + addSingleExpression.call$1(_this._number$0()); + continue; + } + if (97 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("and")) { + addOperator.call$1(B.BinaryOperator_eDt); + continue; + } + if (111 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("or")) { + addOperator.call$1(B.BinaryOperator_qNM); + continue; + } + if ((117 === _3_0 || 85 === _3_0) && t2.peekChar$1(1) === 43) { + addSingleExpression.call$1(_this._unicodeRange$0()); + continue; + } + if (!(_3_0 >= 97 && _3_0 <= 122)) + t4 = _3_0 >= 65 && _3_0 <= 90 || 95 === _3_0 || 92 === _3_0 || _3_0 >= 128; + else + t4 = true; + if (t4) { + addSingleExpression.call$1(_this.identifierLike$0()); + continue; + } + if (44 === _3_0) { + if (_this._inParentheses) { + _this._inParentheses = false; + if (_box_0.allowSlash) { + resetState.call$0(); + continue; + } + } + commaExpressions = _box_0.commaExpressions_; + if (commaExpressions == null) + commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t3); + if (_box_0.singleExpression_ == null) + t2.error$1(0, _s20_); + resolveSpaceExpressions.call$0(); + t4 = _box_0.singleExpression_; + t4.toString; + commaExpressions.push(t4); + t2.readChar$0(); + _box_0.allowSlash = true; + _box_0.singleExpression_ = null; + continue; + } + break; + } + if (bracketList) + t2.expectChar$1(93); + commaExpressions = _box_0.commaExpressions_; + spaceExpressions = _box_0.spaceExpressions_; + if (commaExpressions != null) { + resolveSpaceExpressions.call$0(); + _this._inParentheses = wasInParentheses; + singleExpression = _box_0.singleExpression_; + if (singleExpression != null) + commaExpressions.push(singleExpression); + _this._inExpression = wasInExpression; + t1 = t2.spanFrom$1(beforeBracket == null ? start : beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(commaExpressions, type$.Expression), B.ListSeparator_ECn, bracketList, t1); + } else if (bracketList && spaceExpressions != null) { + resolveOperations.call$0(); + _this._inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + spaceExpressions.push(t1); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_nbm, true, t2); + } else { + resolveSpaceExpressions.call$0(); + if (bracketList) { + t1 = _box_0.singleExpression_; + t1.toString; + t3 = A._setArrayType([t1], t3); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + _box_0.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(t3, type$.Expression), B.ListSeparator_undecided_null_undecided, true, t2); + } + _this._inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + return t1; + } + }, + _expression$0() { + return this._expression$3$bracketList$singleEquals$until(false, false, null); + }, + _expression$2$singleEquals$until(singleEquals, until) { + return this._expression$3$bracketList$singleEquals$until(false, singleEquals, until); + }, + _expression$1$bracketList(bracketList) { + return this._expression$3$bracketList$singleEquals$until(bracketList, false, null); + }, + _expression$1$until(until) { + return this._expression$3$bracketList$singleEquals$until(false, false, until); + }, + expressionUntilComma$1$singleEquals(singleEquals) { + return this._expression$2$singleEquals$until(singleEquals, new A.StylesheetParser_expressionUntilComma_closure(this)); + }, + expressionUntilComma$0() { + return this.expressionUntilComma$1$singleEquals(false); + }, + _isSlashOperand$1(expression) { + var t1 = true; + if (!(expression instanceof A.NumberExpression)) + if (!(expression instanceof A.FunctionExpression)) + t1 = expression instanceof A.BinaryOperationExpression && expression.allowsSlash; + return t1; + }, + _singleExpression$0() { + var next, t2, _this = this, + _s20_ = "Expected expression.", + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (_0_0 == null) + t1.error$1(0, _s20_); + if (40 === _0_0) { + t1 = _this.parentheses$0(); + break $label0$0; + } + if (47 === _0_0) { + t1 = _this._unaryOperation$0(); + break $label0$0; + } + if (46 === _0_0) { + t1 = _this._number$0(); + break $label0$0; + } + if (91 === _0_0) { + t1 = _this._expression$1$bracketList(true); + break $label0$0; + } + if (36 === _0_0) { + t1 = _this._variable$0(); + break $label0$0; + } + if (38 === _0_0) { + t1 = _this._selector$0(); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) { + t1 = _this.interpolatedString$0(); + break $label0$0; + } + if (35 === _0_0) { + t1 = _this._hashExpression$0(); + break $label0$0; + } + if (43 === _0_0) { + next = t1.peekChar$1(1); + t1 = next != null && next >= 48 && next <= 57 || next === 46 ? _this._number$0() : _this._unaryOperation$0(); + break $label0$0; + } + if (45 === _0_0) { + t1 = _this._minusExpression$0(); + break $label0$0; + } + if (33 === _0_0) { + t1 = _this._importantExpression$0(); + break $label0$0; + } + if ((117 === _0_0 || 85 === _0_0) && t1.peekChar$1(1) === 43) { + t1 = _this._unicodeRange$0(); + break $label0$0; + } + if (_0_0 >= 48 && _0_0 <= 57) { + t1 = _this._number$0(); + break $label0$0; + } + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90 || 95 === _0_0 || 92 === _0_0 || _0_0 >= 128; + else + t2 = true; + if (t2) { + t1 = _this.identifierLike$0(); + break $label0$0; + } + t1 = t1.error$1(0, _s20_); + } + return t1; + }, + parentheses$0() { + var start, first, expressions, t1, t2, _this = this, + wasInParentheses = _this._inParentheses; + _this._inParentheses = true; + try { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(40); + _this.whitespace$0(); + if (!_this._lookingAtExpression$0()) { + t1.expectChar$1(41); + t2 = A._setArrayType([], type$.JSArray_Expression); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(t2, type$.Expression); + return new A.ListExpression(t2, B.ListSeparator_undecided_null_undecided, false, t1); + } + first = _this.expressionUntilComma$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t1 = _this._stylesheet$_map$2(first, start); + return t1; + } + if (!t1.scanChar$1(44)) { + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + return new A.ParenthesizedExpression(first, t1); + } + _this.whitespace$0(); + expressions = A._setArrayType([first], type$.JSArray_Expression); + for (; true;) { + if (!_this._lookingAtExpression$0()) + break; + J.add$1$ax(expressions, _this.expressionUntilComma$0()); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(expressions, type$.Expression); + return new A.ListExpression(t2, B.ListSeparator_ECn, false, t1); + } finally { + _this._inParentheses = wasInParentheses; + } + }, + _stylesheet$_map$2(first, start) { + var t1, key, _this = this, + pairs = A._setArrayType([new A._Record_2(first, _this.expressionUntilComma$0())], type$.JSArray_Record_2_Expression_and_Expression); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$0(); + if (!_this._lookingAtExpression$0()) + break; + key = _this.expressionUntilComma$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + pairs.push(new A._Record_2(key, _this.expressionUntilComma$0())); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + return new A.MapExpression(A.List_List$unmodifiable(pairs, type$.Record_2_Expression_and_Expression), t1); + }, + _hashExpression$0() { + var start, t2, identifier, buffer, t3, _this = this, + t1 = _this.scanner; + if (t1.peekChar$1(1) === 123) + return _this.identifierLike$0(); + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(35); + t2 = t1.peekChar$0(); + if (t2 == null) + t2 = null; + else + t2 = t2 >= 48 && t2 <= 57; + if (t2 === true) + return new A.ColorExpression(_this._hexColorContents$1(start), t1.spanFrom$1(start)); + t2 = t1._string_scanner$_position; + identifier = _this.interpolatedIdentifier$0(); + if (_this._isHexColor$1(identifier)) { + t1.set$state(new A._SpanScannerState(t1, t2)); + return new A.ColorExpression(_this._hexColorContents$1(start), t1.spanFrom$1(start)); + } + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = A.Primitives_stringFromCharCode(35); + t2._contents += t3; + buffer.addInterpolation$1(identifier); + return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _hexColorContents$1(start) { + var red, green, blue, alpha, digit4, t2, t3, t4, _this = this, + digit1 = _this._hexDigit$0(), + digit2 = _this._hexDigit$0(), + digit3 = _this._hexDigit$0(), + t1 = _this.scanner, + $self = t1.peekChar$0(); + if (!($self != null && A.CharacterExtension_get_isHex($self))) { + red = (digit1 << 4 >>> 0) + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = (digit3 << 4 >>> 0) + digit3; + alpha = null; + } else { + digit4 = _this._hexDigit$0(); + $self = t1.peekChar$0(); + t2 = $self != null && A.CharacterExtension_get_isHex($self); + t3 = digit1 << 4 >>> 0; + t4 = digit3 << 4 >>> 0; + if (!t2) { + red = t3 + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = t4 + digit3; + alpha = ((digit4 << 4 >>> 0) + digit4) / 255; + } else { + red = t3 + digit2; + green = t4 + digit4; + blue = (_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0(); + $self = t1.peekChar$0(); + alpha = $self != null && A.CharacterExtension_get_isHex($self) ? ((_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0()) / 255 : null; + } + } + t2 = alpha == null; + t3 = t2 ? 1 : alpha; + return A.SassColor_SassColor$rgbInternal(red, green, blue, t3, t2 ? new A.SpanColorFormat(t1.spanFrom$1(start)) : null); + }, + _isHexColor$1(interpolation) { + var _0_2, t1, + plain = interpolation.get$asPlain(); + if (typeof plain == "string") { + _0_2 = plain.length; + t1 = true; + if (3 !== _0_2) + if (4 !== _0_2) + if (6 !== _0_2) + t1 = 8 === _0_2; + } else + t1 = false; + if (t1) { + t1 = new A.CodeUnits(plain); + return t1.every$1(t1, new A.StylesheetParser__isHexColor_closure()); + } else + return false; + }, + _hexDigit$0() { + var t1 = this.scanner, + t2 = t1.peekChar$0(); + t2 = t2 == null ? null : A.CharacterExtension_get_isHex(t2); + return t2 === true ? A.asHex(t1.readChar$0()) : t1.error$1(0, "Expected hex digit."); + }, + _minusExpression$0() { + var _this = this, + _0_0 = _this.scanner.peekChar$1(1); + if (A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57 || 46 === _0_0) + return _this._number$0(); + if (_this._lookingAtInterpolatedIdentifier$0()) + return _this.identifierLike$0(); + return _this._unaryOperation$0(); + }, + _importantExpression$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.readChar$0(); + this.whitespace$0(); + this.expectIdentifier$1("important"); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.StringExpression(A.Interpolation$(A._setArrayType(["!important"], type$.JSArray_Object), t2), false); + }, + _unaryOperation$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + operator = _this._unaryOperatorFor$1(t1.readChar$0()); + if (operator == null) + t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); + else if (_this.get$plainCss() && operator !== B.UnaryOperator_SJr) + t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); + _this.whitespace$0(); + return new A.UnaryOperationExpression(operator, _this._singleExpression$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _unaryOperatorFor$1(character) { + var t1; + $label0$0: { + if (43 === character) { + t1 = B.UnaryOperator_cLp; + break $label0$0; + } + if (45 === character) { + t1 = B.UnaryOperator_AiQ; + break $label0$0; + } + if (47 === character) { + t1 = B.UnaryOperator_SJr; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + _number$0() { + var number, unit, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + first = t1.peekChar$0(), + t3 = first !== 43; + if (!t3 || first === 45) + t1.readChar$0(); + if (t1.peekChar$0() !== 46) + _this._consumeNaturalNumber$0(); + _this._tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2 && t3 && first !== 45); + _this._tryExponent$0(); + number = A.double_parse(t1.substring$1(0, t2)); + if (t1.scanChar$1(37)) + unit = "%"; + else { + if (_this.lookingAtIdentifier$0()) + t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; + else + t3 = false; + unit = t3 ? _this.identifier$1$unit(true) : null; + } + return new A.NumberExpression(number, unit, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _consumeNaturalNumber$0() { + var $self, + t1 = this.scanner, + t2 = t1.readChar$0(); + if (!(t2 >= 48 && t2 <= 57)) + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _tryDecimal$1$allowTrailingDot(allowTrailingDot) { + var $self, + t1 = this.scanner; + if (t1.peekChar$0() !== 46) + return; + $self = t1.peekChar$1(1); + if (!($self != null && $self >= 48 && $self <= 57)) { + if (allowTrailingDot) + return; + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); + } + t1.readChar$0(); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _tryExponent$0() { + var next, $self, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first !== 101 && first !== 69) + return; + next = t1.peekChar$1(1); + if (!(next != null && next >= 48 && next <= 57) && next !== 45 && next !== 43) + return; + t1.readChar$0(); + if (43 === next || 45 === next) + t1.readChar$0(); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _unicodeRange$0() { + var firstRangeLength, hasQuestionMark, t2, secondRangeLength, _this = this, + _s26_ = "Expected at most 6 digits.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentChar$1(117); + t1.expectChar$1(43); + for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure());) + ++firstRangeLength; + for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) + ++firstRangeLength; + if (firstRangeLength === 0) + t1.error$1(0, 'Expected hex digit or "?".'); + else if (firstRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(start)); + else if (hasQuestionMark) { + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression(A.Interpolation$(A._setArrayType([t2], type$.JSArray_Object), t1), false); + } + if (t1.scanChar$1(45)) { + t2 = t1._string_scanner$_position; + for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure0());) + ++secondRangeLength; + if (secondRangeLength === 0) + t1.error$1(0, "Expected hex digit."); + else if (secondRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + if (_this._lookingAtInterpolatedIdentifierBody$0()) + t1.error$1(0, "Expected end of identifier."); + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression(A.Interpolation$(A._setArrayType([t2], type$.JSArray_Object), t1), false); + }, + _variable$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + $name = _this.variableName$0(); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sassx20v, t1.spanFrom$1(start)); + return new A.VariableExpression(null, $name, t1.spanFrom$1(start)); + }, + _selector$0() { + var t1, start, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, string$.The_pa, 1); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(38); + if (t1.scanChar$1(38)) { + _this.logger.warn$2$span(0, string$.In_Sas, t1.spanFrom$1(start)); + t1.set$position(t1._string_scanner$_position - 1); + } + return new A.SelectorExpression(t1.spanFrom$1(start)); + }, + interpolatedString$0() { + var t3, t4, buffer, _0_0, second, t5, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 === quote) { + t1.readChar$0(); + break; + } + if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _0_0) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t1.readChar$0(); + t1.readChar$0(); + if (second === 13) + t1.scanChar$1(10); + } else { + t5 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); + t3._contents += t5; + } + continue; + } + if (35 === _0_0 && t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t5); + continue; + } + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + } + return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))), true); + }, + identifierLike$0() { + var invocation, expression, _0_0, t3, t4, t5, _1_0, _2_0, _2_2, _2_4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = A._Cell$(), + t2 = plain != null; + if (t2) { + if (plain === "if" && t1.peekChar$0() === 40) { + invocation = _this._argumentInvocation$0(); + return new A.IfExpression(invocation, identifier.span.expand$1(0, invocation.span)); + } else if (plain === "not") { + _this.whitespace$0(); + expression = _this._singleExpression$0(); + return new A.UnaryOperationExpression(B.UnaryOperator_not_not_not, expression, identifier.span.expand$1(0, expression.get$span(expression))); + } + lower.__late_helper$_value = plain.toLowerCase(); + if (t1.peekChar$0() !== 40) { + switch (plain) { + case "false": + return new A.BooleanExpression(false, identifier.span); + case "null": + return new A.NullExpression(identifier.span); + case "true": + return new A.BooleanExpression(true, identifier.span); + } + _0_0 = $.$get$colorsByName().$index(0, lower._readLocal$0()); + if (_0_0 != null) { + t1 = B.JSNumber_methods.round$0(_0_0._legacyChannel$2(B.RgbColorSpace_mlz, "red")); + t2 = B.JSNumber_methods.round$0(_0_0._legacyChannel$2(B.RgbColorSpace_mlz, "green")); + t3 = B.JSNumber_methods.round$0(_0_0._legacyChannel$2(B.RgbColorSpace_mlz, "blue")); + t4 = _0_0.alphaOrNull; + if (t4 == null) + t4 = 0; + t5 = identifier.span; + return new A.ColorExpression(A.SassColor_SassColor$rgbInternal(t1, t2, t3, t4, new A.SpanColorFormat(t5)), t5); + } + } + _1_0 = _this.trySpecialFunction$2(lower._readLocal$0(), start); + if (_1_0 != null) + return _1_0; + } + _2_0 = t1.peekChar$0(); + _2_2 = 46 === _2_0; + if (_2_2 && t1.peekChar$1(1) === 46) + return new A.StringExpression(identifier, false); + if (_2_2) { + t1.readChar$0(); + if (t2) + return _this.namespacedExpression$2(plain, start); + _this.error$2(0, string$.Interpn, identifier.span); + } + _2_4 = 40 === _2_0; + if (_2_4 && t2) { + t2 = _this._argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")); + t1 = t1.spanFrom$1(start); + return new A.FunctionExpression(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t2, t1); + } + if (_2_4) + return new A.InterpolatedFunctionExpression(identifier, _this._argumentInvocation$0(), t1.spanFrom$1(start)); + return new A.StringExpression(identifier, false); + }, + namespacedExpression$2(namespace, start) { + var $name, t2, t3, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 36) { + $name = _this.variableName$0(); + _this._assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure(_this, start)); + return new A.VariableExpression(namespace, $name, t1.spanFrom$1(start)); + } + t2 = _this._publicIdentifier$0(); + t3 = _this._argumentInvocation$0(); + t1 = t1.spanFrom$1(start); + return new A.FunctionExpression(namespace, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, t3, t1); + }, + trySpecialFunction$2($name, start) { + var t1, buffer, t2, next, t3, _this = this, + normalized = A.unvendor($name); + $label0$0: { + if (!("calc" === normalized && normalized !== $name && _this.scanner.scanChar$1(40))) + t1 = ("element" === normalized || "expression" === normalized) && _this.scanner.scanChar$1(40); + else + t1 = true; + if (t1) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object)); + t1._contents = "" + $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + break $label0$0; + } + if ("progid" === normalized && _this.scanner.scanChar$1(58)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object)); + t1._contents = "" + $name; + t2 = A.Primitives_stringFromCharCode(58); + t1._contents += t2; + t2 = _this.scanner; + next = t2.peekChar$0(); + while (true) { + if (next != null) { + if (!(next >= 97 && next <= 122)) + t3 = next >= 65 && next <= 90; + else + t3 = true; + t3 = t3 || next === 46; + } else + t3 = false; + if (!t3) + break; + t3 = A.Primitives_stringFromCharCode(t2.readChar$0()); + t1._contents += t3; + next = t2.peekChar$0(); + } + t2.expectChar$1(40); + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + break $label0$0; + } + if ("url" === normalized) + return A.NullableExtension_andThen(_this._tryUrlContents$1(start), new A.StylesheetParser_trySpecialFunction_closure()); + return null; + } + buffer.addInterpolation$1(_this._interpolatedDeclarationValue$1$allowEmpty(true)); + t1 = _this.scanner; + t1.expectChar$1(41); + t2 = buffer._interpolation_buffer$_text; + t3 = A.Primitives_stringFromCharCode(41); + t2._contents += t3; + return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _tryUrlContents$2$name(start, $name) { + var t3, t4, buffer, t5, _0_0, _0_6, endPosition, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return null; + _this.whitespaceWithoutComments$0(); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer(t3, t4); + t3._contents = "" + ($name == null ? "url" : $name); + t5 = A.Primitives_stringFromCharCode(40); + t3._contents += t5; + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + break; + if (92 === _0_0) { + t5 = _this.escape$0(); + t3._contents += t5; + continue; + } + _0_6 = 35 === _0_0; + if (_0_6 && t1.peekChar$1(1) === 123) { + t5 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(t5); + continue; + } + t5 = true; + if (33 !== _0_0) + if (37 !== _0_0) + if (38 !== _0_0) + if (!_0_6) + t5 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; + if (t5) { + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + continue; + } + if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { + _this.whitespaceWithoutComments$0(); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t2; + endPosition = t1._string_scanner$_position; + t2 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t2, t5, endPosition); + t1._FileSpan$3(t2, t5, endPosition); + t5 = type$.Object; + t2 = A.List_List$of(t4, true, t5); + t4 = t3._contents; + if (t4.length !== 0) + t2.push(t4.charCodeAt(0) == 0 ? t4 : t4); + result = A.List_List$from(t2, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t3 = new A.Interpolation(result, t1); + t3.Interpolation$2(t2, t1); + return t3; + } + break; + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return null; + }, + _tryUrlContents$1(start) { + return this._tryUrlContents$2$name(start, null); + }, + dynamicUrl$0() { + var _0_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentifier$1("url"); + _0_0 = _this._tryUrlContents$1(start); + if (_0_0 != null) + return new A.StringExpression(_0_0, false); + return new A.InterpolatedFunctionExpression(A.Interpolation$(A._setArrayType(["url"], type$.JSArray_Object), t1.spanFrom$1(start)), _this._argumentInvocation$0(), t1.spanFrom$1(start)); + }, + almostAnyValue$1$omitComments(omitComments) { + var t4, t5, t6, _2_0, t7, _0_0, _0_2, start, end, _0_4, identifier, _1_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + for (t4 = t1.string, t5 = t4.length, t6 = !omitComments; true;) + $label0$0: { + _2_0 = t1.peekChar$0(); + if (92 === _2_0) { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + _0_2 = 42 === _0_0; + if (_0_2 && t6) { + t7 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t7.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_2) { + _this.loudComment$0(); + break $label1$1; + } + _0_4 = 47 === _0_0; + if (_0_4 && t6) { + t7 = _this.get$silentComment(); + start = t1._string_scanner$_position; + t7.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_4) { + _this.silentComment$0(); + break $label1$1; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + break $label0$0; + } + if (13 === _2_0 || 10 === _2_0 || 12 === _2_0) { + if (_this.get$indented()) + break; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + break $label0$0; + } + if (33 === _2_0 || 59 === _2_0 || 123 === _2_0 || 125 === _2_0) + break; + if (117 === _2_0 || 85 === _2_0) { + t7 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + continue; + } + _1_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t7 === 0 ? 1 / t7 < 0 : t7 < 0) || t7 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t7, null)); + t1._string_scanner$_position = t7; + t1._lastMatch = null; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + break $label0$0; + } + if (_2_0 == null) + break; + t7 = _this.lookingAtIdentifier$0(); + if (t7) { + t7 = _this.identifier$0(); + t3._contents += t7; + break $label0$0; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + almostAnyValue$0() { + return this.almostAnyValue$1$omitComments(false); + }, + _interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, allowOpenBrace, allowSemicolon, silentComments) { + var t4, t5, t6, t7, t8, wroteNewline, _2_0, wroteNewline0, t9, _0_0, start, end, _2_14_isSet, _2_14, t10, _2_18_isSet, _2_20, _2_18, _2_20_isSet, _2_22, bracket, identifier, _1_0, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)), + brackets = A._setArrayType([], type$.JSArray_int); + for (t4 = !allowOpenBrace, t5 = t1.string, t6 = t5.length, t7 = !allowColon, t8 = !allowSemicolon, wroteNewline = false; true;) + $label0$0: { + _2_0 = t1.peekChar$0(); + wroteNewline0 = false; + if (92 === _2_0) { + t9 = _this.escape$1$identifierStart(true); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + if (42 === _0_0) { + t9 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t9.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t5, start, end); + break $label1$1; + } + if (47 === _0_0 && silentComments) { + _this.silentComment$0(); + break $label1$1; + } + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + _2_14_isSet = 32 !== _2_0; + if (_2_14_isSet) { + _2_14 = 9 === _2_0; + t9 = _2_14; + } else { + _2_14 = _null; + t9 = true; + } + t10 = false; + if (t9) + if (!wroteNewline) { + t9 = t1.peekChar$1(1); + t9 = t9 === 32 || t9 === 9 || t9 === 10 || t9 === 13 || t9 === 12; + } else + t9 = t10; + else + t9 = t10; + if (t9) { + t1.readChar$0(); + break $label0$0; + } + if (_2_14_isSet) + t9 = _2_14; + else + t9 = true; + if (t9) { + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + break $label0$0; + } + _2_18_isSet = 10 !== _2_0; + _2_20 = _null; + t9 = true; + if (_2_18_isSet) { + _2_18 = 13 === _2_0; + _2_20_isSet = !_2_18; + if (_2_20_isSet) { + _2_20 = 12 === _2_0; + t9 = _2_20; + } + } else { + _2_18 = _null; + _2_20_isSet = false; + } + if (t9 && _this.get$indented()) + break; + t9 = true; + if (_2_18_isSet) + if (!_2_18) + t9 = _2_20_isSet ? _2_20 : 12 === _2_0; + if (t9) { + t9 = t1.peekChar$1(-1); + if (!(t9 === 10 || t9 === 13 || t9 === 12)) + t3._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break $label0$0; + } + _2_22 = 123 === _2_0; + if (_2_22 && t4) + break; + if (40 !== _2_0) + t9 = _2_22 || 91 === _2_0; + else + t9 = true; + if (t9) { + bracket = t1.readChar$0(); + t9 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t9; + brackets.push(A.opposite(bracket)); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (41 === _2_0 || 125 === _2_0 || 93 === _2_0) { + if (brackets.length === 0) + break; + bracket = brackets.pop(); + t1.expectChar$1(bracket); + t9 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (59 === _2_0) { + if (t8 && brackets.length === 0) + break; + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (58 === _2_0) { + if (t7 && brackets.length === 0) + break; + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (117 === _2_0 || 85 === _2_0) { + t9 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + wroteNewline = wroteNewline0; + continue; + } + _1_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t9), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t9 === 0 ? 1 / t9 < 0 : t9 < 0) || t9 > t6) + A.throwExpression(A.ArgumentError$("Invalid position " + t9, _null)); + t1._string_scanner$_position = t9; + t1._lastMatch = null; + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (_2_0 == null) + break; + t9 = _this.lookingAtIdentifier$0(); + if (t9) { + t9 = _this.identifier$0(); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._interpolation_buffer$_contents.length === 0 && t3._contents.length === 0) + t1.error$1(0, "Expected token."); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { + return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, false, true); + }, + _interpolatedDeclarationValue$1$allowOpenBrace(allowOpenBrace) { + return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, allowOpenBrace, false, true); + }, + _interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(allowEmpty, allowSemicolon) { + return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, allowSemicolon, true); + }, + _interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(allowColon, allowEmpty, allowSemicolon) { + return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, true, allowSemicolon, true); + }, + _interpolatedDeclarationValue$0() { + return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, true); + }, + _interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(allowEmpty, allowOpenBrace) { + return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, allowOpenBrace, false, true); + }, + _interpolatedDeclarationValue$1$silentComments(silentComments) { + return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, silentComments); + }, + interpolatedIdentifier$0() { + var t4, _0_0, _this = this, + _s20_ = "Expected identifier.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + t2 = new A.StringBuffer(""), + t3 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer(t2, t3); + if (t1.scanChar$1(45)) { + t4 = A.Primitives_stringFromCharCode(45); + t2._contents += t4; + if (t1.scanChar$1(45)) { + t3 = A.Primitives_stringFromCharCode(45); + t2._contents += t3; + _this._interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + } + $label0$0: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s20_); + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128) { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + break $label0$0; + } + if (92 === _0_0) { + t3 = _this.escape$1$identifierStart(true); + t2._contents += t3; + break $label0$0; + } + if (35 === _0_0 && t1.peekChar$1(1) === 123) { + t2 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t3.push(t2); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + }, + _interpolatedIdentifierBody$1(buffer) { + var t1, t2, t3, _0_0, t4; + for (t1 = buffer._interpolation_buffer$_contents, t2 = this.scanner, t3 = buffer._interpolation_buffer$_text; true;) { + _0_0 = t2.peekChar$0(); + if (_0_0 == null) + break; + t4 = true; + if (95 !== _0_0) + if (45 !== _0_0) { + if (!(_0_0 >= 97 && _0_0 <= 122)) + t4 = _0_0 >= 65 && _0_0 <= 90; + else + t4 = true; + if (!t4) + t4 = _0_0 >= 48 && _0_0 <= 57; + else + t4 = true; + t4 = t4 || _0_0 >= 128; + } + if (t4) { + t4 = A.Primitives_stringFromCharCode(t2.readChar$0()); + t3._contents += t4; + continue; + } + if (92 === _0_0) { + t4 = this.escape$0(); + t3._contents += t4; + continue; + } + if (35 === _0_0 && t2.peekChar$1(1) === 123) { + t4 = this.singleInterpolation$0(); + buffer._flushText$0(); + t1.push(t4); + continue; + } + break; + } + }, + singleInterpolation$0() { + var contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("#{"); + _this.whitespace$0(); + contents = _this._expression$0(); + t1.expectChar$1(125); + if (_this.get$plainCss()) + _this.error$2(0, string$.Interpp, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + return contents; + }, + _mediaQueryList$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object)); + for (; true;) { + _this.whitespace$0(); + _this._stylesheet$_mediaQuery$1(buffer); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t4 = A.Primitives_stringFromCharCode(44); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet$_mediaQuery$1(buffer) { + var identifier1, t1, t2, identifier2, _this = this, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + _this._stylesheet$_mediaInParens$1(buffer); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + buffer._interpolation_buffer$_text._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); + } else if (_this.scanIdentifier$1("or")) { + buffer._interpolation_buffer$_text._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, "or"); + } + return; + } + identifier1 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase(identifier1.get$asPlain(), "not")) { + _this.expectWhitespace$0(); + if (!_this._lookingAtInterpolatedIdentifier$0()) { + buffer._interpolation_buffer$_text._contents += "not "; + _this._mediaOrInterp$1(buffer); + return; + } + } + _this.whitespace$0(); + buffer.addInterpolation$1(identifier1); + if (!_this._lookingAtInterpolatedIdentifier$0()) + return; + t1 = buffer._interpolation_buffer$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + identifier2 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase(identifier2.get$asPlain(), _s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else { + _this.whitespace$0(); + buffer.addInterpolation$1(identifier2); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else + return; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + t1._contents += "not "; + _this._mediaOrInterp$1(buffer); + return; + } + _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); + return; + }, + _stylesheet$_mediaLogicSequence$2(buffer, operator) { + var t1, t2, _this = this; + for (t1 = buffer._interpolation_buffer$_text; true;) { + _this._mediaOrInterp$1(buffer); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return; + _this.expectWhitespace$0(); + t2 = A.Primitives_stringFromCharCode(32); + t2 = t1._contents += t2; + t1._contents = t2 + operator; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + } + }, + _mediaOrInterp$1(buffer) { + var interpolation; + if (this.scanner.peekChar$0() === 35) { + interpolation = this.singleInterpolation$0(); + buffer.addInterpolation$1(A.Interpolation$(A._setArrayType([interpolation], type$.JSArray_Object), interpolation.get$span(interpolation))); + } else + this._stylesheet$_mediaInParens$1(buffer); + }, + _stylesheet$_mediaInParens$1(buffer) { + var t2, t3, t4, next, t5, _this = this, + t1 = _this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = buffer._interpolation_buffer$_text; + t3 = A.Primitives_stringFromCharCode(40); + t2._contents += t3; + _this.whitespace$0(); + if (t1.peekChar$0() === 40) { + _this._stylesheet$_mediaInParens$1(buffer); + _this.whitespace$0(); + if (_this.scanIdentifier$1("and")) { + t2._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, "and"); + } else if (_this.scanIdentifier$1("or")) { + t2._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, "or"); + } + } else if (_this.scanIdentifier$1("not")) { + t2._contents += "not "; + _this.expectWhitespace$0(); + _this._mediaOrInterp$1(buffer); + } else { + t3 = _this._expressionUntilComparison$0(); + buffer._flushText$0(); + t4 = buffer._interpolation_buffer$_contents; + t4.push(t3); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t3 = A.Primitives_stringFromCharCode(58); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + t3 = _this._expression$0(); + buffer._flushText$0(); + t4.push(t3); + } else { + next = t1.peekChar$0(); + t3 = 60 !== next; + if (!t3 || 62 === next || 61 === next) { + t5 = A.Primitives_stringFromCharCode(32); + t2._contents += t5; + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t5; + if ((!t3 || 62 === next) && t1.scanChar$1(61)) { + t5 = A.Primitives_stringFromCharCode(61); + t2._contents += t5; + } + t5 = A.Primitives_stringFromCharCode(32); + t2._contents += t5; + _this.whitespace$0(); + t5 = _this._expressionUntilComparison$0(); + buffer._flushText$0(); + t4.push(t5); + if (!t3 || 62 === next) { + next.toString; + t3 = t1.scanChar$1(next); + } else + t3 = false; + if (t3) { + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(next); + t2._contents += t3; + if (t1.scanChar$1(61)) { + t3 = A.Primitives_stringFromCharCode(61); + t2._contents += t3; + } + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + _this.whitespace$0(); + t3 = _this._expressionUntilComparison$0(); + buffer._flushText$0(); + t4.push(t3); + } + } + } + } + t1.expectChar$1(41); + _this.whitespace$0(); + t1 = A.Primitives_stringFromCharCode(41); + t2._contents += t1; + }, + _expressionUntilComparison$0() { + return this._expression$1$until(new A.StylesheetParser__expressionUntilComparison_closure(this)); + }, + _supportsCondition$0() { + var condition, operator, right, endPosition, t3, t4, lowerOperator, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + return new A.SupportsNegation(_this._supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + condition = _this._supportsConditionInParens$0(); + _this.whitespace$0(); + for (operator = null; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("or")) + operator = "or"; + else { + _this.expectIdentifier$1("and"); + operator = "and"; + } + _this.whitespace$0(); + right = _this._supportsConditionInParens$0(); + endPosition = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = new A._FileSpan(t3, t2, endPosition); + t4._FileSpan$3(t3, t2, endPosition); + condition = new A.SupportsOperation(condition, right, operator, t4); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return condition; + }, + _supportsConditionInParens$0() { + var $name, nameStart, wasInParentheses, identifier, _1_0, operation, contents, identifier0, t2, $arguments, _0_0, _0_4_isSet, _0_4, _0_40, condition, exception, declaration, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._lookingAtInterpolatedIdentifier$0()) { + identifier0 = _this.interpolatedIdentifier$0(); + t2 = identifier0.get$asPlain(); + if ((t2 == null ? null : t2.toLowerCase()) === "not") + _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); + if (t1.scanChar$1(40)) { + $arguments = _this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction(identifier0, $arguments, t1.spanFrom$1(start)); + } else { + _0_0 = identifier0.contents; + _0_4_isSet = _0_0.length === 1; + _0_4 = null; + if (_0_4_isSet) { + _0_40 = _0_0[0]; + t2 = _0_40; + _0_4 = t2; + t2 = t2 instanceof A.Expression; + } else + t2 = false; + if (t2) { + t2 = _0_4_isSet ? _0_4 : _0_0[0]; + return new A.SupportsInterpolation(type$.Expression._as(t2), t1.spanFrom$1(start)); + } else + _this.error$2(0, "Expected @supports condition.", identifier0.span); + } + } + t1.expectChar$1(40); + _this.whitespace$0(); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + condition = _this._supportsConditionInParens$0(); + t1.expectChar$1(41); + return new A.SupportsNegation(condition, t1.spanFrom$1(start)); + } else if (t1.peekChar$0() === 40) { + condition = _this._supportsCondition$0(); + t1.expectChar$1(41); + return condition; + } + $name = null; + nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + wasInParentheses = _this._inParentheses; + try { + $name = _this._expression$0(); + t1.expectChar$1(58); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(nameStart); + _this._inParentheses = wasInParentheses; + identifier = _this.interpolatedIdentifier$0(); + _1_0 = _this._trySupportsOperation$2(identifier, nameStart); + operation = null; + if (_1_0 != null) { + operation = _1_0; + t1.expectChar$1(41); + return operation; + } + t2 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t2.addInterpolation$1(identifier); + t2.addInterpolation$1(_this._interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(false, true, true)); + contents = t2.interpolation$1(t1.spanFrom$1(nameStart)); + if (t1.peekChar$0() === 58) + throw exception; + t1.expectChar$1(41); + return new A.SupportsAnything(contents, t1.spanFrom$1(start)); + } else + throw exception; + } + declaration = _this._supportsDeclarationValue$2($name, start); + t1.expectChar$1(41); + return declaration; + }, + _supportsDeclarationValue$2($name, start) { + var value, _this = this, + t1 = false; + if ($name instanceof A.StringExpression) + if (!$name.hasQuotes) + t1 = B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); + if (t1) + value = new A.StringExpression(_this._interpolatedDeclarationValue$0(), false); + else { + _this.whitespace$0(); + value = _this._expression$0(); + } + return new A.SupportsDeclaration($name, value, _this.scanner.spanFrom$1(start)); + }, + _trySupportsOperation$2(interpolation, start) { + var expression, beforeWhitespace, t2, t3, operator, operation, right, t4, endPosition, t5, t6, lowerOperator, _this = this, _null = null, + t1 = interpolation.contents; + if (t1.length !== 1) + return _null; + expression = B.JSArray_methods.get$first(t1); + if (!(expression instanceof A.Expression)) + return _null; + t1 = _this.scanner; + beforeWhitespace = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.whitespace$0(); + for (t2 = start.position, t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("and")) + operator = "and"; + else { + if (!_this.scanIdentifier$1("or")) { + if (beforeWhitespace._scanner !== t1) + A.throwExpression(A.ArgumentError$(string$.The_gi, _null)); + t2 = beforeWhitespace.position; + if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) + A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); + t1._string_scanner$_position = t2; + return t1._lastMatch = null; + } + operator = "or"; + } + _this.whitespace$0(); + right = _this._supportsConditionInParens$0(); + t4 = operation == null ? new A.SupportsInterpolation(expression, t3) : operation; + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t2, endPosition); + t6._FileSpan$3(t5, t2, endPosition); + operation = new A.SupportsOperation(t4, right, operator, t6); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return operation; + }, + _lookingAtInterpolatedIdentifier$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_1_0 == null) { + t1 = t2; + break $label0$0; + } + if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (35 === _1_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 == null) { + t1 = t2; + break $label1$1; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(2) === 123; + break $label1$1; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128 || 92 === _0_0 || 45 === _0_0) { + t1 = true; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _lookingAtPotentialPropertyHack$0() { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (58 === _0_0 || 42 === _0_0 || 46 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) !== 123; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _lookingAtInterpolatedIdentifierBody$0() { + var t2, t3, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_0_0 == null) { + t1 = t2; + break $label0$0; + } + if (!(_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128)) + t3 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t3 = true; + if (t3 || 92 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _lookingAtExpression$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = true; + if (_1_0 == null) { + t1 = false; + break $label0$0; + } + if (46 === _1_0) { + t1 = t1.peekChar$1(1) !== 46; + break $label0$0; + } + if (33 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 != null) + if (105 !== _0_0) + if (73 !== _0_0) + t1 = _0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12; + else + t1 = t2; + else + t1 = t2; + else + t1 = t2; + if (t1) + break $label1$1; + break $label1$1; + } + break $label0$0; + } + t1 = true; + if (40 !== _1_0) + if (47 !== _1_0) + if (91 !== _1_0) + if (39 !== _1_0) + if (34 !== _1_0) + if (35 !== _1_0) + if (43 !== _1_0) + if (45 !== _1_0) + if (92 !== _1_0) + if (36 !== _1_0) + if (38 !== _1_0) + if (!(_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128)) + t1 = _1_0 >= 48 && _1_0 <= 57; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _withChildren$1$3(child, start, create) { + var result = create.call$2(this.children$1(0, child), this.scanner.spanFrom$1(start)); + this.whitespaceWithoutComments$0(); + return result; + }, + _withChildren$3(child, start, create) { + return this._withChildren$1$3(child, start, create, type$.dynamic); + }, + _urlString$0() { + var innerError, stackTrace, t2, exception, + t1 = this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + url = this.string$0(); + try { + t2 = A.Uri_parse(url); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + if (type$.FormatException._is(t2)) { + innerError = t2; + stackTrace = A.getTraceFromException(exception); + this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), t1.spanFrom$1(start), stackTrace); + } else + throw exception; + } + }, + _publicIdentifier$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + result = _this.identifier$0(); + _this._assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure(_this, new A._SpanScannerState(t1, t2))); + return result; + }, + _assertPublic$2(identifier, span) { + var first = identifier.charCodeAt(0); + if (!(first === 45 || first === 95)) + return; + this.error$2(0, string$.Privat, span.call$0()); + }, + _addOrInject$2(buffer, expression) { + if (expression instanceof A.StringExpression && !expression.hasQuotes) + buffer.addInterpolation$1(expression.text); + else { + buffer._flushText$0(); + buffer._interpolation_buffer$_contents.push(expression); + } + }, + get$plainCss() { + return false; + } + }; + A.StylesheetParser_parse_closure.prototype = { + call$0() { + var statements, t4, + t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.scanChar$1(65279); + statements = t1.statements$1(new A.StylesheetParser_parse__closure(t1)); + t2.expectDone$0(); + t4 = t1._globalVariables.get$values(0); + B.JSArray_methods.addAll$1(statements, A.MappedIterable_MappedIterable(t4, new A.StylesheetParser_parse__closure0(), A._instanceType(t4)._eval$1("Iterable.E"), type$.Statement)); + return A.Stylesheet$internal(statements, t2.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.get$plainCss()); + }, + $signature: 561 + }; + A.StylesheetParser_parse__closure.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.scan$1("@charset")) { + t1.whitespace$0(); + t1.string$0(); + return null; + } + return t1._statement$1$root(true); + }, + $signature: 562 + }; + A.StylesheetParser_parse__closure0.prototype = { + call$1(declaration) { + var t1 = declaration.expression; + return A.VariableDeclaration$(declaration.name, new A.NullExpression(t1.get$span(t1)), declaration.span, null, false, true, null); + }, + $signature: 625 + }; + A.StylesheetParser_parseArgumentDeclaration_closure.prototype = { + call$0() { + var $arguments, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$2$name(64, "@-rule"); + t1.identifier$0(); + t1.whitespace$0(); + t1.identifier$0(); + $arguments = t1._argumentDeclaration$0(); + t1.whitespace$0(); + t2.expectChar$1(123); + return $arguments; + }, + $signature: 274 + }; + A.StylesheetParser_parseVariableDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this; + return t1.lookingAtIdentifier$0() ? t1._variableDeclarationWithNamespace$0() : t1.variableDeclarationWithoutNamespace$0(); + }, + $signature: 158 + }; + A.StylesheetParser_parseUseRule_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.expectChar$2$name(64, "@-rule"); + t1.expectIdentifier$1("use"); + t1.whitespace$0(); + return t1._useRule$1(new A._SpanScannerState(t2, t3)); + }, + $signature: 293 + }; + A.StylesheetParser__parseSingleProduction_closure.prototype = { + call$0() { + var result = this.production.call$0(); + this.$this.scanner.expectDone$0(); + return result; + }, + $signature() { + return this.T._eval$1("0()"); + } + }; + A.StylesheetParser__statement_closure.prototype = { + call$0() { + return this.$this._statement$0(); + }, + $signature: 124 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 30 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure0.prototype = { + call$0() { + return this.declaration; + }, + $signature: 158 + }; + A.StylesheetParser__styleRule_closure.prototype = { + call$2(children, span) { + var _this = this, + t1 = _this.$this; + if (t1.get$indented() && children.length === 0) + t1.logger.warn$2$span(0, string$.This_s, _this._box_0.interpolation.span); + t1._inStyleRule = _this.wasInStyleRule; + return A.StyleRule$(_this._box_0.interpolation, children, t1.scanner.spanFrom$1(_this.start)); + }, + $signature: 295 + }; + A.StylesheetParser__tryDeclarationChildren_closure.prototype = { + call$2(children, span) { + return A.Declaration$nested(this.name, children, span, this.value); + }, + $signature: 296 + }; + A.StylesheetParser__atRootRule_closure.prototype = { + call$2(children, span) { + return A.AtRootRule$(children, span, this.query); + }, + $signature: 159 + }; + A.StylesheetParser__atRootRule_closure0.prototype = { + call$2(children, span) { + return A.AtRootRule$(children, span, null); + }, + $signature: 159 + }; + A.StylesheetParser__eachRule_closure.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._inControlDirective = _this.wasInControlDirective; + return A.EachRule$(_this.variables, _this.list, children, span); + }, + $signature: 299 + }; + A.StylesheetParser__functionRule_closure.prototype = { + call$2(children, span) { + return A.FunctionRule$(this.name, this.$arguments, children, span, this.precedingComment); + }, + $signature: 302 + }; + A.StylesheetParser__forRule_closure.prototype = { + call$0() { + var t1 = this.$this; + if (!t1.lookingAtIdentifier$0()) + return false; + if (t1.scanIdentifier$1("to")) + return this._box_0.exclusive = true; + else if (t1.scanIdentifier$1("through")) { + this._box_0.exclusive = false; + return true; + } else + return false; + }, + $signature: 23 + }; + A.StylesheetParser__forRule_closure0.prototype = { + call$2(children, span) { + var t1, _this = this; + _this.$this._inControlDirective = _this.wasInControlDirective; + t1 = _this._box_0.exclusive; + t1.toString; + return A.ForRule$(_this.variable, _this.from, _this.to, children, span, t1); + }, + $signature: 309 + }; + A.StylesheetParser__memberList_closure.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.peekChar$0() === 36) + this.variables.add$1(0, t1.variableName$0()); + else + this.identifiers.add$1(0, t1.identifier$1$normalize(true)); + }, + $signature: 1 + }; + A.StylesheetParser__includeRule_closure.prototype = { + call$2(children, span) { + return A.ContentBlock$(this.contentArguments_, children, span); + }, + $signature: 313 + }; + A.StylesheetParser_mediaRule_closure.prototype = { + call$2(children, span) { + return A.MediaRule$(this.query, children, span); + }, + $signature: 314 + }; + A.StylesheetParser__mixinRule_closure.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet$_inMixin = false; + return A.MixinRule$(_this.name, _this.$arguments, children, span, _this.precedingComment); + }, + $signature: 317 + }; + A.StylesheetParser_mozDocumentRule_closure.prototype = { + call$2(children, span) { + var _this = this; + if (_this._box_0.needsDeprecationWarning) + A.WarnForDeprecation_warnForDeprecation(_this.$this.logger, B.Deprecation_uNF, string$.x40_moz_, span, null); + return A.AtRule$(_this.name, span, children, _this.value); + }, + $signature: 160 + }; + A.StylesheetParser_supportsRule_closure.prototype = { + call$2(children, span) { + return A.SupportsRule$(this.condition, children, span); + }, + $signature: 320 + }; + A.StylesheetParser__whileRule_closure.prototype = { + call$2(children, span) { + this.$this._inControlDirective = this.wasInControlDirective; + return A.WhileRule$(this.condition, children, span); + }, + $signature: 323 + }; + A.StylesheetParser_unknownAtRule_closure.prototype = { + call$2(children, span) { + return A.AtRule$(this.name, span, children, this._box_0.value); + }, + $signature: 160 + }; + A.StylesheetParser__expression_resetState.prototype = { + call$0() { + var t2, + t1 = this._box_0; + t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; + t2 = this.$this; + t2.scanner.set$state(this.start); + t1.allowSlash = true; + t1.singleExpression_ = t2._singleExpression$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOneOperation.prototype = { + call$0() { + var t2, t3, t4, t5, t6, t7, _this = this, + t1 = _this._box_0, + operator = t1.operators_.pop(), + left = t1.operands_.pop(), + right = t1.singleExpression_; + if (right == null) { + t2 = _this.$this.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); + } + if (t1.allowSlash) { + t2 = _this.$this; + t2 = !t2._inParentheses && operator === B.BinaryOperator_U77 && t2._isSlashOperand$1(left) && t2._isSlashOperand$1(right); + } else + t2 = false; + if (t2) + t1.singleExpression_ = new A.BinaryOperationExpression(B.BinaryOperator_U77, left, right, true); + else { + t1.singleExpression_ = new A.BinaryOperationExpression(operator, left, right, false); + t2 = t1.allowSlash = false; + if (B.BinaryOperator_u15 === operator || B.BinaryOperator_SjO === operator) { + t3 = _this.$this; + t4 = t3.scanner.string; + t5 = right.get$span(right); + t5 = t5.get$start(t5); + t6 = right.get$span(right); + t7 = operator.operator; + if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { + t2 = left.get$span(left); + t2 = t4.charCodeAt(t2.get$end(t2).offset); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } + if (t2) { + t2 = left.toString$0(0); + t4 = right.toString$0(0); + t5 = left.toString$0(0); + t6 = right.toString$0(0); + t1 = t1.singleExpression_; + A.WarnForDeprecation_warnForDeprecation(t3.logger, B.Deprecation_2Vk, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, t1.get$span(t1), null); + } + } + } + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOperations.prototype = { + call$0() { + var t1, + operators = this._box_0.operators_; + if (operators == null) + return; + for (t1 = this.resolveOneOperation; operators.length !== 0;) + t1.call$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_addSingleExpression.prototype = { + call$1(expression) { + var t2, spaceExpressions, _this = this, + t1 = _this._box_0; + if (t1.singleExpression_ != null) { + t2 = _this.$this; + if (t2._inParentheses) { + t2._inParentheses = false; + if (t1.allowSlash) { + _this.resetState.call$0(); + return; + } + } + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression); + _this.resolveOperations.call$0(); + t2 = t1.singleExpression_; + t2.toString; + spaceExpressions.push(t2); + t1.allowSlash = true; + } + t1.singleExpression_ = expression; + }, + $signature: 324 + }; + A.StylesheetParser__expression_addOperator.prototype = { + call$1(operator) { + var t2, t3, operators, operands, t4, singleExpression, + t1 = this.$this; + if (t1.get$plainCss() && operator !== B.BinaryOperator_wdM && operator !== B.BinaryOperator_u15 && operator !== B.BinaryOperator_SjO && operator !== B.BinaryOperator_2No && operator !== B.BinaryOperator_U77) { + t2 = t1.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); + } + t2 = this._box_0; + t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_U77; + operators = t2.operators_; + if (operators == null) + operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator); + operands = t2.operands_; + if (operands == null) + operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression); + t3 = this.resolveOneOperation; + t4 = operator.precedence; + while (true) { + if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) + break; + t3.call$0(); + } + operators.push(operator); + singleExpression = t2.singleExpression_; + if (singleExpression == null) { + t3 = t1.scanner; + t4 = operator.operator.length; + t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); + } + operands.push(singleExpression); + t1.whitespace$0(); + t2.singleExpression_ = t1._singleExpression$0(); + }, + $signature: 325 + }; + A.StylesheetParser__expression_resolveSpaceExpressions.prototype = { + call$0() { + var t1, spaceExpressions, singleExpression, t2; + this.resolveOperations.call$0(); + t1 = this._box_0; + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + return; + singleExpression = t1.singleExpression_; + if (singleExpression == null) + this.$this.scanner.error$1(0, "Expected expression."); + spaceExpressions.push(singleExpression); + t2 = B.JSArray_methods.get$first(spaceExpressions); + t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); + t1.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_nbm, false, t2); + t1.spaceExpressions_ = null; + }, + $signature: 0 + }; + A.StylesheetParser_expressionUntilComma_closure.prototype = { + call$0() { + return this.$this.scanner.peekChar$0() === 44; + }, + $signature: 23 + }; + A.StylesheetParser__isHexColor_closure.prototype = { + call$1(char) { + return A.CharacterExtension_get_isHex(char); + }, + $signature: 50 + }; + A.StylesheetParser__unicodeRange_closure.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex(char); + }, + $signature: 32 + }; + A.StylesheetParser__unicodeRange_closure0.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex(char); + }, + $signature: 32 + }; + A.StylesheetParser_namespacedExpression_closure.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 30 + }; + A.StylesheetParser_trySpecialFunction_closure.prototype = { + call$1(contents) { + return new A.StringExpression(contents, false); + }, + $signature: 326 + }; + A.StylesheetParser__expressionUntilComparison_closure.prototype = { + call$0() { + var t1 = this.$this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (61 === _0_0) { + t1 = t1.peekChar$1(1) !== 61; + break $label0$0; + } + if (60 === _0_0 || 62 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 23 + }; + A.StylesheetParser__publicIdentifier_closure.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 30 + }; + A.StylesheetGraph.prototype = { + modifiedSince$3(url, since, baseImporter) { + var node = this._stylesheet_graph$_add$3(url, baseImporter, null); + if (node == null) + return true; + return new A.StylesheetGraph_modifiedSince_transitiveModificationTime(this).call$1(node).isAfter$1(since); + }, + _stylesheet_graph$_add$3(url, baseImporter, baseUrl) { + var importer, canonicalUrl, _this = this, + result = _this._ignoreErrors$1(new A.StylesheetGraph__add_closure(_this, url, baseImporter, baseUrl)); + if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(result)) { + importer = result._0; + canonicalUrl = result._1; + _this.addCanonical$3(importer, canonicalUrl, result._2); + return _this._nodes.$index(0, canonicalUrl); + } else + return null; + }, + addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, recanonicalize) { + var stylesheet, _this = this, + t1 = _this._nodes; + if (t1.$index(0, canonicalUrl) != null) + return B.Set_empty3; + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_addCanonical_closure(_this, importer, canonicalUrl, originalUrl)); + if (stylesheet == null) + return B.Set_empty3; + t1.$indexSet(0, canonicalUrl, A.StylesheetNode$_(stylesheet, importer, canonicalUrl, _this._upstreamNodes$3(stylesheet, importer, canonicalUrl))); + return recanonicalize ? _this._recanonicalizeImports$2(importer, canonicalUrl) : B.Set_empty3; + }, + addCanonical$3(importer, canonicalUrl, originalUrl) { + return this.addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, true); + }, + _upstreamNodes$3(stylesheet, baseImporter, baseUrl) { + var t6, t7, t8, t9, t10, + t1 = type$.Uri, + active = A.LinkedHashSet_LinkedHashSet$_literal([baseUrl], t1), + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1), + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1), + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1), + t5 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + new A._FindDependenciesVisitor(t2, t3, t4, t5, A.LinkedHashSet_LinkedHashSet$_empty(type$.nullable_String)).visitChildren$1(stylesheet.children); + t6 = type$.UnmodifiableSetView_Uri; + t2 = new A.UnmodifiableSetView0(t2, t6); + t3 = new A.UnmodifiableSetView0(t3, t6); + t4 = new A.UnmodifiableSetView0(t4, t6); + t7 = type$.nullable_StylesheetNode; + t8 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t7); + for (t9 = new A.UnionSet(A.LinkedHashSet_LinkedHashSet$_literal([t2, t3, t4], type$.Set_Uri), type$.UnionSet_Uri).get$_union_set$_iterable(), t9 = t9.get$iterator(t9); t9.moveNext$0();) { + t10 = t9.get$current(t9); + t8.$indexSet(0, t10, this._nodeFor$4(t10, baseImporter, baseUrl, active)); + } + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t7); + for (t2 = new A.DependencyReport(t2, t3, t4, new A.UnmodifiableSetView0(t5, t6)).imports._base.get$iterator(0); t2.moveNext$0();) { + t3 = t2.get$current(0); + t1.$indexSet(0, t3, this._nodeFor$5$forImport(t3, baseImporter, baseUrl, active, true)); + } + return new A._Record_2_imports_modules(t1, t8); + }, + reload$1(canonicalUrl) { + var stylesheet, upstream, _this = this, + node = _this._nodes.$index(0, canonicalUrl); + if (node == null) + throw A.wrapException(A.StateError$(canonicalUrl.toString$0(0) + " is not in the dependency graph.")); + _this._transitiveModificationTimes.clear$0(0); + _this.importCache.clearImport$1(canonicalUrl); + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_reload_closure(_this, node, canonicalUrl)); + if (stylesheet == null) + return false; + node._stylesheet = stylesheet; + upstream = _this._upstreamNodes$3(stylesheet, node.importer, canonicalUrl); + node._replaceUpstream$2(upstream._1, upstream._0); + return true; + }, + _recanonicalizeImports$2(importer, canonicalUrl) { + var t1, t2, t3, t4, t5, newUpstream, newUpstreamImports, _this = this, + changed = A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode); + for (t1 = _this._nodes.get$values(0).get$iterator(0), t2 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, t3 = type$.Uri, t4 = type$.nullable_StylesheetNode; t1.moveNext$0();) { + t5 = t1.get$current(0); + newUpstream = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, false); + newUpstreamImports = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, true); + if (newUpstream.__js_helper$_length !== 0 || newUpstreamImports.__js_helper$_length !== 0) { + changed.add$1(0, t5); + t5._replaceUpstream$2(A.mergeMaps(new A.UnmodifiableMapView(t5._upstream, t2), newUpstream, t3, t4), A.mergeMaps(new A.UnmodifiableMapView(t5._upstreamImports, t2), newUpstreamImports, t3, t4)); + } + } + if (changed._collection$_length !== 0) + _this._transitiveModificationTimes.clear$0(0); + return changed; + }, + _recanonicalizeImportsForNode$4$forImport(node, importer, canonicalUrl, forImport) { + var url, result, t2, newMap, t3, t4, t5, t6, upstream, exception, newCanonicalUrl, + t1 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, + map = forImport ? new A.UnmodifiableMapView(node._upstreamImports, t1) : new A.UnmodifiableMapView(node._upstream, t1); + t1 = type$.Uri; + t2 = type$.nullable_StylesheetNode; + newMap = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs(map, t1, t2), t1 = t1.get$iterator(t1), t2 = this._nodes, t3 = this.importCache, t4 = node.importer, t5 = node.canonicalUrl; t1.moveNext$0();) { + t6 = t1.get$current(t1); + url = null; + url = t6._0; + upstream = t6._1; + if (!importer.couldCanonicalize$2(url, canonicalUrl)) + continue; + t3.clearCanonicalize$1(url); + result = null; + try { + result = t3.canonicalize$4$baseImporter$baseUrl$forImport(0, url, t4, t5, forImport); + } catch (exception) { + } + t6 = result; + newCanonicalUrl = t6 == null ? null : t6._1; + if (J.$eq$(newCanonicalUrl, upstream == null ? null : upstream.canonicalUrl)) + continue; + t6 = url; + newMap.$indexSet(0, t6, result == null ? null : t2.$index(0, newCanonicalUrl)); + } + return newMap; + }, + _nodeFor$5$forImport(url, baseImporter, baseUrl, active, forImport) { + var canonicalUrl, t2, _1_0, stylesheet, t3, t4, node, _this = this, t1 = {}, + result = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure(_this, url, baseImporter, baseUrl, forImport)); + if (result == null) + return null; + t1.originalUrl = t1.canonicalUrl = t1.importer = null; + t1.importer = result._0; + canonicalUrl = t1.canonicalUrl = result._1; + t1.originalUrl = result._2; + t2 = _this._nodes; + _1_0 = t2.$index(0, canonicalUrl); + if (_1_0 != null) + return _1_0; + if (active.contains$1(0, canonicalUrl)) + return null; + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure0(t1, _this)); + if (stylesheet == null) + return null; + active.add$1(0, t1.canonicalUrl); + t3 = t1.importer; + t4 = t1.canonicalUrl; + node = A.StylesheetNode$_(stylesheet, t3, t4, _this._upstreamNodes$3(stylesheet, t3, t4)); + active.remove$1(0, t1.canonicalUrl); + t2.$indexSet(0, t1.canonicalUrl, node); + return node; + }, + _nodeFor$4(url, baseImporter, baseUrl, active) { + return this._nodeFor$5$forImport(url, baseImporter, baseUrl, active, false); + }, + _ignoreErrors$1$1(callback) { + var t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + return null; + } + }, + _ignoreErrors$1(callback) { + return this._ignoreErrors$1$1(callback, type$.dynamic); + } + }; + A.StylesheetGraph_modifiedSince_transitiveModificationTime.prototype = { + call$1(node) { + return this.$this._transitiveModificationTimes.putIfAbsent$2(node.canonicalUrl, new A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure(node, this)); + }, + $signature: 334 + }; + A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure.prototype = { + call$0() { + var t2, t3, upstreamTime, t4, + t1 = this.node, + latest = t1.importer.modificationTime$1(t1.canonicalUrl); + for (t1 = t1._upstream.get$values(0).followedBy$1(0, t1._upstreamImports.get$values(0)), t1 = new A.FollowedByIterator(J.get$iterator$ax(t1.__internal$_first), t1._second), t2 = this.transitiveModificationTime; t1.moveNext$0();) { + t3 = t1._currentIterator; + t3 = t3.get$current(t3); + upstreamTime = t3 == null ? new A.DateTime(Date.now(), 0, false) : t2.call$1(t3); + t3 = upstreamTime._value; + t4 = latest._value; + if (t3 <= t4) + t3 = t3 === t4 && upstreamTime._microsecond > latest._microsecond; + else + t3 = true; + if (t3) + latest = upstreamTime; + } + return latest; + }, + $signature: 151 + }; + A.StylesheetGraph__add_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.canonicalize$3$baseImporter$baseUrl(0, _this.url, _this.baseImporter, _this.baseUrl); + }, + $signature: 116 + }; + A.StylesheetGraph_addCanonical_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.importCanonical$3$originalUrl(_this.importer, _this.canonicalUrl, _this.originalUrl); + }, + $signature: 98 + }; + A.StylesheetGraph_reload_closure.prototype = { + call$0() { + return this.$this.importCache.importCanonical$2(this.node.importer, this.canonicalUrl); + }, + $signature: 98 + }; + A.StylesheetGraph__nodeFor_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.canonicalize$4$baseImporter$baseUrl$forImport(0, _this.url, _this.baseImporter, _this.baseUrl, _this.forImport); + }, + $signature: 116 + }; + A.StylesheetGraph__nodeFor_closure0.prototype = { + call$0() { + var t1 = this._box_0; + return this.$this.importCache.importCanonical$3$originalUrl(t1.importer, t1.canonicalUrl, t1.originalUrl); + }, + $signature: 98 + }; + A.StylesheetNode.prototype = { + StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream) { + var t1, t2; + for (t1 = this._upstream.get$values(0).followedBy$1(0, this._upstreamImports.get$values(0)), t1 = new A.FollowedByIterator(J.get$iterator$ax(t1.__internal$_first), t1._second); t1.moveNext$0();) { + t2 = t1._currentIterator; + t2 = t2.get$current(t2); + if (t2 != null) + t2._downstream.add$1(0, this); + } + }, + _replaceUpstream$2(newUpstream, newUpstreamImports) { + var t3, oldUpstream, newUpstreamSet, _this = this, + t1 = type$.nullable_StylesheetNode, + t2 = A.LinkedHashSet_LinkedHashSet$of(_this._upstream.get$values(0), t1); + t2.addAll$1(0, _this._upstreamImports.get$values(0)); + t3 = type$.StylesheetNode; + oldUpstream = A.SetExtension_removeNull(t2, t3); + t1 = A.LinkedHashSet_LinkedHashSet$of(newUpstream.get$values(0), t1); + t1.addAll$1(0, newUpstreamImports.get$values(0)); + newUpstreamSet = A.SetExtension_removeNull(t1, t3); + for (t1 = oldUpstream.difference$1(newUpstreamSet), t1 = t1.get$iterator(t1); t1.moveNext$0();) + t1.get$current(t1)._downstream.remove$1(0, _this); + for (t1 = newUpstreamSet.difference$1(oldUpstream), t1 = t1.get$iterator(t1); t1.moveNext$0();) + t1.get$current(t1)._downstream.add$1(0, _this); + _this._upstream = newUpstream; + _this._upstreamImports = newUpstreamImports; + }, + _stylesheet_graph$_remove$0() { + var t1, t2, t3, t4, _i, url, _this = this; + for (t1 = A.LinkedHashSet_LinkedHashSet$of(_this._upstream.get$values(0), type$.nullable_StylesheetNode), t1.addAll$1(0, _this._upstreamImports.get$values(0)), t1 = A._LinkedHashSetIterator$(t1, t1._modifications, A._instanceType(t1)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 == null) + continue; + t3._downstream.remove$1(0, _this); + } + for (t1 = _this._downstream.get$iterator(0); t1.moveNext$0();) { + t2 = t1.get$current(0); + for (t3 = t2._upstream, t4 = A._instanceType(t3)._eval$1("LinkedHashMapKeyIterable<1>"), t4 = A.List_List$of(new A.LinkedHashMapKeyIterable(t3, t4), true, t4._eval$1("Iterable.E")), t3 = t4.length, _i = 0; _i < t3; ++_i) { + url = t4[_i]; + if (J.$eq$(t2._upstream.$index(0, url), _this)) { + t2._upstream.$indexSet(0, url, null); + break; + } + } + for (t3 = t2._upstreamImports, t4 = A._instanceType(t3)._eval$1("LinkedHashMapKeyIterable<1>"), t4 = A.List_List$of(new A.LinkedHashMapKeyIterable(t3, t4), true, t4._eval$1("Iterable.E")), t3 = t4.length, _i = 0; _i < t3; ++_i) { + url = t4[_i]; + if (J.$eq$(t2._upstreamImports.$index(0, url), _this)) { + t2._upstreamImports.$indexSet(0, url, null); + break; + } + } + } + }, + toString$0(_) { + var t1 = this._stylesheet.span; + t1 = A.NullableExtension_andThen(t1.get$sourceUrl(t1), A.path__prettyUri$closure()); + return t1 == null ? "" : t1; + } + }; + A.Syntax.prototype = { + _enumToString$0() { + return "Syntax." + this._name; + }, + toString$0(_) { + return this._syntax$_name; + } + }; + A.Box.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && other._box$_inner === this._box$_inner; + }, + get$hashCode(_) { + return A.Primitives_objectHashCode(this._box$_inner); + } + }; + A.ModifiableBox.prototype = {}; + A.LazyFileSpan.prototype = { + get$span(_) { + var t1 = this._lazy_file_span$_span; + return t1 == null ? this._lazy_file_span$_span = this._builder.call$0() : t1; + }, + compareTo$1(_, other) { + return this.get$span(0).compareTo$1(0, other); + }, + get$context(_) { + var t1 = this.get$span(0); + return t1.get$context(t1); + }, + get$end(_) { + var t1 = this.get$span(0); + return t1.get$end(t1); + }, + expand$1(_, other) { + return this.get$span(0).expand$1(0, other); + }, + get$file(_) { + var t1 = this.get$span(0); + return t1.get$file(t1); + }, + highlight$1$color(color) { + return this.get$span(0).highlight$1$color(color); + }, + get$length(_) { + var t1 = this.get$span(0); + return t1.get$length(t1); + }, + message$2$color(_, message, color) { + return this.get$span(0).message$2$color(0, message, color); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + get$sourceUrl(_) { + var t1 = this.get$span(0); + return t1.get$sourceUrl(t1); + }, + get$start(_) { + var t1 = this.get$span(0); + return t1.get$start(t1); + }, + get$text() { + return this.get$span(0).get$text(); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.LimitedMapView.prototype = { + get$keys(_) { + return this._limited_map_view$_keys; + }, + get$length(_) { + return this._limited_map_view$_keys._collection$_length; + }, + get$isEmpty(_) { + return this._limited_map_view$_keys._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._limited_map_view$_keys._collection$_length !== 0; + }, + $index(_, key) { + return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.$index(0, key) : null; + }, + containsKey$1(key) { + return this._limited_map_view$_keys.contains$1(0, key); + }, + remove$1(_, key) { + return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.remove$1(0, key) : null; + } + }; + A.MapExtensions_get_pairs_closure.prototype = { + call$1(e) { + return new A._Record_2(e.key, e.value); + }, + $signature() { + return this.K._eval$1("@<0>")._bind$1(this.V)._eval$1("+(1,2)(MapEntry<1,2>)"); + } + }; + A.MergedMapView.prototype = { + get$keys(_) { + var t1 = this._mapsByKey; + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); + }, + get$length(_) { + return this._mapsByKey.__js_helper$_length; + }, + get$isEmpty(_) { + return this._mapsByKey.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this._mapsByKey.__js_helper$_length !== 0; + }, + MergedMapView$1(maps, $K, $V) { + var t1, t2, t3, _i, map, t4, t5, t6; + for (t1 = maps.length, t2 = this._mapsByKey, t3 = $K._eval$1("@<0>")._bind$1($V)._eval$1("MergedMapView<1,2>"), _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { + map = maps[_i]; + if (t3._is(map)) + for (t4 = map._mapsByKey.get$values(0), t5 = A._instanceType(t4), t4 = new A.MappedIterator(J.get$iterator$ax(t4.__internal$_iterable), t4._f, t5._eval$1("MappedIterator<1,2>")), t5 = t5._rest[1]; t4.moveNext$0();) { + t6 = t4.__internal$_current; + if (t6 == null) + t6 = t5._as(t6); + A.setAll(t2, t6.get$keys(t6), t6); + } + else + A.setAll(t2, map.get$keys(map), map); + } + }, + $index(_, key) { + var t1 = this._mapsByKey.$index(0, this.$ti._precomputed1._as(key)); + return t1 == null ? null : t1.$index(0, key); + }, + $indexSet(_, key, value) { + var _0_0 = this._mapsByKey.$index(0, key); + if (_0_0 != null) + _0_0.$indexSet(0, key, value); + else + throw A.wrapException(A.UnsupportedError$(string$.New_en)); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$(string$.Entrie)); + }, + containsKey$1(key) { + return this._mapsByKey.containsKey$1(key); + } + }; + A.MultiDirWatcher.prototype = { + watch$1(_, directory) { + var t1, t2, t3, t4, isParentOfExistingDir, _i, t5, _0_1, existingWatcher, future, completer; + for (t1 = this._watchers, t2 = A.MapExtensions_get_pairs(t1, type$.nullable_String, type$.Stream_WatchEvent).toList$0(0), t3 = t2.length, t1 = t1._map, t4 = this._group, isParentOfExistingDir = false, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t5 = t2[_i]; + _0_1 = t5._0; + _0_1.toString; + existingWatcher = t5._1; + if (!isParentOfExistingDir) { + t5 = $.$get$context(); + t5 = t5._isWithinOrEquals$2(_0_1, directory) === B._PathRelation_equal || t5._isWithinOrEquals$2(_0_1, directory) === B._PathRelation_within; + } else + t5 = false; + if (t5) { + t1 = new A._Future($.Zone__current, type$._Future_void); + t1._asyncComplete$1(null); + return t1; + } + if ($.$get$context()._isWithinOrEquals$2(directory, _0_1) === B._PathRelation_within) { + t1.remove$1(0, _0_1); + t4.remove$1(0, existingWatcher); + isParentOfExistingDir = true; + } + } + future = A.watchDir(directory, this._poll); + t2 = new A._CompleterStream(type$._CompleterStream_WatchEvent); + completer = new A.StreamCompleter(t2, type$.StreamCompleter_WatchEvent); + future.then$1$2$onError(0, completer.get$setSourceStream(), completer.get$setError(), type$.void); + t1.$indexSet(0, directory, t2); + t4.add$1(0, t2); + return future; + } + }; + A.MultiSpan.prototype = { + get$start(_) { + var t1 = this._multi_span$_primary; + return t1.get$start(t1); + }, + get$end(_) { + var t1 = this._multi_span$_primary; + return t1.get$end(t1); + }, + get$text() { + return this._multi_span$_primary.get$text(); + }, + get$context(_) { + var t1 = this._multi_span$_primary; + return t1.get$context(t1); + }, + get$file(_) { + var t1 = this._multi_span$_primary; + return t1.get$file(t1); + }, + get$length(_) { + var t1 = this._multi_span$_primary; + return t1.get$length(t1); + }, + get$sourceUrl(_) { + var t1 = this._multi_span$_primary; + return t1.get$sourceUrl(t1); + }, + compareTo$1(_, other) { + return this._multi_span$_primary.compareTo$1(0, other); + }, + toString$0(_) { + return this._multi_span$_primary.toString$0(0); + }, + expand$1(_, other) { + return new A.MultiSpan(this._multi_span$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); + }, + highlight$1$color(color) { + return A.Highlighter$multiple(this._multi_span$_primary, this.primaryLabel, this.secondarySpans, color === true, null, null).highlight$0(); + }, + message$2$color(_, message, color) { + var t1 = J.$eq$(color, true) || typeof color == "string", + t2 = typeof color == "string" ? color : null; + return A.SourceSpanExtension_messageMultiple(this._multi_span$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2, null); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.NoSourceMapBuffer.prototype = { + get$length(_) { + return this._no_source_map_buffer$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + return callback.call$0(); + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + write$1(_, object) { + var t1 = this._no_source_map_buffer$_buffer, + t2 = A.S(object); + t1._contents += t2; + return null; + }, + writeCharCode$1(charCode) { + var t1 = this._no_source_map_buffer$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + return null; + }, + toString$0(_) { + var t1 = this._no_source_map_buffer$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + return A.throwExpression(A.UnsupportedError$(string$.NoSour)); + } + }; + A.PrefixedMapView.prototype = { + get$keys(_) { + return new A._PrefixedKeys(this); + }, + get$length(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$isNotEmpty(t1); + }, + $index(_, key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) ? this._prefixed_map_view$_map.$index(0, J.substring$1$s(key, this._prefix.length)) : null; + }, + containsKey$1(key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) && this._prefixed_map_view$_map.containsKey$1(J.substring$1$s(key, this._prefix.length)); + } + }; + A._PrefixedKeys.prototype = { + get$length(_) { + var t1 = this._view._prefixed_map_view$_map; + return t1.get$length(t1); + }, + get$iterator(_) { + var t1 = this._view._prefixed_map_view$_map; + t1 = J.map$1$1$ax(t1.get$keys(t1), new A._PrefixedKeys_iterator_closure(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._view.containsKey$1(key); + } + }; + A._PrefixedKeys_iterator_closure.prototype = { + call$1(key) { + return this.$this._view._prefix + key; + }, + $signature: 6 + }; + A.PublicMemberMapView.prototype = { + get$keys(_) { + var t1 = this._public_member_map_view$_inner; + return J.where$1$ax(t1.get$keys(t1), A.utils__isPublic$closure()); + }, + containsKey$1(key) { + return typeof key == "string" && A.isPublic(key) && this._public_member_map_view$_inner.containsKey$1(key); + }, + $index(_, key) { + if (typeof key == "string" && A.isPublic(key)) + return this._public_member_map_view$_inner.$index(0, key); + return null; + } + }; + A.SourceMapBuffer.prototype = { + get$_targetLocation() { + var t1 = this._source_map_buffer$_buffer._contents, + t2 = this._line; + return A.SourceLocation$(t1.length, this._column, t2, null); + }, + get$length(_) { + return this._source_map_buffer$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + var t1, _this = this, + wasInSpan = _this._inSpan; + _this._inSpan = true; + _this._addEntry$2(span.get$start(span), _this.get$_targetLocation()); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._inSpan = wasInSpan; + } + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + _addEntry$2(source, target) { + var entry, t2, + t1 = this._entries; + if (t1.length !== 0) { + entry = B.JSArray_methods.get$last(t1); + t2 = entry.source; + if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) + return; + if (entry.target.offset === target.offset) + return; + } + t1.push(new A.Entry(source, target, null)); + }, + write$1(_, object) { + var t1, i, + string = J.toString$0$(object); + this._source_map_buffer$_buffer._contents += string; + for (t1 = string.length, i = 0; i < t1; ++i) + if (string.charCodeAt(i) === 10) + this._source_map_buffer$_writeLine$0(); + else + ++this._column; + }, + writeCharCode$1(charCode) { + var t1 = this._source_map_buffer$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + if (charCode === 10) + this._source_map_buffer$_writeLine$0(); + else + ++this._column; + }, + _source_map_buffer$_writeLine$0() { + var _this = this, + t1 = _this._entries; + if (B.JSArray_methods.get$last(t1).target.line === _this._line && B.JSArray_methods.get$last(t1).target.column === _this._column) + t1.pop(); + ++_this._line; + _this._column = 0; + if (_this._inSpan) + t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_targetLocation(), null)); + }, + toString$0(_) { + var t1 = this._source_map_buffer$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + var i, t2, prefixColumn, _box_0 = {}, + t1 = prefix.length; + if (t1 === 0) + return A.SingleMapping_SingleMapping$fromEntries(this._entries); + _box_0.prefixColumn = _box_0.prefixLines = 0; + for (i = 0, t2 = 0; i < t1; ++i) + if (prefix.charCodeAt(i) === 10) { + ++_box_0.prefixLines; + _box_0.prefixColumn = 0; + t2 = 0; + } else { + prefixColumn = t2 + 1; + _box_0.prefixColumn = prefixColumn; + t2 = prefixColumn; + } + t2 = this._entries; + return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); + } + }; + A.SourceMapBuffer_buildSourceMap_closure.prototype = { + call$1(entry) { + var t1 = entry.target, + t2 = t1.line, + t3 = this._box_0, + t4 = t3.prefixLines; + t3 = t2 === 0 ? t3.prefixColumn : 0; + return new A.Entry(entry.source, A.SourceLocation$(t1.offset + this.prefixLength, t1.column + t3, t2 + t4, null), entry.identifierName); + }, + $signature: 162 + }; + A.UnprefixedMapView.prototype = { + get$keys(_) { + return new A._UnprefixedKeys(this); + }, + $index(_, key) { + return typeof key == "string" ? this._unprefixed_map_view$_map.$index(0, this._unprefixed_map_view$_prefix + key) : null; + }, + containsKey$1(key) { + return typeof key == "string" && this._unprefixed_map_view$_map.containsKey$1(this._unprefixed_map_view$_prefix + key); + }, + remove$1(_, key) { + return typeof key == "string" ? this._unprefixed_map_view$_map.remove$1(0, this._unprefixed_map_view$_prefix + key) : null; + } + }; + A._UnprefixedKeys.prototype = { + get$iterator(_) { + var t1 = this._unprefixed_map_view$_view._unprefixed_map_view$_map; + t1 = J.where$1$ax(t1.get$keys(t1), new A._UnprefixedKeys_iterator_closure(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure0(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._unprefixed_map_view$_view.containsKey$1(key); + } + }; + A._UnprefixedKeys_iterator_closure.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix); + }, + $signature: 5 + }; + A._UnprefixedKeys_iterator_closure0.prototype = { + call$1(key) { + return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix.length); + }, + $signature: 6 + }; + A.indent_closure.prototype = { + call$1(line) { + return B.JSString_methods.$mul(" ", this.indentation) + line; + }, + $signature: 6 + }; + A.flattenVertically_closure.prototype = { + call$1(inner) { + return A.QueueList_QueueList$from(inner, this.T); + }, + $signature() { + return this.T._eval$1("QueueList<0>(Iterable<0>)"); + } + }; + A.flattenVertically_closure0.prototype = { + call$1(queue) { + this.result.push(queue.removeFirst$0()); + return queue.get$length(0) === 0; + }, + $signature() { + return this.T._eval$1("bool(QueueList<0>)"); + } + }; + A.longestCommonSubsequence_backtrack.prototype = { + call$2(i, j) { + var selection, t1, _this = this; + if (i === -1 || j === -1) + return A._setArrayType([], _this.T._eval$1("JSArray<0>")); + selection = _this.selections[i][j]; + if (selection != null) { + t1 = _this.call$2(i - 1, j - 1); + J.add$1$ax(t1, selection); + return t1; + } + t1 = _this.lengths; + return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); + }, + $signature() { + return this.T._eval$1("List<0>(int,int)"); + } + }; + A.mapAddAll2_closure.prototype = { + call$2(key, inner) { + var t1 = this.destination, + _0_0 = t1.$index(0, key); + if (_0_0 != null) + _0_0.addAll$1(0, inner); + else + t1.$indexSet(0, key, inner); + }, + $signature() { + return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); + } + }; + A.Value.prototype = { + get$isTruthy() { + return true; + }, + get$separator(_) { + return B.ListSeparator_undecided_null_undecided; + }, + get$hasBrackets() { + return false; + }, + get$asList() { + return A._setArrayType([this], type$.JSArray_Value); + }, + get$lengthAsList() { + return 1; + }, + get$isBlank() { + return false; + }, + get$isSpecialNumber() { + return false; + }, + get$isVar() { + return false; + }, + get$realNull() { + return this; + }, + sassIndexToListIndex$2(sassIndex, $name) { + var t1, index, + indexValue = sassIndex.assertNumber$1($name); + if (indexValue.get$hasUnits()) { + t1 = indexValue.get$unitString(); + A.warnForDeprecation("$" + $name + ": Passing a number with unit " + t1 + string$.x20is_de + indexValue.unitSuggestion$1($name) + string$.x0a_Morex3af, B.Deprecation_2jN); + } + index = indexValue.assertInt$1($name); + if (index === 0) + throw A.wrapException(A.SassScriptException$("List index may not be 0.", $name)); + if (Math.abs(index) > this.get$lengthAsList()) + throw A.wrapException(A.SassScriptException$("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); + return index < 0 ? this.get$lengthAsList() + index : index - 1; + }, + assertCalculation$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a calculation.", $name)); + }, + assertColor$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a color.", $name)); + }, + assertFunction$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a function reference.", $name)); + }, + assertMixin$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a mixin reference.", $name)); + }, + assertMap$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a map.", $name)); + }, + tryMap$0() { + return null; + }, + assertNumber$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a number.", $name)); + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertString$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a string.", $name)); + }, + assertCommonListStyle$2$allowSlash($name, allowSlash) { + var invalidSeparator, buffer, t1, _this = this, + _s8_ = "Expected"; + if (_this.get$separator(_this) !== B.ListSeparator_ECn) + invalidSeparator = !allowSlash && _this.get$separator(_this) === B.ListSeparator_cQA; + else + invalidSeparator = true; + if (!invalidSeparator && !_this.get$hasBrackets()) + return _this.get$asList(); + buffer = new A.StringBuffer(_s8_); + if (_this.get$hasBrackets()) { + t1 = "Expected" + " an unbracketed"; + buffer._contents = t1; + } else + t1 = _s8_; + if (invalidSeparator) { + t1 += _this.get$hasBrackets() ? "," : " a"; + buffer._contents = t1; + t1 = buffer._contents = t1 + " space-"; + t1 = buffer._contents = (allowSlash ? buffer._contents = t1 + " or slash-" : t1) + "separated"; + } + buffer._contents = t1 + (" list, was " + _this.toString$0(0)); + throw A.wrapException(A.SassScriptException$(buffer.toString$0(0), $name)); + }, + _selectorString$1($name) { + var _0_0 = this._selectorStringOrNull$0(); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + string$.x20is_noav, $name)); + }, + _selectorStringOrNull$0() { + var t1, t2, result, _1_0, _i, complex, string, compound, _this = this, _null = null; + if (_this instanceof A.SassString) + return _this._string$_text; + if (!(_this instanceof A.SassList)) + return _null; + t1 = _this._list$_contents; + t2 = t1.length; + if (t2 === 0) + return _null; + result = A._setArrayType([], type$.JSArray_String); + $label0$1: { + _1_0 = _this._separator; + if (B.ListSeparator_ECn === _1_0) { + for (_i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex instanceof A.SassString) { + result.push(complex._string$_text); + continue; + } + if (complex instanceof A.SassList && B.ListSeparator_nbm === complex._separator) { + string = complex._selectorStringOrNull$0(); + if (string == null) + return _null; + result.push(string); + continue; + } + return _null; + } + break $label0$1; + } + if (B.ListSeparator_cQA === _1_0) + return _null; + for (_i = 0; _i < t2; ++_i) { + compound = t1[_i]; + if (!(compound instanceof A.SassString)) + return _null; + result.push(compound._string$_text); + } + break $label0$1; + } + return B.JSArray_methods.join$1(result, _1_0 === B.ListSeparator_ECn ? ", " : " "); + }, + withListContents$2$separator(contents, separator) { + var t1 = separator == null ? this.get$separator(this) : separator, + t2 = this.get$hasBrackets(); + return A.SassList$(contents, t1, t2); + }, + withListContents$1(contents) { + return this.withListContents$2$separator(contents, null); + }, + greaterThan$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var t1; + $label0$0: { + if (other instanceof A.SassString) { + t1 = new A.SassString(A.serializeValue(this, false, true) + other._string$_text, other._hasQuotes); + break $label0$0; + } + if (other instanceof A.SassCalculation) + A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + t1 = new A.SassString(A.serializeValue(this, false, true) + A.serializeValue(other, false, true), false); + break $label0$0; + } + return t1; + }, + minus$1(other) { + return other instanceof A.SassCalculation ? A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)) : new A.SassString(A.serializeValue(this, false, true) + "-" + A.serializeValue(other, false, true), false); + }, + dividedBy$1(other) { + return new A.SassString(A.serializeValue(this, false, true) + "/" + A.serializeValue(other, false, true), false); + }, + unaryPlus$0() { + return new A.SassString("+" + A.serializeValue(this, false, true), false); + }, + unaryMinus$0() { + return new A.SassString("-" + A.serializeValue(this, false, true), false); + }, + unaryNot$0() { + return B.SassBoolean_false; + }, + withoutSlash$0() { + return this; + }, + toString$0(_) { + return A.serializeValue(this, true, true); + } + }; + A.SassArgumentList.prototype = {}; + A.SassBoolean.prototype = { + get$isTruthy() { + return this.value; + }, + accept$1$1(visitor) { + return visitor._serialize$_buffer.write$1(0, String(this.value)); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return this.value ? B.SassBoolean_false : B.SassBoolean_true; + } + }; + A.SassCalculation.prototype = { + get$isSpecialNumber() { + return true; + }, + accept$1$1(visitor) { + return visitor.visitCalculation$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertCalculation$1($name) { + return this; + }, + plus$1(other) { + if (other instanceof A.SassString) + return this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + unaryPlus$0() { + return A.throwExpression(A.SassScriptException$('Undefined operation "+' + this.toString$0(0) + '".', null)); + }, + unaryMinus$0() { + return A.throwExpression(A.SassScriptException$('Undefined operation "-' + this.toString$0(0) + '".', null)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassCalculation && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); + } + }; + A.SassCalculation__verifyLength_closure.prototype = { + call$1(arg) { + return arg instanceof A.SassString; + }, + $signature: 69 + }; + A.CalculationOperation.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationOperation && this._operator === other._operator && J.$eq$(this._left, other._left) && J.$eq$(this._right, other._right); + }, + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._operator) ^ J.get$hashCode$(this._left) ^ J.get$hashCode$(this._right)) >>> 0; + }, + toString$0(_) { + var parenthesized = A.serializeValue(new A.SassCalculation("", A._setArrayType([this], type$.JSArray_Object)), true, true); + return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); + } + }; + A.CalculationOperator.prototype = { + _enumToString$0() { + return "CalculationOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.SassColor.prototype = { + get$channels() { + var t2, t3, + t1 = this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = this.channel2OrNull; + return A.List_List$unmodifiable([t1, t2, t3 == null ? 0 : t3], type$.double); + }, + get$channelsOrNull() { + return A.List_List$unmodifiable([this.channel0OrNull, this.channel1OrNull, this.channel2OrNull], type$.nullable_double); + }, + get$isChannel0Powerless() { + var t1, t2, _this = this, + _0_0 = _this._space; + $label0$0: { + if (B.HslColorSpace_gsm === _0_0) { + t1 = _this.channel1OrNull; + t1 = A.fuzzyEquals(t1 == null ? 0 : t1, 0); + break $label0$0; + } + if (B.HwbColorSpace_06z === _0_0) { + t1 = _this.channel1OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel2OrNull; + t1 += t2 == null ? 0 : t2; + t1 = t1 > 100 || A.fuzzyEquals(t1, 100); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isChannel2Powerless() { + var t1, + _0_0 = this._space; + $label0$0: { + if (B.LchColorSpace_wv8 === _0_0 || B.OklchColorSpace_li8 === _0_0) { + t1 = this.channel1OrNull; + t1 = A.fuzzyEquals(t1 == null ? 0 : t1, 0); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isInGamut() { + var t2, t3, _this = this, + t1 = _this._space; + if (!t1.get$isBoundedInternal()) + return true; + t2 = _this.channel0OrNull; + if (t2 == null) + t2 = 0; + t1 = t1._channels; + t3 = false; + if (_this._isChannelInGamut$2(t2, t1[0])) { + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + if (_this._isChannelInGamut$2(t2, t1[1])) { + t2 = _this.channel2OrNull; + if (t2 == null) + t2 = 0; + t1 = _this._isChannelInGamut$2(t2, t1[2]); + } else + t1 = t3; + } else + t1 = t3; + return t1; + }, + _isChannelInGamut$2(value, channel) { + var min, max, t1; + $label0$0: { + if (channel instanceof A.LinearChannel) { + min = channel.min; + max = channel.max; + if (value < max || A.fuzzyEquals(value, max)) + t1 = value > min || A.fuzzyEquals(value, min); + else + t1 = false; + break $label0$0; + } + t1 = true; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitColor$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertColor$1($name) { + return this; + }, + assertLegacy$1($name) { + if (this._space.get$isLegacyInternal()) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + string$.x20to_be, $name)); + }, + channel$1(_, channel) { + var t1, _this = this, + channels = _this._space._channels; + if (channel === channels[0].name) { + t1 = _this.channel0OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[1].name) { + t1 = _this.channel1OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[2].name) { + t1 = _this.channel2OrNull; + return t1 == null ? 0 : t1; + } + if (channel === "alpha") { + t1 = _this.alphaOrNull; + return t1 == null ? 0 : t1; + } + throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', null)); + }, + isChannelMissing$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._space._channels; + if (channel === channels[0].name) + return _this.channel0OrNull == null; + if (channel === channels[1].name) + return _this.channel1OrNull == null; + if (channel === channels[2].name) + return _this.channel2OrNull == null; + if (channel === "alpha") + return _this.alphaOrNull == null; + throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + isChannelMissing$1(channel) { + return this.isChannelMissing$3$channelName$colorName(channel, null, null); + }, + isChannelPowerless$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._space._channels; + if (channel === channels[0].name) + return _this.get$isChannel0Powerless(); + if (channel === channels[1].name) + return false; + if (channel === channels[2].name) + return _this.get$isChannel2Powerless(); + if (channel === "alpha") + return false; + throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + _legacyChannel$2(space, channel) { + if (!this._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$("color." + channel + string$.x28__is_oc, null)); + return this.toSpace$1(space).channel$1(0, channel); + }, + toSpace$2$legacyMissing(space, legacyMissing) { + var t2, converted, t3, t4, _this = this, + t1 = _this._space; + if (t1 === space) + return _this; + t2 = _this.alphaOrNull; + if (t2 == null) + t2 = 0; + converted = t1.convert$5(space, _this.channel0OrNull, _this.channel1OrNull, _this.channel2OrNull, t2); + t1 = false; + if (!legacyMissing) + if (converted._space.get$isLegacyInternal()) + t1 = converted.channel0OrNull == null || converted.channel1OrNull == null || converted.channel2OrNull == null || converted.alphaOrNull == null; + if (t1) { + t1 = converted.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = converted.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = converted.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = converted.alphaOrNull; + if (t4 == null) + t4 = 0; + t4 = A.SassColor_SassColor$forSpaceInternal(converted._space, t1, t2, t3, t4); + t1 = t4; + } else + t1 = converted; + return t1; + }, + toSpace$1(space) { + return this.toSpace$2$legacyMissing(space, true); + }, + changeHsl$3$hue$lightness$saturation(hue, lightness, saturation) { + var t2, t3, t4, t5, _this = this, _null = null, + t1 = _this._space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.color_c, _null)); + t2 = hue == null ? _null : hue; + if (t2 == null) + t2 = _this._legacyChannel$2(B.HslColorSpace_gsm, "hue"); + t3 = saturation == null ? _null : saturation; + if (t3 == null) + t3 = _this._legacyChannel$2(B.HslColorSpace_gsm, "saturation"); + t4 = lightness == null ? _null : lightness; + if (t4 == null) + t4 = _this._legacyChannel$2(B.HslColorSpace_gsm, "lightness"); + t5 = _this.alphaOrNull; + if (t5 == null) + t5 = 0; + return A.SassColor_SassColor$hsl(t2, t3, t4, t5).toSpace$1(t1); + }, + changeHsl$1$saturation(saturation) { + return this.changeHsl$3$hue$lightness$saturation(null, null, saturation); + }, + changeHsl$1$lightness(lightness) { + return this.changeHsl$3$hue$lightness$saturation(null, lightness, null); + }, + changeHsl$1$hue(hue) { + return this.changeHsl$3$hue$lightness$saturation(hue, null, null); + }, + changeAlpha$1(alpha) { + var t2, t3, _this = this, + t1 = _this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = _this.channel2OrNull; + if (t3 == null) + t3 = 0; + return A.SassColor_SassColor$forSpaceInternal(_this._space, t1, t2, t3, alpha); + }, + interpolate$4$legacyMissing$weight(other, method, legacyMissing, weight) { + var t1, color1, color2, missing1_0, missing1_1, missing1_2, missing2_0, missing2_1, missing2_2, channel1_0, channel1_1, channel1_2, channel2_0, channel2_1, channel2_2, alpha1, t2, t3, alpha10, alpha2, alpha20, thisMultiplier, t4, t5, otherMultiplier, mixedAlpha, mixed0, mixed1, mixed2, _this = this, _null = null; + if (A.fuzzyEquals(weight, 0)) + return other; + if (A.fuzzyEquals(weight, 1)) + return _this; + t1 = method.space; + color1 = _this.toSpace$1(t1); + color2 = other.toSpace$1(t1); + if (weight < 0 || weight > 1) + throw A.wrapException(A.RangeError$range(weight, 0, 1, "weight", _null)); + missing1_0 = _this._isAnalogousChannelMissing$3(_this, color1, 0); + missing1_1 = _this._isAnalogousChannelMissing$3(_this, color1, 1); + missing1_2 = _this._isAnalogousChannelMissing$3(_this, color1, 2); + missing2_0 = _this._isAnalogousChannelMissing$3(other, color2, 0); + missing2_1 = _this._isAnalogousChannelMissing$3(other, color2, 1); + missing2_2 = _this._isAnalogousChannelMissing$3(other, color2, 2); + channel1_0 = (missing1_0 ? color2 : color1).channel0OrNull; + if (channel1_0 == null) + channel1_0 = 0; + channel1_1 = (missing1_1 ? color2 : color1).channel1OrNull; + if (channel1_1 == null) + channel1_1 = 0; + channel1_2 = (missing1_2 ? color2 : color1).channel2OrNull; + if (channel1_2 == null) + channel1_2 = 0; + channel2_0 = (missing2_0 ? color1 : color2).channel0OrNull; + if (channel2_0 == null) + channel2_0 = 0; + channel2_1 = (missing2_1 ? color1 : color2).channel1OrNull; + if (channel2_1 == null) + channel2_1 = 0; + channel2_2 = (missing2_2 ? color1 : color2).channel2OrNull; + if (channel2_2 == null) + channel2_2 = 0; + alpha1 = _this.alphaOrNull; + t2 = alpha1 == null; + if (t2) { + t3 = other.alphaOrNull; + alpha10 = t3 == null ? 0 : t3; + } else + alpha10 = alpha1; + alpha2 = other.alphaOrNull; + t3 = alpha2 == null; + if (t3) + alpha20 = t2 ? 0 : alpha1; + else + alpha20 = alpha2; + thisMultiplier = (t2 ? 1 : alpha1) * weight; + t4 = t3 ? 1 : alpha2; + t5 = 1 - weight; + otherMultiplier = t4 * t5; + mixedAlpha = t2 && t3 ? _null : alpha10 * weight + alpha20 * t5; + if (missing1_0 && missing2_0) + mixed0 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed0 = (channel1_0 * thisMultiplier + channel2_0 * otherMultiplier) / t2; + } + if (missing1_1 && missing2_1) + mixed1 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed1 = (channel1_1 * thisMultiplier + channel2_1 * otherMultiplier) / t2; + } + if (missing1_2 && missing2_2) + mixed2 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed2 = (channel1_2 * thisMultiplier + channel2_2 * otherMultiplier) / t2; + } + $label0$0: { + if (B.HslColorSpace_gsm === t1 || B.HwbColorSpace_06z === t1) { + if (missing1_0 && missing2_0) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._interpolateHues$4(channel1_0, channel2_0, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal(t1, t2, mixed1, mixed2, mixedAlpha); + t1 = t2; + break $label0$0; + } + if (B.LchColorSpace_wv8 === t1 || B.OklchColorSpace_li8 === t1) { + if (missing1_2 && missing2_2) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._interpolateHues$4(channel1_2, channel2_2, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal(t1, mixed0, mixed1, t2, mixedAlpha); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor_SassColor$forSpaceInternal(t1, mixed0, mixed1, mixed2, mixedAlpha); + break $label0$0; + } + return t1.toSpace$2$legacyMissing(_this._space, false); + }, + _isAnalogousChannelMissing$3(original, output, outputChannelIndex) { + var originalChannel; + if (output.get$channelsOrNull()[outputChannelIndex] == null) + return true; + if (original === output) + return false; + originalChannel = A.IterableExtension_firstWhereOrNull(original._space._channels, output._space._channels[outputChannelIndex].get$isAnalogous()); + if (originalChannel == null) + return false; + return original.isChannelMissing$1(originalChannel.name); + }, + _interpolateHues$4(hue1, hue2, method, weight) { + var _0_0, _1_0; + $label1$1: { + if (B.HueInterpolationMethod_0 === method) { + $label0$0: { + _0_0 = hue2 - hue1; + if (_0_0 > 180) { + hue1 += 360; + break $label0$0; + } + if (_0_0 < -180) + hue2 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_1 === method) { + $label2$2: { + _1_0 = hue2 - hue1; + if (_1_0 > 0 && _1_0 < 180) { + hue2 += 360; + break $label2$2; + } + if (_1_0 > -180 && _1_0 <= 0) + hue1 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_2 === method && hue2 < hue1) { + hue2 += 360; + break $label1$1; + } + if (B.HueInterpolationMethod_3 === method && hue1 < hue2) { + hue1 += 360; + break $label1$1; + } + break $label1$1; + } + return hue1 * weight + hue2 * (1 - weight); + }, + plus$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$minus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$dividedBy(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); + }, + $eq(_, other) { + var t1, t2, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassColor)) + return false; + t1 = _this._space; + if (t1.get$isLegacyInternal()) { + t2 = other._space; + if (!t2.get$isLegacyInternal()) + return false; + if (!A.fuzzyEqualsNullable(_this.alphaOrNull, other.alphaOrNull)) + return false; + if (t1 === t2) + return A.fuzzyEqualsNullable(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable(_this.channel2OrNull, other.channel2OrNull); + else + return _this.toSpace$1(B.RgbColorSpace_mlz).$eq(0, other.toSpace$1(B.RgbColorSpace_mlz)); + } + return t1 === other._space && A.fuzzyEqualsNullable(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable(_this.channel2OrNull, other.channel2OrNull) && A.fuzzyEqualsNullable(_this.alphaOrNull, other.alphaOrNull); + }, + get$hashCode(_) { + var rgb, t2, t3, t4, t5, _this = this, + t1 = _this._space; + if (t1.get$isLegacyInternal()) { + rgb = _this.toSpace$1(B.RgbColorSpace_mlz); + t1 = rgb.channel0OrNull; + t1 = A.fuzzyHashCode(t1 == null ? 0 : t1); + t2 = rgb.channel1OrNull; + t2 = A.fuzzyHashCode(t2 == null ? 0 : t2); + t3 = rgb.channel2OrNull; + t3 = A.fuzzyHashCode(t3 == null ? 0 : t3); + t4 = _this.alphaOrNull; + return t1 ^ t2 ^ t3 ^ A.fuzzyHashCode(t4 == null ? 0 : t4); + } else { + t1 = A.Primitives_objectHashCode(t1); + t2 = _this.channel0OrNull; + t2 = A.fuzzyHashCode(t2 == null ? 0 : t2); + t3 = _this.channel1OrNull; + t3 = A.fuzzyHashCode(t3 == null ? 0 : t3); + t4 = _this.channel2OrNull; + t4 = A.fuzzyHashCode(t4 == null ? 0 : t4); + t5 = _this.alphaOrNull; + return (t1 ^ t2 ^ t3 ^ t4 ^ A.fuzzyHashCode(t5 == null ? 0 : t5)) >>> 0; + } + } + }; + A.SassColor$_forSpace_closure.prototype = { + call$1(alpha) { + return A.fuzzyAssertRange(alpha, 0, 1, "alpha"); + }, + $signature: 16 + }; + A._ColorFormatEnum.prototype = { + toString$0(_) { + return "rgbFunction"; + } + }; + A.SpanColorFormat.prototype = {}; + A.ColorChannel.prototype = { + isAnalogous$1(other) { + var _0_6_isSet, t1, _0_60, t2, _0_6_isSet0, + _0_1 = this.name, + _0_6 = other.name; + $label0$0: { + if ("red" !== _0_1) + _0_6_isSet = "x" === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + if ("red" !== _0_6) + t1 = "x" === _0_6; + else + t1 = true; + _0_60 = _0_6; + } else { + _0_60 = null; + t1 = false; + } + t2 = true; + if (!t1) { + if ("green" !== _0_1) + t1 = "y" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("green" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "y" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("blue" !== _0_1) + t1 = "z" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("blue" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "z" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("chroma" !== _0_1) + t1 = "saturation" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("chroma" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "saturation" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("lightness" === _0_1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_60 = t1; + _0_6_isSet = true; + } + t1 = "lightness" === t1; + } else + t1 = false; + if (!t1) + if ("hue" === _0_1) + t1 = "hue" === (_0_6_isSet ? _0_60 : _0_6); + else + t1 = false; + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + if (t1) + break $label0$0; + break $label0$0; + } + return t1; + } + }; + A.LinearChannel.prototype = {}; + A.GamutMapMethod.prototype = { + toString$0(_) { + return this.name; + } + }; + A.ClipGamutMap.prototype = { + map$1(_, color) { + var t1 = color._space, + t2 = t1._channels; + return A.SassColor_SassColor$forSpaceInternal(t1, this._clampChannel$2(color.channel0OrNull, t2[0]), this._clampChannel$2(color.channel1OrNull, t2[1]), this._clampChannel$2(color.channel2OrNull, t2[2]), color.alphaOrNull); + }, + _clampChannel$2(value, channel) { + var t1, min; + if (value == null) + t1 = null; + else + $label0$0: { + if (channel instanceof A.LinearChannel) { + min = channel.min; + t1 = isNaN(value) ? min : B.JSNumber_methods.clamp$2(value, min, channel.max); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + } + }; + A.LocalMindeGamutMap.prototype = { + map$1(_, color) { + var clipped, max, min, minInGamut, chroma, current, e, + originOklch = color.toSpace$1(B.OklchColorSpace_li8), + lightness = originOklch.channel0OrNull, + hue = originOklch.channel2OrNull, + alpha = originOklch.alphaOrNull, + t1 = lightness == null, + t2 = t1 ? 0 : lightness; + if (t2 > 1 || A.fuzzyEquals(t2, 1)) { + t1 = color._space; + t2 = color.alphaOrNull; + return t1.get$isLegacyInternal() ? A.SassColor_SassColor$rgbInternal(255, 255, 255, t2, null).toSpace$1(t1) : A.SassColor_SassColor$forSpaceInternal(t1, 1, 1, 1, t2); + } else { + t1 = t1 ? 0 : lightness; + if (t1 < 0 || A.fuzzyEquals(t1, 0)) + return A.SassColor_SassColor$rgbInternal(0, 0, 0, color.alphaOrNull, null).toSpace$1(color._space); + } + clipped = color.get$isInGamut() ? color : B.ClipGamutMap_clip.map$1(0, color); + if (this._deltaEOK$2(clipped, color) < 0.02) + return clipped; + max = originOklch.channel1OrNull; + if (max == null) + max = 0; + for (t1 = color._space, min = 0, minInGamut = true; max - min > 0.0001;) { + chroma = (min + max) / 2; + current = B.OklchColorSpace_li8.convert$5(t1, lightness, chroma, hue, alpha); + if (minInGamut && current.get$isInGamut()) { + min = chroma; + continue; + } + clipped = current.get$isInGamut() ? current : B.ClipGamutMap_clip.map$1(0, current); + e = this._deltaEOK$2(clipped, current); + if (e < 0.02) { + if (0.02 - e < 0.0001) + return clipped; + min = chroma; + minInGamut = false; + } else + max = chroma; + } + return clipped; + }, + _deltaEOK$2(color1, color2) { + var t2, t3, t4, + lab1 = color1.toSpace$1(B.OklabColorSpace_yrt), + lab2 = color2.toSpace$1(B.OklabColorSpace_yrt), + t1 = lab1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = lab2.channel0OrNull; + t1 = Math.pow(t1 - (t2 == null ? 0 : t2), 2); + t2 = lab1.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = lab2.channel1OrNull; + t2 = Math.pow(t2 - (t3 == null ? 0 : t3), 2); + t3 = lab1.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = lab2.channel2OrNull; + return Math.sqrt(t1 + t2 + Math.pow(t3 - (t4 == null ? 0 : t4), 2)); + } + }; + A.InterpolationMethod.prototype = { + toString$0(_) { + var t1 = this.hue; + t1 = t1 == null ? "" : " " + t1.toString$0(0) + " hue"; + return this.space.name + t1; + } + }; + A.HueInterpolationMethod.prototype = { + _enumToString$0() { + return "HueInterpolationMethod." + this._name; + } + }; + A.ColorSpace.prototype = { + get$isLegacyInternal() { + return false; + }, + get$isPolarInternal() { + return false; + }, + convert$5(dest, channel0, channel1, channel2, alpha) { + return this.convertLinear$5(dest, channel0, channel1, channel2, alpha); + }, + convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, t2, transformedBlue, transformedGreen, transformedRed, linearRed, linearGreen, linearBlue, matrix, _this = this; + $label0$0: { + t1 = B.HslColorSpace_gsm !== dest; + if (!t1 || B.HwbColorSpace_06z === dest) { + t2 = B.SrgbColorSpace_AD4; + break $label0$0; + } + if (B.LabColorSpace_IF2 === dest || B.LchColorSpace_wv8 === dest) { + t2 = B.XyzD50ColorSpace_2No; + break $label0$0; + } + if (B.OklabColorSpace_yrt === dest || B.OklchColorSpace_li8 === dest) { + t2 = B.LmsColorSpace_8I8; + break $label0$0; + } + t2 = dest; + break $label0$0; + } + if (t2 === _this) { + transformedBlue = blue; + transformedGreen = green; + transformedRed = red; + } else { + linearRed = _this.toLinear$1(red == null ? 0 : red); + linearGreen = _this.toLinear$1(green == null ? 0 : green); + linearBlue = _this.toLinear$1(blue == null ? 0 : blue); + matrix = _this.transformationMatrix$1(t2); + transformedRed = t2.fromLinear$1(matrix[0] * linearRed + matrix[1] * linearGreen + matrix[2] * linearBlue); + transformedGreen = t2.fromLinear$1(matrix[3] * linearRed + matrix[4] * linearGreen + matrix[5] * linearBlue); + transformedBlue = t2.fromLinear$1(matrix[6] * linearRed + matrix[7] * linearGreen + matrix[8] * linearBlue); + } + $label1$1: { + if (!t1 || B.HwbColorSpace_06z === dest) { + t1 = B.SrgbColorSpace_AD4.convert$8$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.LabColorSpace_IF2 === dest || B.LchColorSpace_wv8 === dest) { + t1 = B.XyzD50ColorSpace_2No.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.OklabColorSpace_yrt === dest || B.OklchColorSpace_li8 === dest) { + t1 = B.LmsColorSpace_8I8.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + t1 = red == null ? null : transformedRed; + t2 = green == null ? null : transformedGreen; + t1 = A.SassColor_SassColor$forSpaceInternal(dest, t1, t2, blue == null ? null : transformedBlue, alpha); + break $label1$1; + } + return t1; + }, + convertLinear$5(dest, red, green, blue, alpha) { + return this.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + fromLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + transformationMatrix$1(dest) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space conversion from " + this.toString$0(0) + " to " + dest.toString$0(0) + " not implemented.")); + }, + toString$0(_) { + return this.name; + } + }; + A.A98RgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 2.19921875); + }, + fromLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 0.4547069271758437); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { + t1 = $.$get$linearA98RgbToLinearSrgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$linearA98RgbToLinearDisplayP3(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$linearA98RgbToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$linearA98RgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$linearA98RgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$linearA98RgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$linearA98RgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.DisplayP3ColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { + t1 = $.$get$linearDisplayP3ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$linearDisplayP3ToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$linearDisplayP3ToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$linearDisplayP3ToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$linearDisplayP3ToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$linearDisplayP3ToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$linearDisplayP3ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.HslColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, saturation, lightness, alpha) { + var t1 = hue == null, + scaledHue = B.JSNumber_methods.$mod((t1 ? 0 : hue) / 360, 1), + t2 = saturation == null, + scaledSaturation = (t2 ? 0 : saturation) / 100, + t3 = lightness == null, + scaledLightness = (t3 ? 0 : lightness) / 100, + m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, + m1 = scaledLightness * 2 - m2; + return B.SrgbColorSpace_AD4.convert$8$missingChroma$missingHue$missingLightness(dest, A.hueToRgb(m1, m2, scaledHue + 0.3333333333333333), A.hueToRgb(m1, m2, scaledHue), A.hueToRgb(m1, m2, scaledHue - 0.3333333333333333), alpha, t2, t1, t3); + } + }; + A.HwbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, whiteness, blackness, alpha) { + var t3, t1 = {}, + t2 = hue == null, + scaledHue = B.JSNumber_methods.$mod(t2 ? 0 : hue, 360) / 360, + scaledWhiteness = t1.scaledWhiteness = (whiteness == null ? 0 : whiteness) / 100, + scaledBlackness = (blackness == null ? 0 : blackness) / 100, + sum = scaledWhiteness + scaledBlackness; + if (sum > 1) { + t3 = t1.scaledWhiteness = scaledWhiteness / sum; + scaledBlackness /= sum; + } else + t3 = scaledWhiteness; + t3 = new A.HwbColorSpace_convert_toRgb(t1, 1 - t3 - scaledBlackness); + return B.SrgbColorSpace_AD4.convert$6$missingHue(dest, t3.call$1(scaledHue + 0.3333333333333333), t3.call$1(scaledHue), t3.call$1(scaledHue - 0.3333333333333333), alpha, t2); + } + }; + A.HwbColorSpace_convert_toRgb.prototype = { + call$1(hue) { + return A.hueToRgb(0, 1, hue) * this.factor + this._box_0.scaledWhiteness; + }, + $signature: 16 + }; + A.LabColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var powerlessAB, t1, missingLightness, f1, t2, t3, t4; + switch (dest) { + case B.LabColorSpace_IF2: + powerlessAB = lightness == null || A.fuzzyEquals(lightness, 0); + t1 = a == null || powerlessAB ? null : a; + return A.SassColor$_forSpace(B.LabColorSpace_IF2, lightness, t1, b == null || powerlessAB ? null : b, alpha, null); + case B.LchColorSpace_wv8: + return A.labToLch(dest, lightness, a, b, alpha, false, false); + default: + missingLightness = lightness == null; + if (missingLightness) + lightness = 0; + f1 = (lightness + 16) / 116; + t1 = a == null; + t2 = this._convertFToXorZ$1((t1 ? 0 : a) / 500 + f1); + t3 = lightness > 8 ? Math.pow(f1, 3) : lightness / 903.2962962962963; + t4 = b == null; + return B.XyzD50ColorSpace_2No.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, t2 * 0.9642956764295677, t3, this._convertFToXorZ$1(f1 - (t4 ? 0 : b) / 200) * 0.8251046025104602, alpha, t1, t4, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + }, + _convertFToXorZ$1(component) { + var cubed = Math.pow(component, 3) + 0; + return cubed > 0.008856451679035631 ? cubed : (116 * component - 16) / 903.2962962962963; + } + }; + A.LchColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.LabColorSpace_IF2.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.LmsColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, longScaled, mediumScaled, shortScaled, lightness, t2, t3, _null = null; + switch (dest) { + case B.OklabColorSpace_yrt: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = $.$get$lmsToOklab(); + lightness = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + t2 = missingLightness ? _null : lightness; + t3 = missingA ? _null : t1[3] * longScaled + t1[4] * mediumScaled + t1[5] * shortScaled; + return A.SassColor$_forSpace(B.OklabColorSpace_yrt, t2, t3, missingB ? _null : t1[6] * longScaled + t1[7] * mediumScaled + t1[8] * shortScaled, alpha, _null); + case B.OklchColorSpace_li8: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + if (missingLightness) + t1 = _null; + else { + t1 = $.$get$lmsToOklab(); + t1 = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + } + t2 = $.$get$lmsToOklab(); + return A.labToLch(dest, t1, t2[3] * longScaled + t2[4] * mediumScaled + t2[5] * shortScaled, t2[6] * longScaled + t2[7] * mediumScaled + t2[8] * shortScaled, alpha, missingChroma, missingHue); + default: + return this.super$ColorSpace$convertLinear(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, long, medium, short, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { + t1 = $.$get$lmsToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$lmsToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$lmsToLinearProphotoRgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$lmsToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$lmsToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$lmsToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$lmsToXyzD50(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.OklabColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var missingLightness, missingA, missingB, t1; + if (dest === B.OklchColorSpace_li8) + return A.labToLch(dest, lightness, a, b, alpha, missingChroma, missingHue); + missingLightness = lightness == null; + missingA = a == null; + missingB = b == null; + if (missingLightness) + lightness = 0; + if (missingA) + a = 0; + if (missingB) + b = 0; + t1 = $.$get$oklabToLms(); + return B.LmsColorSpace_8I8.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, Math.pow(t1[0] * lightness + t1[1] * a + t1[2] * b, 3) + 0, Math.pow(t1[3] * lightness + t1[4] * a + t1[5] * b, 3) + 0, Math.pow(t1[6] * lightness + t1[7] * a + t1[8] * b, 3) + 0, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + } + }; + A.OklchColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.OklabColorSpace_yrt.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.ProphotoRgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs <= 0.03125 ? channel / 16 : J.get$sign$in(channel) * Math.pow(abs, 1.8); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs >= 0.001953125 ? J.get$sign$in(channel) * Math.pow(abs, 0.5555555555555556) : 16 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { + t1 = $.$get$linearProphotoRgbToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$linearProphotoRgbToLinearA98Rgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$linearProphotoRgbToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$linearProphotoRgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$linearProphotoRgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$linearProphotoRgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$linearProphotoRgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.Rec2020ColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs < 0.08124285829863151 ? channel / 4.5 : J.get$sign$in(channel) * Math.pow((abs + 1.09929682680944 - 1) / 1.09929682680944, 2.2222222222222223); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs > 0.018053968510807 ? J.get$sign$in(channel) * (1.09929682680944 * Math.pow(abs, 0.45) - 0.09929682680944008) : 4.5 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { + t1 = $.$get$linearRec2020ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$linearRec2020ToLinearA98Rgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$linearRec2020ToLinearDisplayP3(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$linearRec2020ToLinearProphotoRgb(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$linearRec2020ToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$linearRec2020ToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$linearRec2020ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.RgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1 = red == null ? null : red / 255, + t2 = green == null ? null : green / 255; + return B.SrgbColorSpace_AD4.convert$5(dest, t1, t2, blue == null ? null : blue / 255, alpha); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear(channel / 255); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear(channel) * 255; + } + }; + A.SrgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingChroma, missingHue, missingLightness) { + var max, min, delta, hue, lightness, saturation, t1, t2, whiteness, blackness, _null = null; + if (B.HslColorSpace_gsm === dest || B.HwbColorSpace_06z === dest) { + if (red == null) + red = 0; + if (green == null) + green = 0; + if (blue == null) + blue = 0; + max = Math.max(Math.max(red, green), blue); + min = Math.min(Math.min(red, green), blue); + delta = max - min; + if (max === min) + hue = 0; + else if (max === red) + hue = 60 * (green - blue) / delta + 360; + else + hue = max === green ? 60 * (blue - red) / delta + 120 : 60 * (red - green) / delta + 240; + if (dest === B.HslColorSpace_gsm) { + lightness = (min + max) / 2; + saturation = lightness === 0 || lightness === 1 ? 0 : 100 * (max - lightness) / Math.min(lightness, 1 - lightness); + if (saturation < 0) { + hue += 180; + saturation = Math.abs(saturation); + } + t1 = missingHue || A.fuzzyEquals(saturation, 0) ? _null : B.JSNumber_methods.$mod(hue, 360); + t2 = missingChroma ? _null : saturation; + return A.SassColor_SassColor$forSpaceInternal(dest, t1, t2, missingLightness ? _null : lightness * 100, alpha); + } else { + whiteness = min * 100; + blackness = 100 - max * 100; + if (!missingHue) { + t1 = whiteness + blackness; + t1 = t1 > 100 || A.fuzzyEquals(t1, 100); + } else + t1 = true; + return A.SassColor_SassColor$forSpaceInternal(dest, t1 ? _null : B.JSNumber_methods.$mod(hue, 360), whiteness, blackness, alpha); + } + } + if (B.RgbColorSpace_mlz === dest) { + t1 = red == null ? _null : red * 255; + t2 = green == null ? _null : green * 255; + return A.SassColor_SassColor$rgbInternal(t1, t2, blue == null ? _null : blue * 255, alpha, _null); + } + if (B.SrgbLinearColorSpace_sEs === dest) { + t1 = this.get$toLinear(); + return A.SassColor_SassColor$forSpaceInternal(dest, A.NullableExtension_andThen(red, t1), A.NullableExtension_andThen(green, t1), A.NullableExtension_andThen(blue, t1), alpha); + } + return this.super$ColorSpace$convertLinear(dest, red, green, blue, alpha, false, false, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, red, green, blue, alpha) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false); + }, + convert$6$missingHue(dest, red, green, blue, alpha, missingHue) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, missingHue, false); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP3(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$linearSrgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$linearSrgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$linearSrgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$linearSrgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.SrgbLinearColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1; + $label0$0: { + if (B.RgbColorSpace_mlz === dest || B.HslColorSpace_gsm === dest || B.HwbColorSpace_06z === dest || B.SrgbColorSpace_AD4 === dest) { + t1 = B.SrgbColorSpace_AD4.convert$5(dest, A.NullableExtension_andThen(red, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(green, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(blue, A.utils0__srgbAndDisplayP3FromLinear$closure()), alpha); + break $label0$0; + } + t1 = this.super$ColorSpace$convert(dest, red, green, blue, alpha); + break $label0$0; + } + return t1; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP3(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$linearSrgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$linearSrgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$linearSrgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$linearSrgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.XyzD50ColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var f0, f1, f2, lightness, a, b, t1, _this = this, _null = null; + if (B.LabColorSpace_IF2 === dest || B.LchColorSpace_wv8 === dest) { + f0 = _this._convertComponentToLabF$1((x == null ? 0 : x) / 0.9642956764295677); + f1 = _this._convertComponentToLabF$1((y == null ? 0 : y) / 1); + f2 = _this._convertComponentToLabF$1((z == null ? 0 : z) / 0.8251046025104602); + lightness = missingLightness ? _null : 116 * f1 - 16; + a = 500 * (f0 - f1); + b = 200 * (f1 - f2); + if (dest === B.LabColorSpace_IF2) { + t1 = missingA ? _null : a; + t1 = A.SassColor$_forSpace(B.LabColorSpace_IF2, lightness, t1, missingB ? _null : b, alpha, _null); + } else + t1 = A.labToLch(B.LchColorSpace_wv8, lightness, a, b, alpha, missingChroma, missingHue); + return t1; + } + return _this.super$ColorSpace$convertLinear(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, x, y, z, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, false, false, false, false, false); + }, + _convertComponentToLabF$1(component) { + return component > 0.008856451679035631 ? Math.pow(component, 0.3333333333333333) + 0 : (903.2962962962963 * component + 16) / 116; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { + t1 = $.$get$xyzD50ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$xyzD50ToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$xyzD50ToLinearProphotoRgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$xyzD50ToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$xyzD50ToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA === dest) { + t1 = $.$get$xyzD50ToXyzD65(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$xyzD50ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.XyzD65ColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { + t1 = $.$get$xyzD65ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu === dest) { + t1 = $.$get$xyzD65ToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG === dest) { + t1 = $.$get$xyzD65ToLinearProphotoRgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk === dest) { + t1 = $.$get$xyzD65ToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN === dest) { + t1 = $.$get$xyzD65ToLinearRec2020(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No === dest) { + t1 = $.$get$xyzD65ToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_8I8 === dest) { + t1 = $.$get$xyzD65ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.SassFunction.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._inspect) + A.throwExpression(A.SassScriptException$(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize$_buffer; + t1.write$1(0, "get-function("); + t2 = this.callable; + visitor._visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertFunction$1($name) { + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassFunction && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.SassList.prototype = { + get$separator(_) { + return this._separator; + }, + get$hasBrackets() { + return this._hasBrackets; + }, + get$isBlank() { + return !this._hasBrackets && B.JSArray_methods.every$1(this._list$_contents, new A.SassList_isBlank_closure()); + }, + get$asList() { + return this._list$_contents; + }, + get$lengthAsList() { + return this._list$_contents.length; + }, + SassList$3$brackets(contents, _separator, brackets) { + if (this._separator === B.ListSeparator_undecided_null_undecided && this._list$_contents.length > 1) + throw A.wrapException(A.ArgumentError$(string$.A_list, null)); + }, + toString$0(_) { + var t2, _this = this, + t1 = true; + if (!_this._hasBrackets) { + t2 = _this._list$_contents.length; + if (t2 !== 0) + t1 = t2 === 1 && _this._separator === B.ListSeparator_ECn; + } + if (t1) + return _this.super$Value$toString(0); + return "(" + _this.super$Value$toString(0) + ")"; + }, + accept$1$1(visitor) { + return visitor.visitList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this._list$_contents.length === 0 ? B.SassMap_Map_empty : this.super$Value$assertMap($name); + }, + tryMap$0() { + return this._list$_contents.length === 0 ? B.SassMap_Map_empty : null; + }, + $eq(_, other) { + var t1, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassList && other._separator === _this._separator && other._hasBrackets === _this._hasBrackets && B.C_ListEquality.equals$2(0, other._list$_contents, _this._list$_contents))) + t1 = _this._list$_contents.length === 0 && other instanceof A.SassMap && other.get$asList().length === 0; + else + t1 = true; + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this._list$_contents); + } + }; + A.SassList_isBlank_closure.prototype = { + call$1(element) { + return element.get$isBlank(); + }, + $signature: 76 + }; + A.ListSeparator.prototype = { + _enumToString$0() { + return "ListSeparator." + this._name; + }, + toString$0(_) { + return this._list$_name; + } + }; + A.SassMap.prototype = { + get$separator(_) { + var t1 = this._map$_contents; + return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_undecided : B.ListSeparator_ECn; + }, + get$asList() { + var t3, t4, t5, result, + t1 = type$.JSArray_Value, + t2 = A._setArrayType([], t1); + for (t3 = type$.Value, t4 = A.MapExtensions_get_pairs(this._map$_contents, t3, t3), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t5 = t4.get$current(t4); + result = A.List_List$from(A._setArrayType([t5._0, t5._1], t1), false, t3); + result.fixed$length = Array; + result.immutable$list = Array; + t2.push(new A.SassList(result, B.ListSeparator_nbm, false)); + } + return t2; + }, + get$lengthAsList() { + var t1 = this._map$_contents; + return t1.get$length(t1); + }, + accept$1$1(visitor) { + return visitor.visitMap$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this; + }, + tryMap$0() { + return this; + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!(other instanceof A.SassMap && B.C_MapEquality.equals$2(0, other._map$_contents, this._map$_contents))) { + t1 = this._map$_contents; + t1 = t1.get$isEmpty(t1) && other instanceof A.SassList && other._list$_contents.length === 0; + } else + t1 = true; + return t1; + }, + get$hashCode(_) { + var t1 = this._map$_contents; + return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty8) : B.C_MapEquality.hash$1(t1); + } + }; + A.SassMixin.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._inspect) + A.throwExpression(A.SassScriptException$(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize$_buffer; + t1.write$1(0, "get-mixin("); + t2 = this.callable; + visitor._visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMixin$1($name) { + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassMixin && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A._SassNull.prototype = { + get$isTruthy() { + return false; + }, + get$isBlank() { + return true; + }, + get$realNull() { + return null; + }, + accept$1$1(visitor) { + if (visitor._inspect) + visitor._serialize$_buffer.write$1(0, "null"); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return B.SassBoolean_true; + } + }; + A.SassNumber.prototype = { + get$unitString() { + var _this = this; + return _this.get$hasUnits() ? _this._unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; + }, + accept$1$1(visitor) { + return visitor.visitNumber$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + withoutSlash$0() { + var _this = this; + return _this.asSlash == null ? _this : _this.withValue$1(_this._number$_value); + }, + assertNumber$1($name) { + return this; + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertInt$1($name) { + var _0_0 = A.fuzzyAsInt(this._number$_value); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + " is not an int.", $name)); + }, + assertInt$0() { + return this.assertInt$1(null); + }, + valueInRange$3(min, max, $name) { + var _this = this, + _0_0 = A.fuzzyCheckRange(_this._number$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$("Expected " + _this.toString$0(0) + " to be within " + min + _this.get$unitString() + " and " + max + _this.get$unitString() + ".", $name)); + }, + valueInRangeWithUnit$4(min, max, $name, unit) { + var _0_0 = A.fuzzyCheckRange(this._number$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); + }, + hasCompatibleUnits$1(other) { + var _this = this; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) + return false; + if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + return _this.isComparableTo$1(other); + }, + assertUnit$2(unit, $name) { + if (this.hasUnit$1(unit)) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); + }, + assertNoUnits$1($name) { + if (!this.get$hasUnits()) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to have no units.", $name)); + }, + assertNoUnits$0() { + return this.assertNoUnits$1(null); + }, + convertValueToMatch$3(other, $name, otherName) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); + }, + coerceValueToUnit$2(unit, $name) { + var t1 = type$.JSArray_String; + return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = this.coerceValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits(t1, other.get$denominatorUnits(other), t2); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + _coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { + var otherHasUnits, t1, compatibilityException, oldNumerators, _i, oldDenominators, _this = this, _box_0 = {}; + if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) + return _this._number$_value; + otherHasUnits = newNumerators.length !== 0 || newDenominators.length !== 0; + if (coerceUnitless) + t1 = !_this.get$hasUnits() || !otherHasUnits; + else + t1 = false; + if (t1) + return _this._number$_value; + compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); + _box_0.value = _this._number$_value; + t1 = _this.get$numeratorUnits(_this); + oldNumerators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = newNumerators.length, _i = 0; _i < newNumerators.length; newNumerators.length === t1 || (0, A.throwConcurrentModificationError)(newNumerators), ++_i) + A.removeFirstWhere(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure(_box_0, newNumerators[_i]), new A.SassNumber__coerceOrConvertValue_closure0(compatibilityException)); + t1 = _this.get$denominatorUnits(_this); + oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = newDenominators.length, _i = 0; _i < newDenominators.length; newDenominators.length === t1 || (0, A.throwConcurrentModificationError)(newDenominators), ++_i) + A.removeFirstWhere(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure1(_box_0, newDenominators[_i]), new A.SassNumber__coerceOrConvertValue_closure2(compatibilityException)); + if (oldNumerators.length !== 0 || oldDenominators.length !== 0) + throw A.wrapException(compatibilityException.call$0()); + return _box_0.value; + }, + _coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); + }, + isComparableTo$1(other) { + var exception; + if (!this.get$hasUnits() || !other.get$hasUnits()) + return true; + try { + this.greaterThan$1(other); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException) + return false; + else + throw exception; + } + }, + greaterThan$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyGreaterThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyLessThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + if (other instanceof A.SassNumber) + return this.withValue$1(this._coerceUnits$2(other, A.number0__moduloLikeSass$closure())); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var _this = this; + if (other instanceof A.SassNumber) + return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_plus_closure())); + if (!(other instanceof A.SassColor)) + return _this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + var _this = this; + if (other instanceof A.SassNumber) + return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_minus_closure())); + if (!(other instanceof A.SassColor)) + return _this.super$Value$minus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + var _this = this; + if (other instanceof A.SassNumber) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number$_value * other._number$_value); + return _this.multiplyUnits$3(_this._number$_value * other._number$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); + } + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + var _this = this; + if (other instanceof A.SassNumber) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number$_value / other._number$_value); + return _this.multiplyUnits$3(_this._number$_value / other._number$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); + } + return _this.super$Value$dividedBy(other); + }, + unaryPlus$0() { + return this; + }, + _coerceUnits$1$2(other, operation) { + var t1, exception; + try { + t1 = operation.call$2(this._number$_value, other.coerceValueToMatch$1(this)); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException) { + this.coerceValueToMatch$1(other); + throw exception; + } else + throw exception; + } + }, + _coerceUnits$2(other, operation) { + return this._coerceUnits$1$2(other, operation, type$.dynamic); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var t1, _0_1, _0_6, _0_3, _0_9, _0_9_isSet, _0_7, _0_7_isSet, t2, _0_2, denominators_case_0, _0_11_isSet, _0_11, _0_13, _0_13_isSet, _0_10, numerators_case_0, t4, t3, t5, t6, t7, numerators_case_1, denominators_case_1, t0, newNumerators, mutableOtherDenominators, _i, numerator, mutableDenominatorUnits, _this = this, _null = null, _box_0 = {}; + _box_0.value = value; + t1 = [_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this), otherNumerators, otherDenominators]; + _0_1 = t1[0]; + _0_6 = _null; + _0_3 = _null; + _0_9 = _null; + _0_9_isSet = false; + _0_7 = _null; + _0_7_isSet = false; + t2 = false; + _0_2 = t1[1]; + _0_3 = t1[2]; + _0_6 = _0_3.length <= 0; + _0_7_isSet = _0_6; + if (_0_7_isSet) { + _0_7 = t1[3]; + _0_9 = _0_7.length <= 0; + t2 = _0_9; + } + _0_9_isSet = _0_7_isSet; + denominators_case_0 = _0_2; + _0_11_isSet = !t2; + _0_11 = _null; + _0_13 = _null; + if (_0_11_isSet) { + _0_11 = _0_1.length <= 0; + _0_13_isSet = _0_11; + _0_10 = _0_1; + if (_0_13_isSet) { + _0_13 = _0_2.length <= 0; + t2 = _0_13; + if (t2) { + if (_0_7_isSet) + denominators_case_0 = _0_7; + else { + _0_7 = t1[3]; + denominators_case_0 = _0_7; + _0_7_isSet = true; + } + numerators_case_0 = _0_3; + } else + numerators_case_0 = _0_1; + } else { + numerators_case_0 = _0_1; + t2 = false; + } + _0_1 = _0_10; + } else { + numerators_case_0 = _0_1; + _0_13_isSet = false; + t2 = true; + } + if (t2) { + t4 = denominators_case_0; + t3 = numerators_case_0; + } else { + t4 = _null; + t3 = t4; + } + if (!t2) { + t2 = _null; + t5 = _null; + if (_0_11_isSet) + t6 = _0_11; + else { + _0_11 = _0_1.length <= 0; + t6 = _0_11; + } + t7 = false; + if (t6) { + if (_0_9_isSet) + t2 = _0_9; + else { + if (_0_7_isSet) + t2 = _0_7; + else { + _0_7 = t1[3]; + t2 = _0_7; + _0_7_isSet = true; + } + _0_9 = t2.length <= 0; + t2 = _0_9; + } + numerators_case_1 = _0_3; + denominators_case_1 = _0_2; + } else { + numerators_case_1 = t2; + t2 = t7; + denominators_case_1 = t5; + } + if (!t2) { + t2 = false; + if (_0_13_isSet) + t5 = _0_13; + else { + _0_13 = _0_2.length <= 0; + t5 = _0_13; + } + if (t5) { + if (_0_6) + denominators_case_1 = _0_7_isSet ? _0_7 : t1[3]; + t1 = _0_6; + } else + t1 = t2; + numerators_case_1 = _0_1; + } else + t1 = true; + if (t1) { + t1 = !_this._areAnyConvertible$2(numerators_case_1, denominators_case_1); + if (t1) { + t3 = denominators_case_1; + t2 = numerators_case_1; + } else { + t2 = t3; + t3 = t4; + } + t0 = t3; + t3 = t1; + t1 = t2; + t2 = t0; + } else { + t2 = t4; + t1 = t3; + t3 = false; + } + } else { + t2 = t4; + t1 = t3; + t3 = true; + } + if (t3) + return A.SassNumber_SassNumber$withUnits(value, t2, t1); + newNumerators = A._setArrayType([], type$.JSArray_String); + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { + numerator = t1[_i]; + A.removeFirstWhere(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure(_box_0, numerator), new A.SassNumber_multiplyUnits_closure0(newNumerators, numerator)); + } + t1 = _this.get$denominatorUnits(_this); + mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { + numerator = otherNumerators[_i]; + A.removeFirstWhere(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure1(_box_0, numerator), new A.SassNumber_multiplyUnits_closure2(newNumerators, numerator)); + } + t1 = _box_0.value; + B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); + return A.SassNumber_SassNumber$withUnits(t1, mutableDenominatorUnits, newNumerators); + }, + _areAnyConvertible$2(units1, units2) { + return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure(units2)); + }, + _unitString$2(numerators, denominators) { + var _0_4, _0_7, _0_6, _0_5, t1, _null = null; + $label0$0: { + _0_4 = numerators.length <= 0; + _0_7 = _null; + _0_6 = _null; + _0_5 = _null; + if (_0_4) { + _0_6 = denominators.length; + t1 = _0_6; + _0_7 = t1 <= 0; + t1 = _0_7; + _0_5 = denominators; + } else + t1 = false; + if (t1) { + t1 = "no units"; + break $label0$0; + } + if (_0_4) + t1 = _0_6 === 1; + else + t1 = false; + if (t1) { + t1 = (_0_4 ? _0_5 : denominators)[0] + "^-1"; + break $label0$0; + } + if (_0_4) { + t1 = "(" + B.JSArray_methods.join$1(denominators, "*") + ")^-1"; + break $label0$0; + } + _0_6 = denominators.length; + t1 = _0_6; + _0_7 = t1 <= 0; + t1 = _0_7; + if (t1) { + t1 = B.JSArray_methods.join$1(numerators, "*"); + break $label0$0; + } + t1 = B.JSArray_methods.join$1(numerators, "*") + "/" + B.JSArray_methods.join$1(denominators, "*"); + break $label0$0; + } + return t1; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassNumber)) + return false; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + if (!_this.get$hasUnits()) + return A.fuzzyEquals(_this._number$_value, other._number$_value); + if (!B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._canonicalizeUnitList$1(other.get$denominatorUnits(other)))) + return false; + return A.fuzzyEquals(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number$_value * _this._canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._canonicalMultiplier$1(other.get$denominatorUnits(other))); + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; + }, + _canonicalizeUnitList$1(units) { + var type, + t1 = units.length; + if (t1 === 0) + return units; + if (t1 === 1) { + type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(units)); + if (type == null) + t1 = units; + else { + t1 = B.Map_397RH.$index(0, type); + t1.toString; + t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); + } + return t1; + } + t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); + t1 = A.List_List$of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure(), t1), true, t1._eval$1("ListIterable.E")); + B.JSArray_methods.sort$0(t1); + return t1; + }, + _canonicalMultiplier$1(units) { + return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure(this)); + }, + canonicalMultiplierForUnit$1(unit) { + var t1, + innerMap = B.Map_gQqJO.$index(0, unit); + if (innerMap == null) + t1 = 1; + else { + t1 = innerMap.get$values(innerMap); + t1 = 1 / t1.get$first(t1); + } + return t1; + }, + unitSuggestion$2($name, unit) { + var t2, t3, result, _this = this, + t1 = _this.get$denominatorUnits(_this); + t1 = new A.MappedListIterable(t1, new A.SassNumber_unitSuggestion_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + t2 = _this.get$numeratorUnits(_this); + t2 = new A.MappedListIterable(t2, new A.SassNumber_unitSuggestion_closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); + t3 = unit == null ? "" : " * 1" + unit; + result = "$" + $name + t1 + t2 + t3; + return _this.get$numeratorUnits(_this).length === 0 ? result : "calc(" + result + ")"; + }, + unitSuggestion$1($name) { + return this.unitSuggestion$2($name, null); + } + }; + A.SassNumber__coerceOrConvertValue_compatibilityException.prototype = { + call$0() { + var t2, t3, message, t4, type, unit, _this = this, + t1 = _this.other; + if (t1 != null) { + t2 = _this.$this; + t3 = t2.toString$0(0) + " and"; + message = new A.StringBuffer(t3); + t4 = _this.otherName; + if (t4 != null) + t3 = message._contents = t3 + (" $" + t4 + ":"); + t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); + message._contents = t1; + if (!t2.get$hasUnits() || !_this.otherHasUnits) + message._contents = t1 + " (one has units and the other doesn't)"; + t1 = message.toString$0(0) + "."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else if (!_this.otherHasUnits) { + t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else { + t1 = _this.newNumerators; + if (t1.length === 1 && _this.newDenominators.length === 0) { + type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(t1)); + if (type != null) { + t1 = _this.$this.toString$0(0); + t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), type.charCodeAt(0)) ? "an " + type : "a " + type; + t3 = B.Map_397RH.$index(0, type); + t3.toString; + t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t3 : "$" + t2 + ": " + t3); + } + } + t2 = _this.newDenominators; + unit = A.pluralize("unit", t1.length + t2.length, null); + t3 = _this.$this; + t2 = "Expected " + t3.toString$0(0) + " to have " + unit + " " + t3._unitString$2(t1, t2) + "."; + t1 = _this.name; + return new A.SassScriptException(t1 == null ? t2 : "$" + t1 + ": " + t2); + } + }, + $signature: 345 + }; + A.SassNumber__coerceOrConvertValue_closure.prototype = { + call$1(oldNumerator) { + var factor = A.conversionFactor(this.newNumerator, oldNumerator); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber__coerceOrConvertValue_closure0.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber__coerceOrConvertValue_closure1.prototype = { + call$1(oldDenominator) { + var factor = A.conversionFactor(this.newDenominator, oldDenominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber__coerceOrConvertValue_closure2.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber_plus_closure.prototype = { + call$2(num1, num2) { + return num1 + num2; + }, + $signature: 62 + }; + A.SassNumber_minus_closure.prototype = { + call$2(num1, num2) { + return num1 - num2; + }, + $signature: 62 + }; + A.SassNumber_multiplyUnits_closure.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber_multiplyUnits_closure0.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber_multiplyUnits_closure1.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber_multiplyUnits_closure2.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber__areAnyConvertible_closure.prototype = { + call$1(unit1) { + var t1, + _0_0 = B.Map_gQqJO.$index(0, unit1); + $label0$0: { + if (_0_0 != null) { + t1 = B.JSArray_methods.any$1(this.units2, _0_0.get$containsKey()); + break $label0$0; + } + t1 = B.JSArray_methods.contains$1(this.units2, unit1); + break $label0$0; + } + return t1; + }, + $signature: 5 + }; + A.SassNumber__canonicalizeUnitList_closure.prototype = { + call$1(unit) { + var t1, + type = $.$get$_typesByUnit().$index(0, unit); + if (type == null) + t1 = unit; + else { + t1 = B.Map_397RH.$index(0, type); + t1.toString; + t1 = B.JSArray_methods.get$first(t1); + } + return t1; + }, + $signature: 6 + }; + A.SassNumber__canonicalMultiplier_closure.prototype = { + call$2(multiplier, unit) { + return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); + }, + $signature: 163 + }; + A.SassNumber_unitSuggestion_closure.prototype = { + call$1(unit) { + return " * 1" + unit; + }, + $signature: 6 + }; + A.SassNumber_unitSuggestion_closure0.prototype = { + call$1(unit) { + return " / 1" + unit; + }, + $signature: 6 + }; + A.ComplexSassNumber.prototype = { + get$numeratorUnits(_) { + return this._numeratorUnits; + }, + get$denominatorUnits(_) { + return this._denominatorUnits; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return true; + }, + hasUnit$1(unit) { + return false; + }, + compatibleWithUnit$1(unit) { + return false; + }, + hasPossiblyCompatibleUnits$1(other) { + throw A.wrapException(A.UnimplementedError$(string$.Comple)); + }, + withValue$1(value) { + return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, this._number$_value, new A._Record_2(numerator, denominator)); + } + }; + A.SingleUnitSassNumber.prototype = { + get$numeratorUnits(_) { + return A.List_List$unmodifiable([this._unit], type$.String); + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.SingleUnitSassNumber(this._unit, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.SingleUnitSassNumber(this._unit, this._number$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return unit === this._unit; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.SingleUnitSassNumber && A.conversionFactor(this._unit, other._unit) != null; + }, + hasPossiblyCompatibleUnits$1(other) { + var t1, knownCompatibilities, otherUnit; + if (!(other instanceof A.SingleUnitSassNumber)) + return false; + t1 = $.$get$_knownCompatibilitiesByUnit(); + knownCompatibilities = t1.$index(0, this._unit.toLowerCase()); + if (knownCompatibilities == null) + return true; + otherUnit = other._unit.toLowerCase(); + return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); + }, + compatibleWithUnit$1(unit) { + return A.conversionFactor(this._unit, unit) != null; + }, + coerceToMatch$1(other) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$coerceToMatch(other, null, null) : t1; + }, + coerceValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$coerceValueToMatch(other, $name, otherName) : t1; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : t1; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$2(newNumerators, newDenominators) { + var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceToUnit$1(newNumerators[0]) : null; + return t1 == null ? this.super$SassNumber$coerce(newNumerators, newDenominators, null) : t1; + }, + coerceValue$3(newNumerators, newDenominators, $name) { + var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceValueToUnit$1(newNumerators[0]) : null; + return t1 == null ? this.super$SassNumber$coerceValue(newNumerators, newDenominators, $name) : t1; + }, + coerceValueToUnit$2(unit, $name) { + var t1 = this._coerceValueToUnit$1(unit); + return t1 == null ? this.super$SassNumber$coerceValueToUnit(unit, $name) : t1; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + _coerceToUnit$1(unit) { + var t1 = this._unit; + if (t1 === unit) + return this; + return A.NullableExtension_andThen(A.conversionFactor(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure(this, unit)); + }, + _coerceValueToUnit$1(unit) { + return A.NullableExtension_andThen(A.conversionFactor(unit, this._unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure(this)); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var mutableOtherDenominators, t1 = {}; + t1.value = value; + t1.newNumerators = otherNumerators; + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + A.removeFirstWhere(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure0(t1, this)); + return A.SassNumber_SassNumber$withUnits(t1.value, mutableOtherDenominators, t1.newNumerators); + }, + unaryMinus$0() { + return new A.SingleUnitSassNumber(this._unit, -this._number$_value, null); + }, + $eq(_, other) { + var factor; + if (other == null) + return false; + if (other instanceof A.SingleUnitSassNumber) { + factor = A.conversionFactor(other._unit, this._unit); + return factor != null && A.fuzzyEquals(this._number$_value * factor, other._number$_value); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this.canonicalMultiplierForUnit$1(_this._unit)) : t1; + } + }; + A.SingleUnitSassNumber__coerceToUnit_closure.prototype = { + call$1(factor) { + return new A.SingleUnitSassNumber(this.unit, this.$this._number$_value * factor, null); + }, + $signature: 350 + }; + A.SingleUnitSassNumber__coerceValueToUnit_closure.prototype = { + call$1(factor) { + return this.$this._number$_value * factor; + }, + $signature: 16 + }; + A.SingleUnitSassNumber_multiplyUnits_closure.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(denominator, this.$this._unit); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 5 + }; + A.SingleUnitSassNumber_multiplyUnits_closure0.prototype = { + call$0() { + var t1 = A._setArrayType([this.$this._unit], type$.JSArray_String), + t2 = this._box_0; + B.JSArray_methods.addAll$1(t1, t2.newNumerators); + t2.newNumerators = t1; + }, + $signature: 0 + }; + A.UnitlessSassNumber.prototype = { + get$numeratorUnits(_) { + return B.List_empty; + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return false; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.UnitlessSassNumber(value, null); + }, + withSlash$2(numerator, denominator) { + return new A.UnitlessSassNumber(this._number$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return false; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber; + }, + hasPossiblyCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber; + }, + compatibleWithUnit$1(unit) { + return true; + }, + coerceToMatch$1(other) { + return other.withValue$1(this._number$_value); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number$_value; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertValueToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : this._number$_value; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$2(newNumerators, newDenominators) { + return A.SassNumber_SassNumber$withUnits(this._number$_value, newDenominators, newNumerators); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number$_value; + }, + coerceValueToUnit$2(unit, $name) { + return this._number$_value; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + greaterThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 > t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$greaterThan(other); + }, + greaterThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 > t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$greaterThanOrEquals(other); + }, + lessThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 < t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$lessThan(other); + }, + lessThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 < t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$lessThanOrEquals(other); + }, + modulo$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(A.moduloLikeSass(this._number$_value, other._number$_value)); + return this.super$SassNumber$modulo(other); + }, + plus$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value + other._number$_value); + return this.super$SassNumber$plus(other); + }, + minus$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value - other._number$_value); + return this.super$SassNumber$minus(other); + }, + times$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value * other._number$_value); + return this.super$SassNumber$times(other); + }, + dividedBy$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value / other._number$_value; + if (other.get$hasUnits()) { + t2 = other.get$denominatorUnits(other); + t2 = A.SassNumber_SassNumber$withUnits(t1, other.get$numeratorUnits(other), t2); + t1 = t2; + } else + t1 = new A.UnitlessSassNumber(t1, null); + return t1; + } + return this.super$SassNumber$dividedBy(other); + }, + unaryMinus$0() { + return new A.UnitlessSassNumber(-this._number$_value, null); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UnitlessSassNumber && A.fuzzyEquals(this._number$_value, other._number$_value); + }, + get$hashCode(_) { + var t1 = this.hashCache; + return t1 == null ? this.hashCache = A.fuzzyHashCode(this._number$_value) : t1; + } + }; + A.SassString.prototype = { + get$_sassLength() { + var result, _this = this, + value = _this.__SassString__sassLength_FI; + if (value === $) { + result = new A.Runes(_this._string$_text).get$length(0); + _this.__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__SassString__sassLength_FI = result; + value = result; + } + return value; + }, + get$isSpecialNumber() { + var t1, _2_0, t2, _0_0, _1_0; + if (this._hasQuotes) + return false; + t1 = this._string$_text; + if (t1.length < 6) + return false; + _2_0 = t1.charCodeAt(0); + $label1$1: { + t2 = false; + if (99 === _2_0 || 67 === _2_0) { + _0_0 = t1.charCodeAt(1); + $label0$0: { + if (108 === _0_0 || 76 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 97 && (t1.charCodeAt(3) | 32) === 109 && (t1.charCodeAt(4) | 32) === 112 && t1.charCodeAt(5) === 40; + break $label0$0; + } + if (97 === _0_0 || 65 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 108 && (t1.charCodeAt(3) | 32) === 99 && t1.charCodeAt(4) === 40; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + break $label1$1; + } + if (118 === _2_0 || 86 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + break $label1$1; + } + if (101 === _2_0 || 69 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 110 && (t1.charCodeAt(2) | 32) === 118 && t1.charCodeAt(3) === 40; + break $label1$1; + } + if (109 === _2_0 || 77 === _2_0) { + _1_0 = t1.charCodeAt(1); + $label2$2: { + if (97 === _1_0 || 65 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 120 && t1.charCodeAt(3) === 40; + break $label2$2; + } + if (105 === _1_0 || 73 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 110 && t1.charCodeAt(3) === 40; + break $label2$2; + } + t1 = t2; + break $label2$2; + } + break $label1$1; + } + t1 = t2; + break $label1$1; + } + return t1; + }, + get$isVar() { + if (this._hasQuotes) + return false; + var t1 = this._string$_text; + if (t1.length < 8) + return false; + return (t1.charCodeAt(0) | 32) === 118 && (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + }, + get$isBlank() { + return !this._hasQuotes && this._string$_text.length === 0; + }, + assertQuoted$1($name) { + if (this._hasQuotes) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be a quoted string.", $name)); + }, + assertUnquoted$1($name) { + if (!this._hasQuotes) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be an unquoted string.", $name)); + }, + assertUnquoted$0() { + return this.assertUnquoted$1(null); + }, + accept$1$1(visitor) { + var t1 = visitor._quote && this._hasQuotes, + t2 = this._string$_text; + if (t1) + visitor._visitQuotedString$1(t2); + else + visitor._visitUnquotedString$1(t2); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertString$1($name) { + return this; + }, + plus$1(other) { + var t1 = this._string$_text, + t2 = this._hasQuotes; + return other instanceof A.SassString ? new A.SassString(t1 + other._string$_text, t2) : new A.SassString(t1 + A.serializeValue(other, false, true), t2); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassString && this._string$_text === other._string$_text; + }, + get$hashCode(_) { + var t1 = this._hashCache; + return t1 == null ? this._hashCache = B.JSString_methods.get$hashCode(this._string$_text) : t1; + } + }; + A.AnySelectorVisitor.prototype = { + visitComplexSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure(this)); + }, + visitCompoundSelector$1(compound) { + return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure(this)); + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + return selector == null ? false : this.visitSelectorList$1(selector); + }, + visitSelectorList$1(list) { + return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); + }, + visitAttributeSelector$1(attribute) { + return false; + }, + visitClassSelector$1(klass) { + return false; + }, + visitIDSelector$1(id) { + return false; + }, + visitParentSelector$1($parent) { + return false; + }, + visitPlaceholderSelector$1(placeholder) { + return false; + }, + visitTypeSelector$1(type) { + return false; + }, + visitUniversalSelector$1(universal) { + return false; + } + }; + A.AnySelectorVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 53 + }; + A.AnySelectorVisitor_visitCompoundSelector_closure.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature: 13 + }; + A._EvaluateVisitor0.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_AsyncBuiltInCallable, + metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure12(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure13(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure14(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure15(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure16(_this), _s9_), A.BuiltInCallable$function("module-variables", _s7_, new A._EvaluateVisitor_closure17(_this), _s9_), A.BuiltInCallable$function("module-functions", _s7_, new A._EvaluateVisitor_closure18(_this), _s9_), A.BuiltInCallable$function("module-mixins", _s7_, new A._EvaluateVisitor_closure19(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure20(_this), _s9_), A.BuiltInCallable$function("get-mixin", _s20_, new A._EvaluateVisitor_closure21(_this), _s9_), new A.AsyncBuiltInCallable("call", A.ScssParser$("@function call($function, $args...) {", null, _s9_).parseArgumentDeclaration$0(), new A._EvaluateVisitor_closure22(_this), false)], t1), + metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure23(_this), false, _s9_), A.AsyncBuiltInCallable$mixin("apply", "$mixin, $args...", new A._EvaluateVisitor_closure24(_this), true, _s9_)], t1); + t1 = type$.AsyncBuiltInCallable; + t2 = A.List_List$of($.$get$moduleFunctions(), true, t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules(), true, type$.BuiltInModule_AsyncCallable), t1.push(metaModule), t2 = t1.length, t3 = _this._async_evaluate$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_AsyncCallable; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._async_evaluate$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + return this.run$body$_EvaluateVisitor(0, importer, node); + }, + run$body$_EvaluateVisitor(_, importer, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure0($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext0($async$self, node)], t1, t1), type$.FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet); + $async$goto = 7; + return A._asyncAwait(type$.Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet._is(t1) ? t1 : A._Future$value(t1, type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), $async$run$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace(error.withLoadedUrls$1($async$self._async_evaluate$_loadedUrls), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$run$2, $async$completer); + }, + _async_evaluate$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _async_evaluate$_assertInModule$2(value, $name) { + return this._async_evaluate$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + return this._loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); + }, + _async_evaluate$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _async_evaluate$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t2, t1, _0_0; + var $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + _0_0 = $async$self._async_evaluate$_builtInModules.$index(0, url); + t1.builtInModule = null; + $async$goto = _0_0 != null ? 3 : 4; + break; + case 3: + // then + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException($async$self._async_evaluate$_exception$2(t1, t2.get$span(t2))); + } + $async$goto = 5; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure1(t1, callback), type$.void), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure2($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); + }, + _async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + return this._execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); + }, + _async_evaluate$_execute$2(importer, stylesheet) { + return this._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable), + $async$returnValue, $async$self = this, _0_0, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, t1, url; + var $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = stylesheet.span; + url = t1.get$sourceUrl(t1); + t1 = $async$self._async_evaluate$_modules; + _0_0 = t1.$index(0, url); + if (_0_0 != null) { + t1 = configuration == null; + currentConfiguration = t1 ? $async$self._async_evaluate$_configuration : configuration; + t2 = $async$self._async_evaluate$_moduleConfigurations.$index(0, url); + t3 = t2.__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration.__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = $async$self._async_evaluate$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? $async$self._async_evaluate$_exception$1(message) : $async$self._async_evaluate$_multiSpanException$3(message, "new load", t1)); + } + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + environment = A.AsyncEnvironment$(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$(); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure0($async$self, importer, stylesheet, extensionStore, configuration, css, preModuleComments), type$.Null), $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan); + case 3: + // returning from await. + t2 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t2, t3 == null ? B.Map_empty7 : t3, extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + $async$self._async_evaluate$_moduleConfigurations.$indexSet(0, url, $async$self._async_evaluate$_configuration); + if (nodeWithSpan != null) + $async$self._async_evaluate$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + $async$returnValue = module; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); + }, + _async_evaluate$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._async_evaluate$_outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + break $label0$0; + } + t1 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _async_evaluate$_combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure1())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure2(selectors))); + if (_0_0 != null) + this._async_evaluate$_throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_AsyncCallable; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule0(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._async_evaluate$_extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); + }, + _async_evaluate$_combineCss$1(root) { + return this._async_evaluate$_combineCss$2$clone(root, false); + }, + _async_evaluate$_extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure1(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure2()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._async_evaluate$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _async_evaluate$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _async_evaluate$_indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + return this.visitStylesheet$body$_EvaluateVisitor(0, node); + }, + visitStylesheet$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, _i; + var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.children, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStylesheet$1, $async$completer); + }, + visitAtRootRule$1(_, node) { + return this.visitAtRootRule$body$_EvaluateVisitor(0, node); + }, + visitAtRootRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, _1_0, resolved, query, $parent, included, t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _0_0; + var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _0_0 = node.query; + $async$goto = _0_0 != null ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(_0_0, true), $async$visitAtRootRule$1); + case 6: + // returning from await. + _1_0 = $async$result; + resolved = _1_0._0; + _1_0._1; + query = A.AtRootQueryParser$(resolved, $async$self._async_evaluate$_logger, null).parse$0(0); + // goto join + $async$goto = 4; + break; + case 5: + // else + query = B.AtRootQuery_n2q; + case 4: + // join + $parent = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); + for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = $async$self._async_evaluate$_trimIncluded$1(included); + $async$goto = root === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure1($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); + case 9: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 8: + // join + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure2($async$self, node)), $async$visitAtRootRule$1); + case 10: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); + }, + _async_evaluate$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); + $parent = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_)) + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _async_evaluate$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure5(_this, newParent, node), + t1 = query._all || query._at_root_query$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure6(_this, scope); + if (_this._async_evaluate$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure7(_this, scope); + if (_this._async_evaluate$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure8(_this, scope); + return _this._async_evaluate$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure9()) ? new A._EvaluateVisitor__scopeForAtRoot_closure10(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + return this.visitContentRule$body$_EvaluateVisitor(0, node); + }, + visitContentRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, $content; + var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $content = $async$self._async_evaluate$_environment._async_environment$_content; + if ($content == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure0($async$self, $content), type$.Null), $async$visitContentRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitContentRule$1, $async$completer); + }, + visitDebugRule$1(_, node) { + return this.visitDebugRule$body$_EvaluateVisitor(0, node); + }, + visitDebugRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, value, t1; + var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); + $async$self._async_evaluate$_logger.debug$2(0, t1, node.span); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDebugRule$1, $async$completer); + }, + visitDeclaration$1(_, node) { + return this.visitDeclaration$body$_EvaluateVisitor(0, node); + }, + visitDeclaration$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _box_0; + var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate$_inUnknownAtRule && !$async$self._async_evaluate$_inKeyframes) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Declarm, node.span)); + if ($async$self._async_evaluate$_declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Declarw, node.span)); + siblings = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent")._parent.children; + interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule); + if (siblings.get$last(siblings) !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent")) { + if ($async$self._async_evaluate$_quietDeps) + if (!$async$self._async_evaluate$_inDependency) { + t1 = $async$self._async_evaluate$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + t1 = !t1; + } else + t1 = false; + if (t1) + for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent")) + 1, null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t6 = t1.__internal$_current; + rule = t6 == null ? t2._as(t6) : t6; + $label0$1: { + if (rule instanceof A.ModifiableCssComment) + continue; + t6 = rule instanceof A.ModifiableCssStyleRule; + rule0 = t6 ? rule : null; + if (t6) { + interleavedRules.push(rule0); + break $label0$1; + } + $async$self._async_evaluate$_warn$3(string$.Sassx27s, new A.MultiSpan(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_gf0); + B.JSArray_methods.clear$0(interleavedRules); + break $label0$1; + } + } + t1 = node.name; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$2$warnForColor(t1, true), $async$visitDeclaration$1); + case 3: + // returning from await. + $name = $async$result; + _1_0 = $async$self._async_evaluate$_declarationName; + if (_1_0 != null) + $name = new A.CssValue(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String); + _2_0 = node.value; + $async$goto = _2_0 != null ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait(_2_0.accept$1($async$self), $async$visitDeclaration$1); + case 6: + // returning from await. + value = $async$result; + if (!value.get$isBlank() || value.get$asList().length === 0) { + t2 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + t3 = _2_0.get$span(_2_0); + t4 = node.span; + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + t5 = interleavedRules.length === 0 ? null : $async$self._async_evaluate$_stackTrace$1(t4); + if ($async$self._async_evaluate$_sourceMap) { + t6 = A.NullableExtension_andThen(_2_0, $async$self.get$_async_evaluate$_expressionNode()); + t6 = t6 == null ? null : J.get$span$z(t6); + } else + t6 = null; + t2.addChild$1(A.ModifiableCssDeclaration$($name, new A.CssValue(value, t3, type$.CssValue_Value), t4, interleavedRules, t1, t5, t6)); + } else if (J.startsWith$1$s($name.value, "--")) + throw A.wrapException($async$self._async_evaluate$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); + case 5: + // join + _3_0 = node.children; + _box_0.children = null; + $async$goto = _3_0 != null ? 7 : 8; + break; + case 7: + // then + _box_0.children = _3_0; + oldDeclarationName = $async$self._async_evaluate$_declarationName; + $async$self._async_evaluate$_declarationName = $name.value; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure0(_box_0, $async$self), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); + case 9: + // returning from await. + $async$self._async_evaluate$_declarationName = oldDeclarationName; + case 8: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDeclaration$1, $async$completer); + }, + visitEachRule$1(_, node) { + return this.visitEachRule$body$_EvaluateVisitor(0, node); + }, + visitEachRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, _box_0, t1, list, nodeWithSpan, _0_0; + var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + t1 = node.list; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); + case 3: + // returning from await. + list = $async$result; + nodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t1); + _0_0 = node.variables; + $label0$0: { + _box_0.variable = null; + if (_0_0.length === 1) { + _box_0.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure2(_box_0, $async$self, nodeWithSpan); + break $label0$0; + } + _box_0.variables = null; + _box_0.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure3(_box_0, $async$self, nodeWithSpan); + break $label0$0; + } + $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure4($async$self, list, t1, node), true, type$.nullable_Value); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitEachRule$1, $async$completer); + }, + _async_evaluate$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._async_evaluate$_environment.setLocalVariable$3(variables[i], this._async_evaluate$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._async_evaluate$_environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + return this.visitErrorRule$body$_EvaluateVisitor(0, node); + }, + visitErrorRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$self = this, $async$temp1, $async$temp2; + var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$temp2 = J; + $async$goto = 2; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); + case 2: + // returning from await. + throw $async$temp1.wrapException($async$self._async_evaluate$_exception$2($async$temp2.toString$0$($async$result), node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitErrorRule$1, $async$completer); + }, + visitExtendRule$1(_, node) { + return this.visitExtendRule$body$_EvaluateVisitor(0, node); + }, + visitExtendRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, targetText, targetMap, compound, styleRule; + var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + styleRule = $async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + if (styleRule == null || $async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + visitor = A._SerializeVisitor$(null, true, null, null, true, false, null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; + $async$self._async_evaluate$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan(A.SpanExtensions_trimRight(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_ido); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(node.selector, true), $async$visitExtendRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + targetText = _0_0._0; + targetMap = _0_0._1; + for (t1 = A.SelectorList_SelectorList$parse(A.trimAscii(targetText, true), false, targetMap, $async$self._async_evaluate$_logger, false).components, t2 = t1.length, t3 = styleRule._style_rule$_selector._box$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", complex.span, null)); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, null)); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, $async$self._async_evaluate$_mediaQueries); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitExtendRule$1, $async$completer); + }, + visitAtRule$1(_, node) { + return this.visitAtRule$body$_EvaluateVisitor(0, node); + }, + visitAtRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, $name, t1, value, children, wasInKeyframes, wasInUnknownAtRule; + var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1(node.name), $async$visitAtRule$1); + case 3: + // returning from await. + $name = $async$result; + t1 = A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure2($async$self)); + $async$goto = 4; + return A._asyncAwait(type$.Future_nullable_CssValue_String._is(t1) ? t1 : A._Future$value(t1, type$.nullable_CssValue_String), $async$visitAtRule$1); + case 4: + // returning from await. + value = $async$result; + children = node.children; + if (children == null) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; + if (A.unvendor($name.value) === "keyframes") + $async$self._async_evaluate$_inKeyframes = true; + else + $async$self._async_evaluate$_inUnknownAtRule = true; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure3($async$self, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure4(), type$.ModifiableCssAtRule, type$.Null), $async$visitAtRule$1); + case 5: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRule$1, $async$completer); + }, + visitForRule$1(_, node) { + return this.visitForRule$body$_EvaluateVisitor(0, node); + }, + visitForRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; + var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = node.from; + t3 = type$.SassNumber; + $async$goto = 3; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure4($async$self, node), t3), $async$visitForRule$1); + case 3: + // returning from await. + fromNumber = $async$result; + t4 = node.to; + $async$goto = 4; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure5($async$self, node), t3), $async$visitForRule$1); + case 4: + // returning from await. + toNumber = $async$result; + from = $async$self._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure6(fromNumber)); + to = t1.to = $async$self._async_evaluate$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure7(toNumber, fromNumber)); + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure8(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForRule$1, $async$completer); + }, + visitForwardRule$1(_, node) { + return this.visitForwardRule$body$_EvaluateVisitor(0, node); + }, + visitForwardRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; + var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldConfiguration = $async$self._async_evaluate$_configuration; + adjustedConfiguration = oldConfiguration.throughForward$1(node); + t1 = node.configuration; + t2 = t1.length; + t3 = node.url; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); + case 6: + // returning from await. + newConfiguration = $async$result; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure1($async$self, node), newConfiguration), $async$visitForwardRule$1); + case 7: + // returning from await. + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + $async$self._async_evaluate$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + $async$self._async_evaluate$_assertConfigurationIsEmpty$1(newConfiguration); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$self._async_evaluate$_configuration = adjustedConfiguration; + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure2($async$self, node)), $async$visitForwardRule$1); + case 8: + // returning from await. + $async$self._async_evaluate$_configuration = oldConfiguration; + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForwardRule$1, $async$completer); + }, + _async_evaluate$_addForwardConfiguration$2(configuration, node) { + return this._addForwardConfiguration$body$_EvaluateVisitor(configuration, node); + }, + _addForwardConfiguration$body$_EvaluateVisitor(configuration, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration), + $async$returnValue, $async$self = this, t2, t3, t4, t5, _i, variable, t6, oldValue, t7, variableNodeWithSpan, t8, t1, newValues, $async$temp1, $async$temp2, $async$temp3; + var $async$_async_evaluate$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = configuration._configuration$_values; + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + t2 = node.configuration, t3 = t2.length, t4 = type$._Future_Value, t5 = type$.Future_Value, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + variable = t2[_i]; + if (variable.isGuarded) { + t6 = variable.name; + oldValue = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t6); + if (oldValue != null) + t7 = !oldValue.value.$eq(0, B.C__SassNull); + else { + oldValue = null; + t7 = false; + } + if (t7) { + newValues.$indexSet(0, t6, oldValue); + // goto for update + $async$goto = 4; + break; + } + } + t6 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t6); + t7 = variable.name; + t6 = t6.accept$1($async$self); + if (!t5._is(t6)) { + t8 = new A._Future($.Zone__current, t4); + t8._state = 8; + t8._resultOrListeners = t6; + t6 = t8; + } + $async$temp1 = newValues; + $async$temp2 = t7; + $async$temp3 = A; + $async$goto = 6; + return A._asyncAwait(t6, $async$_async_evaluate$_addForwardConfiguration$2); + case 6: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) { + $async$returnValue = new A.ExplicitConfiguration(node, newValues, null); + // goto return + $async$goto = 1; + break; + } else { + $async$returnValue = new A.Configuration(newValues, null); + // goto return + $async$goto = 1; + break; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addForwardConfiguration$2, $async$completer); + }, + _async_evaluate$_registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this._async_evaluate$__root; + if (t1 == null) + return; + if (_this._async_evaluate$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._async_evaluate$_preModuleComments; + if (t1 == null) + t1 = _this._async_evaluate$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.List_CssComment); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure0()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children._collection$_source, type$.CssComment), type$.UnmodifiableListView_CssComment)); + _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).clearChildren$0(); + _this._async_evaluate$__endOfImports = 0; + }, + _async_evaluate$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0, $name, value; + if (!(configuration instanceof A.ExplicitConfiguration)) + return; + t1 = configuration._configuration$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + _0_0 = t1.get$first(t1); + $name = _0_0._0; + value = _0_0._1; + t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; + throw A.wrapException(this._async_evaluate$_exception$2(t1, value.configurationSpan)); + }, + _async_evaluate$_assertConfigurationIsEmpty$1(configuration) { + return this._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + return this.visitFunctionRule$body$_EvaluateVisitor(0, node); + }, + visitFunctionRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate$_inDependency; + t4 = t1._async_environment$_functions; + index = t4.length - 1; + t5 = node.name; + t1._async_environment$_functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); + }, + visitIfRule$1(_, node) { + return this.visitIfRule$body$_EvaluateVisitor(0, node); + }, + visitIfRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, clause; + var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + clause = node.lastClause; + t1 = node.clauses, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + clauseToCheck = t1[_i]; + $async$goto = 6; + return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); + case 6: + // returning from await. + if ($async$result.get$isTruthy()) { + clause = clauseToCheck; + // goto after for + $async$goto = 5; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = A.NullableExtension_andThen(clause, new A._EvaluateVisitor_visitIfRule_closure0($async$self)); + $async$goto = 7; + return A._asyncAwait(type$.Future_nullable_Value._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Value), $async$visitIfRule$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfRule$1, $async$completer); + }, + visitImportRule$1(_, node) { + return this.visitImportRule$body$_EvaluateVisitor(0, node); + }, + visitImportRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; + var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $import = t1[_i]; + $async$goto = $import instanceof A.DynamicImport ? 6 : 8; + break; + case 6: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_visitDynamicImport$1($import), $async$visitImportRule$1); + case 9: + // returning from await. + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 10; + return A._asyncAwait($async$self._visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); + case 10: + // returning from await. + case 7: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitImportRule$1, $async$completer); + }, + _async_evaluate$_visitDynamicImport$1($import) { + return this._async_evaluate$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure0(this, $import), type$.void); + }, + _async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + return this._loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport); + }, + _async_evaluate$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _async_evaluate$_loadStylesheet$3$forImport(url, span, forImport) { + return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, exception, $async$exception; + var $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + baseUrl = baseUrl; + $async$handler = 4; + $async$self._async_evaluate$_importSpan = span; + _0_0 = $async$self._async_evaluate$_importCache; + importCache = null; + $async$goto = _0_0 != null ? 7 : 8; + break; + case 7: + // then + importCache = _0_0; + if (baseUrl == null) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").span; + baseUrl = t1.get$sourceUrl(t1); + } + $async$goto = 9; + return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate$_importer, baseUrl, forImport), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); + case 9: + // returning from await. + _1_0 = $async$result; + importer = null; + canonicalUrl = null; + originalUrl = null; + $async$goto = type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0) ? 10 : 11; + break; + case 10: + // then + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + $async$self._async_evaluate$_loadedUrls.add$1(0, canonicalUrl); + isDependency = $async$self._async_evaluate$_inDependency || !J.$eq$(importer, $async$self._async_evaluate$_importer); + t1 = importCache; + t2 = importer; + t3 = canonicalUrl; + t4 = originalUrl; + $async$goto = 12; + return A._asyncAwait(t1.importCanonical$4$originalUrl$quiet(t2, t3, t4, $async$self._async_evaluate$_quietDeps && isDependency), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); + case 12: + // returning from await. + _2_0 = $async$result; + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + $async$returnValue = new A._Record_3_importer_isDependency(t1, t2, isDependency); + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 11: + // join + case 8: + // join + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) + throw $async$exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace($async$self._async_evaluate$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + A.throwWithTrace($async$self._async_evaluate$_exception$1($async$self._async_evaluate$_getErrorMessage$1(error0)), error0, stackTrace0); + } + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 3: + // uncaught + $async$next = [2]; + case 5: + // finally + $async$handler = 2; + $async$self._async_evaluate$_importSpan = null; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport, $async$completer); + }, + _visitStaticImport$1($import) { + return this._visitStaticImport$body$_EvaluateVisitor($import); + }, + _visitStaticImport$body$_EvaluateVisitor($import) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, node, $async$temp1, $async$temp2; + var $async$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1($import.url), $async$_visitStaticImport$1); + case 2: + // returning from await. + t1 = $async$result; + t2 = A.NullableExtension_andThen($import.modifiers, $async$self.get$_async_evaluate$_interpolationToValue()); + $async$temp1 = A; + $async$temp2 = t1; + $async$goto = 3; + return A._asyncAwait(type$.Future_nullable_CssValue_String._is(t2) ? t2 : A._Future$value(t2, type$.nullable_CssValue_String), $async$_visitStaticImport$1); + case 3: + // returning from await. + node = new $async$temp1.ModifiableCssImport($async$temp2, $async$result, $import.span); + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(node); + else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(node); + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(node); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_visitStaticImport$1, $async$completer); + }, + _async_evaluate$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + return this._applyMixin$body$_EvaluateVisitor(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent); + }, + _applyMixin$body$_EvaluateVisitor(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, _0_0, t2, _1_8; + var $async$_async_evaluate$_applyMixin$5 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (mixin == null) + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = type$.AsyncBuiltInCallable._is(mixin); + $async$goto = t1 && !mixin.get$acceptsContent() && contentCallable != null ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_applyMixin$5); + case 5: + // returning from await. + t1 = $async$result._values; + _0_0 = mixin.callbackFor$2(J.get$length$asx(t1[2]), new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + case 4: + // join + $async$goto = t1 ? 6 : 7; + break; + case 6: + // then + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure1($async$self, $arguments, mixin, nodeWithSpanWithoutContent)), $async$_async_evaluate$_applyMixin$5); + case 8: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 7: + // join + t1 = type$.UserDefinedCallable_AsyncEnvironment._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + if (_1_8 instanceof A.MixinRule) + t2 = !type$.MixinRule._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + $async$goto = t1 ? 9 : 10; + break; + case 9: + // then + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure2($async$self, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null), $async$_async_evaluate$_applyMixin$5); + case 11: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 10: + // join + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + case 2: + // break $label0$0 + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_applyMixin$5, $async$completer); + }, + visitIncludeRule$1(_, node) { + return this.visitIncludeRule$body$_EvaluateVisitor(0, node); + }, + visitIncludeRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, mixin; + var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + mixin = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure2($async$self, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + $async$self._async_evaluate$_warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_HJ0); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_applyMixin$5(mixin, A.NullableExtension_andThen(node.content, new A._EvaluateVisitor_visitIncludeRule_closure3($async$self)), node.$arguments, node, new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure4(node))), $async$visitIncludeRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); + }, + visitMixinRule$1(_, node) { + return this.visitMixinRule$body$_EvaluateVisitor(0, node); + }, + visitMixinRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate$_inDependency; + t4 = t1._async_environment$_mixins; + index = t4.length - 1; + t5 = node.name; + t1._async_environment$_mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMixinRule$1, $async$completer); + }, + visitLoudComment$1(_, node) { + return this.visitLoudComment$body$_EvaluateVisitor(0, node); + }, + visitLoudComment$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, text; + var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_inFunction) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + t1 = node.text; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(t1), $async$visitLoudComment$1); + case 3: + // returning from await. + text = $async$result; + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(new A.ModifiableCssComment(text, t1.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLoudComment$1, $async$completer); + }, + visitMediaRule$1(_, node) { + return this.visitMediaRule$body$_EvaluateVisitor(0, node); + }, + visitMediaRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._visitMediaQueries$1(node.query), $async$visitMediaRule$1); + case 3: + // returning from await. + queries = $async$result; + mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure2($async$self, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty1; + else { + t2 = $async$self._async_evaluate$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = $async$self._async_evaluate$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure3($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure4(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitMediaRule$1); + case 4: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMediaRule$1, $async$completer); + }, + _visitMediaQueries$1(interpolation) { + return this._visitMediaQueries$body$_EvaluateVisitor(interpolation); + }, + _visitMediaQueries$body$_EvaluateVisitor(interpolation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery), + $async$returnValue, $async$self = this, _0_0; + var $async$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(interpolation, true), $async$_visitMediaQueries$1); + case 3: + // returning from await. + _0_0 = $async$result; + $async$returnValue = A.CssMediaQuery_parseList(_0_0._0, _0_0._1, $async$self._async_evaluate$_logger); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_visitMediaQueries$1, $async$completer); + }, + _async_evaluate$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) + $label0$1: { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_0 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_1 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + break $label0$1; + } + } + return queries; + }, + visitReturnRule$1(_, node) { + return this.visitReturnRule$body$_EvaluateVisitor(0, node); + }, + visitReturnRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1, t2; + var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value._is(t2) ? t2 : A._Future$value(t2, type$.Value), $async$visitReturnRule$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitReturnRule$1, $async$completer); + }, + visitSilentComment$1(_, node) { + return this.visitSilentComment$body$_EvaluateVisitor(0, node); + }, + visitSilentComment$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue; + var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSilentComment$1, $async$completer); + }, + visitStyleRule$1(_, node) { + return this.visitStyleRule$body$_EvaluateVisitor(0, node); + }, + visitStyleRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule; + var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate$_inKeyframes && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(t1, true), $async$visitStyleRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + selectorText = _0_0._0; + selectorMap = _0_0._1; + $async$goto = $async$self._async_evaluate$_inKeyframes ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable(A.KeyframeSelectorParser$(selectorText, selectorMap, $async$self._async_evaluate$_logger).parse$0(0), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure3($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure4(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitStyleRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + parsedSelector = A.SelectorList_SelectorList$parse(selectorText, true, selectorMap, $async$self._async_evaluate$_logger, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss); + t1 = $async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.fromPlainCss; + nest = t1 !== true; + if (nest) { + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss) + for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + _1_0 = t1[_i].leadingCombinators; + if (_1_0.length >= 1) { + first = _1_0[0]; + t3 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet"); + t3 = t3.plainCss; + } else { + first = null; + t3 = false; + } + if (t3) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Top_lel, first.span)); + } + t1 = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !$async$self._async_evaluate$_atRootExcludingStyleRule, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss); + } + rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, $async$self._async_evaluate$_mediaQueries), node.span, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss, parsedSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; + t1 = $async$self._async_evaluate$_atRootExcludingStyleRule = false; + t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure5() : null; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure6($async$self, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule, type$.Null), $async$visitStyleRule$1); + case 7: + // returning from await. + $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + $async$self._async_evaluate$_warnForBogusCombinators$1(rule); + if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } + if (t1) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStyleRule$1, $async$completer); + }, + _async_evaluate$_warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) + for (t1 = rule._style_rule$_selector._box$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor)) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight(complex.span), B.Deprecation_ido); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight(complex.span), B.Deprecation_ido); + } + } else { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t5.$index(0, 0)); + _this._async_evaluate$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure0()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_ido); + } + } + }, + visitSupportsRule$1(_, node) { + return this.visitSupportsRule$body$_EvaluateVisitor(0, node); + }, + visitSupportsRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + $async$temp1 = A; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); + case 4: + // returning from await. + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through($async$temp1.ModifiableCssSupportsRule$(new $async$temp2.CssValue($async$result, t1.get$span(t1), type$.CssValue_String), node.span), new A._EvaluateVisitor_visitSupportsRule_closure1($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure2(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitSupportsRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); + }, + _async_evaluate$_visitSupportsCondition$1(condition) { + return this._visitSupportsCondition$body$_EvaluateVisitor(condition); + }, + _visitSupportsCondition$body$_EvaluateVisitor(condition) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, _box_0, $async$temp1, $async$temp2; + var $async$_async_evaluate$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + $async$goto = condition instanceof A.SupportsOperation ? 4 : 5; + break; + case 4: + // then + t1 = condition.operator; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.left, t1), $async$_async_evaluate$_visitSupportsCondition$1); + case 6: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + " " + t1 + " "; + $async$temp2 = A; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.right, t1), $async$_async_evaluate$_visitSupportsCondition$1); + case 7: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 5: + // join + $async$goto = condition instanceof A.SupportsNegation ? 8 : 9; + break; + case 8: + // then + $async$temp1 = A; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$1(condition.condition), $async$_async_evaluate$_visitSupportsCondition$1); + case 10: + // returning from await. + t1 = "not " + $async$temp1.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 9: + // join + $async$goto = condition instanceof A.SupportsInterpolation ? 11 : 12; + break; + case 11: + // then + $async$goto = 13; + return A._asyncAwait($async$self._evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate$_visitSupportsCondition$1); + case 13: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 12: + // join + _box_0.declaration = null; + $async$goto = condition instanceof A.SupportsDeclaration ? 14 : 15; + break; + case 14: + // then + _box_0.declaration = condition; + $async$goto = 16; + return A._asyncAwait($async$self._async_evaluate$_withSupportsDeclaration$1$1(new A._EvaluateVisitor__visitSupportsCondition_closure0(_box_0, $async$self), type$.String), $async$_async_evaluate$_visitSupportsCondition$1); + case 16: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 15: + // join + $async$goto = condition instanceof A.SupportsFunction ? 17 : 18; + break; + case 17: + // then + $async$temp1 = A; + $async$goto = 19; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.name), $async$_async_evaluate$_visitSupportsCondition$1); + case 19: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + "("; + $async$temp2 = A; + $async$goto = 20; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.$arguments), $async$_async_evaluate$_visitSupportsCondition$1); + case 20: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 18: + // join + $async$goto = condition instanceof A.SupportsAnything ? 21 : 22; + break; + case 21: + // then + $async$temp1 = A; + $async$goto = 23; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.contents), $async$_async_evaluate$_visitSupportsCondition$1); + case 23: + // returning from await. + t1 = "(" + $async$temp1.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 22: + // join + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + case 3: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitSupportsCondition$1, $async$completer); + }, + _async_evaluate$_withSupportsDeclaration$1$1(callback, $T) { + return this._withSupportsDeclaration$body$_EvaluateVisitor(callback, $T, $T); + }, + _withSupportsDeclaration$body$_EvaluateVisitor(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, t1, oldInSupportsDeclaration; + var $async$_async_evaluate$_withSupportsDeclaration$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = true; + $async$handler = 3; + t1 = callback.call$0(); + $async$goto = 6; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate$_withSupportsDeclaration$1$1); + case 6: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [2]; + case 4: + // finally + $async$handler = 2; + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withSupportsDeclaration$1$1, $async$completer); + }, + _async_evaluate$_parenthesize$2(condition, operator) { + return this._parenthesize$body$_EvaluateVisitor(condition, operator); + }, + _async_evaluate$_parenthesize$1(condition) { + return this._async_evaluate$_parenthesize$2(condition, null); + }, + _parenthesize$body$_EvaluateVisitor(condition, operator) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1; + var $async$_async_evaluate$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!(condition instanceof A.SupportsNegation)) + if (condition instanceof A.SupportsOperation) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$temp1 = A; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); + case 5: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); + case 6: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_parenthesize$2, $async$completer); + }, + visitVariableDeclaration$1(_, node) { + return this.visitVariableDeclaration$body$_EvaluateVisitor(0, node); + }, + visitVariableDeclaration$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t2, value, t1, $async$temp1, $async$temp2, $async$temp3; + var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + if (node.isGuarded) { + if (node.namespace == null && $async$self._async_evaluate$_environment._async_environment$_variables.length === 1) { + t2 = $async$self._async_evaluate$_configuration._configuration$_values; + t2 = t2.get$isEmpty(t2) ? null : t2.remove$1(0, node.name); + t1.override = null; + if (t2 != null) { + t1.override = t2; + t2 = !t2.value.$eq(0, B.C__SassNull); + } else + t2 = false; + if (t2) { + $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure2(t1, $async$self, node)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + value = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure3($async$self, node)); + if (value != null && !value.$eq(0, B.C__SassNull)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + if (node.isGlobal && !$async$self._async_evaluate$_environment.globalVariableExists$1(node.name)) { + t1 = $async$self._async_evaluate$_environment._async_environment$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; + $async$self._async_evaluate$_warn$3(t1, node.span, B.Deprecation_2nU); + } + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(type$.Future_Value._is(t2) ? t2 : A._Future$value(t2, type$.Value), $async$visitVariableDeclaration$1); + case 3: + // returning from await. + $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure4($async$self, $async$temp3, $async$self._async_evaluate$_withoutSlash$2($async$result, t1))); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); + }, + visitUseRule$1(_, node) { + return this.visitUseRule$body$_EvaluateVisitor(0, node); + }, + visitUseRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, values, t3, t4, _i, variable, t5, variableNodeWithSpan, t6, t7, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.configuration; + t2 = t1.length; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + t3 = type$._Future_Value, t4 = type$.Future_Value, _i = 0; + case 6: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 8; + break; + } + variable = t1[_i]; + t5 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t5); + t6 = variable.name; + t5 = t5.accept$1($async$self); + if (!t4._is(t5)) { + t7 = new A._Future($.Zone__current, t3); + t7._state = 8; + t7._resultOrListeners = t5; + t5 = t7; + } + $async$temp1 = values; + $async$temp2 = t6; + $async$temp3 = A; + $async$goto = 9; + return A._asyncAwait(t5, $async$visitUseRule$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + configuration = new A.ExplicitConfiguration(node, values, null); + // goto join + $async$goto = 4; + break; + case 5: + // else + configuration = B.Configuration_Map_empty_null; + case 4: + // join + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure0($async$self, node), configuration), $async$visitUseRule$1); + case 10: + // returning from await. + $async$self._async_evaluate$_assertConfigurationIsEmpty$1(configuration); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUseRule$1, $async$completer); + }, + visitWarnRule$1(_, node) { + return this.visitWarnRule$body$_EvaluateVisitor(0, node); + }, + visitWarnRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, value, t1; + var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure0($async$self, node), type$.Value), $async$visitWarnRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString ? value._string$_text : $async$self._async_evaluate$_serialize$2(value, node.expression); + $async$self._async_evaluate$_logger.warn$2$trace(0, t1, $async$self._async_evaluate$_stackTrace$1(node.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitWarnRule$1, $async$completer); + }, + visitWhileRule$1(_, node) { + return this._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure0(this, node), true, node.hasDeclarations, type$.nullable_Value); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_wdM && t1 !== B.BinaryOperator_U77; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._async_evaluate$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure0(_this, node), type$.Value); + }, + _async_evaluate$_slash$3(left, right, node) { + var t2, _1_1, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber, + _1_2 = null, right0 = null, + t1 = false; + if (_1_2_isSet) { + t2 = type$.SassNumber; + t2._as(left); + if (right instanceof A.SassNumber) { + t2._as(right); + t1 = node.allowsSlash && this._async_evaluate$_operandAllowsSlash$1(node.left) && this._async_evaluate$_operandAllowsSlash$1(node.right); + right0 = right; + _1_2 = right0; + } else + _1_2 = right; + _1_1 = left; + } else { + _1_1 = left; + left = null; + } + if (t1) + return type$.SassNumber._as(result).withSlash$2(left, right0); + if (_1_1 instanceof A.SassNumber) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber; + else + t1 = false; + if (t1) { + this._async_evaluate$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation0().call$1(node)) + " or " + A.expressionToCalc(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_oJv); + return result; + } + return result; + }, + _async_evaluate$_operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._async_evaluate$_environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return this.visitValueExpression$body$_EvaluateVisitor(0, node); + }, + visitValueExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue; + var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitValueExpression$1, $async$completer); + }, + visitVariableExpression$1(_, node) { + return this.visitVariableExpression$body$_EvaluateVisitor(0, node); + }, + visitVariableExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, result; + var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure0($async$self, node)); + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined variable.", node.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); + }, + visitUnaryOperationExpression$1(_, node) { + return this.visitUnaryOperationExpression$body$_EvaluateVisitor(0, node); + }, + visitUnaryOperationExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure0($async$temp3, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); + }, + visitBooleanExpression$1(_, node) { + return this.visitBooleanExpression$body$_EvaluateVisitor(0, node); + }, + visitBooleanExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean), + $async$returnValue; + var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value ? B.SassBoolean_true : B.SassBoolean_false; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); + }, + visitIfExpression$1(_, node) { + return this.visitIfExpression$body$_EvaluateVisitor(0, node); + }, + visitIfExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, condition, t1, ifTrue, ifFalse, result, _0_0, positional, named; + var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateMacroArguments$1(node), $async$visitIfExpression$1); + case 3: + // returning from await. + _0_0 = $async$result; + positional = _0_0._0; + named = _0_0._1; + $async$self._async_evaluate$_verifyArguments$4(J.get$length$asx(positional), named, $.$get$IfExpression_declaration(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + $async$goto = 4; + return A._asyncAwait(condition.accept$1($async$self), $async$visitIfExpression$1); + case 4: + // returning from await. + result = $async$result.get$isTruthy() ? ifTrue : ifFalse; + t1 = result.accept$1($async$self); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$visitIfExpression$1); + case 5: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, $async$self._async_evaluate$_expressionNode$1(result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfExpression$1, $async$completer); + }, + visitNullExpression$1(_, node) { + return this.visitNullExpression$body$_EvaluateVisitor(0, node); + }, + visitNullExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue; + var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = B.C__SassNull; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNullExpression$1, $async$completer); + }, + visitNumberExpression$1(_, node) { + return this.visitNumberExpression$body$_EvaluateVisitor(0, node); + }, + visitNumberExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue; + var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = A.SassNumber_SassNumber(node.value, node.unit); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._async_evaluate$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return this.visitColorExpression$body$_EvaluateVisitor(0, node); + }, + visitColorExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor), + $async$returnValue; + var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitColorExpression$1, $async$completer); + }, + visitListExpression$1(_, node) { + return this.visitListExpression$body$_EvaluateVisitor(0, node); + }, + visitListExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassList), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A.mapAsync(node.contents, new A._EvaluateVisitor_visitListExpression_closure0($async$self), type$.Expression, type$.Value), $async$visitListExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$temp1.SassList$($async$result, node.separator, node.hasBrackets); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitListExpression$1, $async$completer); + }, + visitMapExpression$1(_, node) { + return this.visitMapExpression$body$_EvaluateVisitor(0, node); + }, + visitMapExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap), + $async$returnValue, $async$self = this, t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; + var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Value; + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); + t2 = node.pairs, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + t4 = t2[_i]; + key = t4._0; + value = t4._1; + $async$goto = 6; + return A._asyncAwait(key.accept$1($async$self), $async$visitMapExpression$1); + case 6: + // returning from await. + keyValue = $async$result; + $async$goto = 7; + return A._asyncAwait(value.accept$1($async$self), $async$visitMapExpression$1); + case 7: + // returning from await. + valueValue = $async$result; + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t1, "second key", t2, $async$self._async_evaluate$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMapExpression$1, $async$completer); + }, + visitFunctionExpression$1(_, node) { + return this.visitFunctionExpression$body$_EvaluateVisitor(0, node); + }, + visitFunctionExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t2, _0_0, t3, t4, oldInFunction, result, t1, $function; + var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + $function = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure2($async$self, node)); + t1.$function = $function; + $async$goto = $function == null ? 3 : 5; + break; + case 3: + // then + if (node.namespace != null) + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure3()); + } else + t3 = false; + $async$goto = t3 ? 6 : 7; + break; + case 6: + // then + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate$_visitCalculation$2$inLegacySassFunction(node, true), $async$visitFunctionExpression$1); + case 8: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 7: + // join + $async$goto = "calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 ? 9 : 10; + break; + case 9: + // then + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate$_visitCalculation$1(node), $async$visitFunctionExpression$1); + case 11: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 10: + // join + $function = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate$_builtInFunctions.$index(0, t2); + t2 = t1.$function = $function == null ? new A.PlainCssCallable(node.originalName) : $function; + // goto join + $async$goto = 4; + break; + case 5: + // else + t2 = $function; + case 4: + // join + if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) + $async$self._async_evaluate$_warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_HJ0); + oldInFunction = $async$self._async_evaluate$_inFunction; + $async$self._async_evaluate$_inFunction = true; + $async$goto = 12; + return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure4(t1, $async$self, node), type$.Value), $async$visitFunctionExpression$1); + case 12: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); + }, + _async_evaluate$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculation$body$_EvaluateVisitor(node, inLegacySassFunction); + }, + _async_evaluate$_visitCalculation$1(node) { + return this._async_evaluate$_visitCalculation$2$inLegacySassFunction(node, false); + }, + _visitCalculation$body$_EvaluateVisitor(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$next = [], $async$self = this, $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, t2, t3, $async$temp1; + var $async$_async_evaluate$_visitCalculation$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t2 = node.$arguments; + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Rest_a, node.span)); + $async$self._async_evaluate$_checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + t2 = t2.positional, t4 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t4)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t3; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate$_visitCalculation$2$inLegacySassFunction); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $arguments = t3; + if ($async$self._async_evaluate$_inSupportsDeclaration) { + $async$returnValue = new A.SassCalculation(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + // goto return + $async$goto = 1; + break; + } + oldCallableNode = $async$self._async_evaluate$_callableNode; + $async$self._async_evaluate$_callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument("sqrt", J.$index$asx($arguments, 0), A.number0__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument("sin", J.$index$asx($arguments, 0), A.number0__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument("cos", J.$index$asx($arguments, 0), A.number0__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument("tan", J.$index$asx($arguments, 0), A.number0__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument("asin", J.$index$asx($arguments, 0), A.number0__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument("acos", J.$index$asx($arguments, 0), A.number0__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument("atan", J.$index$asx($arguments, 0), A.number0__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan2(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_round(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + $async$self._async_evaluate$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace($async$self._async_evaluate$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + $async$self._async_evaluate$_callableNode = oldCallableNode; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitCalculation$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate$_checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check0(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _async_evaluate$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) + throw A.wrapException(this._async_evaluate$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._async_evaluate$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); + } + } + }, + _async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculationExpression$body$_EvaluateVisitor(node, inLegacySassFunction); + }, + _visitCalculationExpression$body$_EvaluateVisitor(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, result, t2, _0_0, _1_0, t3, _i, i, _box_0, t1, inner, $async$temp1; + var $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + t1 = node instanceof A.ParenthesizedExpression; + inner = t1 ? node.expression : null; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 5: + // returning from await. + result = $async$result; + $async$returnValue = result instanceof A.SassString ? new A.SassString("(" + result._string$_text + ")", false) : result; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = node instanceof A.StringExpression && node.accept$1(new A._IsCalculationSafeVisitor()) ? 6 : 7; + break; + case 6: + // then + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? null : t2.toLowerCase(); + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber(3.141592653589793, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber(2.718281828459045, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(-1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber(0 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + $async$temp1 = A; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(t1), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 9: + // returning from await. + t1 = new $async$temp1.SassString($async$result, false); + // goto break $label0$0 + $async$goto = 8; + break; + case 8: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 7: + // join + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + $async$goto = t1 ? 10 : 11; + break; + case 10: + // then + $async$self._async_evaluate$_checkWhitespaceAroundCalculationOperator$1(node); + $async$goto = 12; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure0(_box_0, $async$self, node, inLegacySassFunction), type$.Object), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 12: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 11: + // join + $async$goto = node instanceof A.NumberExpression || node instanceof A.VariableExpression || node instanceof A.FunctionExpression || node instanceof A.IfExpression ? 13 : 14; + break; + case 13: + // then + $async$goto = 15; + return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 15: + // returning from await. + _1_0 = $async$result; + $label1$1: { + if (_1_0 instanceof A.SassNumber) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString) { + t1 = !_1_0._hasQuotes; + result = _1_0; + } else { + result = null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression($async$self._async_evaluate$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 14: + // join + $async$goto = node instanceof A.ListExpression && !node.hasBrackets && B.ListSeparator_nbm === node.separator && node.contents.length >= 2 ? 16 : 17; + break; + case 16: + // then + t1 = A._setArrayType([], type$.JSArray_Object); + t2 = node.contents, t3 = t2.length, _i = 0; + case 18: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 20; + break; + } + $async$temp1 = t1; + $async$goto = 21; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 21: + // returning from await. + $async$temp1.push($async$result); + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + $async$self._async_evaluate$_checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation && t2[i] instanceof A.ParenthesizedExpression) + t1[i] = new A.SassString("(" + A.S(t3) + ")", false); + } + $async$returnValue = new A.SassString(B.JSArray_methods.join$1(t1, " "), false); + // goto return + $async$goto = 1; + break; + case 17: + // join + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.This_e, node.get$span(node))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate$_checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_u15 && t1 !== B.BinaryOperator_SjO) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _async_evaluate$_binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_u15 === operator) { + t1 = B.CalculationOperator_g2q; + break $label0$0; + } + if (B.BinaryOperator_SjO === operator) { + t1 = B.CalculationOperator_CxF; + break $label0$0; + } + if (B.BinaryOperator_2No === operator) { + t1 = B.CalculationOperator_171; + break $label0$0; + } + if (B.BinaryOperator_U77 === operator) { + t1 = B.CalculationOperator_Qf1; + break $label0$0; + } + t1 = A.throwExpression(this._async_evaluate$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _async_evaluate$_checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString || current instanceof A.SassString) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_AiQ !== _0_2) + t1 = B.UnaryOperator_cLp === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._async_evaluate$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor(0, node); + }, + visitInterpolatedFunctionExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, result, t1, oldInFunction; + var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); + case 3: + // returning from await. + t1 = $async$result; + oldInFunction = $async$self._async_evaluate$_inFunction; + $async$self._async_evaluate$_inFunction = true; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0($async$self, node, new A.PlainCssCallable(t1)), type$.Value), $async$visitInterpolatedFunctionExpression$1); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); + }, + _async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + return this._runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $V); + }, + _runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldCallable, result, evaluated, $name; + var $async$_async_evaluate$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runUserDefinedCallable$1$4); + case 3: + // returning from await. + evaluated = $async$result; + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = $async$self._async_evaluate$_currentCallable; + $async$self._async_evaluate$_currentCallable = callable; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure0($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate$_runUserDefinedCallable$1$4); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_currentCallable = oldCallable; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runUserDefinedCallable$1$4, $async$completer); + }, + _async_evaluate$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + return this._runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); + }, + _runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, $async$exception, $async$temp1; + var $async$_async_evaluate$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = type$.AsyncBuiltInCallable._is(callable) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate$_runFunctionCallable$3); + case 6: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, nodeWithSpan); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment._is(callable) ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure0($async$self, callable), type$.Value), $async$_async_evaluate$_runFunctionCallable$3); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = callable instanceof A.PlainCssCallable ? 11 : 13; + break; + case 11: + // then + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + $async$handler = 15; + first = true; + t1 = $arguments.positional, t2 = t1.length, _i = 0; + case 18: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 20; + break; + } + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + $async$temp1 = A; + $async$goto = 21; + return A._asyncAwait($async$self._evaluateToCss$1(argument), $async$_async_evaluate$_runFunctionCallable$3); + case 21: + // returning from await. + t4 = $async$temp1.S($async$result); + t3._contents += t4; + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + restArg = $arguments.rest; + $async$goto = restArg != null ? 22 : 23; + break; + case 22: + // then + $async$goto = 24; + return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate$_runFunctionCallable$3); + case 24: + // returning from await. + rest = $async$result; + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = $async$self._async_evaluate$_serialize$2(rest, restArg); + t1._contents += t2; + case 23: + // join + $async$handler = 2; + // goto after finally + $async$goto = 17; + break; + case 15: + // catch + $async$handler = 14; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw $async$exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw $async$exception; + // goto after finally + $async$goto = 17; + break; + case 14: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 17: + // after finally + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + $async$returnValue = new A.SassString(t2.charCodeAt(0) == 0 ? t2 : t2, false); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runFunctionCallable$3, $async$completer); + }, + _async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + return this._runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); + }, + _runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, t2, t3, argument, t4, t5, t6, t7, rest, argumentList, exception, _box_0, evaluated, oldCallableNode, $async$exception; + var $async$_async_evaluate$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runBuiltInCallable$3); + case 3: + // returning from await. + evaluated = $async$result; + oldCallableNode = $async$self._async_evaluate$_callableNode; + $async$self._async_evaluate$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(J.get$length$asx(evaluated._values[2]), namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + $async$self._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure2(_box_0, evaluated, namedSet)); + declaredArguments = _box_0.overload.$arguments; + i = J.get$length$asx(evaluated._values[2]), t1 = declaredArguments.length, t2 = type$._Future_Value, t3 = type$.Future_Value; + case 4: + // for condition + if (!(i < t1)) { + // goto after for + $async$goto = 6; + break; + } + argument = declaredArguments[i]; + t4 = evaluated._values[2]; + t5 = evaluated._values[0].remove$1(0, argument.name); + $async$goto = t5 == null ? 7 : 8; + break; + case 7: + // then + t5 = argument.defaultValue; + t6 = t5.accept$1($async$self); + if (!t3._is(t6)) { + t7 = new A._Future($.Zone__current, t2); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate$_runBuiltInCallable$3); + case 9: + // returning from await. + t5 = $async$self._async_evaluate$_withoutSlash$2($async$result, t5); + case 8: + // join + J.add$1$ax(t4, t5); + case 5: + // for update + ++i; + // goto for condition + $async$goto = 4; + break; + case 6: + // after for + if (_box_0.overload.restArgument != null) { + if (J.get$length$asx(evaluated._values[2]) > t1) { + rest = J.sublist$1$ax(evaluated._values[2], t1); + J.removeRange$2$ax(evaluated._values[2], t1, J.get$length$asx(evaluated._values[2])); + } else + rest = B.List_empty8; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : evaluated._values[4]); + J.add$1$ax(evaluated._values[2], argumentList); + } else + argumentList = null; + result = null; + $async$handler = 11; + $async$goto = 14; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure3(_box_0, evaluated), type$.Value), $async$_async_evaluate$_runBuiltInCallable$3); + case 14: + // returning from await. + result = $async$result; + $async$handler = 2; + // goto after finally + $async$goto = 13; + break; + case 11: + // catch + $async$handler = 10; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) + throw $async$exception; + else { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace($async$self._async_evaluate$_exception$2($async$self._async_evaluate$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + // goto after finally + $async$goto = 13; + break; + case 10: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 13: + // after finally + $async$self._async_evaluate$_callableNode = oldCallableNode; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + if (t1.get$isEmpty(t1)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + t1 = A.pluralize("argument", J.get$length$asx(t1.get$keys(t1)), null); + t2 = evaluated._values[0]; + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + t1 + " named " + A.toSentence(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runBuiltInCallable_closure4(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runBuiltInCallable$3, $async$completer); + }, + _async_evaluate$_evaluateArguments$1($arguments) { + return this._evaluateArguments$body$_EvaluateVisitor($arguments); + }, + _evaluateArguments$body$_EvaluateVisitor($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, expression, nodeForSpan, t5, t6, named, namedNodes, $name, value, t7, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; + var $async$_async_evaluate$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + positional = A._setArrayType([], type$.JSArray_Value); + positionalNodes = A._setArrayType([], type$.JSArray_AstNode); + t1 = $arguments.positional, t2 = t1.length, t3 = type$._Future_Value, t4 = type$.Future_Value, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + nodeForSpan = $async$self._async_evaluate$_expressionNode$1(expression); + t5 = expression.accept$1($async$self); + if (!t4._is(t5)) { + t6 = new A._Future($.Zone__current, t3); + t6._state = 8; + t6._resultOrListeners = t5; + t5 = t6; + } + $async$temp1 = positional; + $async$goto = 6; + return A._asyncAwait(t5, $async$_async_evaluate$_evaluateArguments$1); + case 6: + // returning from await. + $async$temp1.push($async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); + positionalNodes.push(nodeForSpan); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); + t2 = type$.AstNode; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + t5 = A.MapExtensions_get_pairs($arguments.named, t1, type$.Expression), t5 = t5.get$iterator(t5); + case 7: + // for condition + if (!t5.moveNext$0()) { + // goto after for + $async$goto = 8; + break; + } + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + nodeForSpan = $async$self._async_evaluate$_expressionNode$1(value); + t6 = value.accept$1($async$self); + if (!t4._is(t6)) { + t7 = new A._Future($.Zone__current, t3); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$temp1 = named; + $async$temp2 = $name; + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate$_evaluateArguments$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + // goto for condition + $async$goto = 7; + break; + case 8: + // after for + restArgs = $arguments.rest; + if (restArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 10; + return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 10: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure3()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided; + } else if (rest instanceof A.SassList) { + t3 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure4($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._separator; + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure5($async$self, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 11; + return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 11: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure6()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_evaluateArguments$1, $async$completer); + }, + _async_evaluate$_evaluateMacroArguments$1(invocation) { + return this._evaluateMacroArguments$body$_EvaluateVisitor(invocation); + }, + _evaluateMacroArguments$body$_EvaluateVisitor(invocation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_List_Expression_and_Map_String_Expression), + $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; + var $async$_async_evaluate$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = invocation.$arguments; + restArgs_ = t1.rest; + if (restArgs_ == null) { + $async$returnValue = new A._Record_2(t1.positional, t1.named); + // goto return + $async$goto = 1; + break; + } + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); + $async$goto = 3; + return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); + case 3: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap) + $async$self._async_evaluate$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure3(restArgs_)); + else if (rest instanceof A.SassList) { + t2 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure4($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure5($async$self, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) { + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } + $async$goto = 4; + return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); + case 4: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure6($async$self, keywordRestNodeForSpan, keywordRestArgs_)); + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_evaluateMacroArguments$1, $async$completer); + }, + _async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure0(this, values, convert, this._async_evaluate$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _async_evaluate$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _async_evaluate$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure0($arguments, positional, named)); + }, + visitSelectorExpression$1(_, node) { + return this.visitSelectorExpression$body$_EvaluateVisitor(0, node); + }, + visitSelectorExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1; + var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + $async$returnValue = t1 == null ? B.C__SassNull : t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); + }, + visitStringExpression$1(_, node) { + return this.visitStringExpression$body$_EvaluateVisitor(0, node); + }, + visitStringExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), + $async$returnValue, $async$self = this, t1, t2, t3, _i, value, t4, _0_0, text, oldInSupportsDeclaration; + var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + t2 = node.text.contents, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + value = t2[_i]; + if (typeof value == "string") { + t4 = value; + // goto break $label0$0 + $async$goto = 6; + break; + } + $async$goto = value instanceof A.Expression ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait(value.accept$1($async$self), $async$visitStringExpression$1); + case 9: + // returning from await. + _0_0 = $async$result; + $label1$1: { + if (_0_0 instanceof A.SassString) { + text = _0_0._string$_text; + t4 = text; + break $label1$1; + } + t4 = $async$self._async_evaluate$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + // goto break $label0$0 + $async$goto = 6; + break; + case 8: + // join + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + case 6: + // break $label0$0 + t1.push(t4); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = B.JSArray_methods.join$0(t1); + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A.SassString(t1, node.hasQuotes); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStringExpression$1, $async$completer); + }, + visitSupportsExpression$1(_, expression) { + return this.visitSupportsExpression$body$_EvaluateVisitor(0, expression); + }, + visitSupportsExpression$body$_EvaluateVisitor(_, expression) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.SassString($async$result, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); + }, + visitCssAtRule$1(node) { + return this.visitCssAtRule$body$_EvaluateVisitor(node); + }, + visitCssAtRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1; + var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor(t1.value) === "keyframes") + $async$self._async_evaluate$_inKeyframes = true; + else + $async$self._async_evaluate$_inUnknownAtRule = true; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure2(), type$.ModifiableCssAtRule, type$.Null), $async$visitCssAtRule$1); + case 3: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); + }, + visitCssComment$1(node) { + return this.visitCssComment$body$_EvaluateVisitor(node); + }, + visitCssComment$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(new A.ModifiableCssComment(node.text, node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssComment$1, $async$completer); + }, + visitCssDeclaration$1(node) { + return this.visitCssDeclaration$body$_EvaluateVisitor(node); + }, + visitCssDeclaration$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); + }, + visitCssImport$1(node) { + return this.visitCssImport$body$_EvaluateVisitor(node); + }, + visitCssImport$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, modifiableNode; + var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(modifiableNode); + else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(modifiableNode); + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssImport$1, $async$completer); + }, + visitCssKeyframeBlock$1(node) { + return this.visitCssKeyframeBlock$body$_EvaluateVisitor(node); + }, + visitCssKeyframeBlock$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure2(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitCssKeyframeBlock$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); + }, + visitCssMediaRule$1(node) { + return this.visitCssMediaRule$body$_EvaluateVisitor(node); + }, + visitCssMediaRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure2($async$self, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty1; + else { + t2 = $async$self._async_evaluate$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = $async$self._async_evaluate$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure3($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure4(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitCssMediaRule$1); + case 3: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); + }, + visitCssStyleRule$1(node) { + return this.visitCssStyleRule$body$_EvaluateVisitor(node); + }, + visitCssStyleRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild; + var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate$_inKeyframes && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_k, node.span)); + t1 = $async$self._async_evaluate$_atRootExcludingStyleRule; + styleRule = t1 ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t2 = t1 ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t2 = t2 == null ? null : t2.fromPlainCss; + nest = t2 !== true; + t2 = node._style_rule$_selector._box$_inner; + if (nest) { + t2 = t2.value; + t3 = styleRule == null ? null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$2(originalSelector, $async$self._async_evaluate$_mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; + $async$self._async_evaluate$_atRootExcludingStyleRule = false; + t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure1() : null; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure2($async$self, rule, node), false, t1, type$.ModifiableCssStyleRule, type$.Null), $async$visitCssStyleRule$1); + case 2: + // returning from await. + $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _0_1 = t2.get$length(t1); + if (_0_1 >= 1) { + lastChild = t2.elementAt$1(t1, _0_1 - 1); + t1 = styleRule == null; + } else { + lastChild = null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); + }, + visitCssStylesheet$1(node) { + return this.visitCssStylesheet$body$_EvaluateVisitor(node); + }, + visitCssStylesheet$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax(node.get$children(node)); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + $async$goto = 4; + return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); + }, + visitCssSupportsRule$1(node) { + return this.visitCssSupportsRule$body$_EvaluateVisitor(node); + }, + visitCssSupportsRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure2(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitCssSupportsRule$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); + }, + _async_evaluate$_handleReturn$1$2(list, callback) { + return this._handleReturn$body$_EvaluateVisitor(list, callback); + }, + _async_evaluate$_handleReturn$2(list, callback) { + return this._async_evaluate$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _handleReturn$body$_EvaluateVisitor(list, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, t1, _i, _0_0; + var $async$_async_evaluate$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = list.length, _i = 0; + case 3: + // for condition + if (!(_i < list.length)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate$_handleReturn$1$2); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_handleReturn$1$2, $async$completer); + }, + _async_evaluate$_withEnvironment$1$2(environment, callback, $T) { + return this._withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $T); + }, + _withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldEnvironment; + var $async$_async_evaluate$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldEnvironment = $async$self._async_evaluate$_environment; + $async$self._async_evaluate$_environment = environment; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withEnvironment$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_environment = oldEnvironment; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withEnvironment$1$2, $async$completer); + }, + _async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + return this._interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor); + }, + _async_evaluate$_interpolationToValue$1(interpolation) { + return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _async_evaluate$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String), + $async$returnValue, $async$self = this, result, t1; + var $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor); + case 3: + // returning from await. + result = $async$result; + t1 = trim ? A.trimAscii(result, true) : result; + $async$returnValue = new A.CssValue(t1, interpolation.span, type$.CssValue_String); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_interpolationToValue$3$trim$warnForColor, $async$completer); + }, + _async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor); + }, + _async_evaluate$_performInterpolation$1(interpolation) { + return this._async_evaluate$_performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this; + var $async$_async_evaluate$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor), $async$_async_evaluate$_performInterpolation$2$warnForColor); + case 3: + // returning from await. + $async$returnValue = $async$result._0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_performInterpolation$2$warnForColor, $async$completer); + }, + _async_evaluate$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolationWithMap$body$_EvaluateVisitor(interpolation, true); + }, + _performInterpolationWithMap$body$_EvaluateVisitor(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_InterpolationMap), + $async$returnValue, $async$self = this, _0_0, result, map; + var $async$_async_evaluate$_performInterpolationWithMap$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), $async$_async_evaluate$_performInterpolationWithMap$2$warnForColor); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + map = _0_0._1; + map.toString; + $async$returnValue = new A._Record_2(result, map); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_performInterpolationWithMap$2$warnForColor, $async$completer); + }, + _async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + return this._performInterpolationHelper$body$_EvaluateVisitor(interpolation, sourceMap, warnForColor); + }, + _performInterpolationHelper$body$_EvaluateVisitor(interpolation, sourceMap, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_nullable_InterpolationMap), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, t7, first, _i, t8, value, result, t9, result0, targetLocations, oldInSupportsDeclaration; + var $async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : null; + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = false; + t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression, t4 = targetLocations == null, t5 = type$.JSArray_Object, t6 = interpolation.span, t7 = type$.Object, first = true, _i = 0, t8 = ""; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + value = t1[_i]; + if (!first) + if (!t4) + targetLocations.push(A.SourceLocation$(t8.length, null, null, null)); + if (typeof value == "string") { + t8 += value; + // goto for update + $async$goto = 4; + break; + } + t3._as(value); + $async$goto = 6; + return A._asyncAwait(value.accept$1($async$self), $async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor); + case 6: + // returning from await. + result = $async$result; + if (warnForColor && $.$get$namesByColor().containsKey$1(result)) { + t9 = A._setArrayType([""], t5); + result0 = A.List_List$from(t9, false, t7); + result0.fixed$length = Array; + result0.immutable$list = Array; + result0 = new A.Interpolation(result0, t6); + result0.Interpolation$2(t9, t6); + t9 = $.$get$namesByColor(); + $async$self._async_evaluate$_warn$2(string$.You_pr + A.S(t9.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t9.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_u15, new A.StringExpression(result0, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t8 += $async$self._async_evaluate$_serialize$3$quote(result, value, false); + case 4: + // for update + ++_i, first = false; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A._Record_2(t8.charCodeAt(0) == 0 ? t8 : t8, A.NullableExtension_andThen(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure0(interpolation))); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor, $async$completer); + }, + _evaluateToCss$2$quote(expression, quote) { + return this._evaluateToCss$body$_EvaluateVisitor(expression, quote); + }, + _evaluateToCss$1(expression) { + return this._evaluateToCss$2$quote(expression, true); + }, + _evaluateToCss$body$_EvaluateVisitor(expression, quote) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1; + var $async$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = expression.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$_evaluateToCss$2$quote); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_serialize$3$quote($async$result, expression, quote); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_evaluateToCss$2$quote, $async$completer); + }, + _async_evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure0(value, quote)); + }, + _async_evaluate$_serialize$2(value, nodeWithSpan) { + return this._async_evaluate$_serialize$3$quote(value, nodeWithSpan, true); + }, + _async_evaluate$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression) { + t1 = this._async_evaluate$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure0(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + return this._withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $T); + }, + _async_evaluate$_withParent$2$2(node, callback, $S, $T) { + return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _async_evaluate$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, t1, result; + var $async$_async_evaluate$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate$_addChild$2$through(node, through); + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + $async$self._async_evaluate$__parent = node; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate$_withParent$2$4$scopeWhen$through); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$__parent = t1; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withParent$2$4$scopeWhen$through, $async$completer); + }, + _async_evaluate$_addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._async_evaluate$_assertInModule$2(this._async_evaluate$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _async_evaluate$_addChild$1(node) { + return this._async_evaluate$_addChild$2$through(node, null); + }, + _async_evaluate$_withStyleRule$1$2(rule, callback, $T) { + return this._withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $T); + }, + _withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldRule; + var $async$_async_evaluate$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldRule = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + $async$self._async_evaluate$_styleRuleIgnoringAtRoot = rule; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStyleRule$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_styleRuleIgnoringAtRoot = oldRule; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withStyleRule$1$2, $async$completer); + }, + _async_evaluate$_withMediaQueries$1$3(queries, sources, callback, $T) { + return this._withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $T); + }, + _withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; + var $async$_async_evaluate$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldMediaQueries = $async$self._async_evaluate$_mediaQueries; + oldSources = $async$self._async_evaluate$_mediaQuerySources; + $async$self._async_evaluate$_mediaQueries = queries; + $async$self._async_evaluate$_mediaQuerySources = sources; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withMediaQueries$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_mediaQueries = oldMediaQueries; + $async$self._async_evaluate$_mediaQuerySources = oldSources; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withMediaQueries$1$3, $async$completer); + }, + _async_evaluate$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { + return this._withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $T); + }, + _withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldMember, result, t1; + var $async$_async_evaluate$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_stack; + t1.push(new A._Record_2($async$self._async_evaluate$_member, nodeWithSpan)); + oldMember = $async$self._async_evaluate$_member; + $async$self._async_evaluate$_member = member; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStackFrame$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_member = oldMember; + t1.pop(); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withStackFrame$1$3, $async$completer); + }, + _async_evaluate$_withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._async_evaluate$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation0().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_oJv); + return value.withoutSlash$0(); + }, + _async_evaluate$_stackFrame$2(member, span) { + return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure0(this))); + }, + _async_evaluate$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._async_evaluate$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._async_evaluate$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._async_evaluate$_stackFrame$2(_this._async_evaluate$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _async_evaluate$_stackTrace$0() { + return this._async_evaluate$_stackTrace$1(null); + }, + _async_evaluate$_warn$3(message, span, deprecation) { + var t1, trace, _this = this; + if (_this._async_evaluate$_quietDeps) + if (!_this._async_evaluate$_inDependency) { + t1 = _this._async_evaluate$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._async_evaluate$_warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._async_evaluate$_stackTrace$1(span); + t1 = _this._async_evaluate$_logger; + if (deprecation == null) + t1.warn$3$span$trace(0, message, span, trace); + else + A.WarnForDeprecation_warnForDeprecation(t1, deprecation, message, span, trace); + }, + _async_evaluate$_warn$2(message, span) { + return this._async_evaluate$_warn$3(message, span, null); + }, + _async_evaluate$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._async_evaluate$_stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._async_evaluate$_stackTrace$1(span); + return new A.SassRuntimeException(t2, B.Set_empty, message, t1); + }, + _async_evaluate$_exception$1(message) { + return this._async_evaluate$_exception$2(message, null); + }, + _async_evaluate$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._async_evaluate$_stack)._1; + return A.MultiSpanSassRuntimeException$(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._async_evaluate$_stackTrace$0(), null); + }, + _async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, + addStackFrame = true; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace(t1.withTrace$1(this._async_evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _async_evaluate$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, $T) { + return this._addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, addStackFrame, $T, $T); + }, + _addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { + return this._addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, true, $T); + }, + _addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, addStackFrame, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$_addExceptionSpanAsync$1$3$addStackFrame = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_addExceptionSpanAsync$1$3$addStackFrame); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace(t1.withTrace$1($async$self._async_evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_addExceptionSpanAsync$1$3$addStackFrame, $async$completer); + }, + _async_evaluate$_addExceptionTrace$1$1(callback, $T) { + return this._addExceptionTrace$body$_EvaluateVisitor(callback, $T, $T); + }, + _addExceptionTrace$body$_EvaluateVisitor(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; + var $async$_async_evaluate$_addExceptionTrace$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate$_addExceptionTrace$1$1); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) + throw $async$exception; + else if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace(error.withTrace$1($async$self._async_evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addExceptionTrace$1$1, $async$completer); + }, + _async_evaluate$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { + return this._addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $T); + }, + _addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, t3, $async$exception; + var $async$_async_evaluate$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_addErrorSpan$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw $async$exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = $async$self._async_evaluate$_stackTrace$0(); + A.throwWithTrace(new A.SassRuntimeException(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addErrorSpan$1$2, $async$completer); + }, + _async_evaluate$_getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + } + }; + A._EvaluateVisitor_closure12.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure13.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._async_evaluate$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure14.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate$_environment; + t3 = variable._string$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._async_evaluate$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure15.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure16.prototype = { + call$1($arguments) { + var t1 = this.$this._async_evaluate$_environment; + if (!t1._async_environment$_inMixin) + throw A.wrapException(A.SassScriptException$(string$.conten, null)); + return t1._async_environment$_content != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure17.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), t4._1); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure18.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$functions(module), type$.String, type$.AsyncCallable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassFunction(t4._1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure19.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$mixins(), type$.String, type$.AsyncCallable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassMixin(t4._1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure20.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction(new A.PlainCssCallable($name._string$_text)); + } + t1 = this.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + callable = t1._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure6(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction(callable); + }, + $signature: 165 + }; + A._EvaluateVisitor__closure6.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string$_text; + t1 = this.$this; + local = t1._async_evaluate$_environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._async_evaluate$_builtInFunctions.$index(0, normalizedName); + }, + $signature: 89 + }; + A._EvaluateVisitor_closure21.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + callable = t1._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure5(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin(callable); + }, + $signature: 167 + }; + A._EvaluateVisitor__closure5.prototype = { + call$0() { + var t1 = this.$this._async_evaluate$_environment, + t2 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string$_text); + }, + $signature: 89 + }; + A._EvaluateVisitor_closure22.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure1($arguments); + }, + $call$body$_EvaluateVisitor_closure1($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, t1, $function, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + $function = t1.$index($arguments, 0); + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression); + t4 = type$.String; + t5 = type$.Expression; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._wereKeywordsAccessed = true; + t8 = args._keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString(t11._0, false), t11._1); + } + t2 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression(args, t7), t2, t6); + $async$goto = $function instanceof A.SassString ? 3 : 4; + break; + case 3: + // then + A.warnForDeprecation(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_gkc); + callableNode = t1._async_evaluate$_callableNode; + t2 = $function._string$_text; + t3 = callableNode.get$span(callableNode); + t1 = t1.visitFunctionExpression$1(0, new A.FunctionExpression(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$1); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + t2 = $function.assertFunction$1("function"); + t3 = t1._async_evaluate$_callableNode; + t3.toString; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); + case 6: + // returning from await. + t3 = $async$result; + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 193 + }; + A._EvaluateVisitor_closure23.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure0($arguments); + }, + $call$body$_EvaluateVisitor_closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, withMap, t2, values, configuration, t3, t1, url; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; + t1 = $async$self.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + withMap.forEach$1(0, new A._EvaluateVisitor__closure3(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null; + t3 = t2.get$span(t2); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure4(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 168 + }; + A._EvaluateVisitor__closure3.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue(value, this.span, this.callableNode)); + }, + $signature: 88 + }; + A._EvaluateVisitor__closure4.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._async_evaluate$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 333 + }; + A._EvaluateVisitor_closure24.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure($arguments); + }, + $call$body$_EvaluateVisitor_closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, callableNode, t2, t3, t4, t5, t1, mixin, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + mixin = t1.$index($arguments, 0); + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + callableNode = t1._async_evaluate$_callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + t4 = type$.Expression; + t5 = A.List_List$unmodifiable(B.List_empty9, t4); + t4 = A.ConstantMap_ConstantMap$from(B.Map_empty6, type$.String, t4); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_applyMixin$5(mixin.assertMixin$1("mixin").callable, t1._async_evaluate$_environment._async_environment$_content, new A.ArgumentInvocation(t5, t4, new A.ValueExpression(args, t3), null, t2), callableNode, callableNode), $async$call$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 168 + }; + A._EvaluateVisitor_run_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), + $async$returnValue, $async$self = this, module, t1, t2, _0_0, url; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = t1.span; + _0_0 = t2.get$sourceUrl(t2); + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = $async$self.$this; + t2._async_evaluate$_activeModules.$indexSet(0, url, null); + t2._async_evaluate$_loadedUrls.add$1(0, url); + } + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t2._async_evaluate$_addExceptionTrace$1$1(new A._EvaluateVisitor_run__closure0(t2, $async$self.importer, t1), type$.Module_AsyncCallable), $async$call$0); + case 3: + // returning from await. + module = $async$result; + $async$returnValue = new A._Record_2_loadedUrls_stylesheet(t2._async_evaluate$_loadedUrls, t2._async_evaluate$_combineCss$1(module)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 395 + }; + A._EvaluateVisitor_run__closure0.prototype = { + call$0() { + return this.$this._async_evaluate$_execute$2(this.importer, this.node); + }, + $signature: 397 + }; + A._EvaluateVisitor__loadModule_closure1.prototype = { + call$0() { + return this.callback.call$2(this._box_1.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure2.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__loadModule_closure(); + }, + $call$body$_EvaluateVisitor__loadModule_closure() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, canonicalUrl, oldInDependency, isDependency, t4, message, t1, stylesheet, importer, t2, t3, _1_0, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + stylesheet = null; + importer = null; + t2 = $async$self.$this; + t3 = $async$self.nodeWithSpan; + $async$goto = 2; + return A._asyncAwait(t2._async_evaluate$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t3.get$span(t3), $async$self.baseUrl), $async$call$0); + case 2: + // returning from await. + _1_0 = $async$result; + stylesheet = _1_0._0; + importer = _1_0._1; + isDependency = _1_0._2; + t4 = stylesheet.span; + canonicalUrl = t4.get$sourceUrl(t4); + if (canonicalUrl != null) { + t4 = t2._async_evaluate$_activeModules; + if (t4.containsKey$1(canonicalUrl)) { + if ($async$self.namesInErrors) { + t1 = canonicalUrl; + t3 = $.$get$context(); + t1.toString; + message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; + } else + message = string$.Modulel; + t1 = A.NullableExtension_andThen(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure1(t2, message)); + throw A.wrapException(t1 == null ? t2._async_evaluate$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._async_evaluate$_modules.containsKey$1(canonicalUrl); + oldInDependency = t2._async_evaluate$_inDependency; + t2._async_evaluate$_inDependency = isDependency; + t1.module = null; + $async$handler = 3; + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(t2._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t3), $async$call$0); + case 6: + // returning from await. + $async$temp1.module = $async$result; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [1]; + case 4: + // finally + $async$handler = 1; + t2._async_evaluate$_activeModules.remove$1(0, canonicalUrl); + t2._async_evaluate$_inDependency = oldInDependency; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + $async$goto = 7; + return A._asyncAwait(t2._addExceptionSpanAsync$1$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure2(t1, $async$self.callback, !t4), false, type$.void), $async$call$0); + case 7: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__loadModule__closure1.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__loadModule__closure2.prototype = { + call$0() { + return this.callback.call$2(this._box_0.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldPreModuleComments, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate$_importer; + oldStylesheet = t1._async_evaluate$__stylesheet; + oldRoot = t1._async_evaluate$__root; + oldPreModuleComments = t1._async_evaluate$_preModuleComments; + oldParent = t1._async_evaluate$__parent; + oldEndOfImports = t1._async_evaluate$__endOfImports; + oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; + oldExtensionStore = t1._async_evaluate$__extensionStore; + t2 = t1._async_evaluate$_atRootExcludingStyleRule; + oldStyleRule = t2 ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + oldMediaQueries = t1._async_evaluate$_mediaQueries; + oldDeclarationName = t1._async_evaluate$_declarationName; + oldInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; + oldInKeyframes = t1._async_evaluate$_inKeyframes; + oldConfiguration = t1._async_evaluate$_configuration; + t1._async_evaluate$_importer = $async$self.importer; + t3 = t1._async_evaluate$__stylesheet = $async$self.stylesheet; + t4 = t3.span; + t5 = t1._async_evaluate$__parent = t1._async_evaluate$__root = A.ModifiableCssStylesheet$(t4); + t1._async_evaluate$__endOfImports = 0; + t1._async_evaluate$_outOfOrderImports = null; + t1._async_evaluate$__extensionStore = $async$self.extensionStore; + t1._async_evaluate$_declarationName = t1._async_evaluate$_mediaQueries = t1._async_evaluate$_styleRuleIgnoringAtRoot = null; + t1._async_evaluate$_inKeyframes = t1._async_evaluate$_atRootExcludingStyleRule = t1._async_evaluate$_inUnknownAtRule = false; + t6 = $async$self.configuration; + if (t6 != null) + t1._async_evaluate$_configuration = t6; + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t3), $async$call$0); + case 2: + // returning from await. + t3 = t1._async_evaluate$_outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._async_evaluate$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); + $async$self.css.__late_helper$_value = t3; + $async$self.preModuleComments.__late_helper$_value = t1._async_evaluate$_preModuleComments; + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = oldStylesheet; + t1._async_evaluate$__root = oldRoot; + t1._async_evaluate$_preModuleComments = oldPreModuleComments; + t1._async_evaluate$__parent = oldParent; + t1._async_evaluate$__endOfImports = oldEndOfImports; + t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; + t1._async_evaluate$__extensionStore = oldExtensionStore; + t1._async_evaluate$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._async_evaluate$_mediaQueries = oldMediaQueries; + t1._async_evaluate$_declarationName = oldDeclarationName; + t1._async_evaluate$_inUnknownAtRule = oldInUnknownAtRule; + t1._async_evaluate$_atRootExcludingStyleRule = t2; + t1._async_evaluate$_inKeyframes = oldInKeyframes; + t1._async_evaluate$_configuration = oldConfiguration; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__combineCss_closure1.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 117 + }; + A._EvaluateVisitor__combineCss_closure2.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__combineCss_visitModule0.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._async_evaluate$_indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 418 + }; + A._EvaluateVisitor__extendModules_closure1.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__extendModules_closure2.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore); + }, + $signature: 170 + }; + A._EvaluateVisitor_visitAtRootRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRootRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__scopeForAtRoot_closure5.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); + t1._async_evaluate$__parent = $async$self.newParent; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$__parent = t2; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure6.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldAtRootExcludingStyleRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldAtRootExcludingStyleRule = t1._async_evaluate$_atRootExcludingStyleRule; + t1._async_evaluate$_atRootExcludingStyleRule = true; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure7.prototype = { + call$1(callback) { + return this.$this._async_evaluate$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure0(this.innerScope, callback), type$.Null); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot__closure0.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 2 + }; + A._EvaluateVisitor__scopeForAtRoot_closure8.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInKeyframes; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInKeyframes = t1._async_evaluate$_inKeyframes; + t1._async_evaluate$_inKeyframes = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_inKeyframes = wasInKeyframes; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure9.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule; + }, + $signature: 172 + }; + A._EvaluateVisitor__scopeForAtRoot_closure10.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInUnknownAtRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; + t1._async_evaluate$_inUnknownAtRule = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitContentRule_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$returnValue, $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitDeclaration_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._box_0.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitEachRule_closure2.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._async_evaluate$_environment.setLocalVariable$3(this._box_0.variable, t1._async_evaluate$_withoutSlash$2(value, t2), t2); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure3.prototype = { + call$1(value) { + return this.$this._async_evaluate$_setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure4.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._async_evaluate$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure0(t1, _this.setVariables, _this.node)); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitEachRule__closure0.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._async_evaluate$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure0(t1)); + }, + $signature: 443 + }; + A._EvaluateVisitor_visitEachRule___closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 86 + }; + A._EvaluateVisitor_visitAtRule_closure2.prototype = { + call$1(value) { + return this.$this._async_evaluate$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 450 + }; + A._EvaluateVisitor_visitAtRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null || t1._async_evaluate$_inKeyframes || J.$eq$($async$self.name.value, "font-face") ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule._style_rule$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure0(t1, $async$self.children), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitForRule_closure4.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 174 + }; + A._EvaluateVisitor_visitForRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 174 + }; + A._EvaluateVisitor_visitForRule_closure6.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure7.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure8.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, _0_0, t1, t2, nodeWithSpan; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + nodeWithSpan = t1._async_evaluate$_expressionNode$1(t2.from); + i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; + case 3: + // for condition + if (!(i !== t3.to)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1._async_evaluate$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure0(t1)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + i += t4; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitForRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 86 + }; + A._EvaluateVisitor_visitForwardRule_closure1.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate$_registerCommentsForModule$1(module); + this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); + }, + $signature: 133 + }; + A._EvaluateVisitor_visitForwardRule_closure2.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate$_registerCommentsForModule$1(module); + this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); + }, + $signature: 133 + }; + A._EvaluateVisitor__registerCommentsForModule_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment); + }, + $signature: 175 + }; + A._EvaluateVisitor_visitIfRule_closure0.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure0(t1, clause), true, clause.hasDeclarations, type$.nullable_Value); + }, + $signature: 463 + }; + A._EvaluateVisitor_visitIfRule__closure0.prototype = { + call$0() { + var t1 = this.$this; + return t1._async_evaluate$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure0(t1)); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitIfRule___closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 86 + }; + A._EvaluateVisitor__visitDynamicImport_closure0.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__visitDynamicImport_closure(); + }, + $call$body$_EvaluateVisitor__visitDynamicImport_closure() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = $async$self.$this; + t2 = $async$self.$import; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + t3 = stylesheet.span; + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._async_evaluate$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure3(t1)); + throw A.wrapException(t2 == null ? t1._async_evaluate$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._uses; + t3 = type$.UnmodifiableListView_UseRule; + $async$goto = new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule).get$length(0) === 0 ? 4 : 5; + break; + case 4: + // then + oldImporter = t1._async_evaluate$_importer; + t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); + oldInDependency = t1._async_evaluate$_inDependency; + t1._async_evaluate$_importer = importer; + t1._async_evaluate$__stylesheet = stylesheet; + t1._async_evaluate$_inDependency = isDependency; + $async$goto = 6; + return A._asyncAwait(t1.visitStylesheet$1(0, stylesheet), $async$call$0); + case 6: + // returning from await. + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = t2; + t1._async_evaluate$_inDependency = oldInDependency; + t1._async_evaluate$_activeModules.remove$1(0, url); + // goto return + $async$goto = 1; + break; + case 5: + // join + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure4())) { + t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure5()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._async_evaluate$_environment; + t3 = type$.String; + t4 = type$.Module_AsyncCallable; + t5 = type$.AstNode; + t6 = A._setArrayType([], type$.JSArray_Module_AsyncCallable); + t7 = t2._async_environment$_variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._async_environment$_variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._async_environment$_functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._async_environment$_mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.AsyncEnvironment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment$_importedModules, null, null, t6, t7, t8, t9, t10, t2._async_environment$_content); + $async$goto = 7; + return A._asyncAwait(t1._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure6(_box_0, t1, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); + case 7: + // returning from await. + module = environment.toDummyModule$0(); + t1._async_evaluate$_environment.importForwards$1(module); + $async$goto = loadsUserDefinedModules ? 8 : 9; + break; + case 8: + // then + $async$goto = module.transitivelyContainsCss ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(t1._async_evaluate$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); + case 12: + // returning from await. + case 11: + // join + visitor = new A._ImportedCssVisitor0(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + case 9: + // join + t1._async_evaluate$_activeModules.remove$1(0, url); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__visitDynamicImport__closure3.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__visitDynamicImport__closure4.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 176 + }; + A._EvaluateVisitor__visitDynamicImport__closure5.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 177 + }; + A._EvaluateVisitor__visitDynamicImport__closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t7, t8, t1, oldImporter, t2, t3, t4, t5, oldOutOfOrderImports, oldConfiguration, oldInDependency, t6; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate$_importer; + t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); + t3 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root"); + t4 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); + t5 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, "_endOfImports"); + oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; + oldConfiguration = t1._async_evaluate$_configuration; + oldInDependency = t1._async_evaluate$_inDependency; + t6 = $async$self._box_0; + t1._async_evaluate$_importer = t6.importer; + t7 = t6.stylesheet; + t1._async_evaluate$__stylesheet = t7; + t8 = $async$self.loadsUserDefinedModules; + if (t8) { + t7 = A.ModifiableCssStylesheet$(t7.span); + t1._async_evaluate$__root = t7; + t1._async_evaluate$__parent = t1._async_evaluate$_assertInModule$2(t7, "_root"); + t1._async_evaluate$__endOfImports = 0; + t1._async_evaluate$_outOfOrderImports = null; + } + t1._async_evaluate$_inDependency = t6.isDependency; + t7 = new A.UnmodifiableListView(t6.stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + if (!t7.get$isEmpty(t7)) + t1._async_evaluate$_configuration = $async$self.environment.toImplicitConfiguration$0(); + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t6.stylesheet), $async$call$0); + case 2: + // returning from await. + t6 = t8 ? t1._async_evaluate$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); + $async$self.children.__late_helper$_value = t6; + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = t2; + if (t8) { + t1._async_evaluate$__root = t3; + t1._async_evaluate$__parent = t4; + t1._async_evaluate$__endOfImports = t5; + t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; + } + t1._async_evaluate$_configuration = oldConfiguration; + t1._async_evaluate$_inDependency = oldInDependency; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure2(t1, $async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self.$this._async_evaluate$_runBuiltInCallable$3($async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor__applyMixin__closure1(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin__closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure0(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, t4, t5, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpanWithoutContent, t5 = type$.nullable_Value, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t3._async_evaluate$_addErrorSpan$1$2(t4, new A._EvaluateVisitor__applyMixin____closure0(t3, t1[_i]), t5), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin____closure0.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitIncludeRule_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 89 + }; + A._EvaluateVisitor_visitIncludeRule_closure3.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable($content, t1._async_evaluate$_environment.closure$0(), t1._async_evaluate$_inDependency, type$.UserDefinedCallable_AsyncEnvironment); + }, + $signature: 480 + }; + A._EvaluateVisitor_visitIncludeRule_closure4.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 30 + }; + A._EvaluateVisitor_visitMediaRule_closure2.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 85 + }; + A._EvaluateVisitor_visitMediaRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure4.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure5.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure0.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitSupportsRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor__visitSupportsCondition_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(t1._evaluateToCss$1(t2.declaration.name), $async$call$0); + case 3: + // returning from await. + t3 = $async$temp1.S($async$result); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + $async$temp1 = "(" + t3 + ":" + t4; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait(t1._evaluateToCss$1(t2.declaration.value), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 179 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure2.prototype = { + call$0() { + var t1 = this.$this._async_evaluate$_environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure3.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._async_evaluate$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure0.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._async_evaluate$_registerCommentsForModule$1(module); + t1 = this.$this._async_evaluate$_environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._async_environment$_globalModules.$indexSet(0, module, t2); + t1._async_environment$_allModules.push(module); + _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._async_environment$_variables)), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._async_environment$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._async_environment$_namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._async_environment$_namespaceNodes.$indexSet(0, t3, t2); + t1._async_environment$_allModules.push(module); + } + }, + $signature: 133 + }; + A._EvaluateVisitor_visitWarnRule_closure0.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 75 + }; + A._EvaluateVisitor_visitWhileRule_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; + case 3: + // for condition + $async$goto = 5; + return A._asyncAwait(t2.accept$1(t3), $async$call$0); + case 5: + // returning from await. + if (!$async$result.get$isTruthy()) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 6; + return A._asyncAwait(t3._async_evaluate$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure0(t3)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + // goto for condition + $async$goto = 3; + break; + case 4: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 79 + }; + A._EvaluateVisitor_visitWhileRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 86 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t3, t1, t2, left, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); + case 3: + // returning from await. + left = $async$result; + case 4: + // switch + switch (t1.operator) { + case B.BinaryOperator_wdM: + // goto case + $async$goto = 6; + break; + case B.BinaryOperator_qNM: + // goto case + $async$goto = 7; + break; + case B.BinaryOperator_eDt: + // goto case + $async$goto = 8; + break; + case B.BinaryOperator_g8k: + // goto case + $async$goto = 9; + break; + case B.BinaryOperator_icU: + // goto case + $async$goto = 10; + break; + case B.BinaryOperator_bEa: + // goto case + $async$goto = 11; + break; + case B.BinaryOperator_oEm: + // goto case + $async$goto = 12; + break; + case B.BinaryOperator_miq: + // goto case + $async$goto = 13; + break; + case B.BinaryOperator_SPQ: + // goto case + $async$goto = 14; + break; + case B.BinaryOperator_u15: + // goto case + $async$goto = 15; + break; + case B.BinaryOperator_SjO: + // goto case + $async$goto = 16; + break; + case B.BinaryOperator_2No: + // goto case + $async$goto = 17; + break; + case B.BinaryOperator_U77: + // goto case + $async$goto = 18; + break; + case B.BinaryOperator_KNx: + // goto case + $async$goto = 19; + break; + default: + // goto default + $async$goto = 20; + break; + } + break; + case 6: + // case + t1 = t1.right.accept$1(t2); + $async$goto = 21; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 21: + // returning from await. + t1 = $async$result; + t1 = new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(t1, false, true), false); + // goto after switch + $async$goto = 5; + break; + case 7: + // case + $async$goto = left.get$isTruthy() ? 22 : 24; + break; + case 22: + // then + t1 = left; + // goto join + $async$goto = 23; + break; + case 24: + // else + t1 = t1.right.accept$1(t2); + $async$goto = 25; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 25: + // returning from await. + t1 = $async$result; + case 23: + // join + // goto after switch + $async$goto = 5; + break; + case 8: + // case + $async$goto = left.get$isTruthy() ? 26 : 28; + break; + case 26: + // then + t1 = t1.right.accept$1(t2); + $async$goto = 29; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 29: + // returning from await. + t1 = $async$result; + // goto join + $async$goto = 27; + break; + case 28: + // else + t1 = left; + case 27: + // join + // goto after switch + $async$goto = 5; + break; + case 9: + // case + $async$temp1 = left; + $async$goto = 30; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 30: + // returning from await. + t1 = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; + // goto after switch + $async$goto = 5; + break; + case 10: + // case + $async$temp1 = left; + $async$goto = 31; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 31: + // returning from await. + t1 = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; + // goto after switch + $async$goto = 5; + break; + case 11: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 32; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 32: + // returning from await. + t1 = $async$temp1.greaterThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 12: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 33; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 33: + // returning from await. + t1 = $async$temp1.greaterThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 13: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 34; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 34: + // returning from await. + t1 = $async$temp1.lessThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 14: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 35; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 35: + // returning from await. + t1 = $async$temp1.lessThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 15: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 36; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 36: + // returning from await. + t1 = $async$temp1.plus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 16: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 37; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 37: + // returning from await. + t1 = $async$temp1.minus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 17: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 38; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 38: + // returning from await. + t1 = $async$temp1.times$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 18: + // case + t3 = t1.right.accept$1(t2); + $async$temp1 = t2; + $async$temp2 = left; + $async$goto = 39; + return A._asyncAwait(type$.Future_Value._is(t3) ? t3 : A._Future$value(t3, type$.Value), $async$call$0); + case 39: + // returning from await. + t1 = $async$temp1._async_evaluate$_slash$3($async$temp2, $async$result, t1); + // goto after switch + $async$goto = 5; + break; + case 19: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 40; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 40: + // returning from await. + t1 = $async$temp1.modulo$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 20: + // default + t1 = null; + case 5: + // after switch + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 75 + }; + A._EvaluateVisitor__slash_recommendation0.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression && B.BinaryOperator_U77 === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 129 + }; + A._EvaluateVisitor_visitVariableExpression_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure0.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator) { + case B.UnaryOperator_cLp: + t1 = _this.operand.unaryPlus$0(); + break; + case B.UnaryOperator_AiQ: + t1 = _this.operand.unaryMinus$0(); + break; + case B.UnaryOperator_SJr: + t1 = new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); + break; + case B.UnaryOperator_not_not_not: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 36 + }; + A._EvaluateVisitor_visitListExpression_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 524 + }; + A._EvaluateVisitor_visitFunctionExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 89 + }; + A._EvaluateVisitor_visitFunctionExpression_closure3.prototype = { + call$1(argument) { + return argument.accept$1(new A._IsCalculationSafeVisitor()); + }, + $signature: 120 + }; + A._EvaluateVisitor_visitFunctionExpression_closure4.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 75 + }; + A._EvaluateVisitor__checkCalculationArguments_check0.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._async_evaluate$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._async_evaluate$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 84 + }; + A._EvaluateVisitor__visitCalculationExpression_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, $async$temp1, $async$temp2, $async$temp3; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + t3 = $async$self.inLegacySassFunction; + $async$temp1 = A; + $async$temp2 = t1._async_evaluate$_binaryOperatorToCalculationOperator$2(t2.operator, $async$self.node); + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t3), $async$call$0); + case 3: + // returning from await. + $async$temp3 = $async$result; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t3), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1.SassCalculation_operateInternal($async$temp2, $async$temp3, $async$result, t3, !t1._async_evaluate$_inSupportsDeclaration); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 182 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 75 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable, + t3 = _this.V; + return t1._async_evaluate$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure0(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._async_evaluate$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure0(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure0.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure(this.V); + }, + $call$body$_EvaluateVisitor__runUserDefinedCallable___closure($async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, t1, t2, t3, t4, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.evaluated._values; + t3 = $async$self.callable.declaration.$arguments; + t4 = $async$self.nodeWithSpan; + t1._async_evaluate$_verifyArguments$4(J.get$length$asx(t2[2]), t2[0], t3, t4); + declaredArguments = t3.$arguments; + t5 = declaredArguments.length; + minLength = Math.min(J.get$length$asx(t2[2]), t5); + for (i = 0; i < minLength; ++i) + t1._async_evaluate$_environment.setLocalVariable$3(declaredArguments[i].name, J.$index$asx(t2[2], i), J.$index$asx(t2[3], i)); + i = J.get$length$asx(t2[2]); + case 3: + // for condition + if (!(i < t5)) { + // goto after for + $async$goto = 5; + break; + } + argument = declaredArguments[i]; + t6 = t2[0]; + t7 = argument.name; + value = t6.remove$1(0, t7); + $async$goto = value == null ? 6 : 7; + break; + case 6: + // then + t6 = argument.defaultValue; + $async$temp1 = t1; + $async$goto = 8; + return A._asyncAwait(t6.accept$1(t1), $async$call$0); + case 8: + // returning from await. + value = $async$temp1._async_evaluate$_withoutSlash$2($async$result, t1._async_evaluate$_expressionNode$1(t6)); + case 7: + // join + t6 = t1._async_evaluate$_environment; + t8 = t2[1].$index(0, t7); + if (t8 == null) { + t8 = argument.defaultValue; + t8.toString; + t8 = t1._async_evaluate$_expressionNode$1(t8); + } + t6.setLocalVariable$3(t7, value, t8); + case 4: + // for update + ++i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + restArgument = t3.restArgument; + if (restArgument != null) { + rest = J.get$length$asx(t2[2]) > t5 ? J.sublist$1$ax(t2[2], t5) : B.List_empty8; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$(rest, t5, t6 === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : t6); + t1._async_evaluate$_environment.setLocalVariable$3(restArgument, argumentList, t4); + } else + argumentList = null; + $async$goto = 9; + return A._asyncAwait($async$self.run.call$0(), $async$call$0); + case 9: + // returning from await. + result = $async$result; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + if (t5.get$isEmpty(t5)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + argumentWord = A.pluralize("argument", J.get$length$asx(t5.get$keys(t5)), null); + t2 = t2[0]; + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + argumentWord + " named " + A.toSentence(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runUserDefinedCallable____closure0(), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate$_stackTrace$1(t4.get$span(t4)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); + case 6: + // returning from await. + $returnValue = $async$result; + if ($returnValue instanceof A.Value) { + $async$returnValue = $returnValue; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + throw A.wrapException(t4._async_evaluate$_exception$2("Function finished without @return.", t1.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 75 + }; + A._EvaluateVisitor__runBuiltInCallable_closure2.prototype = { + call$0() { + return this._box_0.overload.verify$2(J.get$length$asx(this.evaluated._values[2]), this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure3.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 538 + }; + A._EvaluateVisitor__runBuiltInCallable_closure4.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure3.prototype = { + call$1(value) { + return value; + }, + $signature: 44 + }; + A._EvaluateVisitor__evaluateArguments_closure4.prototype = { + call$1(value) { + return this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 44 + }; + A._EvaluateVisitor__evaluateArguments_closure5.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._async_evaluate$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 103 + }; + A._EvaluateVisitor__evaluateArguments_closure6.prototype = { + call$1(value) { + return value; + }, + $signature: 44 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure3.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(value, t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure4.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure5.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._async_evaluate$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 103 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure6.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__addRestMap_closure0.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString) + _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._async_evaluate$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._async_evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 88 + }; + A._EvaluateVisitor__verifyArguments_closure0.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssMediaRule_closure2.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 85 + }; + A._EvaluateVisitor_visitCssMediaRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.node.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure4.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssStyleRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor__performInterpolationHelper_closure0.prototype = { + call$1(targetLocations) { + return A.InterpolationMap$(this.interpolation, targetLocations); + }, + $signature: 183 + }; + A._EvaluateVisitor__serialize_closure0.prototype = { + call$0() { + return A.serializeValue(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure0.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._async_evaluate$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 141 + }; + A._EvaluateVisitor__withoutSlash_recommendation0.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 185 + }; + A._EvaluateVisitor__stackFrame_closure0.prototype = { + call$1(url) { + var t1 = this.$this._async_evaluate$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 48 + }; + A._ImportedCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure0(); + this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._async_evaluate$_visitor; + if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent") !== t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root")) + t1._async_evaluate$_addChild$1(node); + else if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root").children._collection$_source)) { + t1._async_evaluate$_addChild$1(node); + t1._async_evaluate$__endOfImports = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) + 1; + } else { + t2 = t1._async_evaluate$_outOfOrderImports; + (t2 == null ? t1._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._async_evaluate$_visitor, + mediaQueries = t1._async_evaluate$_mediaQueries; + t1._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure0(mediaQueries == null || t1._async_evaluate$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure0()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure0()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure0.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule; + else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluationContext0.prototype = { + get$currentCallableSpan() { + var _0_0 = this._async_evaluate$_visitor._async_evaluate$_callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._async_evaluate$_visitor, + t2 = t1._async_evaluate$_importSpan; + if (t2 == null) { + t2 = t1._async_evaluate$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._async_evaluate$_warn$3(message, t2 == null ? this._async_evaluate$_defaultWarnNodeWithSpan.span : t2, deprecation); + }, + $isEvaluationContext: 1 + }; + A._CloneCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless, + rule = A.ModifiableCssAtRule$(node.name, node.span, t1, node.value); + return t1 ? rule : this._visitChildren$2(rule, node); + }, + visitCssComment$1(node) { + return new A.ModifiableCssComment(node.text, node.span); + }, + visitCssDeclaration$1(node) { + return A.ModifiableCssDeclaration$(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap); + }, + visitCssImport$1(node) { + return new A.ModifiableCssImport(node.url, node.modifiers, node.span); + }, + visitCssKeyframeBlock$1(node) { + return this._visitChildren$2(A.ModifiableCssKeyframeBlock$(node.selector, node.span), node); + }, + visitCssMediaRule$1(node) { + return this._visitChildren$2(A.ModifiableCssMediaRule$(node.queries, node.span), node); + }, + visitCssStyleRule$1(node) { + var _0_0 = this._oldToNewSelectors.$index(0, node._style_rule$_selector._box$_inner.value); + if (_0_0 != null) + return this._visitChildren$2(A.ModifiableCssStyleRule$(_0_0, node.span, false, node.originalSelector), node); + else + throw A.wrapException(A.StateError$(string$.The_Ex)); + }, + visitCssStylesheet$1(node) { + return this._visitChildren$2(A.ModifiableCssStylesheet$(node.get$span(node)), node); + }, + visitCssSupportsRule$1(node) { + return this._visitChildren$2(A.ModifiableCssSupportsRule$(node.condition, node.span), node); + }, + _visitChildren$1$2(newParent, oldParent) { + var t1, t2, newChild; + for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + newChild = t2.accept$1(this); + newChild.isGroupEnd = t2.get$isGroupEnd(); + newParent.addChild$1(newChild); + } + return newParent; + }, + _visitChildren$2(newParent, oldParent) { + return this._visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode); + } + }; + A.Evaluator.prototype = {}; + A._EvaluateVisitor.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_BuiltInCallable, + metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure0(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure1(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure2(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure3(_this), _s9_), A.BuiltInCallable$function("module-variables", _s7_, new A._EvaluateVisitor_closure4(_this), _s9_), A.BuiltInCallable$function("module-functions", _s7_, new A._EvaluateVisitor_closure5(_this), _s9_), A.BuiltInCallable$function("module-mixins", _s7_, new A._EvaluateVisitor_closure6(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure7(_this), _s9_), A.BuiltInCallable$function("get-mixin", _s20_, new A._EvaluateVisitor_closure8(_this), _s9_), A.BuiltInCallable$function("call", "$function, $args...", new A._EvaluateVisitor_closure9(_this), _s9_)], t1), + metaMixins = A._setArrayType([A.BuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure10(_this), false, _s9_), A.BuiltInCallable$mixin("apply", "$mixin, $args...", new A._EvaluateVisitor_closure11(_this), true, _s9_)], t1); + t1 = type$.BuiltInCallable; + t2 = A.List_List$of($.$get$moduleFunctions(), true, t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules(), true, type$.BuiltInModule_Callable), t1.push(metaModule), t2 = t1.length, t3 = _this._builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_Callable; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + var error, stackTrace, t1, exception; + try { + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, node)], t1, t1), type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withLoadedUrls$1(this._loadedUrls), error, stackTrace); + } else + throw exception; + } + }, + runExpression$2(importer, expression) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_runExpression_closure(this, importer, expression), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, expression)], t1, t1), type$.Value); + }, + runStatement$2(importer, statement) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_runStatement_closure(this, importer, statement), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, statement)], t1, t1), type$.void); + }, + _assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _assertInModule$2(value, $name) { + return this._assertInModule$1$2(value, $name, type$.dynamic); + }, + _withFakeStylesheet$1$3(importer, nodeWithSpan, callback) { + var t1, _this = this, + oldImporter = _this._importer; + _this._importer = importer; + _this.__stylesheet = A.Stylesheet$(B.List_empty13, nodeWithSpan.get$span(nodeWithSpan)); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._importer = oldImporter; + _this.__stylesheet = null; + } + }, + _withFakeStylesheet$3(importer, nodeWithSpan, callback) { + return this._withFakeStylesheet$1$3(importer, nodeWithSpan, callback, type$.dynamic); + }, + _loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var t2, _this = this, t1 = {}, + _0_0 = _this._builtInModules.$index(0, url); + t1.builtInModule = null; + if (_0_0 != null) { + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException(_this._evaluate$_exception$2(t1, t2.get$span(t2))); + } + _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure(t1, callback)); + return; + } + _this._withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure0(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); + }, + _loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var _0_0, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, _this = this, + t1 = stylesheet.span, + url = t1.get$sourceUrl(t1); + t1 = _this._modules; + _0_0 = t1.$index(0, url); + if (_0_0 != null) { + t1 = configuration == null; + currentConfiguration = t1 ? _this._configuration : configuration; + t2 = _this._moduleConfigurations.$index(0, url); + t3 = t2.__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration.__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = _this._moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? _this._evaluate$_exception$1(message) : _this._multiSpanException$3(message, "new load", t1)); + } + return _0_0; + } + environment = A.Environment$(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$(); + _this._withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure(_this, importer, stylesheet, extensionStore, configuration, css, preModuleComments)); + t2 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t2, t3 == null ? B.Map_empty0 : t3, extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + _this._moduleConfigurations.$indexSet(0, url, _this._configuration); + if (nodeWithSpan != null) + _this._moduleNodes.$indexSet(0, url, nodeWithSpan); + } + return module; + }, + _execute$2(importer, stylesheet) { + return this._execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._assertInModule$2(_this.__root, _s5_).children; + break $label0$0; + } + t1 = _this._assertInModule$2(_this.__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._assertInModule$2(_this.__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._assertInModule$2(_this.__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._assertInModule$2(_this.__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure0(selectors))); + if (_0_0 != null) + this._throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_Callable; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); + }, + _combineCss$1(root) { + return this._combineCss$2$clone(root, false); + }, + _extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure0()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + var t1, t2, _i; + for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + return null; + }, + visitAtRootRule$1(_, node) { + var t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _this = this, + _s8_ = "__parent", + _0_0 = node.query, + query = _0_0 != null ? A.AtRootQueryParser$(_this._performInterpolationWithMap$2$warnForColor(_0_0, true)._0, _this._evaluate$_logger, null).parse$0(0) : B.AtRootQuery_n2q, + $parent = _this._assertInModule$2(_this.__parent, _s8_), + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); + for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = _this._trimIncluded$1(included); + if (root === _this._assertInModule$2(_this.__parent, _s8_)) { + _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure(_this, node), node.hasDeclarations, type$.Null); + return null; + } + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + _this._scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure0(_this, node)); + return null; + }, + _trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._assertInModule$2(_this.__root, _s5_); + $parent = _this._assertInModule$2(_this.__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._assertInModule$2(_this.__root, _s5_)) + return _this._assertInModule$2(_this.__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure(_this, newParent, node), + t1 = query._all || query._at_root_query$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure0(_this, scope); + if (_this._mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure1(_this, scope); + if (_this._inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure2(_this, scope); + return _this._inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure3()) ? new A._EvaluateVisitor__scopeForAtRoot_closure4(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + var $content = this._environment._content; + if ($content == null) + return null; + this._runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure(this, $content), type$.Null); + return null; + }, + visitDebugRule$1(_, node) { + var value = node.expression.accept$1(this), + t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); + this._evaluate$_logger.debug$2(0, t1, node.span); + return null; + }, + visitDeclaration$1(_, node) { + var siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _this = this, _null = null, + _s8_ = "__parent", + _box_0 = {}; + if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null && !_this._inUnknownAtRule && !_this._inKeyframes) + throw A.wrapException(_this._evaluate$_exception$2(string$.Declarm, node.span)); + if (_this._declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) + throw A.wrapException(_this._evaluate$_exception$2(string$.Declarw, node.span)); + siblings = _this._assertInModule$2(_this.__parent, _s8_)._parent.children; + interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule); + if (siblings.get$last(siblings) !== _this._assertInModule$2(_this.__parent, _s8_)) { + if (_this._quietDeps) + if (!_this._inDependency) { + t1 = _this._currentCallable; + t1 = t1 == null ? _null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + t1 = !t1; + } else + t1 = false; + if (t1) + for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, _this._assertInModule$2(_this.__parent, _s8_)) + 1, _null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t6 = t1.__internal$_current; + rule = t6 == null ? t2._as(t6) : t6; + $label0$1: { + if (rule instanceof A.ModifiableCssComment) + continue; + t6 = rule instanceof A.ModifiableCssStyleRule; + rule0 = t6 ? rule : _null; + if (t6) { + interleavedRules.push(rule0); + break $label0$1; + } + _this._warn$3(string$.Sassx27s, new A.MultiSpan(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_gf0); + B.JSArray_methods.clear$0(interleavedRules); + break $label0$1; + } + } + t1 = node.name; + $name = _this._interpolationToValue$2$warnForColor(t1, true); + _1_0 = _this._declarationName; + if (_1_0 != null) + $name = new A.CssValue(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String); + _2_0 = node.value; + if (_2_0 != null) { + value = _2_0.accept$1(_this); + if (!value.get$isBlank() || value.get$asList().length === 0) { + t2 = _this._assertInModule$2(_this.__parent, _s8_); + t3 = _2_0.get$span(_2_0); + t4 = node.span; + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + t5 = interleavedRules.length === 0 ? _null : _this._evaluate$_stackTrace$1(t4); + if (_this._sourceMap) { + t6 = A.NullableExtension_andThen(_2_0, _this.get$_expressionNode()); + t6 = t6 == null ? _null : J.get$span$z(t6); + } else + t6 = _null; + t2.addChild$1(A.ModifiableCssDeclaration$($name, new A.CssValue(value, t3, type$.CssValue_Value), t4, interleavedRules, t1, t5, t6)); + } else if (J.startsWith$1$s($name.value, "--")) + throw A.wrapException(_this._evaluate$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); + } + _3_0 = node.children; + _box_0.children = null; + if (_3_0 != null) { + _box_0.children = _3_0; + oldDeclarationName = _this._declarationName; + _this._declarationName = $name.value; + _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure(_box_0, _this), node.hasDeclarations, type$.Null); + _this._declarationName = oldDeclarationName; + } + return _null; + }, + visitEachRule$1(_, node) { + var _this = this, _box_0 = {}, + t1 = node.list, + list = t1.accept$1(_this), + nodeWithSpan = _this._expressionNode$1(t1), + _0_0 = node.variables; + $label0$0: { + _box_0.variable = null; + if (_0_0.length === 1) { + _box_0.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure(_box_0, _this, nodeWithSpan); + break $label0$0; + } + _box_0.variables = null; + _box_0.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure0(_box_0, _this, nodeWithSpan); + break $label0$0; + } + return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure1(_this, list, t1, node), true, type$.nullable_Value); + }, + _setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._environment.setLocalVariable$3(variables[i], this._withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + throw A.wrapException(this._evaluate$_exception$2(J.toString$0$(node.expression.accept$1(this)), node.span)); + }, + visitExtendRule$1(_, node) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, compound, _this = this, _null = null, + styleRule = _this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot; + if (styleRule == null || _this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; + _this._warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan(A.SpanExtensions_trimRight(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_ido); + } + _0_0 = _this._performInterpolationWithMap$2$warnForColor(node.selector, true); + for (t1 = A.SelectorList_SelectorList$parse(A.trimAscii(_0_0._0, true), false, _0_0._1, _this._evaluate$_logger, false).components, t2 = t1.length, t3 = styleRule._style_rule$_selector._box$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", complex.span, _null)); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, _null)); + _this._assertInModule$2(_this.__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, _this._mediaQueries); + } + return _null; + }, + visitAtRule$1(_, node) { + var $name, value, children, wasInKeyframes, wasInUnknownAtRule, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); + $name = _this._interpolationToValue$1(node.name); + value = A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure(_this)); + children = node.children; + if (children == null) { + _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); + return null; + } + wasInKeyframes = _this._inKeyframes; + wasInUnknownAtRule = _this._inUnknownAtRule; + if (A.unvendor($name.value) === "keyframes") + _this._inKeyframes = true; + else + _this._inUnknownAtRule = true; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure0(_this, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure1(), type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + return null; + }, + visitForRule$1(_, node) { + var _this = this, t1 = {}, + t2 = node.from, + fromNumber = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure(_this, node)), + t3 = node.to, + toNumber = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure0(_this, node)), + from = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure1(fromNumber)), + to = t1.to = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure2(toNumber, fromNumber)), + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) + return null; + return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure3(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value); + }, + visitForwardRule$1(_, node) { + var newConfiguration, t4, _i, variable, $name, _this = this, + _s8_ = "@forward", + oldConfiguration = _this._configuration, + adjustedConfiguration = oldConfiguration.throughForward$1(node), + t1 = node.configuration, + t2 = t1.length, + t3 = node.url; + if (t2 !== 0) { + newConfiguration = _this._addForwardConfiguration$2(adjustedConfiguration, node); + _this._loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure(_this, node), newConfiguration); + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + _this._removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + _this._assertConfigurationIsEmpty$1(newConfiguration); + } else { + _this._configuration = adjustedConfiguration; + _this._loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure0(_this, node)); + _this._configuration = oldConfiguration; + } + return null; + }, + _addForwardConfiguration$2(configuration, node) { + var t2, t3, _i, variable, t4, oldValue, t5, variableNodeWithSpan, _null = null, + t1 = configuration._configuration$_values, + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + oldValue = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, t4); + if (oldValue != null) + t5 = !oldValue.value.$eq(0, B.C__SassNull); + else { + oldValue = _null; + t5 = false; + } + if (t5) { + newValues.$indexSet(0, t4, oldValue); + continue; + } + } + t4 = variable.expression; + variableNodeWithSpan = this._expressionNode$1(t4); + newValues.$indexSet(0, variable.name, new A.ConfiguredValue(this._withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) + return new A.ExplicitConfiguration(node, newValues, _null); + else + return new A.Configuration(newValues, _null); + }, + _registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this.__root; + if (t1 == null) + return; + if (_this._assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._preModuleComments; + if (t1 == null) + t1 = _this._preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.List_CssComment); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source, type$.CssComment), type$.UnmodifiableListView_CssComment)); + _this._assertInModule$2(_this.__root, _s5_).clearChildren$0(); + _this.__endOfImports = 0; + }, + _removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0, $name, value; + if (!(configuration instanceof A.ExplicitConfiguration)) + return; + t1 = configuration._configuration$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + _0_0 = t1.get$first(t1); + $name = _0_0._0; + value = _0_0._1; + t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; + throw A.wrapException(this._evaluate$_exception$2(t1, value.configurationSpan)); + }, + _assertConfigurationIsEmpty$1(configuration) { + return this._assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + var t1 = this._environment, + t2 = t1.closure$0(), + t3 = this._inDependency, + t4 = t1._functions, + index = t4.length - 1, + t5 = node.name; + t1._functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); + return null; + }, + visitIfRule$1(_, node) { + var t1, t2, _i, clauseToCheck, + clause = node.lastClause; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { + clauseToCheck = t1[_i]; + if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { + clause = clauseToCheck; + break; + } + } + return A.NullableExtension_andThen(clause, new A._EvaluateVisitor_visitIfRule_closure(this)); + }, + visitImportRule$1(_, node) { + var t1, t2, t3, t4, t5, t6, _i, $import, t7, _0_0, $self, t8, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports"; + for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String, t4 = _this.get$_interpolationToValue(), t5 = type$.StaticImport, t6 = type$.JSArray_ModifiableCssImport, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport) + _this._visitDynamicImport$1($import); + else { + t5._as($import); + t7 = $import.url; + _0_0 = _this._performInterpolationHelper$3$sourceMap$warnForColor(t7, false, false); + $self = $import.modifiers; + t8 = $self == null ? null : t4.call$1($self); + node = new A.ModifiableCssImport(new A.CssValue(_0_0._0, t7.span, t3), t8, $import.span); + if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(node); + else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { + t7 = _this._assertInModule$2(_this.__root, _s5_); + node._parent = t7; + t7 = t7._children; + node._indexInParent = t7.length; + t7.push(node); + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + } else { + t7 = _this._outOfOrderImports; + (t7 == null ? _this._outOfOrderImports = A._setArrayType([], t6) : t7).push(node); + } + } + } + return null; + }, + _visitDynamicImport$1($import) { + return this._withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure(this, $import)); + }, + _loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + var _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, exception, _this = this; + baseUrl = baseUrl; + try { + _this._importSpan = span; + _0_0 = _this._evaluate$_importCache; + importCache = null; + if (_0_0 != null) { + importCache = _0_0; + if (baseUrl == null) { + t1 = _this._assertInModule$2(_this.__stylesheet, "_stylesheet").span; + baseUrl = t1.get$sourceUrl(t1); + } + _1_0 = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._importer, baseUrl, forImport); + importer = null; + canonicalUrl = null; + originalUrl = null; + if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0)) { + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + _this._loadedUrls.add$1(0, canonicalUrl); + isDependency = _this._inDependency || !J.$eq$(importer, _this._importer); + t1 = importCache; + t2 = importer; + t3 = canonicalUrl; + t4 = originalUrl; + _2_0 = t1.importCanonical$4$originalUrl$quiet(t2, t3, t4, _this._quietDeps && isDependency); + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + return new A._Record_3_importer_isDependency(t1, t2, isDependency); + } + } + } + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) + throw exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(_this._evaluate$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace(_this._evaluate$_exception$1(_this._getErrorMessage$1(error0)), error0, stackTrace0); + } + } finally { + _this._importSpan = null; + } + }, + _loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _loadStylesheet$3$forImport(url, span, forImport) { + return this._loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var t1, _0_0, t2, _1_8, _this = this, + _s37_ = "Mixin doesn't accept a content block.", + _s10_ = "invocation"; + $label0$0: { + if (mixin == null) + throw A.wrapException(_this._evaluate$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = mixin instanceof A.BuiltInCallable; + if (t1 && !mixin.acceptsContent && contentCallable != null) { + t1 = _this._evaluateArguments$1($arguments)._values; + _0_0 = mixin.callbackFor$2(t1[2].length, new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + } + if (t1) { + _this._environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure(_this, $arguments, mixin, nodeWithSpanWithoutContent)); + break $label0$0; + } + t1 = type$.UserDefinedCallable_Environment._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + if (_1_8 instanceof A.MixinRule) + t2 = !type$.MixinRule._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + if (t1) { + _this._runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure0(_this, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + }, + visitIncludeRule$1(_, node) { + var _this = this, + mixin = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure(_this, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + _this._warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_HJ0); + _this._applyMixin$5(mixin, A.NullableExtension_andThen(node.content, new A._EvaluateVisitor_visitIncludeRule_closure0(_this)), node.$arguments, node, new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure1(node))); + return null; + }, + visitMixinRule$1(_, node) { + var t1 = this._environment, + t2 = t1.closure$0(), + t3 = this._inDependency, + t4 = t1._mixins, + index = t4.length - 1, + t5 = node.name; + t1._mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); + return null; + }, + visitLoudComment$1(_, node) { + var t1, text, _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._inFunction) + return null; + if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + t1 = node.text; + text = _this._performInterpolation$1(t1); + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(text, t1.span)); + return null; + }, + visitMediaRule$1(_, node) { + var _0_0, queries, mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); + _0_0 = _this._performInterpolationWithMap$2$warnForColor(node.query, true); + queries = A.CssMediaQuery_parseList(_0_0._0, _0_0._1, _this._evaluate$_logger); + mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure(_this, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return null; + if (t1) + mergedSources = B.Set_empty1; + else { + t2 = _this._mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = _this._mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure0(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure1(mergedSources), type$.ModifiableCssMediaRule, type$.Null); + return null; + }, + _mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) + $label0$1: { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_0 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_1 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + break $label0$1; + } + } + return queries; + }, + visitReturnRule$1(_, node) { + var t1 = node.expression; + return this._withoutSlash$2(t1.accept$1(this), t1); + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + var t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule, _this = this, _null = null, + _s8_ = "__parent", + _s11_ = "_stylesheet"; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_n, node.span)); + else if (_this._inKeyframes && _this._assertInModule$2(_this.__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + _0_0 = _this._performInterpolationWithMap$2$warnForColor(t1, true); + selectorText = _0_0._0; + selectorMap = _0_0._1; + if (_this._inKeyframes) { + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable(A.KeyframeSelectorParser$(selectorText, selectorMap, _this._evaluate$_logger).parse$0(0), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure0(), type$.ModifiableCssKeyframeBlock, type$.Null); + return _null; + } + parsedSelector = A.SelectorList_SelectorList$parse(selectorText, true, selectorMap, _this._evaluate$_logger, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss); + t1 = _this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot; + t1 = t1 == null ? _null : t1.fromPlainCss; + nest = t1 !== true; + if (nest) { + if (_this._assertInModule$2(_this.__stylesheet, _s11_).plainCss) + for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + _1_0 = t1[_i].leadingCombinators; + if (_1_0.length >= 1) { + first = _1_0[0]; + t3 = _this._assertInModule$2(_this.__stylesheet, _s11_); + t3 = t3.plainCss; + } else { + first = _null; + t3 = false; + } + if (t3) + throw A.wrapException(_this._evaluate$_exception$2(string$.Top_lel, first.span)); + } + t1 = _this._styleRuleIgnoringAtRoot; + t1 = t1 == null ? _null : t1.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !_this._atRootExcludingStyleRule, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss); + } + rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$2(parsedSelector, _this._mediaQueries), node.span, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss, parsedSelector); + oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; + t1 = _this._atRootExcludingStyleRule = false; + t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure1() : _null; + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure2(_this, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule, type$.Null); + _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + _this._warnForBogusCombinators$1(rule); + if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } + if (t1) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + return _null; + }, + _warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) + for (t1 = rule._style_rule$_selector._box$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor)) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight(complex.span), B.Deprecation_ido); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight(complex.span), B.Deprecation_ido); + } + } else { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t5.$index(0, 0)); + _this._warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_ido); + } + } + }, + visitSupportsRule$1(_, node) { + var t1, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(new A.CssValue(_this._visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String), node.span), new A._EvaluateVisitor_visitSupportsRule_closure(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure0(), type$.ModifiableCssSupportsRule, type$.Null); + return null; + }, + _visitSupportsCondition$1(condition) { + var t1, _this = this, _box_0 = {}; + $label0$0: { + if (condition instanceof A.SupportsOperation) { + t1 = condition.operator; + t1 = _this._parenthesize$2(condition.left, t1) + " " + t1 + " " + _this._parenthesize$2(condition.right, t1); + break $label0$0; + } + if (condition instanceof A.SupportsNegation) { + t1 = "not " + _this._parenthesize$1(condition.condition); + break $label0$0; + } + if (condition instanceof A.SupportsInterpolation) { + t1 = condition.expression; + t1 = _this._evaluate$_serialize$3$quote(t1.accept$1(_this), t1, false); + break $label0$0; + } + _box_0.declaration = null; + if (condition instanceof A.SupportsDeclaration) { + _box_0.declaration = condition; + t1 = _this._withSupportsDeclaration$1(new A._EvaluateVisitor__visitSupportsCondition_closure(_box_0, _this)); + break $label0$0; + } + if (condition instanceof A.SupportsFunction) { + t1 = _this._performInterpolation$1(condition.name) + "(" + _this._performInterpolation$1(condition.$arguments) + ")"; + break $label0$0; + } + if (condition instanceof A.SupportsAnything) { + t1 = "(" + _this._performInterpolation$1(condition.contents) + ")"; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + } + return t1; + }, + _withSupportsDeclaration$1$1(callback) { + var t1, + oldInSupportsDeclaration = this._inSupportsDeclaration; + this._inSupportsDeclaration = true; + try { + t1 = callback.call$0(); + return t1; + } finally { + this._inSupportsDeclaration = oldInSupportsDeclaration; + } + }, + _withSupportsDeclaration$1(callback) { + return this._withSupportsDeclaration$1$1(callback, type$.dynamic); + }, + _parenthesize$2(condition, operator) { + var t1; + if (!(condition instanceof A.SupportsNegation)) + if (condition instanceof A.SupportsOperation) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + if (t1) + return "(" + this._visitSupportsCondition$1(condition) + ")"; + return this._visitSupportsCondition$1(condition); + }, + _parenthesize$1(condition) { + return this._parenthesize$2(condition, null); + }, + visitVariableDeclaration$1(_, node) { + var t2, value, _this = this, _null = null, t1 = {}; + if (node.isGuarded) { + if (node.namespace == null && _this._environment._variables.length === 1) { + t2 = _this._configuration._configuration$_values; + t2 = t2.get$isEmpty(t2) ? _null : t2.remove$1(0, node.name); + t1.override = null; + if (t2 != null) { + t1.override = t2; + t2 = !t2.value.$eq(0, B.C__SassNull); + } else + t2 = false; + if (t2) { + _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure(t1, _this, node)); + return _null; + } + } + value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure0(_this, node)); + if (value != null && !value.$eq(0, B.C__SassNull)) + return _null; + } + if (node.isGlobal && !_this._environment.globalVariableExists$1(node.name)) { + t1 = _this._environment._variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; + _this._warn$3(t1, node.span, B.Deprecation_2nU); + } + t1 = node.expression; + _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure1(_this, node, _this._withoutSlash$2(t1.accept$1(_this), t1))); + return _null; + }, + visitUseRule$1(_, node) { + var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, + t1 = node.configuration, + t2 = t1.length; + if (t2 !== 0) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = _this._expressionNode$1(t3); + values.$indexSet(0, variable.name, new A.ConfiguredValue(_this._withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + configuration = new A.ExplicitConfiguration(node, values, null); + } else + configuration = B.Configuration_Map_empty_null; + _this._loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure(_this, node), configuration); + _this._assertConfigurationIsEmpty$1(configuration); + return null; + }, + visitWarnRule$1(_, node) { + var _this = this, + value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure(_this, node)), + t1 = value instanceof A.SassString ? value._string$_text : _this._evaluate$_serialize$2(value, node.expression); + _this._evaluate$_logger.warn$2$trace(0, t1, _this._evaluate$_stackTrace$1(node.span)); + return null; + }, + visitWhileRule$1(_, node) { + return this._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure(this, node), true, node.hasDeclarations, type$.nullable_Value); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_wdM && t1 !== B.BinaryOperator_U77; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._evaluate$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure(_this, node)); + }, + _slash$3(left, right, node) { + var t2, _1_1, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber, + _1_2 = null, right0 = null, + t1 = false; + if (_1_2_isSet) { + t2 = type$.SassNumber; + t2._as(left); + if (right instanceof A.SassNumber) { + t2._as(right); + t1 = node.allowsSlash && this._operandAllowsSlash$1(node.left) && this._operandAllowsSlash$1(node.right); + right0 = right; + _1_2 = right0; + } else + _1_2 = right; + _1_1 = left; + } else { + _1_1 = left; + left = null; + } + if (t1) + return type$.SassNumber._as(result).withSlash$2(left, right0); + if (_1_1 instanceof A.SassNumber) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber; + else + t1 = false; + if (t1) { + this._warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation().call$1(node)) + " or " + A.expressionToCalc(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_oJv); + return result; + } + return result; + }, + _operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return node.value; + }, + visitVariableExpression$1(_, node) { + var result = this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure(this, node)); + if (result != null) + return result; + throw A.wrapException(this._evaluate$_exception$2("Undefined variable.", node.span)); + }, + visitUnaryOperationExpression$1(_, node) { + return this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure(node, node.operand.accept$1(this))); + }, + visitBooleanExpression$1(_, node) { + return node.value ? B.SassBoolean_true : B.SassBoolean_false; + }, + visitIfExpression$1(_, node) { + var condition, t1, ifTrue, ifFalse, result, _this = this, + _0_0 = _this._evaluateMacroArguments$1(node), + positional = _0_0._0, + named = _0_0._1; + _this._verifyArguments$4(positional.length, named, $.$get$IfExpression_declaration(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; + return _this._withoutSlash$2(result.accept$1(_this), _this._expressionNode$1(result)); + }, + visitNullExpression$1(_, node) { + return B.C__SassNull; + }, + visitNumberExpression$1(_, node) { + return A.SassNumber_SassNumber(node.value, node.unit); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._evaluate$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return node.value; + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return A.SassList$(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), node.separator, node.hasBrackets); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, + t1 = type$.Value, + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + value = t4._1; + keyValue = key.accept$1(this); + valueValue = value.accept$1(this); + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t1, "second key", t2, this._evaluate$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); + }, + visitFunctionExpression$1(_, node) { + var t2, _0_0, t3, t4, oldInFunction, result, _this = this, + _s11_ = "_stylesheet", + t1 = {}, + $function = _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss ? null : _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure(_this, node)); + t1.$function = $function; + if ($function == null) { + if (node.namespace != null) + throw A.wrapException(_this._evaluate$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure0()); + } else + t3 = false; + if (t3) + return _this._visitCalculation$2$inLegacySassFunction(node, true); + if ("calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0) + return _this._visitCalculation$1(node); + $function = _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss ? null : _this._builtInFunctions.$index(0, t2); + t2 = t1.$function = $function == null ? new A.PlainCssCallable(node.originalName) : $function; + } else + t2 = $function; + if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) + _this._warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_HJ0); + oldInFunction = _this._inFunction; + _this._inFunction = true; + result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure1(t1, _this, node)); + _this._inFunction = oldInFunction; + return result; + }, + _visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + var $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, _this = this, + t2 = node.$arguments, + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException(_this._evaluate$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Rest_a, node.span)); + _this._checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + for (t2 = t2.positional, t4 = t2.length, _i = 0; _i < t4; ++_i) + t3.push(_this._visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + $arguments = t3; + if (_this._inSupportsDeclaration) + return new A.SassCalculation(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + oldCallableNode = _this._callableNode; + _this._callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument("sqrt", J.$index$asx($arguments, 0), A.number0__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument("sin", J.$index$asx($arguments, 0), A.number0__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument("cos", J.$index$asx($arguments, 0), A.number0__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument("tan", J.$index$asx($arguments, 0), A.number0__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument("asin", J.$index$asx($arguments, 0), A.number0__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument("acos", J.$index$asx($arguments, 0), A.number0__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument("atan", J.$index$asx($arguments, 0), A.number0__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan2(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_round(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + _this._verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace(_this._evaluate$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + _this._callableNode = oldCallableNode; + } + }, + _visitCalculation$1(node) { + return this._visitCalculation$2$inLegacySassFunction(node, false); + }, + _checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) + throw A.wrapException(this._evaluate$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._evaluate$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); + } + } + }, + _visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + var result, t2, _0_0, _1_0, t3, _i, i, _this = this, _null = null, _box_0 = {}, + t1 = node instanceof A.ParenthesizedExpression, + inner = t1 ? node.expression : _null; + if (t1) { + result = _this._visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction); + return result instanceof A.SassString ? new A.SassString("(" + result._string$_text + ")", false) : result; + } + if (node instanceof A.StringExpression && node.accept$1(new A._IsCalculationSafeVisitor())) { + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? _null : t2.toLowerCase(); + $label0$0: { + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber(3.141592653589793, _null); + break $label0$0; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber(2.718281828459045, _null); + break $label0$0; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(1 / 0, _null); + break $label0$0; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(-1 / 0, _null); + break $label0$0; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber(0 / 0, _null); + break $label0$0; + } + t1 = new A.SassString(_this._performInterpolation$1(t1), false); + break $label0$0; + } + return t1; + } + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + if (t1) { + _this._checkWhitespaceAroundCalculationOperator$1(node); + return _this._addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure(_box_0, _this, node, inLegacySassFunction)); + } + if (node instanceof A.NumberExpression || node instanceof A.VariableExpression || node instanceof A.FunctionExpression || node instanceof A.IfExpression) { + _1_0 = node.accept$1(_this); + $label1$1: { + if (_1_0 instanceof A.SassNumber) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString) { + t1 = !_1_0._hasQuotes; + result = _1_0; + } else { + result = _null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression(_this._evaluate$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + return t1; + } + if (node instanceof A.ListExpression && !node.hasBrackets && B.ListSeparator_nbm === node.separator && node.contents.length >= 2) { + t1 = A._setArrayType([], type$.JSArray_Object); + for (t2 = node.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + _this._checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation && t2[i] instanceof A.ParenthesizedExpression) + t1[i] = new A.SassString("(" + A.S(t3) + ")", false); + } + return new A.SassString(B.JSArray_methods.join$1(t1, " "), false); + } + throw A.wrapException(_this._evaluate$_exception$2(string$.This_e, node.get$span(node))); + }, + _checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_u15 && t1 !== B.BinaryOperator_SjO) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_u15 === operator) { + t1 = B.CalculationOperator_g2q; + break $label0$0; + } + if (B.BinaryOperator_SjO === operator) { + t1 = B.CalculationOperator_CxF; + break $label0$0; + } + if (B.BinaryOperator_2No === operator) { + t1 = B.CalculationOperator_171; + break $label0$0; + } + if (B.BinaryOperator_U77 === operator) { + t1 = B.CalculationOperator_Qf1; + break $label0$0; + } + t1 = A.throwExpression(this._evaluate$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString || current instanceof A.SassString) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_AiQ !== _0_2) + t1 = B.UnaryOperator_cLp === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._evaluate$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + var result, _this = this, + t1 = _this._performInterpolation$1(node.name), + oldInFunction = _this._inFunction; + _this._inFunction = true; + result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure(_this, node, new A.PlainCssCallable(t1))); + _this._inFunction = oldInFunction; + return result; + }, + _runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + var oldCallable, result, _this = this, + evaluated = _this._evaluateArguments$1($arguments), + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = _this._currentCallable; + _this._currentCallable = callable; + result = _this._withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure(_this, callable, evaluated, nodeWithSpan, run, $V)); + _this._currentCallable = oldCallable; + return result; + }, + _runFunctionCallable$3($arguments, callable, nodeWithSpan) { + var buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, _this = this; + if (callable instanceof A.BuiltInCallable) + return _this._withoutSlash$2(_this._runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); + else if (type$.UserDefinedCallable_Environment._is(callable)) + return _this._runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure(_this, callable), type$.Value); + else if (callable instanceof A.PlainCssCallable) { + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + try { + first = true; + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + t4 = argument; + t4 = _this._evaluate$_serialize$3$quote(t4.accept$1(_this), t4, true); + t3._contents += t4; + } + restArg = $arguments.rest; + if (restArg != null) { + rest = restArg.accept$1(_this); + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = _this._evaluate$_serialize$2(rest, restArg); + t1._contents += t2; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw exception; + } + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + return new A.SassString(t2.charCodeAt(0) == 0 ? t2 : t2, false); + } else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + }, + _runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + var result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, _this = this, _box_0 = {}, + evaluated = _this._evaluateArguments$1($arguments), + oldCallableNode = _this._callableNode; + _this._callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(evaluated._values[2].length, namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure(_box_0, evaluated, namedSet)); + declaredArguments = _box_0.overload.$arguments; + for (i = evaluated._values[2].length, t1 = declaredArguments.length; i < t1; ++i) { + argument = declaredArguments[i]; + t2 = evaluated._values[2]; + t3 = evaluated._values[0].remove$1(0, argument.name); + if (t3 == null) { + t3 = argument.defaultValue; + t3 = _this._withoutSlash$2(t3.accept$1(_this), t3); + } + t2.push(t3); + } + if (_box_0.overload.restArgument != null) { + if (evaluated._values[2].length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated._values[2], t1); + B.JSArray_methods.removeRange$2(evaluated._values[2], t1, evaluated._values[2].length); + } else + rest = B.List_empty8; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : evaluated._values[4]); + evaluated._values[2].push(argumentList); + } else + argumentList = null; + result = null; + try { + result = _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure0(_box_0, evaluated)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) + throw exception; + else { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(_this._evaluate$_exception$2(_this._getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + } + _this._callableNode = oldCallableNode; + if (argumentList == null) + return result; + if (evaluated._values[0].__js_helper$_length === 0) + return result; + if (argumentList._wereKeywordsAccessed) + return result; + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + A.pluralize("argument", evaluated._values[0].get$keys(0).get$length(0), null) + " named " + A.toSentence(evaluated._values[0].get$keys(0).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure1(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + }, + _evaluateArguments$1($arguments) { + var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, $name, value, restArgs, rest, restNodeForSpan, t5, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, + positional = A._setArrayType([], type$.JSArray_Value), + positionalNodes = A._setArrayType([], type$.JSArray_AstNode); + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + nodeForSpan = _this._expressionNode$1(expression); + positional.push(_this._withoutSlash$2(expression.accept$1(_this), nodeForSpan)); + positionalNodes.push(nodeForSpan); + } + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); + t2 = type$.AstNode; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t3 = A.MapExtensions_get_pairs($arguments.named, t1, type$.Expression), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + $name = t4._0; + value = t4._1; + nodeForSpan = _this._expressionNode$1(value); + named.$indexSet(0, $name, _this._withoutSlash$2(value.accept$1(_this), nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + } + restArgs = $arguments.rest; + if (restArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided]); + rest = restArgs.accept$1(_this); + restNodeForSpan = _this._expressionNode$1(restArgs); + if (rest instanceof A.SassMap) { + _this._addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided; + } else if (rest instanceof A.SassList) { + t3 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure0(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._separator; + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure1(_this, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push(_this._withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + keywordRest = keywordRestArgs.accept$1(_this); + keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap) { + _this._addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure2()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + } else + throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + }, + _evaluateMacroArguments$1(invocation) { + var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, + t1 = invocation.$arguments, + restArgs_ = t1.rest; + if (restArgs_ == null) + return new A._Record_2(t1.positional, t1.named); + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); + rest = restArgs_.accept$1(_this); + restNodeForSpan = _this._expressionNode$1(restArgs_); + if (rest instanceof A.SassMap) + _this._addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure(restArgs_)); + else if (rest instanceof A.SassList) { + t2 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure0(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure1(_this, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression(_this._withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) + return new A._Record_2(positional, named); + keywordRest = keywordRestArgs_.accept$1(_this); + keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap) { + _this._addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure2(_this, keywordRestNodeForSpan, keywordRestArgs_)); + return new A._Record_2(positional, named); + } else + throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + }, + _addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure(this, values, convert, this._expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _addRestMap$4(values, map, nodeWithSpan, convert) { + return this._addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure($arguments, positional, named)); + }, + visitSelectorExpression$1(_, node) { + var t1 = this._styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + return t1 == null ? B.C__SassNull : t1; + }, + visitStringExpression$1(_, node) { + var t1, t2, t3, _i, value, t4, _0_0, text, _this = this, + oldInSupportsDeclaration = _this._inSupportsDeclaration; + _this._inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = node.text.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) { + value = t2[_i]; + $label0$0: { + if (typeof value == "string") { + t4 = value; + break $label0$0; + } + if (value instanceof A.Expression) { + _0_0 = value.accept$1(_this); + $label1$1: { + if (_0_0 instanceof A.SassString) { + text = _0_0._string$_text; + t4 = text; + break $label1$1; + } + t4 = _this._evaluate$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + break $label0$0; + } + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + } + t1.push(t4); + } + t1 = B.JSArray_methods.join$0(t1); + _this._inSupportsDeclaration = oldInSupportsDeclaration; + return new A.SassString(t1, node.hasQuotes); + }, + visitSupportsExpression$1(_, expression) { + return new A.SassString(this._visitSupportsCondition$1(expression.condition), false); + }, + visitCssAtRule$1(node) { + var wasInKeyframes, wasInUnknownAtRule, t1, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); + return; + } + wasInKeyframes = _this._inKeyframes; + wasInUnknownAtRule = _this._inUnknownAtRule; + t1 = node.name; + if (A.unvendor(t1.value) === "keyframes") + _this._inKeyframes = true; + else + _this._inUnknownAtRule = true; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure0(), type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + }, + visitCssComment$1(node) { + var _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(node.text, node.span)); + }, + visitCssDeclaration$1(node) { + this._assertInModule$2(this.__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); + }, + visitCssImport$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports", + modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); + if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(modifiableNode); + else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { + _this._assertInModule$2(_this.__root, _s5_).addChild$1(modifiableNode); + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + } else { + t1 = _this._outOfOrderImports; + (t1 == null ? _this._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); + } + }, + visitCssKeyframeBlock$1(node) { + this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure0(), type$.ModifiableCssKeyframeBlock, type$.Null); + }, + visitCssMediaRule$1(node) { + var mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure(_this, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return; + if (t1) + mergedSources = B.Set_empty1; + else { + t2 = _this._mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = _this._mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure0(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure1(mergedSources), type$.ModifiableCssMediaRule, type$.Null); + }, + visitCssStyleRule$1(node) { + var t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild, _this = this, _null = null, + _s8_ = "__parent"; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_n, node.span)); + else if (_this._inKeyframes && _this._assertInModule$2(_this.__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_k, node.span)); + t1 = _this._atRootExcludingStyleRule; + styleRule = t1 ? _null : _this._styleRuleIgnoringAtRoot; + t2 = t1 ? _null : _this._styleRuleIgnoringAtRoot; + t2 = t2 == null ? _null : t2.fromPlainCss; + nest = t2 !== true; + t2 = node._style_rule$_selector._box$_inner; + if (nest) { + t2 = t2.value; + t3 = styleRule == null ? _null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$2(originalSelector, _this._mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; + _this._atRootExcludingStyleRule = false; + t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure() : _null; + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure0(_this, rule, node), false, t1, type$.ModifiableCssStyleRule, type$.Null); + _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = _this._assertInModule$2(_this.__parent, _s8_).children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _0_1 = t2.get$length(t1); + if (_0_1 >= 1) { + lastChild = t2.elementAt$1(t1, _0_1 - 1); + t1 = styleRule == null; + } else { + lastChild = _null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + }, + visitCssStylesheet$1(node) { + var t1; + for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + }, + visitCssSupportsRule$1(node) { + var _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure0(), type$.ModifiableCssSupportsRule, type$.Null); + }, + _handleReturn$1$2(list, callback) { + var t1, _i, _0_0; + for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { + _0_0 = callback.call$1(list[_i]); + if (_0_0 != null) + return _0_0; + } + return null; + }, + _handleReturn$2(list, callback) { + return this._handleReturn$1$2(list, callback, type$.dynamic); + }, + _withEnvironment$1$2(environment, callback) { + var result, + oldEnvironment = this._environment; + this._environment = environment; + result = callback.call$0(); + this._environment = oldEnvironment; + return result; + }, + _withEnvironment$2(environment, callback) { + return this._withEnvironment$1$2(environment, callback, type$.dynamic); + }, + _interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + var result = this._performInterpolation$2$warnForColor(interpolation, warnForColor), + t1 = trim ? A.trimAscii(result, true) : result; + return new A.CssValue(t1, interpolation.span, type$.CssValue_String); + }, + _interpolationToValue$1(interpolation) { + return this._interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor)._0; + }, + _performInterpolation$1(interpolation) { + return this._performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + var _0_0 = this._performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), + map = _0_0._1; + map.toString; + return new A._Record_2(_0_0._0, map); + }, + _performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + var t1, t2, t3, t4, t5, t6, t7, first, _i, t8, value, result, t9, result0, _this = this, _null = null, + targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : _null, + oldInSupportsDeclaration = _this._inSupportsDeclaration; + _this._inSupportsDeclaration = false; + for (t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression, t4 = targetLocations == null, t5 = type$.JSArray_Object, t6 = interpolation.span, t7 = type$.Object, first = true, _i = 0, t8 = ""; _i < t2; ++_i, first = false) { + value = t1[_i]; + if (!first) + if (!t4) + targetLocations.push(A.SourceLocation$(t8.length, _null, _null, _null)); + if (typeof value == "string") { + t8 += value; + continue; + } + t3._as(value); + result = value.accept$1(_this); + if (warnForColor && $.$get$namesByColor().containsKey$1(result)) { + t9 = A._setArrayType([""], t5); + result0 = A.List_List$from(t9, false, t7); + result0.fixed$length = Array; + result0.immutable$list = Array; + result0 = new A.Interpolation(result0, t6); + result0.Interpolation$2(t9, t6); + t9 = $.$get$namesByColor(); + _this._warn$2(string$.You_pr + A.S(t9.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t9.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_u15, new A.StringExpression(result0, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t8 += _this._evaluate$_serialize$3$quote(result, value, false); + } + _this._inSupportsDeclaration = oldInSupportsDeclaration; + return new A._Record_2(t8.charCodeAt(0) == 0 ? t8 : t8, A.NullableExtension_andThen(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure(interpolation))); + }, + _evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure(value, quote)); + }, + _evaluate$_serialize$2(value, nodeWithSpan) { + return this._evaluate$_serialize$3$quote(value, nodeWithSpan, true); + }, + _expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression) { + t1 = this._addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + var t1, result, _this = this; + _this._addChild$2$through(node, through); + t1 = _this._assertInModule$2(_this.__parent, "__parent"); + _this.__parent = node; + result = _this._environment.scope$1$2$when(callback, scopeWhen, $T); + _this.__parent = t1; + return result; + }, + _withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _withParent$2$2(node, callback, $S, $T) { + return this._withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._assertInModule$2(this.__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _addChild$1(node) { + return this._addChild$2$through(node, null); + }, + _withStyleRule$1$2(rule, callback) { + var result, + oldRule = this._styleRuleIgnoringAtRoot; + this._styleRuleIgnoringAtRoot = rule; + result = callback.call$0(); + this._styleRuleIgnoringAtRoot = oldRule; + return result; + }, + _withStyleRule$2(rule, callback) { + return this._withStyleRule$1$2(rule, callback, type$.dynamic); + }, + _withMediaQueries$1$3(queries, sources, callback) { + var result, _this = this, + oldMediaQueries = _this._mediaQueries, + oldSources = _this._mediaQuerySources; + _this._mediaQueries = queries; + _this._mediaQuerySources = sources; + result = callback.call$0(); + _this._mediaQueries = oldMediaQueries; + _this._mediaQuerySources = oldSources; + return result; + }, + _withMediaQueries$3(queries, sources, callback) { + return this._withMediaQueries$1$3(queries, sources, callback, type$.dynamic); + }, + _withStackFrame$1$3(member, nodeWithSpan, callback) { + var oldMember, result, _this = this, + t1 = _this._stack; + t1.push(new A._Record_2(_this._member, nodeWithSpan)); + oldMember = _this._member; + _this._member = member; + result = callback.call$0(); + _this._member = oldMember; + t1.pop(); + return result; + }, + _withStackFrame$3(member, nodeWithSpan, callback) { + return this._withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); + }, + _withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_oJv); + return value.withoutSlash$0(); + }, + _stackFrame$2(member, span) { + return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure(this))); + }, + _evaluate$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._stackFrame$2(_this._member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _evaluate$_stackTrace$0() { + return this._evaluate$_stackTrace$1(null); + }, + _warn$3(message, span, deprecation) { + var t1, trace, _this = this; + if (_this._quietDeps) + if (!_this._inDependency) { + t1 = _this._currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._evaluate$_stackTrace$1(span); + t1 = _this._evaluate$_logger; + if (deprecation == null) + t1.warn$3$span$trace(0, message, span, trace); + else + A.WarnForDeprecation_warnForDeprecation(t1, deprecation, message, span, trace); + }, + _warn$2(message, span) { + return this._warn$3(message, span, null); + }, + _evaluate$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._evaluate$_stackTrace$1(span); + return new A.SassRuntimeException(t2, B.Set_empty, message, t1); + }, + _evaluate$_exception$1(message) { + return this._evaluate$_exception$2(message, null); + }, + _multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._stack)._1; + return A.MultiSpanSassRuntimeException$(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._evaluate$_stackTrace$0(), null); + }, + _addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace(t1.withTrace$1(this._evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _addExceptionSpan$2(nodeWithSpan, callback) { + return this._addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, true, type$.dynamic); + }, + _addExceptionSpan$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + return this._addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, type$.dynamic); + }, + _addExceptionTrace$1$1(callback) { + var error, stackTrace, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) + throw exception; + else if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace(error.withTrace$1(this._evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw exception; + } + }, + _addExceptionTrace$1(callback) { + return this._addExceptionTrace$1$1(callback, type$.dynamic); + }, + _addErrorSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, t2, t3; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = this._evaluate$_stackTrace$0(); + A.throwWithTrace(new A.SassRuntimeException(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw exception; + } + }, + _addErrorSpan$2(nodeWithSpan, callback) { + return this._addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + } + }; + A._EvaluateVisitor_closure.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure0.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure1.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._environment; + t3 = variable._string$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure2.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure3.prototype = { + call$1($arguments) { + var t1 = this.$this._environment; + if (!t1._inMixin) + throw A.wrapException(A.SassScriptException$(string$.conten, null)); + return t1._content != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 12 + }; + A._EvaluateVisitor_closure4.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._environment._environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), t4._1); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure5.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._environment._environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$functions(module), type$.String, type$.Callable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassFunction(t4._1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure6.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._environment._environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$mixins(), type$.String, type$.Callable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassMixin(t4._1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure7.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction(new A.PlainCssCallable($name._string$_text)); + } + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + callable = t1._addExceptionSpan$2(t2, new A._EvaluateVisitor__closure2(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction(callable); + }, + $signature: 165 + }; + A._EvaluateVisitor__closure2.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string$_text; + t1 = this.$this; + local = t1._environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._builtInFunctions.$index(0, normalizedName); + }, + $signature: 94 + }; + A._EvaluateVisitor_closure8.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + callable = t1._addExceptionSpan$2(t2, new A._EvaluateVisitor__closure1(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin(callable); + }, + $signature: 167 + }; + A._EvaluateVisitor__closure1.prototype = { + call$0() { + var t1 = this.$this._environment, + t2 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string$_text); + }, + $signature: 94 + }; + A._EvaluateVisitor_closure9.prototype = { + call$1($arguments) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, callable, + t1 = J.getInterceptor$asx($arguments), + $function = t1.$index($arguments, 0), + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression); + t4 = type$.String; + t5 = type$.Expression; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._wereKeywordsAccessed = true; + t8 = args._keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString(t11._0, false), t11._1); + } + t2 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression(args, t7), t2, t6); + if ($function instanceof A.SassString) { + A.warnForDeprecation(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_gkc); + callableNode = t1._callableNode; + t2 = $function._string$_text; + t3 = callableNode.get$span(callableNode); + return t1.visitFunctionExpression$1(0, new A.FunctionExpression(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + } + callable = $function.assertFunction$1("function").callable; + if (type$.Callable._is(callable)) { + t2 = t1._callableNode; + t2.toString; + return t1._runFunctionCallable$3(invocation, callable, t2); + } else + throw A.wrapException(A.SassScriptException$("The function " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 4 + }; + A._EvaluateVisitor_closure10.prototype = { + call$1($arguments) { + var withMap, t2, values, configuration, t3, + t1 = J.getInterceptor$asx($arguments), + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + withMap.forEach$1(0, new A._EvaluateVisitor__closure(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null; + t3 = t2.get$span(t2); + t1._loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure0(t1), t3.get$sourceUrl(t3), configuration, true); + t1._assertConfigurationIsEmpty$2$nameInError(configuration, true); + }, + $signature: 187 + }; + A._EvaluateVisitor__closure.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue(value, this.span, this.callableNode)); + }, + $signature: 88 + }; + A._EvaluateVisitor__closure0.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 81 + }; + A._EvaluateVisitor_closure11.prototype = { + call$1($arguments) { + var callableNode, t2, t3, t4, t5, callable, $content, + t1 = J.getInterceptor$asx($arguments), + mixin = t1.$index($arguments, 0), + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = this.$this; + callableNode = t1._callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + t4 = type$.Expression; + t5 = A.List_List$unmodifiable(B.List_empty9, t4); + t4 = A.ConstantMap_ConstantMap$from(B.Map_empty6, type$.String, t4); + callable = mixin.assertMixin$1("mixin").callable; + $content = t1._environment._content; + if (type$.Callable._is(callable)) + t1._applyMixin$5(callable, $content, new A.ArgumentInvocation(t5, t4, new A.ValueExpression(args, t3), null, t2), callableNode, callableNode); + else + throw A.wrapException(A.SassScriptException$("The mixin " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 187 + }; + A._EvaluateVisitor_run_closure.prototype = { + call$0() { + var module, _this = this, + t1 = _this.node, + t2 = t1.span, + _0_0 = t2.get$sourceUrl(t2), + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = _this.$this; + t2._activeModules.$indexSet(0, url, null); + t2._loadedUrls.add$1(0, url); + } + t2 = _this.$this; + module = t2._addExceptionTrace$1(new A._EvaluateVisitor_run__closure(t2, _this.importer, t1)); + return new A._Record_2_loadedUrls_stylesheet(t2._loadedUrls, t2._combineCss$1(module)); + }, + $signature: 573 + }; + A._EvaluateVisitor_run__closure.prototype = { + call$0() { + return this.$this._execute$2(this.importer, this.node); + }, + $signature: 574 + }; + A._EvaluateVisitor_runExpression_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.expression; + return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runExpression__closure(t1, t2)); + }, + $signature: 36 + }; + A._EvaluateVisitor_runExpression__closure.prototype = { + call$0() { + var t1 = this.$this; + return t1._addExceptionTrace$1(new A._EvaluateVisitor_runExpression___closure(t1, this.expression)); + }, + $signature: 36 + }; + A._EvaluateVisitor_runExpression___closure.prototype = { + call$0() { + return this.expression.accept$1(this.$this); + }, + $signature: 36 + }; + A._EvaluateVisitor_runStatement_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.statement; + return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runStatement__closure(t1, t2)); + }, + $signature: 0 + }; + A._EvaluateVisitor_runStatement__closure.prototype = { + call$0() { + var t1 = this.$this; + return t1._addExceptionTrace$1(new A._EvaluateVisitor_runStatement___closure(t1, this.statement)); + }, + $signature: 0 + }; + A._EvaluateVisitor_runStatement___closure.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure.prototype = { + call$0() { + return this.callback.call$2(this._box_1.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure0.prototype = { + call$0() { + var canonicalUrl, oldInDependency, t4, message, _this = this, t1 = {}, stylesheet = null, importer = null, + t2 = _this.$this, + t3 = _this.nodeWithSpan, + _1_0 = t2._loadStylesheet$3$baseUrl(_this.url.toString$0(0), t3.get$span(t3), _this.baseUrl); + stylesheet = _1_0._0; + importer = _1_0._1; + t4 = stylesheet.span; + canonicalUrl = t4.get$sourceUrl(t4); + if (canonicalUrl != null) { + t4 = t2._activeModules; + if (t4.containsKey$1(canonicalUrl)) { + if (_this.namesInErrors) { + t1 = canonicalUrl; + t3 = $.$get$context(); + t1.toString; + message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; + } else + message = string$.Modulel; + t1 = A.NullableExtension_andThen(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure(t2, message)); + throw A.wrapException(t1 == null ? t2._evaluate$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._modules.containsKey$1(canonicalUrl); + oldInDependency = t2._inDependency; + t2._inDependency = _1_0._2; + t1.module = null; + try { + t1.module = t2._execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, _this.configuration, _this.namesInErrors, t3); + } finally { + t2._activeModules.remove$1(0, canonicalUrl); + t2._inDependency = oldInDependency; + } + t2._addExceptionSpan$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure0(t1, _this.callback, !t4), false); + }, + $signature: 1 + }; + A._EvaluateVisitor__loadModule__closure.prototype = { + call$1(previousLoad) { + return this.$this._multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__loadModule__closure0.prototype = { + call$0() { + return this.callback.call$2(this._box_0.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure.prototype = { + call$0() { + var t3, t4, t5, t6, _this = this, + t1 = _this.$this, + oldImporter = t1._importer, + oldStylesheet = t1.__stylesheet, + oldRoot = t1.__root, + oldPreModuleComments = t1._preModuleComments, + oldParent = t1.__parent, + oldEndOfImports = t1.__endOfImports, + oldOutOfOrderImports = t1._outOfOrderImports, + oldExtensionStore = t1.__extensionStore, + t2 = t1._atRootExcludingStyleRule, + oldStyleRule = t2 ? null : t1._styleRuleIgnoringAtRoot, + oldMediaQueries = t1._mediaQueries, + oldDeclarationName = t1._declarationName, + oldInUnknownAtRule = t1._inUnknownAtRule, + oldInKeyframes = t1._inKeyframes, + oldConfiguration = t1._configuration; + t1._importer = _this.importer; + t3 = t1.__stylesheet = _this.stylesheet; + t4 = t3.span; + t5 = t1.__parent = t1.__root = A.ModifiableCssStylesheet$(t4); + t1.__endOfImports = 0; + t1._outOfOrderImports = null; + t1.__extensionStore = _this.extensionStore; + t1._declarationName = t1._mediaQueries = t1._styleRuleIgnoringAtRoot = null; + t1._inKeyframes = t1._atRootExcludingStyleRule = t1._inUnknownAtRule = false; + t6 = _this.configuration; + if (t6 != null) + t1._configuration = t6; + t1.visitStylesheet$1(0, t3); + t3 = t1._outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); + _this.css.__late_helper$_value = t3; + _this.preModuleComments.__late_helper$_value = t1._preModuleComments; + t1._importer = oldImporter; + t1.__stylesheet = oldStylesheet; + t1.__root = oldRoot; + t1._preModuleComments = oldPreModuleComments; + t1.__parent = oldParent; + t1.__endOfImports = oldEndOfImports; + t1._outOfOrderImports = oldOutOfOrderImports; + t1.__extensionStore = oldExtensionStore; + t1._styleRuleIgnoringAtRoot = oldStyleRule; + t1._mediaQueries = oldMediaQueries; + t1._declarationName = oldDeclarationName; + t1._inUnknownAtRule = oldInUnknownAtRule; + t1._atRootExcludingStyleRule = t2; + t1._inKeyframes = oldInKeyframes; + t1._configuration = oldConfiguration; + }, + $signature: 1 + }; + A._EvaluateVisitor__combineCss_closure.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 113 + }; + A._EvaluateVisitor__combineCss_closure0.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__combineCss_visitModule.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 575 + }; + A._EvaluateVisitor__extendModules_closure.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 13 + }; + A._EvaluateVisitor__extendModules_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore); + }, + $signature: 170 + }; + A._EvaluateVisitor_visitAtRootRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRootRule_closure0.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 0 + }; + A._EvaluateVisitor__scopeForAtRoot_closure.prototype = { + call$1(callback) { + var t1 = this.$this, + t2 = t1._assertInModule$2(t1.__parent, "__parent"); + t1.__parent = this.newParent; + t1._environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); + t1.__parent = t2; + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot_closure0.prototype = { + call$1(callback) { + var t1 = this.$this, + oldAtRootExcludingStyleRule = t1._atRootExcludingStyleRule; + t1._atRootExcludingStyleRule = true; + this.innerScope.call$1(callback); + t1._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot_closure1.prototype = { + call$1(callback) { + return this.$this._withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure(this.innerScope, callback)); + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot__closure.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 1 + }; + A._EvaluateVisitor__scopeForAtRoot_closure2.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInKeyframes = t1._inKeyframes; + t1._inKeyframes = false; + this.innerScope.call$1(callback); + t1._inKeyframes = wasInKeyframes; + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot_closure3.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule; + }, + $signature: 172 + }; + A._EvaluateVisitor__scopeForAtRoot_closure4.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInUnknownAtRule = t1._inUnknownAtRule; + t1._inUnknownAtRule = false; + this.innerScope.call$1(callback); + t1._inUnknownAtRule = wasInUnknownAtRule; + }, + $signature: 37 + }; + A._EvaluateVisitor_visitContentRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + return null; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitDeclaration_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this._box_0.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitEachRule_closure.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._environment.setLocalVariable$3(this._box_0.variable, t1._withoutSlash$2(value, t2), t2); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure0.prototype = { + call$1(value) { + return this.$this._setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure(t1, _this.setVariables, _this.node)); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitEachRule__closure.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure(t1)); + }, + $signature: 587 + }; + A._EvaluateVisitor_visitEachRule___closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor_visitAtRule_closure.prototype = { + call$1(value) { + return this.$this._interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 604 + }; + A._EvaluateVisitor_visitAtRule_closure0.prototype = { + call$0() { + var t2, t3, _i, _this = this, + t1 = _this.$this, + styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (styleRule == null || t1._inKeyframes || J.$eq$(_this.name.value, "font-face")) + for (t2 = _this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule._style_rule$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure(t1, _this.children), false, type$.ModifiableCssStyleRule, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitForRule_closure.prototype = { + call$0() { + return this.node.from.accept$1(this.$this).assertNumber$0(); + }, + $signature: 188 + }; + A._EvaluateVisitor_visitForRule_closure0.prototype = { + call$0() { + return this.node.to.accept$1(this.$this).assertNumber$0(); + }, + $signature: 188 + }; + A._EvaluateVisitor_visitForRule_closure1.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure2.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure3.prototype = { + call$0() { + var i, t3, t4, t5, t6, t7, t8, _0_0, _this = this, + t1 = _this.$this, + t2 = _this.node, + nodeWithSpan = t1._expressionNode$1(t2.from); + for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { + t7 = t1._environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + _0_0 = t1._handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 42 + }; + A._EvaluateVisitor_visitForRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor_visitForwardRule_closure.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._registerCommentsForModule$1(module); + this.$this._environment.forwardModule$2(module, this.node); + }, + $signature: 81 + }; + A._EvaluateVisitor_visitForwardRule_closure0.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._registerCommentsForModule$1(module); + this.$this._environment.forwardModule$2(module, this.node); + }, + $signature: 81 + }; + A._EvaluateVisitor__registerCommentsForModule_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment); + }, + $signature: 175 + }; + A._EvaluateVisitor_visitIfRule_closure.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure(t1, clause), true, clause.hasDeclarations, type$.nullable_Value); + }, + $signature: 640 + }; + A._EvaluateVisitor_visitIfRule__closure.prototype = { + call$0() { + var t1 = this.$this; + return t1._handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure(t1)); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitIfRule___closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor__visitDynamicImport_closure.prototype = { + call$0() { + var t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = this.$this; + t2 = this.$import; + _0_0 = t1._loadStylesheet$3$forImport(t2.urlString, t2.span, true); + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + t3 = stylesheet.span; + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure(t1)); + throw A.wrapException(t2 == null ? t1._evaluate$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._uses; + t3 = type$.UnmodifiableListView_UseRule; + if (new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule).get$length(0) === 0) { + oldImporter = t1._importer; + t2 = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"); + oldInDependency = t1._inDependency; + t1._importer = importer; + t1.__stylesheet = stylesheet; + t1._inDependency = isDependency; + t1.visitStylesheet$1(0, stylesheet); + t1._importer = oldImporter; + t1.__stylesheet = t2; + t1._inDependency = oldInDependency; + t1._activeModules.remove$1(0, url); + return; + } + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure0())) { + t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure1()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._environment; + t3 = type$.String; + t4 = type$.Module_Callable; + t5 = type$.AstNode; + t6 = A._setArrayType([], type$.JSArray_Module_Callable); + t7 = t2._variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.Environment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._importedModules, null, null, t6, t7, t8, t9, t10, t2._content); + t1._withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure2(_box_0, t1, loadsUserDefinedModules, environment, children)); + module = environment.toDummyModule$0(); + t1._environment.importForwards$1(module); + if (loadsUserDefinedModules) { + if (module.transitivelyContainsCss) + t1._combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); + visitor = new A._ImportedCssVisitor(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + } + t1._activeModules.remove$1(0, url); + }, + $signature: 0 + }; + A._EvaluateVisitor__visitDynamicImport__closure.prototype = { + call$1(previousLoad) { + return this.$this._multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 87 + }; + A._EvaluateVisitor__visitDynamicImport__closure0.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 176 + }; + A._EvaluateVisitor__visitDynamicImport__closure1.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 177 + }; + A._EvaluateVisitor__visitDynamicImport__closure2.prototype = { + call$0() { + var t7, t8, _this = this, + t1 = _this.$this, + oldImporter = t1._importer, + t2 = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"), + t3 = t1._assertInModule$2(t1.__root, "_root"), + t4 = t1._assertInModule$2(t1.__parent, "__parent"), + t5 = t1._assertInModule$2(t1.__endOfImports, "_endOfImports"), + oldOutOfOrderImports = t1._outOfOrderImports, + oldConfiguration = t1._configuration, + oldInDependency = t1._inDependency, + t6 = _this._box_0; + t1._importer = t6.importer; + t7 = t6.stylesheet; + t1.__stylesheet = t7; + t8 = _this.loadsUserDefinedModules; + if (t8) { + t7 = A.ModifiableCssStylesheet$(t7.span); + t1.__root = t7; + t1.__parent = t1._assertInModule$2(t7, "_root"); + t1.__endOfImports = 0; + t1._outOfOrderImports = null; + } + t1._inDependency = t6.isDependency; + t7 = new A.UnmodifiableListView(t6.stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + if (!t7.get$isEmpty(t7)) + t1._configuration = _this.environment.toImplicitConfiguration$0(); + t1.visitStylesheet$1(0, t6.stylesheet); + t6 = t8 ? t1._addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); + _this.children.__late_helper$_value = t6; + t1._importer = oldImporter; + t1.__stylesheet = t2; + if (t8) { + t1.__root = t3; + t1.__parent = t4; + t1.__endOfImports = t5; + t1._outOfOrderImports = oldOutOfOrderImports; + } + t1._configuration = oldConfiguration; + t1._inDependency = oldInDependency; + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure0(t1, _this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin__closure0.prototype = { + call$0() { + var _this = this; + _this.$this._runBuiltInCallable$3(_this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._environment.withContent$2(_this.contentCallable, new A._EvaluateVisitor__applyMixin__closure(t1, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin__closure.prototype = { + call$0() { + var t1 = this.$this; + t1._environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure(t1, this.mixin, this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin___closure.prototype = { + call$0() { + var t1, t2, t3, t4, _i; + for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpanWithoutContent, _i = 0; _i < t2; ++_i) + t3._addErrorSpan$2(t4, new A._EvaluateVisitor__applyMixin____closure(t3, t1[_i])); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin____closure.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitIncludeRule_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 94 + }; + A._EvaluateVisitor_visitIncludeRule_closure0.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable($content, t1._environment.closure$0(), t1._inDependency, type$.UserDefinedCallable_Environment); + }, + $signature: 641 + }; + A._EvaluateVisitor_visitIncludeRule_closure1.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 30 + }; + A._EvaluateVisitor_visitMediaRule_closure.prototype = { + call$1(mediaQueries) { + return this.$this._mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 85 + }; + A._EvaluateVisitor_visitMediaRule_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.queries; + t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule__closure.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule___closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure1.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitSupportsRule_closure.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor__visitSupportsCondition_closure.prototype = { + call$0() { + var t4, + t1 = this.$this, + t2 = this._box_0, + t3 = t2.declaration.name; + t3 = t1._evaluate$_serialize$3$quote(t3.accept$1(t1), t3, true); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + t2 = t2.declaration.value; + return "(" + t3 + ":" + t4 + t1._evaluate$_serialize$3$quote(t2.accept$1(t1), t2, true) + ")"; + }, + $signature: 29 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this._environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._environment.setVariable$5$global$namespace(t2.name, this.value, t1._expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._registerCommentsForModule$1(module); + t1 = this.$this._environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._globalModules.$indexSet(0, module, t2); + t1._allModules.push(module); + _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._variables)), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._environment$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._namespaceNodes.$indexSet(0, t3, t2); + t1._allModules.push(module); + } + }, + $signature: 81 + }; + A._EvaluateVisitor_visitWarnRule_closure.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 36 + }; + A._EvaluateVisitor_visitWhileRule_closure.prototype = { + call$0() { + var t1, t2, t3, _0_0; + for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { + _0_0 = t3._handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure(t3)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 42 + }; + A._EvaluateVisitor_visitWhileRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 82 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure.prototype = { + call$0() { + var t1 = this.node, + t2 = this.$this, + left = t1.left.accept$1(t2); + switch (t1.operator) { + case B.BinaryOperator_wdM: + t1 = t1.right.accept$1(t2); + t1 = new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(t1, false, true), false); + break; + case B.BinaryOperator_qNM: + t1 = left.get$isTruthy() ? left : t1.right.accept$1(t2); + break; + case B.BinaryOperator_eDt: + t1 = left.get$isTruthy() ? t1.right.accept$1(t2) : left; + break; + case B.BinaryOperator_g8k: + t1 = left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + break; + case B.BinaryOperator_icU: + t1 = !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + break; + case B.BinaryOperator_bEa: + t1 = left.greaterThan$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_oEm: + t1 = left.greaterThanOrEquals$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_miq: + t1 = left.lessThan$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_SPQ: + t1 = left.lessThanOrEquals$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_u15: + t1 = left.plus$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_SjO: + t1 = left.minus$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_2No: + t1 = left.times$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_U77: + t1 = t2._slash$3(left, t1.right.accept$1(t2), t1); + break; + case B.BinaryOperator_KNx: + t1 = left.modulo$1(t1.right.accept$1(t2)); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 36 + }; + A._EvaluateVisitor__slash_recommendation.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression && B.BinaryOperator_U77 === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 129 + }; + A._EvaluateVisitor_visitVariableExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator) { + case B.UnaryOperator_cLp: + t1 = _this.operand.unaryPlus$0(); + break; + case B.UnaryOperator_AiQ: + t1 = _this.operand.unaryMinus$0(); + break; + case B.UnaryOperator_SJr: + t1 = new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); + break; + case B.UnaryOperator_not_not_not: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 36 + }; + A._EvaluateVisitor_visitListExpression_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 643 + }; + A._EvaluateVisitor_visitFunctionExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 94 + }; + A._EvaluateVisitor_visitFunctionExpression_closure0.prototype = { + call$1(argument) { + return argument.accept$1(new A._IsCalculationSafeVisitor()); + }, + $signature: 120 + }; + A._EvaluateVisitor_visitFunctionExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 36 + }; + A._EvaluateVisitor__checkCalculationArguments_check.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._evaluate$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._evaluate$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 84 + }; + A._EvaluateVisitor__visitCalculationExpression_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this._box_0, + t3 = _this.inLegacySassFunction; + return A.SassCalculation_operateInternal(t1._binaryOperatorToCalculationOperator$2(t2.operator, _this.node), t1._visitCalculationExpression$2$inLegacySassFunction(t2.left, t3), t1._visitCalculationExpression$2$inLegacySassFunction(t2.right, t3), t3, !t1._inSupportsDeclaration); + }, + $signature: 83 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 36 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable; + return t1._withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure.prototype = { + call$0() { + var declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, _this = this, + t1 = _this.$this, + t2 = _this.evaluated._values, + t3 = _this.callable.declaration.$arguments, + t4 = _this.nodeWithSpan; + t1._verifyArguments$4(t2[2].length, t2[0], t3, t4); + declaredArguments = t3.$arguments; + t5 = declaredArguments.length; + minLength = Math.min(t2[2].length, t5); + for (i = 0; i < minLength; ++i) + t1._environment.setLocalVariable$3(declaredArguments[i].name, t2[2][i], t2[3][i]); + for (i = t2[2].length; i < t5; ++i) { + argument = declaredArguments[i]; + t6 = t2[0]; + t7 = argument.name; + value = t6.remove$1(0, t7); + if (value == null) { + t6 = argument.defaultValue; + value = t1._withoutSlash$2(t6.accept$1(t1), t1._expressionNode$1(t6)); + } + t6 = t1._environment; + t8 = t2[1].$index(0, t7); + if (t8 == null) { + t8 = argument.defaultValue; + t8.toString; + t8 = t1._expressionNode$1(t8); + } + t6.setLocalVariable$3(t7, value, t8); + } + restArgument = t3.restArgument; + if (restArgument != null) { + t6 = t2[2]; + rest = t6.length > t5 ? B.JSArray_methods.sublist$1(t6, t5) : B.List_empty8; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$(rest, t5, t6 === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : t6); + t1._environment.setLocalVariable$3(restArgument, argumentList, t4); + } else + argumentList = null; + result = _this.run.call$0(); + if (argumentList == null) + return result; + t5 = t2[0].__js_helper$_length; + if (t5 === 0) + return result; + if (argumentList._wereKeywordsAccessed) + return result; + argumentWord = A.pluralize("argument", t5, null); + t2 = t2[0]; + t5 = A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + argumentWord + " named " + A.toSentence(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t2, t5), new A._EvaluateVisitor__runUserDefinedCallable____closure(), t5._eval$1("Iterable.E"), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate$_stackTrace$1(t4.get$span(t4)), null)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure.prototype = { + call$0() { + var t1, t2, t3, t4, _i, $returnValue; + for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { + $returnValue = t2[_i].accept$1(t4); + if ($returnValue instanceof A.Value) + return $returnValue; + } + throw A.wrapException(t4._evaluate$_exception$2("Function finished without @return.", t1.span)); + }, + $signature: 36 + }; + A._EvaluateVisitor__runBuiltInCallable_closure.prototype = { + call$0() { + return this._box_0.overload.verify$2(this.evaluated._values[2].length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure0.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 36 + }; + A._EvaluateVisitor__runBuiltInCallable_closure1.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure.prototype = { + call$1(value) { + return value; + }, + $signature: 44 + }; + A._EvaluateVisitor__evaluateArguments_closure0.prototype = { + call$1(value) { + return this.$this._withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 44 + }; + A._EvaluateVisitor__evaluateArguments_closure1.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 103 + }; + A._EvaluateVisitor__evaluateArguments_closure2.prototype = { + call$1(value) { + return value; + }, + $signature: 44 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(value, t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure0.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(this.$this._withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure1.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 103 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure2.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression(this.$this._withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__addRestMap_closure.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString) + _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 88 + }; + A._EvaluateVisitor__verifyArguments_closure.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssMediaRule_closure.prototype = { + call$1(mediaQueries) { + return this.$this._mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 85 + }; + A._EvaluateVisitor_visitCssMediaRule_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.node.queries; + t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule__closure.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule___closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure1.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssStyleRule_closure0.prototype = { + call$0() { + var t1 = this.$this; + t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule__closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluateVisitor__performInterpolationHelper_closure.prototype = { + call$1(targetLocations) { + return A.InterpolationMap$(this.interpolation, targetLocations); + }, + $signature: 183 + }; + A._EvaluateVisitor__serialize_closure.prototype = { + call$0() { + return A.serializeValue(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 141 + }; + A._EvaluateVisitor__withoutSlash_recommendation.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 185 + }; + A._EvaluateVisitor__stackFrame_closure.prototype = { + call$1(url) { + var t1 = this.$this._evaluate$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 48 + }; + A._ImportedCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure(); + this._visitor._addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._visitor._addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._visitor; + if (t1._assertInModule$2(t1.__parent, "__parent") !== t1._assertInModule$2(t1.__root, "_root")) + t1._addChild$1(node); + else if (t1._assertInModule$2(t1.__endOfImports, _s13_) === J.get$length$asx(t1._assertInModule$2(t1.__root, "_root").children._collection$_source)) { + t1._addChild$1(node); + t1.__endOfImports = t1._assertInModule$2(t1.__endOfImports, _s13_) + 1; + } else { + t2 = t1._outOfOrderImports; + (t2 == null ? t1._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._visitor, + mediaQueries = t1._mediaQueries; + t1._addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure(mediaQueries == null || t1._mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule; + else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 8 + }; + A._EvaluationContext.prototype = { + get$currentCallableSpan() { + var _0_0 = this._visitor._callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._visitor, + t2 = t1._importSpan; + if (t2 == null) { + t2 = t1._callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + if (t2 == null) { + t2 = this._defaultWarnNodeWithSpan; + t2 = t2.get$span(t2); + } + t1._warn$3(message, t2, deprecation); + }, + $isEvaluationContext: 1 + }; + A.EveryCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure(this)); + }, + visitCssComment$1(node) { + return false; + }, + visitCssDeclaration$1(node) { + return false; + }, + visitCssImport$1(node) { + return false; + }, + visitCssKeyframeBlock$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure(this)); + }, + visitCssMediaRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure(this)); + }, + visitCssStyleRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure(this)); + }, + visitCssStylesheet$1(node) { + return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure(this)); + }, + visitCssSupportsRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure(this)); + } + }; + A.EveryCssVisitor_visitCssAtRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssKeyframeBlock_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssMediaRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssStyleRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssStylesheet_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssSupportsRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A._MakeExpressionCalculationSafe.prototype = { + visitBinaryOperationExpression$1(_, node) { + var t1, t2, t3, t4; + if (node.operator === B.BinaryOperator_KNx) { + t1 = A._setArrayType([node], type$.JSArray_Expression); + t2 = node.get$span(0); + t3 = type$.Expression; + t1 = A.List_List$unmodifiable(t1, t3); + t3 = A.ConstantMap_ConstantMap$from(B.Map_empty6, type$.String, t3); + t4 = node.get$span(0); + t1 = new A.FunctionExpression("math", A.stringReplaceAllUnchecked("max", "_", "-"), "max", new A.ArgumentInvocation(t1, t3, null, null, t2), t4); + } else + t1 = this.super$ReplaceExpressionVisitor$visitBinaryOperationExpression(0, node); + return t1; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return node; + }, + visitUnaryOperationExpression$1(_, node) { + var t1, + _0_0 = node.operator; + $label0$0: { + if (B.UnaryOperator_cLp === _0_0) { + t1 = node.operand; + break $label0$0; + } + if (B.UnaryOperator_AiQ === _0_0) { + t1 = new A.BinaryOperationExpression(B.BinaryOperator_2No, new A.NumberExpression(-1, null, node.span), node.operand, false); + break $label0$0; + } + t1 = this.super$ReplaceExpressionVisitor$visitUnaryOperationExpression(0, node); + break $label0$0; + } + return t1; + } + }; + A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor.prototype = {}; + A._FindDependenciesVisitor.prototype = { + visitEachRule$1(_, node) { + }, + visitForRule$1(_, node) { + }, + visitIfRule$1(_, node) { + }, + visitWhileRule$1(_, node) { + }, + visitUseRule$1(_, node) { + var t1 = node.url; + if (t1.get$scheme() !== "sass") + this._find_dependencies$_uses.add$1(0, t1); + else if (t1.toString$0(0) === "sass:meta") + this._metaNamespaces.add$1(0, node.namespace); + }, + visitForwardRule$1(_, node) { + var t1 = node.url; + if (t1.get$scheme() !== "sass") + this._find_dependencies$_forwards.add$1(0, t1); + }, + visitImportRule$1(_, node) { + var t1, t2, t3, _i, $import; + for (t1 = node.imports, t2 = t1.length, t3 = this._imports, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport) + t3.add$1(0, A.Uri_parse($import.urlString)); + } + }, + visitIncludeRule$1(_, node) { + var url, _0_0, _0_4_isSet, _0_4, _0_7, t1, _0_40, t2, _0_7_isSet, url0, exception, _null = null; + if (node.name !== "load-css") + return; + if (!this._metaNamespaces.contains$1(0, node.namespace)) + return; + _0_0 = node.$arguments.positional; + url = null; + _0_4_isSet = _0_0.length === 1; + _0_4 = _null; + _0_7 = _null; + t1 = false; + if (_0_4_isSet) { + _0_40 = _0_0[0]; + t2 = _0_40; + _0_4 = t2; + _0_7_isSet = t2 instanceof A.StringExpression; + if (_0_7_isSet) { + type$.StringExpression._as(_0_4); + _0_7 = _0_4.text.get$asPlain(); + t1 = _0_7; + t1 = t1 != null; + } + } else + _0_7_isSet = false; + if (t1) { + if (_0_7_isSet) + url0 = _0_7; + else { + t1 = _0_4_isSet ? _0_4 : _0_0[0]; + _0_7 = type$.StringExpression._as(t1).text.get$asPlain(); + url0 = _0_7; + } + url = url0 == null ? A._asString(url0) : url0; + try { + this._metaLoadCss.add$1(0, A.Uri_parse(url)); + } catch (exception) { + if (!type$.FormatException._is(A.unwrapException(exception))) + throw exception; + } + } + } + }; + A.DependencyReport.prototype = {}; + A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor.prototype = {}; + A.RecursiveStatementVisitor.prototype = { + visitAtRootRule$1(_, node) { + this.visitChildren$1(node.children); + }, + visitAtRule$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(_, node) { + return null; + }, + visitContentRule$1(_, node) { + }, + visitDebugRule$1(_, node) { + }, + visitDeclaration$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitEachRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(_, node) { + }, + visitExtendRule$1(_, node) { + }, + visitForRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(_, node) { + }, + visitFunctionRule$1(_, node) { + return null; + }, + visitIfRule$1(_, node) { + var t1, t2, _i, t3, t4, _i0, _0_0; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) + for (t3 = t1[_i].children, t4 = t3.length, _i0 = 0; _i0 < t4; ++_i0) + t3[_i0].accept$1(this); + _0_0 = node.lastClause; + if (_0_0 != null) + for (t1 = _0_0.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + }, + visitImportRule$1(_, node) { + }, + visitIncludeRule$1(_, node) { + return A.NullableExtension_andThen(node.content, this.get$visitContentBlock(this)); + }, + visitLoudComment$1(_, node) { + }, + visitMediaRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(_, node) { + return null; + }, + visitReturnRule$1(_, node) { + }, + visitSilentComment$1(_, node) { + }, + visitStyleRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(_, node) { + }, + visitVariableDeclaration$1(_, node) { + }, + visitWarnRule$1(_, node) { + }, + visitWhileRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + var t1; + for (t1 = J.get$iterator$ax(children); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + } + }; + A.ReplaceExpressionVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + return new A.BinaryOperationExpression(node.operator, node.left.accept$1(this), node.right.accept$1(this), false); + }, + visitBooleanExpression$1(_, node) { + return node; + }, + visitColorExpression$1(_, node) { + return node; + }, + visitFunctionExpression$1(_, node) { + var t1 = node.originalName, + t2 = this.visitArgumentInvocation$1(node.$arguments); + return new A.FunctionExpression(node.namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, node.span); + }, + visitInterpolatedFunctionExpression$1(_, node) { + return new A.InterpolatedFunctionExpression(this.visitInterpolation$1(node.name), this.visitArgumentInvocation$1(node.$arguments), node.span); + }, + visitIfExpression$1(_, node) { + return new A.IfExpression(this.visitArgumentInvocation$1(node.$arguments), node.span); + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return new A.ListExpression(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitListExpression_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression>")), type$.Expression), node.separator, node.hasBrackets, node.span); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, key, value, + t1 = A._setArrayType([], type$.JSArray_Record_2_Expression_and_Expression); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + value = t4._1; + t1.push(new A._Record_2(key.accept$1(this), value.accept$1(this))); + } + return new A.MapExpression(A.List_List$unmodifiable(t1, type$.Record_2_Expression_and_Expression), node.span); + }, + visitNullExpression$1(_, node) { + return node; + }, + visitNumberExpression$1(_, node) { + return node; + }, + visitParenthesizedExpression$1(_, node) { + return new A.ParenthesizedExpression(node.expression.accept$1(this), node.span); + }, + visitSelectorExpression$1(_, node) { + return node; + }, + visitStringExpression$1(_, node) { + return new A.StringExpression(this.visitInterpolation$1(node.text), node.hasQuotes); + }, + visitSupportsExpression$1(_, node) { + return new A.SupportsExpression(this.visitSupportsCondition$1(node.condition)); + }, + visitUnaryOperationExpression$1(_, node) { + return new A.UnaryOperationExpression(node.operator, node.operand.accept$1(this), node.span); + }, + visitValueExpression$1(_, node) { + return node; + }, + visitVariableExpression$1(_, node) { + return node; + }, + visitArgumentInvocation$1(invocation) { + var t5, t6, _this = this, + t1 = invocation.positional, + t2 = type$.String, + t3 = type$.Expression, + t4 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + for (t5 = A.MapExtensions_get_pairs(invocation.named, t2, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { + t6 = t5.get$current(t5); + t4.$indexSet(0, t6._0, t6._1.accept$1(_this)); + } + t5 = invocation.rest; + t5 = t5 == null ? null : t5.accept$1(_this); + t6 = invocation.keywordRest; + t6 = t6 == null ? null : t6.accept$1(_this); + return new A.ArgumentInvocation(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitArgumentInvocation_closure(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression>")), t3), A.ConstantMap_ConstantMap$from(t4, t2, t3), t5, t6, invocation.span); + }, + visitSupportsCondition$1(condition) { + var _this = this; + if (condition instanceof A.SupportsOperation) + return A.SupportsOperation$(_this.visitSupportsCondition$1(condition.left), _this.visitSupportsCondition$1(condition.right), condition.operator, condition.span); + else if (condition instanceof A.SupportsNegation) + return new A.SupportsNegation(_this.visitSupportsCondition$1(condition.condition), condition.span); + else if (condition instanceof A.SupportsInterpolation) + return new A.SupportsInterpolation(condition.expression.accept$1(_this), condition.span); + else if (condition instanceof A.SupportsDeclaration) + return new A.SupportsDeclaration(condition.name.accept$1(_this), condition.value.accept$1(_this), condition.span); + else + throw A.wrapException(A.SassException$("BUG: Unknown SupportsCondition " + condition.toString$0(0) + ".", condition.get$span(condition), null)); + }, + visitInterpolation$1(interpolation) { + var t1 = interpolation.contents; + return A.Interpolation$(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitInterpolation_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>")), interpolation.span); + } + }; + A.ReplaceExpressionVisitor_visitListExpression_closure.prototype = { + call$1(item) { + return item.accept$1(this.$this); + }, + $signature: 189 + }; + A.ReplaceExpressionVisitor_visitArgumentInvocation_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 189 + }; + A.ReplaceExpressionVisitor_visitInterpolation_closure.prototype = { + call$1(node) { + return node instanceof A.Expression ? node.accept$1(this.$this) : node; + }, + $signature: 77 + }; + A.SelectorSearchVisitor.prototype = { + visitAttributeSelector$1(attribute) { + return null; + }, + visitClassSelector$1(klass) { + return null; + }, + visitIDSelector$1(id) { + return null; + }, + visitParentSelector$1(placeholder) { + return null; + }, + visitPlaceholderSelector$1(placeholder) { + return null; + }, + visitTypeSelector$1(type) { + return null; + }, + visitUniversalSelector$1(universal) { + return null; + }, + visitComplexSelector$1(complex) { + return A.IterableExtension_search(complex.components, new A.SelectorSearchVisitor_visitComplexSelector_closure(this)); + }, + visitCompoundSelector$1(compound) { + return A.IterableExtension_search(compound.components, new A.SelectorSearchVisitor_visitCompoundSelector_closure(this)); + }, + visitPseudoSelector$1(pseudo) { + return A.NullableExtension_andThen(pseudo.selector, this.get$visitSelectorList()); + }, + visitSelectorList$1(list) { + return A.IterableExtension_search(list.components, this.get$visitComplexSelector()); + } + }; + A.SelectorSearchVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor.T?(ComplexSelectorComponent)"); + } + }; + A.SelectorSearchVisitor_visitCompoundSelector_closure.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor.T?(SimpleSelector)"); + } + }; + A.serialize_closure.prototype = { + call$1(codeUnit) { + return codeUnit > 127; + }, + $signature: 50 + }; + A._SerializeVisitor.prototype = { + visitCssStylesheet$1(node) { + var t1, t2, t3, t4, t5, t6, previous, previous0, t7, _this = this; + for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._inspect, t3 = _this._style === B.OutputStyle_1, t4 = !t3, t5 = type$.CssParentNode, t6 = _this._serialize$_buffer, previous = null; t1.moveNext$0();) { + previous0 = t1.get$current(t1); + if (t2) + t7 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); + else + t7 = false; + if (t7) + continue; + if (previous != null) { + if (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) + t6.writeCharCode$1(59); + if (_this._isTrailingComment$2(previous0, previous)) { + if (t4) + t6.writeCharCode$1(32); + } else { + if (t4) + t6.write$1(0, "\n"); + if (previous.get$isGroupEnd()) + if (t4) + t6.write$1(0, "\n"); + } + } + previous0.accept$1(_this); + previous = previous0; + } + if (previous != null) + t1 = (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) && t4; + else + t1 = false; + if (t1) + t6.writeCharCode$1(59); + }, + visitCssComment$1(node) { + this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure(this, node)); + }, + visitCssAtRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure(_this, node)); + if (!node.isChildless) { + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + } + }, + visitCssMediaRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssImport$1(node) { + this._writeIndentation$0(); + this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure(this, node)); + }, + _writeImportUrl$1(url) { + var urlContents, maybeQuote, _this = this; + if (_this._style !== B.OutputStyle_1 || url.charCodeAt(0) !== 117) { + _this._serialize$_buffer.write$1(0, url); + return; + } + urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); + maybeQuote = urlContents.charCodeAt(0); + if (maybeQuote === 39 || maybeQuote === 34) + _this._serialize$_buffer.write$1(0, urlContents); + else + _this._visitQuotedString$1(urlContents); + }, + visitCssKeyframeBlock$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + _visitMediaQuery$1(query) { + var t1, _1_0, _2_0, condition, operator, t2, _this = this, + _0_0 = query.modifier; + if (_0_0 != null) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(32); + } + _1_0 = query.type; + if (_1_0 != null) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _1_0); + if (query.conditions.length !== 0) + t1.write$1(0, " and "); + } + _2_0 = query.conditions; + if (_2_0.length === 1) + t1 = B.JSString_methods.startsWith$1(_2_0[0], "(not "); + else + t1 = false; + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, "not "); + condition = B.JSArray_methods.get$first(_2_0); + t1.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); + } else { + operator = query.conjunction ? "and" : "or"; + t1 = _this._style === B.OutputStyle_1 ? operator + " " : " " + operator + " "; + t2 = _this._serialize$_buffer; + _this._writeBetween$3(_2_0, t1, t2.get$write(t2)); + } + }, + visitCssStyleRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node._style_rule$_selector._box$_inner.value.span, new A._SerializeVisitor_visitCssStyleRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssSupportsRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssDeclaration$1(node) { + var error, stackTrace, error0, stackTrace0, t3, declSpecificities, t4, t5, t6, t7, _i, rule, ruleSpecificities, exception, _this = this, + t1 = node.interleavedRules, + t2 = t1.length; + if (t2 !== 0) { + t3 = node._parent; + t3.toString; + declSpecificities = _this._specificities$1(t3); + for (t3 = _this._serialize$_logger, t4 = node.span, t5 = type$.SourceSpan, t6 = type$.String, t7 = node.trace, _i = 0; _i < t2; ++_i) { + rule = t1[_i]; + ruleSpecificities = _this._specificities$1(rule); + if (!declSpecificities.any$1(0, ruleSpecificities.get$contains(ruleSpecificities))) + continue; + A.WarnForDeprecation_warnForDeprecation(t3, B.Deprecation_gf0, string$.Sassx27s, new A.MultiSpan(t4, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.span, "nested rule"], t5, t6), t5, t6)), t7); + } + } + _this._writeIndentation$0(); + t1 = node.name; + _this._serialize$_write$1(t1); + t2 = _this._serialize$_buffer; + t2.writeCharCode$1(58); + if (J.startsWith$1$s(t1.value, "--") && node.parsedAsCustomProperty) + t2.forSpan$2(node.value.span, new A._SerializeVisitor_visitCssDeclaration_closure(_this, node)); + else { + if (_this._style !== B.OutputStyle_1) + t2.writeCharCode$1(32); + try { + t2.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure0(_this, node)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(A.MultiSpanSassException$(error.message, node.value.span, error.primaryLabel, error.secondarySpans, null), error, stackTrace); + } else if (t1 instanceof A.SassScriptException) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = error0.message; + A.throwWithTrace(new A.SassException(B.Set_empty, t1, node.value.span), error0, stackTrace0); + } else + throw exception; + } + } + }, + _specificities$1(node) { + var $parent, t2, t3, _i, + t1 = this.get$_specificities(); + if (node instanceof A.ModifiableCssStyleRule) { + t1 = A.NullableExtension_andThen(node._parent, t1); + $parent = t1 == null ? null : A.IterableIntegerExtension_get_max(t1); + if ($parent == null) + $parent = 0; + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.int); + for (t2 = node._style_rule$_selector._box$_inner.value.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.add$1(0, $parent + t2[_i].get$specificity()); + return t1; + } else { + t1 = A.NullableExtension_andThen(node.get$parent(node), t1); + return t1 == null ? B.Set_0 : t1; + } + }, + _writeFoldedValue$1(node) { + var t1, t2, next, t3, + scanner = A.StringScanner$(type$.SassString._as(node.value.value)._string$_text, null, null); + for (t1 = scanner.string.length, t2 = this._serialize$_buffer; scanner._string_scanner$_position !== t1;) { + next = scanner.readChar$0(); + if (next !== 10) { + t2.writeCharCode$1(next); + continue; + } + t2.writeCharCode$1(32); + while (true) { + t3 = scanner.peekChar$0(); + if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) + break; + scanner.readChar$0(); + } + } + }, + _writeReindentedValue$1(node) { + var _0_0, t1, _this = this, + value = type$.SassString._as(node.value.value)._string$_text; + $label0$0: { + _0_0 = _this._minimumIndentation$1(value); + if (_0_0 == null) { + _this._serialize$_buffer.write$1(0, value); + break $label0$0; + } + if (-1 === _0_0) { + t1 = _this._serialize$_buffer; + t1.write$1(0, A.trimAsciiRight(value, true)); + t1.writeCharCode$1(32); + break $label0$0; + } + t1 = node.name.span; + t1 = t1.get$start(t1); + _this._writeWithIndent$2(value, Math.min(_0_0, t1.file.getColumn$1(t1.offset))); + } + }, + _minimumIndentation$1(text) { + var character, t2, min, next, min0, + scanner = A.LineScanner$(text), + t1 = scanner.string.length; + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + if (scanner._string_scanner$_position === t1) + return scanner.peekChar$1(-1) === 10 ? -1 : null; + for (min = null; scanner._string_scanner$_position !== t1;) { + for (; scanner._string_scanner$_position !== t1;) { + next = scanner.peekChar$0(); + if (next !== 32 && next !== 9) + break; + scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); + } + if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) + continue; + min0 = scanner._line_scanner$_column; + min = min == null ? min0 : Math.min(min, min0); + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + } + return min == null ? -1 : min; + }, + _writeWithIndent$2(text, minimumIndentation) { + var t1, t2, t3, character, lineStart, newlines, end, + scanner = A.LineScanner$(text); + for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize$_buffer; scanner._string_scanner$_position !== t2;) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + for (; true;) { + lineStart = scanner._string_scanner$_position; + for (newlines = 1; true;) { + if (scanner._string_scanner$_position === t2) { + t3.writeCharCode$1(32); + return; + } + $label0$2: { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (32 === character || 9 === character) + continue; + if (10 === character) { + lineStart = scanner._string_scanner$_position; + ++newlines; + break $label0$2; + } + break; + } + } + this._writeTimes$2(10, newlines); + this._writeIndentation$0(); + end = scanner._string_scanner$_position; + t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); + for (; true;) { + if (scanner._string_scanner$_position === t2) + return; + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + } + }, + visitCalculation$1(value) { + var t2, _this = this, + t1 = _this._serialize$_buffer; + t1.write$1(0, value.name); + t1.writeCharCode$1(40); + t2 = _this._style === B.OutputStyle_1 ? "," : ", "; + _this._writeBetween$3(value.$arguments, t2, _this.get$_writeCalculationValue()); + t1.writeCharCode$1(41); + }, + _writeCalculationValue$1(value) { + var _2_4_isSet, _2_4, t1, _0_0, _1_0, first, rest, left, right, operator, parenthesizeLeft, operatorWhitespace, parenthesizeRight, t2, _this = this, _null = null; + $label1$1: { + _2_4_isSet = value instanceof A.SassNumber; + if (_2_4_isSet) { + _2_4 = value.get$hasComplexUnits(); + t1 = _2_4 && !_this._inspect; + } else { + _2_4 = _null; + t1 = false; + } + if (t1) + throw A.wrapException(A.SassScriptException$(A.S(value) + " isn't a valid CSS value.", _null)); + if (_2_4_isSet && !isFinite(value._number$_value)) { + $label0$0: { + _0_0 = value._number$_value; + if (1 / 0 === _0_0) { + _this._serialize$_buffer.write$1(0, "infinity"); + break $label0$0; + } + if (-1 / 0 === _0_0) { + _this._serialize$_buffer.write$1(0, "-infinity"); + break $label0$0; + } + if (isNaN(_0_0)) + _this._serialize$_buffer.write$1(0, "NaN"); + } + t1 = J.getInterceptor$x(value); + _this._writeCalculationUnits$2(t1.get$numeratorUnits(value), t1.get$denominatorUnits(value)); + break $label1$1; + } + if (_2_4_isSet) + t1 = _2_4; + else + t1 = false; + if (t1) { + _this._writeNumber$1(value._number$_value); + t1 = J.getInterceptor$x(value); + _1_0 = t1.get$numeratorUnits(value); + if (_1_0.length >= 1) { + first = _1_0[0]; + rest = B.JSArray_methods.sublist$1(_1_0, 1); + _this._serialize$_buffer.write$1(0, first); + _this._writeCalculationUnits$2(rest, t1.get$denominatorUnits(value)); + } else + _this._writeCalculationUnits$2(A._setArrayType([], type$.JSArray_String), t1.get$denominatorUnits(value)); + break $label1$1; + } + if (value instanceof A.Value) { + value.accept$1(_this); + break $label1$1; + } + t1 = value instanceof A.CalculationOperation; + left = _null; + right = _null; + if (t1) { + operator = value._operator; + left = value._left; + right = value._right; + right = right; + } else + operator = _null; + if (t1) { + parenthesizeLeft = left instanceof A.CalculationOperation && left._operator.precedence < operator.precedence; + if (parenthesizeLeft) + _this._serialize$_buffer.writeCharCode$1(40); + _this._writeCalculationValue$1(left); + if (parenthesizeLeft) + _this._serialize$_buffer.writeCharCode$1(41); + operatorWhitespace = _this._style !== B.OutputStyle_1 || operator.precedence === 1; + if (operatorWhitespace) + _this._serialize$_buffer.writeCharCode$1(32); + t1 = _this._serialize$_buffer; + t1.write$1(0, operator.operator); + if (operatorWhitespace) + t1.writeCharCode$1(32); + if (!(right instanceof A.CalculationOperation && _this._parenthesizeCalculationRhs$2(operator, right._operator))) { + parenthesizeRight = false; + if (operator === B.CalculationOperator_Qf1) { + if (right instanceof A.SassNumber) + t2 = isFinite(right._number$_value) ? right.get$hasComplexUnits() : right.get$hasUnits(); + else + t2 = parenthesizeRight; + parenthesizeRight = t2; + } + } else + parenthesizeRight = true; + if (parenthesizeRight) + t1.writeCharCode$1(40); + _this._writeCalculationValue$1(right); + if (parenthesizeRight) + t1.writeCharCode$1(41); + } + } + }, + _writeCalculationUnits$2(numeratorUnits, denominatorUnits) { + var t1, t2, t3, t4; + for (t1 = J.get$iterator$ax(numeratorUnits), t2 = this._serialize$_buffer, t3 = this._style !== B.OutputStyle_1; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(42); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + for (t1 = J.get$iterator$ax(denominatorUnits); t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(47); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + }, + _parenthesizeCalculationRhs$2(outer, right) { + var t1; + $label0$0: { + if (B.CalculationOperator_Qf1 === outer) { + t1 = true; + break $label0$0; + } + if (B.CalculationOperator_g2q === outer) { + t1 = false; + break $label0$0; + } + t1 = right === B.CalculationOperator_g2q || right === B.CalculationOperator_CxF; + break $label0$0; + } + return t1; + }, + visitColor$1(value) { + var _0_0, _0_2, _0_6, t1, _0_4, _0_6_isSet, t2, _0_10_isSet, _0_10, _0_12_isSet, _0_14, _0_12, _0_14_isSet, t3, _0_10_isSet0, polar, t4, t5, _this = this, _null = null; + $label0$0: { + _0_0 = value._space; + _0_2 = B.RgbColorSpace_mlz === _0_0; + _0_6 = _null; + t1 = true; + if (!_0_2) { + _0_4 = B.HslColorSpace_gsm === _0_0; + _0_6_isSet = !_0_4; + if (_0_6_isSet) { + _0_6 = B.HwbColorSpace_06z === _0_0; + t1 = _0_6; + } + } else { + _0_4 = _null; + _0_6_isSet = false; + } + if (t1 && value.channel0OrNull != null && value.channel1OrNull != null && value.channel2OrNull != null && value.alphaOrNull != null) { + _this._writeLegacyColor$1(value); + break $label0$0; + } + if (_0_2) { + t1 = _this._serialize$_buffer; + t1.write$1(0, "rgb("); + _this._writeChannel$1(value.channel0OrNull); + t1.writeCharCode$1(32); + _this._writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + _this._writeChannel$1(value.channel2OrNull); + _this._maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + if (!_0_4) + t1 = _0_6_isSet ? _0_6 : B.HwbColorSpace_06z === _0_0; + else + t1 = true; + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _this._style === B.OutputStyle_1 ? _null : "deg"; + _this._writeChannel$2(value.channel0OrNull, t2); + t1.writeCharCode$1(32); + _this._writeChannel$2(value.channel1OrNull, "%"); + t1.writeCharCode$1(32); + _this._writeChannel$2(value.channel2OrNull, "%"); + _this._maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _0_10_isSet = B.LabColorSpace_IF2 !== _0_0; + if (_0_10_isSet) { + _0_10 = B.LchColorSpace_wv8 === _0_0; + t1 = _0_10; + } else { + _0_10 = _null; + t1 = true; + } + t2 = false; + if (t1) + if (!_this._inspect) { + t1 = value.channel0OrNull; + if (t1 == null) + t1 = 0; + if (t1 > 0 || A.fuzzyEquals(t1, 0)) + t1 = t1 < 100 || A.fuzzyEquals(t1, 100); + else + t1 = false; + t1 = !t1 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t1 = t2; + else + t1 = t2; + _0_12_isSet = !t1; + _0_14 = _null; + if (_0_12_isSet) { + _0_12 = B.OklabColorSpace_yrt === _0_0; + t1 = false; + _0_14_isSet = !_0_12; + if (_0_14_isSet) { + _0_14 = B.OklchColorSpace_li8 === _0_0; + t2 = _0_14; + } else + t2 = true; + t3 = false; + if (t2) + if (!_this._inspect) { + t2 = value.channel0OrNull; + if (t2 == null) + t2 = 0; + if (t2 > 0 || A.fuzzyEquals(t2, 0)) + t2 = t2 < 1 || A.fuzzyEquals(t2, 1); + else + t2 = false; + t2 = !t2 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t2 = t3; + else + t2 = t3; + if (!t2) { + if (_0_10_isSet) { + t2 = _0_10; + _0_10_isSet0 = _0_10_isSet; + } else { + _0_10 = B.LchColorSpace_wv8 === _0_0; + t2 = _0_10; + _0_10_isSet0 = true; + } + if (!t2) + if (_0_14_isSet) + t2 = _0_14; + else { + _0_14 = B.OklchColorSpace_li8 === _0_0; + t2 = _0_14; + _0_14_isSet = true; + } + else + t2 = true; + if (t2) + if (!_this._inspect) { + t1 = value.channel1OrNull; + t2 = t1 == null; + if (t2) + t1 = 0; + t1 = t1 < 0 && !A.fuzzyEquals(t1, 0) && value.channel0OrNull != null && !t2; + } + } else { + _0_10_isSet0 = _0_10_isSet; + t1 = true; + } + } else { + _0_12 = _null; + _0_10_isSet0 = _0_10_isSet; + _0_14_isSet = false; + t1 = true; + } + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, "color-mix(in "); + t1.write$1(0, _0_0); + t2 = _this._style === B.OutputStyle_1; + t1.write$1(0, t2 ? "," : ", "); + _this._writeColorFunction$1(value.toSpace$1(B.XyzD65ColorSpace_4CA)); + if (!t2) + t1.writeCharCode$1(32); + t1.write$1(0, "100%"); + t1.write$1(0, t2 ? "," : ", "); + t1.write$1(0, t2 ? "red" : "black"); + t1.writeCharCode$1(41); + break $label0$0; + } + t1 = true; + if (_0_10_isSet) + if (!(_0_12_isSet ? _0_12 : B.OklabColorSpace_yrt === _0_0)) + if (!(_0_10_isSet0 ? _0_10 : B.LchColorSpace_wv8 === _0_0)) + t1 = _0_14_isSet ? _0_14 : B.OklchColorSpace_li8 === _0_0; + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _0_0._channels; + polar = t2[2].isPolarAngle; + t3 = false; + if (!_this._inspect) { + t4 = value.channel0OrNull; + if (t4 == null) + t4 = 0; + if (t4 > 0 || A.fuzzyEquals(t4, 0)) + t4 = t4 < 100 || A.fuzzyEquals(t4, 100); + else + t4 = false; + if (t4) { + if (polar) { + t3 = value.channel1OrNull; + if (t3 == null) + t3 = 0; + t3 = t3 < 0 && !A.fuzzyEquals(t3, 0); + } + } else + t3 = true; + } + if (t3) { + t1.write$1(0, "from "); + t1.write$1(0, _this._style === B.OutputStyle_1 ? "red" : "black"); + t1.writeCharCode$1(32); + } + t3 = _this._style !== B.OutputStyle_1; + t4 = t3 && value.channel0OrNull != null; + t5 = value.channel0OrNull; + if (t4) { + t2 = type$.LinearChannel._as(t2[0]); + _this._writeNumber$1((t5 == null ? 0 : t5) * 100 / t2.max); + t1.writeCharCode$1(37); + } else + _this._writeChannel$1(t5); + t1.writeCharCode$1(32); + _this._writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + t2 = polar && t3 ? "deg" : _null; + _this._writeChannel$2(value.channel2OrNull, t2); + _this._maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _this._writeColorFunction$1(value); + } + }, + _writeChannel$2(channel, unit) { + var _this = this; + if (channel == null) + _this._serialize$_buffer.write$1(0, "none"); + else if (isFinite(channel)) { + _this._writeNumber$1(channel); + if (unit != null) + _this._serialize$_buffer.write$1(0, unit); + } else + _this.visitNumber$1(A.SassNumber_SassNumber(channel, unit)); + }, + _writeChannel$1(channel) { + return this._writeChannel$2(channel, null); + }, + _writeLegacyColor$1(color) { + var rgb, t3, red, green, blue, hsl, hue, saturation, lightness, hwb, _0_0, format, _1_0, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals(t2 ? 0 : t1, 1); + if (!color.get$isInGamut() && !_this._inspect) { + _this._writeHsl$1(color); + return; + } + if (_this._style === B.OutputStyle_1) { + rgb = color.toSpace$1(B.RgbColorSpace_mlz); + if (opaque && _this._tryIntegerRgb$1(rgb)) + return; + t3 = rgb.channel0OrNull; + red = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel1OrNull; + green = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel2OrNull; + blue = _this._writeNumberToString$1(t3 == null ? 0 : t3); + hsl = color.toSpace$1(B.HslColorSpace_gsm); + t3 = hsl.channel0OrNull; + hue = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel1OrNull; + saturation = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel2OrNull; + lightness = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = _this._serialize$_buffer; + if (red.length + green.length + blue.length <= hue.length + saturation.length + lightness.length + 2) { + t3.write$1(0, opaque ? "rgb(" : "rgba("); + t3.write$1(0, red); + t3.writeCharCode$1(44); + t3.write$1(0, green); + t3.writeCharCode$1(44); + t3.write$1(0, blue); + } else { + t3.write$1(0, opaque ? "hsl(" : "hsla("); + t3.write$1(0, hue); + t3.writeCharCode$1(44); + t3.write$1(0, saturation); + t3.write$1(0, "%,"); + t3.write$1(0, lightness); + t3.writeCharCode$1(37); + } + if (!opaque) { + t3.writeCharCode$1(44); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + t3 = color._space; + if (t3 === B.HslColorSpace_gsm) { + _this._writeHsl$1(color); + return; + } else if (_this._inspect && t3 === B.HwbColorSpace_06z) { + t3 = _this._serialize$_buffer; + t3.write$1(0, "hwb("); + hwb = color.toSpace$1(B.HwbColorSpace_06z); + _this._writeNumber$1(hwb.channel$1(0, "hue")); + t3.writeCharCode$1(32); + _this._writeNumber$1(hwb.channel$1(0, "whiteness")); + t3.writeCharCode$1(37); + t3.writeCharCode$1(32); + _this._writeNumber$1(hwb.channel$1(0, "blackness")); + t3.writeCharCode$1(37); + if (!A.fuzzyEquals(t2 ? 0 : t1, 1)) { + t3.write$1(0, " / "); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + _0_0 = color.format; + if (B.C__ColorFormatEnum === _0_0) { + _this._writeRgb$1(color); + return; + } + t1 = _0_0 instanceof A.SpanColorFormat; + format = t1 ? _0_0 : null; + if (t1) { + _this._serialize$_buffer.write$1(0, format._color$_span.get$text()); + return; + } + if (opaque) { + rgb = color.toSpace$1(B.RgbColorSpace_mlz); + _1_0 = $.$get$namesByColor().$index(0, rgb); + if (_1_0 != null) { + _this._serialize$_buffer.write$1(0, _1_0); + return; + } + if (_this._canUseHex$1(rgb)) { + _this._serialize$_buffer.writeCharCode$1(35); + t1 = rgb.channel0OrNull; + _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel1OrNull; + _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel2OrNull; + _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + return; + } + } + if (t3 === B.HwbColorSpace_06z) + _this._writeHsl$1(color); + else + _this._writeRgb$1(color); + }, + _tryIntegerRgb$1(rgb) { + var t1, redInt, greenInt, blueInt, shortHex, _0_0, t2, t3, $name, _this = this; + if (!_this._canUseHex$1(rgb)) + return false; + t1 = rgb.channel0OrNull; + redInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel1OrNull; + greenInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel2OrNull; + blueInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = redInt & 15; + shortHex = t1 === B.JSInt_methods._shrOtherPositive$1(redInt, 4) && (greenInt & 15) === B.JSInt_methods._shrOtherPositive$1(greenInt, 4) && (blueInt & 15) === B.JSInt_methods._shrOtherPositive$1(blueInt, 4); + _0_0 = $.$get$namesByColor().$index(0, rgb); + t2 = false; + if (_0_0 != null) { + t3 = _0_0.length; + t2 = t3 <= (shortHex ? 4 : 7); + $name = _0_0; + } else + $name = null; + if (t2) + _this._serialize$_buffer.write$1(0, $name); + else { + t2 = _this._serialize$_buffer; + if (shortHex) { + t2.writeCharCode$1(35); + t2.writeCharCode$1(A.hexCharFor(t1)); + t2.writeCharCode$1(A.hexCharFor(greenInt & 15)); + t2.writeCharCode$1(A.hexCharFor(blueInt & 15)); + } else { + t2.writeCharCode$1(35); + _this._writeHexComponent$1(redInt); + _this._writeHexComponent$1(greenInt); + _this._writeHexComponent$1(blueInt); + } + } + return true; + }, + _canUseHex$1(rgb) { + var t2, + t1 = rgb.channel0OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt(t1)) + t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); + else + t1 = false; + t2 = false; + if (t1) { + t1 = rgb.channel1OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt(t1)) + t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); + else + t1 = false; + if (t1) { + t1 = rgb.channel2OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt(t1)) + t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + return t1; + }, + _writeRgb$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals(t2 ? 0 : t1, 1), + rgb = color.toSpace$1(B.RgbColorSpace_mlz), + t3 = _this._serialize$_buffer; + t3.write$1(0, opaque ? "rgb(" : "rgba("); + _this._writeNumber$1(rgb.channel$1(0, "red")); + t4 = _this._style === B.OutputStyle_1; + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(rgb.channel$1(0, "green")); + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(rgb.channel$1(0, "blue")); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _writeHsl$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals(t2 ? 0 : t1, 1), + hsl = color.toSpace$1(B.HslColorSpace_gsm), + t3 = _this._serialize$_buffer; + t3.write$1(0, opaque ? "hsl(" : "hsla("); + _this._writeChannel$1(hsl.channel$1(0, "hue")); + t4 = _this._style === B.OutputStyle_1; + t3.write$1(0, t4 ? "," : ", "); + _this._writeChannel$2(hsl.channel$1(0, "saturation"), "%"); + t3.write$1(0, t4 ? "," : ", "); + _this._writeChannel$2(hsl.channel$1(0, "lightness"), "%"); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _writeColorFunction$1(color) { + var _this = this, + t1 = _this._serialize$_buffer; + t1.write$1(0, "color("); + t1.write$1(0, color._space); + t1.writeCharCode$1(32); + _this._writeBetween$3(color.get$channelsOrNull(), " ", _this.get$_writeChannel()); + _this._maybeWriteSlashAlpha$1(color); + t1.writeCharCode$1(41); + }, + _writeHexComponent$1(color) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(A.hexCharFor(B.JSInt_methods._shrOtherPositive$1(color, 4))); + t1.writeCharCode$1(A.hexCharFor(color & 15)); + }, + _maybeWriteSlashAlpha$1(color) { + var t2, t3, _this = this, + t1 = color.alphaOrNull; + if (A.fuzzyEquals(t1 == null ? 0 : t1, 1)) + return; + t2 = _this._style !== B.OutputStyle_1; + if (t2) + _this._serialize$_buffer.writeCharCode$1(32); + t3 = _this._serialize$_buffer; + t3.writeCharCode$1(47); + if (t2) + t3.writeCharCode$1(32); + _this._writeChannel$1(t1); + }, + visitList$1(value) { + var t2, singleton, t3, t4, t5, _this = this, + t1 = value._hasBrackets; + if (t1) + _this._serialize$_buffer.writeCharCode$1(91); + else if (value._list$_contents.length === 0) { + if (!_this._inspect) + throw A.wrapException(A.SassScriptException$("() isn't a valid CSS value.", null)); + _this._serialize$_buffer.write$1(0, "()"); + return; + } + t2 = _this._inspect; + singleton = false; + if (t2) + if (value._list$_contents.length === 1) { + t3 = value._separator; + t3 = t3 === B.ListSeparator_ECn || t3 === B.ListSeparator_cQA; + singleton = t3; + } + if (singleton && !t1) + _this._serialize$_buffer.writeCharCode$1(40); + t3 = value._list$_contents; + t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); + t4 = value._separator; + t5 = _this._separatorString$1(t4); + _this._writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure0(_this, value) : new A._SerializeVisitor_visitList_closure1(_this)); + if (singleton) { + t2 = _this._serialize$_buffer; + t2.write$1(0, t4.separator); + if (!t1) + t2.writeCharCode$1(41); + } + if (t1) + _this._serialize$_buffer.writeCharCode$1(93); + }, + _separatorString$1(separator) { + var t1; + $label0$0: { + if (B.ListSeparator_ECn === separator) { + t1 = this._style === B.OutputStyle_1 ? "," : ", "; + break $label0$0; + } + if (B.ListSeparator_cQA === separator) { + t1 = this._style === B.OutputStyle_1 ? "/" : " / "; + break $label0$0; + } + if (B.ListSeparator_nbm === separator) { + t1 = " "; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + _elementNeedsParens$2(separator, value) { + var t1; + $label1$1: { + if (value instanceof A.SassList && value._list$_contents.length > 1 && !value._hasBrackets) { + $label0$0: { + if (B.ListSeparator_ECn === separator) { + t1 = value._separator === B.ListSeparator_ECn; + break $label0$0; + } + if (B.ListSeparator_cQA === separator) { + t1 = value._separator; + t1 = t1 === B.ListSeparator_ECn || t1 === B.ListSeparator_cQA; + break $label0$0; + } + t1 = value._separator !== B.ListSeparator_undecided_null_undecided; + break $label0$0; + } + break $label1$1; + } + t1 = false; + break $label1$1; + } + return t1; + }, + visitMap$1(map) { + var t1, t2, _this = this; + if (!_this._inspect) + throw A.wrapException(A.SassScriptException$(map.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(40); + t2 = map._map$_contents; + _this._writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure(_this)); + t1.writeCharCode$1(41); + }, + _writeMapElement$1(value) { + var needsParens = value instanceof A.SassList && value._separator === B.ListSeparator_ECn && !value._hasBrackets; + if (needsParens) + this._serialize$_buffer.writeCharCode$1(40); + value.accept$1(this); + if (needsParens) + this._serialize$_buffer.writeCharCode$1(41); + }, + visitNumber$1(value) { + var before, after, t1, _1_0, _this = this, + _0_0 = value.asSlash; + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_0_0)) { + before = _0_0._0; + after = _0_0._1; + _this.visitNumber$1(before); + _this._serialize$_buffer.writeCharCode$1(47); + _this.visitNumber$1(after); + return; + } + t1 = value._number$_value; + if (!isFinite(t1)) { + _this.visitCalculation$1(new A.SassCalculation("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + return; + } + if (value.get$hasComplexUnits()) { + if (!_this._inspect) + throw A.wrapException(A.SassScriptException$(value.toString$0(0) + " isn't a valid CSS value.", null)); + _this.visitCalculation$1(new A.SassCalculation("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + } else { + _this._writeNumber$1(t1); + _1_0 = value.get$numeratorUnits(value); + if (_1_0.length === 1) + _this._serialize$_buffer.write$1(0, _1_0[0]); + } + }, + _writeNumberToString$1(number) { + var t1 = new A.StringBuffer(""); + this._writeNumber$2(number, new A.NoSourceMapBuffer(t1)); + t1 = t1._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeNumber$2(number, buffer) { + var _0_0, text, _this = this; + if (buffer == null) + buffer = _this._serialize$_buffer; + _0_0 = A.fuzzyAsInt(number); + if (_0_0 != null) { + buffer.write$1(0, _this._removeExponent$1(B.JSInt_methods.toString$0(_0_0))); + return; + } + text = _this._removeExponent$1(B.JSNumber_methods.toString$0(number)); + if (text.length < 12) { + buffer.write$1(0, _this._style === B.OutputStyle_1 && text.charCodeAt(0) === 48 ? B.JSString_methods.substring$1(text, 1) : text); + return; + } + _this._writeRounded$2(text, buffer); + }, + _writeNumber$1(number) { + return this._writeNumber$2(number, null); + }, + _removeExponent$1(text) { + var buffer, t2, t3, additionalZeroes, + negative = text.charCodeAt(0) === 45, + exponent = A._Cell$(), + t1 = text.length, + i = 0; + while (true) { + if (!(i < t1)) { + buffer = null; + break; + } + c$0: { + if (text.charCodeAt(i) !== 101) + break c$0; + buffer = new A.StringBuffer(""); + t2 = buffer._contents = "" + A.Primitives_stringFromCharCode(text.charCodeAt(0)); + if (negative) { + t2 += A.Primitives_stringFromCharCode(text.charCodeAt(1)); + buffer._contents = t2; + if (i > 3) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 3, i); + } else if (i > 2) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 2, i); + exponent.__late_helper$_value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t1), null); + break; + } + ++i; + } + if (buffer == null) + return text; + if (exponent._readLocal$0() > 0) { + t1 = exponent._readLocal$0(); + t2 = buffer._contents; + t3 = negative ? 1 : 0; + additionalZeroes = t1 - (t2.length - 1 - t3); + for (t1 = t2, i = 0; i < additionalZeroes; ++i) { + t1 = A.Primitives_stringFromCharCode(48); + t1 = buffer._contents += t1; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + negative = text.charCodeAt(0) === 45; + t1 = (negative ? "" + A.Primitives_stringFromCharCode(45) : "") + "0."; + i = -1; + while (true) { + t2 = exponent.__late_helper$_value; + if (t2 === exponent) + A.throwExpression(A.LateError$localNI("")); + if (!(i > t2)) + break; + t1 += A.Primitives_stringFromCharCode(48); + --i; + } + if (negative) { + t2 = buffer._contents; + t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); + } else + t2 = buffer; + t2 = t1 + A.S(t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }, + _writeRounded$2(text, buffer) { + var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex; + if (B.JSString_methods.endsWith$1(text, ".0")) { + buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); + return; + } + t1 = text.length; + digits = new Uint8Array(t1 + 1); + negative = text.charCodeAt(0) === 45; + textIndex = negative ? 1 : 0; + for (digitsIndex = 1; true; textIndex = textIndex0, digitsIndex = digitsIndex0) { + if (textIndex === t1) { + buffer.write$1(0, text); + return; + } + textIndex0 = textIndex + 1; + codeUnit = text.charCodeAt(textIndex); + if (codeUnit === 46) { + textIndex = textIndex0; + break; + } + digitsIndex0 = digitsIndex + 1; + digits[digitsIndex] = codeUnit - 48; + } + indexAfterPrecision = textIndex + 10; + if (indexAfterPrecision >= t1) { + buffer.write$1(0, text); + return; + } + for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 + 1; + textIndex0 = textIndex + 1; + digits[digitsIndex0] = text.charCodeAt(textIndex) - 48; + } + if (text.charCodeAt(textIndex) - 48 >= 5) + for (; true; digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 - 1; + newDigit = digits[digitsIndex1] + 1; + digits[digitsIndex1] = newDigit; + if (newDigit !== 10) + break; + } + for (; digitsIndex0 < digitsIndex; ++digitsIndex0) + digits[digitsIndex0] = 0; + while (true) { + t1 = digitsIndex0 > digitsIndex; + if (!(t1 && digits[digitsIndex0 - 1] === 0)) + break; + --digitsIndex0; + } + if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { + buffer.writeCharCode$1(48); + return; + } + if (negative) + buffer.writeCharCode$1(45); + if (digits[0] === 0) + writtenIndex = this._style === B.OutputStyle_1 && digits[1] === 0 ? 2 : 1; + else + writtenIndex = 0; + for (; writtenIndex < digitsIndex; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + if (t1) { + buffer.writeCharCode$1(46); + for (; writtenIndex < digitsIndex0; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + } + }, + _visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { + var t1, includesSingleQuote, includesDoubleQuote, i, char, _1_2, _1_4, _0_0, quote, _this = this, + buffer = forceDoubleQuote ? _this._serialize$_buffer : new A.StringBuffer(""); + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { + char = string.charCodeAt(i); + _1_2 = 39 === char; + if (_1_2 && forceDoubleQuote) { + buffer.writeCharCode$1(39); + continue; + } + if (_1_2 && includesDoubleQuote) { + _this._visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_2) { + buffer.writeCharCode$1(39); + includesSingleQuote = true; + continue; + } + _1_4 = 34 === char; + if (_1_4 && forceDoubleQuote) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(34); + continue; + } + if (_1_4 && includesSingleQuote) { + _this._visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_4) { + buffer.writeCharCode$1(34); + includesDoubleQuote = true; + continue; + } + if (0 === char || 1 === char || 2 === char || 3 === char || 4 === char || 5 === char || 6 === char || 7 === char || 8 === char || 10 === char || 11 === char || 12 === char || 13 === char || 14 === char || 15 === char || 16 === char || 17 === char || 18 === char || 19 === char || 20 === char || 21 === char || 22 === char || 23 === char || 24 === char || 25 === char || 26 === char || 27 === char || 28 === char || 29 === char || 30 === char || 31 === char || 127 === char) { + _this._writeEscape$4(buffer, char, string, i); + continue; + } + if (92 === char) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(92); + continue; + } + _0_0 = _this._tryPrivateUseCharacter$4(buffer, char, string, i); + if (_0_0 != null) + i = _0_0; + else + buffer.writeCharCode$1(char); + } + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + else { + quote = includesDoubleQuote ? 39 : 34; + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(quote); + t1.write$1(0, buffer); + t1.writeCharCode$1(quote); + } + }, + _visitQuotedString$1(string) { + return this._visitQuotedString$2$forceDoubleQuote(string, false); + }, + _visitUnquotedString$1(string) { + var t1, t2, afterNewline, i, _1_0, _0_0; + for (t1 = string.length, t2 = this._serialize$_buffer, afterNewline = false, i = 0; i < t1; ++i) { + _1_0 = string.charCodeAt(i); + if (10 === _1_0) { + t2.writeCharCode$1(32); + afterNewline = true; + continue; + } + if (32 === _1_0) { + if (!afterNewline) + t2.writeCharCode$1(32); + continue; + } + _0_0 = this._tryPrivateUseCharacter$4(t2, _1_0, string, i); + if (_0_0 != null) + i = _0_0; + else + t2.writeCharCode$1(_1_0); + afterNewline = false; + } + }, + _tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { + var t1; + if (this._style === B.OutputStyle_1) + return null; + if (codeUnit >= 57344 && codeUnit <= 63743) { + this._writeEscape$4(buffer, codeUnit, string, i); + return i; + } + if (codeUnit >>> 7 === 439 && string.length > i + 1) { + t1 = i + 1; + this._writeEscape$4(buffer, 65536 + ((codeUnit & 1023) << 10) + (string.charCodeAt(t1) & 1023), string, t1); + return t1; + } + return null; + }, + _writeEscape$4(buffer, character, string, i) { + var t1, next; + buffer.writeCharCode$1(92); + buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); + t1 = i + 1; + if (string.length === t1) + return; + next = string.charCodeAt(t1); + if (A.CharacterExtension_get_isHex(next) || 32 === next || 9 === next) + buffer.writeCharCode$1(32); + }, + visitAttributeSelector$1(attribute) { + var _0_0, t2, + t1 = this._serialize$_buffer; + t1.writeCharCode$1(91); + t1.write$1(0, attribute.name); + _0_0 = attribute.value; + if (_0_0 != null) { + t1.write$1(0, attribute.op); + if (A.Parser_isIdentifier(_0_0) && !B.JSString_methods.startsWith$1(_0_0, "--")) { + t1.write$1(0, _0_0); + t2 = attribute.modifier; + if (t2 != null) + t1.writeCharCode$1(32); + } else { + this._visitQuotedString$1(_0_0); + t2 = attribute.modifier; + if (t2 != null) + if (this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + } + A.NullableExtension_andThen(t2, t1.get$write(t1)); + } + t1.writeCharCode$1(93); + }, + visitClassSelector$1(klass) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(46); + t1.write$1(0, klass.name); + }, + visitComplexSelector$1(complex) { + var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, + t1 = complex.leadingCombinators; + _this._writeCombinators$1(t1); + if (t1.length >= 1 && complex.components.length >= 1) + if (_this._style !== B.OutputStyle_1) + _this._serialize$_buffer.writeCharCode$1(32); + for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize$_buffer, t5 = _this._style === B.OutputStyle_1, t6 = !t5, i = 0; i < t2; ++i) { + component = t1[i]; + _this.visitCompoundSelector$1(component.selector); + t7 = component.combinators; + t8 = t7.length === 0; + if (!t8) + if (t6) + t4.writeCharCode$1(32); + t9 = t5 ? "" : " "; + _this._writeBetween$3(t7, t9, t4.get$write(t4)); + if (i !== t3) + t7 = !t5 || t8; + else + t7 = false; + if (t7) + t4.writeCharCode$1(32); + } + }, + _writeCombinators$1(combinators) { + var t1 = this._style === B.OutputStyle_1 ? "" : " ", + t2 = this._serialize$_buffer; + return this._writeBetween$3(combinators, t1, t2.get$write(t2)); + }, + visitCompoundSelector$1(compound) { + var t2, t3, _i, + t1 = this._serialize$_buffer, + start = t1.get$length(t1); + for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(this); + if (t1.get$length(t1) === start) + t1.writeCharCode$1(42); + }, + visitIDSelector$1(id) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(35); + t1.write$1(0, id.name); + }, + visitSelectorList$1(list) { + var t1, t2, t3, first, t4, _this = this, + complexes = list.components; + for (t1 = J.get$iterator$ax(_this._inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._style !== B.OutputStyle_1, t3 = _this._serialize$_buffer, first = true; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (first) + first = false; + else { + t3.writeCharCode$1(44); + if (t4.lineBreak) { + if (t2) + t3.write$1(0, "\n"); + _this._writeIndentation$0(); + } else if (t2) + t3.writeCharCode$1(32); + } + _this.visitComplexSelector$1(t4); + } + }, + visitParentSelector$1($parent) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(38); + A.NullableExtension_andThen($parent.suffix, t1.get$write(t1)); + }, + visitPlaceholderSelector$1(placeholder) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(37); + t1.write$1(0, placeholder.name); + }, + visitPseudoSelector$1(pseudo) { + var _0_4, t3, + t1 = pseudo.name, + t2 = false; + if ("not" === t1) { + _0_4 = pseudo.selector; + if (_0_4 instanceof A.SelectorList) + t2 = (_0_4 == null ? type$.SelectorList._as(_0_4) : _0_4).accept$1(B._IsInvisibleVisitor_true); + } + if (t2) + return; + t2 = this._serialize$_buffer; + t2.writeCharCode$1(58); + if (!pseudo.isSyntacticClass) + t2.writeCharCode$1(58); + t2.write$1(0, t1); + t1 = pseudo.argument; + t3 = t1 == null; + if (t3 && pseudo.selector == null) + return; + t2.writeCharCode$1(40); + if (!t3) { + t2.write$1(0, t1); + if (pseudo.selector != null) + t2.writeCharCode$1(32); + } + A.NullableExtension_andThen(pseudo.selector, this.get$visitSelectorList()); + t2.writeCharCode$1(41); + }, + visitTypeSelector$1(type) { + this._serialize$_buffer.write$1(0, type.name); + }, + visitUniversalSelector$1(universal) { + var t2, + t1 = universal.namespace; + if (t1 != null) { + t2 = this._serialize$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(124); + } + this._serialize$_buffer.writeCharCode$1(42); + }, + _serialize$_write$1(value) { + return this._serialize$_buffer.forSpan$2(value.span, new A._SerializeVisitor__write_closure(this, value)); + }, + _serialize$_visitChildren$1($parent) { + var t2, t3, t4, t5, t6, t7, prePrevious, previous, t8, previous0, t9, savedIndentation, _this = this, + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(123); + for (t2 = $parent.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = _this._style === B.OutputStyle_1, t5 = !t4, t6 = _this.get$_requiresSemicolon(), t7 = !_this._inspect, t3 = t3._eval$1("ListBase.E"), prePrevious = null, previous = null; t2.moveNext$0();) { + t8 = t2.__internal$_current; + previous0 = t8 == null ? t3._as(t8) : t8; + if (t7) + t8 = t4 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); + else + t8 = false; + if (t8) + continue; + t8 = previous == null; + t9 = t8 ? null : t6.call$1(previous); + if (t9 == null ? false : t9) + t1.writeCharCode$1(59); + if (_this._isTrailingComment$2(previous0, t8 ? $parent : previous)) { + if (t5) + t1.writeCharCode$1(32); + savedIndentation = _this._indentation; + _this._indentation = 0; + new A._SerializeVisitor__visitChildren_closure(_this, previous0).call$0(); + _this._indentation = savedIndentation; + } else { + if (t5) + t1.write$1(0, "\n"); + ++_this._indentation; + new A._SerializeVisitor__visitChildren_closure0(_this, previous0).call$0(); + --_this._indentation; + } + prePrevious = previous; + previous = previous0; + } + if (previous != null) { + if ((type$.CssParentNode._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) && t5) + t1.writeCharCode$1(59); + if (prePrevious == null && _this._isTrailingComment$2(previous, $parent)) { + if (t5) + t1.writeCharCode$1(32); + } else { + _this._writeLineFeed$0(); + _this._writeIndentation$0(); + } + } + t1.writeCharCode$1(125); + }, + _requiresSemicolon$1(node) { + return type$.CssParentNode._is(node) ? node.get$isChildless() : !(node instanceof A.ModifiableCssComment); + }, + _isTrailingComment$2(node, previous) { + var t1, t2, t3, searchFrom, endOffset, t4, span; + if (this._style === B.OutputStyle_1) + return false; + if (!(node instanceof A.ModifiableCssComment)) + return false; + t1 = node.span; + t2 = t1.get$sourceUrl(t1); + t3 = previous.get$span(previous); + if (!J.$eq$(t2, t3.get$sourceUrl(t3))) + return false; + t2 = previous.get$span(previous); + if (!(J.$eq$(t2.get$file(t2).url, t1.get$file(t1).url) && t2.get$start(t2).offset <= t1.get$start(t1).offset && t2.get$end(t2).offset >= t1.get$end(t1).offset)) { + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t2 = previous.get$span(previous); + t2 = t2.get$end(t2); + return t1 === t2.file.getLine$1(t2.offset); + } + t2 = t1.get$start(t1); + t3 = previous.get$span(previous); + searchFrom = t2.offset - t3.get$start(t3).offset - 1; + if (searchFrom < 0) + return false; + endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); + t2 = previous.get$span(previous); + t2 = t2.get$file(t2); + t3 = previous.get$span(previous); + t3 = t3.get$start(t3); + t4 = previous.get$span(previous); + span = t2.span$2(0, t3.offset, t4.get$start(t4).offset + endOffset); + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t4 = A.FileLocation$_(span.file, span._end); + return t1 === t4.file.getLine$1(t4.offset); + }, + _writeLineFeed$0() { + if (this._style !== B.OutputStyle_1) + this._serialize$_buffer.write$1(0, "\n"); + }, + _writeIndentation$0() { + var _this = this; + if (_this._style === B.OutputStyle_1) + return; + _this._writeTimes$2(_this._indentCharacter, _this._indentation * _this._indentWidth); + }, + _writeTimes$2(char, times) { + var t1, i; + for (t1 = this._serialize$_buffer, i = 0; i < times; ++i) + t1.writeCharCode$1(char); + }, + _writeBetween$1$3(iterable, text, callback) { + var t1, t2, first, value; + for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize$_buffer, first = true; t1.moveNext$0();) { + value = t1.get$current(t1); + if (first) + first = false; + else + t2.write$1(0, text); + callback.call$1(value); + } + }, + _writeBetween$3(iterable, text, callback) { + return this._writeBetween$1$3(iterable, text, callback, type$.dynamic); + } + }; + A._SerializeVisitor_visitCssComment_closure.prototype = { + call$0() { + var t2, t3, _0_0, minimumIndentation, + t1 = this.$this; + if (t1._style === B.OutputStyle_1 && this.node.text.charCodeAt(2) !== 33) + return; + t2 = this.node; + t3 = t2.text; + if (B.JSString_methods.startsWith$1(t3, A.RegExp_RegExp("/\\*# source(Mapping)?URL=", false))) + return; + _0_0 = t1._minimumIndentation$1(t3); + if (_0_0 != null) { + t2 = t2.span; + t2 = t2.get$start(t2); + minimumIndentation = Math.min(_0_0, t2.file.getColumn$1(t2.offset)); + t1._writeIndentation$0(); + t1._writeWithIndent$2(t3, minimumIndentation); + } else { + t1._writeIndentation$0(); + t1._serialize$_buffer.write$1(0, t3); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssAtRule_closure.prototype = { + call$0() { + var t3, _0_0, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.writeCharCode$1(64); + t3 = this.node; + t1._serialize$_write$1(t3.name); + _0_0 = t3.value; + if (_0_0 != null) { + t2.writeCharCode$1(32); + t1._serialize$_write$1(_0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssMediaRule_closure.prototype = { + call$0() { + var t3, firstQuery, t4, t5, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@media"); + t3 = this.node.queries; + firstQuery = B.JSArray_methods.get$first(t3); + t4 = t1._style === B.OutputStyle_1; + t5 = true; + if (t4) + if (firstQuery.modifier == null) + if (firstQuery.type == null) { + t5 = firstQuery.conditions; + t5 = t5.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t5), "(not "); + } + if (t5) + t2.writeCharCode$1(32); + t2 = t4 ? "," : ", "; + t1._writeBetween$3(t3, t2, t1.get$_visitMediaQuery()); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport_closure.prototype = { + call$0() { + var t3, t4, _0_0, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@import"); + t3 = t1._style !== B.OutputStyle_1; + if (t3) + t2.writeCharCode$1(32); + t4 = this.node; + t2.forSpan$2(t4.url.span, new A._SerializeVisitor_visitCssImport__closure(t1, t4)); + _0_0 = t4.modifiers; + if (_0_0 != null) { + if (t3) + t2.writeCharCode$1(32); + t2.write$1(0, _0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport__closure.prototype = { + call$0() { + return this.$this._writeImportUrl$1(this.node.url.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssKeyframeBlock_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._style === B.OutputStyle_1 ? "," : ", ", + t3 = t1._serialize$_buffer; + return t1._writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssStyleRule_closure.prototype = { + call$0() { + return this.$this.visitSelectorList$1(this.node._style_rule$_selector._box$_inner.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssSupportsRule_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@supports"); + if (!(t1._style === B.OutputStyle_1 && J.codeUnitAt$1$s(this.node.condition.value, 0) === 40)) + t2.writeCharCode$1(32); + t1._serialize$_write$1(this.node.condition); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + if (t1._style === B.OutputStyle_1) + t1._writeFoldedValue$1(t2); + else + t1._writeReindentedValue$1(t2); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure0.prototype = { + call$0() { + return this.node.value.value.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor_visitList_closure.prototype = { + call$1(element) { + return !element.get$isBlank(); + }, + $signature: 76 + }; + A._SerializeVisitor_visitList_closure0.prototype = { + call$1(element) { + var t1 = this.$this, + needsParens = t1._elementNeedsParens$2(this.value._separator, element); + if (needsParens) + t1._serialize$_buffer.writeCharCode$1(40); + element.accept$1(t1); + if (needsParens) + t1._serialize$_buffer.writeCharCode$1(41); + }, + $signature: 58 + }; + A._SerializeVisitor_visitList_closure1.prototype = { + call$1(element) { + element.accept$1(this.$this); + }, + $signature: 58 + }; + A._SerializeVisitor_visitMap_closure.prototype = { + call$1(entry) { + var t1 = this.$this; + t1._writeMapElement$1(entry.key); + t1._serialize$_buffer.write$1(0, ": "); + t1._writeMapElement$1(entry.value); + }, + $signature: 280 + }; + A._SerializeVisitor_visitSelectorList_closure.prototype = { + call$1(complex) { + return !complex.accept$1(B._IsInvisibleVisitor_true); + }, + $signature: 19 + }; + A._SerializeVisitor__write_closure.prototype = { + call$0() { + return this.$this._serialize$_buffer.write$1(0, this.value.value); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure.prototype = { + call$0() { + return this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure0.prototype = { + call$0() { + this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A.OutputStyle.prototype = { + _enumToString$0() { + return "OutputStyle." + this._name; + } + }; + A.LineFeed.prototype = { + _enumToString$0() { + return "LineFeed." + this._name; + }, + toString$0(_) { + return "lf"; + } + }; + A.StatementSearchVisitor.prototype = { + visitAtRootRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitAtRule$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitContentRule$1(_, node) { + return null; + }, + visitDebugRule$1(_, node) { + return null; + }, + visitDeclaration$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitEachRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(_, node) { + return null; + }, + visitExtendRule$1(_, node) { + return null; + }, + visitForRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(_, node) { + return null; + }, + visitFunctionRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitIfRule$1(_, node) { + var t1 = A.IterableExtension_search(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure(this)); + return t1 == null ? A.NullableExtension_andThen(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure0(this)) : t1; + }, + visitImportRule$1(_, node) { + return null; + }, + visitIncludeRule$1(_, node) { + return A.NullableExtension_andThen(node.content, this.get$visitContentBlock(this)); + }, + visitLoudComment$1(_, node) { + return null; + }, + visitMediaRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitReturnRule$1(_, node) { + return null; + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(_, node) { + return null; + }, + visitVariableDeclaration$1(_, node) { + return null; + }, + visitWarnRule$1(_, node) { + return null; + }, + visitWhileRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + return A.IterableExtension_search(children, new A.StatementSearchVisitor_visitChildren_closure(this)); + } + }; + A.StatementSearchVisitor_visitIfRule_closure.prototype = { + call$1(clause) { + return A.IterableExtension_search(clause.children, new A.StatementSearchVisitor_visitIfRule__closure0(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(IfClause)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.StatementSearchVisitor_visitIfRule_closure0.prototype = { + call$1(lastClause) { + return A.IterableExtension_search(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(ElseClause)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.StatementSearchVisitor_visitChildren_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.Entry.prototype = { + compareTo$1(_, other) { + var t1, t2, + res = this.target.compareTo$1(0, other.target); + if (res !== 0) + return res; + t1 = this.source; + t2 = other.source; + res = B.JSString_methods.compareTo$1(J.toString$0$(t1.file.url), J.toString$0$(t2.file.url)); + if (res !== 0) + return res; + return t1.compareTo$1(0, t2); + }, + $isComparable: 1 + }; + A.Mapping.prototype = {}; + A.SingleMapping.prototype = { + toJson$1$includeSourceContents(includeSourceContents) { + var t1, t2, line, column, srcLine, srcColumn, srcUrlId, srcNameId, first, _i, entry, nextLine, i, t3, t4, column0, t5, newUrlId, srcLine0, srcColumn0, srcNameId0, result, _this = this, + buff = new A.StringBuffer(""); + for (t1 = _this.lines, t2 = t1.length, line = 0, column = 0, srcLine = 0, srcColumn = 0, srcUrlId = 0, srcNameId = 0, first = true, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + entry = t1[_i]; + nextLine = entry.line; + if (nextLine > line) { + for (i = line; i < nextLine; ++i) + buff._contents += ";"; + line = nextLine; + column = 0; + first = true; + } + for (t3 = J.get$iterator$ax(entry.entries); t3.moveNext$0(); column = column0, first = false) { + t4 = t3.get$current(t3); + if (!first) + buff._contents += ","; + column0 = t4.column; + t5 = A.encodeVlq(column0 - column); + t5 = A.StringBuffer__writeAll(buff._contents, t5, ""); + buff._contents = t5; + newUrlId = t4.sourceUrlId; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(newUrlId - srcUrlId), ""); + buff._contents = t5; + srcLine0 = t4.sourceLine; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcLine0 - srcLine), ""); + buff._contents = t5; + srcColumn0 = t4.sourceColumn; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcColumn0 - srcColumn), ""); + buff._contents = t5; + srcNameId0 = t4.sourceNameId; + if (srcNameId0 == null) { + srcUrlId = newUrlId; + srcColumn = srcColumn0; + srcLine = srcLine0; + continue; + } + buff._contents = A.StringBuffer__writeAll(t5, A.encodeVlq(srcNameId0 - srcNameId), ""); + srcNameId = srcNameId0; + srcUrlId = newUrlId; + srcColumn = srcColumn0; + srcLine = srcLine0; + } + } + t1 = _this.sourceRoot; + if (t1 == null) + t1 = ""; + t2 = buff._contents; + result = A.LinkedHashMap_LinkedHashMap$_literal(["version", 3, "sourceRoot", t1, "sources", _this.urls, "names", _this.names, "mappings", t2.charCodeAt(0) == 0 ? t2 : t2], type$.String, type$.dynamic); + t1 = _this.targetUrl; + if (t1 != null) + result.$indexSet(0, "file", t1); + if (includeSourceContents) { + t1 = _this.files; + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String?>"); + result.$indexSet(0, "sourcesContent", A.List_List$of(new A.MappedListIterable(t1, new A.SingleMapping_toJson_closure(), t2), true, t2._eval$1("ListIterable.E"))); + } + _this.extensions.forEach$1(0, new A.SingleMapping_toJson_closure0(result)); + return result; + }, + toJson$0() { + return this.toJson$1$includeSourceContents(false); + }, + toString$0(_) { + var _this = this, + t1 = A.getRuntimeTypeOfDartObject(_this).toString$0(0) + " : [" + "targetUrl: " + A.S(_this.targetUrl) + ", sourceRoot: " + A.S(_this.sourceRoot) + ", urls: " + A.S(_this.urls) + ", names: " + A.S(_this.names) + ", lines: " + A.S(_this.lines) + "]"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.SingleMapping_SingleMapping$fromEntries_closure.prototype = { + call$0() { + return this.urls.__js_helper$_length; + }, + $signature: 10 + }; + A.SingleMapping_SingleMapping$fromEntries_closure0.prototype = { + call$0() { + return this.sourceEntry.source.file; + }, + $signature: 281 + }; + A.SingleMapping_SingleMapping$fromEntries_closure1.prototype = { + call$1(i) { + return this.files.$index(0, i); + }, + $signature: 282 + }; + A.SingleMapping_toJson_closure.prototype = { + call$1(file) { + return file == null ? null : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(file._decodedChars, 0, null), 0, null); + }, + $signature: 283 + }; + A.SingleMapping_toJson_closure0.prototype = { + call$2($name, value) { + this.result.$indexSet(0, $name, value); + return value; + }, + $signature: 138 + }; + A.TargetLineEntry.prototype = { + toString$0(_) { + return A.getRuntimeTypeOfDartObject(this).toString$0(0) + ": " + this.line + " " + A.S(this.entries); + } + }; + A.TargetEntry.prototype = { + toString$0(_) { + var _this = this; + return A.getRuntimeTypeOfDartObject(_this).toString$0(0) + ": (" + _this.column + ", " + _this.sourceUrlId + ", " + _this.sourceLine + ", " + _this.sourceColumn + ", " + A.S(_this.sourceNameId) + ")"; + } + }; + A.SourceFile.prototype = { + get$length(_) { + return this._decodedChars.length; + }, + get$lines() { + return this._lineStarts.length; + }, + SourceFile$decoded$2$url(decodedChars, url) { + var t1, t2, t3, i, c, j; + for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) { + c = t1[i]; + if (c === 13) { + j = i + 1; + if (j >= t2 || t1[j] !== 10) + c = 10; + } + if (c === 10) + t3.push(i + 1); + } + }, + span$2(_, start, end) { + return A._FileSpan$(this, start, end == null ? this._decodedChars.length : end); + }, + span$1(_, start) { + return this.span$2(0, start, null); + }, + getLine$1(offset) { + var t1, _this = this; + if (offset < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > _this._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + offset + string$.x20must_n + _this.get$length(0) + ".")); + t1 = _this._lineStarts; + if (offset < B.JSArray_methods.get$first(t1)) + return -1; + if (offset >= B.JSArray_methods.get$last(t1)) + return t1.length - 1; + if (_this._isNearCachedLine$1(offset)) { + t1 = _this._cachedLine; + t1.toString; + return t1; + } + return _this._cachedLine = _this._binarySearch$1(offset) - 1; + }, + _isNearCachedLine$1(offset) { + var t2, t3, + t1 = this._cachedLine; + if (t1 == null) + return false; + t2 = this._lineStarts; + if (offset < t2[t1]) + return false; + t3 = t2.length; + if (t1 >= t3 - 1 || offset < t2[t1 + 1]) + return true; + if (t1 >= t3 - 2 || offset < t2[t1 + 2]) { + this._cachedLine = t1 + 1; + return true; + } + return false; + }, + _binarySearch$1(offset) { + var min, half, + t1 = this._lineStarts, + max = t1.length - 1; + for (min = 0; min < max;) { + half = min + B.JSInt_methods._tdivFast$1(max - min, 2); + if (t1[half] > offset) + max = half; + else + min = half + 1; + } + return max; + }, + getColumn$1(offset) { + var line, lineStart, _this = this; + if (offset < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > _this._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + offset + " must be not be greater than the number of characters in the file, " + _this.get$length(0) + ".")); + line = _this.getLine$1(offset); + lineStart = _this._lineStarts[line]; + if (lineStart > offset) + throw A.wrapException(A.RangeError$("Line " + line + " comes after offset " + offset + ".")); + return offset - lineStart; + }, + getOffset$1(line) { + var t1, t2, result, t3; + if (line < 0) + throw A.wrapException(A.RangeError$("Line may not be negative, was " + line + ".")); + else { + t1 = this._lineStarts; + t2 = t1.length; + if (line >= t2) + throw A.wrapException(A.RangeError$("Line " + line + " must be less than the number of lines in the file, " + this.get$lines() + ".")); + } + result = t1[line]; + if (result <= this._decodedChars.length) { + t3 = line + 1; + t1 = t3 < t2 && result >= t1[t3]; + } else + t1 = true; + if (t1) + throw A.wrapException(A.RangeError$("Line " + line + " doesn't have 0 columns.")); + return result; + } + }; + A.FileLocation.prototype = { + get$sourceUrl(_) { + return this.file.url; + }, + get$line() { + return this.file.getLine$1(this.offset); + }, + get$column() { + return this.file.getColumn$1(this.offset); + }, + FileLocation$_$2(file, offset) { + var t2, + t1 = this.offset; + if (t1 < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + t1 + ".")); + else { + t2 = this.file; + if (t1 > t2._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + t1 + string$.x20must_n + t2.get$length(0) + ".")); + } + }, + pointSpan$0() { + var t1 = this.offset; + return A._FileSpan$(this.file, t1, t1); + }, + get$offset() { + return this.offset; + } + }; + A._FileSpan.prototype = { + get$sourceUrl(_) { + return this.file.url; + }, + get$length(_) { + return this._end - this._file$_start; + }, + get$start(_) { + return A.FileLocation$_(this.file, this._file$_start); + }, + get$end(_) { + return A.FileLocation$_(this.file, this._end); + }, + get$text() { + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.file._decodedChars, this._file$_start, this._end), 0, null); + }, + get$context(_) { + var _this = this, + t1 = _this.file, + endOffset = _this._end, + endLine = t1.getLine$1(endOffset); + if (t1.getColumn$1(endOffset) === 0 && endLine !== 0) { + if (endOffset - _this._file$_start === 0) + return endLine === t1._lineStarts.length - 1 ? "" : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(endLine), t1.getOffset$1(endLine + 1)), 0, null); + } else + endOffset = endLine === t1._lineStarts.length - 1 ? t1._decodedChars.length : t1.getOffset$1(endLine + 1); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(t1.getLine$1(_this._file$_start)), endOffset), 0, null); + }, + _FileSpan$3(file, _start, _end) { + var t3, + t1 = this._end, + t2 = this._file$_start; + if (t1 < t2) + throw A.wrapException(A.ArgumentError$("End " + t1 + " must come after start " + t2 + ".", null)); + else { + t3 = this.file; + if (t1 > t3._decodedChars.length) + throw A.wrapException(A.RangeError$("End " + t1 + string$.x20must_n + t3.get$length(0) + ".")); + else if (t2 < 0) + throw A.wrapException(A.RangeError$("Start may not be negative, was " + t2 + ".")); + } + }, + compareTo$1(_, other) { + var result; + if (!(other instanceof A._FileSpan)) + return this.super$SourceSpanMixin$compareTo(0, other); + result = B.JSInt_methods.compareTo$1(this._file$_start, other._file$_start); + return result === 0 ? B.JSInt_methods.compareTo$1(this._end, other._end) : result; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (!type$.FileSpan._is(other)) + return _this.super$SourceSpanMixin$$eq(0, other); + if (!(other instanceof A._FileSpan)) + return _this.super$SourceSpanMixin$$eq(0, other) && J.$eq$(_this.file.url, other.get$sourceUrl(other)); + return _this._file$_start === other._file$_start && _this._end === other._end && J.$eq$(_this.file.url, other.file.url); + }, + get$hashCode(_) { + return A.Object_hash(this._file$_start, this._end, this.file.url, B.C_SentinelValue); + }, + expand$1(_, other) { + var t2, t3, _this = this, + t1 = _this.file; + if (!J.$eq$(t1.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(_this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + t2 = _this._file$_start; + t3 = _this._end; + if (other instanceof A._FileSpan) + return A._FileSpan$(t1, Math.min(t2, other._file$_start), Math.max(t3, other._end)); + else + return A._FileSpan$(t1, Math.min(t2, other.get$start(other).offset), Math.max(t3, other.get$end(other).offset)); + }, + $isFileSpan: 1, + $isSourceSpanWithContext: 1, + get$file(receiver) { + return this.file; + } + }; + A.Highlighter.prototype = { + highlight$0() { + var t2, highlightsByColumn, t3, t4, i, line, lastLine, t5, t6, t7, t8, t9, t10, t11, index, primaryIdx, primary, _i, highlight, _this = this, _null = null, + t1 = _this._lines; + _this._writeFileStart$1(B.JSArray_methods.get$first(t1).url); + t2 = _this._maxMultilineSpans; + highlightsByColumn = A.List_List$filled(t2, _null, false, type$.nullable__Highlight); + for (t3 = _this._highlighter$_buffer, t2 = t2 !== 0, t4 = _this._primaryColor, i = 0; i < t1.length; ++i) { + line = t1[i]; + if (i > 0) { + lastLine = t1[i - 1]; + t5 = lastLine.url; + t6 = line.url; + if (!J.$eq$(t5, t6)) { + _this._writeSidebar$1$end($._glyphs.get$upEnd()); + t3._contents += "\n"; + _this._writeFileStart$1(t6); + } else if (lastLine.number + 1 !== line.number) { + _this._writeSidebar$1$text("..."); + t3._contents += "\n"; + } + } + for (t5 = line.highlights, t6 = A._arrayInstanceType(t5)._eval$1("ReversedListIterable<1>"), t7 = new A.ReversedListIterable(t5, t6), t7 = new A.ListIterator(t7, t7.get$length(0), t6._eval$1("ListIterator")), t6 = t6._eval$1("ListIterable.E"), t8 = line.number, t9 = line.text; t7.moveNext$0();) { + t10 = t7.__internal$_current; + if (t10 == null) + t10 = t6._as(t10); + t11 = t10.span; + if (t11.get$start(t11).get$line() !== t11.get$end(t11).get$line() && t11.get$start(t11).get$line() === t8 && _this._isOnlyWhitespace$1(B.JSString_methods.substring$2(t9, 0, t11.get$start(t11).get$column()))) { + index = B.JSArray_methods.indexOf$1(highlightsByColumn, _null); + if (index < 0) + A.throwExpression(A.ArgumentError$(A.S(highlightsByColumn) + " contains no null elements.", _null)); + highlightsByColumn[index] = t10; + } + } + _this._writeSidebar$1$line(t8); + t3._contents += " "; + _this._writeMultilineHighlights$2(line, highlightsByColumn); + if (t2) + t3._contents += " "; + primaryIdx = B.JSArray_methods.indexWhere$1(t5, new A.Highlighter_highlight_closure()); + primary = primaryIdx === -1 ? _null : t5[primaryIdx]; + t6 = primary != null; + if (t6) { + t7 = primary.span; + t10 = t7.get$start(t7).get$line() === t8 ? t7.get$start(t7).get$column() : 0; + _this._writeHighlightedText$4$color(t9, t10, t7.get$end(t7).get$line() === t8 ? t7.get$end(t7).get$column() : t9.length, t4); + } else + _this._writeText$1(t9); + t3._contents += "\n"; + if (t6) + _this._writeIndicator$3(line, primary, highlightsByColumn); + for (t6 = t5.length, _i = 0; _i < t5.length; t5.length === t6 || (0, A.throwConcurrentModificationError)(t5), ++_i) { + highlight = t5[_i]; + if (highlight.isPrimary) + continue; + _this._writeIndicator$3(line, highlight, highlightsByColumn); + } + } + _this._writeSidebar$1$end($._glyphs.get$upEnd()); + t1 = t3._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeFileStart$1(url) { + var _this = this, + t1 = !_this._multipleFiles || !type$.Uri._is(url), + t2 = $._glyphs; + if (t1) + _this._writeSidebar$1$end(t2.get$downEnd()); + else { + _this._writeSidebar$1$end(t2.get$topLeftCorner()); + _this._colorize$2$color(new A.Highlighter__writeFileStart_closure(_this), "\x1b[34m"); + t1 = _this._highlighter$_buffer; + t2 = " " + $.$get$context().prettyUri$1(url); + t1._contents += t2; + } + _this._highlighter$_buffer._contents += "\n"; + }, + _writeMultilineHighlights$3$current(line, highlightsByColumn, current) { + var t1, currentColor, t2, t3, t4, t5, foundCurrent, _i, highlight, t6, startLine, t7, endLine, _this = this, _box_0 = {}; + _box_0.openedOnThisLine = false; + _box_0.openedOnThisLineColor = null; + t1 = current == null; + if (t1) + currentColor = null; + else + currentColor = current.isPrimary ? _this._primaryColor : _this._secondaryColor; + for (t2 = highlightsByColumn.length, t3 = _this._secondaryColor, t1 = !t1, t4 = _this._primaryColor, t5 = _this._highlighter$_buffer, foundCurrent = false, _i = 0; _i < t2; ++_i) { + highlight = highlightsByColumn[_i]; + t6 = highlight == null; + if (t6) + startLine = null; + else { + t7 = highlight.span; + startLine = t7.get$start(t7).get$line(); + } + if (t6) + endLine = null; + else { + t7 = highlight.span; + endLine = t7.get$end(t7).get$line(); + } + if (t1 && highlight === current) { + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure(_this, startLine, line), currentColor); + foundCurrent = true; + } else if (foundCurrent) + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure0(_this, highlight), currentColor); + else if (t6) + if (_box_0.openedOnThisLine) + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure1(_this), _box_0.openedOnThisLineColor); + else + t5._contents += " "; + else { + t6 = highlight.isPrimary ? t4 : t3; + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure2(_box_0, _this, current, startLine, line, highlight, endLine), t6); + } + } + }, + _writeMultilineHighlights$2(line, highlightsByColumn) { + return this._writeMultilineHighlights$3$current(line, highlightsByColumn, null); + }, + _writeHighlightedText$4$color(text, startColumn, endColumn, color) { + var _this = this; + _this._writeText$1(B.JSString_methods.substring$2(text, 0, startColumn)); + _this._colorize$2$color(new A.Highlighter__writeHighlightedText_closure(_this, text, startColumn, endColumn), color); + _this._writeText$1(B.JSString_methods.substring$2(text, endColumn, text.length)); + }, + _writeIndicator$3(line, highlight, highlightsByColumn) { + var t2, coversWholeLine, _this = this, + color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor, + t1 = highlight.span; + if (t1.get$start(t1).get$line() === t1.get$end(t1).get$line()) { + _this._writeSidebar$0(); + t1 = _this._highlighter$_buffer; + t1._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + if (highlightsByColumn.length !== 0) + t1._contents += " "; + _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure(_this, line, highlight), color)); + } else { + t2 = line.number; + if (t1.get$start(t1).get$line() === t2) { + if (B.JSArray_methods.contains$1(highlightsByColumn, highlight)) + return; + A.replaceFirstNull(highlightsByColumn, highlight); + _this._writeSidebar$0(); + t1 = _this._highlighter$_buffer; + t1._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + _this._colorize$2$color(new A.Highlighter__writeIndicator_closure0(_this, line, highlight), color); + t1._contents += "\n"; + } else if (t1.get$end(t1).get$line() === t2) { + coversWholeLine = t1.get$end(t1).get$column() === line.text.length; + if (coversWholeLine && highlight.label == null) { + A.replaceWithNull(highlightsByColumn, highlight); + return; + } + _this._writeSidebar$0(); + _this._highlighter$_buffer._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure1(_this, coversWholeLine, line, highlight), color)); + A.replaceWithNull(highlightsByColumn, highlight); + } + } + }, + _writeArrow$3$beginning(line, column, beginning) { + var t2, + t1 = beginning ? 0 : 1, + tabs = this._countTabs$1(B.JSString_methods.substring$2(line.text, 0, column + t1)); + t1 = this._highlighter$_buffer; + t2 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 1 + column + tabs * 3); + t2 = t1._contents += t2; + t1._contents = t2 + "^"; + }, + _writeArrow$2(line, column) { + return this._writeArrow$3$beginning(line, column, true); + }, + _writeLabel$3(highlight, highlightsByColumn, underlineLength) { + var lines, color, t1, t2, t3, t4, t5, t6, _i, columnHighlight, _this = this, + label = highlight.label; + if (label == null) { + _this._highlighter$_buffer._contents += "\n"; + return; + } + lines = A._setArrayType(label.split("\n"), type$.JSArray_String); + color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor; + _this._colorize$2$color(new A.Highlighter__writeLabel_closure(_this, lines), color); + t1 = _this._highlighter$_buffer; + t1._contents += "\n"; + for (t2 = A.SubListIterable$(lines, 1, null, type$.String), t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = highlightsByColumn.length, t3 = t3._eval$1("ListIterable.E"); t2.moveNext$0();) { + t5 = t2.__internal$_current; + if (t5 == null) + t5 = t3._as(t5); + _this._writeSidebar$0(); + t6 = t1._contents += " "; + for (_i = 0; _i < t4; ++_i) { + columnHighlight = highlightsByColumn[_i]; + if (columnHighlight == null || columnHighlight === highlight) { + t6 += " "; + t1._contents = t6; + } else { + t6 = $._glyphs.get$verticalLine(); + t6 = t1._contents += t6; + } + } + t6 = B.JSString_methods.$mul(" ", underlineLength); + t1._contents += t6; + _this._colorize$2$color(new A.Highlighter__writeLabel_closure0(_this, t5), color); + t1._contents += "\n"; + } + }, + _writeText$1(text) { + var t1, t2, t3, t4; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this._highlighter$_buffer, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + if (t4 == null) + t4 = t2._as(t4); + if (t4 === 9) { + t4 = B.JSString_methods.$mul(" ", 4); + t3._contents += t4; + } else { + t4 = A.Primitives_stringFromCharCode(t4); + t3._contents += t4; + } + } + }, + _writeSidebar$3$end$line$text(end, line, text) { + var t1 = {}; + t1.text = text; + if (line != null) + t1.text = B.JSInt_methods.toString$0(line + 1); + this._colorize$2$color(new A.Highlighter__writeSidebar_closure(t1, this, end), "\x1b[34m"); + }, + _writeSidebar$1$end(end) { + return this._writeSidebar$3$end$line$text(end, null, null); + }, + _writeSidebar$1$text(text) { + return this._writeSidebar$3$end$line$text(null, null, text); + }, + _writeSidebar$1$line(line) { + return this._writeSidebar$3$end$line$text(null, line, null); + }, + _writeSidebar$0() { + return this._writeSidebar$3$end$line$text(null, null, null); + }, + _countTabs$1(text) { + var t1, t2, count, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"), count = 0; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if ((t3 == null ? t2._as(t3) : t3) === 9) + ++count; + } + return count; + }, + _isOnlyWhitespace$1(text) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 !== 32 && t3 !== 9) + return false; + } + return true; + }, + _colorize$1$2$color(callback, color) { + var result, + t1 = this._primaryColor != null; + if (t1 && color != null) + this._highlighter$_buffer._contents += color; + result = callback.call$0(); + if (t1 && color != null) + this._highlighter$_buffer._contents += "\x1b[0m"; + return result; + }, + _colorize$2$color(callback, color) { + return this._colorize$1$2$color(callback, color, type$.dynamic); + } + }; + A.Highlighter_closure.prototype = { + call$0() { + var t1 = this.color, + t2 = J.getInterceptor$(t1); + if (t2.$eq(t1, true)) + return "\x1b[31m"; + if (t2.$eq(t1, false)) + return null; + return A._asStringQ(t1); + }, + $signature: 49 + }; + A.Highlighter$__closure.prototype = { + call$1(line) { + var t1 = line.highlights; + return new A.WhereIterable(t1, new A.Highlighter$___closure(), A._arrayInstanceType(t1)._eval$1("WhereIterable<1>")).get$length(0); + }, + $signature: 284 + }; + A.Highlighter$___closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + return t1.get$start(t1).get$line() !== t1.get$end(t1).get$line(); + }, + $signature: 137 + }; + A.Highlighter$__closure0.prototype = { + call$1(line) { + return line.url; + }, + $signature: 286 + }; + A.Highlighter__collateLines_closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + t1 = t1.get$sourceUrl(t1); + return t1 == null ? new A.Object() : t1; + }, + $signature: 287 + }; + A.Highlighter__collateLines_closure0.prototype = { + call$2(highlight1, highlight2) { + return highlight1.span.compareTo$1(0, highlight2.span); + }, + $signature: 288 + }; + A.Highlighter__collateLines_closure1.prototype = { + call$1(entry) { + var t1, t2, t3, t4, context, t5, linesBeforeSpan, lineNumber, _i, line, activeHighlights, highlightIndex, oldHighlightLength, t6, + url = entry.key, + highlightsForFile = entry.value, + lines = A._setArrayType([], type$.JSArray__Line); + for (t1 = J.getInterceptor$ax(highlightsForFile), t2 = t1.get$iterator(highlightsForFile), t3 = type$.JSArray__Highlight; t2.moveNext$0();) { + t4 = t2.get$current(t2).span; + context = t4.get$context(t4); + t5 = A.findLineStart(context, t4.get$text(), t4.get$start(t4).get$column()); + t5.toString; + linesBeforeSpan = B.JSString_methods.allMatches$1("\n", B.JSString_methods.substring$2(context, 0, t5)).get$length(0); + lineNumber = t4.get$start(t4).get$line() - linesBeforeSpan; + for (t4 = context.split("\n"), t5 = t4.length, _i = 0; _i < t5; ++_i) { + line = t4[_i]; + if (lines.length === 0 || lineNumber > B.JSArray_methods.get$last(lines).number) + lines.push(new A._Line(line, lineNumber, url, A._setArrayType([], t3))); + ++lineNumber; + } + } + activeHighlights = A._setArrayType([], t3); + for (t2 = lines.length, highlightIndex = 0, _i = 0; _i < lines.length; lines.length === t2 || (0, A.throwConcurrentModificationError)(lines), ++_i) { + line = lines[_i]; + if (!!activeHighlights.fixed$length) + A.throwExpression(A.UnsupportedError$("removeWhere")); + B.JSArray_methods._removeWhere$2(activeHighlights, new A.Highlighter__collateLines__closure(line), true); + oldHighlightLength = activeHighlights.length; + for (t3 = t1.skip$1(highlightsForFile, highlightIndex), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + t6 = t5.span; + if (t6.get$start(t6).get$line() > line.number) + break; + activeHighlights.push(t5); + } + highlightIndex += activeHighlights.length - oldHighlightLength; + B.JSArray_methods.addAll$1(line.highlights, activeHighlights); + } + return lines; + }, + $signature: 289 + }; + A.Highlighter__collateLines__closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + return t1.get$end(t1).get$line() < this.line.number; + }, + $signature: 137 + }; + A.Highlighter_highlight_closure.prototype = { + call$1(highlight) { + return highlight.isPrimary; + }, + $signature: 137 + }; + A.Highlighter__writeFileStart_closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 2) + ">"; + t1._contents += t2; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeMultilineHighlights_closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = $._glyphs; + t2 = this.startLine === this.line.number ? t2.get$topLeftCorner() : t2.get$bottomLeftCorner(); + t1._contents += t2; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights_closure0.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = $._glyphs; + t2 = this.highlight == null ? t2.get$horizontalLine() : t2.get$cross(); + t1._contents += t2; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights_closure1.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = $._glyphs.get$horizontalLine(); + t1._contents += t2; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeMultilineHighlights_closure2.prototype = { + call$0() { + var _this = this, + t1 = _this._box_0, + t2 = t1.openedOnThisLine, + t3 = $._glyphs, + vertical = t2 ? t3.get$cross() : t3.get$verticalLine(); + if (_this.current != null) + _this.$this._highlighter$_buffer._contents += vertical; + else { + t2 = _this.line; + t3 = t2.number; + if (_this.startLine === t3) { + t2 = _this.$this; + t2._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure(t1, t2), t1.openedOnThisLineColor); + t1.openedOnThisLine = true; + if (t1.openedOnThisLineColor == null) + t1.openedOnThisLineColor = _this.highlight.isPrimary ? t2._primaryColor : t2._secondaryColor; + } else { + if (_this.endLine === t3) { + t3 = _this.highlight.span; + t2 = t3.get$end(t3).get$column() === t2.text.length; + } else + t2 = false; + t3 = _this.$this; + if (t2) { + t1 = t3._highlighter$_buffer; + t2 = _this.highlight.label == null ? $._glyphs.glyphOrAscii$2("\u2514", "\\") : vertical; + t1._contents += t2; + } else + t3._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure0(t3, vertical), t1.openedOnThisLineColor); + } + } + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights__closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = this._box_0.openedOnThisLine ? "\u252c" : "\u250c"; + t2 = $._glyphs.glyphOrAscii$2(t2, "/"); + t1._contents += t2; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights__closure0.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += this.vertical; + }, + $signature: 1 + }; + A.Highlighter__writeHighlightedText_closure.prototype = { + call$0() { + var _this = this; + return _this.$this._writeText$1(B.JSString_methods.substring$2(_this.text, _this.startColumn, _this.endColumn)); + }, + $signature: 0 + }; + A.Highlighter__writeIndicator_closure.prototype = { + call$0() { + var startColumn, endColumn, tabsBefore, tabsInside, + t1 = this.$this, + t2 = t1._highlighter$_buffer, + t3 = t2._contents, + t4 = this.highlight, + t5 = t4.span; + t4 = t4.isPrimary ? "^" : $._glyphs.get$horizontalLineBold(); + startColumn = t5.get$start(t5).get$column(); + endColumn = t5.get$end(t5).get$column(); + t5 = this.line.text; + tabsBefore = t1._countTabs$1(B.JSString_methods.substring$2(t5, 0, startColumn)); + tabsInside = t1._countTabs$1(B.JSString_methods.substring$2(t5, startColumn, endColumn)); + startColumn += tabsBefore * 3; + t5 = B.JSString_methods.$mul(" ", startColumn); + t2._contents += t5; + t4 = B.JSString_methods.$mul(t4, Math.max(endColumn + (tabsBefore + tabsInside) * 3 - startColumn, 1)); + t4 = t2._contents += t4; + return t4.length - t3.length; + }, + $signature: 10 + }; + A.Highlighter__writeIndicator_closure0.prototype = { + call$0() { + var t1 = this.highlight.span; + return this.$this._writeArrow$2(this.line, t1.get$start(t1).get$column()); + }, + $signature: 0 + }; + A.Highlighter__writeIndicator_closure1.prototype = { + call$0() { + var t4, _this = this, + t1 = _this.$this, + t2 = t1._highlighter$_buffer, + t3 = t2._contents; + if (_this.coversWholeLine) { + t1 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 3); + t2._contents += t1; + } else { + t4 = _this.highlight.span; + t1._writeArrow$3$beginning(_this.line, Math.max(t4.get$end(t4).get$column() - 1, 0), false); + } + return t2._contents.length - t3.length; + }, + $signature: 10 + }; + A.Highlighter__writeLabel_closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = " " + A.S(B.JSArray_methods.get$first(this.lines)); + t1._contents += t2; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeLabel_closure0.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += " " + this.text; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeSidebar_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._highlighter$_buffer, + t3 = this._box_0.text; + if (t3 == null) + t3 = ""; + t1 = B.JSString_methods.padRight$1(t3, t1._paddingBeforeSidebar); + t2._contents += t1; + t1 = this.end; + if (t1 == null) + t1 = $._glyphs.get$verticalLine(); + t2._contents += t1; + }, + $signature: 1 + }; + A._Highlight.prototype = { + toString$0(_) { + var t1 = this.isPrimary ? "" + "primary " : "", + t2 = this.span; + t2 = t1 + ("" + t2.get$start(t2).get$line() + ":" + t2.get$start(t2).get$column() + "-" + t2.get$end(t2).get$line() + ":" + t2.get$end(t2).get$column()); + t1 = this.label; + t1 = t1 != null ? t2 + (" (" + t1 + ")") : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._Highlight_closure.prototype = { + call$0() { + var t2, t3, t4, t5, + t1 = this.span; + if (!(type$.SourceSpanWithContext._is(t1) && A.findLineStart(t1.get$context(t1), t1.get$text(), t1.get$start(t1).get$column()) != null)) { + t2 = A.SourceLocation$(t1.get$start(t1).get$offset(), 0, 0, t1.get$sourceUrl(t1)); + t3 = t1.get$end(t1).get$offset(); + t4 = t1.get$sourceUrl(t1); + t5 = A.countCodeUnits(t1.get$text(), 10); + t1 = A.SourceSpanWithContext$(t2, A.SourceLocation$(t3, A._Highlight__lastLineLength(t1.get$text()), t5, t4), t1.get$text(), t1.get$text()); + } + return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(t1))); + }, + $signature: 290 + }; + A._Line.prototype = { + toString$0(_) { + return "" + this.number + ': "' + this.text + '" (' + B.JSArray_methods.join$1(this.highlights, ", ") + ")"; + } + }; + A.SourceLocation.prototype = { + distance$1(other) { + var t1 = this.sourceUrl; + if (!J.$eq$(t1, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return Math.abs(this.offset - other.get$offset()); + }, + compareTo$1(_, other) { + var t1 = this.sourceUrl; + if (!J.$eq$(t1, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return this.offset - other.get$offset(); + }, + $eq(_, other) { + if (other == null) + return false; + return type$.SourceLocation._is(other) && J.$eq$(this.sourceUrl, other.get$sourceUrl(other)) && this.offset === other.get$offset(); + }, + get$hashCode(_) { + var t1 = this.sourceUrl; + t1 = t1 == null ? null : t1.get$hashCode(t1); + if (t1 == null) + t1 = 0; + return t1 + this.offset; + }, + toString$0(_) { + var _this = this, + t1 = A.getRuntimeTypeOfDartObject(_this).toString$0(0), + source = _this.sourceUrl; + return "<" + t1 + ": " + _this.offset + " " + (A.S(source == null ? "unknown source" : source) + ":" + (_this.line + 1) + ":" + (_this.column + 1)) + ">"; + }, + $isComparable: 1, + get$sourceUrl(receiver) { + return this.sourceUrl; + }, + get$offset() { + return this.offset; + }, + get$line() { + return this.line; + }, + get$column() { + return this.column; + } + }; + A.SourceLocationMixin.prototype = { + distance$1(other) { + if (!J.$eq$(this.file.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return Math.abs(this.offset - other.get$offset()); + }, + compareTo$1(_, other) { + if (!J.$eq$(this.file.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return this.offset - other.get$offset(); + }, + $eq(_, other) { + if (other == null) + return false; + return type$.SourceLocation._is(other) && J.$eq$(this.file.url, other.get$sourceUrl(other)) && this.offset === other.get$offset(); + }, + get$hashCode(_) { + var t1 = this.file.url; + t1 = t1 == null ? null : t1.get$hashCode(t1); + if (t1 == null) + t1 = 0; + return t1 + this.offset; + }, + toString$0(_) { + var t1 = A.getRuntimeTypeOfDartObject(this).toString$0(0), + t2 = this.offset, + t3 = this.file, + source = t3.url; + return "<" + t1 + ": " + t2 + " " + (A.S(source == null ? "unknown source" : source) + ":" + (t3.getLine$1(t2) + 1) + ":" + (t3.getColumn$1(t2) + 1)) + ">"; + }, + $isComparable: 1, + $isSourceLocation: 1 + }; + A.SourceSpanBase.prototype = { + SourceSpanBase$3(start, end, text) { + var t3, + t1 = this.end, + t2 = this.start; + if (!J.$eq$(t1.get$sourceUrl(t1), t2.get$sourceUrl(t2))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t2.get$sourceUrl(t2)) + '" and "' + A.S(t1.get$sourceUrl(t1)) + "\" don't match.", null)); + else if (t1.get$offset() < t2.get$offset()) + throw A.wrapException(A.ArgumentError$("End " + t1.toString$0(0) + " must come after start " + t2.toString$0(0) + ".", null)); + else { + t3 = this.text; + if (t3.length !== t2.distance$1(t1)) + throw A.wrapException(A.ArgumentError$('Text "' + t3 + '" must be ' + t2.distance$1(t1) + " characters long.", null)); + } + }, + get$start(receiver) { + return this.start; + }, + get$end(receiver) { + return this.end; + }, + get$text() { + return this.text; + } + }; + A.SourceSpanException.prototype = { + get$message(_) { + return this._span_exception$_message; + }, + get$span(_) { + return this._span; + }, + toString$1$color(_, color) { + var _this = this; + _this.get$span(_this); + return "Error on " + _this.get$span(_this).message$2$color(0, _this._span_exception$_message, color); + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + $isException: 1 + }; + A.SourceSpanFormatException.prototype = {$isFormatException: 1, + get$source() { + return this.source; + } + }; + A.MultiSourceSpanException.prototype = { + toString$0(_) { + var _this = this; + return "Error on " + A.SourceSpanExtension_messageMultiple(_this._span, _this._span_exception$_message, _this.primaryLabel, _this.secondarySpans, false, null, null); + }, + get$primaryLabel() { + return this.primaryLabel; + }, + get$secondarySpans() { + return this.secondarySpans; + } + }; + A.MultiSourceSpanFormatException.prototype = {$isFormatException: 1}; + A.SourceSpanMixin.prototype = { + get$sourceUrl(_) { + var t1 = this.get$start(this); + return t1.get$sourceUrl(t1); + }, + get$length(_) { + var _this = this; + return _this.get$end(_this).get$offset() - _this.get$start(_this).get$offset(); + }, + compareTo$1(_, other) { + var _this = this, + result = _this.get$start(_this).compareTo$1(0, other.get$start(other)); + return result === 0 ? _this.get$end(_this).compareTo$1(0, other.get$end(other)) : result; + }, + message$2$color(_, message, color) { + var t2, t3, highlight, _this = this, + t1 = "" + ("line " + (_this.get$start(_this).get$line() + 1) + ", column " + (_this.get$start(_this).get$column() + 1)); + if (_this.get$sourceUrl(_this) != null) { + t2 = _this.get$sourceUrl(_this); + t3 = $.$get$context(); + t2.toString; + t2 = t1 + (" of " + t3.prettyUri$1(t2)); + t1 = t2; + } + t1 += ": " + message; + highlight = _this.highlight$1$color(color); + if (highlight.length !== 0) + t1 = t1 + "\n" + highlight; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + highlight$1$color(color) { + var _this = this; + if (!type$.SourceSpanWithContext._is(_this) && _this.get$length(_this) === 0) + return ""; + return A.Highlighter$(_this, color).highlight$0(); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return type$.SourceSpan._is(other) && _this.get$start(_this).$eq(0, other.get$start(other)) && _this.get$end(_this).$eq(0, other.get$end(other)); + }, + get$hashCode(_) { + var _this = this; + return A.Object_hash(_this.get$start(_this), _this.get$end(_this), B.C_SentinelValue, B.C_SentinelValue); + }, + toString$0(_) { + var _this = this; + return "<" + A.getRuntimeTypeOfDartObject(_this).toString$0(0) + ": from " + _this.get$start(_this).toString$0(0) + " to " + _this.get$end(_this).toString$0(0) + ' "' + _this.get$text() + '">'; + }, + $isComparable: 1, + $isSourceSpan: 1 + }; + A.SourceSpanWithContext.prototype = { + get$context(_) { + return this._context; + } + }; + A.Chain.prototype = { + toTrace$0() { + var t1 = this.traces; + return A.Trace$(new A.ExpandIterable(t1, new A.Chain_toTrace_closure(), A._arrayInstanceType(t1)._eval$1("ExpandIterable<1,Frame>")), null); + }, + toString$0(_) { + var t1 = this.traces, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, new A.Chain_toString_closure(new A.MappedListIterable(t1, new A.Chain_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$1(0, string$.x3d_____); + }, + $isStackTrace: 1 + }; + A.Chain_Chain$parse_closure.prototype = { + call$1(line) { + return line.length !== 0; + }, + $signature: 5 + }; + A.Chain_toTrace_closure.prototype = { + call$1(trace) { + return trace.get$frames(); + }, + $signature: 291 + }; + A.Chain_toString_closure0.prototype = { + call$1(trace) { + var t1 = trace.get$frames(); + return new A.MappedListIterable(t1, new A.Chain_toString__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT); + }, + $signature: 292 + }; + A.Chain_toString__closure0.prototype = { + call$1(frame) { + return frame.get$location().length; + }, + $signature: 191 + }; + A.Chain_toString_closure.prototype = { + call$1(trace) { + var t1 = trace.get$frames(); + return new A.MappedListIterable(t1, new A.Chain_toString__closure(this.longest), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $signature: 294 + }; + A.Chain_toString__closure.prototype = { + call$1(frame) { + return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; + }, + $signature: 192 + }; + A.Frame.prototype = { + get$isCore() { + return this.uri.get$scheme() === "dart"; + }, + get$library() { + var t1 = this.uri; + if (t1.get$scheme() === "data") + return "data:..."; + return $.$get$context().prettyUri$1(t1); + }, + get$$package() { + var t1 = this.uri; + if (t1.get$scheme() !== "package") + return null; + return B.JSArray_methods.get$first(t1.get$path(t1).split("/")); + }, + get$location() { + var t2, _this = this, + t1 = _this.line; + if (t1 == null) + return _this.get$library(); + t2 = _this.column; + if (t2 == null) + return _this.get$library() + " " + A.S(t1); + return _this.get$library() + " " + A.S(t1) + ":" + A.S(t2); + }, + toString$0(_) { + return this.get$location() + " in " + A.S(this.member); + }, + get$uri() { + return this.uri; + }, + get$line() { + return this.line; + }, + get$column() { + return this.column; + }, + get$member() { + return this.member; + } + }; + A.Frame_Frame$parseVM_closure.prototype = { + call$0() { + var match, t2, t3, member, uri, lineAndColumn, line, _null = null, + t1 = this.frame; + if (t1 === "...") + return new A.Frame(A._Uri__Uri(_null, _null, _null, _null), _null, _null, "..."); + match = $.$get$_vmFrame().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t1 = match._match; + t2 = t1[1]; + t2.toString; + t3 = $.$get$_asyncBody(); + t2 = A.stringReplaceAllUnchecked(t2, t3, ""); + member = A.stringReplaceAllUnchecked(t2, "", ""); + t2 = t1[2]; + t3 = t2; + t3.toString; + if (B.JSString_methods.startsWith$1(t3, " 1 ? A.int_parse(lineAndColumn[1], _null) : _null; + return new A.Frame(uri, line, t1 > 2 ? A.int_parse(lineAndColumn[2], _null) : _null, member); + }, + $signature: 73 + }; + A.Frame_Frame$parseV8_closure.prototype = { + call$0() { + var t2, t3, _s4_ = "", + t1 = this.frame, + match = $.$get$_v8Frame().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), t1); + t1 = new A.Frame_Frame$parseV8_closure_parseLocation(t1); + t2 = match._match; + t3 = t2[2]; + if (t3 != null) { + t3 = t3; + t3.toString; + t2 = t2[1]; + t2.toString; + t2 = A.stringReplaceAllUnchecked(t2, "", _s4_); + t2 = A.stringReplaceAllUnchecked(t2, "Anonymous function", _s4_); + return t1.call$2(t3, A.stringReplaceAllUnchecked(t2, "(anonymous function)", _s4_)); + } else { + t2 = t2[3]; + t2.toString; + return t1.call$2(t2, _s4_); + } + }, + $signature: 73 + }; + A.Frame_Frame$parseV8_closure_parseLocation.prototype = { + call$2($location, member) { + var t2, urlMatch, uri, line, columnMatch, _null = null, + t1 = $.$get$_v8EvalLocation(), + evalMatch = t1.firstMatch$1($location); + for (; evalMatch != null; $location = t2) { + t2 = evalMatch._match[1]; + t2.toString; + evalMatch = t1.firstMatch$1(t2); + } + if ($location === "native") + return new A.Frame(A.Uri_parse("native"), _null, _null, member); + urlMatch = $.$get$_v8UrlLocation().firstMatch$1($location); + if (urlMatch == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), this.frame); + t1 = urlMatch._match; + t2 = t1[1]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + t2 = t1[2]; + t2.toString; + line = A.int_parse(t2, _null); + columnMatch = t1[3]; + return new A.Frame(uri, line, columnMatch != null ? A.int_parse(columnMatch, _null) : _null, member); + }, + $signature: 297 + }; + A.Frame_Frame$_parseFirefoxEval_closure.prototype = { + call$0() { + var t2, member, uri, line, _null = null, + t1 = this.frame, + match = $.$get$_firefoxEvalLocation().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t1 = match._match; + t2 = t1[1]; + t2.toString; + member = A.stringReplaceAllUnchecked(t2, "/<", ""); + t2 = t1[2]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + t1 = t1[3]; + t1.toString; + line = A.int_parse(t1, _null); + return new A.Frame(uri, line, _null, member.length === 0 || member === "anonymous" ? "" : member); + }, + $signature: 73 + }; + A.Frame_Frame$parseFirefox_closure.prototype = { + call$0() { + var t2, t3, t4, uri, member, line, column, _null = null, + t1 = this.frame, + match = $.$get$_firefoxSafariFrame().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t2 = match._match; + t3 = t2[3]; + t4 = t3; + t4.toString; + if (B.JSString_methods.contains$1(t4, " line ")) + return A.Frame_Frame$_parseFirefoxEval(t1); + t1 = t3; + t1.toString; + uri = A.Frame__uriOrPathToUri(t1); + member = t2[1]; + if (member != null) { + t1 = t2[2]; + t1.toString; + member += B.JSArray_methods.join$0(A.List_List$filled(B.JSString_methods.allMatches$1("/", t1).get$length(0), ".", false, type$.String)); + if (member === "") + member = ""; + member = B.JSString_methods.replaceFirst$2(member, $.$get$_initialDot(), ""); + } else + member = ""; + t1 = t2[4]; + if (t1 === "") + line = _null; + else { + t1 = t1; + t1.toString; + line = A.int_parse(t1, _null); + } + t1 = t2[5]; + if (t1 == null || t1 === "") + column = _null; + else { + t1 = t1; + t1.toString; + column = A.int_parse(t1, _null); + } + return new A.Frame(uri, line, column, member); + }, + $signature: 73 + }; + A.Frame_Frame$parseFriendly_closure.prototype = { + call$0() { + var t2, uri, line, column, _null = null, + t1 = this.frame, + match = $.$get$_friendlyFrame().firstMatch$1(t1); + if (match == null) + throw A.wrapException(A.FormatException$("Couldn't parse package:stack_trace stack trace line '" + t1 + "'.", _null, _null)); + t1 = match._match; + t2 = t1[1]; + if (t2 === "data:...") + uri = A.Uri_Uri$dataFromString("", _null, _null); + else { + t2 = t2; + t2.toString; + uri = A.Uri_parse(t2); + } + if (uri.get$scheme() === "") { + t2 = $.$get$context(); + uri = t2.toUri$1(A.absolute(t2.style.pathFromUri$1(A._parseUri(uri)), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); + } + t2 = t1[2]; + if (t2 == null) + line = _null; + else { + t2 = t2; + t2.toString; + line = A.int_parse(t2, _null); + } + t2 = t1[3]; + if (t2 == null) + column = _null; + else { + t2 = t2; + t2.toString; + column = A.int_parse(t2, _null); + } + return new A.Frame(uri, line, column, t1[4]); + }, + $signature: 73 + }; + A.LazyTrace.prototype = { + get$_lazy_trace$_trace() { + var result, _this = this, + value = _this.__LazyTrace__trace_FI; + if (value === $) { + result = _this._thunk.call$0(); + _this.__LazyTrace__trace_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__LazyTrace__trace_FI = result; + value = result; + } + return value; + }, + get$frames() { + return this.get$_lazy_trace$_trace().get$frames(); + }, + get$terse() { + return new A.LazyTrace(new A.LazyTrace_terse_closure(this)); + }, + toString$0(_) { + return this.get$_lazy_trace$_trace().toString$0(0); + }, + $isStackTrace: 1, + $isTrace: 1 + }; + A.LazyTrace_terse_closure.prototype = { + call$0() { + return this.$this.get$_lazy_trace$_trace().get$terse(); + }, + $signature: 194 + }; + A.Trace.prototype = { + get$terse() { + return this.foldFrames$2$terse(new A.Trace_terse_closure(), true); + }, + foldFrames$2$terse(predicate, terse) { + var newFrames, t1, t2, t3, _box_0 = {}; + _box_0.predicate = predicate; + _box_0.predicate = new A.Trace_foldFrames_closure(predicate); + newFrames = A._setArrayType([], type$.JSArray_Frame); + for (t1 = this.frames, t2 = A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>"), t1 = new A.ReversedListIterable(t1, t2), t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 instanceof A.UnparsedFrame || !_box_0.predicate.call$1(t3)) + newFrames.push(t3); + else if (newFrames.length === 0 || !_box_0.predicate.call$1(B.JSArray_methods.get$last(newFrames))) + newFrames.push(new A.Frame(t3.get$uri(), t3.get$line(), t3.get$column(), t3.get$member())); + } + t1 = type$.MappedListIterable_Frame_Frame; + newFrames = A.List_List$of(new A.MappedListIterable(newFrames, new A.Trace_foldFrames_closure0(_box_0), t1), true, t1._eval$1("ListIterable.E")); + if (newFrames.length > 1 && _box_0.predicate.call$1(B.JSArray_methods.get$first(newFrames))) + B.JSArray_methods.removeAt$1(newFrames, 0); + return A.Trace$(new A.ReversedListIterable(newFrames, A._arrayInstanceType(newFrames)._eval$1("ReversedListIterable<1>")), this.original._stackTrace); + }, + toString$0(_) { + var t1 = this.frames, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, new A.Trace_toString_closure(new A.MappedListIterable(t1, new A.Trace_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isStackTrace: 1, + get$frames() { + return this.frames; + } + }; + A.Trace_Trace$from_closure.prototype = { + call$0() { + return A.Trace_Trace$parse(this.trace.toString$0(0)); + }, + $signature: 194 + }; + A.Trace__parseVM_closure.prototype = { + call$1(line) { + return line.length !== 0; + }, + $signature: 5 + }; + A.Trace$parseV8_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(line, $.$get$_v8TraceLine()); + }, + $signature: 5 + }; + A.Trace$parseJSCore_closure.prototype = { + call$1(line) { + return line !== "\tat "; + }, + $signature: 5 + }; + A.Trace$parseFirefox_closure.prototype = { + call$1(line) { + return line.length !== 0 && line !== "[native code]"; + }, + $signature: 5 + }; + A.Trace$parseFriendly_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(line, "====="); + }, + $signature: 5 + }; + A.Trace_terse_closure.prototype = { + call$1(_) { + return false; + }, + $signature: 195 + }; + A.Trace_foldFrames_closure.prototype = { + call$1(frame) { + var t1; + if (this.oldPredicate.call$1(frame)) + return true; + if (frame.get$isCore()) + return true; + if (frame.get$$package() === "stack_trace") + return true; + t1 = frame.get$member(); + t1.toString; + if (!B.JSString_methods.contains$1(t1, "")) + return false; + return frame.get$line() == null; + }, + $signature: 195 + }; + A.Trace_foldFrames_closure0.prototype = { + call$1(frame) { + var t1, t2; + if (frame instanceof A.UnparsedFrame || !this._box_0.predicate.call$1(frame)) + return frame; + t1 = frame.get$library(); + t2 = $.$get$_terseRegExp(); + return new A.Frame(A.Uri_parse(A.stringReplaceAllUnchecked(t1, t2, "")), null, null, frame.get$member()); + }, + $signature: 300 + }; + A.Trace_toString_closure0.prototype = { + call$1(frame) { + return frame.get$location().length; + }, + $signature: 191 + }; + A.Trace_toString_closure.prototype = { + call$1(frame) { + if (frame instanceof A.UnparsedFrame) + return frame.toString$0(0) + "\n"; + return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; + }, + $signature: 192 + }; + A.UnparsedFrame.prototype = { + toString$0(_) { + return this.member; + }, + $isFrame: 1, + get$uri() { + return this.uri; + }, + get$line() { + return null; + }, + get$column() { + return null; + }, + get$isCore() { + return false; + }, + get$library() { + return "unparsed"; + }, + get$$package() { + return null; + }, + get$location() { + return "unparsed"; + }, + get$member() { + return this.member; + } + }; + A.TransformByHandlers_transformByHandlers_closure.prototype = { + call$0() { + var t2, subscription, t3, t4, _this = this, t1 = {}; + t1.valuesDone = false; + t2 = _this.controller; + subscription = _this._this.listen$3$onDone$onError(0, new A.TransformByHandlers_transformByHandlers__closure(_this.handleData, t2, _this.S), new A.TransformByHandlers_transformByHandlers__closure0(t1, _this.handleDone, t2), new A.TransformByHandlers_transformByHandlers__closure1(_this.handleError, t2)); + t3 = _this._box_1; + t3.subscription = subscription; + t2.set$onPause(subscription.get$pause(subscription)); + t4 = t3.subscription; + t2.set$onResume(t4.get$resume(t4)); + t2.set$onCancel(new A.TransformByHandlers_transformByHandlers__closure2(t3, t1)); + }, + $signature: 0 + }; + A.TransformByHandlers_transformByHandlers__closure.prototype = { + call$1(value) { + return this.handleData.call$2(value, this.controller); + }, + $signature() { + return this.S._eval$1("~(0)"); + } + }; + A.TransformByHandlers_transformByHandlers__closure1.prototype = { + call$2(error, stackTrace) { + this.handleError.call$3(error, stackTrace, this.controller); + }, + $signature: 55 + }; + A.TransformByHandlers_transformByHandlers__closure0.prototype = { + call$0() { + this._box_0.valuesDone = true; + this.handleDone.call$1(this.controller); + }, + $signature: 0 + }; + A.TransformByHandlers_transformByHandlers__closure2.prototype = { + call$0() { + var t1 = this._box_1, + toCancel = t1.subscription; + t1.subscription = null; + if (!this._box_0.valuesDone) + return toCancel.cancel$0(); + return null; + }, + $signature: 228 + }; + A.RateLimit__debounceAggregate_closure.prototype = { + call$2(value, sink) { + var _this = this, + t1 = _this._box_0, + t2 = new A.RateLimit__debounceAggregate_closure_emit(t1, sink, _this.S), + t3 = t1.timer; + if (t3 != null) + t3.cancel$0(); + t1.soFar = _this.collect.call$2(value, t1.soFar); + t1.hasPending = true; + if (t1.timer == null && _this.leading) { + t1.emittedLatestAsLeading = true; + t2.call$0(); + } else + t1.emittedLatestAsLeading = false; + t1.timer = A.Timer_Timer(_this.duration, new A.RateLimit__debounceAggregate__closure(t1, _this.trailing, t2, sink)); + }, + $signature() { + return this.T._eval$1("@<0>")._bind$1(this.S)._eval$1("~(1,EventSink<2>)"); + } + }; + A.RateLimit__debounceAggregate_closure_emit.prototype = { + call$0() { + var t1 = this._box_0, + t2 = t1.soFar; + if (t2 == null) + t2 = this.S._as(t2); + this.sink.add$1(0, t2); + t1.soFar = null; + t1.hasPending = false; + }, + $signature: 0 + }; + A.RateLimit__debounceAggregate__closure.prototype = { + call$0() { + var t1 = this._box_0, + t2 = t1.emittedLatestAsLeading; + if (!t2) + this.emit.call$0(); + if (t1.shouldClose) + this.sink.close$0(0); + t1.timer = null; + }, + $signature: 0 + }; + A.RateLimit__debounceAggregate_closure0.prototype = { + call$1(sink) { + var t1 = this._box_0; + if (t1.hasPending && this.trailing) + t1.shouldClose = true; + else { + t1 = t1.timer; + if (t1 != null) + t1.cancel$0(); + sink.close$0(0); + } + }, + $signature() { + return this.S._eval$1("~(EventSink<0>)"); + } + }; + A.StringScannerException.prototype = { + get$source() { + return A._asString(this.source); + } + }; + A.LineScanner.prototype = { + scanChar$1(character) { + if (!this.super$StringScanner$scanChar(character)) + return false; + this._adjustLineAndColumn$1(character); + return true; + }, + readChar$0() { + var character = this.super$StringScanner$readChar(); + this._adjustLineAndColumn$1(character); + return character; + }, + _adjustLineAndColumn$1(character) { + var t1, _this = this; + if (character !== 10) + t1 = character === 13 && _this.peekChar$0() !== 10; + else + t1 = true; + if (t1) { + ++_this._line_scanner$_line; + _this._line_scanner$_column = 0; + } else { + t1 = _this._line_scanner$_column; + _this._line_scanner$_column = t1 + (character >= 65536 && character <= 1114111 ? 2 : 1); + } + }, + scan$1(pattern) { + var t1, newlines, t2, _this = this; + if (!_this.super$StringScanner$scan(pattern)) + return false; + t1 = _this.get$lastMatch(); + newlines = _this._newlinesIn$1(t1.pattern); + t1 = _this._line_scanner$_line; + t2 = newlines.length; + _this._line_scanner$_line = t1 + t2; + if (t2 === 0) { + t1 = _this._line_scanner$_column; + t2 = _this.get$lastMatch(); + _this._line_scanner$_column = t1 + t2.pattern.length; + } else { + t1 = _this.get$lastMatch(); + _this._line_scanner$_column = t1.pattern.length - J.get$end$z(B.JSArray_methods.get$last(newlines)); + } + return true; + }, + _newlinesIn$1(text) { + var t1 = $.$get$_newlineRegExp().allMatches$1(0, text), + newlines = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + if (this.peekChar$1(-1) === 13 && this.peekChar$0() === 10) + B.JSArray_methods.removeLast$0(newlines); + return newlines; + } + }; + A.SpanScanner.prototype = { + set$state(state) { + if (state._scanner !== this) + throw A.wrapException(A.ArgumentError$(string$.The_gi, null)); + this.set$position(state.position); + }, + spanFrom$2(startState, endState) { + var endPosition = endState == null ? this._string_scanner$_position : endState.position; + return this._sourceFile.span$2(0, startState.position, endPosition); + }, + spanFrom$1(startState) { + return this.spanFrom$2(startState, null); + }, + matches$1(pattern) { + var t1, t2, _this = this; + if (!_this.super$StringScanner$matches(pattern)) + return false; + t1 = _this._string_scanner$_position; + t2 = _this.get$lastMatch(); + _this._sourceFile.span$2(0, t1, t2.start + t2.pattern.length); + return true; + }, + error$3$length$position(_, message, $length, position) { + var match, t2, _this = this, + t1 = _this.string; + A.validateErrorArgs(t1, null, position, $length); + match = position == null && $length == null ? _this.get$lastMatch() : null; + if (position == null) + position = match == null ? _this._string_scanner$_position : match.start; + if ($length == null) + if (match == null) + $length = 0; + else { + t2 = match.start; + $length = t2 + match.pattern.length - t2; + } + throw A.wrapException(A.StringScannerException$(message, _this._sourceFile.span$2(0, position, position + $length), t1)); + }, + error$1(_, message) { + return this.error$3$length$position(0, message, null, null); + }, + error$2$position(_, message, position) { + return this.error$3$length$position(0, message, null, position); + }, + error$2$length(_, message, $length) { + return this.error$3$length$position(0, message, $length, null); + } + }; + A._SpanScannerState.prototype = {}; + A.StringScanner.prototype = { + set$position(position) { + if (B.JSInt_methods.get$isNegative(position) || position > this.string.length) + throw A.wrapException(A.ArgumentError$("Invalid position " + position, null)); + this._string_scanner$_position = position; + this._lastMatch = null; + }, + get$lastMatch() { + var _this = this; + if (_this._string_scanner$_position !== _this._lastMatchPosition) + _this._lastMatch = null; + return _this._lastMatch; + }, + readChar$0() { + var _this = this, + t1 = _this.string; + if (_this._string_scanner$_position === t1.length) + _this._fail$1("more input"); + return t1.charCodeAt(_this._string_scanner$_position++); + }, + peekChar$1(offset) { + var index; + if (offset == null) + offset = 0; + index = this._string_scanner$_position + offset; + if (index < 0 || index >= this.string.length) + return null; + return this.string.charCodeAt(index); + }, + peekChar$0() { + return this.peekChar$1(null); + }, + scanChar$1(character) { + var t1, t2, t3, t4, _this = this; + if (character >= 65536 && character <= 1114111) { + t1 = _this._string_scanner$_position; + t2 = t1 + 1; + t3 = _this.string; + if (t2 < t3.length) { + t4 = character - 65536; + t2 = t3.charCodeAt(t1) !== B.JSInt_methods._shrOtherPositive$1(t4, 10) + 55296 || t3.charCodeAt(t2) !== (t4 & 1023) + 56320; + } else + t2 = true; + if (t2) + return false; + else { + _this._string_scanner$_position = t1 + 2; + return true; + } + } else { + t1 = _this._string_scanner$_position; + t2 = _this.string; + if (t1 === t2.length) + return false; + if (t2.charCodeAt(t1) !== character) + return false; + _this._string_scanner$_position = t1 + 1; + return true; + } + }, + expectChar$2$name(character, $name) { + if (this.scanChar$1(character)) + return; + if ($name == null) + if (character === 92) + $name = '"\\"'; + else + $name = character === 34 ? '"\\""' : '"' + A.Primitives_stringFromCharCode(character) + '"'; + this._fail$1($name); + }, + expectChar$1(character) { + return this.expectChar$2$name(character, null); + }, + scan$1(pattern) { + var t1, _this = this, + success = _this.matches$1(pattern); + if (success) { + t1 = _this._lastMatch; + _this._lastMatchPosition = _this._string_scanner$_position = t1.start + t1.pattern.length; + } + return success; + }, + expect$1(pattern) { + var t1, $name; + if (this.scan$1(pattern)) + return; + t1 = A.stringReplaceAllUnchecked(pattern, "\\", "\\\\"); + $name = '"' + A.stringReplaceAllUnchecked(t1, '"', '\\"') + '"'; + this._fail$1($name); + }, + expectDone$0() { + if (this._string_scanner$_position === this.string.length) + return; + this._fail$1("no more input"); + }, + matches$1(pattern) { + var _this = this, + t1 = B.JSString_methods.matchAsPrefix$2(pattern, _this.string, _this._string_scanner$_position); + _this._lastMatch = t1; + _this._lastMatchPosition = _this._string_scanner$_position; + return t1 != null; + }, + substring$1(_, start) { + var end = this._string_scanner$_position; + return B.JSString_methods.substring$2(this.string, start, end); + }, + error$3$length$position(_, message, $length, position) { + var match, t2, _this = this, + t1 = _this.string; + A.validateErrorArgs(t1, null, position, $length); + match = position == null && $length == null ? _this.get$lastMatch() : null; + if (position == null) + position = match == null ? _this._string_scanner$_position : match.start; + if ($length == null) + if (match == null) + $length = 0; + else { + t2 = match.start; + $length = t2 + match.pattern.length - t2; + } + throw A.wrapException(A.StringScannerException$(message, A.SourceFile$fromString(t1, _this.sourceUrl).span$2(0, position, position + $length), t1)); + }, + error$1(_, message) { + return this.error$3$length$position(0, message, null, null); + }, + _fail$1($name) { + this.error$3$length$position(0, "expected " + $name + ".", 0, this._string_scanner$_position); + } + }; + A.AsciiGlyphSet.prototype = { + glyphOrAscii$2(glyph, alternative) { + return alternative; + }, + get$horizontalLine() { + return "-"; + }, + get$verticalLine() { + return "|"; + }, + get$topLeftCorner() { + return ","; + }, + get$bottomLeftCorner() { + return "'"; + }, + get$cross() { + return "+"; + }, + get$upEnd() { + return "'"; + }, + get$downEnd() { + return ","; + }, + get$horizontalLineBold() { + return "="; + } + }; + A.UnicodeGlyphSet.prototype = { + glyphOrAscii$2(glyph, alternative) { + return glyph; + }, + get$horizontalLine() { + return "\u2500"; + }, + get$verticalLine() { + return "\u2502"; + }, + get$topLeftCorner() { + return "\u250c"; + }, + get$bottomLeftCorner() { + return "\u2514"; + }, + get$cross() { + return "\u253c"; + }, + get$upEnd() { + return "\u2575"; + }, + get$downEnd() { + return "\u2577"; + }, + get$horizontalLineBold() { + return "\u2501"; + } + }; + A.WatchEvent.prototype = { + toString$0(_) { + return this.type.toString$0(0) + " " + this.path; + } + }; + A.ChangeType.prototype = { + toString$0(_) { + return this._watch_event$_name; + } + }; + A.A98RgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 2.19921875); + }, + fromLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 0.4547069271758437); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { + t1 = $.$get$linearA98RgbToLinearSrgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$linearA98RgbToLinearDisplayP30(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$linearA98RgbToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$linearA98RgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$linearA98RgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$linearA98RgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$linearA98RgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.AnySelectorVisitor0.prototype = { + visitComplexSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure0(this)); + }, + visitCompoundSelector$1(compound) { + return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure0(this)); + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + return selector == null ? false : this.visitSelectorList$1(selector); + }, + visitSelectorList$1(list) { + return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); + }, + visitAttributeSelector$1(attribute) { + return false; + }, + visitClassSelector$1(klass) { + return false; + }, + visitIDSelector$1(id) { + return false; + }, + visitParentSelector$1($parent) { + return false; + }, + visitPlaceholderSelector$1(placeholder) { + return false; + }, + visitTypeSelector$1(type) { + return false; + }, + visitUniversalSelector$1(universal) { + return false; + } + }; + A.AnySelectorVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 52 + }; + A.AnySelectorVisitor_visitCompoundSelector_closure0.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature: 14 + }; + A.SupportsAnything0.prototype = { + toString$0(_) { + return "(" + this.contents.toString$0(0) + ")"; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Argument0.prototype = { + toString$0(_) { + var t1 = this.defaultValue, + t2 = this.name; + return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration0.prototype = { + get$spanWithName() { + var t3, t4, + t1 = this.span, + t2 = t1.file, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, 0, null), 0, null), + i = A.FileLocation$_(t2, t1._file$_start).offset - 1; + while (true) { + if (i > 0) { + t3 = text.charCodeAt(i); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = text.charCodeAt(i); + if (!(t3 === 95 || A.CharacterExtension_get_isAlphabetic0(t3) || t3 >= 128)) + t3 = t3 >= 48 && t3 <= 57 || t3 === 45; + else + t3 = true; + if (!t3) + return t1; + --i; + while (true) { + if (i >= 0) { + t3 = text.charCodeAt(i); + if (t3 !== 95) { + if (!(t3 >= 97 && t3 <= 122)) + t4 = t3 >= 65 && t3 <= 90; + else + t4 = true; + t4 = t4 || t3 >= 128; + } else + t4 = true; + if (!t4) + t3 = t3 >= 48 && t3 <= 57 || t3 === 45; + else + t3 = true; + } else + t3 = false; + if (!t3) + break; + --i; + } + t3 = i + 1; + t4 = text.charCodeAt(t3); + if (!(t4 === 95 || A.CharacterExtension_get_isAlphabetic0(t4) || t4 >= 128)) + return t1; + return A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, t3, A.FileLocation$_(t2, t1._end).offset))); + }, + verify$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument, t4, unknownNames, _this = this, + _s10_ = "invocation", + _s8_ = "argument"; + for (t1 = _this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + t4 = argument.name; + if (t3.containsKey$1(t4)) + throw A.wrapException(A.SassScriptException$0("Argument " + _this._argument_declaration$_originalArgumentName$1(t4) + string$.x20was_p, null)); + } else { + t4 = argument.name; + if (t3.containsKey$1(t4)) + ++namedUsed; + else if (argument.defaultValue == null) + throw A.wrapException(A.MultiSpanSassScriptException$0("Missing argument " + _this._argument_declaration$_originalArgumentName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + } + if (_this.restArgument != null) + return; + if (positional > t2) { + t1 = names.get$isEmpty(0) ? "" : "positional "; + throw A.wrapException(A.MultiSpanSassScriptException$0("Only " + t2 + " " + t1 + A.pluralize0(_s8_, t2, null) + " allowed, but " + positional + " " + A.pluralize0("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + if (namedUsed < t3.get$length(t3)) { + t2 = type$.String; + unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); + unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ArgumentDeclaration_verify_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); + throw A.wrapException(A.MultiSpanSassScriptException$0("No " + A.pluralize0(_s8_, unknownNames._collection$_length, null) + " named " + A.toSentence0(unknownNames.map$1$1(0, new A.ArgumentDeclaration_verify_closure2(), type$.Object), "or") + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); + } + }, + _argument_declaration$_originalArgumentName$1($name) { + var t1, text, t2, _i, argument, t3, t4, end, _null = null; + if ($name === this.restArgument) { + t1 = this.span; + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, _null); + return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); + } + for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (argument.name === $name) { + t1 = argument.defaultValue; + t2 = argument.span; + t3 = t2.file; + t4 = t2._file$_start; + t2 = t2._end; + if (t1 == null) { + t1 = t3._decodedChars; + t1 = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + } else { + t1 = t3._decodedChars; + text = A.String_String$fromCharCodes(new Uint32Array(t1.subarray(t4, A._checkValidRange(t4, t2, t1.length))), 0, _null); + t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); + end = A._lastNonWhitespace0(t1, false); + t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); + } + return t1; + } + } + throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', _null)); + }, + matches$2(positional, names) { + var t1, t2, t3, namedUsed, i, argument; + for (t1 = this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + argument = t1[i]; + if (i < positional) { + if (t3.containsKey$1(argument.name)) + return false; + } else if (t3.containsKey$1(argument.name)) + ++namedUsed; + else if (argument.defaultValue == null) + return false; + } + if (this.restArgument != null) + return true; + if (positional > t2) + return false; + if (namedUsed < t3.get$length(t3)) + return false; + return true; + }, + toString$0(_) { + var t2, t3, _i, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.$arguments, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push("$" + A.S(t2[_i])); + t2 = this.restArgument; + if (t2 != null) + t1.push("$" + t2 + "..."); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentDeclaration_verify_closure1.prototype = { + call$1(argument) { + return argument.name; + }, + $signature: 304 + }; + A.ArgumentDeclaration_verify_closure2.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A.ArgumentInvocation0.prototype = { + get$isEmpty(_) { + var t1; + if (this.positional.length === 0) { + t1 = this.named; + t1 = t1.get$isEmpty(t1) && this.rest == null; + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t2, t3, _i, _1_0, _2_0, _this = this, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = _this.positional, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._argument_invocation$_parenthesizeArgument$1(t2[_i])); + for (t2 = A.MapExtensions_get_pairs0(_this.named, type$.String, type$.Expression_2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + _this._argument_invocation$_parenthesizeArgument$1(t3._1)); + } + _1_0 = _this.rest; + if (_1_0 != null) + t1.push(_this._argument_invocation$_parenthesizeArgument$1(_1_0) + "..."); + _2_0 = _this.keywordRest; + if (_2_0 != null) + t1.push(_this._argument_invocation$_parenthesizeArgument$1(_2_0) + "..."); + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + _argument_invocation$_parenthesizeArgument$1(argument) { + var t1; + $label0$0: { + if (argument instanceof A.ListExpression0 && B.ListSeparator_ECn0 === argument.separator && !argument.hasBrackets && argument.contents.length >= 2) { + t1 = "(" + argument.toString$0(0) + ")"; + break $label0$0; + } + t1 = argument.toString$0(0); + break $label0$0; + } + return t1; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.argumentListClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassArgumentList", new A.argumentListClass__closure())); + A.defineGetter(J.get$$prototype$x(jsClass), "keywords", new A.argumentListClass__closure0(), null); + A.JSClassExtension_injectSuperclass(t1._as(A.SassArgumentList$0(A._setArrayType([], type$.JSArray_Value_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Value_2), B.ListSeparator_undecided_null_undecided0).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.argumentListClass__closure.prototype = { + call$4($self, contents, keywords, separator) { + var t3, + t1 = self.immutable.isOrderedMap(contents) ? J.toArray$0$x(type$.ImmutableList._as(contents)) : type$.List_dynamic._as(contents), + t2 = type$.Value_2; + t1 = J.cast$1$0$ax(t1, t2); + t3 = self.immutable.isOrderedMap(keywords) ? A.immutableMapToDartMap(type$.ImmutableMap._as(keywords)) : A.objectToMap(keywords); + return A.SassArgumentList$0(t1, t3.cast$2$0(0, type$.String, t2), A.jsToDartSeparator(separator)); + }, + call$3($self, contents, keywords) { + return this.call$4($self, contents, keywords, ","); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [","]; + }, + $signature: 306 + }; + A.argumentListClass__closure0.prototype = { + call$1($self) { + $self._argument_list$_wereKeywordsAccessed = true; + return A.dartMapToImmutableMap($self._argument_list$_keywords); + }, + $signature: 307 + }; + A.SassArgumentList0.prototype = {}; + A.JSArray1.prototype = {}; + A.AsyncImporter0.prototype = { + isNonCanonicalScheme$1(scheme) { + return false; + } + }; + A.JSToDartAsyncImporter.prototype = { + canonicalize$1(_, url) { + return this.canonicalize$body$JSToDartAsyncImporter(0, url); + }, + canonicalize$body$JSToDartAsyncImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, t1, result; + var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = A.wrapJSExceptions(new A.JSToDartAsyncImporter_canonicalize_closure($async$self, url)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t1 = self.URL; + if (result instanceof t1) { + $async$returnValue = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + // goto return + $async$goto = 1; + break; + } + A.jsThrow(new self.Error(string$.The_ca)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$1, $async$completer); + }, + load$1(_, url) { + return this.load$body$JSToDartAsyncImporter(0, url); + }, + load$body$JSToDartAsyncImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_ImporterResult_2), + $async$returnValue, $async$self = this, t1, contents, syntax, t2, result; + var $async$load$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = A.wrapJSExceptions(new A.JSToDartAsyncImporter_load_closure($async$self, url)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.nullable_Object), $async$load$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + type$.JSImporterResult._as(result); + t1 = J.getInterceptor$x(result); + contents = t1.get$contents(result); + if (A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") + A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); + syntax = t1.get$syntax(result); + if (contents == null || syntax == null) + A.jsThrow(new self.Error(string$.The_lo)); + t2 = A.parseSyntax(syntax); + $async$returnValue = A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils3__jsToDartUrl$closure()), t2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$load$1, $async$completer); + }, + isNonCanonicalScheme$1(scheme) { + return this._nonCanonicalSchemes.contains$1(0, scheme); + } + }; + A.JSToDartAsyncImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._async0$_canonicalize.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 35 + }; + A.JSToDartAsyncImporter_load_closure.prototype = { + call$0() { + return this.$this._load.call$1(new self.URL(this.url.toString$0(0))); + }, + $signature: 35 + }; + A.AsyncBuiltInCallable0.prototype = { + callbackFor$2(positional, names) { + return new A._Record_2(this._async_built_in0$_arguments, this._async_built_in0$_callback); + }, + withDeprecationWarning$1(module) { + return new A.AsyncBuiltInCallable0(this.name, this._async_built_in0$_arguments, new A.AsyncBuiltInCallable_withDeprecationWarning_closure0(this, module, null), false); + }, + $isAsyncCallable0: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.AsyncBuiltInCallable$mixin_closure0.prototype = { + call$1($arguments) { + return this.$call$body$AsyncBuiltInCallable$mixin_closure0($arguments); + }, + $call$body$AsyncBuiltInCallable$mixin_closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callback.call$1($arguments); + $async$goto = 3; + return A._asyncAwait(t1 instanceof A._Future ? t1 : A._Future$value(t1, type$.void), $async$call$1); + case 3: + // returning from await. + $async$returnValue = B.C__SassNull0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 106 + }; + A.AsyncBuiltInCallable_withDeprecationWarning_closure0.prototype = { + call$1(args) { + A.warnForDeprecation0(string$.Global, B.Deprecation_wdM); + return this.$this._async_built_in0$_callback.call$1(args); + }, + $signature: 310 + }; + A._compileStylesheet_closure2.prototype = { + call$1(url) { + return url === "" ? A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.stylesheet.span.file._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text() : this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + }, + $signature: 6 + }; + A.AsyncEnvironment0.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._async_environment0$_forwardedModules, + t2 = _this._async_environment0$_nestedForwardedModules, + t3 = _this._async_environment0$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._async_environment0$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._async_environment0$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._async_environment0$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.AsyncEnvironment$_0(_this._async_environment0$_modules, _this._async_environment0$_namespaceNodes, _this._async_environment0$_globalModules, _this._async_environment0$_importedModules, t1, t2, _this._async_environment0$_allModules, t3, t4, t5, t6, _this._async_environment0$_content); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._async_environment0$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); + view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.AsyncCallable_2); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._async_environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._async_environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._async_environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._async_environment0$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _async_environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs0(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._async_environment0$_forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : J.get$span$z(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, + forwarded = module._async_environment0$_environment._async_environment0$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._async_environment0$_forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_AsyncCallable_2; + t2 = type$.AstNode_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs0(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._async_environment0$_globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._async_environment0$_variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._async_environment0$_importedModules, t6 = type$.Module_AsyncCallable_2, t7 = type$.AstNode_2, t8 = A.MapExtensions_get_pairs0(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.AsyncCallable_2, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + node = t11._1; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t11 = shadowed.variables; + t12 = false; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.functions; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.mixins; + if (t11.get$isEmpty(t11)) { + t11 = shadowed._shadowed_view0$_inner; + t11 = t11.get$css(t11); + t11 = J.get$isEmpty$asx(t11.get$children(t11)); + } else + t11 = t12; + } else + t11 = t12; + } else + t11 = t12; + if (!t11) + t5.$indexSet(0, shadowed, node); + } + } + for (t6 = A.MapExtensions_get_pairs0(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + node = t8._1; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t8 = shadowed.variables; + t9 = false; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.functions; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.mixins; + if (t8.get$isEmpty(t8)) { + t8 = shadowed._shadowed_view0$_inner; + t8 = t8.get$css(t8); + t8 = J.get$isEmpty$asx(t8.get$children(t8)); + } else + t8 = t9; + } else + t8 = t9; + } else + t8 = t9; + if (!t8) + forwardedModules.$indexSet(0, shadowed, node); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._async_environment0$_nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable_2); + for (t5 = type$.JSArray_Module_AsyncCallable_2, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._async_environment0$_nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._async_environment0$_variableIndices, t6 = _this._async_environment0$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + J.remove$1$z(B.JSArray_methods.get$last(t4), t8); + J.remove$1$z(B.JSArray_methods.get$last(t6), t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._async_environment0$_functionIndices, t4 = _this._async_environment0$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._async_environment0$_mixinIndices, t3 = _this._async_environment0$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment0$_variables[t1], $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._async_environment0$_variables[_0_0], $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment0$_variables[_1_0], $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _async_environment0$_getVariableFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure0($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._async_environment0$_variableNodes[t1], $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._async_environment0$_variableNodes[_0_0], $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment0$_variableNodes[_1_0], $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getVariableNodeFromGlobalModule$1($name); + } + }, + _async_environment0$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._async_environment0$_importedModules, t2 = this._async_environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._async_environment0$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._async_environment0$_variables).containsKey$1($name)) + return true; + return this._async_environment0$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _async_environment0$_variableIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._async_environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._async_environment0$_variables.length === 1) { + _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure2(_this, $name)); + t1 = _this._async_environment0$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._async_environment0$_fromOneModule$3($name, "variable", new A.AsyncEnvironment_setVariable_closure3($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._async_environment0$_variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._async_environment0$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._async_environment0$_variableIndices.containsKey$1($name) && _this._async_environment0$_variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure4(_this, $name)); + if (!_this._async_environment0$_inSemiGlobalScope && index === 0) { + index = _this._async_environment0$_variables.length - 1; + _this._async_environment0$_variableIndices.$indexSet(0, $name, index); + } + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = index; + J.$indexSet$ax(_this._async_environment0$_variables[index], $name, value); + J.$indexSet$ax(_this._async_environment0$_variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._async_environment0$_variables, + t2 = t1.length; + _this._async_environment0$_lastVariableName = $name; + index = _this._async_environment0$_lastVariableIndex = t2 - 1; + _this._async_environment0$_variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._async_environment0$_variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._async_environment0$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._async_environment0$_functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._async_environment0$_functions[_0_0], $name); + return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment0$_functions[_1_0], $name); + return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _async_environment0$_getFunctionFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure0($name)); + }, + _async_environment0$_functionIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._async_environment0$_mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._async_environment0$_mixins[_0_0], $name); + return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._async_environment0$_mixins[_1_0], $name); + return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getMixinFromGlobalModule$1($name); + } + }, + _async_environment0$_getMixinFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure0($name)); + }, + _async_environment0$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + return this.withContent$body$AsyncEnvironment0($content, callback); + }, + withContent$body$AsyncEnvironment0($content, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldContent; + var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldContent = $async$self._async_environment0$_content; + $async$self._async_environment0$_content = $content; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$withContent$2); + case 2: + // returning from await. + $async$self._async_environment0$_content = oldContent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$withContent$2, $async$completer); + }, + asMixin$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldInMixin; + var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInMixin = $async$self._async_environment0$_inMixin; + $async$self._async_environment0$_inMixin = true; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$asMixin$1); + case 2: + // returning from await. + $async$self._async_environment0$_inMixin = oldInMixin; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$asMixin$1, $async$completer); + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { + return this.scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $T); + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; + var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + semiGlobal = semiGlobal && $async$self._async_environment0$_inSemiGlobalScope; + wasInSemiGlobalScope = $async$self._async_environment0$_inSemiGlobalScope; + $async$self._async_environment0$_inSemiGlobalScope = semiGlobal; + $async$goto = !when ? 3 : 4; + break; + case 3: + // then + $async$handler = 5; + $async$goto = 8; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 8: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 6; + break; + $async$next.push(7); + // goto finally + $async$goto = 6; + break; + case 5: + // uncaught + $async$next = [2]; + case 6: + // finally + $async$handler = 2; + $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 7: + // after finally + case 4: + // join + t1 = $async$self._async_environment0$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); + t3 = $async$self._async_environment0$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); + t4 = $async$self._async_environment0$_functions; + t5 = type$.AsyncCallable_2; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = $async$self._async_environment0$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = $async$self._async_environment0$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable_2)); + $async$handler = 9; + $async$goto = 12; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 12: + // returning from await. + t2 = $async$result; + $async$returnValue = t2; + $async$next = [1]; + // goto finally + $async$goto = 10; + break; + $async$next.push(11); + // goto finally + $async$goto = 10; + break; + case 9: + // uncaught + $async$next = [2]; + case 10: + // finally + $async$handler = 2; + $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + $async$self._async_environment0$_lastVariableIndex = $async$self._async_environment0$_lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = $async$self._async_environment0$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = $async$self._async_environment0$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = $async$self._async_environment0$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = $async$self._async_environment0$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 11: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, i, values, nodes, t5, t6, $name, value, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue_2); + for (t2 = this._async_environment0$_variables, t3 = type$.Value_2, t4 = this._async_environment0$_variableNodes, i = 0; i < t2.length; ++i) { + values = t2[i]; + nodes = t4[i]; + for (t5 = A.MapExtensions_get_pairs0(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + t6 = nodes.$index(0, $name); + t6.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, null, t6)); + } + } + return new A.Configuration0(configuration, null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule2(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toModule_closure0())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule2(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty17, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty15, B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure0())); + }, + _async_environment0$_getModule$1(namespace) { + var _0_0 = this._async_environment0$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); + }, + _async_environment0$_fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._async_environment0$_nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._async_environment0$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._async_environment0$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.AsyncCallable_2, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs0(t1, type$.Module_AsyncCallable_2, type$.AstNode_2), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _async_environment0$_fromOneModule$3($name, type, callback) { + return this._async_environment0$_fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.AsyncEnvironment__getVariableFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 311 + }; + A.AsyncEnvironment_setVariable_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._async_environment0$_lastVariableName = this.name; + return t1._async_environment0$_lastVariableIndex = 0; + }, + $signature: 10 + }; + A.AsyncEnvironment_setVariable_closure3.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 312 + }; + A.AsyncEnvironment_setVariable_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._async_environment0$_variableIndex$1(this.name); + return t2 == null ? t1._async_environment0$_variables.length - 1 : t2; + }, + $signature: 10 + }; + A.AsyncEnvironment__getFunctionFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 198 + }; + A.AsyncEnvironment__getMixinFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 198 + }; + A.AsyncEnvironment_toModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); + }, + $signature: 199 + }; + A.AsyncEnvironment_toDummyModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); + }, + $signature: 199 + }; + A._EnvironmentModule2.prototype = { + get$url(_) { + var t1 = this.css; + return t1.get$span(t1).file.url; + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._async_environment0$_modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._async_environment0$_environment; + t2 = t1._async_environment0$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._async_environment0$_variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._async_environment0$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet0(_this.css, _this.extensionStore); + return A._EnvironmentModule$_2(_this._async_environment0$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._async_environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t2, + t1 = this.css; + if (t1.get$span(t1).file.url == null) + t1 = ""; + else { + t1 = t1.get$span(t1).file.url; + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule1: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure17.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 315 + }; + A._EnvironmentModule__EnvironmentModule_closure18.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 271 + }; + A._EnvironmentModule__EnvironmentModule_closure19.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 200 + }; + A._EnvironmentModule__EnvironmentModule_closure20.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 200 + }; + A._EnvironmentModule__EnvironmentModule_closure21.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 127 + }; + A._EnvironmentModule__EnvironmentModule_closure22.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 127 + }; + A._EvaluateVisitor2.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_AsyncBuiltInCallable_2, + metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure38(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure39(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure40(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure41(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure42(_this), _s9_), A.BuiltInCallable$function0("module-variables", _s7_, new A._EvaluateVisitor_closure43(_this), _s9_), A.BuiltInCallable$function0("module-functions", _s7_, new A._EvaluateVisitor_closure44(_this), _s9_), A.BuiltInCallable$function0("module-mixins", _s7_, new A._EvaluateVisitor_closure45(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure46(_this), _s9_), A.BuiltInCallable$function0("get-mixin", _s20_, new A._EvaluateVisitor_closure47(_this), _s9_), new A.AsyncBuiltInCallable0("call", A.ScssParser$0("@function call($function, $args...) {", null, _s9_).parseArgumentDeclaration$0(), new A._EvaluateVisitor_closure48(_this), false)], t1), + metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure49(_this), false, _s9_), A.AsyncBuiltInCallable$mixin0("apply", "$mixin, $args...", new A._EvaluateVisitor_closure50(_this), true, _s9_)], t1); + t1 = type$.AsyncBuiltInCallable_2; + t2 = A.List_List$of($.$get$moduleFunctions0(), true, t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules0(), true, type$.BuiltInModule_AsyncCallable_2), t1.push(metaModule), t2 = t1.length, t3 = _this._async_evaluate0$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_AsyncCallable_2; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, functions); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions0()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._async_evaluate0$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + return this.run$body$_EvaluateVisitor0(0, importer, node); + }, + run$body$_EvaluateVisitor0(_, importer, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure2($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext2($async$self, node)], t1, t1), type$.FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2); + $async$goto = 7; + return A._asyncAwait(type$.Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2._is(t1) ? t1 : A._Future$value(t1, type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), $async$run$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace0(error.withLoadedUrls$1($async$self._async_evaluate0$_loadedUrls), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$run$2, $async$completer); + }, + _async_evaluate0$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _async_evaluate0$_assertInModule$2(value, $name) { + return this._async_evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + return this._loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); + }, + _async_evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _async_evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t2, t1, _0_0; + var $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + _0_0 = $async$self._async_evaluate0$_builtInModules.$index(0, url); + t1.builtInModule = null; + $async$goto = _0_0 != null ? 3 : 4; + break; + case 3: + // then + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration0) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException($async$self._async_evaluate0$_exception$2(t1, t2.get$span(t2))); + } + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure5(t1, callback), type$.void), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure6($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); + }, + _async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + return this._execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); + }, + _async_evaluate0$_execute$2(importer, stylesheet) { + return this._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable_2), + $async$returnValue, $async$self = this, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, url, t1, _0_0; + var $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + url = stylesheet.span.file.url; + t1 = $async$self._async_evaluate0$_modules; + _0_0 = t1.$index(0, url); + if (_0_0 != null) { + t1 = configuration == null; + currentConfiguration = t1 ? $async$self._async_evaluate0$_configuration : configuration; + t2 = $async$self._async_evaluate0$_moduleConfigurations.$index(0, url); + t3 = t2._configuration0$__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration._configuration0$__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = $async$self._async_evaluate0$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? $async$self._async_evaluate0$_exception$1(message) : $async$self._async_evaluate0$_multiSpanException$3(message, "new load", t1)); + } + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + environment = A.AsyncEnvironment$0(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$0(); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure2($async$self, importer, stylesheet, extensionStore, configuration, css, preModuleComments), type$.Null), $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan); + case 3: + // returning from await. + t2 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t2, t3 == null ? B.Map_empty15 : t3, extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + $async$self._async_evaluate0$_moduleConfigurations.$indexSet(0, url, $async$self._async_evaluate0$_configuration); + if (nodeWithSpan != null) + $async$self._async_evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + $async$returnValue = module; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); + }, + _async_evaluate0$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._async_evaluate0$_outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + break $label0$0; + } + t1 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode_2); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _async_evaluate0$_combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure5())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure6(selectors))); + if (_0_0 != null) + this._async_evaluate0$_throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode_2; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_AsyncCallable_2; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule2(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._async_evaluate0$_extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); + }, + _async_evaluate0$_combineCss$1(root) { + return this._async_evaluate0$_combineCss$2$clone(root, false); + }, + _async_evaluate0$_extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure5(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure6()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._async_evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _async_evaluate0$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _async_evaluate0$_indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport0) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment0) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + return this.visitStylesheet$body$_EvaluateVisitor0(0, node); + }, + visitStylesheet$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, _i; + var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.children, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStylesheet$1, $async$completer); + }, + visitAtRootRule$1(_, node) { + return this.visitAtRootRule$body$_EvaluateVisitor0(0, node); + }, + visitAtRootRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, _1_0, resolved, query, $parent, included, t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _0_0; + var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _0_0 = node.query; + $async$goto = _0_0 != null ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(_0_0, true), $async$visitAtRootRule$1); + case 6: + // returning from await. + _1_0 = $async$result; + resolved = _1_0._0; + _1_0._1; + query = A.AtRootQueryParser$0(resolved, $async$self._async_evaluate0$_logger, null).parse$0(0); + // goto join + $async$goto = 4; + break; + case 5: + // else + query = B.AtRootQuery_n2q0; + case 4: + // join + $parent = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); + for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._node$_parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = $async$self._async_evaluate0$_trimIncluded$1(included); + $async$goto = root === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure5($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); + case 9: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 8: + // join + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure6($async$self, node)), $async$visitAtRootRule$1); + case 10: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); + }, + _async_evaluate0$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); + $parent = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._node$_parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_)) + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _async_evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure17(_this, newParent, node), + t1 = query._at_root_query0$_all || query._at_root_query0$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure18(_this, scope); + if (_this._async_evaluate0$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure19(_this, scope); + if (_this._async_evaluate0$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure20(_this, scope); + return _this._async_evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure21()) ? new A._EvaluateVisitor__scopeForAtRoot_closure22(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + return this.visitContentRule$body$_EvaluateVisitor0(0, node); + }, + visitContentRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, $content; + var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $content = $async$self._async_evaluate0$_environment._async_environment0$_content; + if ($content == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure2($async$self, $content), type$.Null), $async$visitContentRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitContentRule$1, $async$completer); + }, + visitDebugRule$1(_, node) { + return this.visitDebugRule$body$_EvaluateVisitor0(0, node); + }, + visitDebugRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, value, t1; + var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); + $async$self._async_evaluate0$_logger.debug$2(0, t1, node.span); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDebugRule$1, $async$completer); + }, + visitDeclaration$1(_, node) { + return this.visitDeclaration$body$_EvaluateVisitor0(0, node); + }, + visitDeclaration$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _box_0; + var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate0$_inUnknownAtRule && !$async$self._async_evaluate0$_inKeyframes) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Declarm, node.span)); + if ($async$self._async_evaluate0$_declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Declarw, node.span)); + siblings = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent")._node$_parent.children; + interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule_2); + if (siblings.get$last(siblings) !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent")) { + if ($async$self._async_evaluate0$_quietDeps) + if (!$async$self._async_evaluate0$_inDependency) { + t1 = $async$self._async_evaluate0$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + t1 = !t1; + } else + t1 = false; + if (t1) + for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent")) + 1, null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t6 = t1.__internal$_current; + rule = t6 == null ? t2._as(t6) : t6; + $label0$1: { + if (rule instanceof A.ModifiableCssComment0) + continue; + t6 = rule instanceof A.ModifiableCssStyleRule0; + rule0 = t6 ? rule : null; + if (t6) { + interleavedRules.push(rule0); + break $label0$1; + } + $async$self._async_evaluate0$_warn$3(string$.Sassx27s, new A.MultiSpan0(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_FGJ); + B.JSArray_methods.clear$0(interleavedRules); + break $label0$1; + } + } + t1 = node.name; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$2$warnForColor(t1, true), $async$visitDeclaration$1); + case 3: + // returning from await. + $name = $async$result; + _1_0 = $async$self._async_evaluate0$_declarationName; + if (_1_0 != null) + $name = new A.CssValue0(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String_2); + _2_0 = node.value; + $async$goto = _2_0 != null ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait(_2_0.accept$1($async$self), $async$visitDeclaration$1); + case 6: + // returning from await. + value = $async$result; + if (!value.get$isBlank() || value.get$asList().length === 0) { + t2 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + t3 = _2_0.get$span(_2_0); + t4 = node.span; + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + t5 = interleavedRules.length === 0 ? null : $async$self._async_evaluate0$_stackTrace$1(t4); + if ($async$self._async_evaluate0$_sourceMap) { + t6 = A.NullableExtension_andThen0(_2_0, $async$self.get$_async_evaluate0$_expressionNode()); + t6 = t6 == null ? null : J.get$span$z(t6); + } else + t6 = null; + t2.addChild$1(A.ModifiableCssDeclaration$0($name, new A.CssValue0(value, t3, type$.CssValue_Value_2), t4, interleavedRules, t1, t5, t6)); + } else if (J.startsWith$1$s($name.value, "--")) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); + case 5: + // join + _3_0 = node.children; + _box_0.children = null; + $async$goto = _3_0 != null ? 7 : 8; + break; + case 7: + // then + _box_0.children = _3_0; + oldDeclarationName = $async$self._async_evaluate0$_declarationName; + $async$self._async_evaluate0$_declarationName = $name.value; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure2(_box_0, $async$self), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); + case 9: + // returning from await. + $async$self._async_evaluate0$_declarationName = oldDeclarationName; + case 8: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDeclaration$1, $async$completer); + }, + visitEachRule$1(_, node) { + return this.visitEachRule$body$_EvaluateVisitor0(0, node); + }, + visitEachRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, _box_0, t1, list, nodeWithSpan, _0_0; + var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + t1 = node.list; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); + case 3: + // returning from await. + list = $async$result; + nodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t1); + _0_0 = node.variables; + $label0$0: { + _box_0.variable = null; + if (_0_0.length === 1) { + _box_0.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure8(_box_0, $async$self, nodeWithSpan); + break $label0$0; + } + _box_0.variables = null; + _box_0.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure9(_box_0, $async$self, nodeWithSpan); + break $label0$0; + } + $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure10($async$self, list, t1, node), true, type$.nullable_Value_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitEachRule$1, $async$completer); + }, + _async_evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._async_evaluate0$_environment.setLocalVariable$3(variables[i], this._async_evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._async_evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + return this.visitErrorRule$body$_EvaluateVisitor0(0, node); + }, + visitErrorRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$self = this, $async$temp1, $async$temp2; + var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$temp2 = J; + $async$goto = 2; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); + case 2: + // returning from await. + throw $async$temp1.wrapException($async$self._async_evaluate0$_exception$2($async$temp2.toString$0$($async$result), node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitErrorRule$1, $async$completer); + }, + visitExtendRule$1(_, node) { + return this.visitExtendRule$body$_EvaluateVisitor0(0, node); + }, + visitExtendRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, targetText, targetMap, compound, styleRule; + var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + styleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || $async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + visitor = A._SerializeVisitor$0(null, true, null, null, true, false, null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; + $async$self._async_evaluate0$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan0(A.SpanExtensions_trimRight0(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_5pG); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(node.selector, true), $async$visitExtendRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + targetText = _0_0._0; + targetMap = _0_0._1; + for (t1 = A.SelectorList_SelectorList$parse0(A.trimAscii0(targetText, true), false, targetMap, $async$self._async_evaluate0$_logger, false).components, t2 = t1.length, t3 = styleRule._style_rule0$_selector._box0$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", complex.span, null)); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, null)); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, $async$self._async_evaluate0$_mediaQueries); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitExtendRule$1, $async$completer); + }, + visitAtRule$1(_, node) { + return this.visitAtRule$body$_EvaluateVisitor0(0, node); + }, + visitAtRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, $name, t1, value, children, wasInKeyframes, wasInUnknownAtRule; + var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1(node.name), $async$visitAtRule$1); + case 3: + // returning from await. + $name = $async$result; + t1 = A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure8($async$self)); + $async$goto = 4; + return A._asyncAwait(type$.Future_nullable_CssValue_String_2._is(t1) ? t1 : A._Future$value(t1, type$.nullable_CssValue_String_2), $async$visitAtRule$1); + case 4: + // returning from await. + value = $async$result; + children = node.children; + if (children == null) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; + if (A.unvendor0($name.value) === "keyframes") + $async$self._async_evaluate0$_inKeyframes = true; + else + $async$self._async_evaluate0$_inUnknownAtRule = true; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure9($async$self, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure10(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitAtRule$1); + case 5: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRule$1, $async$completer); + }, + visitForRule$1(_, node) { + return this.visitForRule$body$_EvaluateVisitor0(0, node); + }, + visitForRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; + var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = node.from; + t3 = type$.SassNumber_2; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure14($async$self, node), t3), $async$visitForRule$1); + case 3: + // returning from await. + fromNumber = $async$result; + t4 = node.to; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure15($async$self, node), t3), $async$visitForRule$1); + case 4: + // returning from await. + toNumber = $async$result; + from = $async$self._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure16(fromNumber)); + to = t1.to = $async$self._async_evaluate0$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure17(toNumber, fromNumber)); + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure18(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForRule$1, $async$completer); + }, + visitForwardRule$1(_, node) { + return this.visitForwardRule$body$_EvaluateVisitor0(0, node); + }, + visitForwardRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; + var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldConfiguration = $async$self._async_evaluate0$_configuration; + adjustedConfiguration = oldConfiguration.throughForward$1(node); + t1 = node.configuration; + t2 = t1.length; + t3 = node.url; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); + case 6: + // returning from await. + newConfiguration = $async$result; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure5($async$self, node), newConfiguration), $async$visitForwardRule$1); + case 7: + // returning from await. + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + $async$self._async_evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$self._async_evaluate0$_configuration = adjustedConfiguration; + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure6($async$self, node)), $async$visitForwardRule$1); + case 8: + // returning from await. + $async$self._async_evaluate0$_configuration = oldConfiguration; + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForwardRule$1, $async$completer); + }, + _async_evaluate0$_addForwardConfiguration$2(configuration, node) { + return this._addForwardConfiguration$body$_EvaluateVisitor0(configuration, node); + }, + _addForwardConfiguration$body$_EvaluateVisitor0(configuration, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration_2), + $async$returnValue, $async$self = this, t2, t3, t4, t5, _i, variable, t6, oldValue, t7, variableNodeWithSpan, t8, t1, newValues, $async$temp1, $async$temp2, $async$temp3; + var $async$_async_evaluate0$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = configuration._configuration0$_values; + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + t2 = node.configuration, t3 = t2.length, t4 = type$._Future_Value_2, t5 = type$.Future_Value_2, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + variable = t2[_i]; + if (variable.isGuarded) { + t6 = variable.name; + oldValue = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t6); + if (oldValue != null) + t7 = !oldValue.value.$eq(0, B.C__SassNull0); + else { + oldValue = null; + t7 = false; + } + if (t7) { + newValues.$indexSet(0, t6, oldValue); + // goto for update + $async$goto = 4; + break; + } + } + t6 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t6); + t7 = variable.name; + t6 = t6.accept$1($async$self); + if (!t5._is(t6)) { + t8 = new A._Future($.Zone__current, t4); + t8._state = 8; + t8._resultOrListeners = t6; + t6 = t8; + } + $async$temp1 = newValues; + $async$temp2 = t7; + $async$temp3 = A; + $async$goto = 6; + return A._asyncAwait(t6, $async$_async_evaluate0$_addForwardConfiguration$2); + case 6: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) { + $async$returnValue = new A.ExplicitConfiguration0(node, newValues, null); + // goto return + $async$goto = 1; + break; + } else { + $async$returnValue = new A.Configuration0(newValues, null); + // goto return + $async$goto = 1; + break; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addForwardConfiguration$2, $async$completer); + }, + _async_evaluate0$_registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this._async_evaluate0$__root; + if (t1 == null) + return; + if (_this._async_evaluate0$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._async_evaluate0$_preModuleComments; + if (t1 == null) + t1 = _this._async_evaluate0$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.List_CssComment_2); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure2()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children._collection$_source, type$.CssComment_2), type$.UnmodifiableListView_CssComment_2)); + _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).clearChildren$0(); + _this._async_evaluate0$__endOfImports = 0; + }, + _async_evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration0$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0, $name, value; + if (!(configuration instanceof A.ExplicitConfiguration0)) + return; + t1 = configuration._configuration0$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + _0_0 = t1.get$first(t1); + $name = _0_0._0; + value = _0_0._1; + t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; + throw A.wrapException(this._async_evaluate0$_exception$2(t1, value.configurationSpan)); + }, + _async_evaluate0$_assertConfigurationIsEmpty$1(configuration) { + return this._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + return this.visitFunctionRule$body$_EvaluateVisitor0(0, node); + }, + visitFunctionRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate0$_inDependency; + t4 = t1._async_environment0$_functions; + index = t4.length - 1; + t5 = node.name; + t1._async_environment0$_functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); + }, + visitIfRule$1(_, node) { + return this.visitIfRule$body$_EvaluateVisitor0(0, node); + }, + visitIfRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, clause; + var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + clause = node.lastClause; + t1 = node.clauses, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + clauseToCheck = t1[_i]; + $async$goto = 6; + return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); + case 6: + // returning from await. + if ($async$result.get$isTruthy()) { + clause = clauseToCheck; + // goto after for + $async$goto = 5; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = A.NullableExtension_andThen0(clause, new A._EvaluateVisitor_visitIfRule_closure2($async$self)); + $async$goto = 7; + return A._asyncAwait(type$.Future_nullable_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Value_2), $async$visitIfRule$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfRule$1, $async$completer); + }, + visitImportRule$1(_, node) { + return this.visitImportRule$body$_EvaluateVisitor0(0, node); + }, + visitImportRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; + var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport_2, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $import = t1[_i]; + $async$goto = $import instanceof A.DynamicImport0 ? 6 : 8; + break; + case 6: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_visitDynamicImport$1($import), $async$visitImportRule$1); + case 9: + // returning from await. + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); + case 10: + // returning from await. + case 7: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitImportRule$1, $async$completer); + }, + _async_evaluate0$_visitDynamicImport$1($import) { + return this._async_evaluate0$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure2(this, $import), type$.void); + }, + _async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + return this._loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport); + }, + _async_evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _async_evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { + return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency_2), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, _3_0, result, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, exception, $async$exception; + var $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + baseUrl = baseUrl; + $async$handler = 4; + $async$self._async_evaluate0$_importSpan = span; + _0_0 = $async$self._async_evaluate0$_importCache; + importCache = null; + $async$goto = _0_0 != null ? 7 : 8; + break; + case 7: + // then + importCache = _0_0; + if (baseUrl == null) + baseUrl = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span.file.url; + $async$goto = 9; + return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate0$_importer, baseUrl, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 9: + // returning from await. + _1_0 = $async$result; + importer = null; + canonicalUrl = null; + originalUrl = null; + $async$goto = type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0) ? 10 : 11; + break; + case 10: + // then + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + $async$self._async_evaluate0$_loadedUrls.add$1(0, canonicalUrl); + isDependency = $async$self._async_evaluate0$_inDependency || !J.$eq$(importer, $async$self._async_evaluate0$_importer); + t1 = importCache; + t2 = importer; + t3 = canonicalUrl; + t4 = originalUrl; + $async$goto = 12; + return A._asyncAwait(t1.importCanonical$4$originalUrl$quiet(t2, t3, t4, $async$self._async_evaluate0$_quietDeps && isDependency), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 12: + // returning from await. + _2_0 = $async$result; + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + $async$returnValue = new A._Record_3_importer_isDependency(t1, t2, isDependency); + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 11: + // join + case 8: + // join + $async$goto = $async$self._async_evaluate0$_nodeImporter != null ? 13 : 14; + break; + case 13: + // then + t1 = baseUrl; + $async$goto = 15; + return A._asyncAwait($async$self._async_evaluate0$_importLikeNode$3(url, t1 == null ? $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span.file.url : t1, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 15: + // returning from await. + _3_0 = $async$result; + result = null; + if (_3_0 != null) { + result = _3_0; + t1 = $async$self._async_evaluate0$_loadedUrls; + A.NullableExtension_andThen0(result._0.span.file.url, t1.get$add(t1)); + t1 = result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 14: + // join + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException0) + throw $async$exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace0($async$self._async_evaluate0$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + A.throwWithTrace0($async$self._async_evaluate0$_exception$1($async$self._async_evaluate0$_getErrorMessage$1(error0)), error0, stackTrace0); + } + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 3: + // uncaught + $async$next = [2]; + case 5: + // finally + $async$handler = 2; + $async$self._async_evaluate0$_importSpan = null; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport, $async$completer); + }, + _async_evaluate0$_importLikeNode$3(originalUrl, previous, forImport) { + return this._importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport); + }, + _importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency), + $async$returnValue, $async$self = this, isDependency, url, t2, t1, result; + var $async$_async_evaluate0$_importLikeNode$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_nodeImporter; + result = t1.loadRelative$3(originalUrl, previous, forImport); + $async$goto = result != null ? 3 : 5; + break; + case 3: + // then + isDependency = $async$self._async_evaluate0$_inDependency; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = 6; + return A._asyncAwait(t1.loadAsync$3(originalUrl, previous, forImport), $async$_async_evaluate0$_importLikeNode$3); + case 6: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + isDependency = true; + case 4: + // join + url = result._1; + t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_scss0; + t2 = $async$self._async_evaluate0$_quietDeps && isDependency ? $.$get$Logger_quiet0() : $async$self._async_evaluate0$_logger; + $async$returnValue = new A._Record_3_importer_isDependency(A.Stylesheet_Stylesheet$parse0(result._0, t1, t2, url), null, isDependency); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_importLikeNode$3, $async$completer); + }, + _async_evaluate0$_visitStaticImport$1($import) { + return this._visitStaticImport$body$_EvaluateVisitor0($import); + }, + _visitStaticImport$body$_EvaluateVisitor0($import) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, node, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1($import.url), $async$_async_evaluate0$_visitStaticImport$1); + case 2: + // returning from await. + t1 = $async$result; + t2 = A.NullableExtension_andThen0($import.modifiers, $async$self.get$_async_evaluate0$_interpolationToValue()); + $async$temp1 = A; + $async$temp2 = t1; + $async$goto = 3; + return A._asyncAwait(type$.Future_nullable_CssValue_String_2._is(t2) ? t2 : A._Future$value(t2, type$.nullable_CssValue_String_2), $async$_async_evaluate0$_visitStaticImport$1); + case 3: + // returning from await. + node = new $async$temp1.ModifiableCssImport0($async$temp2, $async$result, $import.span); + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(node); + else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(node); + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate0$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(node); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitStaticImport$1, $async$completer); + }, + _async_evaluate0$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + return this._applyMixin$body$_EvaluateVisitor0(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent); + }, + _applyMixin$body$_EvaluateVisitor0(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, _0_0, t2, _1_8; + var $async$_async_evaluate0$_applyMixin$5 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (mixin == null) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = type$.AsyncBuiltInCallable_2._is(mixin); + $async$goto = t1 && !mixin.get$acceptsContent() && contentCallable != null ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_applyMixin$5); + case 5: + // returning from await. + t1 = $async$result._values; + _0_0 = mixin.callbackFor$2(J.get$length$asx(t1[2]), new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + case 4: + // join + $async$goto = t1 ? 6 : 7; + break; + case 6: + // then + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate0$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure5($async$self, $arguments, mixin, nodeWithSpanWithoutContent)), $async$_async_evaluate0$_applyMixin$5); + case 8: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 7: + // join + t1 = type$.UserDefinedCallable_AsyncEnvironment_2._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + if (_1_8 instanceof A.MixinRule0) + t2 = !type$.MixinRule_2._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + $async$goto = t1 ? 9 : 10; + break; + case 9: + // then + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure6($async$self, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null), $async$_async_evaluate0$_applyMixin$5); + case 11: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 10: + // join + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + case 2: + // break $label0$0 + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_applyMixin$5, $async$completer); + }, + visitIncludeRule$1(_, node) { + return this.visitIncludeRule$body$_EvaluateVisitor0(0, node); + }, + visitIncludeRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, mixin; + var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + mixin = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure8($async$self, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + $async$self._async_evaluate0$_warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_qBS); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_applyMixin$5(mixin, A.NullableExtension_andThen0(node.content, new A._EvaluateVisitor_visitIncludeRule_closure9($async$self)), node.$arguments, node, new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure10(node))), $async$visitIncludeRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); + }, + visitMixinRule$1(_, node) { + return this.visitMixinRule$body$_EvaluateVisitor0(0, node); + }, + visitMixinRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate0$_inDependency; + t4 = t1._async_environment0$_mixins; + index = t4.length - 1; + t5 = node.name; + t1._async_environment0$_mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMixinRule$1, $async$completer); + }, + visitLoudComment$1(_, node) { + return this.visitLoudComment$body$_EvaluateVisitor0(0, node); + }, + visitLoudComment$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, text; + var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_inFunction) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + t1 = node.text; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(t1), $async$visitLoudComment$1); + case 3: + // returning from await. + text = $async$result; + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(new A.ModifiableCssComment0(text, t1.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLoudComment$1, $async$completer); + }, + visitMediaRule$1(_, node) { + return this.visitMediaRule$body$_EvaluateVisitor0(0, node); + }, + visitMediaRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_visitMediaQueries$1(node.query), $async$visitMediaRule$1); + case 3: + // returning from await. + queries = $async$result; + mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure8($async$self, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty5; + else { + t2 = $async$self._async_evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = $async$self._async_evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure9($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitMediaRule$1); + case 4: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMediaRule$1, $async$completer); + }, + _async_evaluate0$_visitMediaQueries$1(interpolation) { + return this._visitMediaQueries$body$_EvaluateVisitor0(interpolation); + }, + _visitMediaQueries$body$_EvaluateVisitor0(interpolation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery_2), + $async$returnValue, $async$self = this, _0_0; + var $async$_async_evaluate0$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, true), $async$_async_evaluate0$_visitMediaQueries$1); + case 3: + // returning from await. + _0_0 = $async$result; + $async$returnValue = A.CssMediaQuery_parseList0(_0_0._0, _0_0._1, $async$self._async_evaluate0$_logger); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitMediaQueries$1, $async$completer); + }, + _async_evaluate0$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) + $label0$1: { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_00 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_10 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult0; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + break $label0$1; + } + } + return queries; + }, + visitReturnRule$1(_, node) { + return this.visitReturnRule$body$_EvaluateVisitor0(0, node); + }, + visitReturnRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, t2; + var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value_2._is(t2) ? t2 : A._Future$value(t2, type$.Value_2), $async$visitReturnRule$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitReturnRule$1, $async$completer); + }, + visitSilentComment$1(_, node) { + return this.visitSilentComment$body$_EvaluateVisitor0(0, node); + }, + visitSilentComment$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue; + var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSilentComment$1, $async$completer); + }, + visitStyleRule$1(_, node) { + return this.visitStyleRule$body$_EvaluateVisitor0(0, node); + }, + visitStyleRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule; + var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate0$_inKeyframes && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(t1, true), $async$visitStyleRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + selectorText = _0_0._0; + selectorMap = _0_0._1; + $async$goto = $async$self._async_evaluate0$_inKeyframes ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable(A.KeyframeSelectorParser$0(selectorText, selectorMap, $async$self._async_evaluate0$_logger).parse$0(0), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure11($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure12(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitStyleRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + parsedSelector = A.SelectorList_SelectorList$parse0(selectorText, true, selectorMap, $async$self._async_evaluate0$_logger, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss); + t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.fromPlainCss; + nest = t1 !== true; + if (nest) { + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss) + for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + _1_0 = t1[_i].leadingCombinators; + if (_1_0.length >= 1) { + first = _1_0[0]; + t3 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet"); + t3 = t3.plainCss; + } else { + first = null; + t3 = false; + } + if (t3) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Top_lel, first.span)); + } + t1 = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !$async$self._async_evaluate0$_atRootExcludingStyleRule, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss); + } + rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, $async$self._async_evaluate0$_mediaQueries), node.span, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss, parsedSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; + t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule = false; + t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure13() : null; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure14($async$self, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule_2, type$.Null), $async$visitStyleRule$1); + case 7: + // returning from await. + $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + $async$self._async_evaluate0$_warnForBogusCombinators$1(rule); + if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } + if (t1) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStyleRule$1, $async$completer); + }, + _async_evaluate0$_warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) + for (t1 = rule._style_rule0$_selector._box0$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor0)) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_5pG); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_5pG); + } + } else { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight0(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t5.$index(0, 0)); + _this._async_evaluate0$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan0(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure2()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_5pG); + } + } + }, + visitSupportsRule$1(_, node) { + return this.visitSupportsRule$body$_EvaluateVisitor0(0, node); + }, + visitSupportsRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + $async$temp1 = A; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); + case 4: + // returning from await. + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through($async$temp1.ModifiableCssSupportsRule$0(new $async$temp2.CssValue0($async$result, t1.get$span(t1), type$.CssValue_String_2), node.span), new A._EvaluateVisitor_visitSupportsRule_closure5($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure6(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitSupportsRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); + }, + _async_evaluate0$_visitSupportsCondition$1(condition) { + return this._visitSupportsCondition$body$_EvaluateVisitor0(condition); + }, + _visitSupportsCondition$body$_EvaluateVisitor0(condition) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, _box_0, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + $async$goto = condition instanceof A.SupportsOperation0 ? 4 : 5; + break; + case 4: + // then + t1 = condition.operator; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.left, t1), $async$_async_evaluate0$_visitSupportsCondition$1); + case 6: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + " " + t1 + " "; + $async$temp2 = A; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.right, t1), $async$_async_evaluate0$_visitSupportsCondition$1); + case 7: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 5: + // join + $async$goto = condition instanceof A.SupportsNegation0 ? 8 : 9; + break; + case 8: + // then + $async$temp1 = A; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$1(condition.condition), $async$_async_evaluate0$_visitSupportsCondition$1); + case 10: + // returning from await. + t1 = "not " + $async$temp1.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 9: + // join + $async$goto = condition instanceof A.SupportsInterpolation0 ? 11 : 12; + break; + case 11: + // then + $async$goto = 13; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate0$_visitSupportsCondition$1); + case 13: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 12: + // join + _box_0.declaration = null; + $async$goto = condition instanceof A.SupportsDeclaration0 ? 14 : 15; + break; + case 14: + // then + _box_0.declaration = condition; + $async$goto = 16; + return A._asyncAwait($async$self._async_evaluate0$_withSupportsDeclaration$1$1(new A._EvaluateVisitor__visitSupportsCondition_closure2(_box_0, $async$self), type$.String), $async$_async_evaluate0$_visitSupportsCondition$1); + case 16: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 15: + // join + $async$goto = condition instanceof A.SupportsFunction0 ? 17 : 18; + break; + case 17: + // then + $async$temp1 = A; + $async$goto = 19; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.name), $async$_async_evaluate0$_visitSupportsCondition$1); + case 19: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + "("; + $async$temp2 = A; + $async$goto = 20; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.$arguments), $async$_async_evaluate0$_visitSupportsCondition$1); + case 20: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 18: + // join + $async$goto = condition instanceof A.SupportsAnything0 ? 21 : 22; + break; + case 21: + // then + $async$temp1 = A; + $async$goto = 23; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.contents), $async$_async_evaluate0$_visitSupportsCondition$1); + case 23: + // returning from await. + t1 = "(" + $async$temp1.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 22: + // join + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + case 3: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitSupportsCondition$1, $async$completer); + }, + _async_evaluate0$_withSupportsDeclaration$1$1(callback, $T) { + return this._withSupportsDeclaration$body$_EvaluateVisitor0(callback, $T, $T); + }, + _withSupportsDeclaration$body$_EvaluateVisitor0(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, t1, oldInSupportsDeclaration; + var $async$_async_evaluate0$_withSupportsDeclaration$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = true; + $async$handler = 3; + t1 = callback.call$0(); + $async$goto = 6; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_withSupportsDeclaration$1$1); + case 6: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [2]; + case 4: + // finally + $async$handler = 2; + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withSupportsDeclaration$1$1, $async$completer); + }, + _async_evaluate0$_parenthesize$2(condition, operator) { + return this._parenthesize$body$_EvaluateVisitor0(condition, operator); + }, + _async_evaluate0$_parenthesize$1(condition) { + return this._async_evaluate0$_parenthesize$2(condition, null); + }, + _parenthesize$body$_EvaluateVisitor0(condition, operator) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1; + var $async$_async_evaluate0$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (!(condition instanceof A.SupportsNegation0)) + if (condition instanceof A.SupportsOperation0) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$temp1 = A; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); + case 5: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); + case 6: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_parenthesize$2, $async$completer); + }, + visitVariableDeclaration$1(_, node) { + return this.visitVariableDeclaration$body$_EvaluateVisitor0(0, node); + }, + visitVariableDeclaration$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t2, value, t1, $async$temp1, $async$temp2, $async$temp3; + var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + if (node.isGuarded) { + if (node.namespace == null && $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1) { + t2 = $async$self._async_evaluate0$_configuration._configuration0$_values; + t2 = t2.get$isEmpty(t2) ? null : t2.remove$1(0, node.name); + t1.override = null; + if (t2 != null) { + t1.override = t2; + t2 = !t2.value.$eq(0, B.C__SassNull0); + } else + t2 = false; + if (t2) { + $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure8(t1, $async$self, node)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + value = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure9($async$self, node)); + if (value != null && !value.$eq(0, B.C__SassNull0)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + if (node.isGlobal && !$async$self._async_evaluate0$_environment.globalVariableExists$1(node.name)) { + t1 = $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; + $async$self._async_evaluate0$_warn$3(t1, node.span, B.Deprecation_W6Z); + } + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(type$.Future_Value_2._is(t2) ? t2 : A._Future$value(t2, type$.Value_2), $async$visitVariableDeclaration$1); + case 3: + // returning from await. + $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure10($async$self, $async$temp3, $async$self._async_evaluate0$_withoutSlash$2($async$result, t1))); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); + }, + visitUseRule$1(_, node) { + return this.visitUseRule$body$_EvaluateVisitor0(0, node); + }, + visitUseRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, values, t3, t4, _i, variable, t5, variableNodeWithSpan, t6, t7, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = node.configuration; + t2 = t1.length; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + t3 = type$._Future_Value_2, t4 = type$.Future_Value_2, _i = 0; + case 6: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 8; + break; + } + variable = t1[_i]; + t5 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t5); + t6 = variable.name; + t5 = t5.accept$1($async$self); + if (!t4._is(t5)) { + t7 = new A._Future($.Zone__current, t3); + t7._state = 8; + t7._resultOrListeners = t5; + t5 = t7; + } + $async$temp1 = values; + $async$temp2 = t6; + $async$temp3 = A; + $async$goto = 9; + return A._asyncAwait(t5, $async$visitUseRule$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + configuration = new A.ExplicitConfiguration0(node, values, null); + // goto join + $async$goto = 4; + break; + case 5: + // else + configuration = B.Configuration_Map_empty_null0; + case 4: + // join + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure2($async$self, node), configuration), $async$visitUseRule$1); + case 10: + // returning from await. + $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(configuration); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUseRule$1, $async$completer); + }, + visitWarnRule$1(_, node) { + return this.visitWarnRule$body$_EvaluateVisitor0(0, node); + }, + visitWarnRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, value, t1; + var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure2($async$self, node), type$.Value_2), $async$visitWarnRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString0 ? value._string0$_text : $async$self._async_evaluate0$_serialize$2(value, node.expression); + $async$self._async_evaluate0$_logger.warn$2$trace(0, t1, $async$self._async_evaluate0$_stackTrace$1(node.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitWarnRule$1, $async$completer); + }, + visitWhileRule$1(_, node) { + return this._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure2(this, node), true, node.hasDeclarations, type$.nullable_Value_2); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_wdM0 && t1 !== B.BinaryOperator_U770; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._async_evaluate0$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure2(_this, node), type$.Value_2); + }, + _async_evaluate0$_slash$3(left, right, node) { + var t2, _1_1, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber0, + _1_2 = null, right0 = null, + t1 = false; + if (_1_2_isSet) { + t2 = type$.SassNumber_2; + t2._as(left); + if (right instanceof A.SassNumber0) { + t2._as(right); + t1 = node.allowsSlash && this._async_evaluate0$_operandAllowsSlash$1(node.left) && this._async_evaluate0$_operandAllowsSlash$1(node.right); + right0 = right; + _1_2 = right0; + } else + _1_2 = right; + _1_1 = left; + } else { + _1_1 = left; + left = null; + } + if (t1) + return type$.SassNumber_2._as(result).withSlash$2(left, right0); + if (_1_1 instanceof A.SassNumber0) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber0; + else + t1 = false; + if (t1) { + this._async_evaluate0$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation2().call$1(node)) + " or " + A.expressionToCalc0(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_E8a); + return result; + } + return result; + }, + _async_evaluate0$_operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression0) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._async_evaluate0$_environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return this.visitValueExpression$body$_EvaluateVisitor0(0, node); + }, + visitValueExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue; + var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitValueExpression$1, $async$completer); + }, + visitVariableExpression$1(_, node) { + return this.visitVariableExpression$body$_EvaluateVisitor0(0, node); + }, + visitVariableExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result; + var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure2($async$self, node)); + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined variable.", node.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); + }, + visitUnaryOperationExpression$1(_, node) { + return this.visitUnaryOperationExpression$body$_EvaluateVisitor0(0, node); + }, + visitUnaryOperationExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure2($async$temp3, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); + }, + visitBooleanExpression$1(_, node) { + return this.visitBooleanExpression$body$_EvaluateVisitor0(0, node); + }, + visitBooleanExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean_2), + $async$returnValue; + var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); + }, + visitIfExpression$1(_, node) { + return this.visitIfExpression$body$_EvaluateVisitor0(0, node); + }, + visitIfExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, condition, t1, ifTrue, ifFalse, result, _0_0, positional, named; + var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateMacroArguments$1(node), $async$visitIfExpression$1); + case 3: + // returning from await. + _0_0 = $async$result; + positional = _0_0._0; + named = _0_0._1; + $async$self._async_evaluate0$_verifyArguments$4(J.get$length$asx(positional), named, $.$get$IfExpression_declaration0(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + $async$goto = 4; + return A._asyncAwait(condition.accept$1($async$self), $async$visitIfExpression$1); + case 4: + // returning from await. + result = $async$result.get$isTruthy() ? ifTrue : ifFalse; + t1 = result.accept$1($async$self); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$visitIfExpression$1); + case 5: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, $async$self._async_evaluate0$_expressionNode$1(result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfExpression$1, $async$completer); + }, + visitNullExpression$1(_, node) { + return this.visitNullExpression$body$_EvaluateVisitor0(0, node); + }, + visitNullExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue; + var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = B.C__SassNull0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNullExpression$1, $async$completer); + }, + visitNumberExpression$1(_, node) { + return this.visitNumberExpression$body$_EvaluateVisitor0(0, node); + }, + visitNumberExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue; + var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = A.SassNumber_SassNumber0(node.value, node.unit); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._async_evaluate0$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return this.visitColorExpression$body$_EvaluateVisitor0(0, node); + }, + visitColorExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor_2), + $async$returnValue; + var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitColorExpression$1, $async$completer); + }, + visitListExpression$1(_, node) { + return this.visitListExpression$body$_EvaluateVisitor0(0, node); + }, + visitListExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassList_2), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A.mapAsync0(node.contents, new A._EvaluateVisitor_visitListExpression_closure2($async$self), type$.Expression_2, type$.Value_2), $async$visitListExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$temp1.SassList$0($async$result, node.separator, node.hasBrackets); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitListExpression$1, $async$completer); + }, + visitMapExpression$1(_, node) { + return this.visitMapExpression$body$_EvaluateVisitor0(0, node); + }, + visitMapExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap_2), + $async$returnValue, $async$self = this, t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; + var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Value_2; + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); + t2 = node.pairs, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + t4 = t2[_i]; + key = t4._0; + value = t4._1; + $async$goto = 6; + return A._asyncAwait(key.accept$1($async$self), $async$visitMapExpression$1); + case 6: + // returning from await. + keyValue = $async$result; + $async$goto = 7; + return A._asyncAwait(value.accept$1($async$self), $async$visitMapExpression$1); + case 7: + // returning from await. + valueValue = $async$result; + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t1, "second key", t2, $async$self._async_evaluate0$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMapExpression$1, $async$completer); + }, + visitFunctionExpression$1(_, node) { + return this.visitFunctionExpression$body$_EvaluateVisitor0(0, node); + }, + visitFunctionExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t2, _0_0, t3, t4, oldInFunction, result, t1, $function; + var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + $function = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure8($async$self, node)); + t1.$function = $function; + $async$goto = $function == null ? 3 : 5; + break; + case 3: + // then + if (node.namespace != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure9()); + } else + t3 = false; + $async$goto = t3 ? 6 : 7; + break; + case 6: + // then + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, true), $async$visitFunctionExpression$1); + case 8: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 7: + // join + $async$goto = "calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 ? 9 : 10; + break; + case 9: + // then + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculation$1(node), $async$visitFunctionExpression$1); + case 11: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 10: + // join + $function = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate0$_builtInFunctions.$index(0, t2); + t2 = t1.$function = $function == null ? new A.PlainCssCallable0(node.originalName) : $function; + // goto join + $async$goto = 4; + break; + case 5: + // else + t2 = $function; + case 4: + // join + if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) + $async$self._async_evaluate0$_warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_qBS); + oldInFunction = $async$self._async_evaluate0$_inFunction; + $async$self._async_evaluate0$_inFunction = true; + $async$goto = 12; + return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure10(t1, $async$self, node), type$.Value_2), $async$visitFunctionExpression$1); + case 12: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); + }, + _async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculation$body$_EvaluateVisitor0(node, inLegacySassFunction); + }, + _async_evaluate0$_visitCalculation$1(node) { + return this._async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, false); + }, + _visitCalculation$body$_EvaluateVisitor0(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$next = [], $async$self = this, $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, t2, t3, $async$temp1; + var $async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t2 = node.$arguments; + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Rest_a, node.span)); + $async$self._async_evaluate0$_checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + t2 = t2.positional, t4 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t4)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t3; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $arguments = t3; + if ($async$self._async_evaluate0$_inSupportsDeclaration) { + $async$returnValue = new A.SassCalculation0(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + // goto return + $async$goto = 1; + break; + } + oldCallableNode = $async$self._async_evaluate0$_callableNode; + $async$self._async_evaluate0$_callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sqrt", J.$index$asx($arguments, 0), A.number2__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sin", J.$index$asx($arguments, 0), A.number2__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("cos", J.$index$asx($arguments, 0), A.number2__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("tan", J.$index$asx($arguments, 0), A.number2__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("asin", J.$index$asx($arguments, 0), A.number2__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("acos", J.$index$asx($arguments, 0), A.number2__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("atan", J.$index$asx($arguments, 0), A.number2__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min0($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max0($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot0($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan20(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_round0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + $async$self._async_evaluate0$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace0($async$self._async_evaluate0$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + $async$self._async_evaluate0$_callableNode = oldCallableNode; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate0$_checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check2(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _async_evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber0) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) + throw A.wrapException(this._async_evaluate0$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._async_evaluate0$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); + } + } + }, + _async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculationExpression$body$_EvaluateVisitor0(node, inLegacySassFunction); + }, + _visitCalculationExpression$body$_EvaluateVisitor0(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, result, t2, _0_0, _1_0, t3, _i, i, _box_0, t1, inner, $async$temp1; + var $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + t1 = node instanceof A.ParenthesizedExpression0; + inner = t1 ? node.expression : null; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 5: + // returning from await. + result = $async$result; + $async$returnValue = result instanceof A.SassString0 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = node instanceof A.StringExpression0 && node.accept$1(new A._IsCalculationSafeVisitor0()) ? 6 : 7; + break; + case 6: + // then + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? null : t2.toLowerCase(); + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber0(3.141592653589793, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber0(2.718281828459045, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(-1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber0(0 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + $async$temp1 = A; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(t1), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 9: + // returning from await. + t1 = new $async$temp1.SassString0($async$result, false); + // goto break $label0$0 + $async$goto = 8; + break; + case 8: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 7: + // join + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression0; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + $async$goto = t1 ? 10 : 11; + break; + case 10: + // then + $async$self._async_evaluate0$_checkWhitespaceAroundCalculationOperator$1(node); + $async$goto = 12; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure2(_box_0, $async$self, node, inLegacySassFunction), type$.Object), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 12: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 11: + // join + $async$goto = node instanceof A.NumberExpression0 || node instanceof A.VariableExpression0 || node instanceof A.FunctionExpression0 || node instanceof A.IfExpression0 ? 13 : 14; + break; + case 13: + // then + $async$goto = 15; + return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 15: + // returning from await. + _1_0 = $async$result; + $label1$1: { + if (_1_0 instanceof A.SassNumber0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString0) { + t1 = !_1_0._string0$_hasQuotes; + result = _1_0; + } else { + result = null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression($async$self._async_evaluate0$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 14: + // join + $async$goto = node instanceof A.ListExpression0 && !node.hasBrackets && B.ListSeparator_nbm0 === node.separator && node.contents.length >= 2 ? 16 : 17; + break; + case 16: + // then + t1 = A._setArrayType([], type$.JSArray_Object); + t2 = node.contents, t3 = t2.length, _i = 0; + case 18: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 20; + break; + } + $async$temp1 = t1; + $async$goto = 21; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 21: + // returning from await. + $async$temp1.push($async$result); + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + $async$self._async_evaluate0$_checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation0 && t2[i] instanceof A.ParenthesizedExpression0) + t1[i] = new A.SassString0("(" + A.S(t3) + ")", false); + } + $async$returnValue = new A.SassString0(B.JSArray_methods.join$1(t1, " "), false); + // goto return + $async$goto = 1; + break; + case 17: + // join + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.This_e, node.get$span(node))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate0$_checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_u150 && t1 !== B.BinaryOperator_SjO0) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate0$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _async_evaluate0$_binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_u150 === operator) { + t1 = B.CalculationOperator_g2q0; + break $label0$0; + } + if (B.BinaryOperator_SjO0 === operator) { + t1 = B.CalculationOperator_CxF0; + break $label0$0; + } + if (B.BinaryOperator_2No0 === operator) { + t1 = B.CalculationOperator_1710; + break $label0$0; + } + if (B.BinaryOperator_U770 === operator) { + t1 = B.CalculationOperator_Qf10; + break $label0$0; + } + t1 = A.throwExpression(this._async_evaluate0$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _async_evaluate0$_checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString0 || current instanceof A.SassString0) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression0) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_AiQ0 !== _0_2) + t1 = B.UnaryOperator_cLp0 === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression0 && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate0$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._async_evaluate0$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(0, node); + }, + visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result, t1, oldInFunction; + var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); + case 3: + // returning from await. + t1 = $async$result; + oldInFunction = $async$self._async_evaluate0$_inFunction; + $async$self._async_evaluate0$_inFunction = true; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2($async$self, node, new A.PlainCssCallable0(t1)), type$.Value_2), $async$visitInterpolatedFunctionExpression$1); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); + }, + _async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + return this._runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $V); + }, + _runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldCallable, result, evaluated, $name; + var $async$_async_evaluate0$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runUserDefinedCallable$1$4); + case 3: + // returning from await. + evaluated = $async$result; + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = $async$self._async_evaluate0$_currentCallable; + $async$self._async_evaluate0$_currentCallable = callable; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure2($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate0$_runUserDefinedCallable$1$4); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_currentCallable = oldCallable; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runUserDefinedCallable$1$4, $async$completer); + }, + _async_evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + return this._runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); + }, + _runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, $async$exception, $async$temp1; + var $async$_async_evaluate0$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = type$.AsyncBuiltInCallable_2._is(callable) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate0$_runFunctionCallable$3); + case 6: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeWithSpan); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment_2._is(callable) ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure2($async$self, callable), type$.Value_2), $async$_async_evaluate0$_runFunctionCallable$3); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = callable instanceof A.PlainCssCallable0 ? 11 : 13; + break; + case 11: + // then + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + $async$handler = 15; + first = true; + t1 = $arguments.positional, t2 = t1.length, _i = 0; + case 18: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 20; + break; + } + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + $async$temp1 = A; + $async$goto = 21; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$1(argument), $async$_async_evaluate0$_runFunctionCallable$3); + case 21: + // returning from await. + t4 = $async$temp1.S($async$result); + t3._contents += t4; + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + restArg = $arguments.rest; + $async$goto = restArg != null ? 22 : 23; + break; + case 22: + // then + $async$goto = 24; + return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate0$_runFunctionCallable$3); + case 24: + // returning from await. + rest = $async$result; + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = $async$self._async_evaluate0$_serialize$2(rest, restArg); + t1._contents += t2; + case 23: + // join + $async$handler = 2; + // goto after finally + $async$goto = 17; + break; + case 15: + // catch + $async$handler = 14; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw $async$exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw $async$exception; + // goto after finally + $async$goto = 17; + break; + case 14: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 17: + // after finally + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + $async$returnValue = new A.SassString0(t2.charCodeAt(0) == 0 ? t2 : t2, false); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runFunctionCallable$3, $async$completer); + }, + _async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + return this._runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); + }, + _runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, t2, t3, argument, t4, t5, t6, t7, rest, argumentList, exception, _box_0, evaluated, oldCallableNode, $async$exception; + var $async$_async_evaluate0$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runBuiltInCallable$3); + case 3: + // returning from await. + evaluated = $async$result; + oldCallableNode = $async$self._async_evaluate0$_callableNode; + $async$self._async_evaluate0$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(J.get$length$asx(evaluated._values[2]), namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + $async$self._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure8(_box_0, evaluated, namedSet)); + declaredArguments = _box_0.overload.$arguments; + i = J.get$length$asx(evaluated._values[2]), t1 = declaredArguments.length, t2 = type$._Future_Value_2, t3 = type$.Future_Value_2; + case 4: + // for condition + if (!(i < t1)) { + // goto after for + $async$goto = 6; + break; + } + argument = declaredArguments[i]; + t4 = evaluated._values[2]; + t5 = evaluated._values[0].remove$1(0, argument.name); + $async$goto = t5 == null ? 7 : 8; + break; + case 7: + // then + t5 = argument.defaultValue; + t6 = t5.accept$1($async$self); + if (!t3._is(t6)) { + t7 = new A._Future($.Zone__current, t2); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate0$_runBuiltInCallable$3); + case 9: + // returning from await. + t5 = $async$self._async_evaluate0$_withoutSlash$2($async$result, t5); + case 8: + // join + J.add$1$ax(t4, t5); + case 5: + // for update + ++i; + // goto for condition + $async$goto = 4; + break; + case 6: + // after for + if (_box_0.overload.restArgument != null) { + if (J.get$length$asx(evaluated._values[2]) > t1) { + rest = J.sublist$1$ax(evaluated._values[2], t1); + J.removeRange$2$ax(evaluated._values[2], t1, J.get$length$asx(evaluated._values[2])); + } else + rest = B.List_empty20; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$0(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : evaluated._values[4]); + J.add$1$ax(evaluated._values[2], argumentList); + } else + argumentList = null; + result = null; + $async$handler = 11; + $async$goto = 14; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure9(_box_0, evaluated), type$.Value_2), $async$_async_evaluate0$_runBuiltInCallable$3); + case 14: + // returning from await. + result = $async$result; + $async$handler = 2; + // goto after finally + $async$goto = 13; + break; + case 11: + // catch + $async$handler = 10; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException0) + throw $async$exception; + else { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace0($async$self._async_evaluate0$_exception$2($async$self._async_evaluate0$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + // goto after finally + $async$goto = 13; + break; + case 10: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 13: + // after finally + $async$self._async_evaluate0$_callableNode = oldCallableNode; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + if (t1.get$isEmpty(t1)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._argument_list$_wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + t1 = A.pluralize0("argument", J.get$length$asx(t1.get$keys(t1)), null); + t2 = evaluated._values[0]; + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + t1 + " named " + A.toSentence0(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runBuiltInCallable_closure10(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runBuiltInCallable$3, $async$completer); + }, + _async_evaluate0$_evaluateArguments$1($arguments) { + return this._evaluateArguments$body$_EvaluateVisitor0($arguments); + }, + _evaluateArguments$body$_EvaluateVisitor0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, expression, nodeForSpan, t5, t6, named, namedNodes, $name, value, t7, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + positional = A._setArrayType([], type$.JSArray_Value_2); + positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); + t1 = $arguments.positional, t2 = t1.length, t3 = type$._Future_Value_2, t4 = type$.Future_Value_2, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(expression); + t5 = expression.accept$1($async$self); + if (!t4._is(t5)) { + t6 = new A._Future($.Zone__current, t3); + t6._state = 8; + t6._resultOrListeners = t5; + t5 = t6; + } + $async$temp1 = positional; + $async$goto = 6; + return A._asyncAwait(t5, $async$_async_evaluate0$_evaluateArguments$1); + case 6: + // returning from await. + $async$temp1.push($async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); + positionalNodes.push(nodeForSpan); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); + t2 = type$.AstNode_2; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + t5 = A.MapExtensions_get_pairs0($arguments.named, t1, type$.Expression_2), t5 = t5.get$iterator(t5); + case 7: + // for condition + if (!t5.moveNext$0()) { + // goto after for + $async$goto = 8; + break; + } + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(value); + t6 = value.accept$1($async$self); + if (!t4._is(t6)) { + t7 = new A._Future($.Zone__current, t3); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$temp1 = named; + $async$temp2 = $name; + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate0$_evaluateArguments$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + // goto for condition + $async$goto = 7; + break; + case 8: + // after for + restArgs = $arguments.rest; + if (restArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided0]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 10; + return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 10: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure11()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map0$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString_2; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided0; + } else if (rest instanceof A.SassList0) { + t3 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure12($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._list1$_separator; + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure13($async$self, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided0; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 11; + return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 11: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure14()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map0$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString_2; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateArguments$1, $async$completer); + }, + _async_evaluate0$_evaluateMacroArguments$1(invocation) { + return this._evaluateMacroArguments$body$_EvaluateVisitor0(invocation); + }, + _evaluateMacroArguments$body$_EvaluateVisitor0(invocation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_List_Expression_and_Map_String_Expression_2), + $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; + var $async$_async_evaluate0$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = invocation.$arguments; + restArgs_ = t1.rest; + if (restArgs_ == null) { + $async$returnValue = new A._Record_2(t1.positional, t1.named); + // goto return + $async$goto = 1; + break; + } + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); + $async$goto = 3; + return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); + case 3: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap0) + $async$self._async_evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure11(restArgs_)); + else if (rest instanceof A.SassList0) { + t2 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure12($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure13($async$self, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression0($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) { + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } + $async$goto = 4; + return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); + case 4: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure14($async$self, keywordRestNodeForSpan, keywordRestArgs_)); + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateMacroArguments$1, $async$completer); + }, + _async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure2(this, values, convert, this._async_evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _async_evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _async_evaluate0$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure2($arguments, positional, named)); + }, + visitSelectorExpression$1(_, node) { + return this.visitSelectorExpression$body$_EvaluateVisitor0(0, node); + }, + visitSelectorExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1; + var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + $async$returnValue = t1 == null ? B.C__SassNull0 : t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); + }, + visitStringExpression$1(_, node) { + return this.visitStringExpression$body$_EvaluateVisitor0(0, node); + }, + visitStringExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), + $async$returnValue, $async$self = this, t1, t2, t3, _i, value, t4, _0_0, text, oldInSupportsDeclaration; + var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + t2 = node.text.contents, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + value = t2[_i]; + if (typeof value == "string") { + t4 = value; + // goto break $label0$0 + $async$goto = 6; + break; + } + $async$goto = value instanceof A.Expression0 ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait(value.accept$1($async$self), $async$visitStringExpression$1); + case 9: + // returning from await. + _0_0 = $async$result; + $label1$1: { + if (_0_0 instanceof A.SassString0) { + text = _0_0._string0$_text; + t4 = text; + break $label1$1; + } + t4 = $async$self._async_evaluate0$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + // goto break $label0$0 + $async$goto = 6; + break; + case 8: + // join + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + case 6: + // break $label0$0 + t1.push(t4); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = B.JSArray_methods.join$0(t1); + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A.SassString0(t1, node.hasQuotes); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStringExpression$1, $async$completer); + }, + visitSupportsExpression$1(_, expression) { + return this.visitSupportsExpression$body$_EvaluateVisitor0(0, expression); + }, + visitSupportsExpression$body$_EvaluateVisitor0(_, expression) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.SassString0($async$result, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); + }, + visitCssAtRule$1(node) { + return this.visitCssAtRule$body$_EvaluateVisitor0(node); + }, + visitCssAtRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1; + var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor0(t1.value) === "keyframes") + $async$self._async_evaluate0$_inKeyframes = true; + else + $async$self._async_evaluate0$_inUnknownAtRule = true; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure6(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitCssAtRule$1); + case 3: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); + }, + visitCssComment$1(node) { + return this.visitCssComment$body$_EvaluateVisitor0(node); + }, + visitCssComment$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(new A.ModifiableCssComment0(node.text, node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssComment$1, $async$completer); + }, + visitCssDeclaration$1(node) { + return this.visitCssDeclaration$body$_EvaluateVisitor0(node); + }, + visitCssDeclaration$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); + }, + visitCssImport$1(node) { + return this.visitCssImport$body$_EvaluateVisitor0(node); + }, + visitCssImport$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, modifiableNode; + var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(modifiableNode); + else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(modifiableNode); + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate0$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssImport$1, $async$completer); + }, + visitCssKeyframeBlock$1(node) { + return this.visitCssKeyframeBlock$body$_EvaluateVisitor0(node); + }, + visitCssKeyframeBlock$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure6(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitCssKeyframeBlock$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); + }, + visitCssMediaRule$1(node) { + return this.visitCssMediaRule$body$_EvaluateVisitor0(node); + }, + visitCssMediaRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure8($async$self, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty5; + else { + t2 = $async$self._async_evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = $async$self._async_evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure9($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitCssMediaRule$1); + case 3: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); + }, + visitCssStyleRule$1(node) { + return this.visitCssStyleRule$body$_EvaluateVisitor0(node); + }, + visitCssStyleRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild; + var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate0$_inKeyframes && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule; + styleRule = t1 ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t2 = t1 ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t2 = t2 == null ? null : t2.fromPlainCss; + nest = t2 !== true; + t2 = node._style_rule0$_selector._box0$_inner; + if (nest) { + t2 = t2.value; + t3 = styleRule == null ? null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$2(originalSelector, $async$self._async_evaluate0$_mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; + $async$self._async_evaluate0$_atRootExcludingStyleRule = false; + t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure5() : null; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure6($async$self, rule, node), false, t1, type$.ModifiableCssStyleRule_2, type$.Null), $async$visitCssStyleRule$1); + case 2: + // returning from await. + $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _0_1 = t2.get$length(t1); + if (_0_1 >= 1) { + lastChild = t2.elementAt$1(t1, _0_1 - 1); + t1 = styleRule == null; + } else { + lastChild = null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); + }, + visitCssStylesheet$1(node) { + return this.visitCssStylesheet$body$_EvaluateVisitor0(node); + }, + visitCssStylesheet$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax(node.get$children(node)); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + $async$goto = 4; + return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); + }, + visitCssSupportsRule$1(node) { + return this.visitCssSupportsRule$body$_EvaluateVisitor0(node); + }, + visitCssSupportsRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure6(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitCssSupportsRule$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); + }, + _async_evaluate0$_handleReturn$1$2(list, callback) { + return this._handleReturn$body$_EvaluateVisitor0(list, callback); + }, + _async_evaluate0$_handleReturn$2(list, callback) { + return this._async_evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _handleReturn$body$_EvaluateVisitor0(list, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, t1, _i, _0_0; + var $async$_async_evaluate0$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = list.length, _i = 0; + case 3: + // for condition + if (!(_i < list.length)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate0$_handleReturn$1$2); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_handleReturn$1$2, $async$completer); + }, + _async_evaluate0$_withEnvironment$1$2(environment, callback, $T) { + return this._withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $T); + }, + _withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldEnvironment; + var $async$_async_evaluate0$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldEnvironment = $async$self._async_evaluate0$_environment; + $async$self._async_evaluate0$_environment = environment; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withEnvironment$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_environment = oldEnvironment; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withEnvironment$1$2, $async$completer); + }, + _async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + return this._interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor); + }, + _async_evaluate0$_interpolationToValue$1(interpolation) { + return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _async_evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String_2), + $async$returnValue, $async$self = this, result, t1; + var $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor); + case 3: + // returning from await. + result = $async$result; + t1 = trim ? A.trimAscii0(result, true) : result; + $async$returnValue = new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor, $async$completer); + }, + _async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor); + }, + _async_evaluate0$_performInterpolation$1(interpolation) { + return this._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this; + var $async$_async_evaluate0$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor), $async$_async_evaluate0$_performInterpolation$2$warnForColor); + case 3: + // returning from await. + $async$returnValue = $async$result._0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_performInterpolation$2$warnForColor, $async$completer); + }, + _async_evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolationWithMap$body$_EvaluateVisitor0(interpolation, true); + }, + _performInterpolationWithMap$body$_EvaluateVisitor0(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_InterpolationMap_2), + $async$returnValue, $async$self = this, _0_0, result, map; + var $async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), $async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + map = _0_0._1; + map.toString; + $async$returnValue = new A._Record_2(result, map); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor, $async$completer); + }, + _async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + return this._performInterpolationHelper$body$_EvaluateVisitor0(interpolation, sourceMap, warnForColor); + }, + _performInterpolationHelper$body$_EvaluateVisitor0(interpolation, sourceMap, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_nullable_InterpolationMap_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, t7, first, _i, t8, value, result, t9, result0, targetLocations, oldInSupportsDeclaration; + var $async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : null; + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = false; + t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression_2, t4 = targetLocations == null, t5 = type$.JSArray_Object, t6 = interpolation.span, t7 = type$.Object, first = true, _i = 0, t8 = ""; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + value = t1[_i]; + if (!first) + if (!t4) + targetLocations.push(A.SourceLocation$(t8.length, null, null, null)); + if (typeof value == "string") { + t8 += value; + // goto for update + $async$goto = 4; + break; + } + t3._as(value); + $async$goto = 6; + return A._asyncAwait(value.accept$1($async$self), $async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor); + case 6: + // returning from await. + result = $async$result; + if (warnForColor && $.$get$namesByColor0().containsKey$1(result)) { + t9 = A._setArrayType([""], t5); + result0 = A.List_List$from(t9, false, t7); + result0.fixed$length = Array; + result0.immutable$list = Array; + result0 = new A.Interpolation0(result0, t6); + result0.Interpolation$20(t9, t6); + t9 = $.$get$namesByColor0(); + $async$self._async_evaluate0$_warn$2(string$.You_pr + A.S(t9.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t9.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_u150, new A.StringExpression0(result0, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t8 += $async$self._async_evaluate0$_serialize$3$quote(result, value, false); + case 4: + // for update + ++_i, first = false; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A._Record_2(t8.charCodeAt(0) == 0 ? t8 : t8, A.NullableExtension_andThen0(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure2(interpolation))); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor, $async$completer); + }, + _async_evaluate0$_evaluateToCss$2$quote(expression, quote) { + return this._evaluateToCss$body$_EvaluateVisitor0(expression, quote); + }, + _async_evaluate0$_evaluateToCss$1(expression) { + return this._async_evaluate0$_evaluateToCss$2$quote(expression, true); + }, + _evaluateToCss$body$_EvaluateVisitor0(expression, quote) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1; + var $async$_async_evaluate0$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = expression.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$_async_evaluate0$_evaluateToCss$2$quote); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_serialize$3$quote($async$result, expression, quote); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateToCss$2$quote, $async$completer); + }, + _async_evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure2(value, quote)); + }, + _async_evaluate0$_serialize$2(value, nodeWithSpan) { + return this._async_evaluate0$_serialize$3$quote(value, nodeWithSpan, true); + }, + _async_evaluate0$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression0) { + t1 = this._async_evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure2(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + return this._withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $T); + }, + _async_evaluate0$_withParent$2$2(node, callback, $S, $T) { + return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _async_evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, t1, result; + var $async$_async_evaluate0$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate0$_addChild$2$through(node, through); + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + $async$self._async_evaluate0$__parent = node; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate0$_withParent$2$4$scopeWhen$through); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$__parent = t1; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withParent$2$4$scopeWhen$through, $async$completer); + }, + _async_evaluate0$_addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._async_evaluate0$_assertInModule$2(this._async_evaluate0$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._node$_parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode_2._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _async_evaluate0$_addChild$1(node) { + return this._async_evaluate0$_addChild$2$through(node, null); + }, + _async_evaluate0$_withStyleRule$1$2(rule, callback, $T) { + return this._withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $T); + }, + _withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldRule; + var $async$_async_evaluate0$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldRule = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = rule; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStyleRule$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = oldRule; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withStyleRule$1$2, $async$completer); + }, + _async_evaluate0$_withMediaQueries$1$3(queries, sources, callback, $T) { + return this._withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $T); + }, + _withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; + var $async$_async_evaluate0$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + oldMediaQueries = $async$self._async_evaluate0$_mediaQueries; + oldSources = $async$self._async_evaluate0$_mediaQuerySources; + $async$self._async_evaluate0$_mediaQueries = queries; + $async$self._async_evaluate0$_mediaQuerySources = sources; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withMediaQueries$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_mediaQueries = oldMediaQueries; + $async$self._async_evaluate0$_mediaQuerySources = oldSources; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withMediaQueries$1$3, $async$completer); + }, + _async_evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { + return this._withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $T); + }, + _withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldMember, result, t1; + var $async$_async_evaluate0$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_stack; + t1.push(new A._Record_2($async$self._async_evaluate0$_member, nodeWithSpan)); + oldMember = $async$self._async_evaluate0$_member; + $async$self._async_evaluate0$_member = member; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStackFrame$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_member = oldMember; + t1.pop(); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withStackFrame$1$3, $async$completer); + }, + _async_evaluate0$_withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber0) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._async_evaluate0$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation2().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_E8a); + return value.withoutSlash$0(); + }, + _async_evaluate0$_stackFrame$2(member, span) { + return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure2(this))); + }, + _async_evaluate0$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._async_evaluate0$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._async_evaluate0$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._async_evaluate0$_stackFrame$2(_this._async_evaluate0$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _async_evaluate0$_stackTrace$0() { + return this._async_evaluate0$_stackTrace$1(null); + }, + _async_evaluate0$_warn$3(message, span, deprecation) { + var t1, trace, _this = this; + if (_this._async_evaluate0$_quietDeps) + if (!_this._async_evaluate0$_inDependency) { + t1 = _this._async_evaluate0$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._async_evaluate0$_warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._async_evaluate0$_stackTrace$1(span); + t1 = _this._async_evaluate0$_logger; + if (deprecation == null) + t1.warn$3$span$trace(0, message, span, trace); + else + A.WarnForDeprecation_warnForDeprecation0(t1, deprecation, message, span, trace); + }, + _async_evaluate0$_warn$2(message, span) { + return this._async_evaluate0$_warn$3(message, span, null); + }, + _async_evaluate0$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._async_evaluate0$_stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._async_evaluate0$_stackTrace$1(span); + return new A.SassRuntimeException0(t2, B.Set_empty, message, t1); + }, + _async_evaluate0$_exception$1(message) { + return this._async_evaluate0$_exception$2(message, null); + }, + _async_evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._async_evaluate0$_stack)._1; + return A.MultiSpanSassRuntimeException$0(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._async_evaluate0$_stackTrace$0(), null); + }, + _async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, + addStackFrame = true; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace0(t1.withTrace$1(this._async_evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _async_evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, $T) { + return this._addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, addStackFrame, $T, $T); + }, + _async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { + return this._async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, true, $T); + }, + _addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, addStackFrame, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace0(t1.withTrace$1($async$self._async_evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame, $async$completer); + }, + _async_evaluate0$_addExceptionTrace$1$1(callback, $T) { + return this._addExceptionTrace$body$_EvaluateVisitor0(callback, $T, $T); + }, + _addExceptionTrace$body$_EvaluateVisitor0(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; + var $async$_async_evaluate0$_addExceptionTrace$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_addExceptionTrace$1$1); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) + throw $async$exception; + else if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace0(error.withTrace$1($async$self._async_evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addExceptionTrace$1$1, $async$completer); + }, + _async_evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { + return this._addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $T); + }, + _addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, t3, $async$exception; + var $async$_async_evaluate0$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_addErrorSpan$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$currentError; + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw $async$exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = $async$self._async_evaluate0$_stackTrace$0(); + A.throwWithTrace0(new A.SassRuntimeException0(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addErrorSpan$1$2, $async$completer); + }, + _async_evaluate0$_getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + }, + $isExpressionVisitor: 1, + $isStatementVisitor: 1 + }; + A._EvaluateVisitor_closure38.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure39.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._async_evaluate0$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure40.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate0$_environment; + t3 = variable._string0$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._async_evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure41.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure42.prototype = { + call$1($arguments) { + var t1 = this.$this._async_evaluate0$_environment; + if (!t1._async_environment0$_inMixin) + throw A.wrapException(A.SassScriptException$0(string$.conten, null)); + return t1._async_environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure43.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), t4._1); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 33 + }; + A._EvaluateVisitor_closure44.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$functions(module), type$.String, type$.AsyncCallable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassFunction0(t4._1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 33 + }; + A._EvaluateVisitor_closure45.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$mixins(), type$.String, type$.AsyncCallable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassMixin0(t4._1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 33 + }; + A._EvaluateVisitor_closure46.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction0(new A.PlainCssCallable0($name._string0$_text)); + } + t1 = this.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + callable = t1._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure14(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction0(callable); + }, + $signature: 203 + }; + A._EvaluateVisitor__closure14.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string0$_text; + t1 = this.$this; + local = t1._async_evaluate0$_environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._async_evaluate0$_builtInFunctions.$index(0, normalizedName); + }, + $signature: 91 + }; + A._EvaluateVisitor_closure47.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + callable = t1._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure13(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin0(callable); + }, + $signature: 205 + }; + A._EvaluateVisitor__closure13.prototype = { + call$0() { + var t1 = this.$this._async_evaluate0$_environment, + t2 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string0$_text); + }, + $signature: 91 + }; + A._EvaluateVisitor_closure48.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure4($arguments); + }, + $call$body$_EvaluateVisitor_closure4($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, t1, $function, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + $function = t1.$index($arguments, 0); + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression_2); + t4 = type$.String; + t5 = type$.Expression_2; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._argument_list$_wereKeywordsAccessed = true; + t8 = args._argument_list$_keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value_2; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._argument_list$_wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs0(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString0(t11._0, false), t11._1); + } + t2 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation0(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression0(args, t7), t2, t6); + $async$goto = $function instanceof A.SassString0 ? 3 : 4; + break; + case 3: + // then + A.warnForDeprecation0(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_MMc); + callableNode = t1._async_evaluate0$_callableNode; + t2 = $function._string0$_text; + t3 = callableNode.get$span(callableNode); + t1 = t1.visitFunctionExpression$1(0, new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$1); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + t2 = $function.assertFunction$1("function"); + t3 = t1._async_evaluate0$_callableNode; + t3.toString; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate0$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); + case 6: + // returning from await. + t3 = $async$result; + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 106 + }; + A._EvaluateVisitor_closure49.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure3($arguments); + }, + $call$body$_EvaluateVisitor_closure3($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, withMap, t2, values, configuration, t3, t1, url; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; + t1 = $async$self.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + withMap.forEach$1(0, new A._EvaluateVisitor__closure11(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration0(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + t3 = t2.get$span(t2); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure12(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 206 + }; + A._EvaluateVisitor__closure11.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue0(value, this.span, this.callableNode)); + }, + $signature: 92 + }; + A._EvaluateVisitor__closure12.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._async_evaluate0$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 328 + }; + A._EvaluateVisitor_closure50.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure2($arguments); + }, + $call$body$_EvaluateVisitor_closure2($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, callableNode, t2, t3, t4, t5, t1, mixin, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + mixin = t1.$index($arguments, 0); + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + callableNode = t1._async_evaluate0$_callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + t4 = type$.Expression_2; + t5 = A.List_List$unmodifiable(B.List_empty21, t4); + t4 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t4); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_applyMixin$5(mixin.assertMixin$1("mixin").callable, t1._async_evaluate0$_environment._async_environment0$_content, new A.ArgumentInvocation0(t5, t4, new A.ValueExpression0(args, t3), null, t2), callableNode, callableNode), $async$call$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 206 + }; + A._EvaluateVisitor_run_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), + $async$returnValue, $async$self = this, module, t2, t1, _0_0, url; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + _0_0 = t1.span.file.url; + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = $async$self.$this; + t2._async_evaluate0$_activeModules.$indexSet(0, url, null); + if (!(t2._async_evaluate0$_nodeImporter != null && J.toString$0$(url) === "stdin")) + t2._async_evaluate0$_loadedUrls.add$1(0, url); + } + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t2._async_evaluate0$_addExceptionTrace$1$1(new A._EvaluateVisitor_run__closure2(t2, $async$self.importer, t1), type$.Module_AsyncCallable_2), $async$call$0); + case 3: + // returning from await. + module = $async$result; + $async$returnValue = new A._Record_2_loadedUrls_stylesheet(t2._async_evaluate0$_loadedUrls, t2._async_evaluate0$_combineCss$1(module)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 329 + }; + A._EvaluateVisitor_run__closure2.prototype = { + call$0() { + return this.$this._async_evaluate0$_execute$2(this.importer, this.node); + }, + $signature: 330 + }; + A._EvaluateVisitor__loadModule_closure5.prototype = { + call$0() { + return this.callback.call$2(this._box_1.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure6.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__loadModule_closure0(); + }, + $call$body$_EvaluateVisitor__loadModule_closure0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, canonicalUrl, oldInDependency, isDependency, t4, message, t1, stylesheet, importer, t2, t3, _1_0, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + stylesheet = null; + importer = null; + t2 = $async$self.$this; + t3 = $async$self.nodeWithSpan; + $async$goto = 2; + return A._asyncAwait(t2._async_evaluate0$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t3.get$span(t3), $async$self.baseUrl), $async$call$0); + case 2: + // returning from await. + _1_0 = $async$result; + stylesheet = _1_0._0; + importer = _1_0._1; + isDependency = _1_0._2; + canonicalUrl = stylesheet.span.file.url; + if (canonicalUrl != null) { + t4 = t2._async_evaluate0$_activeModules; + if (t4.containsKey$1(canonicalUrl)) { + if ($async$self.namesInErrors) { + t1 = canonicalUrl; + t3 = $.$get$context(); + t1.toString; + message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; + } else + message = string$.Modulel; + t1 = A.NullableExtension_andThen0(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure5(t2, message)); + throw A.wrapException(t1 == null ? t2._async_evaluate0$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._async_evaluate0$_modules.containsKey$1(canonicalUrl); + oldInDependency = t2._async_evaluate0$_inDependency; + t2._async_evaluate0$_inDependency = isDependency; + t1.module = null; + $async$handler = 3; + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(t2._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t3), $async$call$0); + case 6: + // returning from await. + $async$temp1.module = $async$result; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [1]; + case 4: + // finally + $async$handler = 1; + t2._async_evaluate0$_activeModules.remove$1(0, canonicalUrl); + t2._async_evaluate0$_inDependency = oldInDependency; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + $async$goto = 7; + return A._asyncAwait(t2._async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure6(t1, $async$self.callback, !t4), false, type$.void), $async$call$0); + case 7: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$currentError, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__loadModule__closure5.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 93 + }; + A._EvaluateVisitor__loadModule__closure6.prototype = { + call$0() { + return this.callback.call$2(this._box_0.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldPreModuleComments, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate0$_importer; + oldStylesheet = t1._async_evaluate0$__stylesheet; + oldRoot = t1._async_evaluate0$__root; + oldPreModuleComments = t1._async_evaluate0$_preModuleComments; + oldParent = t1._async_evaluate0$__parent; + oldEndOfImports = t1._async_evaluate0$__endOfImports; + oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; + oldExtensionStore = t1._async_evaluate0$__extensionStore; + t2 = t1._async_evaluate0$_atRootExcludingStyleRule; + oldStyleRule = t2 ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + oldMediaQueries = t1._async_evaluate0$_mediaQueries; + oldDeclarationName = t1._async_evaluate0$_declarationName; + oldInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; + oldInKeyframes = t1._async_evaluate0$_inKeyframes; + oldConfiguration = t1._async_evaluate0$_configuration; + t1._async_evaluate0$_importer = $async$self.importer; + t3 = t1._async_evaluate0$__stylesheet = $async$self.stylesheet; + t4 = t3.span; + t5 = t1._async_evaluate0$__parent = t1._async_evaluate0$__root = A.ModifiableCssStylesheet$0(t4); + t1._async_evaluate0$__endOfImports = 0; + t1._async_evaluate0$_outOfOrderImports = null; + t1._async_evaluate0$__extensionStore = $async$self.extensionStore; + t1._async_evaluate0$_declarationName = t1._async_evaluate0$_mediaQueries = t1._async_evaluate0$_styleRuleIgnoringAtRoot = null; + t1._async_evaluate0$_inKeyframes = t1._async_evaluate0$_atRootExcludingStyleRule = t1._async_evaluate0$_inUnknownAtRule = false; + t6 = $async$self.configuration; + if (t6 != null) + t1._async_evaluate0$_configuration = t6; + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t3), $async$call$0); + case 2: + // returning from await. + t3 = t1._async_evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._async_evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); + $async$self.css.__late_helper$_value = t3; + $async$self.preModuleComments.__late_helper$_value = t1._async_evaluate0$_preModuleComments; + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = oldStylesheet; + t1._async_evaluate0$__root = oldRoot; + t1._async_evaluate0$_preModuleComments = oldPreModuleComments; + t1._async_evaluate0$__parent = oldParent; + t1._async_evaluate0$__endOfImports = oldEndOfImports; + t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; + t1._async_evaluate0$__extensionStore = oldExtensionStore; + t1._async_evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._async_evaluate0$_mediaQueries = oldMediaQueries; + t1._async_evaluate0$_declarationName = oldDeclarationName; + t1._async_evaluate0$_inUnknownAtRule = oldInUnknownAtRule; + t1._async_evaluate0$_atRootExcludingStyleRule = t2; + t1._async_evaluate0$_inKeyframes = oldInKeyframes; + t1._async_evaluate0$_configuration = oldConfiguration; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__combineCss_closure5.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 127 + }; + A._EvaluateVisitor__combineCss_closure6.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__combineCss_visitModule2.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._async_evaluate0$_indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 332 + }; + A._EvaluateVisitor__extendModules_closure5.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__extendModules_closure6.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore_2); + }, + $signature: 215 + }; + A._EvaluateVisitor_visitAtRootRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRootRule_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__scopeForAtRoot_closure17.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); + t1._async_evaluate0$__parent = $async$self.newParent; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$__parent = t2; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure18.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldAtRootExcludingStyleRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldAtRootExcludingStyleRule = t1._async_evaluate0$_atRootExcludingStyleRule; + t1._async_evaluate0$_atRootExcludingStyleRule = true; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure19.prototype = { + call$1(callback) { + return this.$this._async_evaluate0$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure2(this.innerScope, callback), type$.Null); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot__closure2.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 2 + }; + A._EvaluateVisitor__scopeForAtRoot_closure20.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInKeyframes; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInKeyframes = t1._async_evaluate0$_inKeyframes; + t1._async_evaluate0$_inKeyframes = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_inKeyframes = wasInKeyframes; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure21.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule0; + }, + $signature: 207 + }; + A._EvaluateVisitor__scopeForAtRoot_closure22.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInUnknownAtRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; + t1._async_evaluate0$_inUnknownAtRule = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitContentRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$returnValue, $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitDeclaration_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._box_0.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitEachRule_closure8.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._async_evaluate0$_environment.setLocalVariable$3(this._box_0.variable, t1._async_evaluate0$_withoutSlash$2(value, t2), t2); + }, + $signature: 59 + }; + A._EvaluateVisitor_visitEachRule_closure9.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); + }, + $signature: 59 + }; + A._EvaluateVisitor_visitEachRule_closure10.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._async_evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure2(t1, _this.setVariables, _this.node)); + }, + $signature: 68 + }; + A._EvaluateVisitor_visitEachRule__closure2.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._async_evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure2(t1)); + }, + $signature: 337 + }; + A._EvaluateVisitor_visitEachRule___closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 96 + }; + A._EvaluateVisitor_visitAtRule_closure8.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 339 + }; + A._EvaluateVisitor_visitAtRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null || t1._async_evaluate0$_inKeyframes || J.$eq$($async$self.name.value, "font-face") ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule._style_rule0$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure2(t1, $async$self.children), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure10.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitForRule_closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 209 + }; + A._EvaluateVisitor_visitForRule_closure15.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 209 + }; + A._EvaluateVisitor_visitForRule_closure16.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure17.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure18.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, _0_0, t1, t2, nodeWithSpan; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + nodeWithSpan = t1._async_evaluate0$_expressionNode$1(t2.from); + i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; + case 3: + // for condition + if (!(i !== t3.to)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1._async_evaluate0$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure2(t1)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + i += t4; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 68 + }; + A._EvaluateVisitor_visitForRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 96 + }; + A._EvaluateVisitor_visitForwardRule_closure5.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate0$_registerCommentsForModule$1(module); + this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 119 + }; + A._EvaluateVisitor_visitForwardRule_closure6.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate0$_registerCommentsForModule$1(module); + this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 119 + }; + A._EvaluateVisitor__registerCommentsForModule_closure2.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment_2); + }, + $signature: 210 + }; + A._EvaluateVisitor_visitIfRule_closure2.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure2(t1, clause), true, clause.hasDeclarations, type$.nullable_Value_2); + }, + $signature: 344 + }; + A._EvaluateVisitor_visitIfRule__closure2.prototype = { + call$0() { + var t1 = this.$this; + return t1._async_evaluate0$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure2(t1)); + }, + $signature: 68 + }; + A._EvaluateVisitor_visitIfRule___closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 96 + }; + A._EvaluateVisitor__visitDynamicImport_closure2.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__visitDynamicImport_closure0(); + }, + $call$body$_EvaluateVisitor__visitDynamicImport_closure0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t1, t2, _0_0, stylesheet, importer, isDependency, url, t3, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = $async$self.$this; + t2 = $async$self.$import; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + url = stylesheet.span.file.url; + if (url != null) { + t3 = t1._async_evaluate0$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure11(t1)); + throw A.wrapException(t2 == null ? t1._async_evaluate0$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._stylesheet1$_uses; + t3 = type$.UnmodifiableListView_UseRule_2; + $async$goto = new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2).get$length(0) === 0 ? 4 : 5; + break; + case 4: + // then + oldImporter = t1._async_evaluate0$_importer; + t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); + oldInDependency = t1._async_evaluate0$_inDependency; + t1._async_evaluate0$_importer = importer; + t1._async_evaluate0$__stylesheet = stylesheet; + t1._async_evaluate0$_inDependency = isDependency; + $async$goto = 6; + return A._asyncAwait(t1.visitStylesheet$1(0, stylesheet), $async$call$0); + case 6: + // returning from await. + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = t2; + t1._async_evaluate0$_inDependency = oldInDependency; + t1._async_evaluate0$_activeModules.remove$1(0, url); + // goto return + $async$goto = 1; + break; + case 5: + // join + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure12())) { + t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure13()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._async_evaluate0$_environment; + t3 = type$.String; + t4 = type$.Module_AsyncCallable_2; + t5 = type$.AstNode_2; + t6 = A._setArrayType([], type$.JSArray_Module_AsyncCallable_2); + t7 = t2._async_environment0$_variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._async_environment0$_variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._async_environment0$_functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._async_environment0$_mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.AsyncEnvironment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment0$_importedModules, null, null, t6, t7, t8, t9, t10, t2._async_environment0$_content); + $async$goto = 7; + return A._asyncAwait(t1._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure14(_box_0, t1, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); + case 7: + // returning from await. + module = environment.toDummyModule$0(); + t1._async_evaluate0$_environment.importForwards$1(module); + $async$goto = loadsUserDefinedModules ? 8 : 9; + break; + case 8: + // then + $async$goto = module.transitivelyContainsCss ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(t1._async_evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); + case 12: + // returning from await. + case 11: + // join + visitor = new A._ImportedCssVisitor2(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + case 9: + // join + t1._async_evaluate0$_activeModules.remove$1(0, url); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__visitDynamicImport__closure11.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 93 + }; + A._EvaluateVisitor__visitDynamicImport__closure12.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 211 + }; + A._EvaluateVisitor__visitDynamicImport__closure13.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 212 + }; + A._EvaluateVisitor__visitDynamicImport__closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t7, t8, t1, oldImporter, t2, t3, t4, t5, oldOutOfOrderImports, oldConfiguration, oldInDependency, t6; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate0$_importer; + t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); + t3 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root"); + t4 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); + t5 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, "_endOfImports"); + oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; + oldConfiguration = t1._async_evaluate0$_configuration; + oldInDependency = t1._async_evaluate0$_inDependency; + t6 = $async$self._box_0; + t1._async_evaluate0$_importer = t6.importer; + t7 = t6.stylesheet; + t1._async_evaluate0$__stylesheet = t7; + t8 = $async$self.loadsUserDefinedModules; + if (t8) { + t7 = A.ModifiableCssStylesheet$0(t7.span); + t1._async_evaluate0$__root = t7; + t1._async_evaluate0$__parent = t1._async_evaluate0$_assertInModule$2(t7, "_root"); + t1._async_evaluate0$__endOfImports = 0; + t1._async_evaluate0$_outOfOrderImports = null; + } + t1._async_evaluate0$_inDependency = t6.isDependency; + t7 = new A.UnmodifiableListView(t6.stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + if (!t7.get$isEmpty(t7)) + t1._async_evaluate0$_configuration = $async$self.environment.toImplicitConfiguration$0(); + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t6.stylesheet), $async$call$0); + case 2: + // returning from await. + t6 = t8 ? t1._async_evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + $async$self.children.__late_helper$_value = t6; + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = t2; + if (t8) { + t1._async_evaluate0$__root = t3; + t1._async_evaluate0$__parent = t4; + t1._async_evaluate0$__endOfImports = t5; + t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; + } + t1._async_evaluate0$_configuration = oldConfiguration; + t1._async_evaluate0$_inDependency = oldInDependency; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure6(t1, $async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin__closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self.$this._async_evaluate0$_runBuiltInCallable$3($async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor__applyMixin__closure5(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin__closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure2(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, t4, t5, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpanWithoutContent, t5 = type$.nullable_Value_2, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t3._async_evaluate0$_addErrorSpan$1$2(t4, new A._EvaluateVisitor__applyMixin____closure2(t3, t1[_i]), t5), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 31 + }; + A._EvaluateVisitor__applyMixin____closure2.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 68 + }; + A._EvaluateVisitor_visitIncludeRule_closure8.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 91 + }; + A._EvaluateVisitor_visitIncludeRule_closure9.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable0($content, t1._async_evaluate0$_environment.closure$0(), t1._async_evaluate0$_inDependency, type$.UserDefinedCallable_AsyncEnvironment_2); + }, + $signature: 347 + }; + A._EvaluateVisitor_visitIncludeRule_closure10.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 30 + }; + A._EvaluateVisitor_visitMediaRule_closure8.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 97 + }; + A._EvaluateVisitor_visitMediaRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure10.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure11.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure12.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure13.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure2.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitSupportsRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure6.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor__visitSupportsCondition_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_evaluateToCss$1(t2.declaration.name), $async$call$0); + case 3: + // returning from await. + t3 = $async$temp1.S($async$result); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + $async$temp1 = "(" + t3 + ":" + t4; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate0$_evaluateToCss$1(t2.declaration.value), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 179 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure8.prototype = { + call$0() { + var t1 = this.$this._async_evaluate0$_environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure9.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 43 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure10.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._async_evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure2.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._async_evaluate0$_registerCommentsForModule$1(module); + t1 = this.$this._async_evaluate0$_environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._async_environment0$_globalModules.$indexSet(0, module, t2); + t1._async_environment0$_allModules.push(module); + _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._async_environment0$_variables)), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$0(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._async_environment0$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._async_environment0$_namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$0(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._async_environment0$_namespaceNodes.$indexSet(0, t3, t2); + t1._async_environment0$_allModules.push(module); + } + }, + $signature: 119 + }; + A._EvaluateVisitor_visitWarnRule_closure2.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 70 + }; + A._EvaluateVisitor_visitWhileRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; + case 3: + // for condition + $async$goto = 5; + return A._asyncAwait(t2.accept$1(t3), $async$call$0); + case 5: + // returning from await. + if (!$async$result.get$isTruthy()) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 6; + return A._asyncAwait(t3._async_evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure2(t3)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + // goto for condition + $async$goto = 3; + break; + case 4: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 68 + }; + A._EvaluateVisitor_visitWhileRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 96 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t3, t1, t2, left, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); + case 3: + // returning from await. + left = $async$result; + case 4: + // switch + switch (t1.operator) { + case B.BinaryOperator_wdM0: + // goto case + $async$goto = 6; + break; + case B.BinaryOperator_qNM0: + // goto case + $async$goto = 7; + break; + case B.BinaryOperator_eDt0: + // goto case + $async$goto = 8; + break; + case B.BinaryOperator_g8k0: + // goto case + $async$goto = 9; + break; + case B.BinaryOperator_icU0: + // goto case + $async$goto = 10; + break; + case B.BinaryOperator_bEa0: + // goto case + $async$goto = 11; + break; + case B.BinaryOperator_oEm0: + // goto case + $async$goto = 12; + break; + case B.BinaryOperator_miq0: + // goto case + $async$goto = 13; + break; + case B.BinaryOperator_SPQ0: + // goto case + $async$goto = 14; + break; + case B.BinaryOperator_u150: + // goto case + $async$goto = 15; + break; + case B.BinaryOperator_SjO0: + // goto case + $async$goto = 16; + break; + case B.BinaryOperator_2No0: + // goto case + $async$goto = 17; + break; + case B.BinaryOperator_U770: + // goto case + $async$goto = 18; + break; + case B.BinaryOperator_KNx0: + // goto case + $async$goto = 19; + break; + default: + // goto default + $async$goto = 20; + break; + } + break; + case 6: + // case + t1 = t1.right.accept$1(t2); + $async$goto = 21; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 21: + // returning from await. + t1 = $async$result; + t1 = new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(t1, false, true), false); + // goto after switch + $async$goto = 5; + break; + case 7: + // case + $async$goto = left.get$isTruthy() ? 22 : 24; + break; + case 22: + // then + t1 = left; + // goto join + $async$goto = 23; + break; + case 24: + // else + t1 = t1.right.accept$1(t2); + $async$goto = 25; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 25: + // returning from await. + t1 = $async$result; + case 23: + // join + // goto after switch + $async$goto = 5; + break; + case 8: + // case + $async$goto = left.get$isTruthy() ? 26 : 28; + break; + case 26: + // then + t1 = t1.right.accept$1(t2); + $async$goto = 29; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 29: + // returning from await. + t1 = $async$result; + // goto join + $async$goto = 27; + break; + case 28: + // else + t1 = left; + case 27: + // join + // goto after switch + $async$goto = 5; + break; + case 9: + // case + $async$temp1 = left; + $async$goto = 30; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 30: + // returning from await. + t1 = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto after switch + $async$goto = 5; + break; + case 10: + // case + $async$temp1 = left; + $async$goto = 31; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 31: + // returning from await. + t1 = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto after switch + $async$goto = 5; + break; + case 11: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 32; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 32: + // returning from await. + t1 = $async$temp1.greaterThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 12: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 33; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 33: + // returning from await. + t1 = $async$temp1.greaterThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 13: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 34; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 34: + // returning from await. + t1 = $async$temp1.lessThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 14: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 35; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 35: + // returning from await. + t1 = $async$temp1.lessThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 15: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 36; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 36: + // returning from await. + t1 = $async$temp1.plus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 16: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 37; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 37: + // returning from await. + t1 = $async$temp1.minus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 17: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 38; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 38: + // returning from await. + t1 = $async$temp1.times$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 18: + // case + t3 = t1.right.accept$1(t2); + $async$temp1 = t2; + $async$temp2 = left; + $async$goto = 39; + return A._asyncAwait(type$.Future_Value_2._is(t3) ? t3 : A._Future$value(t3, type$.Value_2), $async$call$0); + case 39: + // returning from await. + t1 = $async$temp1._async_evaluate0$_slash$3($async$temp2, $async$result, t1); + // goto after switch + $async$goto = 5; + break; + case 19: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 40; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 40: + // returning from await. + t1 = $async$temp1.modulo$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 20: + // default + t1 = null; + case 5: + // after switch + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 70 + }; + A._EvaluateVisitor__slash_recommendation2.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression0 && B.BinaryOperator_U770 === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression0) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 115 + }; + A._EvaluateVisitor_visitVariableExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 43 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure2.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator) { + case B.UnaryOperator_cLp0: + t1 = _this.operand.unaryPlus$0(); + break; + case B.UnaryOperator_AiQ0: + t1 = _this.operand.unaryMinus$0(); + break; + case B.UnaryOperator_SJr0: + t1 = new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); + break; + case B.UnaryOperator_not_not_not0: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 47 + }; + A._EvaluateVisitor_visitListExpression_closure2.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 353 + }; + A._EvaluateVisitor_visitFunctionExpression_closure8.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 91 + }; + A._EvaluateVisitor_visitFunctionExpression_closure9.prototype = { + call$1(argument) { + return argument.accept$1(new A._IsCalculationSafeVisitor0()); + }, + $signature: 139 + }; + A._EvaluateVisitor_visitFunctionExpression_closure10.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 70 + }; + A._EvaluateVisitor__checkCalculationArguments_check2.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._async_evaluate0$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._async_evaluate0$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize0("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize0("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 84 + }; + A._EvaluateVisitor__visitCalculationExpression_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, $async$temp1, $async$temp2, $async$temp3; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + t3 = $async$self.inLegacySassFunction; + $async$temp1 = A; + $async$temp2 = t1._async_evaluate0$_binaryOperatorToCalculationOperator$2(t2.operator, $async$self.node); + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t3), $async$call$0); + case 3: + // returning from await. + $async$temp3 = $async$result; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t3), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1.SassCalculation_operateInternal0($async$temp2, $async$temp3, $async$result, t3, !t1._async_evaluate0$_inSupportsDeclaration); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 182 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 70 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure2.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable, + t3 = _this.V; + return t1._async_evaluate0$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure2(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure2.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._async_evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure2(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure2.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure0(this.V); + }, + $call$body$_EvaluateVisitor__runUserDefinedCallable___closure0($async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, t1, t2, t3, t4, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.evaluated._values; + t3 = $async$self.callable.declaration.$arguments; + t4 = $async$self.nodeWithSpan; + t1._async_evaluate0$_verifyArguments$4(J.get$length$asx(t2[2]), t2[0], t3, t4); + declaredArguments = t3.$arguments; + t5 = declaredArguments.length; + minLength = Math.min(J.get$length$asx(t2[2]), t5); + for (i = 0; i < minLength; ++i) + t1._async_evaluate0$_environment.setLocalVariable$3(declaredArguments[i].name, J.$index$asx(t2[2], i), J.$index$asx(t2[3], i)); + i = J.get$length$asx(t2[2]); + case 3: + // for condition + if (!(i < t5)) { + // goto after for + $async$goto = 5; + break; + } + argument = declaredArguments[i]; + t6 = t2[0]; + t7 = argument.name; + value = t6.remove$1(0, t7); + $async$goto = value == null ? 6 : 7; + break; + case 6: + // then + t6 = argument.defaultValue; + $async$temp1 = t1; + $async$goto = 8; + return A._asyncAwait(t6.accept$1(t1), $async$call$0); + case 8: + // returning from await. + value = $async$temp1._async_evaluate0$_withoutSlash$2($async$result, t1._async_evaluate0$_expressionNode$1(t6)); + case 7: + // join + t6 = t1._async_evaluate0$_environment; + t8 = t2[1].$index(0, t7); + if (t8 == null) { + t8 = argument.defaultValue; + t8.toString; + t8 = t1._async_evaluate0$_expressionNode$1(t8); + } + t6.setLocalVariable$3(t7, value, t8); + case 4: + // for update + ++i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + restArgument = t3.restArgument; + if (restArgument != null) { + rest = J.get$length$asx(t2[2]) > t5 ? J.sublist$1$ax(t2[2], t5) : B.List_empty20; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$0(rest, t5, t6 === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : t6); + t1._async_evaluate0$_environment.setLocalVariable$3(restArgument, argumentList, t4); + } else + argumentList = null; + $async$goto = 9; + return A._asyncAwait($async$self.run.call$0(), $async$call$0); + case 9: + // returning from await. + result = $async$result; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + if (t5.get$isEmpty(t5)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._argument_list$_wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + argumentWord = A.pluralize0("argument", J.get$length$asx(t5.get$keys(t5)), null); + t2 = t2[0]; + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + argumentWord + " named " + A.toSentence0(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runUserDefinedCallable____closure2(), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate0$_stackTrace$1(t4.get$span(t4)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure2.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); + case 6: + // returning from await. + $returnValue = $async$result; + if ($returnValue instanceof A.Value0) { + $async$returnValue = $returnValue; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + throw A.wrapException(t4._async_evaluate0$_exception$2("Function finished without @return.", t1.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 70 + }; + A._EvaluateVisitor__runBuiltInCallable_closure8.prototype = { + call$0() { + return this._box_0.overload.verify$2(J.get$length$asx(this.evaluated._values[2]), this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure9.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 355 + }; + A._EvaluateVisitor__runBuiltInCallable_closure10.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure11.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure12.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure13.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._async_evaluate0$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 108 + }; + A._EvaluateVisitor__evaluateArguments_closure14.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure11.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(value, t1.get$span(t1)); + }, + $signature: 64 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure12.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 64 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure13.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._async_evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 108 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure14.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 64 + }; + A._EvaluateVisitor__addRestMap_closure2.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString0) + _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._async_evaluate0$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._async_evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 92 + }; + A._EvaluateVisitor__verifyArguments_closure2.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure6.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure6.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssMediaRule_closure8.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 97 + }; + A._EvaluateVisitor_visitCssMediaRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.node.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure10.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssStyleRule_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule_closure5.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure6.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor__performInterpolationHelper_closure2.prototype = { + call$1(targetLocations) { + return A.InterpolationMap$0(this.interpolation, targetLocations); + }, + $signature: 216 + }; + A._EvaluateVisitor__serialize_closure2.prototype = { + call$0() { + return A.serializeValue0(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure2.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._async_evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 217 + }; + A._EvaluateVisitor__withoutSlash_recommendation2.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue0(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 218 + }; + A._EvaluateVisitor__stackFrame_closure2.prototype = { + call$1(url) { + var t1 = this.$this._async_evaluate0$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 48 + }; + A._ImportedCssVisitor2.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure2(); + this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._async_evaluate0$_visitor; + if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent") !== t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root")) + t1._async_evaluate0$_addChild$1(node); + else if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root").children._collection$_source)) { + t1._async_evaluate0$_addChild$1(node); + t1._async_evaluate0$__endOfImports = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) + 1; + } else { + t2 = t1._async_evaluate0$_outOfOrderImports; + (t2 == null ? t1._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._async_evaluate0$_visitor, + mediaQueries = t1._async_evaluate0$_mediaQueries; + t1._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure2(mediaQueries == null || t1._async_evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure2()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure2()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure2.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule0; + else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluationContext2.prototype = { + get$currentCallableSpan() { + var _0_0 = this._async_evaluate0$_visitor._async_evaluate0$_callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._async_evaluate0$_visitor, + t2 = t1._async_evaluate0$_importSpan; + if (t2 == null) { + t2 = t1._async_evaluate0$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._async_evaluate0$_warn$3(message, t2 == null ? this._async_evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); + }, + $isEvaluationContext0: 1 + }; + A.JSToDartAsyncFileImporter.prototype = { + canonicalize$1(_, url) { + return this.canonicalize$body$JSToDartAsyncFileImporter(0, url); + }, + canonicalize$body$JSToDartAsyncFileImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, result, t1, resultUrl; + var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (url.get$scheme() === "file") { + $async$returnValue = $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); + // goto return + $async$goto = 1; + break; + } + result = A.wrapJSExceptions(new A.JSToDartAsyncFileImporter_canonicalize_closure($async$self, url)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t1 = self.URL; + if (!(result instanceof t1)) + A.jsThrow(new self.Error(string$.The_fie)); + resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + if (resultUrl.get$scheme() !== "file") + A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); + $async$returnValue = $.$get$FilesystemImporter_cwd0().canonicalize$1(0, resultUrl); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$1, $async$completer); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd0().load$1(0, url); + }, + isNonCanonicalScheme$1(scheme) { + return scheme !== "file"; + } + }; + A.JSToDartAsyncFileImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._findFileUrl.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 35 + }; + A.AsyncImportCache0.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + return this.canonicalize$body$AsyncImportCache0(0, url, baseImporter, baseUrl, forImport); + }, + canonicalize$body$AsyncImportCache0(_, url, baseImporter, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), + $async$returnValue, $async$self = this, t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j; + var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter0) && $async$self._async_import_cache0$_importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Custom); + $async$goto = baseImporter != null && url.get$scheme() === "" ? 3 : 4; + break; + case 3: + // then + resolvedUrl = baseUrl == null ? null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + $async$goto = 5; + return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_perImporterCanonicalizeCache, key, new A.AsyncImportCache_canonicalize_closure0($async$self, baseImporter, resolvedUrl, baseUrl, forImport, key, url), type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 5: + // returning from await. + relativeResult = $async$result; + if (relativeResult != null) { + $async$returnValue = relativeResult; + // goto return + $async$goto = 1; + break; + } + case 4: + // join + key = new A._Record_2_forImport(url, forImport); + t1 = $async$self._async_import_cache0$_canonicalizeCache; + if (t1.containsKey$1(key)) { + $async$returnValue = t1.$index(0, key); + // goto return + $async$goto = 1; + break; + } + t2 = $async$self._async_import_cache0$_importers, t3 = type$.Record_1_nullable_Object, t4 = $async$self._async_import_cache0$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, t6 = type$.Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, cacheable = true, i = 0; + case 6: + // for condition + if (!(i < t2.length)) { + // goto after for + $async$goto = 8; + break; + } + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = null; + _1_2_isSet = t3._is(_1_0); + result = null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = null; + t7 = false; + } + if (t7) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) { + // goto for update + $async$goto = 7; + break; + } + $async$goto = 10; + return A._asyncAwait($async$self._async_import_cache0$_canonicalize$4(importer, url, baseUrl, forImport), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 10: + // returning from await. + _2_0 = $async$result; + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = null; + _2_3 = null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = null; + if (t7) { + t1.$indexSet(0, key, result); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + // goto break $label0$1 + $async$goto = 9; + break; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), null); + cacheable = false; + } + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + } + case 9: + // break $label0$1 + case 7: + // for update + ++i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + if (cacheable) + t1.$indexSet(0, key, null); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); + }, + _async_import_cache0$_canonicalize$4(importer, url, baseUrl, forImport) { + return this._canonicalize$body$AsyncImportCache0(importer, url, baseUrl, forImport); + }, + _canonicalize$body$AsyncImportCache0(importer, url, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool_2), + $async$returnValue, $async$self = this, t1, passContainingUrl, canonicalizeContext, result, cacheable; + var $async$_async_import_cache0$_canonicalize$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = baseUrl != null ? 3 : 5; + break; + case 3: + // then + $async$goto = url.get$scheme() !== "" ? 6 : 8; + break; + case 6: + // then + t1 = A._Future$value(importer.isNonCanonicalScheme$1(url.get$scheme()), type$.bool); + $async$goto = 9; + return A._asyncAwait(t1, $async$_async_import_cache0$_canonicalize$4); + case 9: + // returning from await. + t1 = $async$result; + passContainingUrl = t1; + // goto join + $async$goto = 7; + break; + case 8: + // else + passContainingUrl = true; + case 7: + // join + // goto join + $async$goto = 4; + break; + case 5: + // else + passContainingUrl = false; + case 4: + // join + canonicalizeContext = new A.CanonicalizeContext0(forImport, passContainingUrl ? baseUrl : null); + t1 = type$.nullable_Object; + t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.FutureOr_nullable_Uri); + $async$goto = 10; + return A._asyncAwait(type$.Future_nullable_Uri._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Uri), $async$_async_import_cache0$_canonicalize$4); + case 10: + // returning from await. + result = $async$result; + cacheable = !passContainingUrl || !canonicalizeContext._canonicalize_context$_wasContainingUrlAccessed; + if (result == null) { + $async$returnValue = new A._Record_2(null, cacheable); + // goto return + $async$goto = 1; + break; + } + $async$goto = result.get$scheme() === "" ? 11 : 13; + break; + case 11: + // then + A.WarnForDeprecation_warnForDeprecation0($async$self._async_import_cache0$_logger, B.Deprecation_Ssf, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2e_Rela, null, null); + // goto join + $async$goto = 12; + break; + case 13: + // else + t1 = A._Future$value(importer.isNonCanonicalScheme$1(result.get$scheme()), type$.bool); + $async$goto = 14; + return A._asyncAwait(t1, $async$_async_import_cache0$_canonicalize$4); + case 14: + // returning from await. + if ($async$result) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + case 12: + // join + $async$returnValue = new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_import_cache0$_canonicalize$4, $async$completer); + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this.importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl, quiet); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl, quiet) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), + $async$returnValue, $async$self = this; + var $async$importCanonical$4$originalUrl$quiet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure0($async$self, importer, canonicalUrl, originalUrl, quiet), type$.Uri, type$.nullable_Stylesheet_2), $async$importCanonical$4$originalUrl$quiet); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$importCanonical$4$originalUrl$quiet, $async$completer); + }, + humanize$1(canonicalUrl) { + var t1 = type$.NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2; + t1 = A.NullableExtension_andThen0(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._async_import_cache0$_canonicalizeCache.get$values(0), t1), new A.AsyncImportCache_humanize_closure3(canonicalUrl), t1._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure4(), t1._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure5()), new A.AsyncImportCache_humanize_closure6(canonicalUrl)); + return t1 == null ? canonicalUrl : t1; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._async_import_cache0$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + } + }; + A.AsyncImportCache_canonicalize_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), + $async$returnValue, $async$self = this, t1, t2, _0_0, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.baseUrl; + $async$goto = 3; + return A._asyncAwait(t1._async_import_cache0$_canonicalize$4($async$self.baseImporter, $async$self.resolvedUrl, t2, $async$self.forImport), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + _0_0._1; + if (t2 != null) + t1._async_import_cache0$_nonCanonicalRelativeUrls.$indexSet(0, $async$self.key, $async$self.url); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 362 + }; + A.AsyncImportCache__canonicalize_closure0.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 186 + }; + A.AsyncImportCache_importCanonical_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), + $async$returnValue, $async$self = this, t3, t4, t1, t2, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.canonicalUrl; + t2 = $async$self.importer.load$1(0, t1); + $async$goto = 3; + return A._asyncAwait(type$.Future_nullable_ImporterResult._is(t2) ? t2 : A._Future$value(t2, type$.nullable_ImporterResult_2), $async$call$0); + case 3: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t2 = $async$self.$this; + t2._async_import_cache0$_resultsCache.$indexSet(0, t1, result); + t3 = result.contents; + t4 = result.syntax; + t1 = $async$self.originalUrl.resolveUri$1(t1); + $async$returnValue = A.Stylesheet_Stylesheet$parse0(t3, t4, $async$self.quiet ? $.$get$Logger_quiet0() : t2._async_import_cache0$_logger, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 363 + }; + A.AsyncImportCache_humanize_closure3.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 364 + }; + A.AsyncImportCache_humanize_closure4.prototype = { + call$1(result) { + return result._2; + }, + $signature: 365 + }; + A.AsyncImportCache_humanize_closure5.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.AsyncImportCache_humanize_closure6.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 48 + }; + A.AtRootQueryParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure0(this)); + } + }; + A.AtRootQueryParser_parse_closure0.prototype = { + call$0() { + var include, atRules, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$1(40); + t1.whitespace$0(); + include = t1.scanIdentifier$1("with"); + if (!include) + t1.expectIdentifier$2$name("without", '"with" or "without"'); + t1.whitespace$0(); + t2.expectChar$1(58); + t1.whitespace$0(); + atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + do { + atRules.add$1(0, t1.identifier$0().toLowerCase()); + t1.whitespace$0(); + } while (t1.lookingAtIdentifier$0()); + t2.expectChar$1(41); + t2.expectDone$0(); + return new A.AtRootQuery0(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); + }, + $signature: 366 + }; + A.AtRootQuery0.prototype = { + excludes$1(node) { + var t1, _this = this; + if (_this._at_root_query0$_all) + return !_this.include; + $label0$0: { + if (node instanceof A.ModifiableCssStyleRule0) { + t1 = _this._at_root_query0$_rule !== _this.include; + break $label0$0; + } + if (node instanceof A.ModifiableCssMediaRule0) { + t1 = _this.excludesName$1("media"); + break $label0$0; + } + if (node instanceof A.ModifiableCssSupportsRule0) { + t1 = _this.excludesName$1("supports"); + break $label0$0; + } + if (node instanceof A.ModifiableCssAtRule0) { + t1 = _this.excludesName$1(node.name.value.toLowerCase()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + excludesName$1($name) { + var t1 = this._at_root_query0$_all || this.names.contains$1(0, $name); + return t1 !== this.include; + } + }; + A.AtRootRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRootRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var buffer = new A.StringBuffer("@at-root "), + t1 = this.query; + if (t1 != null) + buffer._contents = "@at-root " + (t1.toString$0(0) + " "); + t1 = this.children; + return buffer.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssAtRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssAtRule0) { + t1 = this.name; + t2 = other.name; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value) && J.$eq$(this.value, other.value) && this.isChildless === other.isChildless; + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + var _this = this; + return A.ModifiableCssAtRule$0(_this.name, _this.span, _this.isChildless, _this.value); + }, + addChild$1(child) { + this.super$ModifiableCssParentNode$addChild0(child); + }, + get$isChildless() { + return this.isChildless; + }, + get$span(receiver) { + return this.span; + } + }; + A.AtRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var children, + t1 = "@" + this.name.toString$0(0), + buffer = new A.StringBuffer(t1), + t2 = this.value; + if (t2 != null) + buffer._contents = t1 + (" " + t2.toString$0(0)); + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.AttributeSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitAttributeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.AttributeSelector0 && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.name; + return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; + } + }; + A.AttributeOperator0.prototype = { + _enumToString$0() { + return "AttributeOperator." + this._name; + }, + toString$0(_) { + return this._attribute0$_text; + } + }; + A.BinaryOperationExpression0.prototype = { + get$span(_) { + var right, + left = this.left; + for (; left instanceof A.BinaryOperationExpression0;) + left = left.left; + right = this.right; + for (; right instanceof A.BinaryOperationExpression0;) + right = right.right; + return left.get$span(left).expand$1(0, right.get$span(right)); + }, + get$operatorSpan() { + var t3, t4, + t1 = this.left, + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = this.right; + t4 = t3.get$span(t3); + if (t2 === t4.get$file(t4)) { + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + t4 = t2.offset < t4.get$start(t4).offset; + t2 = t4; + } else + t2 = false; + if (t2) { + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + t3 = A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, t1.offset, t3.get$start(t3).offset))); + t1 = t3; + } else + t1 = this.get$span(0); + return t1; + }, + accept$1$1(visitor) { + return visitor.visitBinaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, t2, right, t3, operator, _this = this, + _0_0 = _this.left; + $label0$0: { + if (_0_0 instanceof A.BinaryOperationExpression0) { + t1 = _0_0.operator.precedence < _this.operator.precedence; + break $label0$0; + } + if (_0_0 instanceof A.ListExpression0 && !_0_0.hasBrackets && _0_0.contents.length >= 2) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + t2 = t1 ? "" + A.Primitives_stringFromCharCode(40) : ""; + t2 += _0_0.toString$0(0); + t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; + t2 = _this.operator; + t1 = t1 + A.Primitives_stringFromCharCode(32) + t2.operator + A.Primitives_stringFromCharCode(32); + right = _this.right; + $label1$1: { + t3 = false; + if (right instanceof A.BinaryOperationExpression0) { + operator = right.operator; + if (operator.precedence <= t2.precedence) { + t3 = !(operator === t2 && operator.isAssociative); + t2 = t3; + } else + t2 = t3; + break $label1$1; + } + if (right instanceof A.ListExpression0 && !right.hasBrackets && right.contents.length >= 2) { + t2 = true; + break $label1$1; + } + t2 = t3; + break $label1$1; + } + if (t2) + t1 += A.Primitives_stringFromCharCode(40); + t1 += right.toString$0(0); + if (t2) + t1 += A.Primitives_stringFromCharCode(41); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.BinaryOperator0.prototype = { + _enumToString$0() { + return "BinaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.BooleanExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitBooleanExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return String(this.value); + }, + get$span(receiver) { + return this.span; + } + }; + A.booleanClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassBoolean", new A.booleanClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.booleanClass__closure.prototype = { + call$2($self, _) { + A.jsThrow(new self.Error("new sass.SassBoolean() isn't allowed.\nUse sass.sassTrue or sass.sassFalse instead.")); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 219 + }; + A.legacyBooleanClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Boolean", new A.legacyBooleanClass__closure())); + J.get$$prototype$x(jsClass).getValue = A.allowInteropCaptureThisNamed("getValue", new A.legacyBooleanClass__closure0()); + jsClass.TRUE = B.SassBoolean_true0; + jsClass.FALSE = B.SassBoolean_false0; + A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.legacyBooleanClass__closure.prototype = { + call$2(_, __) { + throw A.wrapException("new sass.types.Boolean() isn't allowed.\nUse sass.types.Boolean.TRUE or sass.types.Boolean.FALSE instead."); + }, + call$1(_) { + return this.call$2(_, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 220 + }; + A.legacyBooleanClass__closure0.prototype = { + call$1($self) { + return $self === B.SassBoolean_true0; + }, + $signature: 69 + }; + A.SassBoolean0.prototype = { + get$isTruthy() { + return this.value; + }, + accept$1$1(visitor) { + return visitor._serialize0$_buffer.write$1(0, String(this.value)); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertBoolean$1($name) { + return this; + }, + unaryNot$0() { + return this.value ? B.SassBoolean_false0 : B.SassBoolean_true0; + } + }; + A.Box0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && other._box0$_inner === this._box0$_inner; + }, + get$hashCode(_) { + return A.Primitives_objectHashCode(this._box0$_inner); + } + }; + A.ModifiableBox0.prototype = {}; + A.BuiltInCallable0.prototype = { + callbackFor$2(positional, names) { + var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; + for (t1 = this._built_in$_overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + overload = t1[_i]; + t3 = overload._0; + if (t3.matches$2(positional, names)) + return overload; + mismatchDistance = t3.$arguments.length - positional; + if (minMismatchDistance != null) { + t3 = Math.abs(mismatchDistance); + t4 = Math.abs(minMismatchDistance); + if (t3 > t4) + continue; + if (t3 === t4 && mismatchDistance < 0) + continue; + } + minMismatchDistance = mismatchDistance; + fuzzyMatch = overload; + } + if (fuzzyMatch != null) + return fuzzyMatch; + throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); + }, + withName$1($name) { + return new A.BuiltInCallable0($name, this._built_in$_overloads, this.acceptsContent); + }, + withDeprecationWarning$2(module, newName) { + var t2, t3, _i, t4, t5, _this = this, + t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2); + for (t2 = _this._built_in$_overloads, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = {}; + t5 = t2[_i]; + t4.$function = null; + t4.$function = t5._1; + t1.push(new A._Record_2(t5._0, new A.BuiltInCallable_withDeprecationWarning_closure0(t4, _this, module, newName))); + } + return new A.BuiltInCallable0(_this.name, t1, _this.acceptsContent); + }, + withDeprecationWarning$1(module) { + return this.withDeprecationWarning$2(module, null); + }, + $isAsyncCallable0: 1, + $isAsyncBuiltInCallable0: 1, + $isCallable: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.BuiltInCallable$mixin_closure0.prototype = { + call$1($arguments) { + this.callback.call$1($arguments); + return B.C__SassNull0; + }, + $signature: 3 + }; + A.BuiltInCallable_withDeprecationWarning_closure0.prototype = { + call$1(args) { + A.warnForDeprecation0(string$.Global, B.Deprecation_wdM); + return this._box_0.$function.call$1(args); + }, + $signature: 3 + }; + A.BuiltInModule0.prototype = { + get$upstream() { + return B.List_empty19; + }, + get$variableNodes() { + return B.Map_empty12; + }, + get$extensionStore() { + return B.C_EmptyExtensionStore0; + }, + get$css(_) { + return new A.CssStylesheet0(B.List_empty17, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); + }, + get$preModuleComments() { + return B.Map_empty11; + }, + get$transitivelyContainsCss() { + return false; + }, + get$transitivelyContainsExtensions() { + return false; + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + throw A.wrapException(A.SassScriptException$0("Cannot modify built-in variable.", null)); + }, + variableIdentity$1($name) { + return this; + }, + cloneCss$0() { + return this; + }, + $isModule1: 1, + get$url(receiver) { + return this.url; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$variables() { + return this.variables; + } + }; + A.calculationClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassCalculation", new A.calculationClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["calc", new A.calculationClass__closure0(), "min", new A.calculationClass__closure1(), "max", new A.calculationClass__closure2(), "clamp", new A.calculationClass__closure3()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineStaticMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["assertCalculation", new A.calculationClass__closure4()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["arguments", new A.calculationClass__closure5()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([A.SassNumber_SassNumber0(1, null)], type$.JSArray_Object), type$.Object)).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.calculationClass__closure.prototype = { + call$2($self, _) { + A.jsThrow0(new self.Error("new sass.SassCalculation() isn't allowed")); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 219 + }; + A.calculationClass__closure0.prototype = { + call$1(argument) { + A._assertCalculationValue(argument); + return new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([argument], type$.JSArray_Object), type$.Object)); + }, + $signature: 114 + }; + A.calculationClass__closure1.prototype = { + call$1($arguments) { + var t1 = self.immutable.isOrderedMap($arguments) ? J.toArray$0$x(type$.ImmutableList_2._as($arguments)) : type$.List_dynamic._as($arguments), + t2 = type$.Object, + argList = J.cast$1$0$ax(t1, t2); + argList.forEach$1(argList, A.calculation1___assertCalculationValue$closure()); + return new A.SassCalculation0("min", A.List_List$unmodifiable(argList, t2)); + }, + $signature: 114 + }; + A.calculationClass__closure2.prototype = { + call$1($arguments) { + var t1 = self.immutable.isOrderedMap($arguments) ? J.toArray$0$x(type$.ImmutableList_2._as($arguments)) : type$.List_dynamic._as($arguments), + t2 = type$.Object, + argList = J.cast$1$0$ax(t1, t2); + argList.forEach$1(argList, A.calculation1___assertCalculationValue$closure()); + return new A.SassCalculation0("max", A.List_List$unmodifiable(argList, t2)); + }, + $signature: 114 + }; + A.calculationClass__closure3.prototype = { + call$3(min, value, max) { + var t1; + if (!(value == null && !A._isValidClampArg(min))) + t1 = max == null && !B.JSArray_methods.any$1([min, value], A.calculation1___isValidClampArg$closure()); + else + t1 = true; + if (t1) + A.jsThrow0(new self.Error("Expected at least one SassString or CalculationInterpolation in `" + new A.NonNullsIterable([min, value, max], type$.NonNullsIterable_Object).toString$0(0) + "`")); + t1 = type$.NonNullsIterable_Object; + new A.NonNullsIterable([min, value, max], t1).forEach$1(0, A.calculation1___assertCalculationValue$closure()); + return new A.SassCalculation0("clamp", A.List_List$unmodifiable(new A.NonNullsIterable([min, value, max], t1), type$.Object)); + }, + call$1(min) { + return this.call$3(min, null, null); + }, + call$2(min, value) { + return this.call$3(min, value, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 371 + }; + A.calculationClass__closure4.prototype = { + call$2($self, $name) { + return $self; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 372 + }; + A.calculationClass__closure5.prototype = { + call$1($self) { + return new self.immutable.List($self.$arguments); + }, + $signature: 373 + }; + A.calculationOperationClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.CalculationOperation", new A.calculationOperationClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.calculationOperationClass__closure0(), "hashCode", new A.calculationOperationClass__closure1()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["operator", new A.calculationOperationClass__closure2(), "left", new A.calculationOperationClass__closure3(), "right", new A.calculationOperationClass__closure4()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(A.SassCalculation_operateInternal0(B.CalculationOperator_g2q0, A.SassNumber_SassNumber0(1, null), A.SassNumber_SassNumber0(1, null), false, false).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.calculationOperationClass__closure.prototype = { + call$4($self, strOperator, left, right) { + var operator = A.IterableExtension_firstWhereOrNull(B.List_kUZ, new A.calculationOperationClass___closure(strOperator)); + if (operator == null) + A.jsThrow0(new self.Error("Invalid operator: " + strOperator)); + A._assertCalculationValue(left); + A._assertCalculationValue(right); + return A.SassCalculation_operateInternal0(operator, left, right, false, false); + }, + "call*": "call$4", + $requiredArgCount: 4, + $signature: 374 + }; + A.calculationOperationClass___closure.prototype = { + call$1(value) { + return value.operator === this.strOperator; + }, + $signature: 375 + }; + A.calculationOperationClass__closure0.prototype = { + call$2($self, other) { + return $self.$eq(0, other); + }, + $signature: 376 + }; + A.calculationOperationClass__closure1.prototype = { + call$1($self) { + return $self.get$hashCode(0); + }, + $signature: 377 + }; + A.calculationOperationClass__closure2.prototype = { + call$1($self) { + return $self._calculation0$_operator.operator; + }, + $signature: 378 + }; + A.calculationOperationClass__closure3.prototype = { + call$1($self) { + return $self._calculation0$_left; + }, + $signature: 221 + }; + A.calculationOperationClass__closure4.prototype = { + call$1($self) { + return $self._calculation0$_right; + }, + $signature: 221 + }; + A.calculationInterpolationClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.CalculationInterpolation", new A.calculationInterpolationClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.calculationInterpolationClass__closure0(), "hashCode", new A.calculationInterpolationClass__closure1()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["value", new A.calculationInterpolationClass__closure2()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.CalculationInterpolation("").constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.calculationInterpolationClass__closure.prototype = { + call$2($self, value) { + return new A.CalculationInterpolation(value); + }, + $signature: 380 + }; + A.calculationInterpolationClass__closure0.prototype = { + call$2($self, other) { + return other instanceof A.CalculationInterpolation && $self._calculation0$_value === other._calculation0$_value; + }, + $signature: 381 + }; + A.calculationInterpolationClass__closure1.prototype = { + call$1($self) { + return B.JSString_methods.get$hashCode($self._calculation0$_value); + }, + $signature: 382 + }; + A.calculationInterpolationClass__closure2.prototype = { + call$1($self) { + return $self._calculation0$_value; + }, + $signature: 383 + }; + A.SassCalculation0.prototype = { + get$isSpecialNumber() { + return true; + }, + accept$1$1(visitor) { + return visitor.visitCalculation$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertCalculation$1($name) { + return this; + }, + plus$1(other) { + if (other instanceof A.SassString0) + return this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + unaryPlus$0() { + return A.throwExpression(A.SassScriptException$0('Undefined operation "+' + this.toString$0(0) + '".', null)); + }, + unaryMinus$0() { + return A.throwExpression(A.SassScriptException$0('Undefined operation "-' + this.toString$0(0) + '".', null)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassCalculation0 && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); + } + }; + A.SassCalculation__verifyLength_closure0.prototype = { + call$1(arg) { + return arg instanceof A.SassString0; + }, + $signature: 69 + }; + A.CalculationOperation0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationOperation0 && this._calculation0$_operator === other._calculation0$_operator && J.$eq$(this._calculation0$_left, other._calculation0$_left) && J.$eq$(this._calculation0$_right, other._calculation0$_right); + }, + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._calculation0$_operator) ^ J.get$hashCode$(this._calculation0$_left) ^ J.get$hashCode$(this._calculation0$_right)) >>> 0; + }, + toString$0(_) { + var parenthesized = A.serializeValue0(new A.SassCalculation0("", A._setArrayType([this], type$.JSArray_Object)), true, true); + return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); + } + }; + A.CalculationOperator0.prototype = { + _enumToString$0() { + return "CalculationOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.CalculationInterpolation.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationInterpolation && this._calculation0$_value === other._calculation0$_value; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this._calculation0$_value); + }, + toString$0(_) { + return this._calculation0$_value; + } + }; + A.CallableDeclaration0.prototype = { + get$span(receiver) { + return this.span; + } + }; + A.updateCanonicalizeContextPrototype_closure.prototype = { + call$1($self) { + return $self._canonicalize_context$_fromImport; + }, + $signature: 384 + }; + A.updateCanonicalizeContextPrototype_closure0.prototype = { + call$1($self) { + $self._canonicalize_context$_wasContainingUrlAccessed = true; + return A.NullableExtension_andThen0($self._canonicalize_context$_containingUrl, A.utils3__dartToJSUrl$closure()); + }, + $signature: 385 + }; + A.CanonicalizeContext0.prototype = { + withFromImport$1$2(fromImport, callback) { + var t1, + oldFromImport = this._canonicalize_context$_fromImport; + this._canonicalize_context$_fromImport = true; + try { + t1 = callback.call$0(); + return t1; + } finally { + this._canonicalize_context$_fromImport = oldFromImport; + } + }, + withFromImport$2(fromImport, callback) { + return this.withFromImport$1$2(fromImport, callback, type$.dynamic); + } + }; + A.ColorChannel0.prototype = { + isAnalogous$1(other) { + var _0_6_isSet, t1, _0_60, t2, _0_6_isSet0, + _0_1 = this.name, + _0_6 = other.name; + $label0$0: { + if ("red" !== _0_1) + _0_6_isSet = "x" === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + if ("red" !== _0_6) + t1 = "x" === _0_6; + else + t1 = true; + _0_60 = _0_6; + } else { + _0_60 = null; + t1 = false; + } + t2 = true; + if (!t1) { + if ("green" !== _0_1) + t1 = "y" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("green" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "y" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("blue" !== _0_1) + t1 = "z" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("blue" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "z" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("chroma" !== _0_1) + t1 = "saturation" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("chroma" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "saturation" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("lightness" === _0_1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_60 = t1; + _0_6_isSet = true; + } + t1 = "lightness" === t1; + } else + t1 = false; + if (!t1) + if ("hue" === _0_1) + t1 = "hue" === (_0_6_isSet ? _0_60 : _0_6); + else + t1 = false; + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + if (t1) + break $label0$0; + break $label0$0; + } + return t1; + } + }; + A.LinearChannel0.prototype = {}; + A.Chokidar0.prototype = {}; + A.ChokidarOptions0.prototype = {}; + A.ChokidarWatcher0.prototype = {}; + A.ClassSelector0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ClassSelector0 && other.name === this.name; + }, + accept$1$1(visitor) { + return visitor.visitClassSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.ClassSelector0(this.name + suffix, this.span); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.ClipGamutMap0.prototype = { + map$1(_, color) { + var t1 = color._color0$_space, + t2 = t1._space$_channels; + return A.SassColor_SassColor$forSpaceInternal0(t1, this._clip$_clampChannel$2(color.channel0OrNull, t2[0]), this._clip$_clampChannel$2(color.channel1OrNull, t2[1]), this._clip$_clampChannel$2(color.channel2OrNull, t2[2]), color.alphaOrNull); + }, + _clip$_clampChannel$2(value, channel) { + var t1, min; + if (value == null) + t1 = null; + else + $label0$0: { + if (channel instanceof A.LinearChannel0) { + min = channel.min; + t1 = isNaN(value) ? min : B.JSNumber_methods.clamp$2(value, min, channel.max); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + } + }; + A._CloneCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless, + rule = A.ModifiableCssAtRule$0(node.name, node.span, t1, node.value); + return t1 ? rule : this._clone_css$_visitChildren$2(rule, node); + }, + visitCssComment$1(node) { + return new A.ModifiableCssComment0(node.text, node.span); + }, + visitCssDeclaration$1(node) { + return A.ModifiableCssDeclaration$0(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap); + }, + visitCssImport$1(node) { + return new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + }, + visitCssKeyframeBlock$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), node); + }, + visitCssMediaRule$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssMediaRule$0(node.queries, node.span), node); + }, + visitCssStyleRule$1(node) { + var _0_0 = this._clone_css$_oldToNewSelectors.$index(0, node._style_rule0$_selector._box0$_inner.value); + if (_0_0 != null) + return this._clone_css$_visitChildren$2(A.ModifiableCssStyleRule$0(_0_0, node.span, false, node.originalSelector), node); + else + throw A.wrapException(A.StateError$(string$.The_Ex)); + }, + visitCssStylesheet$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(node.get$span(node)), node); + }, + visitCssSupportsRule$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssSupportsRule$0(node.condition, node.span), node); + }, + _clone_css$_visitChildren$1$2(newParent, oldParent) { + var t1, t2, newChild; + for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + newChild = t2.accept$1(this); + newChild.isGroupEnd = t2.get$isGroupEnd(); + newParent.addChild$1(newChild); + } + return newParent; + }, + _clone_css$_visitChildren$2(newParent, oldParent) { + return this._clone_css$_visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode_2); + } + }; + A.ColorExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitColorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue0(this.value, true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.global_closure44.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); + }, + $signature: 39 + }; + A.global_closure45.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); + }, + $signature: 39 + }; + A.global_closure46.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); + }, + $signature: 39 + }; + A.global_closure47.prototype = { + call$1($arguments) { + return A._rgb0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure48.prototype = { + call$1($arguments) { + return A._rgb0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure49.prototype = { + call$1($arguments) { + return A._rgbTwoArg0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure50.prototype = { + call$1($arguments) { + return A._parseChannels0("rgb", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz0); + }, + $signature: 3 + }; + A.global_closure51.prototype = { + call$1($arguments) { + return A._rgb0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure52.prototype = { + call$1($arguments) { + return A._rgb0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure53.prototype = { + call$1($arguments) { + return A._rgbTwoArg0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure54.prototype = { + call$1($arguments) { + return A._parseChannels0("rgba", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz0); + }, + $signature: 3 + }; + A.global_closure55.prototype = { + call$1($arguments) { + return A._invert0($arguments, true); + }, + $signature: 3 + }; + A.global_closure56.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); + }, + $signature: 28 + }; + A.global_closure57.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); + }, + $signature: 28 + }; + A.global_closure58.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); + }, + $signature: 28 + }; + A.global_closure59.prototype = { + call$1($arguments) { + return A._hsl0("hsl", $arguments); + }, + $signature: 3 + }; + A.global_closure60.prototype = { + call$1($arguments) { + return A._hsl0("hsl", $arguments); + }, + $signature: 3 + }; + A.global_closure61.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString0("hsl", $arguments); + else + throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); + }, + $signature: 17 + }; + A.global_closure62.prototype = { + call$1($arguments) { + return A._parseChannels0("hsl", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm0); + }, + $signature: 3 + }; + A.global_closure63.prototype = { + call$1($arguments) { + return A._hsl0("hsla", $arguments); + }, + $signature: 3 + }; + A.global_closure64.prototype = { + call$1($arguments) { + return A._hsl0("hsla", $arguments); + }, + $signature: 3 + }; + A.global_closure65.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) + return A._functionString0("hsla", $arguments); + else + throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); + }, + $signature: 17 + }; + A.global_closure66.prototype = { + call$1($arguments) { + return A._parseChannels0("hsla", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm0); + }, + $signature: 3 + }; + A.global_closure67.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString0("grayscale", $arguments); + else { + A.warnForDeprecation0(string$.Global, B.Deprecation_wdM); + return A._grayscale0(t1.$index($arguments, 0)); + } + }, + $signature: 3 + }; + A.global_closure68.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + degrees = A._angleValue0(t1.$index($arguments, 1), "degrees"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.adjusto, null)); + A.warnForDeprecation0(string$.adjustd + A.SassNumber_SassNumber0(degrees, "deg").toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_ivT); + return color.changeHsl$1$hue(color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue") + degrees); + }, + $signature: 21 + }; + A.global_closure69.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.lighte, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s9_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("lighten() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_ivT); + return result; + }, + $signature: 21 + }; + A.global_closure70.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.darken, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s9_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("darken() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_ivT); + return result; + }, + $signature: 21 + }; + A.global_closure71.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString0("saturate", $arguments); + return new A.SassString0("saturate(" + A.serializeValue0(t1.$index($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); + }, + $signature: 17 + }; + A.global_closure72.prototype = { + call$1($arguments) { + var t1, color, amount, result, + _s10_ = "saturation"; + A.warnForDeprecation0(string$.Global, B.Deprecation_wdM); + t1 = J.getInterceptor$asx($arguments); + color = t1.$index($arguments, 0).assertColor$1("color"); + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.satura, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s10_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("saturate() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_ivT); + return result; + }, + $signature: 21 + }; + A.global_closure73.prototype = { + call$1($arguments) { + var result, + _s10_ = "saturation", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.desatu, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s10_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("desaturate() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_ivT); + return result; + }, + $signature: 21 + }; + A.global_closure74.prototype = { + call$1($arguments) { + return A._opacify0("opacify", $arguments); + }, + $signature: 21 + }; + A.global_closure75.prototype = { + call$1($arguments) { + return A._opacify0("fade-in", $arguments); + }, + $signature: 21 + }; + A.global_closure76.prototype = { + call$1($arguments) { + return A._transparentize0("transparentize", $arguments); + }, + $signature: 21 + }; + A.global_closure77.prototype = { + call$1($arguments) { + return A._transparentize0("fade-out", $arguments); + }, + $signature: 21 + }; + A.global_closure78.prototype = { + call$1($arguments) { + var _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString0) + if (!_0_0._string0$_hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string0$_text, $.$get$_microsoftFilterStart0()); + if (t1) + return A._functionString0("alpha", $arguments); + if (_0_0 instanceof A.SassColor0 && !_0_0._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.alpha_, null)); + A.warnForDeprecation0(string$.Global, B.Deprecation_wdM); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.global_closure79.prototype = { + call$1($arguments) { + var t1, + argList = J.$index$asx($arguments, 0).get$asList(); + if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure0())) + return A._functionString0("alpha", $arguments); + t1 = argList.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$0("Missing argument $color.", null)); + else + throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1 + " were passed.", null)); + }, + $signature: 17 + }; + A.global__closure0.prototype = { + call$1(argument) { + return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); + }, + $signature: 54 + }; + A.global_closure80.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString0("opacity", $arguments); + A.warnForDeprecation0(string$.Global, B.Deprecation_wdM); + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.global_closure81.prototype = { + call$1($arguments) { + return A._parseChannels0("color", J.$index$asx($arguments, 0), "description", null); + }, + $signature: 3 + }; + A.global_closure82.prototype = { + call$1($arguments) { + return A._parseChannels0("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z0); + }, + $signature: 3 + }; + A.global_closure83.prototype = { + call$1($arguments) { + return A._parseChannels0("lab", J.$index$asx($arguments, 0), "channels", B.LabColorSpace_IF20); + }, + $signature: 3 + }; + A.global_closure84.prototype = { + call$1($arguments) { + return A._parseChannels0("lch", J.$index$asx($arguments, 0), "channels", B.LchColorSpace_wv80); + }, + $signature: 3 + }; + A.global_closure85.prototype = { + call$1($arguments) { + return A._parseChannels0("oklab", J.$index$asx($arguments, 0), "channels", B.OklabColorSpace_yrt0); + }, + $signature: 3 + }; + A.global_closure86.prototype = { + call$1($arguments) { + return A._parseChannels0("oklch", J.$index$asx($arguments, 0), "channels", B.OklchColorSpace_li80); + }, + $signature: 3 + }; + A.module_closure27.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); + }, + $signature: 39 + }; + A.module_closure28.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); + }, + $signature: 39 + }; + A.module_closure29.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); + }, + $signature: 39 + }; + A.module_closure30.prototype = { + call$1($arguments) { + var result = A._invert0($arguments, false); + if (result instanceof A.SassString0) + A.warnForDeprecation0("Passing a number (" + A.S(J.$index$asx($arguments, 0)) + string$.x29x20to_ci + result.toString$0(0), B.Deprecation_EfO); + return result; + }, + $signature: 3 + }; + A.module_closure31.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); + }, + $signature: 28 + }; + A.module_closure32.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); + }, + $signature: 28 + }; + A.module_closure33.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); + }, + $signature: 28 + }; + A.module_closure34.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + result = A._functionString0("grayscale", t1.take$1($arguments, 1)); + A.warnForDeprecation0("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x29x20to_cg + result.toString$0(0), B.Deprecation_EfO); + return result; + } + return A._grayscale0(t1.$index($arguments, 0)); + }, + $signature: 3 + }; + A.module_closure35.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = type$.JSArray_Value_2; + return A._parseChannels0("hwb", A.SassList$0(A._setArrayType([A.SassList$0(A._setArrayType([t1.$index($arguments, 0), t1.$index($arguments, 1), t1.$index($arguments, 2)], t2), B.ListSeparator_nbm0, false), t1.$index($arguments, 3)], t2), B.ListSeparator_cQA0, false), null, B.HwbColorSpace_06z0); + }, + $signature: 3 + }; + A.module_closure36.prototype = { + call$1($arguments) { + return A._parseChannels0("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z0); + }, + $signature: 3 + }; + A.module_closure37.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "whiteness"); + }, + $signature: 28 + }; + A.module_closure38.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "blackness"); + }, + $signature: 28 + }; + A.module_closure39.prototype = { + call$1($arguments) { + var result, + _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString0) + if (!_0_0._string0$_hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string0$_text, $.$get$_microsoftFilterStart0()); + if (t1) { + result = A._functionString0("alpha", $arguments); + A.warnForDeprecation0(string$.Using_c + result.toString$0(0), B.Deprecation_EfO); + return result; + } + if (_0_0 instanceof A.SassColor0 && !_0_0._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.color_a, null)); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.module_closure40.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure6())) { + result = A._functionString0("alpha", $arguments); + A.warnForDeprecation0(string$.Using_c + result.toString$0(0), B.Deprecation_EfO); + return result; + } + throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); + }, + $signature: 17 + }; + A.module__closure6.prototype = { + call$1(argument) { + return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); + }, + $signature: 54 + }; + A.module_closure41.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + result = A._functionString0("opacity", $arguments); + A.warnForDeprecation0("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x20to_co + result.toString$0(0), B.Deprecation_EfO); + return result; + } + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.module_closure42.prototype = { + call$1($arguments) { + return new A.SassString0(J.get$first$ax($arguments).assertColor$1("color")._color0$_space.name, false); + }, + $signature: 17 + }; + A.module_closure43.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 1), false); + }, + $signature: 21 + }; + A.module_closure44.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertColor$1("color")._color0$_space.get$isLegacyInternal() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A.module_closure45.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertColor$1("color").isChannelMissing$3$channelName$colorName(A._channelName0(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A.module_closure46.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 1), true).get$isInGamut() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A.module_closure47.prototype = { + call$1($arguments) { + var space, method, _s5_ = "space", _s6_ = "method", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = t1.$index($arguments, 1); + if (t2.$eq(0, B.C__SassNull0)) + space = color._color0$_space; + else { + t2 = t2.assertString$1(_s5_); + t2.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName0(t2._string0$_text, _s5_); + } + if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull0)) + throw A.wrapException(A.SassScriptException$0(string$.color_t, _s6_)); + t1 = t1.$index($arguments, 2).assertString$1(_s6_); + t1.assertUnquoted$1(_s6_); + method = A.GamutMapMethod_GamutMapMethod$fromName0(t1._string0$_text); + if (!space.get$isBoundedInternal()) + return color; + t1 = color.toSpace$1(space); + t1 = t1.get$isInGamut() ? t1 : method.map$1(0, t1); + return t1.toSpace$2$legacyMissing(color._color0$_space, false); + }, + $signature: 21 + }; + A.module_closure48.prototype = { + call$1($arguments) { + var channelIndex, channelInfo, channelValue, unit, + t1 = J.getInterceptor$asx($arguments), + color = A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 2), true), + channelName = A._channelName0(t1.$index($arguments, 1)); + if (channelName === "alpha") { + t1 = color.alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + } + t1 = color._color0$_space._space$_channels; + channelIndex = B.JSArray_methods.indexWhere$1(t1, new A.module__closure5(channelName)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$0("Color " + color.toString$0(0) + " has no channel named " + channelName + ".", "channel")); + channelInfo = t1[channelIndex]; + channelValue = color.get$channels()[channelIndex]; + unit = channelInfo.associatedUnit; + return A.SassNumber_SassNumber0(unit === "%" ? channelValue * 100 / type$.LinearChannel_2._as(channelInfo).max : channelValue, unit); + }, + $signature: 22 + }; + A.module__closure5.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 78 + }; + A.module_closure49.prototype = { + call$1($arguments) { + var t2, t3, + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"); + t1 = new A.module_closure_toXyzNoMissing0(); + if (color1._color0$_space === color2._color0$_space) { + t1 = color1.channel0OrNull; + t2 = false; + if (t1 == null) + t1 = 0; + t3 = color2.channel0OrNull; + if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel1OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel1OrNull; + if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel2OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel2OrNull; + if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + t1 = A.fuzzyEquals0(t1, t2 == null ? 0 : t2); + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = J.$eq$(t1.call$1(color1), t1.call$1(color2)); + return t1 ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A.module_closure_toXyzNoMissing0.prototype = { + call$1(color) { + var _1_1, _1_3, t1, _1_7, channel0, _1_8, channel1, _1_9, channel2, _1_10, alpha, _null = null; + $label0$0: { + _1_1 = color._color0$_space; + _1_3 = B.XyzD65ColorSpace_4CA0 === _1_1; + t1 = _1_3; + if (t1) + t1 = !(color.channel0OrNull == null || color.channel1OrNull == null || color.channel2OrNull == null || color.alphaOrNull == null); + else + t1 = false; + if (t1) { + t1 = color; + break $label0$0; + } + if (_1_3) { + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = A.SassColor$_forSpace0(B.XyzD65ColorSpace_4CA0, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = _1_1.convert$5(B.XyzD65ColorSpace_4CA0, channel0, channel1, channel2, alpha); + break $label0$0; + } + return t1; + }, + $signature: 393 + }; + A.module_closure50.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 2), true).isChannelPowerless$3$channelName$colorName(A._channelName0(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._mix_closure0.prototype = { + call$1($arguments) { + var _s6_ = "weight", + _s41_ = string$.To_usem, + _s29_ = ", you must provide a $method.", + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"), + weight = t1.$index($arguments, 2).assertNumber$1(_s6_); + if (!J.$eq$(t1.$index($arguments, 3), B.C__SassNull0)) + return color1.interpolate$4$legacyMissing$weight(color2, A.InterpolationMethod_InterpolationMethod$fromValue0(t1.$index($arguments, 3), "method"), false, weight.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100); + A._checkPercent0(weight, _s6_); + if (!color1._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(_s41_ + color1.toString$0(0) + _s29_, "color1")); + else if (!color2._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(_s41_ + color2.toString$0(0) + _s29_, "color2")); + return A._mixLegacy0(color1, color2, weight); + }, + $signature: 21 + }; + A._complement_closure0.prototype = { + call$1($arguments) { + var space, t3, colorInSpace, t4, t5, t6, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = color._color0$_space; + if (t2.get$isLegacyInternal() && J.$eq$(t1.$index($arguments, 1), B.C__SassNull0)) + space = B.HslColorSpace_gsm0; + else { + t3 = t1.$index($arguments, 1).assertString$1(_s5_); + t3.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName0(t3._string0$_text, _s5_); + } + if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$0("Color space " + space.toString$0(0) + " doesn't have a hue channel.", _s5_)); + colorInSpace = color.toSpace$2$legacyMissing(space, !J.$eq$(t1.$index($arguments, 1), B.C__SassNull0)); + t1 = space._space$_channels; + t3 = colorInSpace.channel0OrNull; + t4 = colorInSpace.channel1OrNull; + t5 = colorInSpace.channel2OrNull; + t6 = colorInSpace.alphaOrNull; + return (space.get$isLegacyInternal() ? A.SassColor_SassColor$forSpaceInternal0(space, A._adjustChannel0(colorInSpace, t1[0], t3, A.SassNumber_SassNumber0(180, null)), t4, t5, t6) : A.SassColor_SassColor$forSpaceInternal0(space, t3, t4, A._adjustChannel0(colorInSpace, t1[2], t5, A.SassNumber_SassNumber0(180, null)), t6)).toSpace$2$legacyMissing(t2, false); + }, + $signature: 21 + }; + A._adjust_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, true, false, false); + }, + $signature: 21 + }; + A._scale_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, false, false, true); + }, + $signature: 21 + }; + A._change_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, false, true, false); + }, + $signature: 21 + }; + A._ieHexStr_closure0.prototype = { + call$1($arguments) { + var t1, t2, t3, t4, t5, + color = J.$index$asx($arguments, 0).assertColor$1("color").toSpace$1(B.RgbColorSpace_mlz0); + color = color.get$isInGamut() ? color : B.LocalMindeGamutMap_Q7f0.map$1(0, color); + t1 = new A._ieHexStr_closure_hexString0(); + t2 = color.alphaOrNull; + t2 = A.S(t1.call$1((t2 == null ? 0 : t2) * 255)); + t3 = color.channel0OrNull; + t3 = A.S(t1.call$1(t3 == null ? 0 : t3)); + t4 = color.channel1OrNull; + t4 = A.S(t1.call$1(t4 == null ? 0 : t4)); + t5 = color.channel2OrNull; + return new A.SassString0("#" + t2 + t3 + t4 + A.S(t1.call$1(t5 == null ? 0 : t5)), false); + }, + $signature: 17 + }; + A._ieHexStr_closure_hexString0.prototype = { + call$1(component) { + return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(A.fuzzyRound0(component), 16), 2, "0").toUpperCase(); + }, + $signature: 237 + }; + A._updateComponents_closure1.prototype = { + call$1(space) { + return this.originalColor.toSpace$2$legacyMissing(space, false); + }, + $signature: 394 + }; + A._updateComponents_closure2.prototype = { + call$1(info) { + return this._box_0.name === info.name; + }, + $signature: 78 + }; + A._changeColor_closure0.prototype = { + call$0() { + var t1 = this.alphaArg; + A.warnForDeprecation0("$alpha: Passing a unit other than % (" + A.S(t1) + string$.x29x20is_d + t1.unitSuggestion$1("alpha") + string$.x0a_See_, B.Deprecation_oCX); + return t1.valueInRange$3(0, 1, "alpha"); + }, + $signature: 241 + }; + A._adjustColor_closure0.prototype = { + call$1(alpha) { + return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); + }, + $signature: 16 + }; + A._functionString_closure0.prototype = { + call$1(argument) { + return A.serializeValue0(argument, false, true); + }, + $signature: 223 + }; + A._removedColorFunction_closure0.prototype = { + call$1($arguments) { + var t1 = this.name, + t2 = J.getInterceptor$asx($arguments), + t3 = A.S(t2.$index($arguments, 0)), + t4 = this.negative ? "-" : ""; + throw A.wrapException(A.SassScriptException$0("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + A.S(t2.$index($arguments, 1)) + string$.x29x0a_Moro + t1, null)); + }, + $signature: 396 + }; + A._rgb_closure0.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 224 + }; + A._hsl_closure0.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 224 + }; + A._parseChannels_closure1.prototype = { + call$1($name) { + return $name + " channel"; + }, + $signature: 6 + }; + A._parseChannels_closure2.prototype = { + call$1(channel) { + return channel.get$isSpecialNumber(); + }, + $signature: 54 + }; + A._colorFromChannels_closure1.prototype = { + call$1(channel0) { + return A._angleValue0(channel0, "hue"); + }, + $signature: 102 + }; + A._colorFromChannels_closure2.prototype = { + call$1(channel0) { + return A._angleValue0(channel0, "hue"); + }, + $signature: 102 + }; + A._channelFromValue_closure0.prototype = { + call$1(value) { + var t1, _0_8, t2, _0_5, _0_8_isSet, upperClamped, t3, + _0_0 = this.channel; + $label0$0: { + t1 = _0_0 instanceof A.LinearChannel0; + if (t1 && _0_0.requiresPercent && !value.hasUnit$1("%")) + A.throwExpression(A.SassScriptException$0("Expected " + value.toString$0(0) + ' to have unit "%".', _0_0.name)); + _0_8 = null; + t2 = false; + if (t1) { + _0_5 = _0_0.lowerClamped; + _0_8_isSet = !_0_5; + if (_0_8_isSet) { + _0_8 = _0_0.upperClamped; + t2 = !_0_8; + } + } else { + _0_5 = null; + _0_8_isSet = false; + } + if (t2) { + t1 = A._percentageOrUnitless0(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1 && !this.clamp) { + t1 = A._percentageOrUnitless0(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1) { + upperClamped = _0_8_isSet ? _0_8 : _0_0.upperClamped; + t1 = _0_0.max; + t2 = A._percentageOrUnitless0(value, t1, _0_0.name); + t3 = _0_5 ? _0_0.min : -1 / 0; + t1 = upperClamped ? t1 : 1 / 0; + t1 = isNaN(t2) ? t3 : B.JSNumber_methods.clamp$2(t2, t3, t1); + break $label0$0; + } + t1 = B.JSNumber_methods.$mod(value.coerceValueToUnit$2("deg", _0_0.name), 360); + break $label0$0; + } + return t1; + }, + $signature: 102 + }; + A._channelFunction_closure0.prototype = { + call$1($arguments) { + var _this = this, + result = A.SassNumber_SassNumber0(_this.getter.call$1(J.get$first$ax($arguments).assertColor$1("color")), _this.unit), + t1 = _this.global ? "" : "color.", + t2 = _this.name; + A.warnForDeprecation0(t1 + t2 + string$.x28__is_d + t2 + '", $space: ' + _this.space.toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_ivT); + return result; + }, + $signature: 22 + }; + A._suggestScaleAndAdjust_closure0.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 78 + }; + A.colorClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassColor", new A.colorClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.colorClass__closure0(), "hashCode", new A.colorClass__closure1(), "toSpace", new A.colorClass__closure2(), "isInGamut", new A.colorClass__closure3(), "toGamut", new A.colorClass__closure4(), "channel", new A.colorClass__closure5(), "isChannelMissing", new A.colorClass__closure6(), "isChannelPowerless", new A.colorClass__closure7(), "change", new A.colorClass__closure8(), "interpolate", new A.colorClass__closure9()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["red", new A.colorClass__closure10(), "green", new A.colorClass__closure11(), "blue", new A.colorClass__closure12(), "hue", new A.colorClass__closure13(), "saturation", new A.colorClass__closure14(), "lightness", new A.colorClass__closure15(), "whiteness", new A.colorClass__closure16(), "blackness", new A.colorClass__closure17(), "alpha", new A.colorClass__closure18(), "space", new A.colorClass__closure19(), "isLegacy", new A.colorClass__closure20(), "channelsOrNull", new A.colorClass__closure21(), "channels", new A.colorClass__closure22()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(A.SassColor_SassColor$rgbInternal0(0, 0, 0, 1, null).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.colorClass__closure.prototype = { + call$2($self, options) { + var t1, t2, t3, t4, _null = null; + switch (A._constructionSpace(options)) { + case B.RgbColorSpace_mlz0: + A._checkNullAlphaDeprecation(options); + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$rgbInternal0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.HslColorSpace_gsm0: + A._checkNullAlphaDeprecation(options); + t1 = J.getInterceptor$x(options); + t2 = t1.get$hue(options); + t3 = t1.get$saturation(options); + t4 = t1.get$lightness(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$hsl0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.HwbColorSpace_06z0: + A._checkNullAlphaDeprecation(options); + t1 = J.getInterceptor$x(options); + t2 = t1.get$hue(options); + t3 = t1.get$whiteness(options); + t4 = t1.get$blackness(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$hwb0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.LabColorSpace_IF20: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$a(options); + t4 = t1.get$b(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.LabColorSpace_IF20, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.OklabColorSpace_yrt0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$a(options); + t4 = t1.get$b(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.OklabColorSpace_yrt0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.LchColorSpace_wv80: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$chroma(options); + t4 = t1.get$hue(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$forSpaceInternal0(B.LchColorSpace_wv80, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.OklchColorSpace_li80: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$chroma(options); + t4 = t1.get$hue(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_li80, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.SrgbColorSpace_AD40: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.SrgbColorSpace_AD40, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.SrgbLinearColorSpace_sEs0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.SrgbLinearColorSpace_sEs0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.DisplayP3ColorSpace_NQk0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.DisplayP3ColorSpace_NQk0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.A98RgbColorSpace_bdu0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.A98RgbColorSpace_bdu0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.ProphotoRgbColorSpace_KiG0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.ProphotoRgbColorSpace_KiG0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.Rec2020ColorSpace_2jN0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.Rec2020ColorSpace_2jN0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.XyzD50ColorSpace_2No0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$x(options); + t3 = t1.get$y(options); + t4 = t1.get$z(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.XyzD50ColorSpace_2No0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.XyzD65ColorSpace_4CA0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$x(options); + t3 = t1.get$y(options); + t4 = t1.get$z(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.XyzD65ColorSpace_4CA0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + default: + throw A.wrapException("Unreachable"); + } + }, + $signature: 399 + }; + A.colorClass__closure0.prototype = { + call$2($self, other) { + return $self.$eq(0, other); + }, + $signature: 400 + }; + A.colorClass__closure1.prototype = { + call$1($self) { + return $self.get$hashCode(0); + }, + $signature: 39 + }; + A.colorClass__closure2.prototype = { + call$2($self, space) { + return A._toSpace($self, space); + }, + $signature: 401 + }; + A.colorClass__closure3.prototype = { + call$2($self, space) { + return A._toSpace($self, space).get$isInGamut(); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 402 + }; + A.colorClass__closure4.prototype = { + call$2($self, options) { + var t1 = J.getInterceptor$x(options), + t2 = A._toSpace($self, t1.get$space(options)); + t1 = A.GamutMapMethod_GamutMapMethod$fromName0(t1.get$method(options)); + t1 = t2.get$isInGamut() ? t2 : t1.map$1(0, t2); + return t1.toSpace$1($self._color0$_space); + }, + $signature: 403 + }; + A.colorClass__closure5.prototype = { + call$3($self, channel, options) { + return A._toSpace($self, options == null ? null : J.get$space$x(options)).channel$1(0, channel); + }, + call$2($self, channel) { + return this.call$3($self, channel, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 404 + }; + A.colorClass__closure6.prototype = { + call$2($self, channel) { + return $self.isChannelMissing$1(channel); + }, + $signature: 405 + }; + A.colorClass__closure7.prototype = { + call$3($self, channel, options) { + return A._toSpace($self, options == null ? null : J.get$space$x(options)).isChannelPowerless$1(channel); + }, + call$2($self, channel) { + return this.call$3($self, channel, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 406 + }; + A.colorClass__closure8.prototype = { + call$2($self, options) { + var t3, space, t4, t5, t6, color, changedValue, _0_2, changedColor, _0_4, _0_6, _null = null, + _s9_ = "whiteness", + _s9_0 = "blackness", + _s3_ = "hue", + _s10_ = "saturation", + _s9_1 = "lightness", + _s3_0 = "red", _s5_ = "alpha", + _s106_ = string$.Passin_, + _s5_0 = "green", _s4_ = "blue", + _s105_ = "Passing `hue: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", + t1 = J.getInterceptor$x(options), + t2 = t1.get$space(options) == null, + spaceSetExplicitly = !t2; + if (spaceSetExplicitly) { + t3 = t1.get$space(options); + t3.toString; + space = A.ColorSpace_fromName0(t3, _null); + } else + space = $self._color0$_space; + t3 = $self._color0$_space; + if (t3.get$isLegacyInternal() && t2) { + if ("whiteness" in options || "blackness" in options) + space = B.HwbColorSpace_06z0; + else if ("hue" in options && t3 === B.HwbColorSpace_06z0) + space = B.HwbColorSpace_06z0; + else if ("hue" in options || "saturation" in options || "lightness" in options) + space = B.HslColorSpace_gsm0; + else if ("red" in options) + space = B.RgbColorSpace_mlz0; + if (space !== t3) + A.warnForDeprecationFromApi("Changing a channel not in this color's space without explicitly specifying the `space` option is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + } + for (t2 = J.get$iterator$ax(self.Object.keys(options)), t4 = space._space$_channels, t5 = type$.JSArray_String; t2.moveNext$0();) { + t6 = t2.get$current(t2); + if (B.JSArray_methods.contains$1(A._setArrayType(["alpha", "space"], t5), t6)) + continue; + if (!B.JSArray_methods.any$1(t4, new A.colorClass___closure(t6))) + A.jsThrow(new self.Error("`" + t6 + "` is not a valid channel in `" + space.toString$0(0) + "`.")); + } + color = $self.toSpace$1(space); + changedValue = new A.colorClass__closure_changedValue(color, options); + $label0$2: { + _0_2 = B.HslColorSpace_gsm0 === space; + if (_0_2 && spaceSetExplicitly) { + changedColor = A.SassColor_SassColor$hsl0(changedValue.call$1(_s3_), changedValue.call$1(_s10_), changedValue.call$1(_s9_1), changedValue.call$1(_s5_)); + break $label0$2; + } + if (_0_2) { + t2 = t1.get$hue(options); + t4 = $.$get$_isNull(); + if (A._asBool(t4.call$1(t2))) + A.warnForDeprecationFromApi(_s105_, B.Deprecation_zPV); + else if (A._asBool(t4.call$1(t1.get$saturation(options)))) + A.warnForDeprecationFromApi("Passing `saturation: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + else if (A._asBool(t4.call$1(t1.get$lightness(options)))) + A.warnForDeprecationFromApi("Passing `lightness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + if (A._asBool(t4.call$1(t1.get$alpha(options)))) + A.warnForDeprecationFromApi(_s106_, B.Deprecation_omH); + t2 = t1.get$hue(options); + if (t2 == null) + t2 = color.channel$1(0, _s3_); + t4 = t1.get$saturation(options); + if (t4 == null) + t4 = color.channel$1(0, _s10_); + t5 = t1.get$lightness(options); + if (t5 == null) + t5 = color.channel$1(0, _s9_1); + t1 = t1.get$alpha(options); + changedColor = A.SassColor_SassColor$hsl0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_) : t1); + break $label0$2; + } + _0_4 = B.HwbColorSpace_06z0 === space; + if (_0_4 && spaceSetExplicitly) { + changedColor = A.SassColor_SassColor$hwb0(changedValue.call$1(_s3_), changedValue.call$1(_s9_), changedValue.call$1(_s9_0), changedValue.call$1(_s5_)); + break $label0$2; + } + if (_0_4) { + t2 = t1.get$hue(options); + t4 = $.$get$_isNull(); + if (A._asBool(t4.call$1(t2))) + A.warnForDeprecationFromApi(_s105_, B.Deprecation_zPV); + else if (A._asBool(t4.call$1(t1.get$whiteness(options)))) + A.warnForDeprecationFromApi("Passing `whiteness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + else if (A._asBool(t4.call$1(t1.get$blackness(options)))) + A.warnForDeprecationFromApi("Passing `blackness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + if (A._asBool(t4.call$1(t1.get$alpha(options)))) + A.warnForDeprecationFromApi(_s106_, B.Deprecation_omH); + t2 = t1.get$hue(options); + if (t2 == null) + t2 = color.channel$1(0, _s3_); + t4 = t1.get$whiteness(options); + if (t4 == null) + t4 = color.channel$1(0, _s9_); + t5 = t1.get$blackness(options); + if (t5 == null) + t5 = color.channel$1(0, _s9_0); + t1 = t1.get$alpha(options); + changedColor = A.SassColor_SassColor$hwb0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_) : t1); + break $label0$2; + } + _0_6 = B.RgbColorSpace_mlz0 === space; + if (_0_6 && spaceSetExplicitly) { + changedColor = A.SassColor_SassColor$rgbInternal0(changedValue.call$1(_s3_0), changedValue.call$1(_s5_0), changedValue.call$1(_s4_), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (_0_6) { + t2 = t1.get$red(options); + t4 = $.$get$_isNull(); + if (A._asBool(t4.call$1(t2))) + A.warnForDeprecationFromApi("Passing `red: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + else if (A._asBool(t4.call$1(t1.get$green(options)))) + A.warnForDeprecationFromApi("Passing `green: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + else if (A._asBool(t4.call$1(t1.get$blue(options)))) + A.warnForDeprecationFromApi("Passing `blue: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + if (A._asBool(t4.call$1(t1.get$alpha(options)))) + A.warnForDeprecationFromApi(_s106_, B.Deprecation_omH); + t2 = t1.get$red(options); + if (t2 == null) + t2 = color.channel$1(0, _s3_0); + t4 = t1.get$green(options); + if (t4 == null) + t4 = color.channel$1(0, _s5_0); + t5 = t1.get$blue(options); + if (t5 == null) + t5 = color.channel$1(0, _s4_); + t1 = t1.get$alpha(options); + changedColor = A.SassColor_SassColor$rgbInternal0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_) : t1, _null); + break $label0$2; + } + if (B.LabColorSpace_IF20 === space) { + changedColor = A.SassColor$_forSpace0(B.LabColorSpace_IF20, changedValue.call$1(_s9_1), changedValue.call$1("a"), changedValue.call$1("b"), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.OklabColorSpace_yrt0 === space) { + changedColor = A.SassColor$_forSpace0(B.OklabColorSpace_yrt0, changedValue.call$1(_s9_1), changedValue.call$1("a"), changedValue.call$1("b"), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.LchColorSpace_wv80 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(B.LchColorSpace_wv80, changedValue.call$1(_s9_1), changedValue.call$1("chroma"), changedValue.call$1(_s3_), changedValue.call$1(_s5_)); + break $label0$2; + } + if (B.OklchColorSpace_li80 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_li80, changedValue.call$1(_s9_1), changedValue.call$1("chroma"), changedValue.call$1(_s3_), changedValue.call$1(_s5_)); + break $label0$2; + } + if (B.A98RgbColorSpace_bdu0 === space) { + changedColor = A.SassColor$_forSpace0(B.A98RgbColorSpace_bdu0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_0), changedValue.call$1(_s4_), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.DisplayP3ColorSpace_NQk0 === space) { + changedColor = A.SassColor$_forSpace0(B.DisplayP3ColorSpace_NQk0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_0), changedValue.call$1(_s4_), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.ProphotoRgbColorSpace_KiG0 === space) { + changedColor = A.SassColor$_forSpace0(B.ProphotoRgbColorSpace_KiG0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_0), changedValue.call$1(_s4_), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.Rec2020ColorSpace_2jN0 === space) { + changedColor = A.SassColor$_forSpace0(B.Rec2020ColorSpace_2jN0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_0), changedValue.call$1(_s4_), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.SrgbColorSpace_AD40 === space) { + changedColor = A.SassColor$_forSpace0(B.SrgbColorSpace_AD40, changedValue.call$1(_s3_0), changedValue.call$1(_s5_0), changedValue.call$1(_s4_), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.SrgbLinearColorSpace_sEs0 === space) { + changedColor = A.SassColor$_forSpace0(B.SrgbLinearColorSpace_sEs0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_0), changedValue.call$1(_s4_), changedValue.call$1(_s5_), _null); + break $label0$2; + } + if (B.XyzD50ColorSpace_2No0 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(space, changedValue.call$1("x"), changedValue.call$1("y"), changedValue.call$1("z"), changedValue.call$1(_s5_)); + break $label0$2; + } + if (B.XyzD65ColorSpace_4CA0 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(space, changedValue.call$1("x"), changedValue.call$1("y"), changedValue.call$1("z"), changedValue.call$1(_s5_)); + break $label0$2; + } + throw A.wrapException("No space set"); + } + return changedColor.toSpace$1(t3); + }, + $signature: 407 + }; + A.colorClass___closure.prototype = { + call$1(channel) { + return channel.name === this.key; + }, + $signature: 78 + }; + A.colorClass__closure_changedValue.prototype = { + call$1(channel) { + var t2, + t1 = this.options; + if (channel in t1) { + t2 = t1[channel]; + t2 = !A._asBool($.$get$_isUndefined().call$1(t2)); + } else + t2 = false; + return t2 ? t1[channel] : this.color.channel$1(0, channel); + }, + $signature: 408 + }; + A.colorClass__closure9.prototype = { + call$3($self, color2, options) { + var interpolationMethod, t2, + t1 = J.getInterceptor$x(options), + _1_0 = t1.get$method(options); + if (_1_0 != null) + interpolationMethod = A.InterpolationMethod$0($self._color0$_space, A.EnumByName_byName(B.List_23h, _1_0)); + else { + t2 = $self._color0$_space; + interpolationMethod = !t2.get$isPolarInternal() ? A.InterpolationMethod$0(t2, null) : A.InterpolationMethod$0(t2, B.HueInterpolationMethod_00); + } + return $self.interpolate$3$weight(color2, interpolationMethod, t1.get$weight(options)); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 409 + }; + A.colorClass__closure10.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("red is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); + }, + $signature: 39 + }; + A.colorClass__closure11.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("green is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); + }, + $signature: 39 + }; + A.colorClass__closure12.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("blue is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); + }, + $signature: 39 + }; + A.colorClass__closure13.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("hue is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return $self._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); + }, + $signature: 28 + }; + A.colorClass__closure14.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("saturation is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return $self._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); + }, + $signature: 28 + }; + A.colorClass__closure15.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("lightness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return $self._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); + }, + $signature: 28 + }; + A.colorClass__closure16.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("whiteness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return $self._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "whiteness"); + }, + $signature: 28 + }; + A.colorClass__closure17.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("blackness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_zPV); + return $self._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "blackness"); + }, + $signature: 28 + }; + A.colorClass__closure18.prototype = { + call$1($self) { + var t1 = $self.alphaOrNull; + return t1 == null ? 0 : t1; + }, + $signature: 28 + }; + A.colorClass__closure19.prototype = { + call$1($self) { + return $self._color0$_space.name; + }, + $signature: 410 + }; + A.colorClass__closure20.prototype = { + call$1($self) { + return $self._color0$_space.get$isLegacyInternal(); + }, + $signature: 411 + }; + A.colorClass__closure21.prototype = { + call$1($self) { + return new self.immutable.List($self.get$channelsOrNull()); + }, + $signature: 225 + }; + A.colorClass__closure22.prototype = { + call$1($self) { + return new self.immutable.List($self.get$channels()); + }, + $signature: 225 + }; + A._Channels.prototype = {}; + A._ConstructionOptions.prototype = {}; + A._ChannelOptions.prototype = {}; + A._ToGamutOptions.prototype = {}; + A._InterpolationOptions.prototype = {}; + A._NodeSassColor.prototype = {}; + A.legacyColorClass_closure.prototype = { + call$6(thisArg, redOrArgb, green, blue, alpha, dartValue) { + var red, t1, t2, t3, t4; + if (dartValue != null) { + J.set$dartValue$x(thisArg, dartValue); + return; + } + if (green == null || blue == null) { + A._asInt(redOrArgb); + alpha = B.JSInt_methods._shrOtherPositive$1(redOrArgb, 24) / 255; + red = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 16), 256); + green = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 8), 256); + blue = B.JSInt_methods.$mod(redOrArgb, 256); + } else { + redOrArgb.toString; + red = redOrArgb; + } + t1 = A.fuzzyRound0(isNaN(red) ? 0 : B.JSNumber_methods.clamp$2(red, 0, 255)); + t2 = A.fuzzyRound0(isNaN(green) ? 0 : B.JSNumber_methods.clamp$2(green, 0, 255)); + t3 = A.fuzzyRound0(isNaN(blue) ? 0 : B.JSNumber_methods.clamp$2(blue, 0, 255)); + t4 = A.NullableExtension_andThen0(alpha, new A.legacyColorClass__closure()); + J.set$dartValue$x(thisArg, A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4 == null ? 1 : t4, null)); + }, + call$2(thisArg, redOrArgb) { + var _null = null; + return this.call$6(thisArg, redOrArgb, _null, _null, _null, _null); + }, + call$3(thisArg, redOrArgb, green) { + return this.call$6(thisArg, redOrArgb, green, null, null, null); + }, + call$4(thisArg, redOrArgb, green, blue) { + return this.call$6(thisArg, redOrArgb, green, blue, null, null); + }, + call$5(thisArg, redOrArgb, green, blue, alpha) { + return this.call$6(thisArg, redOrArgb, green, blue, alpha, null); + }, + "call*": "call$6", + $requiredArgCount: 2, + $defaultValues() { + return [null, null, null, null]; + }, + $signature: 413 + }; + A.legacyColorClass__closure.prototype = { + call$1(alpha) { + return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); + }, + $signature: 414 + }; + A.legacyColorClass_closure0.prototype = { + call$1(thisArg) { + return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); + }, + $signature: 123 + }; + A.legacyColorClass_closure1.prototype = { + call$1(thisArg) { + return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); + }, + $signature: 123 + }; + A.legacyColorClass_closure2.prototype = { + call$1(thisArg) { + return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); + }, + $signature: 123 + }; + A.legacyColorClass_closure3.prototype = { + call$1(thisArg) { + var t1 = J.get$dartValue$x(thisArg).alphaOrNull; + return t1 == null ? 0 : t1; + }, + $signature: 416 + }; + A.legacyColorClass_closure4.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$red(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 109 + }; + A.legacyColorClass_closure5.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$green(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 109 + }; + A.legacyColorClass_closure6.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$blue(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 109 + }; + A.legacyColorClass_closure7.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$alpha(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 1))); + }, + $signature: 109 + }; + A.SassColor0.prototype = { + get$channels() { + var t2, t3, + t1 = this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = this.channel2OrNull; + return A.List_List$unmodifiable([t1, t2, t3 == null ? 0 : t3], type$.double); + }, + get$channelsOrNull() { + return A.List_List$unmodifiable([this.channel0OrNull, this.channel1OrNull, this.channel2OrNull], type$.nullable_double); + }, + get$isChannel0Powerless() { + var t1, t2, _this = this, + _0_0 = _this._color0$_space; + $label0$0: { + if (B.HslColorSpace_gsm0 === _0_0) { + t1 = _this.channel1OrNull; + t1 = A.fuzzyEquals0(t1 == null ? 0 : t1, 0); + break $label0$0; + } + if (B.HwbColorSpace_06z0 === _0_0) { + t1 = _this.channel1OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel2OrNull; + t1 += t2 == null ? 0 : t2; + t1 = t1 > 100 || A.fuzzyEquals0(t1, 100); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isChannel2Powerless() { + var t1, + _0_0 = this._color0$_space; + $label0$0: { + if (B.LchColorSpace_wv80 === _0_0 || B.OklchColorSpace_li80 === _0_0) { + t1 = this.channel1OrNull; + t1 = A.fuzzyEquals0(t1 == null ? 0 : t1, 0); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isInGamut() { + var t2, t3, _this = this, + t1 = _this._color0$_space; + if (!t1.get$isBoundedInternal()) + return true; + t2 = _this.channel0OrNull; + if (t2 == null) + t2 = 0; + t1 = t1._space$_channels; + t3 = false; + if (_this._color0$_isChannelInGamut$2(t2, t1[0])) { + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + if (_this._color0$_isChannelInGamut$2(t2, t1[1])) { + t2 = _this.channel2OrNull; + if (t2 == null) + t2 = 0; + t1 = _this._color0$_isChannelInGamut$2(t2, t1[2]); + } else + t1 = t3; + } else + t1 = t3; + return t1; + }, + _color0$_isChannelInGamut$2(value, channel) { + var min, max, t1; + $label0$0: { + if (channel instanceof A.LinearChannel0) { + min = channel.min; + max = channel.max; + if (value < max || A.fuzzyEquals0(value, max)) + t1 = value > min || A.fuzzyEquals0(value, min); + else + t1 = false; + break $label0$0; + } + t1 = true; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitColor$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertColor$1($name) { + return this; + }, + assertLegacy$1($name) { + if (this._color0$_space.get$isLegacyInternal()) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + string$.x20to_be, $name)); + }, + channel$1(_, channel) { + var t1, _this = this, + channels = _this._color0$_space._space$_channels; + if (channel === channels[0].name) { + t1 = _this.channel0OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[1].name) { + t1 = _this.channel1OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[2].name) { + t1 = _this.channel2OrNull; + return t1 == null ? 0 : t1; + } + if (channel === "alpha") { + t1 = _this.alphaOrNull; + return t1 == null ? 0 : t1; + } + throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', null)); + }, + isChannelMissing$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._color0$_space._space$_channels; + if (channel === channels[0].name) + return _this.channel0OrNull == null; + if (channel === channels[1].name) + return _this.channel1OrNull == null; + if (channel === channels[2].name) + return _this.channel2OrNull == null; + if (channel === "alpha") + return _this.alphaOrNull == null; + throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + isChannelMissing$1(channel) { + return this.isChannelMissing$3$channelName$colorName(channel, null, null); + }, + isChannelPowerless$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._color0$_space._space$_channels; + if (channel === channels[0].name) + return _this.get$isChannel0Powerless(); + if (channel === channels[1].name) + return false; + if (channel === channels[2].name) + return _this.get$isChannel2Powerless(); + if (channel === "alpha") + return false; + throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + isChannelPowerless$1(channel) { + return this.isChannelPowerless$3$channelName$colorName(channel, null, null); + }, + _color0$_legacyChannel$2(space, channel) { + if (!this._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0("color." + channel + string$.x28__is_oc, null)); + return this.toSpace$1(space).channel$1(0, channel); + }, + toSpace$2$legacyMissing(space, legacyMissing) { + var t2, converted, t3, t4, _this = this, + t1 = _this._color0$_space; + if (t1 === space) + return _this; + t2 = _this.alphaOrNull; + if (t2 == null) + t2 = 0; + converted = t1.convert$5(space, _this.channel0OrNull, _this.channel1OrNull, _this.channel2OrNull, t2); + t1 = false; + if (!legacyMissing) + if (converted._color0$_space.get$isLegacyInternal()) + t1 = converted.channel0OrNull == null || converted.channel1OrNull == null || converted.channel2OrNull == null || converted.alphaOrNull == null; + if (t1) { + t1 = converted.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = converted.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = converted.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = converted.alphaOrNull; + if (t4 == null) + t4 = 0; + t4 = A.SassColor_SassColor$forSpaceInternal0(converted._color0$_space, t1, t2, t3, t4); + t1 = t4; + } else + t1 = converted; + return t1; + }, + toSpace$1(space) { + return this.toSpace$2$legacyMissing(space, true); + }, + changeRgb$4$alpha$blue$green$red(alpha, blue, green, red) { + var t1, t2, t3, t4, _this = this, _null = null; + if (!_this._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0("color.changeRgb() is only supported for legacy colors. Please use color.changeChannels() instead with an explicit $space argument.", _null)); + t1 = red == null ? _null : red; + if (t1 == null) + t1 = _this.channel$1(0, "red"); + t2 = green == null ? _null : green; + if (t2 == null) + t2 = _this.channel$1(0, "green"); + t3 = blue == null ? _null : blue; + if (t3 == null) + t3 = _this.channel$1(0, "blue"); + t4 = alpha == null ? _null : alpha; + if (t4 == null) { + t4 = _this.alphaOrNull; + if (t4 == null) + t4 = 0; + } + return A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4, _null); + }, + changeRgb$1$alpha(alpha) { + return this.changeRgb$4$alpha$blue$green$red(alpha, null, null, null); + }, + changeRgb$1$blue(blue) { + return this.changeRgb$4$alpha$blue$green$red(null, blue, null, null); + }, + changeRgb$1$green(green) { + return this.changeRgb$4$alpha$blue$green$red(null, null, green, null); + }, + changeRgb$1$red(red) { + return this.changeRgb$4$alpha$blue$green$red(null, null, null, red); + }, + changeHsl$3$hue$lightness$saturation(hue, lightness, saturation) { + var t2, t3, t4, t5, _this = this, _null = null, + t1 = _this._color0$_space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.color_c, _null)); + t2 = hue == null ? _null : hue; + if (t2 == null) + t2 = _this._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); + t3 = saturation == null ? _null : saturation; + if (t3 == null) + t3 = _this._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); + t4 = lightness == null ? _null : lightness; + if (t4 == null) + t4 = _this._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); + t5 = _this.alphaOrNull; + if (t5 == null) + t5 = 0; + return A.SassColor_SassColor$hsl0(t2, t3, t4, t5).toSpace$1(t1); + }, + changeHsl$1$saturation(saturation) { + return this.changeHsl$3$hue$lightness$saturation(null, null, saturation); + }, + changeHsl$1$lightness(lightness) { + return this.changeHsl$3$hue$lightness$saturation(null, lightness, null); + }, + changeHsl$1$hue(hue) { + return this.changeHsl$3$hue$lightness$saturation(hue, null, null); + }, + changeAlpha$1(alpha) { + var t2, t3, _this = this, + t1 = _this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = _this.channel2OrNull; + if (t3 == null) + t3 = 0; + return A.SassColor_SassColor$forSpaceInternal0(_this._color0$_space, t1, t2, t3, alpha); + }, + interpolate$4$legacyMissing$weight(other, method, legacyMissing, weight) { + var t1, color1, color2, missing1_0, missing1_1, missing1_2, missing2_0, missing2_1, missing2_2, channel1_0, channel1_1, channel1_2, channel2_0, channel2_1, channel2_2, alpha1, t2, t3, alpha10, alpha2, alpha20, thisMultiplier, t4, t5, otherMultiplier, mixedAlpha, mixed0, mixed1, mixed2, _this = this, _null = null; + if (weight == null) + weight = 0.5; + if (A.fuzzyEquals0(weight, 0)) + return other; + if (A.fuzzyEquals0(weight, 1)) + return _this; + t1 = method.space; + color1 = _this.toSpace$1(t1); + color2 = other.toSpace$1(t1); + if (weight < 0 || weight > 1) + throw A.wrapException(A.RangeError$range(weight, 0, 1, "weight", _null)); + missing1_0 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 0); + missing1_1 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 1); + missing1_2 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 2); + missing2_0 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 0); + missing2_1 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 1); + missing2_2 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 2); + channel1_0 = (missing1_0 ? color2 : color1).channel0OrNull; + if (channel1_0 == null) + channel1_0 = 0; + channel1_1 = (missing1_1 ? color2 : color1).channel1OrNull; + if (channel1_1 == null) + channel1_1 = 0; + channel1_2 = (missing1_2 ? color2 : color1).channel2OrNull; + if (channel1_2 == null) + channel1_2 = 0; + channel2_0 = (missing2_0 ? color1 : color2).channel0OrNull; + if (channel2_0 == null) + channel2_0 = 0; + channel2_1 = (missing2_1 ? color1 : color2).channel1OrNull; + if (channel2_1 == null) + channel2_1 = 0; + channel2_2 = (missing2_2 ? color1 : color2).channel2OrNull; + if (channel2_2 == null) + channel2_2 = 0; + alpha1 = _this.alphaOrNull; + t2 = alpha1 == null; + if (t2) { + t3 = other.alphaOrNull; + alpha10 = t3 == null ? 0 : t3; + } else + alpha10 = alpha1; + alpha2 = other.alphaOrNull; + t3 = alpha2 == null; + if (t3) + alpha20 = t2 ? 0 : alpha1; + else + alpha20 = alpha2; + thisMultiplier = (t2 ? 1 : alpha1) * weight; + t4 = t3 ? 1 : alpha2; + t5 = 1 - weight; + otherMultiplier = t4 * t5; + mixedAlpha = t2 && t3 ? _null : alpha10 * weight + alpha20 * t5; + if (missing1_0 && missing2_0) + mixed0 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed0 = (channel1_0 * thisMultiplier + channel2_0 * otherMultiplier) / t2; + } + if (missing1_1 && missing2_1) + mixed1 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed1 = (channel1_1 * thisMultiplier + channel2_1 * otherMultiplier) / t2; + } + if (missing1_2 && missing2_2) + mixed2 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed2 = (channel1_2 * thisMultiplier + channel2_2 * otherMultiplier) / t2; + } + $label0$0: { + if (B.HslColorSpace_gsm0 === t1 || B.HwbColorSpace_06z0 === t1) { + if (missing1_0 && missing2_0) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._color0$_interpolateHues$4(channel1_0, channel2_0, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal0(t1, t2, mixed1, mixed2, mixedAlpha); + t1 = t2; + break $label0$0; + } + if (B.LchColorSpace_wv80 === t1 || B.OklchColorSpace_li80 === t1) { + if (missing1_2 && missing2_2) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._color0$_interpolateHues$4(channel1_2, channel2_2, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal0(t1, mixed0, mixed1, t2, mixedAlpha); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor_SassColor$forSpaceInternal0(t1, mixed0, mixed1, mixed2, mixedAlpha); + break $label0$0; + } + return t1.toSpace$2$legacyMissing(_this._color0$_space, legacyMissing); + }, + interpolate$3$weight(other, method, weight) { + return this.interpolate$4$legacyMissing$weight(other, method, true, weight); + }, + _color0$_isAnalogousChannelMissing$3(original, output, outputChannelIndex) { + var originalChannel; + if (output.get$channelsOrNull()[outputChannelIndex] == null) + return true; + if (original === output) + return false; + originalChannel = A.IterableExtension_firstWhereOrNull(original._color0$_space._space$_channels, output._color0$_space._space$_channels[outputChannelIndex].get$isAnalogous()); + if (originalChannel == null) + return false; + return original.isChannelMissing$1(originalChannel.name); + }, + _color0$_interpolateHues$4(hue1, hue2, method, weight) { + var _0_0, _1_0; + $label1$1: { + if (B.HueInterpolationMethod_00 === method) { + $label0$0: { + _0_0 = hue2 - hue1; + if (_0_0 > 180) { + hue1 += 360; + break $label0$0; + } + if (_0_0 < -180) + hue2 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_10 === method) { + $label2$2: { + _1_0 = hue2 - hue1; + if (_1_0 > 0 && _1_0 < 180) { + hue2 += 360; + break $label2$2; + } + if (_1_0 > -180 && _1_0 <= 0) + hue1 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_20 === method && hue2 < hue1) { + hue2 += 360; + break $label1$1; + } + if (B.HueInterpolationMethod_30 === method && hue1 < hue2) { + hue1 += 360; + break $label1$1; + } + break $label1$1; + } + return hue1 * weight + hue2 * (1 - weight); + }, + plus$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$minus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$dividedBy0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); + }, + $eq(_, other) { + var t1, t2, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassColor0)) + return false; + t1 = _this._color0$_space; + if (t1.get$isLegacyInternal()) { + t2 = other._color0$_space; + if (!t2.get$isLegacyInternal()) + return false; + if (!A.fuzzyEqualsNullable0(_this.alphaOrNull, other.alphaOrNull)) + return false; + if (t1 === t2) + return A.fuzzyEqualsNullable0(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable0(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable0(_this.channel2OrNull, other.channel2OrNull); + else + return _this.toSpace$1(B.RgbColorSpace_mlz0).$eq(0, other.toSpace$1(B.RgbColorSpace_mlz0)); + } + return t1 === other._color0$_space && A.fuzzyEqualsNullable0(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable0(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable0(_this.channel2OrNull, other.channel2OrNull) && A.fuzzyEqualsNullable0(_this.alphaOrNull, other.alphaOrNull); + }, + get$hashCode(_) { + var rgb, t2, t3, t4, t5, _this = this, + t1 = _this._color0$_space; + if (t1.get$isLegacyInternal()) { + rgb = _this.toSpace$1(B.RgbColorSpace_mlz0); + t1 = rgb.channel0OrNull; + t1 = A.fuzzyHashCode0(t1 == null ? 0 : t1); + t2 = rgb.channel1OrNull; + t2 = A.fuzzyHashCode0(t2 == null ? 0 : t2); + t3 = rgb.channel2OrNull; + t3 = A.fuzzyHashCode0(t3 == null ? 0 : t3); + t4 = _this.alphaOrNull; + return t1 ^ t2 ^ t3 ^ A.fuzzyHashCode0(t4 == null ? 0 : t4); + } else { + t1 = A.Primitives_objectHashCode(t1); + t2 = _this.channel0OrNull; + t2 = A.fuzzyHashCode0(t2 == null ? 0 : t2); + t3 = _this.channel1OrNull; + t3 = A.fuzzyHashCode0(t3 == null ? 0 : t3); + t4 = _this.channel2OrNull; + t4 = A.fuzzyHashCode0(t4 == null ? 0 : t4); + t5 = _this.alphaOrNull; + return (t1 ^ t2 ^ t3 ^ t4 ^ A.fuzzyHashCode0(t5 == null ? 0 : t5)) >>> 0; + } + } + }; + A.SassColor$_forSpace_closure0.prototype = { + call$1(alpha) { + return A.fuzzyAssertRange0(alpha, 0, 1, "alpha"); + }, + $signature: 16 + }; + A._ColorFormatEnum0.prototype = { + toString$0(_) { + return "rgbFunction"; + } + }; + A.SpanColorFormat0.prototype = {}; + A.Combinator0.prototype = { + _enumToString$0() { + return "Combinator." + this._name; + }, + toString$0(_) { + return this._combinator0$_text; + } + }; + A.ModifiableCssComment0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssComment0: 1, + get$span(receiver) { + return this.span; + } + }; + A.compileAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), + $async$returnValue, $async$self = this, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, result, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.options; + t2 = t1 == null; + t3 = t2 ? null : J.get$loadPaths$x(t1); + t4 = t2 ? null : J.get$quietDeps$x(t1); + if (t4 == null) + t4 = false; + t5 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); + t6 = t2 ? null : J.get$verbose$x(t1); + if (t6 == null) + t6 = false; + t7 = t2 ? null : J.get$charset$x(t1); + if (t7 == null) + t7 = true; + t8 = t2 ? null : J.get$sourceMap$x(t1); + if (t8 == null) + t8 = false; + t9 = $async$self.logger; + if (t2) + t10 = null; + else { + t10 = J.get$importers$x(t1); + t10 = t10 == null ? null : J.map$1$1$ax(t10, new A.compileAsync__closure(), type$.AsyncImporter); + } + t11 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); + t12 = A.parseDeprecations(t9, t2 ? null : J.get$fatalDeprecations$x(t1), true); + t13 = A.parseDeprecations(t9, t2 ? null : J.get$silenceDeprecations$x(t1), false); + t14 = A.parseDeprecations(t9, t2 ? null : J.get$futureDeprecations$x(t1), false); + $async$goto = 3; + return A._asyncAwait(A.compileAsync0($async$self.path, t7, t12, t11, t14, A.AsyncImportCache$(t10, t3, A.AsyncImportCache_wrapLogger0(t9, t13, t12, t14, $async$self.color), null), null, null, t9, null, t4, t13, t8, t5, null, true, t6), $async$call$0); + case 3: + // returning from await. + result = $async$result; + t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); + $async$returnValue = A._convertResult(result, t1 == null ? false : t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 270 + }; + A.compileAsync__closure.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 227 + }; + A.compileStringAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), + $async$returnValue, $async$self = this, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, result, t1, t2, t3, t4, t5, t6; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.options; + t2 = t1 == null; + t3 = A.parseSyntax(t2 ? null : J.get$syntax$x(t1)); + t4 = t2 ? null : A.NullableExtension_andThen0(J.get$url$x(t1), A.utils3__jsToDartUrl$closure()); + t5 = t2 ? null : J.get$loadPaths$x(t1); + t6 = t2 ? null : J.get$quietDeps$x(t1); + if (t6 == null) + t6 = false; + t7 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); + t8 = t2 ? null : J.get$verbose$x(t1); + if (t8 == null) + t8 = false; + t9 = t2 ? null : J.get$charset$x(t1); + if (t9 == null) + t9 = true; + t10 = t2 ? null : J.get$sourceMap$x(t1); + if (t10 == null) + t10 = false; + t11 = $async$self.logger; + if (t2) + t12 = null; + else { + t12 = J.get$importers$x(t1); + t12 = t12 == null ? null : J.map$1$1$ax(t12, new A.compileStringAsync__closure(), type$.AsyncImporter); + } + t13 = t2 ? null : A.NullableExtension_andThen0(J.get$importer$x(t1), new A.compileStringAsync__closure0()); + if (t13 == null) + t13 = (t2 ? null : J.get$url$x(t1)) == null ? new A.NoOpImporter0() : null; + t14 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); + t15 = A.parseDeprecations(t11, t2 ? null : J.get$fatalDeprecations$x(t1), true); + t16 = A.parseDeprecations(t11, t2 ? null : J.get$silenceDeprecations$x(t1), false); + t17 = A.parseDeprecations(t11, t2 ? null : J.get$futureDeprecations$x(t1), false); + $async$goto = 3; + return A._asyncAwait(A.compileStringAsync0($async$self.text, t9, t15, t14, t17, A.AsyncImportCache$(t12, t5, A.AsyncImportCache_wrapLogger0(t11, t16, t15, t17, $async$self.color), null), t13, null, null, t11, null, t6, t16, t10, t7, t3, t4, true, t8), $async$call$0); + case 3: + // returning from await. + result = $async$result; + t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); + $async$returnValue = A._convertResult(result, t1 == null ? false : t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 270 + }; + A.compileStringAsync__closure.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 227 + }; + A.compileStringAsync__closure0.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 420 + }; + A._wrapAsyncSassExceptions_closure.prototype = { + call$1(error) { + var t1; + if (error instanceof A.SassException0) + t1 = A.throwNodeException(error, this.ascii, this.color, null); + else + t1 = A.jsThrow(error == null ? type$.Object._as(error) : error); + return t1; + }, + $signature: 421 + }; + A._parseFunctions_closure0.prototype = { + call$2(signature, callback) { + var callable, + t1 = this.result; + if (!this.asynch) { + callable = A._Cell$(); + callable.__late_helper$_value = A.Callable_Callable$fromSignature(signature, new A._parseFunctions__closure2(callback, callable), true); + t1.push(callable._readLocal$0()); + } else { + callable = A._Cell$(); + callable.__late_helper$_value = A.AsyncCallable_AsyncCallable$fromSignature(signature, new A._parseFunctions__closure3(callback, callable), true); + t1.push(callable._readLocal$0()); + } + }, + $signature: 125 + }; + A._parseFunctions__closure2.prototype = { + call$1($arguments) { + var t1, t2, + _s42_ = string$.Invali, + result = A.wrapJSExceptions(new A._parseFunctions___closure6(this.callback, $arguments)); + if (result instanceof A.Value0) + return A._simplifyValue(result); + t1 = result != null && result instanceof self.Promise; + t2 = this.callable; + if (t1) + throw A.wrapException(_s42_ + J.get$name$x(t2.readLocal$0()) + '":\nPromises may only be returned for sass.compileAsync() and sass.compileStringAsync().'); + else + throw A.wrapException(_s42_ + J.get$name$x(t2.readLocal$0()) + '": ' + A.S(result) + " is not a sass.Value."); + }, + $signature: 3 + }; + A._parseFunctions___closure6.prototype = { + call$0() { + return type$.Function._as(this.callback).call$1(A.toJSArray(this.$arguments)); + }, + $signature: 57 + }; + A._parseFunctions__closure3.prototype = { + call$1($arguments) { + return this.$call$body$_parseFunctions__closure0($arguments); + }, + $call$body$_parseFunctions__closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + result = A.wrapJSExceptions(new A._parseFunctions___closure5($async$self.callback, $arguments)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture(type$.Promise._as(result), type$.Object), $async$call$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result instanceof A.Value0) { + $async$returnValue = A._simplifyValue(result); + // goto return + $async$goto = 1; + break; + } + throw A.wrapException(string$.Invali + J.get$name$x($async$self.callable.readLocal$0()) + '": ' + A.S(result) + " is not a sass.Value."); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 106 + }; + A._parseFunctions___closure5.prototype = { + call$0() { + return type$.Function._as(this.callback).call$1(A.toJSArray(this.$arguments)); + }, + $signature: 57 + }; + A.nodePackageImporterClass_closure.prototype = { + call$0() { + return type$.JSClass._as(A.allowInteropCaptureThisNamed("sass.NodePackageImporter", new A.nodePackageImporterClass__closure())); + }, + $signature: 15 + }; + A.nodePackageImporterClass__closure.prototype = { + call$2($self, entrypointDirectory) { + var directory, t1, filename, t2, _null = null, + _0_3 = A.entrypointFilename(); + $label0$0: { + if (entrypointDirectory != null) { + directory = entrypointDirectory == null ? A._asString(entrypointDirectory) : entrypointDirectory; + t1 = directory; + break $label0$0; + } + if (_0_3 != null) { + filename = _0_3 == null ? A._asString(_0_3) : _0_3; + t1 = $.$get$context().dirname$1(filename); + break $label0$0; + } + t1 = A.throwExpression("The Node package importer cannot determine an entry point because `require.main.filename` is not defined. Please provide an `entryPointDirectory` to the `NodePackageImporter`."); + } + t2 = new A.NodePackageImporter0(); + if (A.isBrowser()) + A.throwExpression(string$.The_No); + t2._node_package$__NodePackageImporter__entryPointDirectory_F = A.absolute(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + return t2; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 423 + }; + A._compileStylesheet_closure1.prototype = { + call$1(url) { + return url === "" ? A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.stylesheet.span.file._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text() : this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + }, + $signature: 6 + }; + A.CompileOptions.prototype = {}; + A.CompileStringOptions.prototype = {}; + A.NodeCompileResult.prototype = {}; + A.CompileResult0.prototype = {}; + A.Compiler.prototype = {}; + A.AsyncCompiler.prototype = { + addCompilation$1(compilation) { + this.compilations.add$1(0, A.promiseToFuture0(compilation, type$.dynamic).catchError$1(new A.AsyncCompiler_addCompilation_closure())); + } + }; + A.AsyncCompiler_addCompilation_closure.prototype = { + call$1(err) { + }, + $signature: 63 + }; + A.compilerClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.Compiler", new A.compilerClass__closure())); + A.LinkedHashMap_LinkedHashMap$_literal(["compile", new A.compilerClass__closure0(), "compileString", new A.compilerClass__closure1(), "dispose", new A.compilerClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.Compiler().constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.compilerClass__closure.prototype = { + call$1($self) { + return A.LinkedHashSet_LinkedHashSet$_literal([A.jsThrow(new self.Error("Compiler can not be directly constructed. Please use `sass.initCompiler()` instead."))], type$.Never); + }, + $signature: 229 + }; + A.compilerClass__closure0.prototype = { + call$3($self, path, options) { + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + return A.compile0(path, options); + }, + call$2($self, path) { + return this.call$3($self, path, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 425 + }; + A.compilerClass__closure1.prototype = { + call$3($self, source, options) { + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + return A.compileString0(source, options); + }, + call$2($self, source) { + return this.call$3($self, source, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 426 + }; + A.compilerClass__closure2.prototype = { + call$1($self) { + $self._disposed = true; + }, + $signature: 427 + }; + A.asyncCompilerClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.AsyncCompiler", new A.asyncCompilerClass__closure())); + A.LinkedHashMap_LinkedHashMap$_literal(["compileAsync", new A.asyncCompilerClass__closure0(), "compileStringAsync", new A.asyncCompilerClass__closure1(), "dispose", new A.asyncCompilerClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.AsyncCompiler(new A.FutureGroup(new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_List_void), type$._AsyncCompleter_List_void), [], type$.FutureGroup_void)).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.asyncCompilerClass__closure.prototype = { + call$1($self) { + return A.LinkedHashSet_LinkedHashSet$_literal([A.jsThrow(new self.Error("AsyncCompiler can not be directly constructed. Please use `sass.initAsyncCompiler()` instead."))], type$.Never); + }, + $signature: 229 + }; + A.asyncCompilerClass__closure0.prototype = { + call$3($self, path, options) { + var compilation; + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + compilation = A.compileAsync1(path, options); + $self.addCompilation$1(compilation); + return compilation; + }, + call$2($self, path) { + return this.call$3($self, path, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 428 + }; + A.asyncCompilerClass__closure1.prototype = { + call$3($self, source, options) { + var compilation; + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + compilation = A.compileStringAsync1(source, options); + $self.addCompilation$1(compilation); + return compilation; + }, + call$2($self, source) { + return this.call$3($self, source, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 429 + }; + A.asyncCompilerClass__closure2.prototype = { + call$1($self) { + $self._disposed = true; + return A.futureToPromise0(new A.asyncCompilerClass___closure($self).call$0()); + }, + $signature: 430 + }; + A.asyncCompilerClass___closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.self.compilations; + t1.close$0(0); + $async$goto = 2; + return A._asyncAwait(t1._future_group$_completer.future, $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A.initAsyncCompiler_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.AsyncCompiler), + $async$returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = new A.AsyncCompiler(new A.FutureGroup(new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_List_void), type$._AsyncCompleter_List_void), [], type$.FutureGroup_void)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 431 + }; + A.ComplexSassNumber0.prototype = { + get$numeratorUnits(_) { + return this._complex0$_numeratorUnits; + }, + get$denominatorUnits(_) { + return this._complex0$_denominatorUnits; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return true; + }, + hasUnit$1(unit) { + return false; + }, + compatibleWithUnit$1(unit) { + return false; + }, + hasPossiblyCompatibleUnits$1(other) { + throw A.wrapException(A.UnimplementedError$(string$.Comple)); + }, + withValue$1(value) { + return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, this._number1$_value, new A._Record_2(numerator, denominator)); + } + }; + A.ComplexSelector0.prototype = { + get$specificity() { + var result, _this = this, + value = _this._complex$__ComplexSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure0()); + _this._complex$__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._complex$__ComplexSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$singleCompound() { + var _0_0, t1, _0_4, t2, selector, _null = null; + if (this.leadingCombinators.length !== 0) + return _null; + _0_0 = this.components; + $label0$0: { + t1 = false; + if (_0_0.length === 1) { + _0_4 = _0_0[0]; + t2 = _0_4; + selector = t2.selector; + t1 = _0_4.combinators.length <= 0; + } else + selector = _null; + if (t1) { + t1 = selector; + break $label0$0; + } + t1 = _null; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitComplexSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + isSuperselector$1(other) { + return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector0(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var _0_0, _0_1, t1, initial, last, _this = this; + if (combinators.length === 0) + return _this; + _0_0 = _this.components; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t1 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t1); + last = _0_0[t1]; + t1 = A.List_List$of(initial, true, type$.ComplexSelectorComponent_2); + t1.push(last.withAdditionalCombinators$1(combinators)); + t1 = A.ComplexSelector$0(_this.leadingCombinators, t1, _this.span, _this.lineBreak); + break $label0$0; + } + if (_0_1 <= 0) { + t1 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator_2); + B.JSArray_methods.addAll$1(t1, combinators); + t1 = A.ComplexSelector$0(t1, B.List_empty16, _this.span, _this.lineBreak); + break $label0$0; + } + throw A.wrapException(A.ReachabilityError$(string$.None_o)); + } + return t1; + }, + concatenate$3$forceLineBreak(child, span, forceLineBreak) { + var t2, _0_1, initial, last, _this = this, + t1 = child.leadingCombinators, + _0_0 = _this.components; + if (t1.length === 0) { + t1 = A.List_List$of(_0_0, true, type$.ComplexSelectorComponent_2); + B.JSArray_methods.addAll$1(t1, child.components); + t2 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$0(_this.leadingCombinators, t1, span, t2); + } else { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t2 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + t2 = A.List_List$of(initial, true, type$.ComplexSelectorComponent_2); + t2.push(last.withAdditionalCombinators$1(t1)); + B.JSArray_methods.addAll$1(t2, child.components); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$0(_this.leadingCombinators, t2, span, t1); + } else { + t2 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator_2); + B.JSArray_methods.addAll$1(t2, t1); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$0(t2, child.components, span, t1); + } + } + }, + concatenate$2(child, span) { + return this.concatenate$3$forceLineBreak(child, span, false); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ComplexSelector0 && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.ComplexSelector_specificity_closure0.prototype = { + call$2(sum, component) { + return sum + component.selector.get$specificity(); + }, + $signature: 432 + }; + A.ComplexSelectorComponent0.prototype = { + withAdditionalCombinators$1(combinators) { + var t1, t2, _this = this; + if (combinators.length === 0) + t1 = _this; + else { + t1 = type$.CssValue_Combinator_2; + t2 = A.List_List$of(_this.combinators, true, t1); + B.JSArray_methods.addAll$1(t2, combinators); + t1 = new A.ComplexSelectorComponent0(_this.selector, A.List_List$unmodifiable(t2, t1), _this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (other instanceof A.ComplexSelectorComponent0) { + t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); + t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t1 = this.combinators; + return A.serializeSelector0(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); + } + }; + A.ComplexSelectorComponent_toString_closure0.prototype = { + call$1(combinator) { + return " " + combinator.toString$0(0); + }, + $signature: 433 + }; + A.CompoundSelector0.prototype = { + get$specificity() { + var result, _this = this, + value = _this._compound$__CompoundSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure0()); + _this._compound$__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._compound$__CompoundSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$hasComplicatedSuperselectorSemantics() { + var result, _this = this, + value = _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI; + if (value === $) { + result = B.JSArray_methods.any$1(_this.components, new A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0()); + _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitCompoundSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CompoundSelector0 && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.CompoundSelector_specificity_closure0.prototype = { + call$2(sum, component) { + return sum + component.get$specificity(); + }, + $signature: 434 + }; + A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0.prototype = { + call$1(component) { + return component.get$hasComplicatedSuperselectorSemantics(); + }, + $signature: 14 + }; + A.Configuration0.prototype = { + throughForward$1($forward) { + var _0_0, _1_0, _2_0, t1, hiddenVariables, + newValues = this._configuration0$_values; + if (newValues.get$isEmpty(newValues)) + return B.Configuration_Map_empty_null0; + _0_0 = $forward.prefix; + if (_0_0 != null) + newValues = new A.UnprefixedMapView0(newValues, _0_0, type$.UnprefixedMapView_ConfiguredValue_2); + _1_0 = $forward.shownVariables; + if (_1_0 != null) + newValues = new A.LimitedMapView0(newValues, _1_0._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue_2); + else { + _2_0 = $forward.hiddenVariables; + if (_2_0 != null) { + t1 = _2_0._base.get$isNotEmpty(0); + hiddenVariables = _2_0; + } else { + hiddenVariables = null; + t1 = false; + } + if (t1) + newValues = A.LimitedMapView$blocklist0(newValues, hiddenVariables, type$.String, type$.ConfiguredValue_2); + } + return this._configuration0$_withValues$1(newValues); + }, + _configuration0$_withValues$1(values) { + var t1 = this._configuration0$__originalConfiguration; + return new A.Configuration0(values, t1 == null ? this : t1); + }, + toString$0(_) { + var t2, t3, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(this._configuration0$_values, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + t3._1.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ",") + ")"; + } + }; + A.ExplicitConfiguration0.prototype = { + _configuration0$_withValues$1(values) { + var t1 = this._configuration0$__originalConfiguration; + if (t1 == null) + t1 = this; + return new A.ExplicitConfiguration0(this.nodeWithSpan, values, t1); + } + }; + A.ConfiguredValue0.prototype = { + toString$0(_) { + return this.value.toString$0(0); + } + }; + A.ConfiguredVariable0.prototype = { + toString$0(_) { + var t1 = this.expression.toString$0(0), + t2 = this.isGuarded ? " !default" : ""; + return "$" + this.name + ": " + t1 + t2; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ContentBlock0.prototype = { + accept$1$1(visitor) { + return visitor.visitContentBlock$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, + t1 = this.$arguments; + t1 = t1.$arguments.length === 0 && t1.restArgument == null ? "" : " using (" + t1.toString$0(0) + ")"; + t2 = this.children; + return t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + } + }; + A.ContentRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitContentRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.$arguments; + return t1.get$isEmpty(0) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; + }, + get$span(receiver) { + return this.span; + } + }; + A._disallowedFunctionNames_closure0.prototype = { + call$1($function) { + return $function.name; + }, + $signature: 435 + }; + A.CssParser0.prototype = { + get$plainCss() { + return true; + }, + silentComment$0() { + var t1, t2, _this = this; + if (_this._stylesheet0$_inExpression) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.super$Parser$silentComment0(); + _this.error$2(0, string$.Silent, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + atRule$2$root(child, root) { + var $name, _0_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(64); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + _0_0 = $name.get$asPlain(); + $label0$0: { + if ("at-root" === _0_0 || "content" === _0_0 || "debug" === _0_0 || "each" === _0_0 || "error" === _0_0 || "extend" === _0_0 || "for" === _0_0 || "function" === _0_0 || "if" === _0_0 || "include" === _0_0 || "mixin" === _0_0 || "return" === _0_0 || "warn" === _0_0 || "while" === _0_0) + _this._css$_forbiddenAtRule$1(start); + if ("import" === _0_0) { + t1 = _this._css$_cssImportRule$1(start); + break $label0$0; + } + if ("media" === _0_0) { + t1 = _this.mediaRule$1(start); + break $label0$0; + } + if ("-moz-document" === _0_0) { + t1 = _this.mozDocumentRule$2(start, $name); + break $label0$0; + } + if ("supports" === _0_0) { + t1 = _this.supportsRule$1(start); + break $label0$0; + } + t1 = _this.unknownAtRule$2(start, $name); + break $label0$0; + } + return t1; + }, + _css$_forbiddenAtRule$1(start) { + this.almostAnyValue$0(); + this.error$2(0, "This at-rule isn't allowed in plain CSS.", this.scanner.spanFrom$1(start)); + }, + _css$_cssImportRule$1(start) { + var t2, urlSpan, modifiers, _this = this, + t1 = _this.scanner, + urlStart = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = t1.peekChar$0(); + $label0$0: { + if (117 === _0_0 || 85 === _0_0) { + t2 = _this.dynamicUrl$0(); + break $label0$0; + } + t2 = new A.StringExpression0(_this.interpolatedString$0().asInterpolation$1$static(true), false); + break $label0$0; + } + urlSpan = t1.spanFrom$1(urlStart); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + _this.expectStatementSeparator$1("@import rule"); + t2 = A._setArrayType([new A.StaticImport0(A.Interpolation$0(A._setArrayType([t2], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(urlStart))], type$.JSArray_Import_2); + t1 = t1.spanFrom$1(start); + return new A.ImportRule0(A.List_List$unmodifiable(t2, type$.Import_2), t1); + }, + parentheses$0() { + var expression, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + this.whitespace$0(); + expression = this.expressionUntilComma$0(); + t1.expectChar$1(41); + return new A.ParenthesizedExpression0(expression, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + identifierLike$0() { + var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = plain.toLowerCase(), + _0_0 = _this.trySpecialFunction$2(lower, start); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + if (t1.scanChar$1(46)) + return _this.namespacedExpression$2(plain, start); + if (!t1.scanChar$1(40)) + return new A.StringExpression0(identifier, false); + allowEmptySecondArg = lower === "var"; + $arguments = A._setArrayType([], type$.JSArray_Expression_2); + if (!t1.scanChar$1(41)) { + do { + _this.whitespace$0(); + if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { + t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t4 = t3.offset; + t4 = A._FileSpan$(t3.file, t4, t4); + $arguments.push(new A.StringExpression0(A.Interpolation$0(A._setArrayType([""], type$.JSArray_Object), t4), false)); + break; + } + $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + t1.expectChar$1(41); + } + if ($.$get$_disallowedFunctionNames0().contains$1(0, plain)) + _this.error$2(0, string$.This_f, t1.spanFrom$1(start)); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + t3 = type$.Expression_2; + t4 = A.List_List$unmodifiable($arguments, t3); + t3 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t3); + t1 = t1.spanFrom$1(start); + return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, new A.ArgumentInvocation0(t4, t3, null, null, t2), t1); + }, + namespacedExpression$2(namespace, start) { + var expression = this.super$StylesheetParser$namespacedExpression0(namespace, start); + this.error$2(0, string$.Modulen, expression.get$span(expression)); + } + }; + A.DebugRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitDebugRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@debug " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssDeclaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Declaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t3, _0_0, + buffer = new A.StringBuffer(""), + t1 = this.name, + t2 = "" + t1.toString$0(0); + buffer._contents = t2; + t2 = buffer._contents = t2 + A.Primitives_stringFromCharCode(58); + t3 = this.value; + if (t3 != null) { + t1 = !B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--") ? buffer._contents = t2 + A.Primitives_stringFromCharCode(32) : t2; + buffer._contents = t1 + t3.toString$0(0); + } + _0_0 = this.children; + if (_0_0 != null) + return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(_0_0, " ") + "}"; + else + return buffer.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsDeclaration0.prototype = { + get$isCustomProperty() { + var t1, + _0_0 = this.name; + $label0$0: { + if (_0_0 instanceof A.StringExpression0 && !_0_0.hasQuotes) { + t1 = B.JSString_methods.startsWith$1(_0_0.text.get$initialPlain(), "--"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + toString$0(_) { + return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Deprecation0.prototype = { + _enumToString$0() { + return "Deprecation." + this._name; + }, + get$deprecatedIn(_) { + return A.NullableExtension_andThen0(this._deprecation$_deprecatedIn, A.version_Version___parse_tearOff$closure()); + }, + get$obsoleteIn(_) { + return null; + }, + toString$0(_) { + return this.id; + } + }; + A.Deprecation_fromId_closure0.prototype = { + call$1(deprecation) { + return deprecation.id === this.id; + }, + $signature: 436 + }; + A.DeprecationProcessingLogger0.prototype = { + validate$0() { + var t1, t2, t3, t4, t5, t6, _1_7, _this = this, _null = null; + for (t1 = _this.fatalDeprecations, t1 = A._LinkedHashSetIterator$(t1, t1._modifications, A._instanceType(t1)._precomputed1), t2 = _this.silenceDeprecations, t3 = t1.$ti._precomputed1, t4 = _this.futureDeprecations; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t3._as(t5); + if (t5.isFuture && !t4.contains$1(0, t5)) { + t5 = t5.toString$0(0); + _this.internalWarn$4$deprecation$span$trace("Future " + t5 + string$.x20deprex20m, _null, _null, _null); + continue; + } + t6 = t2.contains$1(0, t5); + if (t6) { + t5 = t5.toString$0(0); + _this.internalWarn$4$deprecation$span$trace("Ignoring setting to silence " + t5 + string$.x20deprex2c, _null, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t2, t2._modifications, A._instanceType(t2)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + if (B.Deprecation_oty === t3) { + _this.internalWarn$4$deprecation$span$trace(string$.User_a, _null, _null, _null); + continue; + } + _1_7 = t3.isFuture; + if (_1_7 && t4.contains$1(0, t3)) { + t3 = t3.toString$0(0); + _this.internalWarn$4$deprecation$span$trace("Conflicting options for future " + t3 + " deprecation cancel each other out.", _null, _null, _null); + continue; + } + if (_1_7) { + t3 = t3.toString$0(0); + _this.internalWarn$4$deprecation$span$trace("Future " + t3 + string$.x20deprex20i, _null, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t4, t4._modifications, A._instanceType(t4)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + if (!t3.isFuture) { + t3 = t3.toString$0(0); + _this.internalWarn$4$deprecation$span$trace(t3 + string$.x20is_noaf, _null, _null, _null); + } + } + }, + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + if (deprecation != null) + this._deprecation_processing$_handleDeprecation$4$span$trace(deprecation, message, span, trace); + else + this._deprecation_processing$_inner.warn$3$span$trace(0, message, span, trace); + }, + _deprecation_processing$_handleDeprecation$4$span$trace(deprecation, message, span, trace) { + var _0_3_isSet, _0_3, t1, span0, t2, count, _1_0, _this = this, _null = null; + if (deprecation.isFuture && !_this.futureDeprecations.contains$1(0, deprecation)) + return; + if (_this.fatalDeprecations.contains$1(0, deprecation)) { + message += string$.x0a_This + deprecation.toString$0(0) + string$.x20deprex20t; + $label0$0: { + _0_3_isSet = span != null; + _0_3 = _null; + t1 = false; + if (_0_3_isSet) { + span0 = span == null ? type$.FileSpan._as(span) : span; + t1 = trace != null; + _0_3 = trace; + } else + span0 = _null; + if (t1) { + if (_0_3_isSet) + trace = _0_3; + t1 = A.SassRuntimeException$0(message, span0, trace == null ? type$.Trace._as(trace) : trace, _null); + break $label0$0; + } + t1 = false; + if (span != null) + t1 = (_0_3_isSet ? _0_3 : trace) == null; + else + span = _null; + if (t1) { + t1 = A.SassException$0(message, span, _null); + break $label0$0; + } + t1 = A.SassScriptException$0(message, _null); + break $label0$0; + } + throw A.wrapException(t1); + } + if (_this.silenceDeprecations.contains$1(0, deprecation)) + return; + if (_this.limitRepetition) { + t1 = _this._deprecation_processing$_warningCounts; + t2 = t1.$index(0, deprecation); + count = (t2 == null ? 0 : t2) + 1; + t1.$indexSet(0, deprecation, count); + if (count > 5) + return; + } + _1_0 = _this._deprecation_processing$_inner; + if (_1_0 instanceof A.LoggerWithDeprecationType) + _1_0.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + else + _1_0.warn$4$deprecation$span$trace(0, message, true, span, trace); + }, + debug$2(_, message, span) { + return this._deprecation_processing$_inner.debug$2(0, message, span); + }, + summarize$1$js(js) { + var t1 = this._deprecation_processing$_warningCounts.get$values(0), + t2 = A._instanceType(t1), + total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(t1, new A.DeprecationProcessingLogger_summarize_closure1(), t2._eval$1("WhereIterable")), new A.DeprecationProcessingLogger_summarize_closure2(), t2._eval$1("MappedIterable"))); + if (total > 0) { + t1 = js ? "" : string$.x0aRun_i; + this._deprecation_processing$_inner.warn$1(0, "" + total + string$.x20repet + t1); + } + } + }; + A.DeprecationProcessingLogger_summarize_closure1.prototype = { + call$1(count) { + return count > 5; + }, + $signature: 50 + }; + A.DeprecationProcessingLogger_summarize_closure2.prototype = { + call$1(count) { + return count - 5; + }, + $signature: 155 + }; + A.Deprecation1.prototype = {}; + A.deprecations_closure.prototype = { + call$0() { + var t1, _0_8_isSet, _0_8, + _0_0 = this.deprecation; + $label0$0: { + if (_0_0.isFuture) { + t1 = "future"; + break $label0$0; + } + _0_8_isSet = A.NullableExtension_andThen0(_0_0._deprecation$_deprecatedIn, A.version_Version___parse_tearOff$closure()) == null; + if (_0_8_isSet) { + _0_8 = _0_0.get$obsoleteIn(0) == null; + t1 = _0_8; + } else { + _0_8 = null; + t1 = false; + } + if (t1) { + t1 = "user"; + break $label0$0; + } + if (_0_8_isSet ? _0_8 : _0_0.get$obsoleteIn(0) == null) { + t1 = "active"; + break $label0$0; + } + t1 = "obsolete"; + break $label0$0; + } + return t1; + }, + $signature: 29 + }; + A.parseDeprecations_closure.prototype = { + call$0() { + return new A._SyncStarIterable(this.$call$body$parseDeprecations_closure(), type$._SyncStarIterable_Deprecation); + }, + $call$body$parseDeprecations_closure() { + var $async$self = this; + return function() { + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3, t4, item, t5, id, deprecation, version; + return function $async$call$0($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax($async$self.deprecations), t2 = type$.Deprecation_2, t3 = $async$self.supportVersions, t4 = $async$self.logger; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + item = t1.get$current(t1); + t5 = typeof item == "string"; + id = t5 ? item : null; + $async$goto = t5 ? 4 : 5; + break; + case 4: + // then + deprecation = A.Deprecation_fromId0(id); + $async$goto = deprecation == null ? 6 : 8; + break; + case 6: + // then + t4.internalWarn$4$deprecation$span$trace('Invalid deprecation "' + A.S(id) + '".', null, null, null); + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 9; + return $async$iterator._async$_current = deprecation, 1; + case 9: + // after yield + case 7: + // join + // goto for condition + $async$goto = 2; + break; + case 5: + // join + t5 = t2._is(item); + id = t5 ? J.get$id$x(item) : null; + $async$goto = t5 ? 10 : 11; + break; + case 10: + // then + deprecation = A.Deprecation_fromId0(id); + $async$goto = deprecation == null ? 12 : 14; + break; + case 12: + // then + t4.internalWarn$4$deprecation$span$trace('Invalid deprecation "' + A.S(id) + '".', null, null, null); + // goto join + $async$goto = 13; + break; + case 14: + // else + $async$goto = 15; + return $async$iterator._async$_current = deprecation, 1; + case 15: + // after yield + case 13: + // join + // goto for condition + $async$goto = 2; + break; + case 11: + // join + if (item instanceof A.Version) { + t5 = t3; + version = item; + } else { + version = null; + t5 = false; + } + $async$goto = t5 ? 16 : 17; + break; + case 16: + // then + $async$goto = 18; + return $async$iterator._yieldStar$1(A.Deprecation_forVersion0(version)); + case 18: + // after yield + case 17: + // join + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + $signature: 437 + }; + A.versionClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.Version", new A.versionClass__closure())); + jsClass.parse = A.allowInteropNamed("parse", new A.versionClass__closure0()); + A.JSClassExtension_injectSuperclass(t1._as(A.Version_Version(0, 0, 0, null).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.versionClass__closure.prototype = { + call$4($self, major, minor, patch) { + return A.Version_Version(major, minor, patch, null); + }, + "call*": "call$4", + $requiredArgCount: 4, + $signature: 438 + }; + A.versionClass__closure0.prototype = { + call$1(version) { + var v = A.Version_Version$parse(version); + if (v.preRelease.length !== 0 || v.build.length !== 0) + throw A.wrapException(A.FormatException$("Build identifiers and prerelease versions not supported.", null, null)); + return v; + }, + $signature: 230 + }; + A.DisplayP3ColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear0(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear0(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$linearDisplayP3ToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$linearDisplayP3ToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$linearDisplayP3ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.DynamicImport0.prototype = { + toString$0(_) { + return A.StringExpression_quoteText0(this.urlString); + }, + $isImport0: 1, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.EachRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitEachRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.variables, + t2 = this.children; + return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule_toString_closure0.prototype = { + call$1(variable) { + return "$" + variable; + }, + $signature: 6 + }; + A.EmptyExtensionStore0.prototype = { + get$_extension_store$_extensions() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__extensions, "get$_empty_extension_store0$_extensions", 1, [], [], 0))); + }, + get$_extension_store$_sourceSpecificity() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__sourceSpecificity, "get$_empty_extension_store0$_sourceSpecificity", 1, [], [], 0))); + }, + get$isEmpty(_) { + return true; + }, + get$simpleSelectors() { + return B.C_EmptyUnmodifiableSet0; + }, + extensionsWhereTarget$1(callback) { + return B.List_empty18; + }, + addSelector$2(selector, mediaContext) { + throw A.wrapException(A.UnsupportedError$("addSelector() can't be called for a const ExtensionStore.")); + }, + addExtension$4(extender, target, extend, mediaContext) { + throw A.wrapException(A.UnsupportedError$("addExtension() can't be called for a const ExtensionStore.")); + }, + addExtensions$1(extenders) { + throw A.wrapException(A.UnsupportedError$(string$.addExt)); + }, + clone$0() { + return B.Record2_EmptyExtensionStore_Map_empty0; + }, + $isExtensionStore0: 1 + }; + A.Environment0.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._environment0$_forwardedModules, + t2 = _this._environment0$_nestedForwardedModules, + t3 = _this._environment0$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._environment0$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._environment0$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._environment0$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.Environment$_0(_this._environment0$_modules, _this._environment0$_namespaceNodes, _this._environment0$_globalModules, _this._environment0$_importedModules, t1, t2, _this._environment0$_allModules, t3, t4, t5, t6, _this._environment0$_content); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._environment0$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); + view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.Callable_2); + for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._environment0$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs0(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._environment0$_forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : J.get$span$z(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, + forwarded = module._environment0$_environment._environment0$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._environment0$_forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_Callable_2; + t2 = type$.AstNode_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs0(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._environment0$_globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._environment0$_variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._environment0$_importedModules, t6 = type$.Module_Callable_2, t7 = type$.AstNode_2, t8 = A.MapExtensions_get_pairs0(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.Callable_2, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + node = t11._1; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t11 = shadowed.variables; + t12 = false; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.functions; + if (t11.get$isEmpty(t11)) { + t11 = shadowed.mixins; + if (t11.get$isEmpty(t11)) { + t11 = shadowed._shadowed_view0$_inner; + t11 = t11.get$css(t11); + t11 = J.get$isEmpty$asx(t11.get$children(t11)); + } else + t11 = t12; + } else + t11 = t12; + } else + t11 = t12; + if (!t11) + t5.$indexSet(0, shadowed, node); + } + } + for (t6 = A.MapExtensions_get_pairs0(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + node = t8._1; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t8 = shadowed.variables; + t9 = false; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.functions; + if (t8.get$isEmpty(t8)) { + t8 = shadowed.mixins; + if (t8.get$isEmpty(t8)) { + t8 = shadowed._shadowed_view0$_inner; + t8 = t8.get$css(t8); + t8 = J.get$isEmpty$asx(t8.get$children(t8)); + } else + t8 = t9; + } else + t8 = t9; + } else + t8 = t9; + if (!t8) + forwardedModules.$indexSet(0, shadowed, node); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._environment0$_nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable_2); + for (t5 = type$.JSArray_Module_Callable_2, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._environment0$_nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._environment0$_variableIndices, t6 = _this._environment0$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + J.remove$1$z(B.JSArray_methods.get$last(t4), t8); + J.remove$1$z(B.JSArray_methods.get$last(t6), t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._environment0$_functionIndices, t4 = _this._environment0$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + J.remove$1$z(B.JSArray_methods.get$last(t4), t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._environment0$_mixinIndices, t3 = _this._environment0$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + J.remove$1$z(B.JSArray_methods.get$last(t3), t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._environment0$_variables[t1], $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._environment0$_variables[_0_0], $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._environment0$_variables[_1_0], $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _environment0$_getVariableFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure0($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + t1 = J.$index$asx(_this._environment0$_variableNodes[t1], $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _0_0; + t1 = J.$index$asx(_this._environment0$_variableNodes[_0_0], $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._environment0$_variableNodes[_1_0], $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getVariableNodeFromGlobalModule$1($name); + } + }, + _environment0$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._environment0$_importedModules, t2 = this._environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._environment0$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._environment0$_variables).containsKey$1($name)) + return true; + return this._environment0$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _environment0$_variableIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._environment0$_variables.length === 1) { + _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure2(_this, $name)); + t1 = _this._environment0$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._environment0$_fromOneModule$3($name, "variable", new A.Environment_setVariable_closure3($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(_this._environment0$_variableNodes), $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._environment0$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._environment0$_variableIndices.containsKey$1($name) && _this._environment0$_variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure4(_this, $name)); + if (!_this._environment0$_inSemiGlobalScope && index === 0) { + index = _this._environment0$_variables.length - 1; + _this._environment0$_variableIndices.$indexSet(0, $name, index); + } + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = index; + J.$indexSet$ax(_this._environment0$_variables[index], $name, value); + J.$indexSet$ax(_this._environment0$_variableNodes[index], $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._environment0$_variables, + t2 = t1.length; + _this._environment0$_lastVariableName = $name; + index = _this._environment0$_lastVariableIndex = t2 - 1; + _this._environment0$_variableIndices.$indexSet(0, $name, index); + J.$indexSet$ax(t1[index], $name, value); + J.$indexSet$ax(_this._environment0$_variableNodes[index], $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._environment0$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._environment0$_functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._environment0$_functions[_0_0], $name); + return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._environment0$_functions[_1_0], $name); + return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _environment0$_getFunctionFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure0($name)); + }, + _environment0$_functionIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._environment0$_mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = J.$index$asx(_this._environment0$_mixins[_0_0], $name); + return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = J.$index$asx(_this._environment0$_mixins[_1_0], $name); + return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getMixinFromGlobalModule$1($name); + } + }, + _environment0$_getMixinFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure0($name)); + }, + _environment0$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + var oldContent = this._environment0$_content; + this._environment0$_content = $content; + callback.call$0(); + this._environment0$_content = oldContent; + }, + asMixin$1(callback) { + var oldInMixin = this._environment0$_inMixin; + this._environment0$_inMixin = true; + callback.call$0(); + this._environment0$_inMixin = oldInMixin; + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when) { + var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; + semiGlobal = semiGlobal && _this._environment0$_inSemiGlobalScope; + wasInSemiGlobalScope = _this._environment0$_inSemiGlobalScope; + _this._environment0$_inSemiGlobalScope = semiGlobal; + if (!when) + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + } + t1 = _this._environment0$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); + t3 = _this._environment0$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); + t4 = _this._environment0$_functions; + t5 = type$.Callable_2; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = _this._environment0$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = _this._environment0$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_Callable_2)); + try { + t2 = callback.call$0(); + return t2; + } finally { + _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + _this._environment0$_lastVariableIndex = _this._environment0$_lastVariableName = null; + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = _this._environment0$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = _this._environment0$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = _this._environment0$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = _this._environment0$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + } + }, + scope$1$1(callback) { + return this.scope$1$3$semiGlobal$when(callback, false, true); + }, + scope$1$2$when(callback, when) { + return this.scope$1$3$semiGlobal$when(callback, false, when); + }, + scope$1$2$semiGlobal(callback, semiGlobal) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, i, values, nodes, t5, t6, $name, value, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue_2); + for (t2 = this._environment0$_variables, t3 = type$.Value_2, t4 = this._environment0$_variableNodes, i = 0; i < t2.length; ++i) { + values = t2[i]; + nodes = t4[i]; + for (t5 = A.MapExtensions_get_pairs0(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + t6 = nodes.$index(0, $name); + t6.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, null, t6)); + } + } + return new A.Configuration0(configuration, null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule1(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toModule_closure0())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule1(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty17, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty9, B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toDummyModule_closure0())); + }, + _environment0$_getModule$1(namespace) { + var _0_0 = this._environment0$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); + }, + _environment0$_fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._environment0$_nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._environment0$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._environment0$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.Callable_2, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs0(t1, type$.Module_Callable_2, type$.AstNode_2), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _environment0$_fromOneModule$3($name, type, callback) { + return this._environment0$_fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.Environment__getVariableFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 441 + }; + A.Environment_setVariable_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._environment0$_lastVariableName = this.name; + return t1._environment0$_lastVariableIndex = 0; + }, + $signature: 10 + }; + A.Environment_setVariable_closure3.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 442 + }; + A.Environment_setVariable_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._environment0$_variableIndex$1(this.name); + return t2 == null ? t1._environment0$_variables.length - 1 : t2; + }, + $signature: 10 + }; + A.Environment__getFunctionFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 232 + }; + A.Environment__getMixinFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 232 + }; + A.Environment_toModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); + }, + $signature: 140 + }; + A.Environment_toDummyModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); + }, + $signature: 140 + }; + A._EnvironmentModule1.prototype = { + get$url(_) { + var t1 = this.css; + return t1.get$span(t1).file.url; + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._environment0$_modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._environment0$_environment; + t2 = t1._environment0$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); + J.$indexSet$ax(B.JSArray_methods.get$first(t1._environment0$_variableNodes), $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._environment0$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet0(_this.css, _this.extensionStore); + return A._EnvironmentModule$_1(_this._environment0$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t2, + t1 = this.css; + if (t1.get$span(t1).file.url == null) + t1 = ""; + else { + t1 = t1.get$span(t1).file.url; + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule1: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure11.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 445 + }; + A._EnvironmentModule__EnvironmentModule_closure12.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 446 + }; + A._EnvironmentModule__EnvironmentModule_closure13.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 233 + }; + A._EnvironmentModule__EnvironmentModule_closure14.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 233 + }; + A._EnvironmentModule__EnvironmentModule_closure15.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 126 + }; + A._EnvironmentModule__EnvironmentModule_closure16.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 126 + }; + A.ErrorRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitErrorRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@error " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A._EvaluateVisitor1.prototype = { + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_BuiltInCallable_2, + metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure25(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure26(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure27(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure28(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure29(_this), _s9_), A.BuiltInCallable$function0("module-variables", _s7_, new A._EvaluateVisitor_closure30(_this), _s9_), A.BuiltInCallable$function0("module-functions", _s7_, new A._EvaluateVisitor_closure31(_this), _s9_), A.BuiltInCallable$function0("module-mixins", _s7_, new A._EvaluateVisitor_closure32(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure33(_this), _s9_), A.BuiltInCallable$function0("get-mixin", _s20_, new A._EvaluateVisitor_closure34(_this), _s9_), A.BuiltInCallable$function0("call", "$function, $args...", new A._EvaluateVisitor_closure35(_this), _s9_)], t1), + metaMixins = A._setArrayType([A.BuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure36(_this), false, _s9_), A.BuiltInCallable$mixin0("apply", "$mixin, $args...", new A._EvaluateVisitor_closure37(_this), true, _s9_)], t1); + t1 = type$.BuiltInCallable_2; + t2 = A.List_List$of($.$get$moduleFunctions0(), true, t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); + for (t1 = A.List_List$of($.$get$coreModules0(), true, type$.BuiltInModule_Callable_2), t1.push(metaModule), t2 = t1.length, t3 = _this._evaluate0$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_Callable_2; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, functions); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions0()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._evaluate0$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = J.get$name$x($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + var error, stackTrace, t1, exception; + try { + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure1(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext1(this, node)], t1, t1), type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withLoadedUrls$1(this._evaluate0$_loadedUrls), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _evaluate0$_assertInModule$2(value, $name) { + return this._evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var t2, _this = this, t1 = {}, + _0_0 = _this._evaluate0$_builtInModules.$index(0, url); + t1.builtInModule = null; + if (_0_0 != null) { + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration0) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException(_this._evaluate0$_exception$2(t1, t2.get$span(t2))); + } + _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure3(t1, callback)); + return; + } + _this._evaluate0$_withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure4(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); + }, + _evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, _this = this, + url = stylesheet.span.file.url, + t1 = _this._evaluate0$_modules, + _0_0 = t1.$index(0, url); + if (_0_0 != null) { + t1 = configuration == null; + currentConfiguration = t1 ? _this._evaluate0$_configuration : configuration; + t2 = _this._evaluate0$_moduleConfigurations.$index(0, url); + t3 = t2._configuration0$__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration._configuration0$__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = _this._evaluate0$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? _this._evaluate0$_exception$1(message) : _this._evaluate0$_multiSpanException$3(message, "new load", t1)); + } + return _0_0; + } + environment = A.Environment$0(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$0(); + _this._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure1(_this, importer, stylesheet, extensionStore, configuration, css, preModuleComments)); + t2 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t2, t3 == null ? B.Map_empty9 : t3, extensionStore); + if (url != null) { + t1.$indexSet(0, url, module); + _this._evaluate0$_moduleConfigurations.$indexSet(0, url, _this._evaluate0$_configuration); + if (nodeWithSpan != null) + _this._evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + return module; + }, + _evaluate0$_execute$2(importer, stylesheet) { + return this._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _evaluate0$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._evaluate0$_outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + break $label0$0; + } + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode_2); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _evaluate0$_combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure3())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure4(selectors))); + if (_0_0 != null) + this._evaluate0$_throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode_2; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_Callable_2; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule1(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._evaluate0$_extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); + }, + _evaluate0$_combineCss$1(root) { + return this._evaluate0$_combineCss$2$clone(root, false); + }, + _evaluate0$_extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure3(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure4()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _evaluate0$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _evaluate0$_indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport0) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment0) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + var t1, t2, _i; + for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + return null; + }, + visitAtRootRule$1(_, node) { + var t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _this = this, + _s8_ = "__parent", + _0_0 = node.query, + query = _0_0 != null ? A.AtRootQueryParser$0(_this._evaluate0$_performInterpolationWithMap$2$warnForColor(_0_0, true)._0, _this._evaluate0$_logger, null).parse$0(0) : B.AtRootQuery_n2q0, + $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_), + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); + for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._node$_parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = _this._evaluate0$_trimIncluded$1(included); + if (root === _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) { + _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure3(_this, node), node.hasDeclarations, type$.Null); + return null; + } + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + _this._evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure4(_this, node)); + return null; + }, + _evaluate0$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._node$_parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure11(_this, newParent, node), + t1 = query._at_root_query0$_all || query._at_root_query0$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure12(_this, scope); + if (_this._evaluate0$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure13(_this, scope); + if (_this._evaluate0$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure14(_this, scope); + return _this._evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure15()) ? new A._EvaluateVisitor__scopeForAtRoot_closure16(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + var $content = this._evaluate0$_environment._environment0$_content; + if ($content == null) + return null; + this._evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure1(this, $content), type$.Null); + return null; + }, + visitDebugRule$1(_, node) { + var value = node.expression.accept$1(this), + t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); + this._evaluate0$_logger.debug$2(0, t1, node.span); + return null; + }, + visitDeclaration$1(_, node) { + var siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _this = this, _null = null, + _s8_ = "__parent", + _box_0 = {}; + if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null && !_this._evaluate0$_inUnknownAtRule && !_this._evaluate0$_inKeyframes) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Declarm, node.span)); + if (_this._evaluate0$_declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Declarw, node.span)); + siblings = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)._node$_parent.children; + interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule_2); + if (siblings.get$last(siblings) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) { + if (_this._evaluate0$_quietDeps) + if (!_this._evaluate0$_inDependency) { + t1 = _this._evaluate0$_currentCallable; + t1 = t1 == null ? _null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + t1 = !t1; + } else + t1 = false; + if (t1) + for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) + 1, _null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t6 = t1.__internal$_current; + rule = t6 == null ? t2._as(t6) : t6; + $label0$1: { + if (rule instanceof A.ModifiableCssComment0) + continue; + t6 = rule instanceof A.ModifiableCssStyleRule0; + rule0 = t6 ? rule : _null; + if (t6) { + interleavedRules.push(rule0); + break $label0$1; + } + _this._evaluate0$_warn$3(string$.Sassx27s, new A.MultiSpan0(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_FGJ); + B.JSArray_methods.clear$0(interleavedRules); + break $label0$1; + } + } + t1 = node.name; + $name = _this._evaluate0$_interpolationToValue$2$warnForColor(t1, true); + _1_0 = _this._evaluate0$_declarationName; + if (_1_0 != null) + $name = new A.CssValue0(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String_2); + _2_0 = node.value; + if (_2_0 != null) { + value = _2_0.accept$1(_this); + if (!value.get$isBlank() || value.get$asList().length === 0) { + t2 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_); + t3 = _2_0.get$span(_2_0); + t4 = node.span; + t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); + t5 = interleavedRules.length === 0 ? _null : _this._evaluate0$_stackTrace$1(t4); + if (_this._evaluate0$_sourceMap) { + t6 = A.NullableExtension_andThen0(_2_0, _this.get$_evaluate0$_expressionNode()); + t6 = t6 == null ? _null : J.get$span$z(t6); + } else + t6 = _null; + t2.addChild$1(A.ModifiableCssDeclaration$0($name, new A.CssValue0(value, t3, type$.CssValue_Value_2), t4, interleavedRules, t1, t5, t6)); + } else if (J.startsWith$1$s($name.value, "--")) + throw A.wrapException(_this._evaluate0$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); + } + _3_0 = node.children; + _box_0.children = null; + if (_3_0 != null) { + _box_0.children = _3_0; + oldDeclarationName = _this._evaluate0$_declarationName; + _this._evaluate0$_declarationName = $name.value; + _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure1(_box_0, _this), node.hasDeclarations, type$.Null); + _this._evaluate0$_declarationName = oldDeclarationName; + } + return _null; + }, + visitEachRule$1(_, node) { + var _this = this, _box_0 = {}, + t1 = node.list, + list = t1.accept$1(_this), + nodeWithSpan = _this._evaluate0$_expressionNode$1(t1), + _0_0 = node.variables; + $label0$0: { + _box_0.variable = null; + if (_0_0.length === 1) { + _box_0.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure5(_box_0, _this, nodeWithSpan); + break $label0$0; + } + _box_0.variables = null; + _box_0.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure6(_box_0, _this, nodeWithSpan); + break $label0$0; + } + return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure7(_this, list, t1, node), true, type$.nullable_Value_2); + }, + _evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._evaluate0$_environment.setLocalVariable$3(variables[i], this._evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + throw A.wrapException(this._evaluate0$_exception$2(J.toString$0$(node.expression.accept$1(this)), node.span)); + }, + visitExtendRule$1(_, node) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, compound, _this = this, _null = null, + styleRule = _this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || _this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; + _this._evaluate0$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan0(A.SpanExtensions_trimRight0(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_5pG); + } + _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(node.selector, true); + for (t1 = A.SelectorList_SelectorList$parse0(A.trimAscii0(_0_0._0, true), false, _0_0._1, _this._evaluate0$_logger, false).components, t2 = t1.length, t3 = styleRule._style_rule0$_selector._box0$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", complex.span, _null)); + t4 = compound.components; + t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; + if (t5 == null) + throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, _null)); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, _this._evaluate0$_mediaQueries); + } + return _null; + }, + visitAtRule$1(_, node) { + var $name, value, children, wasInKeyframes, wasInUnknownAtRule, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); + $name = _this._evaluate0$_interpolationToValue$1(node.name); + value = A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure5(_this)); + children = node.children; + if (children == null) { + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); + return null; + } + wasInKeyframes = _this._evaluate0$_inKeyframes; + wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; + if (A.unvendor0($name.value) === "keyframes") + _this._evaluate0$_inKeyframes = true; + else + _this._evaluate0$_inUnknownAtRule = true; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure6(_this, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure7(), type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + return null; + }, + visitForRule$1(_, node) { + var _this = this, t1 = {}, + t2 = node.from, + fromNumber = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure9(_this, node)), + t3 = node.to, + toNumber = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure10(_this, node)), + from = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure11(fromNumber)), + to = t1.to = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure12(toNumber, fromNumber)), + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) + return null; + return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure13(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value_2); + }, + visitForwardRule$1(_, node) { + var newConfiguration, t4, _i, variable, $name, _this = this, + _s8_ = "@forward", + oldConfiguration = _this._evaluate0$_configuration, + adjustedConfiguration = oldConfiguration.throughForward$1(node), + t1 = node.configuration, + t2 = t1.length, + t3 = node.url; + if (t2 !== 0) { + newConfiguration = _this._evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node); + _this._evaluate0$_loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure3(_this, node), newConfiguration); + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + _this._evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + _this._evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); + } else { + _this._evaluate0$_configuration = adjustedConfiguration; + _this._evaluate0$_loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure4(_this, node)); + _this._evaluate0$_configuration = oldConfiguration; + } + return null; + }, + _evaluate0$_addForwardConfiguration$2(configuration, node) { + var t2, t3, _i, variable, t4, oldValue, t5, variableNodeWithSpan, _null = null, + t1 = configuration._configuration0$_values, + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + oldValue = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, t4); + if (oldValue != null) + t5 = !oldValue.value.$eq(0, B.C__SassNull0); + else { + oldValue = _null; + t5 = false; + } + if (t5) { + newValues.$indexSet(0, t4, oldValue); + continue; + } + } + t4 = variable.expression; + variableNodeWithSpan = this._evaluate0$_expressionNode$1(t4); + newValues.$indexSet(0, variable.name, new A.ConfiguredValue0(this._evaluate0$_withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) + return new A.ExplicitConfiguration0(node, newValues, _null); + else + return new A.Configuration0(newValues, _null); + }, + _evaluate0$_registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this._evaluate0$__root; + if (t1 == null) + return; + if (_this._evaluate0$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._evaluate0$_preModuleComments; + if (t1 == null) + t1 = _this._evaluate0$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.List_CssComment_2); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure1()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source, type$.CssComment_2), type$.UnmodifiableListView_CssComment_2)); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).clearChildren$0(); + _this._evaluate0$__endOfImports = 0; + }, + _evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration0$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0, $name, value; + if (!(configuration instanceof A.ExplicitConfiguration0)) + return; + t1 = configuration._configuration0$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + _0_0 = t1.get$first(t1); + $name = _0_0._0; + value = _0_0._1; + t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; + throw A.wrapException(this._evaluate0$_exception$2(t1, value.configurationSpan)); + }, + _evaluate0$_assertConfigurationIsEmpty$1(configuration) { + return this._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + var t1 = this._evaluate0$_environment, + t2 = t1.closure$0(), + t3 = this._evaluate0$_inDependency, + t4 = t1._environment0$_functions, + index = t4.length - 1, + t5 = node.name; + t1._environment0$_functionIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); + return null; + }, + visitIfRule$1(_, node) { + var t1, t2, _i, clauseToCheck, + clause = node.lastClause; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { + clauseToCheck = t1[_i]; + if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { + clause = clauseToCheck; + break; + } + } + return A.NullableExtension_andThen0(clause, new A._EvaluateVisitor_visitIfRule_closure1(this)); + }, + visitImportRule$1(_, node) { + var t1, t2, t3, t4, t5, t6, _i, $import, t7, _0_0, $self, t8, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports"; + for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String_2, t4 = _this.get$_evaluate0$_interpolationToValue(), t5 = type$.StaticImport_2, t6 = type$.JSArray_ModifiableCssImport_2, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport0) + _this._evaluate0$_visitDynamicImport$1($import); + else { + t5._as($import); + t7 = $import.url; + _0_0 = _this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(t7, false, false); + $self = $import.modifiers; + t8 = $self == null ? null : t4.call$1($self); + node = new A.ModifiableCssImport0(new A.CssValue0(_0_0._0, t7.span, t3), t8, $import.span); + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(node); + else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { + t7 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + node._node$_parent = t7; + t7 = t7._node$_children; + node._node$_indexInParent = t7.length; + t7.push(node); + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + } else { + t7 = _this._evaluate0$_outOfOrderImports; + (t7 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], t6) : t7).push(node); + } + } + } + return null; + }, + _evaluate0$_visitDynamicImport$1($import) { + return this._evaluate0$_withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure1(this, $import)); + }, + _evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + var _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, _3_0, result, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, exception, _this = this, + _s11_ = "_stylesheet"; + baseUrl = baseUrl; + try { + _this._evaluate0$_importSpan = span; + _0_0 = _this._evaluate0$_importCache; + importCache = null; + if (_0_0 != null) { + importCache = _0_0; + if (baseUrl == null) + baseUrl = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span.file.url; + _1_0 = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._evaluate0$_importer, baseUrl, forImport); + importer = null; + canonicalUrl = null; + originalUrl = null; + if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0)) { + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + _this._evaluate0$_loadedUrls.add$1(0, canonicalUrl); + isDependency = _this._evaluate0$_inDependency || !J.$eq$(importer, _this._evaluate0$_importer); + t1 = importCache; + t2 = importer; + t3 = canonicalUrl; + t4 = originalUrl; + _2_0 = t1.importCanonical$4$originalUrl$quiet(t2, t3, t4, _this._evaluate0$_quietDeps && isDependency); + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + return new A._Record_3_importer_isDependency(t1, t2, isDependency); + } + } + } + if (_this._nodeImporter != null) { + t1 = baseUrl; + _3_0 = _this._importLikeNode$3(url, t1 == null ? _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span.file.url : t1, forImport); + result = null; + if (_3_0 != null) { + result = _3_0; + t1 = _this._evaluate0$_loadedUrls; + A.NullableExtension_andThen0(result._0.span.file.url, t1.get$add(t1)); + t1 = result; + return t1; + } + } + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) + throw exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(_this._evaluate0$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace0(_this._evaluate0$_exception$1(_this._evaluate0$_getErrorMessage$1(error0)), error0, stackTrace0); + } + } finally { + _this._evaluate0$_importSpan = null; + } + }, + _evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { + return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _importLikeNode$3(originalUrl, previous, forImport) { + var isDependency, url, t2, _this = this, + t1 = _this._nodeImporter, + result = t1.loadRelative$3(originalUrl, previous, forImport); + if (result != null) + isDependency = _this._evaluate0$_inDependency; + else { + result = t1.load$3(0, originalUrl, previous, forImport); + if (result == null) + return null; + isDependency = true; + } + url = result._1; + t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_scss0; + t2 = _this._evaluate0$_quietDeps && isDependency ? $.$get$Logger_quiet0() : _this._evaluate0$_logger; + return new A._Record_3_importer_isDependency(A.Stylesheet_Stylesheet$parse0(result._0, t1, t2, url), null, isDependency); + }, + _evaluate0$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var t1, _0_0, t2, _1_8, _this = this, + _s37_ = "Mixin doesn't accept a content block.", + _s10_ = "invocation"; + $label0$0: { + if (mixin == null) + throw A.wrapException(_this._evaluate0$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = mixin instanceof A.BuiltInCallable0; + if (t1 && !mixin.acceptsContent && contentCallable != null) { + t1 = _this._evaluate0$_evaluateArguments$1($arguments)._values; + _0_0 = mixin.callbackFor$2(t1[2].length, new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$0(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + } + if (t1) { + _this._evaluate0$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure3(_this, $arguments, mixin, nodeWithSpanWithoutContent)); + break $label0$0; + } + t1 = type$.UserDefinedCallable_Environment_2._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + if (_1_8 instanceof A.MixinRule0) + t2 = !type$.MixinRule_2._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$0(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + if (t1) { + _this._evaluate0$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure4(_this, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + }, + visitIncludeRule$1(_, node) { + var _this = this, + mixin = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure5(_this, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + _this._evaluate0$_warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_qBS); + _this._evaluate0$_applyMixin$5(mixin, A.NullableExtension_andThen0(node.content, new A._EvaluateVisitor_visitIncludeRule_closure6(_this)), node.$arguments, node, new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure7(node))); + return null; + }, + visitMixinRule$1(_, node) { + var t1 = this._evaluate0$_environment, + t2 = t1.closure$0(), + t3 = this._evaluate0$_inDependency, + t4 = t1._environment0$_mixins, + index = t4.length - 1, + t5 = node.name; + t1._environment0$_mixinIndices.$indexSet(0, t5, index); + J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); + return null; + }, + visitLoudComment$1(_, node) { + var t1, text, _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._evaluate0$_inFunction) + return null; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + t1 = node.text; + text = _this._evaluate0$_performInterpolation$1(t1); + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(text, t1.span)); + return null; + }, + visitMediaRule$1(_, node) { + var _0_0, queries, mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); + _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(node.query, true); + queries = A.CssMediaQuery_parseList0(_0_0._0, _0_0._1, _this._evaluate0$_logger); + mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure5(_this, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return null; + if (t1) + mergedSources = B.Set_empty5; + else { + t2 = _this._evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = _this._evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure6(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure7(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); + return null; + }, + _evaluate0$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) + $label0$1: { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_00 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_10 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult0; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + break $label0$1; + } + } + return queries; + }, + visitReturnRule$1(_, node) { + var t1 = node.expression; + return this._evaluate0$_withoutSlash$2(t1.accept$1(this), t1); + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + var t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule, _this = this, _null = null, + _s8_ = "__parent", + _s11_ = "_stylesheet"; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_n, node.span)); + else if (_this._evaluate0$_inKeyframes && _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(t1, true); + selectorText = _0_0._0; + selectorMap = _0_0._1; + if (_this._evaluate0$_inKeyframes) { + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable(A.KeyframeSelectorParser$0(selectorText, selectorMap, _this._evaluate0$_logger).parse$0(0), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure7(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure8(), type$.ModifiableCssKeyframeBlock_2, type$.Null); + return _null; + } + parsedSelector = A.SelectorList_SelectorList$parse0(selectorText, true, selectorMap, _this._evaluate0$_logger, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss); + t1 = _this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? _null : t1.fromPlainCss; + nest = t1 !== true; + if (nest) { + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss) + for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + _1_0 = t1[_i].leadingCombinators; + if (_1_0.length >= 1) { + first = _1_0[0]; + t3 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_); + t3 = t3.plainCss; + } else { + first = _null; + t3 = false; + } + if (t3) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Top_lel, first.span)); + } + t1 = _this._evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? _null : t1.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !_this._evaluate0$_atRootExcludingStyleRule, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss); + } + rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, _this._evaluate0$_mediaQueries), node.span, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss, parsedSelector); + oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; + t1 = _this._evaluate0$_atRootExcludingStyleRule = false; + t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure9() : _null; + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure10(_this, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule_2, type$.Null); + _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + _this._evaluate0$_warnForBogusCombinators$1(rule); + if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } + if (t1) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + return _null; + }, + _evaluate0$_warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) + for (t1 = rule._style_rule0$_selector._box0$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor0)) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_5pG); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_5pG); + } + } else { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight0(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$z(t5.$index(0, 0)); + _this._evaluate0$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan0(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure1()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_5pG); + } + } + }, + visitSupportsRule$1(_, node) { + var t1, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(new A.CssValue0(_this._evaluate0$_visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String_2), node.span), new A._EvaluateVisitor_visitSupportsRule_closure3(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure4(), type$.ModifiableCssSupportsRule_2, type$.Null); + return null; + }, + _evaluate0$_visitSupportsCondition$1(condition) { + var t1, _this = this, _box_0 = {}; + $label0$0: { + if (condition instanceof A.SupportsOperation0) { + t1 = condition.operator; + t1 = _this._evaluate0$_parenthesize$2(condition.left, t1) + " " + t1 + " " + _this._evaluate0$_parenthesize$2(condition.right, t1); + break $label0$0; + } + if (condition instanceof A.SupportsNegation0) { + t1 = "not " + _this._evaluate0$_parenthesize$1(condition.condition); + break $label0$0; + } + if (condition instanceof A.SupportsInterpolation0) { + t1 = condition.expression; + t1 = _this._evaluate0$_serialize$3$quote(t1.accept$1(_this), t1, false); + break $label0$0; + } + _box_0.declaration = null; + if (condition instanceof A.SupportsDeclaration0) { + _box_0.declaration = condition; + t1 = _this._evaluate0$_withSupportsDeclaration$1(new A._EvaluateVisitor__visitSupportsCondition_closure1(_box_0, _this)); + break $label0$0; + } + if (condition instanceof A.SupportsFunction0) { + t1 = _this._evaluate0$_performInterpolation$1(condition.name) + "(" + _this._evaluate0$_performInterpolation$1(condition.$arguments) + ")"; + break $label0$0; + } + if (condition instanceof A.SupportsAnything0) { + t1 = "(" + _this._evaluate0$_performInterpolation$1(condition.contents) + ")"; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + } + return t1; + }, + _evaluate0$_withSupportsDeclaration$1$1(callback) { + var t1, + oldInSupportsDeclaration = this._evaluate0$_inSupportsDeclaration; + this._evaluate0$_inSupportsDeclaration = true; + try { + t1 = callback.call$0(); + return t1; + } finally { + this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + } + }, + _evaluate0$_withSupportsDeclaration$1(callback) { + return this._evaluate0$_withSupportsDeclaration$1$1(callback, type$.dynamic); + }, + _evaluate0$_parenthesize$2(condition, operator) { + var t1; + if (!(condition instanceof A.SupportsNegation0)) + if (condition instanceof A.SupportsOperation0) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + if (t1) + return "(" + this._evaluate0$_visitSupportsCondition$1(condition) + ")"; + return this._evaluate0$_visitSupportsCondition$1(condition); + }, + _evaluate0$_parenthesize$1(condition) { + return this._evaluate0$_parenthesize$2(condition, null); + }, + visitVariableDeclaration$1(_, node) { + var t2, value, _this = this, _null = null, t1 = {}; + if (node.isGuarded) { + if (node.namespace == null && _this._evaluate0$_environment._environment0$_variables.length === 1) { + t2 = _this._evaluate0$_configuration._configuration0$_values; + t2 = t2.get$isEmpty(t2) ? _null : t2.remove$1(0, node.name); + t1.override = null; + if (t2 != null) { + t1.override = t2; + t2 = !t2.value.$eq(0, B.C__SassNull0); + } else + t2 = false; + if (t2) { + _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure5(t1, _this, node)); + return _null; + } + } + value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure6(_this, node)); + if (value != null && !value.$eq(0, B.C__SassNull0)) + return _null; + } + if (node.isGlobal && !_this._evaluate0$_environment.globalVariableExists$1(node.name)) { + t1 = _this._evaluate0$_environment._environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; + _this._evaluate0$_warn$3(t1, node.span, B.Deprecation_W6Z); + } + t1 = node.expression; + _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure7(_this, node, _this._evaluate0$_withoutSlash$2(t1.accept$1(_this), t1))); + return _null; + }, + visitUseRule$1(_, node) { + var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, + t1 = node.configuration, + t2 = t1.length; + if (t2 !== 0) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = _this._evaluate0$_expressionNode$1(t3); + values.$indexSet(0, variable.name, new A.ConfiguredValue0(_this._evaluate0$_withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + configuration = new A.ExplicitConfiguration0(node, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + _this._evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure1(_this, node), configuration); + _this._evaluate0$_assertConfigurationIsEmpty$1(configuration); + return null; + }, + visitWarnRule$1(_, node) { + var _this = this, + value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure1(_this, node)), + t1 = value instanceof A.SassString0 ? value._string0$_text : _this._evaluate0$_serialize$2(value, node.expression); + _this._evaluate0$_logger.warn$2$trace(0, t1, _this._evaluate0$_stackTrace$1(node.span)); + return null; + }, + visitWhileRule$1(_, node) { + return this._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure1(this, node), true, node.hasDeclarations, type$.nullable_Value_2); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_wdM0 && t1 !== B.BinaryOperator_U770; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._evaluate0$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure1(_this, node)); + }, + _evaluate0$_slash$3(left, right, node) { + var t2, _1_1, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber0, + _1_2 = null, right0 = null, + t1 = false; + if (_1_2_isSet) { + t2 = type$.SassNumber_2; + t2._as(left); + if (right instanceof A.SassNumber0) { + t2._as(right); + t1 = node.allowsSlash && this._evaluate0$_operandAllowsSlash$1(node.left) && this._evaluate0$_operandAllowsSlash$1(node.right); + right0 = right; + _1_2 = right0; + } else + _1_2 = right; + _1_1 = left; + } else { + _1_1 = left; + left = null; + } + if (t1) + return type$.SassNumber_2._as(result).withSlash$2(left, right0); + if (_1_1 instanceof A.SassNumber0) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber0; + else + t1 = false; + if (t1) { + this._evaluate0$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation1().call$1(node)) + " or " + A.expressionToCalc0(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_E8a); + return result; + } + return result; + }, + _evaluate0$_operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression0) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._evaluate0$_environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return node.value; + }, + visitVariableExpression$1(_, node) { + var result = this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure1(this, node)); + if (result != null) + return result; + throw A.wrapException(this._evaluate0$_exception$2("Undefined variable.", node.span)); + }, + visitUnaryOperationExpression$1(_, node) { + return this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure1(node, node.operand.accept$1(this))); + }, + visitBooleanExpression$1(_, node) { + return node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + visitIfExpression$1(_, node) { + var condition, t1, ifTrue, ifFalse, result, _this = this, + _0_0 = _this._evaluate0$_evaluateMacroArguments$1(node), + positional = _0_0._0, + named = _0_0._1; + _this._evaluate0$_verifyArguments$4(positional.length, named, $.$get$IfExpression_declaration0(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; + return _this._evaluate0$_withoutSlash$2(result.accept$1(_this), _this._evaluate0$_expressionNode$1(result)); + }, + visitNullExpression$1(_, node) { + return B.C__SassNull0; + }, + visitNumberExpression$1(_, node) { + return A.SassNumber_SassNumber0(node.value, node.unit); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._evaluate0$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return node.value; + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return A.SassList$0(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure1(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), node.separator, node.hasBrackets); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, + t1 = type$.Value_2, + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + value = t4._1; + keyValue = key.accept$1(this); + valueValue = value.accept$1(this); + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t1, "second key", t2, this._evaluate0$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + }, + visitFunctionExpression$1(_, node) { + var t2, _0_0, t3, t4, oldInFunction, result, _this = this, + _s11_ = "_stylesheet", + t1 = {}, + $function = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss ? null : _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure5(_this, node)); + t1.$function = $function; + if ($function == null) { + if (node.namespace != null) + throw A.wrapException(_this._evaluate0$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure6()); + } else + t3 = false; + if (t3) + return _this._evaluate0$_visitCalculation$2$inLegacySassFunction(node, true); + if ("calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0) + return _this._evaluate0$_visitCalculation$1(node); + $function = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss ? null : _this._evaluate0$_builtInFunctions.$index(0, t2); + t2 = t1.$function = $function == null ? new A.PlainCssCallable0(node.originalName) : $function; + } else + t2 = $function; + if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) + _this._evaluate0$_warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_qBS); + oldInFunction = _this._evaluate0$_inFunction; + _this._evaluate0$_inFunction = true; + result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure7(t1, _this, node)); + _this._evaluate0$_inFunction = oldInFunction; + return result; + }, + _evaluate0$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + var $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, _this = this, + t2 = node.$arguments, + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Rest_a, node.span)); + _this._evaluate0$_checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + for (t2 = t2.positional, t4 = t2.length, _i = 0; _i < t4; ++_i) + t3.push(_this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + $arguments = t3; + if (_this._evaluate0$_inSupportsDeclaration) + return new A.SassCalculation0(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + oldCallableNode = _this._evaluate0$_callableNode; + _this._evaluate0$_callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sqrt", J.$index$asx($arguments, 0), A.number2__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sin", J.$index$asx($arguments, 0), A.number2__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("cos", J.$index$asx($arguments, 0), A.number2__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("tan", J.$index$asx($arguments, 0), A.number2__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("asin", J.$index$asx($arguments, 0), A.number2__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("acos", J.$index$asx($arguments, 0), A.number2__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("atan", J.$index$asx($arguments, 0), A.number2__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min0($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max0($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot0($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan20(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_round0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + _this._evaluate0$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace0(_this._evaluate0$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + _this._evaluate0$_callableNode = oldCallableNode; + } + }, + _evaluate0$_visitCalculation$1(node) { + return this._evaluate0$_visitCalculation$2$inLegacySassFunction(node, false); + }, + _evaluate0$_checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check1(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, number1, j, number2; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber0) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) + throw A.wrapException(this._evaluate0$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._evaluate0$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); + } + } + }, + _evaluate0$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + var result, t2, _0_0, _1_0, t3, _i, i, _this = this, _null = null, _box_0 = {}, + t1 = node instanceof A.ParenthesizedExpression0, + inner = t1 ? node.expression : _null; + if (t1) { + result = _this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction); + return result instanceof A.SassString0 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; + } + if (node instanceof A.StringExpression0 && node.accept$1(new A._IsCalculationSafeVisitor0())) { + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? _null : t2.toLowerCase(); + $label0$0: { + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber0(3.141592653589793, _null); + break $label0$0; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber0(2.718281828459045, _null); + break $label0$0; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(1 / 0, _null); + break $label0$0; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(-1 / 0, _null); + break $label0$0; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber0(0 / 0, _null); + break $label0$0; + } + t1 = new A.SassString0(_this._evaluate0$_performInterpolation$1(t1), false); + break $label0$0; + } + return t1; + } + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression0; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + if (t1) { + _this._evaluate0$_checkWhitespaceAroundCalculationOperator$1(node); + return _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure1(_box_0, _this, node, inLegacySassFunction)); + } + if (node instanceof A.NumberExpression0 || node instanceof A.VariableExpression0 || node instanceof A.FunctionExpression0 || node instanceof A.IfExpression0) { + _1_0 = node.accept$1(_this); + $label1$1: { + if (_1_0 instanceof A.SassNumber0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString0) { + t1 = !_1_0._string0$_hasQuotes; + result = _1_0; + } else { + result = _null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression(_this._evaluate0$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + return t1; + } + if (node instanceof A.ListExpression0 && !node.hasBrackets && B.ListSeparator_nbm0 === node.separator && node.contents.length >= 2) { + t1 = A._setArrayType([], type$.JSArray_Object); + for (t2 = node.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + _this._evaluate0$_checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation0 && t2[i] instanceof A.ParenthesizedExpression0) + t1[i] = new A.SassString0("(" + A.S(t3) + ")", false); + } + return new A.SassString0(B.JSArray_methods.join$1(t1, " "), false); + } + throw A.wrapException(_this._evaluate0$_exception$2(string$.This_e, node.get$span(node))); + }, + _evaluate0$_checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_u150 && t1 !== B.BinaryOperator_SjO0) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate0$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _evaluate0$_binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_u150 === operator) { + t1 = B.CalculationOperator_g2q0; + break $label0$0; + } + if (B.BinaryOperator_SjO0 === operator) { + t1 = B.CalculationOperator_CxF0; + break $label0$0; + } + if (B.BinaryOperator_2No0 === operator) { + t1 = B.CalculationOperator_1710; + break $label0$0; + } + if (B.BinaryOperator_U770 === operator) { + t1 = B.CalculationOperator_Qf10; + break $label0$0; + } + t1 = A.throwExpression(this._evaluate0$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _evaluate0$_checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString0 || current instanceof A.SassString0) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression0) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_AiQ0 !== _0_2) + t1 = B.UnaryOperator_cLp0 === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression0 && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate0$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._evaluate0$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + var result, _this = this, + t1 = _this._evaluate0$_performInterpolation$1(node.name), + oldInFunction = _this._evaluate0$_inFunction; + _this._evaluate0$_inFunction = true; + result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(_this, node, new A.PlainCssCallable0(t1))); + _this._evaluate0$_inFunction = oldInFunction; + return result; + }, + _evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + var oldCallable, result, _this = this, + evaluated = _this._evaluate0$_evaluateArguments$1($arguments), + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldCallable = _this._evaluate0$_currentCallable; + _this._evaluate0$_currentCallable = callable; + result = _this._evaluate0$_withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure1(_this, callable, evaluated, nodeWithSpan, run, $V)); + _this._evaluate0$_currentCallable = oldCallable; + return result; + }, + _evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + var buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, _this = this; + if (callable instanceof A.BuiltInCallable0) + return _this._evaluate0$_withoutSlash$2(_this._evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); + else if (type$.UserDefinedCallable_Environment_2._is(callable)) + return _this._evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure1(_this, callable), type$.Value_2); + else if (callable instanceof A.PlainCssCallable0) { + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + try { + first = true; + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + t4 = argument; + t4 = _this._evaluate0$_serialize$3$quote(t4.accept$1(_this), t4, true); + t3._contents += t4; + } + restArg = $arguments.rest; + if (restArg != null) { + rest = restArg.accept$1(_this); + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = _this._evaluate0$_serialize$2(rest, restArg); + t1._contents += t2; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw exception; + } + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + return new A.SassString0(t2.charCodeAt(0) == 0 ? t2 : t2, false); + } else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + }, + _evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + var result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, _this = this, _box_0 = {}, + evaluated = _this._evaluate0$_evaluateArguments$1($arguments), + oldCallableNode = _this._evaluate0$_callableNode; + _this._evaluate0$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(evaluated._values[2].length, namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure5(_box_0, evaluated, namedSet)); + declaredArguments = _box_0.overload.$arguments; + for (i = evaluated._values[2].length, t1 = declaredArguments.length; i < t1; ++i) { + argument = declaredArguments[i]; + t2 = evaluated._values[2]; + t3 = evaluated._values[0].remove$1(0, argument.name); + if (t3 == null) { + t3 = argument.defaultValue; + t3 = _this._evaluate0$_withoutSlash$2(t3.accept$1(_this), t3); + } + t2.push(t3); + } + if (_box_0.overload.restArgument != null) { + if (evaluated._values[2].length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated._values[2], t1); + B.JSArray_methods.removeRange$2(evaluated._values[2], t1, evaluated._values[2].length); + } else + rest = B.List_empty20; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$0(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : evaluated._values[4]); + evaluated._values[2].push(argumentList); + } else + argumentList = null; + result = null; + try { + result = _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure6(_box_0, evaluated)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) + throw exception; + else { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(_this._evaluate0$_exception$2(_this._evaluate0$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + } + _this._evaluate0$_callableNode = oldCallableNode; + if (argumentList == null) + return result; + if (evaluated._values[0].__js_helper$_length === 0) + return result; + if (argumentList._argument_list$_wereKeywordsAccessed) + return result; + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + A.pluralize0("argument", evaluated._values[0].get$keys(0).get$length(0), null) + " named " + A.toSentence0(evaluated._values[0].get$keys(0).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure7(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + }, + _evaluate0$_evaluateArguments$1($arguments) { + var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, $name, value, restArgs, rest, restNodeForSpan, t5, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, + positional = A._setArrayType([], type$.JSArray_Value_2), + positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + nodeForSpan = _this._evaluate0$_expressionNode$1(expression); + positional.push(_this._evaluate0$_withoutSlash$2(expression.accept$1(_this), nodeForSpan)); + positionalNodes.push(nodeForSpan); + } + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); + t2 = type$.AstNode_2; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t3 = A.MapExtensions_get_pairs0($arguments.named, t1, type$.Expression_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + $name = t4._0; + value = t4._1; + nodeForSpan = _this._evaluate0$_expressionNode$1(value); + named.$indexSet(0, $name, _this._evaluate0$_withoutSlash$2(value.accept$1(_this), nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + } + restArgs = $arguments.rest; + if (restArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided0]); + rest = restArgs.accept$1(_this); + restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure7()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map0$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString_2; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_undecided0; + } else if (rest instanceof A.SassList0) { + t3 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure8(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._list1$_separator; + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure9(_this, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_undecided0; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + keywordRest = keywordRestArgs.accept$1(_this); + keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure10()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map0$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString_2; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + } else + throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + }, + _evaluate0$_evaluateMacroArguments$1(invocation) { + var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, + t1 = invocation.$arguments, + restArgs_ = t1.rest; + if (restArgs_ == null) + return new A._Record_2(t1.positional, t1.named); + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); + rest = restArgs_.accept$1(_this); + restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap0) + _this._evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure7(restArgs_)); + else if (rest instanceof A.SassList0) { + t2 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure8(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure9(_this, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression0(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) + return new A._Record_2(positional, named); + keywordRest = keywordRestArgs_.accept$1(_this); + keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure10(_this, keywordRestNodeForSpan, keywordRestArgs_)); + return new A._Record_2(positional, named); + } else + throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + }, + _evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure1(this, values, convert, this._evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _evaluate0$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { + return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure1($arguments, positional, named)); + }, + visitSelectorExpression$1(_, node) { + var t1 = this._evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + return t1 == null ? B.C__SassNull0 : t1; + }, + visitStringExpression$1(_, node) { + var t1, t2, t3, _i, value, t4, _0_0, text, _this = this, + oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; + _this._evaluate0$_inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = node.text.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) { + value = t2[_i]; + $label0$0: { + if (typeof value == "string") { + t4 = value; + break $label0$0; + } + if (value instanceof A.Expression0) { + _0_0 = value.accept$1(_this); + $label1$1: { + if (_0_0 instanceof A.SassString0) { + text = _0_0._string0$_text; + t4 = text; + break $label1$1; + } + t4 = _this._evaluate0$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + break $label0$0; + } + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + } + t1.push(t4); + } + t1 = B.JSArray_methods.join$0(t1); + _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + return new A.SassString0(t1, node.hasQuotes); + }, + visitSupportsExpression$1(_, expression) { + return new A.SassString0(this._evaluate0$_visitSupportsCondition$1(expression.condition), false); + }, + visitCssAtRule$1(node) { + var wasInKeyframes, wasInUnknownAtRule, t1, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); + return; + } + wasInKeyframes = _this._evaluate0$_inKeyframes; + wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor0(t1.value) === "keyframes") + _this._evaluate0$_inKeyframes = true; + else + _this._evaluate0$_inUnknownAtRule = true; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure3(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure4(), type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + }, + visitCssComment$1(node) { + var _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(node.text, node.span)); + }, + visitCssDeclaration$1(node) { + this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); + }, + visitCssImport$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports", + modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(modifiableNode); + else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { + _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).addChild$1(modifiableNode); + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + } else { + t1 = _this._evaluate0$_outOfOrderImports; + (t1 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); + } + }, + visitCssKeyframeBlock$1(node) { + this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure3(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure4(), type$.ModifiableCssKeyframeBlock_2, type$.Null); + }, + visitCssMediaRule$1(node) { + var mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); + mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure5(_this, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return; + if (t1) + mergedSources = B.Set_empty5; + else { + t2 = _this._evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = _this._evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure6(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure7(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); + }, + visitCssStyleRule$1(node) { + var t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild, _this = this, _null = null, + _s8_ = "__parent"; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_n, node.span)); + else if (_this._evaluate0$_inKeyframes && _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = _this._evaluate0$_atRootExcludingStyleRule; + styleRule = t1 ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + t2 = t1 ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + t2 = t2 == null ? _null : t2.fromPlainCss; + nest = t2 !== true; + t2 = node._style_rule0$_selector._box0$_inner; + if (nest) { + t2 = t2.value; + t3 = styleRule == null ? _null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$2(originalSelector, _this._evaluate0$_mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; + _this._evaluate0$_atRootExcludingStyleRule = false; + t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure3() : _null; + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure4(_this, rule, node), false, t1, type$.ModifiableCssStyleRule_2, type$.Null); + _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _0_1 = t2.get$length(t1); + if (_0_1 >= 1) { + lastChild = t2.elementAt$1(t1, _0_1 - 1); + t1 = styleRule == null; + } else { + lastChild = _null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + }, + visitCssStylesheet$1(node) { + var t1; + for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + }, + visitCssSupportsRule$1(node) { + var _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure3(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure4(), type$.ModifiableCssSupportsRule_2, type$.Null); + }, + _evaluate0$_handleReturn$1$2(list, callback) { + var t1, _i, _0_0; + for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { + _0_0 = callback.call$1(list[_i]); + if (_0_0 != null) + return _0_0; + } + return null; + }, + _evaluate0$_handleReturn$2(list, callback) { + return this._evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _evaluate0$_withEnvironment$1$2(environment, callback) { + var result, + oldEnvironment = this._evaluate0$_environment; + this._evaluate0$_environment = environment; + result = callback.call$0(); + this._evaluate0$_environment = oldEnvironment; + return result; + }, + _evaluate0$_withEnvironment$2(environment, callback) { + return this._evaluate0$_withEnvironment$1$2(environment, callback, type$.dynamic); + }, + _evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + var result = this._evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), + t1 = trim ? A.trimAscii0(result, true) : result; + return new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); + }, + _evaluate0$_interpolationToValue$1(interpolation) { + return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor)._0; + }, + _evaluate0$_performInterpolation$1(interpolation) { + return this._evaluate0$_performInterpolation$2$warnForColor(interpolation, false); + }, + _evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + var _0_0 = this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), + map = _0_0._1; + map.toString; + return new A._Record_2(_0_0._0, map); + }, + _evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + var t1, t2, t3, t4, t5, t6, t7, first, _i, t8, value, result, t9, result0, _this = this, _null = null, + targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : _null, + oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; + _this._evaluate0$_inSupportsDeclaration = false; + for (t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression_2, t4 = targetLocations == null, t5 = type$.JSArray_Object, t6 = interpolation.span, t7 = type$.Object, first = true, _i = 0, t8 = ""; _i < t2; ++_i, first = false) { + value = t1[_i]; + if (!first) + if (!t4) + targetLocations.push(A.SourceLocation$(t8.length, _null, _null, _null)); + if (typeof value == "string") { + t8 += value; + continue; + } + t3._as(value); + result = value.accept$1(_this); + if (warnForColor && $.$get$namesByColor0().containsKey$1(result)) { + t9 = A._setArrayType([""], t5); + result0 = A.List_List$from(t9, false, t7); + result0.fixed$length = Array; + result0.immutable$list = Array; + result0 = new A.Interpolation0(result0, t6); + result0.Interpolation$20(t9, t6); + t9 = $.$get$namesByColor0(); + _this._evaluate0$_warn$2(string$.You_pr + A.S(t9.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t9.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_u150, new A.StringExpression0(result0, true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t8 += _this._evaluate0$_serialize$3$quote(result, value, false); + } + _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + return new A._Record_2(t8.charCodeAt(0) == 0 ? t8 : t8, A.NullableExtension_andThen0(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure1(interpolation))); + }, + _evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure1(value, quote)); + }, + _evaluate0$_serialize$2(value, nodeWithSpan) { + return this._evaluate0$_serialize$3$quote(value, nodeWithSpan, true); + }, + _evaluate0$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression0) { + t1 = this._evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure1(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + var t1, result, _this = this; + _this._evaluate0$_addChild$2$through(node, through); + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + _this._evaluate0$__parent = node; + result = _this._evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T); + _this._evaluate0$__parent = t1; + return result; + }, + _evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _evaluate0$_withParent$2$2(node, callback, $S, $T) { + return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _evaluate0$_addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._node$_parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode_2._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _evaluate0$_addChild$1(node) { + return this._evaluate0$_addChild$2$through(node, null); + }, + _evaluate0$_withStyleRule$1$2(rule, callback) { + var result, + oldRule = this._evaluate0$_styleRuleIgnoringAtRoot; + this._evaluate0$_styleRuleIgnoringAtRoot = rule; + result = callback.call$0(); + this._evaluate0$_styleRuleIgnoringAtRoot = oldRule; + return result; + }, + _evaluate0$_withStyleRule$2(rule, callback) { + return this._evaluate0$_withStyleRule$1$2(rule, callback, type$.dynamic); + }, + _evaluate0$_withMediaQueries$1$3(queries, sources, callback) { + var result, _this = this, + oldMediaQueries = _this._evaluate0$_mediaQueries, + oldSources = _this._evaluate0$_mediaQuerySources; + _this._evaluate0$_mediaQueries = queries; + _this._evaluate0$_mediaQuerySources = sources; + result = callback.call$0(); + _this._evaluate0$_mediaQueries = oldMediaQueries; + _this._evaluate0$_mediaQuerySources = oldSources; + return result; + }, + _evaluate0$_withMediaQueries$3(queries, sources, callback) { + return this._evaluate0$_withMediaQueries$1$3(queries, sources, callback, type$.dynamic); + }, + _evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback) { + var oldMember, result, _this = this, + t1 = _this._evaluate0$_stack; + t1.push(new A._Record_2(_this._evaluate0$_member, nodeWithSpan)); + oldMember = _this._evaluate0$_member; + _this._evaluate0$_member = member; + result = callback.call$0(); + _this._evaluate0$_member = oldMember; + t1.pop(); + return result; + }, + _evaluate0$_withStackFrame$3(member, nodeWithSpan, callback) { + return this._evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); + }, + _evaluate0$_withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber0) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._evaluate0$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation1().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_E8a); + return value.withoutSlash$0(); + }, + _evaluate0$_stackFrame$2(member, span) { + return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure1(this))); + }, + _evaluate0$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._evaluate0$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._evaluate0$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._evaluate0$_stackFrame$2(_this._evaluate0$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _evaluate0$_stackTrace$0() { + return this._evaluate0$_stackTrace$1(null); + }, + _evaluate0$_warn$3(message, span, deprecation) { + var t1, trace, _this = this; + if (_this._evaluate0$_quietDeps) + if (!_this._evaluate0$_inDependency) { + t1 = _this._evaluate0$_currentCallable; + t1 = t1 == null ? null : t1.inDependency; + t1 = t1 === true; + } else + t1 = true; + else + t1 = false; + if (t1) + return; + if (!_this._evaluate0$_warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._evaluate0$_stackTrace$1(span); + t1 = _this._evaluate0$_logger; + if (deprecation == null) + t1.warn$3$span$trace(0, message, span, trace); + else + A.WarnForDeprecation_warnForDeprecation0(t1, deprecation, message, span, trace); + }, + _evaluate0$_warn$2(message, span) { + return this._evaluate0$_warn$3(message, span, null); + }, + _evaluate0$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._evaluate0$_stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._evaluate0$_stackTrace$1(span); + return new A.SassRuntimeException0(t2, B.Set_empty, message, t1); + }, + _evaluate0$_exception$1(message) { + return this._evaluate0$_exception$2(message, null); + }, + _evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._evaluate0$_stack)._1; + return A.MultiSpanSassRuntimeException$0(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._evaluate0$_stackTrace$0(), null); + }, + _evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace0(t1.withTrace$1(this._evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, true, type$.dynamic); + }, + _evaluate0$_addExceptionSpan$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + return this._evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, type$.dynamic); + }, + _evaluate0$_addExceptionTrace$1$1(callback) { + var error, stackTrace, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) + throw exception; + else if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + A.throwWithTrace0(error.withTrace$1(this._evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_addExceptionTrace$1(callback) { + return this._evaluate0$_addExceptionTrace$1$1(callback, type$.dynamic); + }, + _evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, t2, t3; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) + throw exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = this._evaluate0$_stackTrace$0(); + A.throwWithTrace0(new A.SassRuntimeException0(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_addErrorSpan$2(nodeWithSpan, callback) { + return this._evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _evaluate0$_getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + }, + $isExpressionVisitor: 1, + $isStatementVisitor: 1 + }; + A._EvaluateVisitor_closure25.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure26.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._evaluate0$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure27.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._evaluate0$_environment; + t3 = variable._string0$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure28.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure29.prototype = { + call$1($arguments) { + var t1 = this.$this._evaluate0$_environment; + if (!t1._environment0$_inMixin) + throw A.wrapException(A.SassScriptException$0(string$.conten, null)); + return t1._environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure30.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), t4._1); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 33 + }; + A._EvaluateVisitor_closure31.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$functions(module), type$.String, type$.Callable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassFunction0(t4._1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 33 + }; + A._EvaluateVisitor_closure32.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$mixins(), type$.String, type$.Callable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassMixin0(t4._1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 33 + }; + A._EvaluateVisitor_closure33.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction0(new A.PlainCssCallable0($name._string0$_text)); + } + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + callable = t1._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure10(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction0(callable); + }, + $signature: 203 + }; + A._EvaluateVisitor__closure10.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string0$_text; + t1 = this.$this; + local = t1._evaluate0$_environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._evaluate0$_builtInFunctions.$index(0, normalizedName); + }, + $signature: 105 + }; + A._EvaluateVisitor_closure34.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + callable = t1._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure9(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin0(callable); + }, + $signature: 205 + }; + A._EvaluateVisitor__closure9.prototype = { + call$0() { + var t1 = this.$this._evaluate0$_environment, + t2 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string0$_text); + }, + $signature: 105 + }; + A._EvaluateVisitor_closure35.prototype = { + call$1($arguments) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, callable, + t1 = J.getInterceptor$asx($arguments), + $function = t1.$index($arguments, 0), + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + t3 = A._setArrayType([], type$.JSArray_Expression_2); + t4 = type$.String; + t5 = type$.Expression_2; + t6 = t2.get$span(t2); + t7 = t2.get$span(t2); + args._argument_list$_wereKeywordsAccessed = true; + t8 = args._argument_list$_keywords; + if (t8.get$isEmpty(t8)) + t2 = null; + else { + t9 = type$.Value_2; + t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); + for (args._argument_list$_wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs0(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { + t11 = t8.get$current(t8); + t10.$indexSet(0, new A.SassString0(t11._0, false), t11._1); + } + t2 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); + } + invocation = new A.ArgumentInvocation0(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression0(args, t7), t2, t6); + if ($function instanceof A.SassString0) { + A.warnForDeprecation0(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_MMc); + callableNode = t1._evaluate0$_callableNode; + t2 = $function._string0$_text; + t3 = callableNode.get$span(callableNode); + return t1.visitFunctionExpression$1(0, new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + } + callable = $function.assertFunction$1("function").callable; + if (type$.Callable_2._is(callable)) { + t2 = t1._evaluate0$_callableNode; + t2.toString; + return t1._evaluate0$_runFunctionCallable$3(invocation, callable, t2); + } else + throw A.wrapException(A.SassScriptException$0("The function " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 3 + }; + A._EvaluateVisitor_closure36.prototype = { + call$1($arguments) { + var withMap, t2, values, configuration, t3, + t1 = J.getInterceptor$asx($arguments), + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + if (withMap != null) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + withMap.forEach$1(0, new A._EvaluateVisitor__closure7(values, t2.get$span(t2), t2)); + configuration = new A.ExplicitConfiguration0(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + t3 = t2.get$span(t2); + t1._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure8(t1), t3.get$sourceUrl(t3), configuration, true); + t1._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + }, + $signature: 235 + }; + A._EvaluateVisitor__closure7.prototype = { + call$2(variable, value) { + var t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); + t1 = this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + t1.$indexSet(0, $name, new A.ConfiguredValue0(value, this.span, this.callableNode)); + }, + $signature: 92 + }; + A._EvaluateVisitor__closure8.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._evaluate0$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 104 + }; + A._EvaluateVisitor_closure37.prototype = { + call$1($arguments) { + var callableNode, t2, t3, t4, t5, callable, $content, + t1 = J.getInterceptor$asx($arguments), + mixin = t1.$index($arguments, 0), + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = this.$this; + callableNode = t1._evaluate0$_callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + t4 = type$.Expression_2; + t5 = A.List_List$unmodifiable(B.List_empty21, t4); + t4 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t4); + callable = mixin.assertMixin$1("mixin").callable; + $content = t1._evaluate0$_environment._environment0$_content; + if (type$.Callable_2._is(callable)) + t1._evaluate0$_applyMixin$5(callable, $content, new A.ArgumentInvocation0(t5, t4, new A.ValueExpression0(args, t3), null, t2), callableNode, callableNode); + else + throw A.wrapException(A.SassScriptException$0("The mixin " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 235 + }; + A._EvaluateVisitor_run_closure1.prototype = { + call$0() { + var module, t2, _this = this, + t1 = _this.node, + _0_0 = t1.span.file.url, + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = _this.$this; + t2._evaluate0$_activeModules.$indexSet(0, url, null); + if (!(t2._nodeImporter != null && J.toString$0$(url) === "stdin")) + t2._evaluate0$_loadedUrls.add$1(0, url); + } + t2 = _this.$this; + module = t2._evaluate0$_addExceptionTrace$1(new A._EvaluateVisitor_run__closure1(t2, _this.importer, t1)); + return new A._Record_2_loadedUrls_stylesheet(t2._evaluate0$_loadedUrls, t2._evaluate0$_combineCss$1(module)); + }, + $signature: 453 + }; + A._EvaluateVisitor_run__closure1.prototype = { + call$0() { + return this.$this._evaluate0$_execute$2(this.importer, this.node); + }, + $signature: 454 + }; + A._EvaluateVisitor__loadModule_closure3.prototype = { + call$0() { + return this.callback.call$2(this._box_1.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure4.prototype = { + call$0() { + var canonicalUrl, oldInDependency, t4, message, _this = this, t1 = {}, stylesheet = null, importer = null, + t2 = _this.$this, + t3 = _this.nodeWithSpan, + _1_0 = t2._evaluate0$_loadStylesheet$3$baseUrl(_this.url.toString$0(0), t3.get$span(t3), _this.baseUrl); + stylesheet = _1_0._0; + importer = _1_0._1; + canonicalUrl = stylesheet.span.file.url; + if (canonicalUrl != null) { + t4 = t2._evaluate0$_activeModules; + if (t4.containsKey$1(canonicalUrl)) { + if (_this.namesInErrors) { + t1 = canonicalUrl; + t3 = $.$get$context(); + t1.toString; + message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; + } else + message = string$.Modulel; + t1 = A.NullableExtension_andThen0(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure3(t2, message)); + throw A.wrapException(t1 == null ? t2._evaluate0$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._evaluate0$_modules.containsKey$1(canonicalUrl); + oldInDependency = t2._evaluate0$_inDependency; + t2._evaluate0$_inDependency = _1_0._2; + t1.module = null; + try { + t1.module = t2._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, _this.configuration, _this.namesInErrors, t3); + } finally { + t2._evaluate0$_activeModules.remove$1(0, canonicalUrl); + t2._evaluate0$_inDependency = oldInDependency; + } + t2._evaluate0$_addExceptionSpan$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure4(t1, _this.callback, !t4), false); + }, + $signature: 1 + }; + A._EvaluateVisitor__loadModule__closure3.prototype = { + call$1(previousLoad) { + return this.$this._evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 93 + }; + A._EvaluateVisitor__loadModule__closure4.prototype = { + call$0() { + return this.callback.call$2(this._box_0.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure1.prototype = { + call$0() { + var t3, t4, t5, t6, _this = this, + t1 = _this.$this, + oldImporter = t1._evaluate0$_importer, + oldStylesheet = t1._evaluate0$__stylesheet, + oldRoot = t1._evaluate0$__root, + oldPreModuleComments = t1._evaluate0$_preModuleComments, + oldParent = t1._evaluate0$__parent, + oldEndOfImports = t1._evaluate0$__endOfImports, + oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, + oldExtensionStore = t1._evaluate0$__extensionStore, + t2 = t1._evaluate0$_atRootExcludingStyleRule, + oldStyleRule = t2 ? null : t1._evaluate0$_styleRuleIgnoringAtRoot, + oldMediaQueries = t1._evaluate0$_mediaQueries, + oldDeclarationName = t1._evaluate0$_declarationName, + oldInUnknownAtRule = t1._evaluate0$_inUnknownAtRule, + oldInKeyframes = t1._evaluate0$_inKeyframes, + oldConfiguration = t1._evaluate0$_configuration; + t1._evaluate0$_importer = _this.importer; + t3 = t1._evaluate0$__stylesheet = _this.stylesheet; + t4 = t3.span; + t5 = t1._evaluate0$__parent = t1._evaluate0$__root = A.ModifiableCssStylesheet$0(t4); + t1._evaluate0$__endOfImports = 0; + t1._evaluate0$_outOfOrderImports = null; + t1._evaluate0$__extensionStore = _this.extensionStore; + t1._evaluate0$_declarationName = t1._evaluate0$_mediaQueries = t1._evaluate0$_styleRuleIgnoringAtRoot = null; + t1._evaluate0$_inKeyframes = t1._evaluate0$_atRootExcludingStyleRule = t1._evaluate0$_inUnknownAtRule = false; + t6 = _this.configuration; + if (t6 != null) + t1._evaluate0$_configuration = t6; + t1.visitStylesheet$1(0, t3); + t3 = t1._evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); + _this.css.__late_helper$_value = t3; + _this.preModuleComments.__late_helper$_value = t1._evaluate0$_preModuleComments; + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = oldStylesheet; + t1._evaluate0$__root = oldRoot; + t1._evaluate0$_preModuleComments = oldPreModuleComments; + t1._evaluate0$__parent = oldParent; + t1._evaluate0$__endOfImports = oldEndOfImports; + t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; + t1._evaluate0$__extensionStore = oldExtensionStore; + t1._evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._evaluate0$_mediaQueries = oldMediaQueries; + t1._evaluate0$_declarationName = oldDeclarationName; + t1._evaluate0$_inUnknownAtRule = oldInUnknownAtRule; + t1._evaluate0$_atRootExcludingStyleRule = t2; + t1._evaluate0$_inKeyframes = oldInKeyframes; + t1._evaluate0$_configuration = oldConfiguration; + }, + $signature: 1 + }; + A._EvaluateVisitor__combineCss_closure3.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 126 + }; + A._EvaluateVisitor__combineCss_closure4.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__combineCss_visitModule1.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._evaluate0$_indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 455 + }; + A._EvaluateVisitor__extendModules_closure3.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__extendModules_closure4.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore_2); + }, + $signature: 215 + }; + A._EvaluateVisitor_visitAtRootRule_closure3.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRootRule_closure4.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 0 + }; + A._EvaluateVisitor__scopeForAtRoot_closure11.prototype = { + call$1(callback) { + var t1 = this.$this, + t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"); + t1._evaluate0$__parent = this.newParent; + t1._evaluate0$_environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); + t1._evaluate0$__parent = t2; + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot_closure12.prototype = { + call$1(callback) { + var t1 = this.$this, + oldAtRootExcludingStyleRule = t1._evaluate0$_atRootExcludingStyleRule; + t1._evaluate0$_atRootExcludingStyleRule = true; + this.innerScope.call$1(callback); + t1._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot_closure13.prototype = { + call$1(callback) { + return this.$this._evaluate0$_withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure1(this.innerScope, callback)); + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot__closure1.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 1 + }; + A._EvaluateVisitor__scopeForAtRoot_closure14.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInKeyframes = t1._evaluate0$_inKeyframes; + t1._evaluate0$_inKeyframes = false; + this.innerScope.call$1(callback); + t1._evaluate0$_inKeyframes = wasInKeyframes; + }, + $signature: 37 + }; + A._EvaluateVisitor__scopeForAtRoot_closure15.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule0; + }, + $signature: 207 + }; + A._EvaluateVisitor__scopeForAtRoot_closure16.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInUnknownAtRule = t1._evaluate0$_inUnknownAtRule; + t1._evaluate0$_inUnknownAtRule = false; + this.innerScope.call$1(callback); + t1._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + }, + $signature: 37 + }; + A._EvaluateVisitor_visitContentRule_closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + return null; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitDeclaration_closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this._box_0.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitEachRule_closure5.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._evaluate0$_environment.setLocalVariable$3(this._box_0.variable, t1._evaluate0$_withoutSlash$2(value, t2), t2); + }, + $signature: 59 + }; + A._EvaluateVisitor_visitEachRule_closure6.prototype = { + call$1(value) { + return this.$this._evaluate0$_setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); + }, + $signature: 59 + }; + A._EvaluateVisitor_visitEachRule_closure7.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure1(t1, _this.setVariables, _this.node)); + }, + $signature: 43 + }; + A._EvaluateVisitor_visitEachRule__closure1.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure1(t1)); + }, + $signature: 236 + }; + A._EvaluateVisitor_visitEachRule___closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 99 + }; + A._EvaluateVisitor_visitAtRule_closure5.prototype = { + call$1(value) { + return this.$this._evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 458 + }; + A._EvaluateVisitor_visitAtRule_closure6.prototype = { + call$0() { + var t2, t3, _i, _this = this, + t1 = _this.$this, + styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || t1._evaluate0$_inKeyframes || J.$eq$(_this.name.value, "font-face")) + for (t2 = _this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule._style_rule0$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure1(t1, _this.children), false, type$.ModifiableCssStyleRule_2, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure7.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitForRule_closure9.prototype = { + call$0() { + return this.node.from.accept$1(this.$this).assertNumber$0(); + }, + $signature: 238 + }; + A._EvaluateVisitor_visitForRule_closure10.prototype = { + call$0() { + return this.node.to.accept$1(this.$this).assertNumber$0(); + }, + $signature: 238 + }; + A._EvaluateVisitor_visitForRule_closure11.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure12.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure13.prototype = { + call$0() { + var i, t3, t4, t5, t6, t7, t8, _0_0, _this = this, + t1 = _this.$this, + t2 = _this.node, + nodeWithSpan = t1._evaluate0$_expressionNode$1(t2.from); + for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { + t7 = t1._evaluate0$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + _0_0 = t1._evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure1(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 43 + }; + A._EvaluateVisitor_visitForRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 99 + }; + A._EvaluateVisitor_visitForwardRule_closure3.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._evaluate0$_registerCommentsForModule$1(module); + this.$this._evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 104 + }; + A._EvaluateVisitor_visitForwardRule_closure4.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._evaluate0$_registerCommentsForModule$1(module); + this.$this._evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 104 + }; + A._EvaluateVisitor__registerCommentsForModule_closure1.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment_2); + }, + $signature: 210 + }; + A._EvaluateVisitor_visitIfRule_closure1.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure1(t1, clause), true, clause.hasDeclarations, type$.nullable_Value_2); + }, + $signature: 460 + }; + A._EvaluateVisitor_visitIfRule__closure1.prototype = { + call$0() { + var t1 = this.$this; + return t1._evaluate0$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure1(t1)); + }, + $signature: 43 + }; + A._EvaluateVisitor_visitIfRule___closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 99 + }; + A._EvaluateVisitor__visitDynamicImport_closure1.prototype = { + call$0() { + var t1, t2, _0_0, stylesheet, importer, isDependency, url, t3, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = this.$this; + t2 = this.$import; + _0_0 = t1._evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true); + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + url = stylesheet.span.file.url; + if (url != null) { + t3 = t1._evaluate0$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure7(t1)); + throw A.wrapException(t2 == null ? t1._evaluate0$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._stylesheet1$_uses; + t3 = type$.UnmodifiableListView_UseRule_2; + if (new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2).get$length(0) === 0) { + oldImporter = t1._evaluate0$_importer; + t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"); + oldInDependency = t1._evaluate0$_inDependency; + t1._evaluate0$_importer = importer; + t1._evaluate0$__stylesheet = stylesheet; + t1._evaluate0$_inDependency = isDependency; + t1.visitStylesheet$1(0, stylesheet); + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = t2; + t1._evaluate0$_inDependency = oldInDependency; + t1._evaluate0$_activeModules.remove$1(0, url); + return; + } + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure8())) { + t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure9()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._evaluate0$_environment; + t3 = type$.String; + t4 = type$.Module_Callable_2; + t5 = type$.AstNode_2; + t6 = A._setArrayType([], type$.JSArray_Module_Callable_2); + t7 = t2._environment0$_variables; + t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); + t8 = t2._environment0$_variableNodes; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._environment0$_functions; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._environment0$_mixins; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + environment = A.Environment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._environment0$_importedModules, null, null, t6, t7, t8, t9, t10, t2._environment0$_content); + t1._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure10(_box_0, t1, loadsUserDefinedModules, environment, children)); + module = environment.toDummyModule$0(); + t1._evaluate0$_environment.importForwards$1(module); + if (loadsUserDefinedModules) { + if (module.transitivelyContainsCss) + t1._evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); + visitor = new A._ImportedCssVisitor1(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + } + t1._evaluate0$_activeModules.remove$1(0, url); + }, + $signature: 0 + }; + A._EvaluateVisitor__visitDynamicImport__closure7.prototype = { + call$1(previousLoad) { + return this.$this._evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 93 + }; + A._EvaluateVisitor__visitDynamicImport__closure8.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 211 + }; + A._EvaluateVisitor__visitDynamicImport__closure9.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 212 + }; + A._EvaluateVisitor__visitDynamicImport__closure10.prototype = { + call$0() { + var t7, t8, _this = this, + t1 = _this.$this, + oldImporter = t1._evaluate0$_importer, + t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"), + t3 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root"), + t4 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"), + t5 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, "_endOfImports"), + oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, + oldConfiguration = t1._evaluate0$_configuration, + oldInDependency = t1._evaluate0$_inDependency, + t6 = _this._box_0; + t1._evaluate0$_importer = t6.importer; + t7 = t6.stylesheet; + t1._evaluate0$__stylesheet = t7; + t8 = _this.loadsUserDefinedModules; + if (t8) { + t7 = A.ModifiableCssStylesheet$0(t7.span); + t1._evaluate0$__root = t7; + t1._evaluate0$__parent = t1._evaluate0$_assertInModule$2(t7, "_root"); + t1._evaluate0$__endOfImports = 0; + t1._evaluate0$_outOfOrderImports = null; + } + t1._evaluate0$_inDependency = t6.isDependency; + t7 = new A.UnmodifiableListView(t6.stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + if (!t7.get$isEmpty(t7)) + t1._evaluate0$_configuration = _this.environment.toImplicitConfiguration$0(); + t1.visitStylesheet$1(0, t6.stylesheet); + t6 = t8 ? t1._evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + _this.children.__late_helper$_value = t6; + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = t2; + if (t8) { + t1._evaluate0$__root = t3; + t1._evaluate0$__parent = t4; + t1._evaluate0$__endOfImports = t5; + t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; + } + t1._evaluate0$_configuration = oldConfiguration; + t1._evaluate0$_inDependency = oldInDependency; + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin_closure3.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure4(t1, _this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin__closure4.prototype = { + call$0() { + var _this = this; + _this.$this._evaluate0$_runBuiltInCallable$3(_this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin_closure4.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._evaluate0$_environment.withContent$2(_this.contentCallable, new A._EvaluateVisitor__applyMixin__closure3(t1, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin__closure3.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure1(t1, this.mixin, this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin___closure1.prototype = { + call$0() { + var t1, t2, t3, t4, _i; + for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpanWithoutContent, _i = 0; _i < t2; ++_i) + t3._evaluate0$_addErrorSpan$2(t4, new A._EvaluateVisitor__applyMixin____closure1(t3, t1[_i])); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin____closure1.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 43 + }; + A._EvaluateVisitor_visitIncludeRule_closure5.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 105 + }; + A._EvaluateVisitor_visitIncludeRule_closure6.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable0($content, t1._evaluate0$_environment.closure$0(), t1._evaluate0$_inDependency, type$.UserDefinedCallable_Environment_2); + }, + $signature: 461 + }; + A._EvaluateVisitor_visitIncludeRule_closure7.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 30 + }; + A._EvaluateVisitor_visitMediaRule_closure5.prototype = { + call$1(mediaQueries) { + return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 97 + }; + A._EvaluateVisitor_visitMediaRule_closure6.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.queries; + t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure1(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule__closure1.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule___closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure7.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure7.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure8.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure10.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure1(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure9.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure1.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitSupportsRule_closure3.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor__visitSupportsCondition_closure1.prototype = { + call$0() { + var t4, + t1 = this.$this, + t2 = this._box_0, + t3 = t2.declaration.name; + t3 = t1._evaluate0$_serialize$3$quote(t3.accept$1(t1), t3, true); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + t2 = t2.declaration.value; + return "(" + t3 + ":" + t4 + t1._evaluate0$_serialize$3$quote(t2.accept$1(t1), t2, true) + ")"; + }, + $signature: 29 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure5.prototype = { + call$0() { + var t1 = this.$this._evaluate0$_environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure6.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 43 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure7.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure1.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._evaluate0$_registerCommentsForModule$1(module); + t1 = this.$this._evaluate0$_environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._environment0$_globalModules.$indexSet(0, module, t2); + t1._environment0$_allModules.push(module); + _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._environment0$_variables)), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$0(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._environment0$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._environment0$_namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$0(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._environment0$_namespaceNodes.$indexSet(0, t3, t2); + t1._environment0$_allModules.push(module); + } + }, + $signature: 104 + }; + A._EvaluateVisitor_visitWarnRule_closure1.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 47 + }; + A._EvaluateVisitor_visitWhileRule_closure1.prototype = { + call$0() { + var t1, t2, t3, _0_0; + for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { + _0_0 = t3._evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure1(t3)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 43 + }; + A._EvaluateVisitor_visitWhileRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 99 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure1.prototype = { + call$0() { + var t1 = this.node, + t2 = this.$this, + left = t1.left.accept$1(t2); + switch (t1.operator) { + case B.BinaryOperator_wdM0: + t1 = t1.right.accept$1(t2); + t1 = new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(t1, false, true), false); + break; + case B.BinaryOperator_qNM0: + t1 = left.get$isTruthy() ? left : t1.right.accept$1(t2); + break; + case B.BinaryOperator_eDt0: + t1 = left.get$isTruthy() ? t1.right.accept$1(t2) : left; + break; + case B.BinaryOperator_g8k0: + t1 = left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + break; + case B.BinaryOperator_icU0: + t1 = !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + break; + case B.BinaryOperator_bEa0: + t1 = left.greaterThan$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_oEm0: + t1 = left.greaterThanOrEquals$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_miq0: + t1 = left.lessThan$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_SPQ0: + t1 = left.lessThanOrEquals$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_u150: + t1 = left.plus$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_SjO0: + t1 = left.minus$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_2No0: + t1 = left.times$1(t1.right.accept$1(t2)); + break; + case B.BinaryOperator_U770: + t1 = t2._evaluate0$_slash$3(left, t1.right.accept$1(t2), t1); + break; + case B.BinaryOperator_KNx0: + t1 = left.modulo$1(t1.right.accept$1(t2)); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 47 + }; + A._EvaluateVisitor__slash_recommendation1.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression0 && B.BinaryOperator_U770 === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression0) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 115 + }; + A._EvaluateVisitor_visitVariableExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 43 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure1.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator) { + case B.UnaryOperator_cLp0: + t1 = _this.operand.unaryPlus$0(); + break; + case B.UnaryOperator_AiQ0: + t1 = _this.operand.unaryMinus$0(); + break; + case B.UnaryOperator_SJr0: + t1 = new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); + break; + case B.UnaryOperator_not_not_not0: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 47 + }; + A._EvaluateVisitor_visitListExpression_closure1.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 462 + }; + A._EvaluateVisitor_visitFunctionExpression_closure5.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 105 + }; + A._EvaluateVisitor_visitFunctionExpression_closure6.prototype = { + call$1(argument) { + return argument.accept$1(new A._IsCalculationSafeVisitor0()); + }, + $signature: 139 + }; + A._EvaluateVisitor_visitFunctionExpression_closure7.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 47 + }; + A._EvaluateVisitor__checkCalculationArguments_check1.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._evaluate0$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._evaluate0$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize0("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize0("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 84 + }; + A._EvaluateVisitor__visitCalculationExpression_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this._box_0, + t3 = _this.inLegacySassFunction; + return A.SassCalculation_operateInternal0(t1._evaluate0$_binaryOperatorToCalculationOperator$2(t2.operator, _this.node), t1._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t3), t1._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t3), t3, !t1._evaluate0$_inSupportsDeclaration); + }, + $signature: 83 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 47 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable; + return t1._evaluate0$_withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure1(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure1(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure1.prototype = { + call$0() { + var declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, _this = this, + t1 = _this.$this, + t2 = _this.evaluated._values, + t3 = _this.callable.declaration.$arguments, + t4 = _this.nodeWithSpan; + t1._evaluate0$_verifyArguments$4(t2[2].length, t2[0], t3, t4); + declaredArguments = t3.$arguments; + t5 = declaredArguments.length; + minLength = Math.min(t2[2].length, t5); + for (i = 0; i < minLength; ++i) + t1._evaluate0$_environment.setLocalVariable$3(declaredArguments[i].name, t2[2][i], t2[3][i]); + for (i = t2[2].length; i < t5; ++i) { + argument = declaredArguments[i]; + t6 = t2[0]; + t7 = argument.name; + value = t6.remove$1(0, t7); + if (value == null) { + t6 = argument.defaultValue; + value = t1._evaluate0$_withoutSlash$2(t6.accept$1(t1), t1._evaluate0$_expressionNode$1(t6)); + } + t6 = t1._evaluate0$_environment; + t8 = t2[1].$index(0, t7); + if (t8 == null) { + t8 = argument.defaultValue; + t8.toString; + t8 = t1._evaluate0$_expressionNode$1(t8); + } + t6.setLocalVariable$3(t7, value, t8); + } + restArgument = t3.restArgument; + if (restArgument != null) { + t6 = t2[2]; + rest = t6.length > t5 ? B.JSArray_methods.sublist$1(t6, t5) : B.List_empty20; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$0(rest, t5, t6 === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : t6); + t1._evaluate0$_environment.setLocalVariable$3(restArgument, argumentList, t4); + } else + argumentList = null; + result = _this.run.call$0(); + if (argumentList == null) + return result; + t5 = t2[0].__js_helper$_length; + if (t5 === 0) + return result; + if (argumentList._argument_list$_wereKeywordsAccessed) + return result; + argumentWord = A.pluralize0("argument", t5, null); + t2 = t2[0]; + t5 = A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + argumentWord + " named " + A.toSentence0(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t2, t5), new A._EvaluateVisitor__runUserDefinedCallable____closure1(), t5._eval$1("Iterable.E"), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate0$_stackTrace$1(t4.get$span(t4)), null)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure1.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure1.prototype = { + call$0() { + var t1, t2, t3, t4, _i, $returnValue; + for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { + $returnValue = t2[_i].accept$1(t4); + if ($returnValue instanceof A.Value0) + return $returnValue; + } + throw A.wrapException(t4._evaluate0$_exception$2("Function finished without @return.", t1.span)); + }, + $signature: 47 + }; + A._EvaluateVisitor__runBuiltInCallable_closure5.prototype = { + call$0() { + return this._box_0.overload.verify$2(this.evaluated._values[2].length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure6.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 47 + }; + A._EvaluateVisitor__runBuiltInCallable_closure7.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure7.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure8.prototype = { + call$1(value) { + return this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure9.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._evaluate0$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 108 + }; + A._EvaluateVisitor__evaluateArguments_closure10.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure7.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(value, t1.get$span(t1)); + }, + $signature: 64 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure8.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 64 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure9.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 108 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure10.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 64 + }; + A._EvaluateVisitor__addRestMap_closure1.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString0) + _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._evaluate0$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 92 + }; + A._EvaluateVisitor__verifyArguments_closure1.prototype = { + call$0() { + return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure3.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure3.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssMediaRule_closure5.prototype = { + call$1(mediaQueries) { + return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 97 + }; + A._EvaluateVisitor_visitCssMediaRule_closure6.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.node.queries; + t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure1(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule__closure1.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule___closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure7.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssStyleRule_closure4.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure1(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule__closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule_closure3.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure3.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluateVisitor__performInterpolationHelper_closure1.prototype = { + call$1(targetLocations) { + return A.InterpolationMap$0(this.interpolation, targetLocations); + }, + $signature: 216 + }; + A._EvaluateVisitor__serialize_closure1.prototype = { + call$0() { + return A.serializeValue0(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure1.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 217 + }; + A._EvaluateVisitor__withoutSlash_recommendation1.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue0(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 218 + }; + A._EvaluateVisitor__stackFrame_closure1.prototype = { + call$1(url) { + var t1 = this.$this._evaluate0$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 48 + }; + A._ImportedCssVisitor1.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure1(); + this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._evaluate0$_visitor; + if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent") !== t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root")) + t1._evaluate0$_addChild$1(node); + else if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root").children._collection$_source)) { + t1._evaluate0$_addChild$1(node); + t1._evaluate0$__endOfImports = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) + 1; + } else { + t2 = t1._evaluate0$_outOfOrderImports; + (t2 == null ? t1._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._evaluate0$_visitor, + mediaQueries = t1._evaluate0$_mediaQueries; + t1._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure1(mediaQueries == null || t1._evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure1()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure1()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure1.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule0; + else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 7 + }; + A._EvaluationContext1.prototype = { + get$currentCallableSpan() { + var _0_0 = this._evaluate0$_visitor._evaluate0$_callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._evaluate0$_visitor, + t2 = t1._evaluate0$_importSpan; + if (t2 == null) { + t2 = t1._evaluate0$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._evaluate0$_warn$3(message, t2 == null ? this._evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); + }, + $isEvaluationContext0: 1 + }; + A.EveryCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure0(this)); + }, + visitCssComment$1(node) { + return false; + }, + visitCssDeclaration$1(node) { + return false; + }, + visitCssImport$1(node) { + return false; + }, + visitCssKeyframeBlock$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure0(this)); + }, + visitCssMediaRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure0(this)); + }, + visitCssStyleRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure0(this)); + }, + visitCssStylesheet$1(node) { + return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure0(this)); + }, + visitCssSupportsRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure0(this)); + } + }; + A.EveryCssVisitor_visitCssAtRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssMediaRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssStyleRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssStylesheet_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A._NodeException.prototype = {}; + A.exceptionClass_closure.prototype = { + call$0() { + var jsClass = type$.JSClass._as(new self.Function("", " return class Exception extends Error {\n constructor(dartException, message) {\n super(message);\n\n // Define this as non-enumerable so that it doesn't show up when the\n // exception hits the top level.\n Object.defineProperty(this, '_dartException', {\n value: dartException,\n enumerable: false\n });\n }\n\n toString() {\n return this.message;\n }\n }\n ").call$0()); + A.defineGetter(jsClass, "name", null, "sass.Exception"); + A.LinkedHashMap_LinkedHashMap$_literal(["sassMessage", new A.exceptionClass__closure(), "sassStack", new A.exceptionClass__closure0(), "span", new A.exceptionClass__closure1()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + return jsClass; + }, + $signature: 15 + }; + A.exceptionClass__closure.prototype = { + call$1(exception) { + return J.get$_dartException$x(exception)._span_exception$_message; + }, + $signature: 239 + }; + A.exceptionClass__closure0.prototype = { + call$1(exception) { + return J.get$trace$z(J.get$_dartException$x(exception)).toString$0(0); + }, + $signature: 239 + }; + A.exceptionClass__closure1.prototype = { + call$1(exception) { + var t1 = J.get$_dartException$x(exception), + t2 = J.getInterceptor$z(t1); + return A.SourceSpanException.prototype.get$span.call(t2, t1); + }, + $signature: 464 + }; + A.SassException0.prototype = { + get$trace(_) { + return A.Trace$(A._setArrayType([A.frameForSpan0(A.SourceSpanException.prototype.get$span.call(this, 0), "root stylesheet", null)], type$.JSArray_Frame), null); + }, + get$span(_) { + return A.SourceSpanException.prototype.get$span.call(this, 0); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassException$0(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withTrace$1(trace) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(this.loadedUrls, type$.Uri); + return new A.SassRuntimeException0(trace, t2, this._span_exception$_message, t1); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassException0(t2, this._span_exception$_message, t1); + }, + toString$1$color(_, color) { + var t2, _i, frame, t3, _this = this, + buffer = new A.StringBuffer(""), + t1 = "" + ("Error: " + _this._span_exception$_message + "\n"); + buffer._contents = t1; + buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, 0).highlight$1$color(color); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + t3 = buffer._contents += "\n"; + buffer._contents = t3 + (" " + A.S(frame)); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + } + }; + A.MultiSpanSassException0.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withTrace$1(trace) { + var _this = this; + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + toString$1$color(_, color) { + var t1, t2, _i, frame, t3, _this = this, + useColor = color === true, + buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); + A.NullableExtension_andThen0(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (J.get$length$asx(frame) === 0) + continue; + buffer._contents += "\n"; + t3 = " " + A.S(frame); + buffer._contents += t3; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + get$primaryLabel() { + return this.primaryLabel; + }, + get$secondarySpans() { + return this.secondarySpans; + } + }; + A.SassRuntimeException0.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this; + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassRuntimeException0(this.trace, t2, this._span_exception$_message, t1); + }, + get$trace(receiver) { + return this.trace; + } + }; + A.MultiSpanSassRuntimeException0.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, _this.trace, loadedUrls); + }, + $isSassRuntimeException0: 1, + get$trace(receiver) { + return this.trace; + } + }; + A.SassFormatException0.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassFormatException$0(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassFormatException0(t2, this._span_exception$_message, t1); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1 + }; + A.MultiSpanSassFormatException0.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassFormatException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassFormatException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1, + $isMultiSourceSpanFormatException: 1, + $isSassFormatException0: 1 + }; + A.SassScriptException0.prototype = { + withSpan$1(span) { + return new A.SassException0(B.Set_empty, this.message, span); + }, + toString$0(_) { + return this.message + string$.x0a_BUG_; + }, + get$message(receiver) { + return this.message; + } + }; + A.MultiSpanSassScriptException0.prototype = { + withSpan$1(span) { + return A.MultiSpanSassException$0(this.message, span, this.primaryLabel, this.secondarySpans, null); + } + }; + A.Exports.prototype = {}; + A.LoggerNamespace.prototype = {}; + A.Expression0.prototype = {$isAstNode0: 1, $isSassNode: 1}; + A._IsCalculationSafeVisitor0.prototype = { + visitBinaryOperationExpression$1(_, node) { + var t1; + if (B.Set_mqKz0.contains$1(0, node.operator)) + t1 = node.left.accept$1(this) || node.right.accept$1(this); + else + t1 = false; + return t1; + }, + visitBooleanExpression$1(_, node) { + return false; + }, + visitColorExpression$1(_, node) { + return false; + }, + visitFunctionExpression$1(_, node) { + return true; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return true; + }, + visitIfExpression$1(_, node) { + return true; + }, + visitListExpression$1(_, node) { + var t1 = false; + if (node.separator === B.ListSeparator_nbm0) + if (!node.hasBrackets) { + t1 = node.contents; + t1 = t1.length > 1 && B.JSArray_methods.every$1(t1, new A._IsCalculationSafeVisitor_visitListExpression_closure0(this)); + } + return t1; + }, + visitMapExpression$1(_, node) { + return false; + }, + visitNullExpression$1(_, node) { + return false; + }, + visitNumberExpression$1(_, node) { + return true; + }, + visitParenthesizedExpression$1(_, node) { + return node.expression.accept$1(this); + }, + visitSelectorExpression$1(_, node) { + return false; + }, + visitStringExpression$1(_, node) { + var text, t1, t2; + if (node.hasQuotes) + return false; + text = node.text.get$initialPlain(); + t1 = false; + if (!B.JSString_methods.startsWith$1(text, "!")) + if (!B.JSString_methods.startsWith$1(text, "#")) { + t2 = text.length; + if ((1 >= t2 ? null : text.charCodeAt(1)) !== 43) + t1 = (3 >= t2 ? null : text.charCodeAt(3)) !== 40; + } + return t1; + }, + visitSupportsExpression$1(_, node) { + return false; + }, + visitUnaryOperationExpression$1(_, node) { + return false; + }, + visitValueExpression$1(_, node) { + return false; + }, + visitVariableExpression$1(_, node) { + return true; + }, + $isExpressionVisitor: 1 + }; + A._IsCalculationSafeVisitor_visitListExpression_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 139 + }; + A.JSExpressionVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + return J.visitBinaryOperationExpression$1$x(this._expression$_inner, node); + }, + visitBooleanExpression$1(_, node) { + return J.visitBooleanExpression$1$x(this._expression$_inner, node); + }, + visitColorExpression$1(_, node) { + return J.visitColorExpression$1$x(this._expression$_inner, node); + }, + visitInterpolatedFunctionExpression$1(_, node) { + return J.visitInterpolatedFunctionExpression$1$x(this._expression$_inner, node); + }, + visitFunctionExpression$1(_, node) { + return J.visitFunctionExpression$1$x(this._expression$_inner, node); + }, + visitIfExpression$1(_, node) { + return J.visitIfExpression$1$x(this._expression$_inner, node); + }, + visitListExpression$1(_, node) { + return J.visitListExpression$1$x(this._expression$_inner, node); + }, + visitMapExpression$1(_, node) { + return J.visitMapExpression$1$x(this._expression$_inner, node); + }, + visitNullExpression$1(_, node) { + return J.visitNullExpression$1$x(this._expression$_inner, node); + }, + visitNumberExpression$1(_, node) { + return J.visitNumberExpression$1$x(this._expression$_inner, node); + }, + visitParenthesizedExpression$1(_, node) { + return J.visitParenthesizedExpression$1$x(this._expression$_inner, node); + }, + visitSelectorExpression$1(_, node) { + return J.visitSelectorExpression$1$x(this._expression$_inner, node); + }, + visitStringExpression$1(_, node) { + return J.visitStringExpression$1$x(this._expression$_inner, node); + }, + visitSupportsExpression$1(_, node) { + return J.visitSupportsExpression$1$x(this._expression$_inner, node); + }, + visitUnaryOperationExpression$1(_, node) { + return J.visitUnaryOperationExpression$1$x(this._expression$_inner, node); + }, + visitValueExpression$1(_, node) { + return J.visitValueExpression$1$x(this._expression$_inner, node); + }, + visitVariableExpression$1(_, node) { + return J.visitVariableExpression$1$x(this._expression$_inner, node); + }, + $isExpressionVisitor: 1 + }; + A.JSExpressionVisitorObject.prototype = {}; + A._MakeExpressionCalculationSafe0.prototype = { + visitBinaryOperationExpression$1(_, node) { + var t1, t2, t3, t4; + if (node.operator === B.BinaryOperator_KNx0) { + t1 = A._setArrayType([node], type$.JSArray_Expression_2); + t2 = node.get$span(0); + t3 = type$.Expression_2; + t1 = A.List_List$unmodifiable(t1, t3); + t3 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t3); + t4 = node.get$span(0); + t1 = new A.FunctionExpression0("math", A.stringReplaceAllUnchecked("max", "_", "-"), "max", new A.ArgumentInvocation0(t1, t3, null, null, t2), t4); + } else + t1 = this.super$ReplaceExpressionVisitor$visitBinaryOperationExpression0(0, node); + return t1; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return node; + }, + visitUnaryOperationExpression$1(_, node) { + var t1, + _0_0 = node.operator; + $label0$0: { + if (B.UnaryOperator_cLp0 === _0_0) { + t1 = node.operand; + break $label0$0; + } + if (B.UnaryOperator_AiQ0 === _0_0) { + t1 = new A.BinaryOperationExpression0(B.BinaryOperator_2No0, new A.NumberExpression0(-1, null, node.span), node.operand, false); + break $label0$0; + } + t1 = this.super$ReplaceExpressionVisitor$visitUnaryOperationExpression0(0, node); + break $label0$0; + } + return t1; + }, + $isExpressionVisitor: 1 + }; + A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0.prototype = {}; + A.ExtendRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitExtendRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector.toString$0(0), + t2 = this.isOptional ? " !optional" : ""; + return "@extend " + t1 + t2 + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Extension0.prototype = { + toString$0(_) { + var t1 = this.extender.toString$0(0), + t2 = this.target.toString$0(0), + t3 = this.isOptional ? " !optional" : ""; + return t1 + " {@extend " + t2 + t3 + "}"; + } + }; + A.Extender0.prototype = { + assertCompatibleMediaContext$1(mediaContext) { + var expectedMediaContext, + extension = this._extension$_extension; + if (extension == null) + return; + expectedMediaContext = extension.mediaContext; + if (expectedMediaContext == null) + return; + if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) + return; + throw A.wrapException(A.SassException$0(string$.You_ma, extension.span, null)); + }, + toString$0(_) { + return A.serializeSelector0(this.selector, true); + } + }; + A.ExtensionStore0.prototype = { + get$isEmpty(_) { + return this._extension_store$_extensions.__js_helper$_length === 0; + }, + get$simpleSelectors() { + return new A.MapKeySet(this._extension_store$_selectors, type$.MapKeySet_SimpleSelector_2); + }, + extensionsWhereTarget$1(callback) { + return new A._SyncStarIterable(this.extensionsWhereTarget$body$ExtensionStore0(callback), type$._SyncStarIterable_Extension_2); + }, + extensionsWhereTarget$body$ExtensionStore0($async$callback) { + var $async$self = this; + return function() { + var callback = $async$callback; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, simple, sources, t3; + return function $async$extensionsWhereTarget$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = A.MapExtensions_get_pairs0($async$self._extension_store$_extensions, type$.SimpleSelector_2, type$.Map_ComplexSelector_Extension_2), t1 = t1.get$iterator(t1); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t2 = t1.get$current(t1); + simple = t2._0; + sources = t2._1; + if (!callback.call$1(simple)) { + // goto for condition + $async$goto = 2; + break; + } + t2 = sources.get$values(sources), t2 = t2.get$iterator(t2); + case 4: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 5; + break; + } + t3 = t2.get$current(t2); + $async$goto = t3 instanceof A.MergedExtension0 ? 6 : 8; + break; + case 6: + // then + t3 = t3.unmerge$0(); + $async$goto = 9; + return $async$iterator._yieldStar$1(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure0(), t3.$ti._eval$1("WhereIterable"))); + case 9: + // after yield + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = !t3.isOptional ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return $async$iterator._async$_current = t3, 1; + case 12: + // after yield + case 11: + // join + case 7: + // join + // goto for condition + $async$goto = 4; + break; + case 5: + // after for + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + addSelector$2(selector, mediaContext) { + var originalSelector, error, stackTrace, t1, exception, t2, t3, t4, modifiableSelector, _this = this; + selector = selector; + originalSelector = selector; + if (!originalSelector.accept$1(B._IsInvisibleVisitor_true0)) + _this._extension_store$_originals.addAll$1(0, originalSelector.components); + t1 = _this._extension_store$_extensions; + if (t1.__js_helper$_length !== 0) + try { + selector = _this._extension_store$_extendList$3(originalSelector, t1, mediaContext); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$z(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, ""); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$z(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + A.throwWithTrace0(new A.SassException0(B.Set_empty, "From " + t1 + "\n" + t2, t3), error, stackTrace); + } else + throw exception; + } + modifiableSelector = new A.ModifiableBox0(selector, type$.ModifiableBox_SelectorList_2); + if (mediaContext != null) + _this._extension_store$_mediaContexts.$indexSet(0, modifiableSelector, mediaContext); + _this._extension_store$_registerSelector$2(selector, modifiableSelector); + return new A.Box0(modifiableSelector, type$.Box_SelectorList_2); + }, + _extension_store$_registerSelector$2(list, selector) { + var t1, t2, t3, t4, _i, t5, t6, _i0, t7, t8, _i1, simple, _0_2_isSet, _0_2, t9, selectorInPseudo; + for (t1 = list.components, t2 = t1.length, t3 = this._extension_store$_selectors, t4 = type$.SelectorList_2, _i = 0; _i < t2; ++_i) + for (t5 = t1[_i].components, t6 = t5.length, _i0 = 0; _i0 < t6; ++_i0) + for (t7 = t5[_i0].selector.components, t8 = t7.length, _i1 = 0; _i1 < t8; ++_i1) { + simple = t7[_i1]; + J.add$1$ax(t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure0()), selector); + _0_2_isSet = simple instanceof A.PseudoSelector0; + if (_0_2_isSet) { + _0_2 = simple.selector; + t9 = _0_2 != null; + } else { + _0_2 = null; + t9 = false; + } + if (t9) { + selectorInPseudo = _0_2_isSet ? _0_2 : simple.selector; + this._extension_store$_registerSelector$2(selectorInPseudo == null ? t4._as(selectorInPseudo) : selectorInPseudo, selector); + } + } + }, + addExtension$4(extender, target, extend, mediaContext) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, newExtensions, _i, complex, t11, extension, _0_0, t12, newExtensionsByTarget, additionalExtensions, _this = this, + selectors = _this._extension_store$_selectors.$index(0, target), + t1 = _this._extension_store$_extensionsByExtender, + existingExtensions = t1.$index(0, target), + sources = _this._extension_store$_extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure2()); + for (t2 = extender.components, t3 = t2.length, t4 = selectors == null, t5 = _this._extension_store$_sourceSpecificity, t6 = extend.span, t7 = extend.isOptional, t8 = existingExtensions != null, t9 = type$.ComplexSelector_2, t10 = type$.Extension_2, newExtensions = null, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (complex.accept$1(B.C__IsUselessVisitor0)) + continue; + complex.get$specificity(); + t11 = new A.Extender0(complex, false); + extension = t11._extension$_extension = new A.Extension0(t11, target, mediaContext, t7, t6); + _0_0 = sources.$index(0, complex); + if (_0_0 != null) { + sources.$indexSet(0, complex, A.MergedExtension_merge0(_0_0, extension)); + continue; + } + sources.$indexSet(0, complex, extension); + for (t11 = new A._SyncStarIterator(_this._extension_store$_simpleSelectors$1(complex)._outerHelper()); t11.moveNext$0();) { + t12 = t11._async$_current; + J.add$1$ax(t1.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure3()), extension); + t5.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure4(complex)); + } + if (!t4 || t8) { + if (newExtensions == null) + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t9, t10); + newExtensions.$indexSet(0, complex, extension); + } + } + if (newExtensions == null) + return; + t1 = type$.SimpleSelector_2; + newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension_2); + if (t8) { + additionalExtensions = _this._extension_store$_extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); + if (additionalExtensions != null) + A.mapAddAll20(newExtensionsByTarget, additionalExtensions, t1, t9, t10); + } + if (!t4) + _this._extension_store$_extendExistingSelectors$2(selectors, newExtensionsByTarget); + }, + _extension_store$_simpleSelectors$1(complex) { + return new A._SyncStarIterable(this._simpleSelectors$body$ExtensionStore0(complex), type$._SyncStarIterable_SimpleSelector_2); + }, + _simpleSelectors$body$ExtensionStore0($async$complex) { + var $async$self = this; + return function() { + var complex = $async$complex; + var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3, _i, t4, t5, _i0, simple, _0_2_isSet, _0_2, t6, selector, t7, _i1; + return function $async$_extension_store$_simpleSelectors$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = complex.components, t2 = t1.length, t3 = type$.SelectorList_2, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + t4 = t1[_i].selector.components, t5 = t4.length, _i0 = 0; + case 5: + // for condition + if (!(_i0 < t5)) { + // goto after for + $async$goto = 7; + break; + } + simple = t4[_i0]; + $async$goto = 8; + return $async$iterator._async$_current = simple, 1; + case 8: + // after yield + _0_2_isSet = simple instanceof A.PseudoSelector0; + if (_0_2_isSet) { + _0_2 = simple.selector; + t6 = _0_2 != null; + } else { + _0_2 = null; + t6 = false; + } + $async$goto = t6 ? 9 : 10; + break; + case 9: + // then + selector = _0_2_isSet ? _0_2 : simple.selector; + t6 = (selector == null ? t3._as(selector) : selector).components, t7 = t6.length, _i1 = 0; + case 11: + // for condition + if (!(_i1 < t7)) { + // goto after for + $async$goto = 13; + break; + } + $async$goto = 14; + return $async$iterator._yieldStar$1($async$self._extension_store$_simpleSelectors$1(t6[_i1])); + case 14: + // after yield + case 12: + // for update + ++_i1; + // goto for condition + $async$goto = 11; + break; + case 13: + // after for + case 10: + // join + case 6: + // for update + ++_i0; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + }, + _extension_store$_extendExistingExtensions$2(extensions, newExtensions) { + var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, selectors0, t10, t11, t12, t13, t14, withExtender, _0_0, _i0, _i1; + for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extension_store$_extensionsByExtender, t4 = type$.SimpleSelector_2, t5 = type$.Map_ComplexSelector_Extension_2, t6 = this._extension_store$_extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + extension = t1[_i]; + t7 = t6.$index(0, extension.target); + t7.toString; + selectors = null; + try { + selectors = this._extension_store$_extendComplex$3(extension.extender.selector, newExtensions, extension.mediaContext); + if (selectors == null) + continue; + } catch (exception) { + t8 = A.unwrapException(exception); + if (t8 instanceof A.SassException0) { + error = t8; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withAdditionalSpan$2(extension.extender.selector.span, "target selector"), error, stackTrace); + } else + throw exception; + } + t8 = J.get$first$ax(selectors); + t9 = extension.extender.selector; + if (B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components)) { + t8 = selectors; + t9 = A._arrayInstanceType(t8); + selectors0 = new A.SubListIterable(t8, 1, null, t9._eval$1("SubListIterable<1>")); + selectors0.SubListIterable$3(t8, 1, null, t9._precomputed1); + selectors = selectors0; + } + for (t8 = J.get$iterator$ax(selectors); t8.moveNext$0();) { + t9 = t8.get$current(t8); + t10 = extension; + t11 = t10.target; + t12 = t10.span; + t13 = t10.mediaContext; + t10 = t10.isOptional; + t9.get$specificity(); + t14 = new A.Extender0(t9, false); + withExtender = t14._extension$_extension = new A.Extension0(t14, t11, t13, t10, t12); + _0_0 = t7.$index(0, t9); + if (_0_0 != null) + t7.$indexSet(0, t9, A.MergedExtension_merge0(_0_0, withExtender)); + else { + t7.$indexSet(0, t9, withExtender); + for (t10 = t9.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) + for (t12 = t10[_i0].selector.components, t13 = t12.length, _i1 = 0; _i1 < t13; ++_i1) + J.add$1$ax(t3.putIfAbsent$2(t12[_i1], new A.ExtensionStore__extendExistingExtensions_closure1()), withExtender); + if (newExtensions.containsKey$1(extension.target)) { + if (additionalExtensions == null) + additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); + additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure2()).$indexSet(0, t9, withExtender); + } + } + } + } + return additionalExtensions; + }, + _extension_store$_extendExistingSelectors$2(selectors, newExtensions) { + var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4, t5, t6; + for (t1 = selectors.get$iterator(selectors), t2 = this._extension_store$_mediaContexts; t1.moveNext$0();) { + selector = t1.get$current(t1); + oldValue = selector.value; + try { + selector.value = this._extension_store$_extendList$3(selector.value, newExtensions, t2.$index(0, selector)); + } catch (exception) { + t3 = A.unwrapException(exception); + if (t3 instanceof A.SassException0) { + error = t3; + stackTrace = A.getTraceFromException(exception); + t3 = selector.value.span.message$1(0, ""); + t4 = error._span_exception$_message; + t5 = error; + t6 = J.getInterceptor$z(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + A.throwWithTrace0(new A.SassException0(B.Set_empty, "From " + t3 + "\n" + t4, t5), error, stackTrace); + } else + throw exception; + } + if (oldValue === selector.value) + continue; + this._extension_store$_registerSelector$2(selector.value, selector); + } + }, + addExtensions$1(extensionStores) { + var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, selectorsToExtend, extensionsToExtend, t12, t13, target, newSources, first, extensionsForTarget, t14, selectorsForTarget, t15, _2_0, t16, extender, extension, _this = this, _null = null; + for (t1 = J.get$iterator$ax(extensionStores), t2 = type$.SimpleSelector_2, t3 = type$.Map_ComplexSelector_Extension_2, t4 = _this._extension_store$_extensions, t5 = type$.ComplexSelector_2, t6 = type$.Extension_2, t7 = _this._extension_store$_selectors, t8 = _this._extension_store$_extensionsByExtender, t9 = type$.JSArray_Extension_2, t10 = type$.ModifiableBox_SelectorList_2, t11 = _this._extension_store$_sourceSpecificity, newExtensions = _null, selectorsToExtend = newExtensions, extensionsToExtend = selectorsToExtend; t1.moveNext$0();) { + t12 = t1.get$current(t1); + if (t12.get$isEmpty(t12)) + continue; + t11.addAll$1(0, t12.get$_extension_store$_sourceSpecificity()); + for (t12 = A.MapExtensions_get_pairs0(t12.get$_extension_store$_extensions(), t2, t3), t12 = t12.get$iterator(t12); t12.moveNext$0();) { + t13 = t12.get$current(t12); + target = t13._0; + newSources = t13._1; + if (target instanceof A.PlaceholderSelector0) { + first = target.name.charCodeAt(0); + t13 = first === 45 || first === 95; + } else + t13 = false; + if (t13) + continue; + extensionsForTarget = t8.$index(0, target); + t13 = extensionsForTarget == null; + if (!t13) { + if (extensionsToExtend == null) { + extensionsToExtend = A._setArrayType([], t9); + t14 = extensionsToExtend; + } else + t14 = extensionsToExtend; + B.JSArray_methods.addAll$1(t14, extensionsForTarget); + } + selectorsForTarget = t7.$index(0, target); + t14 = selectorsForTarget != null; + if (t14) { + if (selectorsToExtend == null) { + selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(t10); + t15 = selectorsToExtend; + } else + t15 = selectorsToExtend; + t15.addAll$1(0, selectorsForTarget); + } + _2_0 = t4.$index(0, target); + if (_2_0 != null) + for (t15 = A.MapExtensions_get_pairs0(newSources, t5, t6), t15 = t15.get$iterator(t15); t15.moveNext$0();) { + t16 = t15.get$current(t15); + extender = t16._0; + extension = t16._1; + if (_2_0.containsKey$1(extender)) { + t16 = _2_0.$index(0, extender); + extension = A.MergedExtension_merge0(t16 == null ? t6._as(t16) : t16, extension); + _2_0.$indexSet(0, extender, extension); + } else + _2_0.$indexSet(0, extender, extension); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t16 = newExtensions; + } else + t16 = newExtensions; + J.$indexSet$ax(t16.putIfAbsent$2(target, new A.ExtensionStore_addExtensions_closure0()), extender, extension); + } + } + else { + t15 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t15.addAll$1(0, newSources); + t4.$indexSet(0, target, t15); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t13 = newExtensions; + } else + t13 = newExtensions; + t14 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t14.addAll$1(0, newSources); + t13.$indexSet(0, target, t14); + } + } + } + } + if (newExtensions != null) { + if (extensionsToExtend != null) + _this._extension_store$_extendExistingExtensions$2(extensionsToExtend, newExtensions); + if (selectorsToExtend != null) + _this._extension_store$_extendExistingSelectors$2(selectorsToExtend, newExtensions); + } + }, + _extension_store$_extendList$3(list, extensions, mediaQueryContext) { + var t1, t2, t3, extended, i, complex, result, t4; + for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector_2, extended = null, i = 0; i < t2; ++i) { + complex = t1[i]; + result = this._extension_store$_extendComplex$3(complex, extensions, mediaQueryContext); + if (result == null) { + if (extended != null) + extended.push(complex); + } else { + if (extended == null) + if (i === 0) + extended = A._setArrayType([], t3); + else { + t4 = B.JSArray_methods.sublist$2(t1, 0, i); + extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + } + B.JSArray_methods.addAll$1(extended, result); + } + } + if (extended == null) + return list; + t1 = this._extension_store$_originals; + return A.SelectorList$0(this._extension_store$_trim$2(extended, t1.get$contains(t1)), list.span); + }, + _extension_store$_extendList$2(list, extensions) { + return this._extension_store$_extendList$3(list, extensions, null); + }, + _extension_store$_extendComplex$3(complex, extensions, mediaQueryContext) { + var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, extendedNotExpanded, i, component, extended, t11, t12, t13, t14, _box_0 = {}, + t1 = complex.leadingCombinators, + t2 = t1.length; + if (t2 > 1) + return null; + isOriginal = this._extension_store$_originals.contains$1(0, complex); + for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector_2, t6 = complex.lineBreak, t7 = !t6, t8 = complex.span, t9 = type$.JSArray_ComplexSelector_2, t2 = t2 === 0, t10 = type$.JSArray_ComplexSelectorComponent_2, extendedNotExpanded = null, i = 0; i < t4; ++i) { + component = t3[i]; + extended = this._extension_store$_extendCompound$4$inOriginal(component, extensions, mediaQueryContext, isOriginal); + if (extended == null) { + if (extendedNotExpanded != null) + extendedNotExpanded.push(A._setArrayType([A.ComplexSelector$0(B.List_empty14, A._setArrayType([component], t10), t8, t6)], t9)); + } else if (extendedNotExpanded != null) + extendedNotExpanded.push(extended); + else if (i !== 0) { + t11 = A._arrayInstanceType(t3); + t12 = new A.SubListIterable(t3, 0, i, t11._eval$1("SubListIterable<1>")); + t12.SubListIterable$3(t3, 0, i, t11._precomputed1); + extendedNotExpanded = A._setArrayType([A._setArrayType([A.ComplexSelector$0(t1, t12, t8, t6)], t9), extended], t5); + } else if (t2) + extendedNotExpanded = A._setArrayType([extended], t5); + else { + t11 = A._setArrayType([], t9); + for (t12 = J.get$iterator$ax(extended); t12.moveNext$0();) { + t13 = t12.get$current(t12); + t14 = t13.leadingCombinators; + if (t14.length === 0 || B.C_ListEquality.equals$2(0, t1, t14)) { + t14 = t13.components; + t11.push(A.ComplexSelector$0(t1, t14, t8, !t7 || t13.lineBreak)); + } + } + extendedNotExpanded = A._setArrayType([t11], t5); + } + } + if (extendedNotExpanded == null) + return null; + _box_0.first = true; + t1 = type$.ComplexSelector_2; + t1 = J.expand$1$1$ax(A.paths0(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure0(_box_0, this, complex), t1); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + _extension_store$_extendCompound$4$inOriginal(component, extensions, mediaQueryContext, inOriginal) { + var t3, t4, t5, t6, t7, t8, t9, t10, t11, options, i, simple, extended, t12, result, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, + t1 = _this._extension_store$_mode, + targetsUsed = t1 === B.ExtendMode_normal_normal0 || extensions.__js_helper$_length < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2), + t2 = component.selector, + simples = t2.components; + for (t3 = simples.length, t4 = type$.JSArray_List_Extender_2, t5 = type$.JSArray_Extender_2, t6 = type$.CssValue_Combinator_2, t7 = type$.JSArray_ComplexSelectorComponent_2, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = component.span, t11 = type$.SimpleSelector_2, options = _null, i = 0; i < t3; ++i) { + simple = simples[i]; + extended = _this._extension_store$_extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed); + if (extended == null) { + if (options != null) + options.push(A._setArrayType([_this._extension_store$_extenderForSimple$1(simple)], t5)); + } else { + if (options == null) { + options = A._setArrayType([], t4); + if (i !== 0) { + t12 = new A.SubListIterable(simples, 0, i, t8); + t12.SubListIterable$3(simples, 0, i, t9); + result = A.List_List$from(t12, false, t11); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = result; + compound = new A.CompoundSelector0(t12, t10); + if (t12.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", _null)); + result = A.List_List$from(B.List_empty14, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t12 = A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(compound, result, t10)], t7), t10, false); + _this._extension_store$_sourceSpecificityFor$1(compound); + options.push(A._setArrayType([new A.Extender0(t12, true)], t5)); + } + } + B.JSArray_methods.addAll$1(options, extended); + } + } + if (options == null) + return _null; + if (targetsUsed != null && targetsUsed._collection$_length !== extensions.__js_helper$_length) + return _null; + if (options.length === 1) { + for (t1 = J.get$iterator$ax(options[0]), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector_2, result = _null; t1.moveNext$0();) { + t4 = t1.get$current(t1); + t4.assertCompatibleMediaContext$1(mediaQueryContext); + complex = t4.selector.withAdditionalCombinators$1(t2); + if (complex.accept$1(B.C__IsUselessVisitor0)) + continue; + if (result == null) + result = A._setArrayType([], t3); + result.push(complex); + } + return result; + } + extenderPaths = A.paths0(options, type$.Extender_2); + t3 = A._setArrayType([], type$.JSArray_ComplexSelector_2); + t1 = t1 === B.ExtendMode_replace_replace0; + t4 = !t1; + if (t4) + t3.push(A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure2(), t11), t2.span), A.List_List$unmodifiable(component.combinators, t6), t10)], t7), t10, false)); + t2 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); + t5 = t2.$ti; + t2 = new A.ListIterator(t2, t2.get$length(0), t5._eval$1("ListIterator")); + t6 = component.combinators; + t5 = t5._eval$1("ListIterable.E"); + for (; t2.moveNext$0();) { + t1 = t2.__internal$_current; + extended = _this._extension_store$_unifyExtenders$3(t1 == null ? t5._as(t1) : t1, mediaQueryContext, t10); + if (extended == null) + continue; + for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { + withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t6); + if (!withCombinators.accept$1(B.C__IsUselessVisitor0)) + t3.push(withCombinators); + } + } + isOriginal = new A.ExtensionStore__extendCompound_closure3(); + return _this._extension_store$_trim$2(t3, inOriginal && t4 ? new A.ExtensionStore__extendCompound_closure4(B.JSArray_methods.get$first(t3)) : isOriginal); + }, + _extension_store$_unifyExtenders$3(extenders, mediaQueryContext, span) { + var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, + toUnify = A.QueueList$(_null, type$.ComplexSelector_2); + for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector_2, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (t4.isOriginal) { + if (originals == null) + originals = A._setArrayType([], t3); + t4 = t4.selector; + B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); + originalsLineBreak = originalsLineBreak || t4.lineBreak; + } else { + t4 = t4.selector; + if (t4.accept$1(B.C__IsUselessVisitor0)) + return _null; + else + toUnify._queue_list$_add$1(t4); + } + } + if (originals != null) + toUnify.addFirst$1(A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(originals, span), A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2), span, originalsLineBreak)); + complexes = A.unifyComplex0(toUnify, span); + if (complexes == null) + return _null; + for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) + t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); + return complexes; + }, + _extension_store$_extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed) { + var t2, _1_0, + t1 = new A.ExtensionStore__extendSimple_withoutPseudo0(this, extensions, targetsUsed); + if (simple instanceof A.PseudoSelector0) + t2 = simple.selector != null; + else + t2 = false; + if (t2) { + _1_0 = this._extension_store$_extendPseudo$3(simple, extensions, mediaQueryContext); + if (_1_0 != null) + return new A.MappedListIterable(_1_0, new A.ExtensionStore__extendSimple_closure1(this, t1), A._arrayInstanceType(_1_0)._eval$1("MappedListIterable<1,List>")); + } + return A.NullableExtension_andThen0(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure2()); + }, + _extension_store$_extenderForSimple$1(simple) { + var t1 = simple.span; + t1 = A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([simple], type$.JSArray_SimpleSelector_2), t1), A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), t1)], type$.JSArray_ComplexSelectorComponent_2), t1, false); + this._extension_store$_sourceSpecificity.$index(0, simple); + return new A.Extender0(t1, true); + }, + _extension_store$_extendPseudo$3(pseudo, extensions, mediaQueryContext) { + var extended, complexes, t1, result, + selector = pseudo.selector; + if (selector == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); + extended = this._extension_store$_extendList$3(selector, extensions, mediaQueryContext); + if (extended === selector) + return null; + complexes = extended.components; + t1 = pseudo.normalizedName === "not"; + if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure4()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure5())) + complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure6(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); + complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure7(pseudo), type$.ComplexSelector_2); + if (t1 && selector.components.length === 1) { + t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure8(pseudo, selector), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector_2); + result = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); + return result.length === 0 ? null : result; + } else + return A._setArrayType([pseudo.withSelector$1(A.SelectorList$0(complexes, selector.span))], type$.JSArray_PseudoSelector_2); + }, + _extension_store$_trim$2(selectors, isOriginal) { + var i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity, + result = A.QueueList$(null, type$.ComplexSelector_2); + $label0$0: + for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { + _box_0 = {}; + complex1 = selectors[i]; + if (isOriginal.call$1(complex1)) { + for (j = 0; j < numOriginals; ++j) + if (J.$eq$(result.$index(0, j), complex1)) { + A.rotateSlice0(result, 0, j + 1); + continue $label0$0; + } + ++numOriginals; + result.addFirst$1(complex1); + continue $label0$0; + } + _box_0.maxSpecificity = 0; + for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { + maxSpecificity = Math.max(t5, this._extension_store$_sourceSpecificityFor$1(t3[_i].selector)); + _box_0.maxSpecificity = maxSpecificity; + } + if (result.any$1(result, new A.ExtensionStore__trim_closure1(_box_0, complex1))) + continue $label0$0; + t3 = new A.SubListIterable(selectors, 0, i, t1); + t3.SubListIterable$3(selectors, 0, i, t2); + if (t3.any$1(0, new A.ExtensionStore__trim_closure2(_box_0, complex1))) + continue $label0$0; + result.addFirst$1(complex1); + } + return result; + }, + _extension_store$_sourceSpecificityFor$1(compound) { + var t1, t2, t3, specificity, _i, t4; + for (t1 = compound.components, t2 = t1.length, t3 = this._extension_store$_sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { + t4 = t3.$index(0, t1[_i]); + specificity = Math.max(specificity, A.checkNum(t4 == null ? 0 : t4)); + } + return specificity; + }, + clone$0() { + var t2, t3, t4, _this = this, + t1 = type$.SimpleSelector_2, + newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), + newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), + oldToNewSelectors = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList_2); + _this._extension_store$_selectors.forEach$1(0, new A.ExtensionStore_clone_closure0(_this, newSelectors, oldToNewSelectors, newMediaContexts)); + t2 = type$.Extension_2; + t3 = A.copyMapOfMap0(_this._extension_store$_extensions, t1, type$.ComplexSelector_2, t2); + t2 = A.copyMapOfList0(_this._extension_store$_extensionsByExtender, t1, t2); + t1 = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2); + t1.addAll$1(0, _this._extension_store$_sourceSpecificity); + t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2); + t4.addAll$1(0, _this._extension_store$_originals); + return new A._Record_2(new A.ExtensionStore0(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_normal0), oldToNewSelectors); + }, + get$_extension_store$_extensions() { + return this._extension_store$_extensions; + }, + get$_extension_store$_sourceSpecificity() { + return this._extension_store$_sourceSpecificity; + } + }; + A.ExtensionStore_extensionsWhereTarget_closure0.prototype = { + call$1(extension) { + return !extension.isOptional; + }, + $signature: 465 + }; + A.ExtensionStore__registerSelector_closure0.prototype = { + call$0() { + return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList_2); + }, + $signature: 466 + }; + A.ExtensionStore_addExtension_closure2.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 130 + }; + A.ExtensionStore_addExtension_closure3.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension_2); + }, + $signature: 240 + }; + A.ExtensionStore_addExtension_closure4.prototype = { + call$0() { + return this.complex.get$specificity(); + }, + $signature: 10 + }; + A.ExtensionStore__extendExistingExtensions_closure1.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension_2); + }, + $signature: 240 + }; + A.ExtensionStore__extendExistingExtensions_closure2.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 130 + }; + A.ExtensionStore_addExtensions_closure0.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 130 + }; + A.ExtensionStore__extendComplex_closure0.prototype = { + call$1(path) { + var t1 = this.complex; + return J.map$1$1$ax(A.weave0(path, t1.span, t1.lineBreak), new A.ExtensionStore__extendComplex__closure0(this._box_0, this.$this, t1), type$.ComplexSelector_2); + }, + $signature: 469 + }; + A.ExtensionStore__extendComplex__closure0.prototype = { + call$1(outputComplex) { + var _this = this, + t1 = _this._box_0; + if (t1.first && _this.$this._extension_store$_originals.contains$1(0, _this.complex)) + _this.$this._extension_store$_originals.add$1(0, outputComplex); + t1.first = false; + return outputComplex; + }, + $signature: 61 + }; + A.ExtensionStore__extendCompound_closure2.prototype = { + call$1(extender) { + return B.JSArray_methods.get$last(extender.selector.components).selector.components; + }, + $signature: 471 + }; + A.ExtensionStore__extendCompound_closure3.prototype = { + call$1(_) { + return false; + }, + $signature: 20 + }; + A.ExtensionStore__extendCompound_closure4.prototype = { + call$1(complex) { + return complex.$eq(0, this.original); + }, + $signature: 20 + }; + A.ExtensionStore__extendSimple_withoutPseudo0.prototype = { + call$1(simple) { + var t1, t2, + extensionsForSimple = this.extensions.$index(0, simple); + if (extensionsForSimple == null) + return null; + t1 = this.targetsUsed; + if (t1 != null) + t1.add$1(0, simple); + t1 = A._setArrayType([], type$.JSArray_Extender_2); + t2 = this.$this; + if (t2._extension_store$_mode !== B.ExtendMode_replace_replace0) + t1.push(t2._extension_store$_extenderForSimple$1(simple)); + for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(t2).extender); + return t1; + }, + $signature: 472 + }; + A.ExtensionStore__extendSimple_closure1.prototype = { + call$1(pseudo) { + var t1 = this.withoutPseudo.call$1(pseudo); + return t1 == null ? A._setArrayType([this.$this._extension_store$_extenderForSimple$1(pseudo)], type$.JSArray_Extender_2) : t1; + }, + $signature: 473 + }; + A.ExtensionStore__extendSimple_closure2.prototype = { + call$1(result) { + return A._setArrayType([result], type$.JSArray_List_Extender_2); + }, + $signature: 474 + }; + A.ExtensionStore__extendPseudo_closure4.prototype = { + call$1(complex) { + return complex.components.length > 1; + }, + $signature: 20 + }; + A.ExtensionStore__extendPseudo_closure5.prototype = { + call$1(complex) { + return complex.components.length === 1; + }, + $signature: 20 + }; + A.ExtensionStore__extendPseudo_closure6.prototype = { + call$1(complex) { + return complex.components.length <= 1; + }, + $signature: 20 + }; + A.ExtensionStore__extendPseudo_closure7.prototype = { + call$1(complex) { + var innerPseudo, innerSelector, + t1 = complex.get$singleCompound(); + if (t1 == null) + innerPseudo = null; + else { + t1 = t1.components; + innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; + } + if (!(innerPseudo instanceof A.PseudoSelector0)) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + innerSelector = innerPseudo.selector; + if (innerSelector == null) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + t1 = this.pseudo; + switch (t1.normalizedName) { + case "not": + if (!B.Set_mlzm2.contains$1(0, innerPseudo.normalizedName)) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + return innerSelector.components; + case "is": + case "matches": + case "where": + case "any": + case "current": + case "nth-child": + case "nth-last-child": + if (innerPseudo.name !== t1.name) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + if (innerPseudo.argument != t1.argument) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + return innerSelector.components; + case "has": + case "host": + case "host-context": + case "slotted": + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + default: + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + } + }, + $signature: 475 + }; + A.ExtensionStore__extendPseudo_closure8.prototype = { + call$1(complex) { + return this.pseudo.withSelector$1(A.SelectorList$0(A._setArrayType([complex], type$.JSArray_ComplexSelector_2), this.selector.span)); + }, + $signature: 476 + }; + A.ExtensionStore__trim_closure1.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 20 + }; + A.ExtensionStore__trim_closure2.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 20 + }; + A.ExtensionStore_clone_closure0.prototype = { + call$2(simple, selectors) { + var t2, t3, t4, t5, t6, t7, newSelector, _0_0, _this = this, + t1 = type$.ModifiableBox_SelectorList_2, + newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(t1); + _this.newSelectors.$indexSet(0, simple, newSelectorSet); + for (t2 = selectors.get$iterator(selectors), t3 = _this.oldToNewSelectors, t4 = type$.Box_SelectorList_2, t5 = _this.$this._extension_store$_mediaContexts, t6 = _this.newMediaContexts; t2.moveNext$0();) { + t7 = t2.get$current(t2); + newSelector = new A.ModifiableBox0(t7.value, t1); + newSelectorSet.add$1(0, newSelector); + t3.$indexSet(0, t7.value, new A.Box0(newSelector, t4)); + _0_0 = t5.$index(0, t7); + if (_0_0 != null) + t6.$indexSet(0, newSelector, _0_0); + } + }, + $signature: 477 + }; + A.FiberClass.prototype = {}; + A.Fiber.prototype = {}; + A.JSToDartFileImporter.prototype = { + canonicalize$1(_, url) { + var result, t1, resultUrl; + if (url.get$scheme() === "file") + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); + result = A.wrapJSExceptions(new A.JSToDartFileImporter_canonicalize_closure(this, url)); + if (result == null) + return null; + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The findFileUrl() function can't return a Promise for synchron compile functions.")); + else { + t1 = self.URL; + if (!(result instanceof t1)) + A.jsThrow(new self.Error(string$.The_fie)); + } + resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + if (resultUrl.get$scheme() !== "file") + A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, resultUrl); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd0().load$1(0, url); + }, + isNonCanonicalScheme$1(scheme) { + return scheme !== "file"; + } + }; + A.JSToDartFileImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._file0$_findFileUrl.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 35 + }; + A.FilesystemImporter0.prototype = { + canonicalize$1(_, url) { + var resolved; + if (url.get$scheme() === "file") + resolved = A.resolveImportPath0($.$get$context().style.pathFromUri$1(A._parseUri(url))); + else if (url.get$scheme() !== "") + return null; + else { + resolved = A.resolveImportPath0(A.join(this._filesystem$_loadPath, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)); + if (resolved != null && this._filesystem$_loadPathDeprecated) + A.warnForDeprecation0(string$.Using_t, B.Deprecation_kmo); + } + return A.NullableExtension_andThen0(resolved, new A.FilesystemImporter_canonicalize_closure0()); + }, + load$1(_, url) { + var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)); + return A.ImporterResult$(A.readFile0(path), url, A.Syntax_forPath0(path)); + }, + toString$0(_) { + return this._filesystem$_loadPath; + } + }; + A.FilesystemImporter_canonicalize_closure0.prototype = { + call$1(resolved) { + var t2, t0, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (t1) { + t1 = $.$get$context(); + t2 = A._realCasePath0(A.absolute(t1.normalize$1(resolved), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); + t0 = t2; + t2 = t1; + t1 = t0; + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, resolved); + t0 = t2; + t2 = t1; + t1 = t0; + } + return t2.toUri$1(t1); + }, + $signature: 122 + }; + A.ForRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitForRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.from.toString$0(0), + t2 = _this.isExclusive ? "to" : "through", + t3 = _this.children; + return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + (t3 && B.JSArray_methods).join$1(t3, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitForwardRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, prefix, _this = this, + t1 = "@forward " + A.StringExpression_quoteText0(_this.url.toString$0(0)), + shownMixinsAndFunctions = _this.shownMixinsAndFunctions, + hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; + if (shownMixinsAndFunctions != null) { + t2 = _this.shownVariables; + t2.toString; + t2 = t1 + " show " + _this._forward_rule0$_memberList$2(shownMixinsAndFunctions, t2); + t1 = t2; + } else if (hiddenMixinsAndFunctions != null && hiddenMixinsAndFunctions._base.get$isNotEmpty(0)) { + t2 = _this.hiddenVariables; + t2.toString; + t2 = t1 + " hide " + _this._forward_rule0$_memberList$2(hiddenMixinsAndFunctions, t2); + t1 = t2; + } + prefix = _this.prefix; + if (prefix != null) + t1 += " as " + prefix + "*"; + t2 = _this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _forward_rule0$_memberList$2(mixinsAndFunctions, variables) { + var t2, + t1 = A.List_List$of(mixinsAndFunctions, true, type$.String); + for (t2 = variables._base.get$iterator(0); t2.moveNext$0();) + t1.push("$" + t2.get$current(0)); + return B.JSArray_methods.join$1(t1, ", "); + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardedModuleView0.prototype = { + get$url(_) { + var t1 = this._forwarded_view0$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._forwarded_view0$_inner.get$upstream(); + }, + get$extensionStore() { + return this._forwarded_view0$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._forwarded_view0$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._forwarded_view0$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._forwarded_view0$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._forwarded_view0$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + var t2, _1_0, _2_0, + _s19_ = "Undefined variable.", + t1 = this._forwarded_view0$_rule, + _0_0 = t1.shownVariables; + if (_0_0 != null) + t2 = !_0_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + else { + _1_0 = t1.hiddenVariables; + if (_1_0 != null) + t2 = _1_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + } + _2_0 = t1.prefix; + if (_2_0 != null) { + if (!B.JSString_methods.startsWith$1($name, _2_0)) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + $name = B.JSString_methods.substring$1($name, _2_0.length); + } + return this._forwarded_view0$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + var _0_0 = this._forwarded_view0$_rule.prefix; + if (_0_0 != null) + $name = B.JSString_methods.substring$1($name, _0_0.length); + return this._forwarded_view0$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ForwardedModuleView0 && this._forwarded_view0$_inner.$eq(0, other._forwarded_view0$_inner) && this._forwarded_view0$_rule === other._forwarded_view0$_rule; + }, + get$hashCode(_) { + var t1 = this._forwarded_view0$_inner; + return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._forwarded_view0$_rule)) >>> 0; + }, + cloneCss$0() { + return A.ForwardedModuleView$0(this._forwarded_view0$_inner.cloneCss$0(), this._forwarded_view0$_rule, this.$ti._precomputed1); + }, + toString$0(_) { + return "forwarded " + this._forwarded_view0$_inner.toString$0(0); + }, + $isModule1: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.FunctionExpression0.prototype = { + get$nameSpan() { + if (this.namespace == null) + return A.SpanExtensions_initialIdentifier0(this.span); + return A.SpanExtensions_initialIdentifier0(A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier0(this.span), 1, null)); + }, + accept$1$1(visitor) { + return visitor.visitFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += this.originalName + this.$arguments.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.JSFunction0.prototype = {}; + A.SupportsFunction0.prototype = { + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.functionClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassFunction", new A.functionClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(new A.SassFunction0(A.BuiltInCallable$function0("f", "", new A.functionClass__closure0(), null)).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.functionClass__closure.prototype = { + call$3($self, signature, callback) { + var paren = B.JSString_methods.indexOf$1(signature, "("); + if (paren === -1 || !B.JSString_methods.endsWith$1(signature, ")")) + A.jsThrow(new self.Error('Invalid signature for new sass.SassFunction(): "' + signature + '"')); + return new A.SassFunction0(A.BuiltInCallable$function0(B.JSString_methods.substring$2(signature, 0, paren), B.JSString_methods.substring$2(signature, paren + 1, signature.length - 1), callback, null)); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 478 + }; + A.functionClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 3 + }; + A.SassFunction0.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._serialize0$_inspect) + A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize0$_buffer; + t1.write$1(0, "get-function("); + t2 = this.callable; + visitor._serialize0$_visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertFunction$1($name) { + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassFunction0 && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.FunctionRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@function " + this.name + "(" + this.$arguments.toString$0(0) + ") {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + } + }; + A.unifyComplex_closure0.prototype = { + call$1(complex) { + return complex.lineBreak; + }, + $signature: 20 + }; + A._weaveParents_closure3.prototype = { + call$2(group1, group2) { + var t1, unified; + if (B.C_ListEquality.equals$2(0, group1, group2)) + return group1; + if (A._complexIsParentSuperselector0(group1, group2)) + return group2; + if (A._complexIsParentSuperselector0(group2, group1)) + return group1; + if (!A._mustUnify0(group1, group2)) + return null; + t1 = this.span; + unified = A.unifyComplex0(A._setArrayType([A.ComplexSelector$0(B.List_empty14, group1, t1, false), A.ComplexSelector$0(B.List_empty14, group2, t1, false)], type$.JSArray_ComplexSelector_2), t1); + if (unified == null) + t1 = null; + else { + t1 = A.IterableExtension_get_singleOrNull(unified); + t1 = t1 == null ? null : t1.components; + } + return t1; + }, + $signature: 479 + }; + A._weaveParents_closure4.prototype = { + call$1(sequence) { + return A._complexIsParentSuperselector0(sequence.get$first(sequence), this.group); + }, + $signature: 242 + }; + A._weaveParents_closure5.prototype = { + call$1(sequence) { + return sequence.get$length(0) === 0; + }, + $signature: 242 + }; + A._weaveParents_closure6.prototype = { + call$1(choice) { + return J.get$isNotEmpty$asx(choice); + }, + $signature: 481 + }; + A._mustUnify_closure0.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure0(this.uniqueSelectors)); + }, + $signature: 52 + }; + A._mustUnify__closure0.prototype = { + call$1(simple) { + var t1; + if (!(simple instanceof A.IDSelector0)) + t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; + else + t1 = true; + return t1 && this.uniqueSelectors.contains$1(0, simple); + }, + $signature: 14 + }; + A.paths_closure0.prototype = { + call$2(paths, choice) { + var t1 = this.T; + t1 = J.expand$1$1$ax(choice, new A.paths__closure0(paths, t1), t1._eval$1("List<0>")); + return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); + }, + $signature() { + return this.T._eval$1("List>(List>,List<0>)"); + } + }; + A.paths__closure0.prototype = { + call$1(option) { + var t1 = this.T; + return J.map$1$1$ax(this.paths, new A.paths___closure0(option, t1), t1._eval$1("List<0>")); + }, + $signature() { + return this.T._eval$1("Iterable>(0)"); + } + }; + A.paths___closure0.prototype = { + call$1(path) { + var t1 = A.List_List$of(path, true, this.T); + t1.push(this.option); + return t1; + }, + $signature() { + return this.T._eval$1("List<0>(List<0>)"); + } + }; + A.listIsSuperselector_closure0.prototype = { + call$1(complex1) { + return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure0(complex1)); + }, + $signature: 20 + }; + A.listIsSuperselector__closure0.prototype = { + call$1(complex2) { + return complex2.isSuperselector$1(this.complex1); + }, + $signature: 20 + }; + A.complexIsSuperselector_closure1.prototype = { + call$1($parent) { + return $parent.combinators.length > 1; + }, + $signature: 52 + }; + A.complexIsSuperselector_closure2.prototype = { + call$1(component) { + return A._isSupercombinator0(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); + }, + $signature: 52 + }; + A._compatibleWithPreviousCombinator_closure0.prototype = { + call$1(component) { + var t1 = component.combinators, + t2 = A.IterableExtension_get_firstOrNull(t1); + if (!J.$eq$(t2 == null ? null : t2.value, B.Combinator_y180)) { + t1 = A.IterableExtension_get_firstOrNull(t1); + t1 = J.$eq$(t1 == null ? null : t1.value, B.Combinator_gRV0); + } else + t1 = true; + return t1; + }, + $signature: 52 + }; + A.compoundIsSuperselector_closure0.prototype = { + call$1(simple1) { + return B.JSArray_methods.any$1(this.compound2.components, simple1.get$isSuperselector()); + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector_closure6.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 72 + }; + A._selectorPseudoIsSuperselector_closure7.prototype = { + call$1(complex1) { + var t1, t2; + if (complex1.leadingCombinators.length === 0) { + t1 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); + t2 = this.parents; + if (t2 != null) + B.JSArray_methods.addAll$1(t1, t2); + t2 = this.compound2; + t1.push(new A.ComplexSelectorComponent0(t2, A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), t2.span)); + t1 = A.complexIsSuperselector0(complex1.components, t1); + } else + t1 = false; + return t1; + }, + $signature: 20 + }; + A._selectorPseudoIsSuperselector_closure8.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 72 + }; + A._selectorPseudoIsSuperselector_closure9.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 72 + }; + A._selectorPseudoIsSuperselector_closure10.prototype = { + call$1(complex) { + if (complex.accept$1(B._IsBogusVisitor_true0)) + return false; + return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure0(complex, this.pseudo1)); + }, + $signature: 20 + }; + A._selectorPseudoIsSuperselector__closure0.prototype = { + call$1(simple2) { + var t1, selector2, _0_4, _this = this; + $label0$1: { + if (simple2 instanceof A.TypeSelector0) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure1(simple2)); + break $label0$1; + } + if (simple2 instanceof A.IDSelector0) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure2(simple2)); + break $label0$1; + } + selector2 = null; + t1 = false; + if (simple2 instanceof A.PseudoSelector0) { + _0_4 = simple2.selector; + if (_0_4 != null) { + selector2 = _0_4 == null ? type$.SelectorList_2._as(_0_4) : _0_4; + t1 = simple2.name === _this.pseudo1.name; + } + } + if (t1) { + t1 = A.listIsSuperselector0(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector_2)); + break $label0$1; + } + t1 = false; + break $label0$1; + } + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector___closure1.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.TypeSelector0) { + t1 = this.simple2; + t1 = !(t1 instanceof A.TypeSelector0 && t1.name.$eq(0, simple1.name)); + } else + t1 = false; + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector___closure2.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.IDSelector0) { + t1 = this.simple2; + t1 = !(t1 instanceof A.IDSelector0 && t1.name === simple1.name); + } else + t1 = false; + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector_closure11.prototype = { + call$1(selector2) { + var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); + return t1; + }, + $signature: 72 + }; + A._selectorPseudoIsSuperselector_closure12.prototype = { + call$1(pseudo2) { + var t1, selector2; + if (!(pseudo2 instanceof A.PseudoSelector0)) + return false; + t1 = this.pseudo1; + if (pseudo2.name !== t1.name) + return false; + if (pseudo2.argument != t1.argument) + return false; + selector2 = pseudo2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 14 + }; + A._selectorPseudoArgs_closure1.prototype = { + call$1(pseudo) { + return pseudo.isClass === this.isClass && pseudo.name === this.name; + }, + $signature: 483 + }; + A._selectorPseudoArgs_closure2.prototype = { + call$1(pseudo) { + return pseudo.selector; + }, + $signature: 484 + }; + A.globalFunctions_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); + }, + $signature: 3 + }; + A.GamutMapMethod0.prototype = { + toString$0(_) { + return this.name; + } + }; + A.HslColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, saturation, lightness, alpha) { + var t1 = hue == null, + scaledHue = B.JSNumber_methods.$mod((t1 ? 0 : hue) / 360, 1), + t2 = saturation == null, + scaledSaturation = (t2 ? 0 : saturation) / 100, + t3 = lightness == null, + scaledLightness = (t3 ? 0 : lightness) / 100, + m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, + m1 = scaledLightness * 2 - m2; + return B.SrgbColorSpace_AD40.convert$8$missingChroma$missingHue$missingLightness(dest, A.hueToRgb0(m1, m2, scaledHue + 0.3333333333333333), A.hueToRgb0(m1, m2, scaledHue), A.hueToRgb0(m1, m2, scaledHue - 0.3333333333333333), alpha, t2, t1, t3); + } + }; + A.HwbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, whiteness, blackness, alpha) { + var t3, t1 = {}, + t2 = hue == null, + scaledHue = B.JSNumber_methods.$mod(t2 ? 0 : hue, 360) / 360, + scaledWhiteness = t1.scaledWhiteness = (whiteness == null ? 0 : whiteness) / 100, + scaledBlackness = (blackness == null ? 0 : blackness) / 100, + sum = scaledWhiteness + scaledBlackness; + if (sum > 1) { + t3 = t1.scaledWhiteness = scaledWhiteness / sum; + scaledBlackness /= sum; + } else + t3 = scaledWhiteness; + t3 = new A.HwbColorSpace_convert_toRgb0(t1, 1 - t3 - scaledBlackness); + return B.SrgbColorSpace_AD40.convert$6$missingHue(dest, t3.call$1(scaledHue + 0.3333333333333333), t3.call$1(scaledHue), t3.call$1(scaledHue - 0.3333333333333333), alpha, t2); + } + }; + A.HwbColorSpace_convert_toRgb0.prototype = { + call$1(hue) { + return A.hueToRgb0(0, 1, hue) * this.factor + this._box_0.scaledWhiteness; + }, + $signature: 16 + }; + A.IDSelector0.prototype = { + get$specificity() { + return A._asInt(Math.pow(A.SimpleSelector0.prototype.get$specificity.call(this), 2)); + }, + accept$1$1(visitor) { + return visitor.visitIDSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.IDSelector0(this.name + suffix, this.span); + }, + unify$1(compound) { + if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure0(this))) + return null; + return this.super$SimpleSelector$unify0(compound); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.IDSelector0 && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.IDSelector_unify_closure0.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.IDSelector0) + t1 = this.$this.name !== simple.name; + else + t1 = false; + return t1; + }, + $signature: 14 + }; + A.IfExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitIfExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "if" + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.IfRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitIfRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure0(), type$.IfClause_2, type$.String).join$1(0, " "), + lastClause = this.lastClause; + return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfRule_toString_closure0.prototype = { + call$2(index, clause) { + var t1 = index === 0 ? "if" : "else if"; + return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; + }, + $signature: 485 + }; + A.IfRuleClause0.prototype = {}; + A.IfRuleClause$__closure0.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration0 || child instanceof A.FunctionRule0 || child instanceof A.MixinRule0) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule0) { + t1 = B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure0()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 243 + }; + A.IfRuleClause$___closure0.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport0; + }, + $signature: 244 + }; + A.IfClause0.prototype = { + toString$0(_) { + return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ElseClause0.prototype = { + toString$0(_) { + return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ImmutableList0.prototype = {}; + A.ImmutableMap0.prototype = {}; + A.immutableMapToDartMap_closure.prototype = { + call$3(value, key, _) { + this.dartMap.$indexSet(0, key, value); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 488 + }; + A.NodeImporter.prototype = { + loadRelative$3(url, previous, forImport) { + var t1, t2, _null = null; + if ($.$get$url().style.rootLength$1(url) > 0) { + if (!B.JSString_methods.startsWith$1(url, "/") && !B.JSString_methods.startsWith$1(url, "file:")) + return _null; + return this._tryPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport); + } + if ((previous == null ? _null : previous.get$scheme()) !== "file") + return _null; + t1 = $.$get$context(); + previous.toString; + t2 = t1.style; + return this._tryPath$2(A.join(t1.dirname$1(t2.pathFromUri$1(A._parseUri(previous))), t2.pathFromUri$1(A._parseUri(url)), _null), forImport); + }, + load$3(_, url, previous, forImport) { + var t1, t2, _i, _0_0, _this = this, + previousString = _this._previousToString$1(previous); + for (t1 = _this._implementation$_importers, t2 = t1.length, _i = 0; _i < t2; ++_i) { + _0_0 = A.wrapJSExceptions(new A.NodeImporter_load_closure(_this, t1[_i], forImport, url, previousString)); + if (_0_0 != null) + return _this._handleImportResult$4(url, previous, _0_0, forImport); + } + return _this._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); + }, + loadAsync$3(url, previous, forImport) { + return this.loadAsync$body$NodeImporter(url, previous, forImport); + }, + loadAsync$body$NodeImporter(url, previous, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_2_String_and_String), + $async$returnValue, $async$self = this, t1, t2, _i, _0_0, previousString; + var $async$loadAsync$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + previousString = $async$self._previousToString$1(previous); + t1 = $async$self._implementation$_importers, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait($async$self._callImporterAsync$4(t1[_i], url, previousString, forImport), $async$loadAsync$3); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = $async$self._handleImportResult$4(url, previous, _0_0, forImport); + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = $async$self._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$loadAsync$3, $async$completer); + }, + _previousToString$1(previous) { + var t1; + $label0$0: { + if (previous == null) { + t1 = "stdin"; + break $label0$0; + } + if ("file" === previous.get$scheme()) { + t1 = $.$get$context().style.pathFromUri$1(A._parseUri(previous)); + break $label0$0; + } + t1 = previous.toString$0(0); + break $label0$0; + } + return t1; + }, + _resolveLoadPathFromUrl$2(url, forImport) { + return url.get$scheme() === "" || url.get$scheme() === "file" ? this._resolveLoadPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport) : null; + }, + _resolveLoadPath$2(path, forImport) { + var t1, t2, _i, t3, _1_0, _null = null, + _0_0 = this._tryPath$2(A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), forImport); + if (_0_0 != null) + return _0_0; + for (t1 = this._includePaths, t2 = t1.length, _i = 0; _i < t2; ++_i) { + t3 = A.join(t1[_i], path, _null); + _1_0 = this._tryPath$2($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), forImport); + if (_1_0 != null) + return _1_0; + } + return _null; + }, + _tryPath$2(path, forImport) { + var t1 = forImport ? A.inImportRule(new A.NodeImporter__tryPath_closure(path), type$.nullable_String) : A.resolveImportPath0(path); + return A.NullableExtension_andThen0(t1, new A.NodeImporter__tryPath_closure0()); + }, + _handleImportResult$4(url, previous, value, forImport) { + var t1, file, contents, t2, resolved; + if (value instanceof self.Error) + throw A.wrapException(value); + if (!type$.NodeImporterResult._is(value)) + return null; + t1 = J.getInterceptor$x(value); + file = t1.get$file(value); + contents = t1.get$contents(value); + t1 = contents == null; + t2 = !t1; + if (t2 && A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") + A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); + if (file == null) + return new A._Record_2(t1 ? "" : contents, url); + else if (t2) + return new A._Record_2(contents, $.$get$context().toUri$1(file).toString$0(0)); + else { + resolved = this.loadRelative$3($.$get$context().toUri$1(file).toString$0(0), previous, forImport); + if (resolved == null) + resolved = this._resolveLoadPath$2(file, forImport); + if (resolved != null) + return resolved; + throw A.wrapException("Can't find stylesheet to import."); + } + }, + _callImporterAsync$4(importer, url, previousString, forImport) { + return this._callImporterAsync$body$NodeImporter(importer, url, previousString, forImport); + }, + _callImporterAsync$body$NodeImporter(importer, url, previousString, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Object), + $async$returnValue, $async$self = this, t1, result; + var $async$_callImporterAsync$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = new A._Future($.Zone__current, type$._Future_Object); + result = A.wrapJSExceptions(new A.NodeImporter__callImporterAsync_closure($async$self, importer, forImport, url, previousString, new A._AsyncCompleter(t1, type$._AsyncCompleter_Object))); + $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(t1, $async$_callImporterAsync$4); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_callImporterAsync$4, $async$completer); + }, + _renderContext$1(fromImport) { + var context = {options: type$.RenderContextOptions._as(this._implementation$_options), fromImport: fromImport}; + J.set$context$x(J.get$options$x(context), context); + return context; + } + }; + A.NodeImporter_load_closure.prototype = { + call$0() { + var _this = this; + return J.apply$2$x(_this.importer, _this.$this._renderContext$1(_this.forImport), A._setArrayType([_this.url, _this.previousString], type$.JSArray_Object)); + }, + $signature: 35 + }; + A.NodeImporter__tryPath_closure.prototype = { + call$0() { + return A.resolveImportPath0(this.path); + }, + $signature: 49 + }; + A.NodeImporter__tryPath_closure0.prototype = { + call$1(resolved) { + return new A._Record_2(A.readFile0(resolved), $.$get$context().toUri$1(resolved).toString$0(0)); + }, + $signature: 489 + }; + A.NodeImporter__callImporterAsync_closure.prototype = { + call$0() { + var _this = this; + return J.apply$2$x(_this.importer, _this.$this._renderContext$1(_this.forImport), A._setArrayType([_this.url, _this.previousString, A.allowInterop(_this.completer.get$complete())], type$.JSArray_Object)); + }, + $signature: 35 + }; + A.ModifiableCssImport0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssImport$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$span(receiver) { + return this.span; + } + }; + A.ImportCache0.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + var t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j, _this = this, _null = null; + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter0) && _this._import_cache$_importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Custom); + if (baseImporter != null && url.get$scheme() === "") { + resolvedUrl = baseUrl == null ? _null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + relativeResult = _this._import_cache$_perImporterCanonicalizeCache.putIfAbsent$2(key, new A.ImportCache_canonicalize_closure0(_this, baseImporter, resolvedUrl, baseUrl, forImport, key, url)); + if (relativeResult != null) + return relativeResult; + } + key = new A._Record_2_forImport(url, forImport); + t1 = _this._import_cache$_canonicalizeCache; + if (t1.containsKey$1(key)) + return t1.$index(0, key); + for (t2 = _this._import_cache$_importers, t3 = type$.Record_1_nullable_Object, t4 = _this._import_cache$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, t6 = type$.Record_3_Importer_and_Uri_and_Uri_originalUrl_2, cacheable = true, i = 0; i < t2.length; ++i) { + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = _null; + _1_2_isSet = t3._is(_1_0); + result = _null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = _null; + t7 = false; + } + if (t7) + return result; + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) + continue; + $label0$1: { + _2_0 = _this._import_cache$_canonicalize$4(importer, url, baseUrl, forImport); + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = _null; + _2_3 = _null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = _null; + if (t7) { + t1.$indexSet(0, key, result); + return result; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) + return _2_1; + break $label0$1; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), _null); + cacheable = false; + } + if (_2_1 != null) + return _2_1; + } + } + } + if (cacheable) + t1.$indexSet(0, key, _null); + return _null; + }, + _import_cache$_canonicalize$4(importer, url, baseUrl, forImport) { + var passContainingUrl, canonicalizeContext, t1, result, cacheable, _null = null; + if (baseUrl != null) + passContainingUrl = url.get$scheme() === "" || importer.isNonCanonicalScheme$1(url.get$scheme()); + else + passContainingUrl = false; + canonicalizeContext = new A.CanonicalizeContext0(forImport, passContainingUrl ? baseUrl : _null); + t1 = type$.nullable_Object; + result = A.runZoned(new A.ImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.nullable_Uri); + cacheable = !passContainingUrl || !canonicalizeContext._canonicalize_context$_wasContainingUrlAccessed; + if (result == null) + return new A._Record_2(_null, cacheable); + if (result.get$scheme() === "") + A.WarnForDeprecation_warnForDeprecation0(this._import_cache$_logger, B.Deprecation_Ssf, "Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2e_Rela, _null, _null); + else if (importer.isNonCanonicalScheme$1(result.get$scheme())) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + return new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + }, + importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, quiet) { + return this._import_cache$_importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure0(this, importer, canonicalUrl, originalUrl, quiet)); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$4$originalUrl$quiet(importer, canonicalUrl, originalUrl, false); + }, + humanize$1(canonicalUrl) { + var t1 = type$.NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2; + t1 = A.NullableExtension_andThen0(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._import_cache$_canonicalizeCache.get$values(0), t1), new A.ImportCache_humanize_closure3(canonicalUrl), t1._eval$1("WhereIterable")), new A.ImportCache_humanize_closure4(), t1._eval$1("MappedIterable")), new A.ImportCache_humanize_closure5()), new A.ImportCache_humanize_closure6(canonicalUrl)); + return t1 == null ? canonicalUrl : t1; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._import_cache$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + } + }; + A.ImportCache_canonicalize_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.baseUrl, + _0_0 = t1._import_cache$_canonicalize$4(_this.baseImporter, _this.resolvedUrl, t2, _this.forImport); + if (t2 != null) + t1._import_cache$_nonCanonicalRelativeUrls.$indexSet(0, _this.key, _this.url); + return _0_0._0; + }, + $signature: 665 + }; + A.ImportCache__canonicalize_closure0.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 144 + }; + A.ImportCache_importCanonical_closure0.prototype = { + call$0() { + var t2, t3, t4, _this = this, + t1 = _this.canonicalUrl, + result = _this.importer.load$1(0, t1); + if (result == null) + return null; + t2 = _this.$this; + t2._import_cache$_resultsCache.$indexSet(0, t1, result); + t3 = result.contents; + t4 = result.syntax; + t1 = _this.originalUrl.resolveUri$1(t1); + return A.Stylesheet_Stylesheet$parse0(t3, t4, _this.quiet ? $.$get$Logger_quiet0() : t2._import_cache$_logger, t1); + }, + $signature: 491 + }; + A.ImportCache_humanize_closure3.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 492 + }; + A.ImportCache_humanize_closure4.prototype = { + call$1(result) { + return result._2; + }, + $signature: 493 + }; + A.ImportCache_humanize_closure5.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.ImportCache_humanize_closure6.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 48 + }; + A.ImportRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitImportRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.JSImporter.prototype = {}; + A.JSImporterResult.prototype = {}; + A.Importer0.prototype = { + isNonCanonicalScheme$1(scheme) { + return false; + } + }; + A.NodeImporterResult0.prototype = {}; + A.IncludeRule0.prototype = { + get$spanWithoutContent() { + var t2, t3, + t1 = this.span; + if (!(this.content == null)) { + t2 = t1.file; + t3 = this.$arguments.span; + t3 = A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, A.FileLocation$_(t2, t1._file$_start).offset, t3.get$end(t3).offset))); + t1 = t3; + } + return t1; + }, + get$nameSpan() { + var startSpan, scanner, _null = null, + t1 = this.span, + t2 = t1._file$_start, + t3 = t1._end, + t4 = t1.file._decodedChars; + if (B.JSString_methods.startsWith$1(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), "+")) + startSpan = A.SpanExtensions_trimLeft0(A.FileSpanExtension_subspan(t1, 1, _null)); + else { + scanner = A.StringScanner$(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), _null, _null); + scanner.expectChar$1(64); + A._scanIdentifier0(scanner); + startSpan = A.SpanExtensions_trimLeft0(A.FileSpanExtension_subspan(t1, scanner._string_scanner$_position, _null)); + } + return A.SpanExtensions_initialIdentifier0(this.namespace != null ? A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier0(startSpan), 1, _null) : startSpan); + }, + accept$1$1(visitor) { + return visitor.visitIncludeRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.namespace; + t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; + t1 += _this.name; + t2 = _this.$arguments; + if (!t2.get$isEmpty(0)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = _this.content; + t1 += t2 == null ? ";" : " " + t2.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedFunctionExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitInterpolatedFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation0.prototype = { + get$asPlain() { + var _0_1, t1, _0_6_isSet, _0_6, _0_60, first, + _0_0 = this.contents; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 <= 0) { + t1 = ""; + break $label0$0; + } + _0_6_isSet = _0_1 === 1; + _0_6 = null; + if (_0_6_isSet) { + _0_60 = _0_0[0]; + t1 = _0_60; + _0_6 = t1; + t1 = typeof t1 == "string"; + } else + t1 = false; + if (t1) { + first = A._asString(_0_6_isSet ? _0_6 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + get$initialPlain() { + var _0_4_isSet, _0_4, _0_40, t1, first, + _0_0 = this.contents; + $label0$0: { + _0_4_isSet = _0_0.length >= 1; + _0_4 = null; + if (_0_4_isSet) { + _0_40 = _0_0[0]; + t1 = _0_40; + _0_4 = t1; + t1 = typeof t1 == "string"; + } else + t1 = false; + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + Interpolation$20(contents, span) { + var t1, t2, i, t3, t4, + _s8_ = "contents"; + for (t1 = this.contents, t2 = t1.length, i = 0; i < t2; ++i) { + t3 = t1[i]; + t4 = typeof t3 == "string"; + if (!t4 && !(t3 instanceof A.Expression0)) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, string$.May_on)); + if (i !== 0 && typeof t1[i - 1] == "string" && t4) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); + } + }, + toString$0(_) { + var t1 = this.contents; + return new A.MappedListIterable(t1, new A.Interpolation_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation_toString_closure0.prototype = { + call$1(value) { + return typeof value == "string" ? value : "#{" + A.S(value) + "}"; + }, + $signature: 118 + }; + A.SupportsInterpolation0.prototype = { + toString$0(_) { + return "#{" + this.expression.toString$0(0) + "}"; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.InterpolationBuffer0.prototype = { + writeCharCode$1(character) { + var t1 = this._interpolation_buffer0$_text, + t2 = A.Primitives_stringFromCharCode(character); + t1._contents += t2; + return null; + }, + addInterpolation$1(interpolation) { + var _0_4_isSet, _0_4, _0_40, first, rest, t2, _this = this, + toAdd = interpolation.contents, + t1 = toAdd.length; + if (t1 === 0) + return; + _0_4_isSet = t1 >= 1; + _0_4 = null; + if (_0_4_isSet) { + _0_40 = toAdd[0]; + t1 = _0_40; + _0_4 = t1; + t1 = typeof t1 == "string"; + } else + t1 = false; + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : toAdd[0]); + rest = B.JSArray_methods.sublist$1(toAdd, 1); + t1 = _this._interpolation_buffer0$_text; + t1._contents += first; + toAdd = rest; + } + _this._interpolation_buffer0$_flushText$0(); + t1 = _this._interpolation_buffer0$_contents; + B.JSArray_methods.addAll$1(t1, toAdd); + if (typeof B.JSArray_methods.get$last(t1) == "string") { + t2 = _this._interpolation_buffer0$_text; + t1 = A.S(t1.pop()); + t2._contents += t1; + } + }, + _interpolation_buffer0$_flushText$0() { + var t1 = this._interpolation_buffer0$_text, + t2 = t1._contents; + if (t2.length === 0) + return; + this._interpolation_buffer0$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); + t1._contents = ""; + }, + interpolation$1(span) { + var t1 = A.List_List$of(this._interpolation_buffer0$_contents, true, type$.Object), + t2 = this._interpolation_buffer0$_text._contents; + if (t2.length !== 0) + t1.push(t2.charCodeAt(0) == 0 ? t2 : t2); + return A.Interpolation$0(t1, span); + }, + toString$0(_) { + var t1, t2, _i, t3, element; + for (t1 = this._interpolation_buffer0$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + element = t1[_i]; + t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); + } + t1 = t3 + this._interpolation_buffer0$_text.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.InterpolationMap0.prototype = { + mapException$1(error) { + var t3, t4, _this = this, + target = error.get$span(error), + source = _this.mapSpan$1(target), + startIndex = _this._interpolation_map$_indexInContents$1(target.get$start(target)), + endIndex = _this._interpolation_map$_indexInContents$1(target.get$end(target)), + t1 = _this._interpolation_map$_interpolation.contents, + t2 = error._span_exception$_message; + if (!A.SubListIterable$(t1, startIndex, null, A._arrayInstanceType(t1)._precomputed1).take$1(0, endIndex - startIndex + 1).any$1(0, new A.InterpolationMap_mapException_closure0())) + return new A.SourceSpanFormatException(error.get$source(), t2, source); + else { + t1 = type$.SourceSpan; + t3 = type$.String; + t4 = A.LinkedHashMap_LinkedHashMap$_literal([target, "error in interpolated output"], t1, t3); + return new A.MultiSourceSpanFormatException(error.get$source(), "", A.ConstantMap_ConstantMap$from(t4, t1, t3), t2, source); + } + }, + mapSpan$1(target) { + var _0_10, t1, _0_2_isSet, _0_20, t2, start, end, _this = this, _null = null, + _0_1 = _this._interpolation_map$_mapLocation$1(target.get$start(target)), + _0_2 = _this._interpolation_map$_mapLocation$1(target.get$end(target)); + $label0$0: { + _0_10 = _0_1; + t1 = type$.FileSpan; + _0_2_isSet = t1._is(_0_1); + _0_20 = _null; + t2 = false; + if (_0_2_isSet) { + t1._as(_0_10); + _0_20 = _0_2; + t2 = t1._is(_0_2); + start = _0_10; + _0_1 = start; + } else { + start = _null; + _0_1 = _0_10; + } + if (t2) { + t1 = start.expand$1(0, t1._as(_0_2_isSet ? _0_20 : _0_2)); + break $label0$0; + } + t2 = false; + if (t1._is(_0_1)) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t2 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t2) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation_map$_interpolation.span; + t1 = t2.get$file(t2).span$2(0, _this._interpolation_map$_expandInterpolationSpanLeft$1(start.get$start(start)), t1.offset); + break $label0$0; + } + t2 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t1._is(t2); + start = _0_1; + } else + start = _null; + if (t2) { + end = t1._as(_0_2_isSet ? _0_20 : _0_2); + t1 = _this._interpolation_map$_interpolation.span; + t1 = t1.get$file(t1).span$2(0, start.offset, _this._interpolation_map$_expandInterpolationSpanRight$1(end.get$end(end))); + break $label0$0; + } + t1 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t1 = _0_20; + else { + t1 = _0_2; + _0_20 = t1; + _0_2_isSet = true; + } + t1 = t1 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t1) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation_map$_interpolation.span; + t1 = t2.get$file(t2).span$2(0, start.offset, t1.offset); + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unreachable"); + } + return t1; + }, + _interpolation_map$_mapLocation$1(target) { + var t3, previousLocation, _this = this, + index = _this._interpolation_map$_indexInContents$1(target), + t1 = _this._interpolation_map$_interpolation, + t2 = t1.contents, + _0_0 = t2[index]; + if (_0_0 instanceof A.Expression0) + return _0_0.get$span(_0_0); + t3 = index === 0; + t1 = t1.span; + if (t3) + previousLocation = t1.get$start(t1); + else { + t1 = t1.get$file(t1); + t2 = type$.Expression_2._as(t2[index - 1]); + t2 = t2.get$span(t2); + previousLocation = A.FileLocation$_(t1, _this._interpolation_map$_expandInterpolationSpanRight$1(t2.get$end(t2))); + } + t1 = t3 ? 0 : _this._interpolation_map$_targetLocations[index - 1].get$offset(); + return A.FileLocation$_(previousLocation.file, previousLocation.offset + (target.offset - t1)); + }, + _interpolation_map$_indexInContents$1(target) { + var t1, t2, t3, i; + for (t1 = this._interpolation_map$_targetLocations, t2 = t1.length, t3 = target.offset, i = 0; i < t2; ++i) + if (t3 < t1[i].get$offset()) + return i; + return this._interpolation_map$_interpolation.contents.length - 1; + }, + _interpolation_map$_expandInterpolationSpanLeft$1(start) { + var i0, prev, char, + source = start.file._decodedChars, + i = start.offset - 1; + for (; i >= 0;) { + i0 = i - 1; + prev = source[i]; + if (prev === 123) { + if (source[i0] === 35) { + i = i0; + break; + } + i = i0; + } else if (prev === 47) { + i = i0 - 1; + if (source[i0] === 42) + for (; true;) { + i0 = i - 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i - 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + }, + _interpolation_map$_expandInterpolationSpanRight$1(end) { + var t1, i0, next, second, t2, char, + source = end.file._decodedChars, + i = end.offset; + for (t1 = source.length; i < t1;) { + i0 = i + 1; + next = source[i]; + if (next === 125) { + i = i0; + break; + } + if (next === 47) { + i = i0 + 1; + second = source[i0]; + if (second === 47) { + while (true) { + i0 = i + 1; + t2 = source[i]; + if (!!(t2 === 10 || t2 === 13 || t2 === 12)) + break; + i = i0; + } + i = i0; + } else if (second === 42) + for (; true;) { + i0 = i + 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i + 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + } + }; + A.InterpolationMap_mapException_closure0.prototype = { + call$1($content) { + return $content instanceof A.Expression0; + }, + $signature: 69 + }; + A.InterpolationMethod0.prototype = { + toString$0(_) { + var t1 = this.hue; + t1 = t1 == null ? "" : " " + t1.toString$0(0) + " hue"; + return this.space.name + t1; + } + }; + A.HueInterpolationMethod0.prototype = { + _enumToString$0() { + return "HueInterpolationMethod." + this._name; + } + }; + A._realCasePath_helper0.prototype = { + call$1(path) { + var dirname = $.$get$context().dirname$1(path); + if (dirname === path) + return path; + return $._realCaseCache0.putIfAbsent$2(path, new A._realCasePath_helper_closure0(this, dirname, path)); + }, + $signature: 6 + }; + A._realCasePath_helper_closure0.prototype = { + call$0() { + var matches, t1, _0_0, match, exception, + realDirname = this.helper.call$1(this.dirname), + t2 = this.path, + basename = A.ParsedPath_ParsedPath$parse(t2, $.$get$context().style).get$basename(); + try { + matches = J.where$1$ax(A.listDir0(realDirname), new A._realCasePath_helper__closure0(basename)).toList$0(0); + t1 = null; + _0_0 = matches; + $label0$0: { + match = null; + if (J.get$length$asx(_0_0) === 1) { + match = J.$index$asx(_0_0, 0); + t1 = match; + break $label0$0; + } + t1 = A.join(realDirname, basename, null); + break $label0$0; + } + t1 = t1; + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException0) + return t2; + else + throw exception; + } + }, + $signature: 29 + }; + A._realCasePath_helper__closure0.prototype = { + call$1(realPath) { + return A.equalsIgnoreCase0(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); + }, + $signature: 5 + }; + A.FileSystemException0.prototype = { + toString$0(_) { + var t1 = $.$get$context(); + return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A._readFile_closure0.prototype = { + call$0() { + return J.readFileSync$2$x(A.fs(), this.path, this.encoding); + }, + $signature: 57 + }; + A.fileExists_closure0.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 23 + }; + A.dirExists_closure0.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 23 + }; + A.listDir_closure0.prototype = { + call$0() { + var t1 = this.path; + if (!this.recursive) + return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure1(t1), type$.String).super$Iterable$where(0, new A.listDir__closure2()); + else + return new A.listDir_closure_list0().call$1(t1); + }, + $signature: 148 + }; + A.listDir__closure1.prototype = { + call$1(child) { + return A.join(this.path, A._asString(child), null); + }, + $signature: 121 + }; + A.listDir__closure2.prototype = { + call$1(child) { + return !A.dirExists0(child); + }, + $signature: 5 + }; + A.listDir_closure_list0.prototype = { + call$1($parent) { + return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure0($parent, this), type$.String); + }, + $signature: 149 + }; + A.listDir__list_closure0.prototype = { + call$1(child) { + var path = A.join(this.parent, A._asString(child), null); + return A.dirExists0(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); + }, + $signature: 150 + }; + A.main_closure.prototype = { + call$2(_, __) { + }, + $signature: 494 + }; + A.main_closure0.prototype = { + call$2(_, __) { + }, + $signature: 495 + }; + A.JSToDartLogger.prototype = { + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + var t2, t3, t4, + t1 = this._node, + _0_0 = t1 == null ? null : J.get$warn$x(t1); + if (_0_0 != null) { + t1 = span == null ? type$.nullable_SourceSpan._as(self.undefined) : span; + t2 = J.toString$0$(trace); + t3 = deprecation == null; + t4 = $.$get$deprecations(); + _0_0.call$2(message, {deprecation: !t3, deprecationType: t4.$index(0, t3 ? null : deprecation.id), span: t1, stack: t2}); + } else + this._withAscii$1(new A.JSToDartLogger_internalWarn_closure(this, message, span, trace, deprecation)); + }, + debug$2(_, message, span) { + var t1 = this._node, + _0_0 = t1 == null ? null : J.get$debug$x(t1); + if (_0_0 != null) + _0_0.call$2(message, {span: span}); + else + this._withAscii$1(new A.JSToDartLogger_debug_closure(this, message, span)); + }, + _withAscii$1$1(callback) { + var t1, + wasAscii = $._glyphs === B.C_AsciiGlyphSet; + $._glyphs = this._ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + try { + t1 = callback.call$0(); + return t1; + } finally { + $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + } + }, + _withAscii$1(callback) { + return this._withAscii$1$1(callback, type$.dynamic); + } + }; + A.JSToDartLogger_internalWarn_closure.prototype = { + call$0() { + var _this = this; + _this.$this._fallback.warn$4$deprecation$span$trace(0, _this.message, _this.deprecation != null, _this.span, _this.trace); + }, + $signature: 1 + }; + A.JSToDartLogger_debug_closure.prototype = { + call$0() { + return this.$this._fallback.debug$2(0, this.message, this.span); + }, + $signature: 0 + }; + A.ModifiableCssKeyframeBlock0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssKeyframeBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssKeyframeBlock0 && B.C_ListEquality.equals$2(0, this.selector.value, other.selector.value); + }, + copyWithoutChildren$0() { + return A.ModifiableCssKeyframeBlock$0(this.selector, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.KeyframeSelectorParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure0(this)); + }, + _keyframe_selector$_percentage$0() { + var $self, _0_0, + t1 = this.scanner, + t2 = t1.scanChar$1(43) ? "" + A.Primitives_stringFromCharCode(43) : "", + second = t1.peekChar$0(); + if (!(second != null && second >= 48 && second <= 57) && second !== 46) + t1.error$1(0, "Expected number."); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + if (t1.peekChar$0() === 46) { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + if (this.scanIdentChar$1(101)) { + t2 += A.Primitives_stringFromCharCode(101); + _0_0 = t1.peekChar$0(); + if (43 === _0_0 || 45 === _0_0) + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + } + t1.expectChar$1(37); + t2 += A.Primitives_stringFromCharCode(37); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A.KeyframeSelectorParser_parse_closure0.prototype = { + call$0() { + var selectors = A._setArrayType([], type$.JSArray_String), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + if (t1.lookingAtIdentifier$0()) + if (t1.scanIdentifier$1("from")) + selectors.push("from"); + else { + t1.expectIdentifier$2$name("to", '"to" or "from"'); + selectors.push("to"); + } + else + selectors.push(t1._keyframe_selector$_percentage$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return selectors; + }, + $signature: 131 + }; + A.LabColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var powerlessAB, t1, missingLightness, f1, t2, t3, t4; + switch (dest) { + case B.LabColorSpace_IF20: + powerlessAB = lightness == null || A.fuzzyEquals0(lightness, 0); + t1 = a == null || powerlessAB ? null : a; + return A.SassColor$_forSpace0(B.LabColorSpace_IF20, lightness, t1, b == null || powerlessAB ? null : b, alpha, null); + case B.LchColorSpace_wv80: + return A.labToLch0(dest, lightness, a, b, alpha, false, false); + default: + missingLightness = lightness == null; + if (missingLightness) + lightness = 0; + f1 = (lightness + 16) / 116; + t1 = a == null; + t2 = this._lab$_convertFToXorZ$1((t1 ? 0 : a) / 500 + f1); + t3 = lightness > 8 ? Math.pow(f1, 3) : lightness / 903.2962962962963; + t4 = b == null; + return B.XyzD50ColorSpace_2No0.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, t2 * 0.9642956764295677, t3, this._lab$_convertFToXorZ$1(f1 - (t4 ? 0 : b) / 200) * 0.8251046025104602, alpha, t1, t4, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + }, + _lab$_convertFToXorZ$1(component) { + var cubed = Math.pow(component, 3) + 0; + return cubed > 0.008856451679035631 ? cubed : (116 * component - 16) / 903.2962962962963; + } + }; + A.LazyFileSpan0.prototype = { + get$span(_) { + var t1 = this._lazy_file_span0$_span; + return t1 == null ? this._lazy_file_span0$_span = this._lazy_file_span0$_builder.call$0() : t1; + }, + compareTo$1(_, other) { + return this.get$span(0).compareTo$1(0, other); + }, + get$context(_) { + var t1 = this.get$span(0); + return t1.get$context(t1); + }, + get$end(_) { + var t1 = this.get$span(0); + return t1.get$end(t1); + }, + expand$1(_, other) { + return this.get$span(0).expand$1(0, other); + }, + get$file(_) { + var t1 = this.get$span(0); + return t1.get$file(t1); + }, + highlight$1$color(color) { + return this.get$span(0).highlight$1$color(color); + }, + get$length(_) { + var t1 = this.get$span(0); + return t1.get$length(t1); + }, + message$2$color(_, message, color) { + return this.get$span(0).message$2$color(0, message, color); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + get$sourceUrl(_) { + var t1 = this.get$span(0); + return t1.get$sourceUrl(t1); + }, + get$start(_) { + var t1 = this.get$span(0); + return t1.get$start(t1); + }, + get$text() { + return this.get$span(0).get$text(); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.LchColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.LabColorSpace_IF20.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.render_closure.prototype = { + call$0() { + var error, exception; + try { + this.callback.call$2(null, A.renderSync(this.options)); + } catch (exception) { + error = A.unwrapException(exception); + this.callback.call$2(error, null); + } + return null; + }, + $signature: 1 + }; + A.render_closure0.prototype = { + call$1(result) { + this.callback.call$2(null, result); + }, + $signature: 496 + }; + A.render_closure1.prototype = { + call$2(error, stackTrace) { + var t2, t3, _null = null, + t1 = this.callback; + if (error instanceof A.SassException0) + t1.call$2(A._wrapException(error, stackTrace), _null); + else { + t2 = J.toString$0$(error); + t3 = A.getTrace0(error); + t1.call$2(A._newRenderError(t2, t3 == null ? stackTrace : t3, _null, _null, _null, 3), _null); + } + }, + $signature: 55 + }; + A._parseFunctions_closure.prototype = { + call$2(signature, callback) { + var _0_0, _this = this, t1 = {}, + t2 = _this.options, + context = {options: A._contextOptions(t2, _this.start)}; + J.set$context$x(J.get$options$x(context), context); + _0_0 = J.get$fiber$x(t2); + t1.fiber = null; + if (_0_0 != null) { + t1.fiber = _0_0; + _this.result.push(A.Callable_Callable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure(t1, callback, context), false)); + } else { + t1 = _this.result; + if (!_this.asynch) + t1.push(A.Callable_Callable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure0(callback, context), false)); + else + t1.push(A.AsyncCallable_AsyncCallable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure1(callback, context), false)); + } + }, + $signature: 125 + }; + A._parseFunctions__closure.prototype = { + call$1($arguments) { + var result, + t1 = this._box_0, + currentFiber = J.get$current$x(t1.fiber), + t2 = type$.Object; + t2 = A.List_List$of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), true, t2); + t2.push(A.allowInterop(new A._parseFunctions___closure2(currentFiber))); + result = A.wrapJSExceptions(new A._parseFunctions___closure3(this.callback, this.context, t2)); + return A.unwrapValue(A._asBool($.$get$_isUndefined().call$1(result)) ? A.runZoned(new A._parseFunctions___closure4(t1), null, type$.nullable_Object) : result); + }, + $signature: 3 + }; + A._parseFunctions___closure2.prototype = { + call$1(result) { + A.scheduleMicrotask(new A._parseFunctions____closure(this.currentFiber, result)); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 80 + }; + A._parseFunctions____closure.prototype = { + call$0() { + return J.run$1$x(this.currentFiber, this.result); + }, + $signature: 0 + }; + A._parseFunctions___closure3.prototype = { + call$0() { + return J.apply$2$x(type$.JSFunction._as(this.callback), this.context, this.jsArguments); + }, + $signature: 35 + }; + A._parseFunctions___closure4.prototype = { + call$0() { + return J.yield$0$x(this._box_0.fiber); + }, + $signature: 83 + }; + A._parseFunctions__closure0.prototype = { + call$1($arguments) { + return A.unwrapValue(A.wrapJSExceptions(new A._parseFunctions___closure1(this.callback, this.context, $arguments))); + }, + $signature: 3 + }; + A._parseFunctions___closure1.prototype = { + call$0() { + var t1 = type$.JSFunction._as(this.callback), + t2 = J.map$1$1$ax(this.$arguments, A.value0__wrapValue$closure(), type$.Object); + return J.apply$2$x(t1, this.context, A.List_List$of(t2, true, t2.$ti._eval$1("ListIterable.E"))); + }, + $signature: 35 + }; + A._parseFunctions__closure1.prototype = { + call$1($arguments) { + return this.$call$body$_parseFunctions__closure($arguments); + }, + $call$body$_parseFunctions__closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result, t1, t2, $async$temp1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + t1 = new A._Future($.Zone__current, type$._Future_nullable_Object); + t2 = type$.Object; + t2 = A.List_List$of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), true, t2); + t2.push(A.allowInterop(new A._parseFunctions___closure(new A._AsyncCompleter(t1, type$._AsyncCompleter_nullable_Object)))); + result = A.wrapJSExceptions(new A._parseFunctions___closure0($async$self.callback, $async$self.context, t2)); + $async$temp1 = A; + $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait(t1, $async$call$1); + case 6: + // returning from await. + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$result = result; + case 4: + // join + $async$returnValue = $async$temp1.unwrapValue($async$result); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 106 + }; + A._parseFunctions___closure.prototype = { + call$1(result) { + return this.completer.complete$1(result); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 196 + }; + A._parseFunctions___closure0.prototype = { + call$0() { + return J.apply$2$x(type$.JSFunction._as(this.callback), this.context, this.jsArguments); + }, + $signature: 35 + }; + A._parseImporter_closure.prototype = { + call$1(importer) { + return type$.JSFunction._as(A.allowInteropCaptureThis(new A._parseImporter__closure(this._box_0, importer))); + }, + $signature: 497 + }; + A._parseImporter__closure.prototype = { + call$4(thisArg, url, previous, _) { + var t1 = this._box_0, + result = J.apply$2$x(this.importer, thisArg, A._setArrayType([url, previous, A.allowInterop(new A._parseImporter___closure(J.get$current$x(t1.fiber)))], type$.JSArray_Object)); + if (A._asBool($.$get$_isUndefined().call$1(result))) + return A.runZoned(new A._parseImporter___closure0(t1), null, type$.Object); + return result; + }, + call$3(thisArg, url, previous) { + return this.call$4(thisArg, url, previous, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 498 + }; + A._parseImporter___closure.prototype = { + call$1(result) { + A.scheduleMicrotask(new A._parseImporter____closure(this.currentFiber, result)); + }, + $signature: 499 + }; + A._parseImporter____closure.prototype = { + call$0() { + return J.run$1$x(this.currentFiber, this.result); + }, + $signature: 0 + }; + A._parseImporter___closure0.prototype = { + call$0() { + return J.yield$0$x(this._box_0.fiber); + }, + $signature: 83 + }; + A.LimitedMapView0.prototype = { + get$keys(_) { + return this._limited_map_view0$_keys; + }, + get$length(_) { + return this._limited_map_view0$_keys._collection$_length; + }, + get$isEmpty(_) { + return this._limited_map_view0$_keys._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._limited_map_view0$_keys._collection$_length !== 0; + }, + $index(_, key) { + return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.$index(0, key) : null; + }, + containsKey$1(key) { + return this._limited_map_view0$_keys.contains$1(0, key); + }, + remove$1(_, key) { + return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.remove$1(0, key) : null; + } + }; + A.ListExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitListExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, t4, t5, _this = this, + t1 = _this.hasBrackets; + if (t1) + t2 = "" + A.Primitives_stringFromCharCode(91); + else { + t2 = _this.contents.length; + if (t2 !== 0) + t2 = t2 === 1 && _this.separator === B.ListSeparator_ECn0; + else + t2 = true; + t2 = t2 ? "" + A.Primitives_stringFromCharCode(40) : ""; + } + t3 = _this.contents; + t4 = _this.separator === B.ListSeparator_ECn0; + t5 = t4 ? ", " : " "; + t5 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure0(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t5); + if (t1) + t1 = t5 + A.Primitives_stringFromCharCode(93); + else { + t1 = t3.length; + if (t1 === 0) + t1 = t5 + A.Primitives_stringFromCharCode(41); + else + t1 = t1 === 1 && t4 ? t5 + ",)" : t5; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _list3$_elementNeedsParens$1(expression) { + var childSeparator, t1, _0_13; + $label0$0: { + if (expression instanceof A.ListExpression0 && expression.contents.length >= 2 && !expression.hasBrackets) { + childSeparator = expression.separator; + t1 = this.separator === B.ListSeparator_ECn0 ? childSeparator === B.ListSeparator_ECn0 : childSeparator !== B.ListSeparator_undecided_null_undecided0; + break $label0$0; + } + if (expression instanceof A.UnaryOperationExpression0) { + _0_13 = expression.operator; + if (B.UnaryOperator_cLp0 !== _0_13) + t1 = B.UnaryOperator_AiQ0 === _0_13; + else + t1 = true; + } else + t1 = false; + if (t1) { + t1 = this.separator === B.ListSeparator_nbm0; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression_toString_closure0.prototype = { + call$1(element) { + return this.$this._list3$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); + }, + $signature: 115 + }; + A._length_closure2.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).get$asList().length, null); + }, + $signature: 22 + }; + A._nth_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1); + return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; + }, + $signature: 3 + }; + A._setNth_closure0.prototype = { + call$1($arguments) { + var newList, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1), + value = t1.$index($arguments, 2); + t1 = list.get$asList(); + newList = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + newList[list.sassIndexToListIndex$2(index, "n")] = value; + return list.withListContents$1(newList); + }, + $signature: 26 + }; + A._join_closure0.prototype = { + call$1($arguments) { + var _0_1, _0_4, _0_3, t2, t3, _0_40, separator, bracketed, _null = null, + t1 = J.getInterceptor$asx($arguments), + list1 = t1.$index($arguments, 0), + list2 = t1.$index($arguments, 1), + separatorParam = t1.$index($arguments, 2).assertString$1("separator"), + bracketedParam = t1.$index($arguments, 3), + _1_0 = separatorParam._string0$_text; + $label1$1: { + if ("auto" === _1_0) { + _0_1 = list1.get$separator(list1); + _0_4 = list2.get$separator(list2); + $label0$0: { + t1 = _null; + _0_3 = B.ListSeparator_undecided_null_undecided0 === _0_1; + t2 = _0_3; + if (t2) { + t3 = B.ListSeparator_undecided_null_undecided0 === _0_4; + _0_40 = _0_4; + } else { + _0_40 = _null; + t3 = false; + } + if (t3) { + t1 = B.ListSeparator_nbm0; + break $label0$0; + } + if (_0_3) + separator = t2 ? _0_40 : _0_4; + else + separator = t1; + if (!_0_3) + separator = _0_1; + t1 = separator; + break $label0$0; + } + break $label1$1; + } + if ("space" === _1_0) { + t1 = B.ListSeparator_nbm0; + break $label1$1; + } + if ("comma" === _1_0) { + t1 = B.ListSeparator_ECn0; + break $label1$1; + } + if ("slash" === _1_0) { + t1 = B.ListSeparator_cQA0; + break $label1$1; + } + t1 = A.throwExpression(A.SassScriptException$0(string$.x24separ, _null)); + } + bracketed = bracketedParam instanceof A.SassString0 && bracketedParam._string0$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); + t2 = A.List_List$of(list1.get$asList(), true, type$.Value_2); + B.JSArray_methods.addAll$1(t2, list2.get$asList()); + return A.SassList$0(t2, t1, bracketed); + }, + $signature: 26 + }; + A._append_closure2.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + value = t1.$index($arguments, 1), + _0_0 = t1.$index($arguments, 2).assertString$1("separator")._string0$_text; + $label0$0: { + if ("auto" === _0_0) { + t1 = list.get$separator(list) === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_nbm0 : list.get$separator(list); + break $label0$0; + } + if ("space" === _0_0) { + t1 = B.ListSeparator_nbm0; + break $label0$0; + } + if ("comma" === _0_0) { + t1 = B.ListSeparator_ECn0; + break $label0$0; + } + if ("slash" === _0_0) { + t1 = B.ListSeparator_cQA0; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0(string$.x24separ, null)); + } + t2 = A.List_List$of(list.get$asList(), true, type$.Value_2); + t2.push(value); + return list.withListContents$2$separator(t2, t1); + }, + $signature: 26 + }; + A._zip_closure0.prototype = { + call$1($arguments) { + var results, result, _box_0 = {}, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), + lists = A.List_List$of(new A.MappedListIterable(t1, new A._zip__closure2(), t2), true, t2._eval$1("ListIterable.E")); + if (lists.length === 0) + return B.SassList_bdS1; + _box_0.i = 0; + results = A._setArrayType([], type$.JSArray_SassList_2); + for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value0>"), t2 = type$.Value_2; B.JSArray_methods.every$1(lists, new A._zip__closure3(_box_0));) { + result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure4(_box_0), t1), false, t2); + result.fixed$length = Array; + result.immutable$list = Array; + results.push(new A.SassList0(result, B.ListSeparator_nbm0, false)); + ++_box_0.i; + } + return A.SassList$0(results, B.ListSeparator_ECn0, false); + }, + $signature: 26 + }; + A._zip__closure2.prototype = { + call$1(list) { + return list.get$asList(); + }, + $signature: 501 + }; + A._zip__closure3.prototype = { + call$1(list) { + return this._box_0.i !== J.get$length$asx(list); + }, + $signature: 502 + }; + A._zip__closure4.prototype = { + call$1(list) { + return J.$index$asx(list, this._box_0.i); + }, + $signature: 3 + }; + A._index_closure2.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); + return index === -1 ? B.C__SassNull0 : A.SassNumber_SassNumber0(index + 1, null); + }, + $signature: 3 + }; + A._separator_closure0.prototype = { + call$1($arguments) { + var t1, + _0_0 = J.get$separator$x(J.$index$asx($arguments, 0)); + $label0$0: { + if (B.ListSeparator_ECn0 === _0_0) { + t1 = new A.SassString0("comma", false); + break $label0$0; + } + if (B.ListSeparator_cQA0 === _0_0) { + t1 = new A.SassString0("slash", false); + break $label0$0; + } + t1 = new A.SassString0("space", false); + break $label0$0; + } + return t1; + }, + $signature: 17 + }; + A._isBracketed_closure0.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._slash_closure0.prototype = { + call$1($arguments) { + var list = J.$index$asx($arguments, 0).get$asList(); + if (list.length < 2) + throw A.wrapException(A.SassScriptException$0("At least two elements are required.", null)); + return A.SassList$0(list, B.ListSeparator_cQA0, false); + }, + $signature: 26 + }; + A.SelectorList0.prototype = { + get$asSassList() { + var t1 = this.components; + return A.SassList$0(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_ECn0, false); + }, + accept$1$1(visitor) { + return visitor.visitSelectorList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(other) { + var t3, t4, t5, t6, _i, complex1, _i0, t7, + t1 = type$.JSArray_ComplexSelector_2, + t2 = A._setArrayType([], t1); + for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { + complex1 = t3[_i]; + for (_i0 = 0; _i0 < t6; ++_i0) { + t7 = A.unifyComplex0(A._setArrayType([complex1, t5[_i0]], t1), complex1.span); + if (t7 != null) + B.JSArray_methods.addAll$1(t2, t7); + } + } + return t2.length === 0 ? null : A.SelectorList$0(t2, this.span); + }, + nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, preserveParentSelectors) { + var parentSelector, t1, _this = this; + if ($parent == null) { + if (preserveParentSelectors) + return _this; + parentSelector = B.C__ParentSelectorVisitor0.visitSelectorList$1(_this); + if (parentSelector == null) + return _this; + throw A.wrapException(A.SassException$0(string$.Top_les, parentSelector.span, null)); + } + t1 = _this.components; + return A.SelectorList$0(A.flattenVertically0(new A.MappedListIterable(t1, new A.SelectorList_nestWithin_closure0(_this, preserveParentSelectors, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector_2), _this.span); + }, + nestWithin$1($parent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, true, false); + }, + nestWithin$2$implicitParent($parent, implicitParent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, false); + }, + _list2$_nestWithinCompound$2(component, $parent) { + var resolvedSimples, parentSelector, error, stackTrace, t2, resolvedSimples0, exception, + t1 = component.selector, + simples = t1.components, + containsSelectorPseudo = J.any$1$ax(simples, new A.SelectorList__nestWithinCompound_closure2()); + if (!containsSelectorPseudo && !(J.get$first$ax(simples) instanceof A.ParentSelector0)) + return null; + if (containsSelectorPseudo) { + t2 = simples; + resolvedSimples0 = new A.MappedListIterable(t2, new A.SelectorList__nestWithinCompound_closure3($parent), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,SimpleSelector0>")); + } else + resolvedSimples0 = simples; + resolvedSimples = resolvedSimples0; + parentSelector = J.get$first$ax(simples); + try { + if (!(parentSelector instanceof A.ParentSelector0)) { + t2 = component.span; + t2 = A._setArrayType([A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(resolvedSimples, t1.span), A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator_2), t2)], type$.JSArray_ComplexSelectorComponent_2), t2, false)], type$.JSArray_ComplexSelector_2); + return t2; + } else if (J.get$length$asx(simples) === 1 && parentSelector.suffix == null) { + t1 = $parent.withAdditionalCombinators$1(component.combinators); + return t1.components; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withAdditionalSpan$2(parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + t1 = $parent.components; + return new A.MappedListIterable(t1, new A.SelectorList__nestWithinCompound_closure4(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); + }, + isSuperselector$1(other) { + return A.listIsSuperselector0(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1; + if (combinators.length === 0) + t1 = this; + else { + t1 = this.components; + t1 = A.SelectorList$0(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure0(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")), this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SelectorList0 && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.SelectorList_asSassList_closure0.prototype = { + call$1(complex) { + var t3, t4, _i, component, t5, visitor, t6, t7, _i0, _null = null, + t1 = type$.JSArray_Value_2, + t2 = A._setArrayType([], t1); + for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) + t2.push(new A.SassString0(J.toString$0$(t3[_i].value), false)); + for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + t5 = component.selector; + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + t5.accept$1(visitor); + t5 = A._setArrayType([new A.SassString0(visitor._serialize0$_buffer.toString$0(0), false)], t1); + for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) + t5.push(new A.SassString0(J.toString$0$(t6[_i0].value), false)); + B.JSArray_methods.addAll$1(t2, t5); + } + return A.SassList$0(t2, B.ListSeparator_nbm0, false); + }, + $signature: 503 + }; + A.SelectorList_nestWithin_closure0.prototype = { + call$1(complex) { + var t1, newComplexes, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, _i, component, resolved, i, t12, t13, t14, _i0, newComplex, t15, _this = this; + if (_this.preserveParentSelectors || complex.accept$1(B.C__ParentSelectorVisitor0) == null) { + if (!_this.implicitParent) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + t1 = _this.parent.components; + return new A.MappedListIterable(t1, new A.SelectorList_nestWithin__closure1(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); + } + t1 = type$.JSArray_ComplexSelector_2; + newComplexes = A._setArrayType([], t1); + for (t2 = complex.components, t3 = t2.length, t4 = _this.$this, t5 = _this.parent, t6 = type$.ComplexSelector_2, t7 = complex.leadingCombinators, t8 = t7.length === 0, t9 = complex.span, t10 = type$.ComplexSelectorComponent_2, t11 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < t3; ++_i) { + component = t2[_i]; + resolved = t4._list2$_nestWithinCompound$2(component, t5); + if (resolved == null) + if (newComplexes.length === 0) + newComplexes.push(A.ComplexSelector$0(t7, A._setArrayType([component], t11), t9, false)); + else + for (i = 0; i < newComplexes.length; ++i) { + t12 = newComplexes[i]; + t13 = t12.leadingCombinators; + t14 = A.List_List$of(t12.components, true, t10); + t14.push(component); + t12 = t12.lineBreak; + newComplexes[i] = A.ComplexSelector$0(t13, t14, t9, t12); + } + else if (newComplexes.length === 0) + B.JSArray_methods.addAll$1(newComplexes, t8 ? resolved : J.map$1$1$ax(resolved, new A.SelectorList_nestWithin__closure2(complex), t6)); + else { + t12 = A._setArrayType([], t1); + for (t13 = newComplexes.length, t14 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t13 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { + newComplex = newComplexes[_i0]; + for (t15 = t14.get$iterator(resolved); t15.moveNext$0();) + t12.push(newComplex.concatenate$2(t15.get$current(t15), newComplex.span)); + } + newComplexes = t12; + } + } + return newComplexes; + }, + $signature: 504 + }; + A.SelectorList_nestWithin__closure1.prototype = { + call$1(parentComplex) { + var t1 = this.complex; + return parentComplex.concatenate$2(t1, t1.span); + }, + $signature: 61 + }; + A.SelectorList_nestWithin__closure2.prototype = { + call$1(resolvedComplex) { + var t1 = resolvedComplex.leadingCombinators, + t2 = this.complex, + t3 = t2.leadingCombinators; + if (t1.length === 0) + t1 = t3; + else { + t3 = A.List_List$of(t3, true, type$.CssValue_Combinator_2); + B.JSArray_methods.addAll$1(t3, t1); + t1 = t3; + } + return A.ComplexSelector$0(t1, resolvedComplex.components, t2.span, resolvedComplex.lineBreak); + }, + $signature: 61 + }; + A.SelectorList__nestWithinCompound_closure2.prototype = { + call$1(simple) { + var selector; + if (!(simple instanceof A.PseudoSelector0)) + return false; + selector = simple.selector; + return selector != null && selector.accept$1(B.C__ParentSelectorVisitor0) != null; + }, + $signature: 14 + }; + A.SelectorList__nestWithinCompound_closure3.prototype = { + call$1(simple) { + var selector, t1, _0_2; + $label0$0: { + selector = null; + t1 = false; + if (simple instanceof A.PseudoSelector0) { + _0_2 = simple.selector; + if (_0_2 != null) { + selector = _0_2 == null ? type$.SelectorList_2._as(_0_2) : _0_2; + t1 = selector.accept$1(B.C__ParentSelectorVisitor0) != null; + } + } + if (t1) { + t1 = simple.withSelector$1(selector.nestWithin$2$implicitParent(this.parent, false)); + break $label0$0; + } + t1 = simple; + break $label0$0; + } + return t1; + }, + $signature: 505 + }; + A.SelectorList__nestWithinCompound_closure4.prototype = { + call$1(complex) { + var lastComponent, suffix, lastSimples, t1, t2, last, t3, error, stackTrace, t4, t5, t6, t7, exception, _this = this; + try { + t4 = complex.components; + lastComponent = B.JSArray_methods.get$last(t4); + if (lastComponent.combinators.length !== 0) { + t1 = A.MultiSpanSassException$0('Selector "' + complex.toString$0(0) + string$.x22x20can_, A.SpanExtensions_trimRight0(lastComponent.span), "outer selector", A.LinkedHashMap_LinkedHashMap$_literal([_this.parentSelector.span, "parent selector"], type$.FileSpan, type$.String), null); + throw A.wrapException(t1); + } + suffix = _this.parentSelector.suffix; + lastSimples = lastComponent.selector.components; + t5 = type$.SimpleSelector_2; + t6 = _this.resolvedSimples; + t7 = J.getInterceptor$ax(t6); + if (suffix == null) { + t1 = A.List_List$of(lastSimples, true, t5); + J.addAll$1$ax(t1, t7.skip$1(t6, 1)); + t1 = t1; + } else { + t2 = A.List_List$of(A.IterableExtension_get_exceptLast0(lastSimples), true, t5); + J.add$1$ax(t2, J.get$last$ax(lastSimples).addSuffix$1(suffix)); + J.addAll$1$ax(t2, t7.skip$1(t6, 1)); + t1 = t2; + } + t2 = _this.component; + last = A.CompoundSelector$0(t1, t2.selector.span); + t3 = A.List_List$of(A.IterableExtension_get_exceptLast0(t4), true, type$.ComplexSelectorComponent_2); + t4 = t2.span; + J.add$1$ax(t3, new A.ComplexSelectorComponent0(last, A.List_List$unmodifiable(t2.combinators, type$.CssValue_Combinator_2), t4)); + t4 = A.ComplexSelector$0(complex.leadingCombinators, t3, t4, complex.lineBreak); + return t4; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withAdditionalSpan$2(_this.parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + }, + $signature: 61 + }; + A.SelectorList_withAdditionalCombinators_closure0.prototype = { + call$1(complex) { + return complex.withAdditionalCombinators$1(this.combinators); + }, + $signature: 61 + }; + A._ParentSelectorVisitor0.prototype = { + visitParentSelector$1(selector) { + return selector; + } + }; + A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0.prototype = {}; + A.listClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassList", new A.listClass__closure())); + J.get$$prototype$x(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.listClass__closure0()); + A.JSClassExtension_injectSuperclass(t1._as(B.SassList_k8F.constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.listClass__closure.prototype = { + call$3($self, contentsOrOptions, options) { + var contents, t1, t2; + if (self.immutable.isList(contentsOrOptions)) + contents = J.cast$1$0$ax(J.toArray$0$x(type$.ImmutableList._as(contentsOrOptions)), type$.Value_2); + else if (type$.List_dynamic._is(contentsOrOptions)) + contents = J.cast$1$0$ax(contentsOrOptions, type$.Value_2); + else { + contents = A._setArrayType([], type$.JSArray_Value_2); + type$.nullable__ConstructorOptions._as(contentsOrOptions); + options = contentsOrOptions; + } + t1 = options == null; + if (!t1) { + t2 = J.get$separator$x(options); + t2 = A._asBool($.$get$_isUndefined().call$1(t2)); + } else + t2 = true; + t2 = t2 ? B.ListSeparator_ECn0 : A.jsToDartSeparator(J.get$separator$x(options)); + t1 = t1 ? null : J.get$brackets$x(options); + return A.SassList$0(contents, t2, t1 == null ? false : t1); + }, + call$1($self) { + return this.call$3($self, null, null); + }, + call$2($self, contentsOrOptions) { + return this.call$3($self, contentsOrOptions, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 506 + }; + A.listClass__closure0.prototype = { + call$2($self, indexFloat) { + var index = B.JSNumber_methods.floor$0(indexFloat); + if (index < 0) + index = $self.get$asList().length + index; + if (index < 0 || index >= $self.get$asList().length) + return self.undefined; + return $self.get$asList()[index]; + }, + $signature: 245 + }; + A._ConstructorOptions.prototype = {}; + A._NodeSassList.prototype = {}; + A.legacyListClass_closure.prototype = { + call$4(thisArg, $length, commaSeparator, dartValue) { + var t1; + if (dartValue == null) { + $length.toString; + t1 = A.Iterable_Iterable$generate($length, new A.legacyListClass__closure(), type$.Value_2); + t1 = A.SassList$0(t1, commaSeparator !== false ? B.ListSeparator_ECn0 : B.ListSeparator_nbm0, false); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, $length) { + return this.call$4(thisArg, $length, null, null); + }, + call$3(thisArg, $length, commaSeparator) { + return this.call$4(thisArg, $length, commaSeparator, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 508 + }; + A.legacyListClass__closure.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 246 + }; + A.legacyListClass_closure0.prototype = { + call$2(thisArg, index) { + return A.wrapValue(J.get$dartValue$x(thisArg)._list1$_contents[index]); + }, + $signature: 510 + }; + A.legacyListClass_closure1.prototype = { + call$3(thisArg, index, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._list1$_contents, + mutable = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + mutable[index] = A.unwrapValue(value); + t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).withListContents$1(mutable)); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 511 + }; + A.legacyListClass_closure2.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._list1$_separator === B.ListSeparator_ECn0; + }, + $signature: 512 + }; + A.legacyListClass_closure3.prototype = { + call$2(thisArg, isComma) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._list1$_contents, + t3 = isComma ? B.ListSeparator_ECn0 : B.ListSeparator_nbm0; + t1.set$dartValue(thisArg, A.SassList$0(t2, t3, t1.get$dartValue(thisArg)._list1$_hasBrackets)); + }, + $signature: 513 + }; + A.legacyListClass_closure4.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._list1$_contents.length; + }, + $signature: 514 + }; + A.SassList0.prototype = { + get$separator(_) { + return this._list1$_separator; + }, + get$hasBrackets() { + return this._list1$_hasBrackets; + }, + get$isBlank() { + return !this._list1$_hasBrackets && B.JSArray_methods.every$1(this._list1$_contents, new A.SassList_isBlank_closure0()); + }, + get$asList() { + return this._list1$_contents; + }, + get$lengthAsList() { + return this._list1$_contents.length; + }, + SassList$3$brackets0(contents, _separator, brackets) { + if (this._list1$_separator === B.ListSeparator_undecided_null_undecided0 && this._list1$_contents.length > 1) + throw A.wrapException(A.ArgumentError$(string$.A_list, null)); + }, + toString$0(_) { + var t2, _this = this, + t1 = true; + if (!_this._list1$_hasBrackets) { + t2 = _this._list1$_contents.length; + if (t2 !== 0) + t1 = t2 === 1 && _this._list1$_separator === B.ListSeparator_ECn0; + } + if (t1) + return _this.super$Value$toString0(0); + return "(" + _this.super$Value$toString0(0) + ")"; + }, + accept$1$1(visitor) { + return visitor.visitList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : this.super$Value$assertMap0($name); + }, + tryMap$0() { + return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : null; + }, + $eq(_, other) { + var t1, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassList0 && other._list1$_separator === _this._list1$_separator && other._list1$_hasBrackets === _this._list1$_hasBrackets && B.C_ListEquality.equals$2(0, other._list1$_contents, _this._list1$_contents))) + t1 = _this._list1$_contents.length === 0 && other instanceof A.SassMap0 && other.get$asList().length === 0; + else + t1 = true; + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this._list1$_contents); + } + }; + A.SassList_isBlank_closure0.prototype = { + call$1(element) { + return element.get$isBlank(); + }, + $signature: 54 + }; + A.ListSeparator0.prototype = { + _enumToString$0() { + return "ListSeparator." + this._name; + }, + toString$0(_) { + return this._list1$_name; + } + }; + A.LmsColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, longScaled, mediumScaled, shortScaled, lightness, t2, t3, _null = null; + switch (dest) { + case B.OklabColorSpace_yrt0: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = $.$get$lmsToOklab0(); + lightness = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + t2 = missingLightness ? _null : lightness; + t3 = missingA ? _null : t1[3] * longScaled + t1[4] * mediumScaled + t1[5] * shortScaled; + return A.SassColor$_forSpace0(B.OklabColorSpace_yrt0, t2, t3, missingB ? _null : t1[6] * longScaled + t1[7] * mediumScaled + t1[8] * shortScaled, alpha, _null); + case B.OklchColorSpace_li80: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + if (missingLightness) + t1 = _null; + else { + t1 = $.$get$lmsToOklab0(); + t1 = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + } + t2 = $.$get$lmsToOklab0(); + return A.labToLch0(dest, t1, t2[3] * longScaled + t2[4] * mediumScaled + t2[5] * shortScaled, t2[6] * longScaled + t2[7] * mediumScaled + t2[8] * shortScaled, alpha, missingChroma, missingHue); + default: + return this.super$ColorSpace$convertLinear0(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, long, medium, short, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { + t1 = $.$get$lmsToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$lmsToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$lmsToLinearProphotoRgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$lmsToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$lmsToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$lmsToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$lmsToXyzD500(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.LocalMindeGamutMap0.prototype = { + map$1(_, color) { + var clipped, max, min, minInGamut, chroma, current, e, + originOklch = color.toSpace$1(B.OklchColorSpace_li80), + lightness = originOklch.channel0OrNull, + hue = originOklch.channel2OrNull, + alpha = originOklch.alphaOrNull, + t1 = lightness == null, + t2 = t1 ? 0 : lightness; + if (t2 > 1 || A.fuzzyEquals0(t2, 1)) { + t1 = color._color0$_space; + t2 = color.alphaOrNull; + return t1.get$isLegacyInternal() ? A.SassColor_SassColor$rgbInternal0(255, 255, 255, t2, null).toSpace$1(t1) : A.SassColor_SassColor$forSpaceInternal0(t1, 1, 1, 1, t2); + } else { + t1 = t1 ? 0 : lightness; + if (t1 < 0 || A.fuzzyEquals0(t1, 0)) + return A.SassColor_SassColor$rgbInternal0(0, 0, 0, color.alphaOrNull, null).toSpace$1(color._color0$_space); + } + clipped = color.get$isInGamut() ? color : B.ClipGamutMap_clip0.map$1(0, color); + if (this._local_minde$_deltaEOK$2(clipped, color) < 0.02) + return clipped; + max = originOklch.channel1OrNull; + if (max == null) + max = 0; + for (t1 = color._color0$_space, min = 0, minInGamut = true; max - min > 0.0001;) { + chroma = (min + max) / 2; + current = B.OklchColorSpace_li80.convert$5(t1, lightness, chroma, hue, alpha); + if (minInGamut && current.get$isInGamut()) { + min = chroma; + continue; + } + clipped = current.get$isInGamut() ? current : B.ClipGamutMap_clip0.map$1(0, current); + e = this._local_minde$_deltaEOK$2(clipped, current); + if (e < 0.02) { + if (0.02 - e < 0.0001) + return clipped; + min = chroma; + minInGamut = false; + } else + max = chroma; + } + return clipped; + }, + _local_minde$_deltaEOK$2(color1, color2) { + var t2, t3, t4, + lab1 = color1.toSpace$1(B.OklabColorSpace_yrt0), + lab2 = color2.toSpace$1(B.OklabColorSpace_yrt0), + t1 = lab1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = lab2.channel0OrNull; + t1 = Math.pow(t1 - (t2 == null ? 0 : t2), 2); + t2 = lab1.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = lab2.channel1OrNull; + t2 = Math.pow(t2 - (t3 == null ? 0 : t3), 2); + t3 = lab1.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = lab2.channel2OrNull; + return Math.sqrt(t1 + t2 + Math.pow(t3 - (t4 == null ? 0 : t4), 2)); + } + }; + A.JSLogger.prototype = {}; + A.WarnOptions.prototype = {}; + A.DebugOptions.prototype = {}; + A.LoggerWithDeprecationType.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + this.internalWarn$4$deprecation$span$trace(message, deprecation ? B.Deprecation_oty : null, span, trace); + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + warn$2$span(_, message, span) { + return this.warn$4$deprecation$span$trace(0, message, false, span, null); + }, + warn$2$trace(_, message, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, null, trace); + } + }; + A._QuietLogger0.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + }, + warn$2$span(_, message, span) { + return this.warn$4$deprecation$span$trace(0, message, false, span, null); + } + }; + A.LoudComment0.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitLoudComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + } + }; + A.MapExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitMapExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, _i, t4, key, value, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + value = t4._1; + t1.push(key.toString$0(0) + ": " + value.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A._get_closure0.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map0$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap0)) + return B.C__SassNull0; + } + t1 = map._map0$_contents.$index(0, B.JSArray_methods.get$last(t2)); + return t1 == null ? B.C__SassNull0 : t1; + }, + $signature: 3 + }; + A._set_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._modify0(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2), new A._set__closure2($arguments), true); + }, + $signature: 3 + }; + A._set__closure2.prototype = { + call$1(_) { + return J.$index$asx(this.$arguments, 2); + }, + $signature: 41 + }; + A._set_closure2.prototype = { + call$1($arguments) { + var keys, t3, t1 = {}, + t2 = J.getInterceptor$asx($arguments), + map = t2.$index($arguments, 0).assertMap$1("map"), + _0_0 = t2.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a value.", null)); + keys = t1.value = null; + t2 = _0_1 >= 1; + if (t2) { + t3 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t3); + t1.value = _0_0[t3]; + } + if (t2) + return A._modify0(map, keys, new A._set__closure1(t1), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 3 + }; + A._set__closure1.prototype = { + call$1(_) { + return this._box_0.value; + }, + $signature: 41 + }; + A._merge_closure1.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + map2 = t1.$index($arguments, 1).assertMap$1("map2"); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map0$_contents, t1, t1); + t2.addAll$1(0, map2._map0$_contents); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 33 + }; + A._merge_closure2.prototype = { + call$1($arguments) { + var last, t2, keys, _null = null, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + _0_0 = t1.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", _null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a map.", _null)); + t1 = _0_1 >= 1; + last = _null; + if (t1) { + t2 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + } else + keys = _null; + if (t1) + return A._modify0(map1, keys, new A._merge__closure0(last.assertMap$1("map2")), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 3 + }; + A._merge__closure0.prototype = { + call$1(oldValue) { + var t1, t2, + nestedMap = oldValue.tryMap$0(); + if (nestedMap == null) + return this.map2; + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); + t2.addAll$1(0, this.map2._map0$_contents); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 515 + }; + A._deepMerge_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._deepMergeImpl0(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); + }, + $signature: 33 + }; + A._deepRemove_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + return A._modify0(map, A.IterableExtension_get_exceptLast0(t2), new A._deepRemove__closure0(t2), false); + }, + $signature: 3 + }; + A._deepRemove__closure0.prototype = { + call$1(value) { + var t1, nestedMap, t2, + _0_0 = value.tryMap$0(); + if (_0_0 != null) { + t1 = _0_0._map0$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys)); + nestedMap = _0_0; + } else { + nestedMap = null; + t1 = false; + } + if (t1) { + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); + t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } + return value; + }, + $signature: 41 + }; + A._remove_closure1.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertMap$1("map"); + }, + $signature: 33 + }; + A._remove_closure2.prototype = { + call$1($arguments) { + var mutableMap, t3, _i, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + t1 = type$.Value_2; + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1); + for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) + mutableMap.remove$1(0, t2[_i]); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 33 + }; + A._keys_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; + return A.SassList$0(t1.get$keys(t1), B.ListSeparator_ECn0, false); + }, + $signature: 26 + }; + A._values_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; + return A.SassList$0(t1.get$values(t1), B.ListSeparator_ECn0, false); + }, + $signature: 26 + }; + A._hasKey_closure0.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map0$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap0)) + return B.SassBoolean_false0; + } + return map._map0$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._modify_modifyNestedMap0.prototype = { + call$1(map) { + var nestedMap, _this = this, + t1 = type$.Value_2, + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1), + t2 = _this.keyIterator, + key = t2.get$current(t2); + if (!t2.moveNext$0()) { + t2 = mutableMap.$index(0, key); + if (t2 == null) + t2 = B.C__SassNull0; + mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + } + t2 = mutableMap.$index(0, key); + nestedMap = t2 == null ? null : t2.tryMap$0(); + t2 = nestedMap == null; + if (t2 && !_this.addNesting) + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty0 : nestedMap)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 516 + }; + A.MapExtensions_get_pairs_closure0.prototype = { + call$1(e) { + return new A._Record_2(e.key, e.value); + }, + $signature() { + return this.K._eval$1("@<0>")._bind$1(this.V)._eval$1("+(1,2)(MapEntry<1,2>)"); + } + }; + A.mapClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassMap", new A.mapClass__closure())), + t2 = J.getInterceptor$x(jsClass); + A.defineGetter(t2.get$$prototype(jsClass), "contents", new A.mapClass__closure0(), null); + t2.get$$prototype(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.mapClass__closure1()); + A.JSClassExtension_injectSuperclass(t1._as(B.SassMap_Map_empty0.constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.mapClass__closure.prototype = { + call$2($self, contents) { + var t1; + if (contents == null) + t1 = B.SassMap_Map_empty0; + else { + t1 = type$.Value_2; + t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(A.immutableMapToDartMap(contents).cast$2$0(0, t1, t1), t1, t1)); + } + return t1; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 517 + }; + A.mapClass__closure0.prototype = { + call$1($self) { + return A.dartMapToImmutableMap($self._map0$_contents); + }, + $signature: 518 + }; + A.mapClass__closure1.prototype = { + call$2($self, indexOrKey) { + var index, t1, _0_0; + if (typeof indexOrKey == "number") { + index = B.JSNumber_methods.floor$0(indexOrKey); + if (index < 0) { + t1 = $self._map0$_contents; + index = t1.get$length(t1) + index; + } + if (index >= 0) { + t1 = $self._map0$_contents; + t1 = index >= t1.get$length(t1); + } else + t1 = true; + if (t1) + return self.undefined; + t1 = type$.Value_2; + _0_0 = A.MapExtensions_get_pairs0($self._map0$_contents, t1, t1).elementAt$1(0, index); + return A.SassList$0(A._setArrayType([_0_0._0, _0_0._1], type$.JSArray_Value_2), B.ListSeparator_nbm0, false); + } else { + t1 = $self._map0$_contents.$index(0, indexOrKey); + return t1 == null ? self.undefined : t1; + } + }, + $signature: 519 + }; + A._NodeSassMap.prototype = {}; + A.legacyMapClass_closure.prototype = { + call$3(thisArg, $length, dartValue) { + var t1, t2, t3, map; + if (dartValue == null) { + $length.toString; + t1 = type$.Value_2; + t2 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure(), t1); + t3 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure0(), t1); + map = A.LinkedHashMap_LinkedHashMap(null, null, null, t1, t1); + A.MapBase__fillMapWithIterables(map, t2, t3); + t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, $length) { + return this.call$3(thisArg, $length, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 520 + }; + A.legacyMapClass__closure.prototype = { + call$1(i) { + return A.SassNumber_SassNumber0(i, null); + }, + $signature: 521 + }; + A.legacyMapClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 246 + }; + A.legacyMapClass_closure0.prototype = { + call$2(thisArg, index) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + return A.wrapValue(J.elementAt$1$ax(t1.get$keys(t1), index)); + }, + $signature: 247 + }; + A.legacyMapClass_closure1.prototype = { + call$2(thisArg, index) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + return A.wrapValue(t1.get$values(t1).elementAt$1(0, index)); + }, + $signature: 247 + }; + A.legacyMapClass_closure2.prototype = { + call$1(thisArg) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + return t1.get$length(t1); + }, + $signature: 523 + }; + A.legacyMapClass_closure3.prototype = { + call$3(thisArg, index, key) { + var newKey, t2, newMap, t3, i, t4, oldKey, oldValue, + t1 = J.getInterceptor$x(thisArg), + oldMap = t1.get$dartValue(thisArg)._map0$_contents, + $length = oldMap.get$length(oldMap); + A.IndexError_check(index, $length, oldMap, null, "index"); + newKey = A.unwrapValue(key); + t2 = type$.Value_2; + newMap = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t3 = A.MapExtensions_get_pairs0(t1.get$dartValue(thisArg)._map0$_contents, t2, t2), t3 = t3.get$iterator(t3), i = 0; t3.moveNext$0();) { + t4 = t3.get$current(t3); + oldKey = t4._0; + oldValue = t4._1; + if (i === index) + newMap.$indexSet(0, newKey, oldValue); + else { + if (newKey.$eq(0, oldKey)) + throw A.wrapException(A.ArgumentError$value(key, "key", "is already in the map")); + newMap.$indexSet(0, oldKey, oldValue); + } + ++i; + } + t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(newMap, t2, t2))); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 248 + }; + A.legacyMapClass_closure4.prototype = { + call$3(thisArg, index, value) { + var t3, + t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._map0$_contents, + key = J.elementAt$1$ax(t2.get$keys(t2), index); + t2 = type$.Value_2; + t3 = A.LinkedHashMap_LinkedHashMap$of(t1.get$dartValue(thisArg)._map0$_contents, t2, t2); + t3.$indexSet(0, key, A.unwrapValue(value)); + t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2))); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 248 + }; + A.SassMap0.prototype = { + get$separator(_) { + var t1 = this._map0$_contents; + return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_undecided0 : B.ListSeparator_ECn0; + }, + get$asList() { + var t3, t4, t5, result, + t1 = type$.JSArray_Value_2, + t2 = A._setArrayType([], t1); + for (t3 = type$.Value_2, t4 = A.MapExtensions_get_pairs0(this._map0$_contents, t3, t3), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t5 = t4.get$current(t4); + result = A.List_List$from(A._setArrayType([t5._0, t5._1], t1), false, t3); + result.fixed$length = Array; + result.immutable$list = Array; + t2.push(new A.SassList0(result, B.ListSeparator_nbm0, false)); + } + return t2; + }, + get$lengthAsList() { + var t1 = this._map0$_contents; + return t1.get$length(t1); + }, + accept$1$1(visitor) { + return visitor.visitMap$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this; + }, + tryMap$0() { + return this; + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!(other instanceof A.SassMap0 && B.C_MapEquality.equals$2(0, other._map0$_contents, this._map0$_contents))) { + t1 = this._map0$_contents; + t1 = t1.get$isEmpty(t1) && other instanceof A.SassList0 && other._list1$_contents.length === 0; + } else + t1 = true; + return t1; + }, + get$hashCode(_) { + var t1 = this._map0$_contents; + return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty20) : B.C_MapEquality.hash$1(t1); + } + }; + A.global_closure43.prototype = { + call$1($arguments) { + var t1, + number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.hasUnit$1("%")) + A.warnForDeprecation0(string$.Passinp + number.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + number.toString$0(0) + string$.x7d__Mor, B.Deprecation_jYb); + else + A.warnForDeprecation0(string$.Global, B.Deprecation_wdM); + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(Math.abs(number._number1$_value), number.get$denominatorUnits(number), t1); + }, + $signature: 22 + }; + A.module_closure26.prototype = { + call$1(value) { + return Math.abs(value); + }, + $signature: 16 + }; + A._ceil_closure0.prototype = { + call$1(value) { + return B.JSNumber_methods.ceil$0(value); + }, + $signature: 16 + }; + A._clamp_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + min = t1.$index($arguments, 0).assertNumber$1("min"), + number = t1.$index($arguments, 1).assertNumber$1("number"), + max = t1.$index($arguments, 2).assertNumber$1("max"); + number.convertValueToMatch$3(min, "number", "min"); + max.convertValueToMatch$3(min, "max", "min"); + if (min.greaterThanOrEquals$1(max).value) + return min; + if (min.greaterThanOrEquals$1(number).value) + return min; + if (number.greaterThanOrEquals$1(max).value) + return max; + return number; + }, + $signature: 22 + }; + A._floor_closure0.prototype = { + call$1(value) { + return B.JSNumber_methods.floor$0(value); + }, + $signature: 16 + }; + A._max_closure0.prototype = { + call$1($arguments) { + var t1, t2, max, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (max == null || max.lessThan$1(number).value) + max = number; + } + if (max != null) + return max; + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + }, + $signature: 22 + }; + A._min_closure0.prototype = { + call$1($arguments) { + var t1, t2, min, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (min == null || min.greaterThan$1(number).value) + min = number; + } + if (min != null) + return min; + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + }, + $signature: 22 + }; + A._round_closure0.prototype = { + call$1(number) { + return B.JSNumber_methods.round$0(number); + }, + $signature: 16 + }; + A._hypot_closure0.prototype = { + call$1($arguments) { + var subtotal, i, i0, t3, t4, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber0>"), + numbers = A.List_List$of(new A.MappedListIterable(t1, new A._hypot__closure0(), t2), true, t2._eval$1("ListIterable.E")); + t1 = numbers.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + for (subtotal = 0, i = 0; i < t1; i = i0) { + i0 = i + 1; + subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); + } + t1 = Math.sqrt(subtotal); + t2 = numbers[0]; + t3 = J.getInterceptor$x(t2); + t4 = t3.get$numeratorUnits(t2); + return A.SassNumber_SassNumber$withUnits0(t1, t3.get$denominatorUnits(t2), t4); + }, + $signature: 22 + }; + A._hypot__closure0.prototype = { + call$1(argument) { + return argument.assertNumber$0(); + }, + $signature: 525 + }; + A._log_closure0.prototype = { + call$1($arguments) { + var base, + _s18_ = " to have no units.", + _null = null, + t1 = J.getInterceptor$asx($arguments), + number = t1.$index($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + _s18_, _null)); + else if (J.$eq$(t1.$index($arguments, 1), B.C__SassNull0)) + return A.SassNumber_SassNumber0(Math.log(number._number1$_value), _null); + base = t1.$index($arguments, 1).assertNumber$1("base"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$base: Expected " + base.toString$0(0) + _s18_, _null)); + else + return A.SassNumber_SassNumber0(Math.log(number._number1$_value) / Math.log(base._number1$_value), _null); + }, + $signature: 22 + }; + A._pow_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A.pow1(t1.$index($arguments, 0).assertNumber$1("base"), t1.$index($arguments, 1).assertNumber$1("exponent")); + }, + $signature: 22 + }; + A._atan2_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + y = t1.$index($arguments, 0).assertNumber$1("y"); + return A.SassNumber_SassNumber$withUnits0(Math.atan2(y._number1$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 22 + }; + A._compatible_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._isUnitless_closure0.prototype = { + call$1($arguments) { + return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._unit_closure0.prototype = { + call$1($arguments) { + return new A.SassString0(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); + }, + $signature: 17 + }; + A._percentage_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber0(number._number1$_value * 100, "%"); + }, + $signature: 22 + }; + A._randomFunction_closure0.prototype = { + call$1($arguments) { + var limit, limitScalar, + t1 = J.getInterceptor$asx($arguments); + if (J.$eq$(t1.$index($arguments, 0), B.C__SassNull0)) + return A.SassNumber_SassNumber0($.$get$_random2().nextDouble$0(), null); + limit = t1.$index($arguments, 0).assertNumber$1("limit"); + if (limit.get$hasUnits()) + A.warnForDeprecation0(string$.math_r + limit.toString$0(0) + string$.x29x20in_a + limit.get$unitString() + ")) * 1" + limit.get$unitString() + string$.x0a_To_p + limit.get$unitString() + string$.x29x29__Mo, B.Deprecation_oCX); + limitScalar = limit.assertInt$1("limit"); + if (limitScalar < 1) + throw A.wrapException(A.SassScriptException$0("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); + return A.SassNumber_SassNumber0($.$get$_random2().nextInt$1(limitScalar) + 1, null); + }, + $signature: 22 + }; + A._div_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + number1 = t1.$index($arguments, 0), + number2 = t1.$index($arguments, 1); + if (!(number1 instanceof A.SassNumber0) || !(number2 instanceof A.SassNumber0)) + A.warn0(string$.math_d); + return number1.dividedBy$1(number2); + }, + $signature: 3 + }; + A._singleArgumentMathFunc_closure0.prototype = { + call$1($arguments) { + return this.mathFunc.call$1(J.$index$asx($arguments, 0).assertNumber$1("number")); + }, + $signature: 22 + }; + A._numberFunction_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"), + t1 = this.transform.call$1(number._number1$_value), + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(t1, number.get$denominatorUnits(number), t2); + }, + $signature: 22 + }; + A.CssMediaQuery0.prototype = { + merge$1(other) { + var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; + if (!_this.conjunction || !other.conjunction) + return B._SingletonCssMediaQueryMergeResult_10; + t1 = _this.modifier; + ourModifier = t1 == null ? _null : t1.toLowerCase(); + t2 = _this.type; + t3 = t2 == null; + ourType = t3 ? _null : t2.toLowerCase(); + t4 = other.modifier; + theirModifier = t4 == null ? _null : t4.toLowerCase(); + t5 = other.type; + t6 = t5 == null; + theirType = t6 ? _null : t5.toLowerCase(); + t7 = ourType == null; + if (t7 && theirType == null) { + t1 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t1, other.conditions); + return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$condition0(t1, true)); + } + t8 = ourModifier === "not"; + if (t8 !== (theirModifier === "not")) { + if (ourType == theirType) { + negativeConditions = t8 ? _this.conditions : other.conditions; + if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) + return B._SingletonCssMediaQueryMergeResult_00; + else + return B._SingletonCssMediaQueryMergeResult_10; + } else if (t3 || A.equalsIgnoreCase0(t2, _s3_) || t6 || A.equalsIgnoreCase0(t5, _s3_)) + return B._SingletonCssMediaQueryMergeResult_10; + if (t8) { + conditions = other.conditions; + type = theirType; + modifier = theirModifier; + } else { + conditions = _this.conditions; + type = ourType; + modifier = ourModifier; + } + } else if (t8) { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_10; + fewerConditions = _this.conditions; + fewerConditions0 = other.conditions; + t3 = fewerConditions.length > fewerConditions0.length; + moreConditions = t3 ? fewerConditions : fewerConditions0; + if (t3) + fewerConditions = fewerConditions0; + if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) + return B._SingletonCssMediaQueryMergeResult_10; + conditions = moreConditions; + type = ourType; + modifier = ourModifier; + } else if (t3 || A.equalsIgnoreCase0(t2, _s3_)) { + type = (t6 || A.equalsIgnoreCase0(t5, _s3_)) && t7 ? _null : theirType; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = theirModifier; + } else { + if (t6 || A.equalsIgnoreCase0(t5, _s3_)) { + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = ourModifier; + } else { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_00; + else { + modifier = ourModifier == null ? theirModifier : ourModifier; + t3 = A.List_List$of(_this.conditions, true, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + } + conditions = t3; + } + type = ourType; + } + t2 = type == ourType ? t2 : t5; + return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$type0(t2, conditions, modifier == ourModifier ? t1 : t4)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CssMediaQuery0 && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); + }, + get$hashCode(_) { + return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.modifier; + t1 = t1 != null ? "" + (t1 + " ") : ""; + t2 = _this.type; + if (t2 != null) { + t1 += t2; + if (_this.conditions.length !== 0) + t1 += " and "; + } + t2 = _this.conjunction ? " and " : " or "; + t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._SingletonCssMediaQueryMergeResult0.prototype = { + _enumToString$0() { + return "_SingletonCssMediaQueryMergeResult." + this._name; + } + }; + A.MediaQuerySuccessfulMergeResult0.prototype = { + toString$0(_) { + return this.query.toString$0(0); + } + }; + A.MediaQueryParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure0(this)); + }, + _media_query$_mediaQuery$0() { + var conditions, conjunction, t1, identifier1, identifier2, type, modifier, _this = this, _s3_ = "and", _null = null; + if (_this.scanner.peekChar$0() === 40) { + conditions = A._setArrayType([_this._media_query$_mediaInParens$0()], type$.JSArray_String); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._media_query$_mediaLogicSequence$1(_s3_)); + conjunction = true; + } else { + t1 = _this.scanIdentifier$1("or"); + if (t1) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._media_query$_mediaLogicSequence$1("or")); + } + conjunction = !t1; + } + return A.CssMediaQuery$condition0(conditions, conjunction); + } + identifier1 = _this.identifier$0(); + if (A.equalsIgnoreCase0(identifier1, "not")) { + _this.expectWhitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$condition0(A._setArrayType(["(not " + _this._media_query$_mediaInParens$0() + ")"], type$.JSArray_String), _null); + } + _this.whitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$type0(identifier1, _null, _null); + identifier2 = _this.identifier$0(); + if (A.equalsIgnoreCase0(identifier2, _s3_)) { + _this.expectWhitespace$0(); + type = identifier1; + modifier = _null; + } else { + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) + _this.expectWhitespace$0(); + else + return A.CssMediaQuery$type0(identifier2, _null, identifier1); + type = identifier2; + modifier = identifier1; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + return A.CssMediaQuery$type0(type, A._setArrayType(["(not " + _this._media_query$_mediaInParens$0() + ")"], type$.JSArray_String), modifier); + } + return A.CssMediaQuery$type0(type, _this._media_query$_mediaLogicSequence$1(_s3_), modifier); + }, + _media_query$_mediaLogicSequence$1(operator) { + var t1, t2, _this = this, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.scanner; true;) { + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = _this.declarationValue$0(); + t1.expectChar$1(41); + result.push("(" + t2 + ")"); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return result; + _this.expectWhitespace$0(); + } + }, + _media_query$_mediaInParens$0() { + var t2, + t1 = this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = this.declarationValue$0(); + t1.expectChar$1(41); + return "(" + t2 + ")"; + } + }; + A.MediaQueryParser_parse_closure0.prototype = { + call$0() { + var queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$0(); + queries.push(t1._media_query$_mediaQuery$0()); + t1.whitespace$0(); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return queries; + }, + $signature: 526 + }; + A.ModifiableCssMediaRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssMediaRule0 && B.C_ListEquality.equals$2(0, this.queries, other.queries); + }, + copyWithoutChildren$0() { + return A.ModifiableCssMediaRule$0(this.queries, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.MediaRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitMediaRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@media " + this.query.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.MergedExtension0.prototype = { + unmerge$0() { + return new A._SyncStarIterable(this.unmerge$body$MergedExtension0(), type$._SyncStarIterable_Extension_2); + }, + unmerge$body$MergedExtension0() { + var $async$self = this; + return function() { + var $async$goto = 0, $async$handler = 1, $async$currentError, right, left; + return function $async$unmerge$0($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$currentError = $async$result; + $async$goto = $async$handler; + } + while (true) + switch ($async$goto) { + case 0: + // Function start + left = $async$self.left; + $async$goto = left instanceof A.MergedExtension0 ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return $async$iterator._yieldStar$1(left.unmerge$0()); + case 5: + // after yield + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 6; + return $async$iterator._async$_current = left, 1; + case 6: + // after yield + case 3: + // join + right = $async$self.right; + $async$goto = right instanceof A.MergedExtension0 ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return $async$iterator._yieldStar$1(right.unmerge$0()); + case 10: + // after yield + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = 11; + return $async$iterator._async$_current = right, 1; + case 11: + // after yield + case 8: + // join + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$currentError, 3; + } + }; + }; + } + }; + A.MergedMapView0.prototype = { + get$keys(_) { + var t1 = this._merged_map_view$_mapsByKey; + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); + }, + get$length(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length; + }, + get$isEmpty(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length !== 0; + }, + MergedMapView$10(maps, $K, $V) { + var t1, t2, t3, _i, map, t4, t5, t6; + for (t1 = maps.length, t2 = this._merged_map_view$_mapsByKey, t3 = $K._eval$1("@<0>")._bind$1($V)._eval$1("MergedMapView0<1,2>"), _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { + map = maps[_i]; + if (t3._is(map)) + for (t4 = map._merged_map_view$_mapsByKey.get$values(0), t5 = A._instanceType(t4), t4 = new A.MappedIterator(J.get$iterator$ax(t4.__internal$_iterable), t4._f, t5._eval$1("MappedIterator<1,2>")), t5 = t5._rest[1]; t4.moveNext$0();) { + t6 = t4.__internal$_current; + if (t6 == null) + t6 = t5._as(t6); + A.setAll0(t2, t6.get$keys(t6), t6); + } + else + A.setAll0(t2, map.get$keys(map), map); + } + }, + $index(_, key) { + var t1 = this._merged_map_view$_mapsByKey.$index(0, this.$ti._precomputed1._as(key)); + return t1 == null ? null : t1.$index(0, key); + }, + $indexSet(_, key, value) { + var _0_0 = this._merged_map_view$_mapsByKey.$index(0, key); + if (_0_0 != null) + _0_0.$indexSet(0, key, value); + else + throw A.wrapException(A.UnsupportedError$(string$.New_en)); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$(string$.Entrie)); + }, + containsKey$1(key) { + return this._merged_map_view$_mapsByKey.containsKey$1(key); + } + }; + A._shared_closure3.prototype = { + call$1($arguments) { + A.warnForDeprecation0(string$.The_fe, B.Deprecation_LBt); + return $._features0.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._shared_closure4.prototype = { + call$1($arguments) { + return new A.SassString0(A.serializeValue0(J.get$first$ax($arguments), true, true), false); + }, + $signature: 17 + }; + A._shared_closure5.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + _0_0 = t1.$index($arguments, 0); + $label0$0: { + if (_0_0 instanceof A.SassArgumentList0) { + t1 = "arglist"; + break $label0$0; + } + if (_0_0 instanceof A.SassBoolean0) { + t1 = "bool"; + break $label0$0; + } + if (_0_0 instanceof A.SassColor0) { + t1 = "color"; + break $label0$0; + } + if (_0_0 instanceof A.SassList0) { + t1 = "list"; + break $label0$0; + } + if (_0_0 instanceof A.SassMap0) { + t1 = "map"; + break $label0$0; + } + if (B.C__SassNull0 === _0_0) { + t1 = "null"; + break $label0$0; + } + if (_0_0 instanceof A.SassNumber0) { + t1 = "number"; + break $label0$0; + } + if (_0_0 instanceof A.SassFunction0) { + t1 = "function"; + break $label0$0; + } + if (_0_0 instanceof A.SassMixin0) { + t1 = "mixin"; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation0) { + t1 = "calculation"; + break $label0$0; + } + if (_0_0 instanceof A.SassString0) { + t1 = "string"; + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unknown value type " + A.S(t1.$index($arguments, 0))); + } + return new A.SassString0(t1, false); + }, + $signature: 17 + }; + A._shared_closure6.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + _1_0 = t1.$index($arguments, 0); + if (_1_0 instanceof A.SassArgumentList0) { + _1_0._argument_list$_wereKeywordsAccessed = true; + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(_1_0._argument_list$_keywords, type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, false), t4._1); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } else + throw A.wrapException("$args: " + A.S(t1.$index($arguments, 0)) + " is not an argument list."); + }, + $signature: 33 + }; + A.moduleFunctions_closure2.prototype = { + call$1($arguments) { + return new A.SassString0(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); + }, + $signature: 17 + }; + A.moduleFunctions_closure3.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; + return A.SassList$0(new A.MappedListIterable(t1, new A.moduleFunctions__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_ECn0, false); + }, + $signature: 26 + }; + A.moduleFunctions__closure0.prototype = { + call$1(argument) { + return argument instanceof A.Value0 ? argument : new A.SassString0(J.toString$0$(argument), false); + }, + $signature: 527 + }; + A.moduleFunctions_closure4.prototype = { + call$1($arguments) { + var _0_2_isSet, _0_2, acceptsContent, t1, _0_5_isSet, _0_5, hasContent, + mixin = J.$index$asx($arguments, 0).assertMixin$1("mixin"), + _0_0 = mixin.callable; + $label0$0: { + _0_2_isSet = type$.AsyncBuiltInCallable_2._is(_0_0); + if (_0_2_isSet) { + _0_2 = _0_0.get$acceptsContent(); + acceptsContent = _0_2; + } else + acceptsContent = null; + if (!_0_2_isSet) { + _0_2_isSet = _0_0 instanceof A.BuiltInCallable0; + if (_0_2_isSet) { + _0_2 = _0_0.acceptsContent; + acceptsContent = _0_2; + } + t1 = _0_2_isSet; + } else + t1 = true; + if (t1) { + t1 = acceptsContent; + break $label0$0; + } + _0_5_isSet = _0_0 instanceof A.UserDefinedCallable0; + if (_0_5_isSet) { + _0_5 = _0_0.declaration; + t1 = _0_5 instanceof A.MixinRule0; + } else { + _0_5 = null; + t1 = false; + } + if (t1) { + t1 = _0_5_isSet ? _0_5 : _0_0.declaration; + hasContent = type$.MixinRule_2._as(t1).get$hasContent(); + t1 = hasContent; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + return t1 ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A.mixinClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassMixin", new A.mixinClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(new A.SassMixin0(A.BuiltInCallable$function0("f", "", new A.mixinClass__closure0(), null)).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.mixinClass__closure.prototype = { + call$1($self) { + A.jsThrow(new self.Error("It is not possible to construct a SassMixin through the JavaScript API")); + }, + $signature: 528 + }; + A.mixinClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 3 + }; + A.SassMixin0.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._serialize0$_inspect) + A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize0$_buffer; + t1.write$1(0, "get-mixin("); + t2 = this.callable; + visitor._serialize0$_visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMixin$1($name) { + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassMixin0 && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.MixinRule0.prototype = { + get$hasContent() { + var result, _this = this, + value = _this._mixin_rule$__MixinRule_hasContent_FI; + if (value === $) { + result = J.$eq$(B.C__HasContentVisitor0.visitChildren$1(_this.children), true); + _this._mixin_rule$__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._mixin_rule$__MixinRule_hasContent_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitMixinRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = "@mixin " + this.name, + t2 = this.$arguments; + if (!(t2.$arguments.length === 0 && t2.restArgument == null)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = this.children; + t2 = t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._HasContentVisitor0.prototype = { + visitContentRule$1(_, _0) { + return true; + }, + $isStatementVisitor: 1 + }; + A.__HasContentVisitor_Object_StatementSearchVisitor0.prototype = {}; + A.ExtendMode0.prototype = { + _enumToString$0() { + return "ExtendMode." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.JSModule0.prototype = {}; + A.JSModuleRequire0.prototype = {}; + A.MultiSpan0.prototype = { + get$start(_) { + var t1 = this._multi_span0$_primary; + return t1.get$start(t1); + }, + get$end(_) { + var t1 = this._multi_span0$_primary; + return t1.get$end(t1); + }, + get$text() { + return this._multi_span0$_primary.get$text(); + }, + get$context(_) { + var t1 = this._multi_span0$_primary; + return t1.get$context(t1); + }, + get$file(_) { + var t1 = this._multi_span0$_primary; + return t1.get$file(t1); + }, + get$length(_) { + var t1 = this._multi_span0$_primary; + return t1.get$length(t1); + }, + get$sourceUrl(_) { + var t1 = this._multi_span0$_primary; + return t1.get$sourceUrl(t1); + }, + compareTo$1(_, other) { + return this._multi_span0$_primary.compareTo$1(0, other); + }, + toString$0(_) { + return this._multi_span0$_primary.toString$0(0); + }, + expand$1(_, other) { + return new A.MultiSpan0(this._multi_span0$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); + }, + highlight$1$color(color) { + return A.Highlighter$multiple(this._multi_span0$_primary, this.primaryLabel, this.secondarySpans, color === true, null, null).highlight$0(); + }, + message$2$color(_, message, color) { + var t1 = J.$eq$(color, true) || typeof color == "string", + t2 = typeof color == "string" ? color : null; + return A.SourceSpanExtension_messageMultiple(this._multi_span0$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2, null); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.SupportsNegation0.prototype = { + toString$0(_) { + var t1 = this.condition; + if (t1 instanceof A.SupportsNegation0 || t1 instanceof A.SupportsOperation0) + return "not (" + t1.toString$0(0) + ")"; + else + return "not " + t1.toString$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.NoOpImporter0.prototype = { + canonicalize$1(_, url) { + return null; + }, + load$1(_, url) { + return null; + }, + toString$0(_) { + return "(unknown)"; + } + }; + A.NoSourceMapBuffer0.prototype = { + get$length(_) { + return this._no_source_map_buffer0$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + return callback.call$0(); + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + write$1(_, object) { + var t1 = this._no_source_map_buffer0$_buffer, + t2 = A.S(object); + t1._contents += t2; + return null; + }, + writeCharCode$1(charCode) { + var t1 = this._no_source_map_buffer0$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + return null; + }, + toString$0(_) { + var t1 = this._no_source_map_buffer0$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + return A.throwExpression(A.UnsupportedError$(string$.NoSour)); + } + }; + A._FakeAstNode0.prototype = { + get$span(_) { + return this._node0$_callback.call$0(); + }, + $isAstNode0: 1 + }; + A.CssNode0.prototype = { + toString$0(_) { + var _null = null; + return A.serialize0(this, true, _null, true, _null, _null, false, _null, true)._0; + }, + $isAstNode0: 1 + }; + A.CssParentNode0.prototype = {}; + A._IsInvisibleVisitor1.prototype = { + visitCssAtRule$1(rule) { + return false; + }, + visitCssComment$1(comment) { + return this.includeComments && comment.text.charCodeAt(2) !== 33; + }, + visitCssStyleRule$1(rule) { + var t1 = rule._style_rule0$_selector._box0$_inner; + return (this.includeBogus ? t1.value.accept$1(B._IsInvisibleVisitor_true0) : t1.value.accept$1(B._IsInvisibleVisitor_false0)) || this.super$EveryCssVisitor$visitCssStyleRule0(rule); + } + }; + A.__IsInvisibleVisitor_Object_EveryCssVisitor0.prototype = {}; + A.ModifiableCssNode0.prototype = { + get$parent(_) { + return this._node$_parent; + }, + get$hasFollowingSibling() { + var t2, + t1 = this._node$_parent; + if (t1 == null) + t1 = null; + else { + t1 = t1.children; + t2 = this._node$_indexInParent; + t2.toString; + t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListBase.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure0()); + } + return t1 === true; + }, + get$isGroupEnd() { + return this.isGroupEnd; + } + }; + A.ModifiableCssNode_hasFollowingSibling_closure0.prototype = { + call$1(sibling) { + return !sibling.accept$1(B._IsInvisibleVisitor_true_false0); + }, + $signature: 529 + }; + A.ModifiableCssParentNode0.prototype = { + get$isChildless() { + return false; + }, + addChild$1(child) { + var t1; + child._node$_parent = this; + t1 = this._node$_children; + child._node$_indexInParent = t1.length; + t1.push(child); + }, + clearChildren$0() { + var t1, t2, _i, child; + for (t1 = this._node$_children, t2 = t1.length, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + child._node$_indexInParent = child._node$_parent = null; + } + B.JSArray_methods.clear$0(t1); + }, + $isCssParentNode0: 1, + get$children(receiver) { + return this.children; + } + }; + A.NodePackageImporter0.prototype = { + isNonCanonicalScheme$1(scheme) { + return scheme === "pkg"; + }, + canonicalize$1(_, url) { + var packageName, jsonPath, jsonString, packageManifest, e, t1, t2, t3, t4, baseDirectory, parts, t5, $name, subpath, packageRoot, exception, _1_0, rootPath, subpathInRoot, _this = this, _null = null; + if (url.get$scheme() === "file") + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); + if (url.get$scheme() !== "pkg") + return _null; + if (url.get$hasAuthority()) + throw A.wrapException(string$.A_pkg_h); + else { + t1 = $.$get$url(); + t2 = t1.style; + if (t2.rootLength$1(url.get$path(url)) > 0) + throw A.wrapException("A pkg: URL's path must not begin with /."); + else if (url.get$path(url).length === 0) + throw A.wrapException("A pkg: URL must not have an empty path."); + else if (url.get$hasQuery() || url.get$hasFragment()) + throw A.wrapException(string$.A_pkg_q); + } + t3 = A.canonicalizeContext0(); + t3._canonicalize_context$_wasContainingUrlAccessed = true; + t3 = t3._canonicalize_context$_containingUrl; + if ((t3 == null ? _null : t3.get$scheme()) === "file") { + t3 = A.canonicalizeContext0(); + t3._canonicalize_context$_wasContainingUrlAccessed = true; + t3 = t3._canonicalize_context$_containingUrl; + t3.toString; + t4 = $.$get$context(); + baseDirectory = t4.dirname$1(t4.style.pathFromUri$1(A._parseUri(t3))); + } else { + t3 = _this._node_package$__NodePackageImporter__entryPointDirectory_F; + t3 === $ && A.throwUnnamedLateFieldNI(); + baseDirectory = t3; + } + packageName = null; + parts = t1.split$1(0, url.get$path(url)); + t3 = B.JSArray_methods.removeAt$1(parts, 0); + t4 = $.$get$context(); + t3.toString; + t5 = t4.style; + $name = t5.pathFromUri$1(A._parseUri(t3)); + if (B.JSString_methods.startsWith$1($name, "@")) + $name = parts.length !== 0 ? t1.join$2(0, $name, B.JSArray_methods.removeAt$1(parts, 0)) : $name; + subpath = parts.length !== 0 ? t5.pathFromUri$1(A._parseUri(t1.joinAll$1(parts))) : _null; + packageName = $name; + t1 = true; + if (!J.startsWith$1$s(packageName, ".")) + if (!J.contains$1$asx(packageName, "\\")) + if (!J.contains$1$asx(packageName, "%")) + t1 = J.startsWith$1$s(packageName, "@") && !J.contains$1$asx(packageName, t2.get$separator(t2)); + if (t1) + return _null; + packageRoot = _this._node_package$_resolvePackageRoot$2(packageName, baseDirectory); + if (packageRoot == null) + return _null; + jsonPath = A.join(packageRoot, "package.json", _null); + jsonString = A.readFile0(jsonPath); + packageManifest = null; + try { + packageManifest = type$.Map_String_dynamic._as(B.C_JsonCodec.decode$1(jsonString)); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.S(jsonPath); + t2 = A.S(packageName); + t3 = A.S(e); + throw A.wrapException("Failed to parse " + t1 + ' for "pkg:' + t2 + '": ' + t3); + } + _1_0 = _this._node_package$_resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName); + if (_1_0 != null) + if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, t5)._splitExtension$1(1)[1])) + return t4.toUri$1(t4.canonicalize$1(0, _1_0)); + else { + t1 = subpath == null ? "root" : subpath; + throw A.wrapException("The export for '" + t1 + "' in '" + A.S(packageName) + "' resolved to '" + _1_0 + string$.x27x2c_whi); + } + if (subpath == null) { + rootPath = _this._node_package$_resolvePackageRootValues$2(packageRoot, packageManifest); + return rootPath != null ? t4.toUri$1(t4.canonicalize$1(0, rootPath)) : _null; + } + subpathInRoot = A.join(packageRoot, subpath, _null); + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, t4.toUri$1(subpathInRoot)); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd0().load$1(0, url); + }, + _node_package$_resolvePackageRoot$2(packageName, baseDirectory) { + var potentialPackage, t1; + for (; true;) { + potentialPackage = A.join(baseDirectory, "node_modules", packageName); + if (A.dirExists0(potentialPackage)) + return potentialPackage; + t1 = $.$get$context(); + if (t1.split$1(0, baseDirectory).length === 1) + return null; + baseDirectory = t1.dirname$1(baseDirectory); + } + }, + _node_package$_resolvePackageRootValues$2(packageRoot, packageManifest) { + var t1, sassValue, _1_0, styleValue, _null = null, + _0_0 = packageManifest.$index(0, "sass"); + if (typeof _0_0 == "string") { + t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_0_0, $.$get$url().style)._splitExtension$1(1)[1]); + sassValue = _0_0; + } else { + sassValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, sassValue, _null); + else { + _1_0 = packageManifest.$index(0, "style"); + if (typeof _1_0 == "string") { + t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, $.$get$url().style)._splitExtension$1(1)[1]); + styleValue = _1_0; + } else { + styleValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, styleValue, _null); + } + return A.resolveImportPath0(A.join(packageRoot, "index", _null)); + }, + _node_package$_resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName) { + var _0_0, _1_0, _this = this, + exports = packageManifest.$index(0, "exports"); + if (exports == null) + return null; + _0_0 = _this._node_package$_nodePackageExportsResolve$5(packageRoot, _this._node_package$_exportsToCheck$1(subpath), exports, subpath, packageName); + if (_0_0 != null) + return _0_0; + if (subpath != null && A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1].length !== 0) + return null; + _1_0 = _this._node_package$_nodePackageExportsResolve$5(packageRoot, _this._node_package$_exportsToCheck$2$addIndex(subpath, true), exports, subpath, packageName); + if (_1_0 != null) + return _1_0; + return null; + }, + _node_package$_nodePackageExportsResolve$5(packageRoot, subpathVariants, exports, subpath, packageName) { + var t1, matches, _1_1, path; + if (type$.Map_String_dynamic._is(exports) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure3()) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure4())) + throw A.wrapException("`exports` in " + packageName + string$.x20can_n + J.map$1$1$ax(J.get$keys$z(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure5(), type$.String).join$1(0, ",") + " in " + A.join(packageRoot, "package.json", null) + "."); + t1 = type$.NonNullsIterable_String; + matches = A.List_List$of(new A.NonNullsIterable(new A.MappedListIterable(subpathVariants, new A.NodePackageImporter__nodePackageExportsResolve_closure6(this, exports, packageRoot), A._arrayInstanceType(subpathVariants)._eval$1("MappedListIterable<1,String?>")), t1), true, t1._eval$1("Iterable.E")); + $label0$1: { + _1_1 = matches.length; + if (_1_1 === 1) { + path = matches[0]; + t1 = path; + break $label0$1; + } + if (_1_1 <= 0) { + t1 = null; + break $label0$1; + } + t1 = subpath == null ? "root" : subpath; + t1 = A.throwExpression(string$.Unable + t1 + " in " + packageName + " should be used. \n\nFound:\n" + B.JSArray_methods.join$1(matches, "\n")); + } + return t1; + }, + _node_package$_compareExpansionKeys$2(keyA, keyB) { + var t1 = B.JSString_methods.contains$1(keyA, "*"), + baseLengthA = t1 ? B.JSString_methods.indexOf$1(keyA, "*") + 1 : keyA.length, + t2 = B.JSString_methods.contains$1(keyB, "*"), + baseLengthB = t2 ? B.JSString_methods.indexOf$1(keyB, "*") + 1 : keyB.length; + if (baseLengthA > baseLengthB) + return -1; + if (baseLengthB > baseLengthA) + return 1; + if (!t1) + return 1; + if (!t2) + return -1; + t1 = keyA.length; + t2 = keyB.length; + if (t1 > t2) + return -1; + if (t2 > t1) + return 1; + return 0; + }, + _node_package$_packageTargetResolve$4(subpath, exports, packageRoot, patternMatch) { + var t2, string, path, map, key, value, _1_0, array, _2_0, _null = null, + t1 = typeof exports == "string"; + if (t1) { + t2 = !B.JSString_methods.startsWith$1(exports, "./"); + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) + throw A.wrapException("Export '" + A.S(string) + string$.x27x20must + packageRoot + "'."); + if (t1) { + t2 = patternMatch != null; + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) { + t1 = J.replaceFirst$2$s(string, "*", patternMatch); + t2 = $.$get$context(); + path = t2.normalize$1(A.join(packageRoot, t2.style.pathFromUri$1(A._parseUri(t1)), _null)); + return A.fileExists0(path) ? path : _null; + } + string = t1 ? exports : _null; + if (t1) { + t1 = $.$get$context(); + string.toString; + return A.join(packageRoot, t1.style.pathFromUri$1(A._parseUri(string)), _null); + } + t1 = type$.Map_String_dynamic._is(exports); + map = t1 ? exports : _null; + if (t1) { + for (t1 = A.MapExtensions_get_pairs(map, type$.String, type$.dynamic), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + key = t2._0; + value = t2._1; + if (!B.Set_TnQrk.contains$1(0, key)) + continue; + if (value == null) + continue; + _1_0 = this._node_package$_packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_1_0 != null) + return _1_0; + } + return _null; + } + if (type$.List_nullable_Object._is(exports) && J.get$length$asx(exports) <= 0) + return _null; + t1 = type$.List_dynamic._is(exports); + array = t1 ? exports : _null; + if (t1) { + for (t1 = J.get$iterator$ax(array); t1.moveNext$0();) { + value = t1.get$current(t1); + if (value == null) + continue; + _2_0 = this._node_package$_packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_2_0 != null) + return _2_0; + } + return _null; + } + throw A.wrapException("Invalid 'exports' value " + A.S(exports) + " in " + A.join(packageRoot, "package.json", _null) + "."); + }, + _node_package$_packageTargetResolve$3(subpath, exports, packageRoot) { + return this._node_package$_packageTargetResolve$4(subpath, exports, packageRoot, null); + }, + _node_package$_getMainExport$1(exports) { + var t1, t2, t3, map, _0_4, t4, $export; + $label0$0: { + t1 = null; + if (typeof exports == "string") { + t1 = exports; + break $label0$0; + } + if (type$.List_String._is(exports)) { + t1 = exports; + break $label0$0; + } + t2 = type$.Map_String_dynamic._is(exports); + if (t2) { + t3 = !J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__getMainExport_closure0()); + map = exports; + } else { + map = t1; + t3 = false; + } + if (t3) { + t1 = map; + break $label0$0; + } + t3 = false; + if (t2) { + _0_4 = exports.$index(0, "."); + if (_0_4 == null) + t4 = exports.containsKey$1("."); + else + t4 = true; + if (t4) + t3 = _0_4 != null; + } else + _0_4 = null; + if (t3) { + $export = t2 ? _0_4 : J.$index$asx(exports, "."); + t1 = $export; + break $label0$0; + } + break $label0$0; + } + return t1; + }, + _node_package$_exportsToCheck$2$addIndex(subpath, addIndex) { + var basename, dirname, t3, t4, _i, path, + t1 = type$.JSArray_String, + paths = A._setArrayType([], t1), + t2 = subpath == null; + if (t2 && addIndex) + subpath = "index"; + else if (!t2 && addIndex) + subpath = A.join(subpath, "index", null); + if (subpath == null) + return A._setArrayType([null], type$.JSArray_nullable_String); + if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1])) + paths.push(subpath); + else + B.JSArray_methods.addAll$1(paths, A._setArrayType([subpath, subpath + ".scss", subpath + ".sass", subpath + ".css"], t1)); + t1 = $.$get$context(); + t2 = t1.style; + basename = A.ParsedPath_ParsedPath$parse(subpath, t2).get$basename(); + dirname = t1.dirname$1(subpath); + if (B.JSString_methods.startsWith$1(basename, "_")) + return paths; + t1 = A.List_List$of(paths, true, type$.nullable_String); + for (t3 = paths.length, t4 = dirname === ".", _i = 0; _i < paths.length; paths.length === t3 || (0, A.throwConcurrentModificationError)(paths), ++_i) { + path = paths[_i]; + if (t4) + t1.push("_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename()); + else + t1.push(A.join(dirname, "_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename(), null)); + } + return t1; + }, + _node_package$_exportsToCheck$1(subpath) { + return this._node_package$_exportsToCheck$2$addIndex(subpath, false); + } + }; + A.NodePackageImporter__nodePackageExportsResolve_closure3.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure4.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure5.prototype = { + call$1(key) { + return '"' + key + '"'; + }, + $signature: 6 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure6.prototype = { + call$1(variant) { + var t1, matchKey, t2, t3, t4, t5, t6, _i, expansionKey, _0_0, t7, patternBase, patternTrailer, t8, target, _this = this, _null = null; + if (variant == null) { + t1 = _this.$this; + return A.NullableExtension_andThen(t1._node_package$_getMainExport$1(_this.exports), new A.NodePackageImporter__nodePackageExportsResolve__closure1(t1, variant, _this.packageRoot)); + } else { + t1 = _this.exports; + if (!type$.Map_String_dynamic._is(t1) || J.every$1$ax(t1.get$keys(t1), new A.NodePackageImporter__nodePackageExportsResolve__closure2())) + return _null; + } + matchKey = "./" + $.$get$context().toUri$1(variant).toString$0(0); + if (t1.containsKey$1(matchKey) && J.$index$asx(t1, matchKey) != null && !B.JSString_methods.contains$1(matchKey, "*")) { + t1 = J.$index$asx(t1, matchKey); + if (t1 == null) + t1 = type$.Object._as(t1); + return _this.$this._node_package$_packageTargetResolve$3(matchKey, t1, _this.packageRoot); + } + t2 = A._setArrayType([], type$.JSArray_String); + for (t3 = J.getInterceptor$z(t1), t4 = J.get$iterator$ax(t3.get$keys(t1)); t4.moveNext$0();) { + t5 = t4.get$current(t4); + if (B.JSString_methods.allMatches$1("*", t5).get$length(0) === 1) + t2.push(t5); + } + t4 = _this.$this; + B.JSArray_methods.sort$1(t2, t4.get$_node_package$_compareExpansionKeys()); + for (t5 = t2.length, t6 = matchKey.length, _i = 0; _i < t2.length; t2.length === t5 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + expansionKey = t2[_i]; + _0_0 = expansionKey.split("*"); + t7 = _0_0.length === 2; + if (t7) { + patternBase = _0_0[0]; + patternTrailer = _0_0[1]; + patternTrailer = patternTrailer; + } else { + patternTrailer = _null; + patternBase = patternTrailer; + } + if (!t7) + throw A.wrapException(A.StateError$("Pattern matching error")); + if (!B.JSString_methods.startsWith$1(matchKey, patternBase)) + continue; + if (matchKey === patternBase) + continue; + t7 = patternTrailer.length; + if (t7 !== 0) + t8 = B.JSString_methods.endsWith$1(matchKey, patternTrailer) && t6 >= expansionKey.length; + else + t8 = true; + if (t8) { + target = t3.$index(t1, expansionKey); + if (target == null) + continue; + return t4._node_package$_packageTargetResolve$4(variant, target, _this.packageRoot, B.JSString_methods.substring$2(matchKey, patternBase.length, t6 - t7)); + } + } + return _null; + }, + $signature: 146 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure1.prototype = { + call$1(mainExport) { + return this.$this._node_package$_packageTargetResolve$3(this.variant, mainExport, this.packageRoot); + }, + $signature: 147 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure2.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.NodePackageImporter__getMainExport_closure0.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 5 + }; + A.NullExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitNullExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "null"; + }, + get$span(receiver) { + return this.span; + } + }; + A.legacyNullClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Null", new A.legacyNullClass__closure())); + jsClass.NULL = B.C__SassNull0; + A.JSClassExtension_injectSuperclass(t1._as(B.C__SassNull0.constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.legacyNullClass__closure.prototype = { + call$2(_, __) { + throw A.wrapException("new sass.types.Null() isn't allowed. Use sass.types.Null.NULL instead."); + }, + call$1(_) { + return this.call$2(_, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 220 + }; + A._SassNull0.prototype = { + get$isTruthy() { + return false; + }, + get$isBlank() { + return true; + }, + get$realNull() { + return null; + }, + accept$1$1(visitor) { + if (visitor._serialize0$_inspect) + visitor._serialize0$_buffer.write$1(0, "null"); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return B.SassBoolean_true0; + } + }; + A.NumberExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitNumberExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue0(A.SassNumber_SassNumber0(this.value, this.unit), true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.numberClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassNumber", new A.numberClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["value", new A.numberClass__closure0(), "isInt", new A.numberClass__closure1(), "asInt", new A.numberClass__closure2(), "numeratorUnits", new A.numberClass__closure3(), "denominatorUnits", new A.numberClass__closure4(), "hasUnits", new A.numberClass__closure5()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["assertInt", new A.numberClass__closure6(), "assertInRange", new A.numberClass__closure7(), "assertNoUnits", new A.numberClass__closure8(), "assertUnit", new A.numberClass__closure9(), "hasUnit", new A.numberClass__closure10(), "compatibleWithUnit", new A.numberClass__closure11(), "convert", new A.numberClass__closure12(), "convertToMatch", new A.numberClass__closure13(), "convertValue", new A.numberClass__closure14(), "convertValueToMatch", new A.numberClass__closure15(), "coerce", new A.numberClass__closure16(), "coerceToMatch", new A.numberClass__closure17(), "coerceValue", new A.numberClass__closure18(), "coerceValueToMatch", new A.numberClass__closure19()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(A.SassNumber_SassNumber0(0, null).constructor))).constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.numberClass__closure.prototype = { + call$3($self, value, unitOrOptions) { + var t1, t2, _null = null; + if (typeof unitOrOptions == "string") + return A.SassNumber_SassNumber0(value, unitOrOptions); + type$.nullable__ConstructorOptions_2._as(unitOrOptions); + t1 = unitOrOptions == null; + if (t1) + t2 = _null; + else { + t2 = A.NullableExtension_andThen0(J.get$numeratorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); + t2 = t2 == null ? _null : J.cast$1$0$ax(t2, type$.String); + } + if (t1) + t1 = _null; + else { + t1 = A.NullableExtension_andThen0(J.get$denominatorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); + t1 = t1 == null ? _null : J.cast$1$0$ax(t1, type$.String); + } + return A.SassNumber_SassNumber$withUnits0(value, t1, t2); + }, + call$2($self, value) { + return this.call$3($self, value, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 530 + }; + A.numberClass__closure0.prototype = { + call$1($self) { + return $self._number1$_value; + }, + $signature: 102 + }; + A.numberClass__closure1.prototype = { + call$1($self) { + return A.fuzzyIsInt0($self._number1$_value); + }, + $signature: 249 + }; + A.numberClass__closure2.prototype = { + call$1($self) { + return A.fuzzyAsInt0($self._number1$_value); + }, + $signature: 532 + }; + A.numberClass__closure3.prototype = { + call$1($self) { + return new self.immutable.List($self.get$numeratorUnits($self)); + }, + $signature: 250 + }; + A.numberClass__closure4.prototype = { + call$1($self) { + return new self.immutable.List($self.get$denominatorUnits($self)); + }, + $signature: 250 + }; + A.numberClass__closure5.prototype = { + call$1($self) { + return $self.get$hasUnits(); + }, + $signature: 249 + }; + A.numberClass__closure6.prototype = { + call$2($self, $name) { + return $self.assertInt$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 534 + }; + A.numberClass__closure7.prototype = { + call$4($self, min, max, $name) { + return $self.valueInRange$3(min, max, $name); + }, + call$3($self, min, max) { + return this.call$4($self, min, max, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 535 + }; + A.numberClass__closure8.prototype = { + call$2($self, $name) { + $self.assertNoUnits$1($name); + return $self; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 536 + }; + A.numberClass__closure9.prototype = { + call$3($self, unit, $name) { + $self.assertUnit$2(unit, $name); + return $self; + }, + call$2($self, unit) { + return this.call$3($self, unit, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 537 + }; + A.numberClass__closure10.prototype = { + call$2($self, unit) { + return $self.hasUnit$1(unit); + }, + $signature: 251 + }; + A.numberClass__closure11.prototype = { + call$2($self, unit) { + return $self.get$hasUnits() && $self.compatibleWithUnit$1(unit); + }, + $signature: 251 + }; + A.numberClass__closure12.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + t2 = J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2); + return A.SassNumber_SassNumber$withUnits0($self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, t2, false, $name), t2, t1); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 252 + }; + A.numberClass__closure13.prototype = { + call$4($self, other, $name, otherName) { + return $self.convertToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 253 + }; + A.numberClass__closure14.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), false, $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 254 + }; + A.numberClass__closure15.prototype = { + call$4($self, other, $name, otherName) { + return $self.convertValueToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 255 + }; + A.numberClass__closure16.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self.coerce$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 252 + }; + A.numberClass__closure17.prototype = { + call$4($self, other, $name, otherName) { + return $self.coerceToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 253 + }; + A.numberClass__closure18.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self.coerceValue$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 254 + }; + A.numberClass__closure19.prototype = { + call$4($self, other, $name, otherName) { + return $self.coerceValueToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 255 + }; + A._ConstructorOptions0.prototype = {}; + A._NodeSassNumber.prototype = {}; + A.legacyNumberClass_closure.prototype = { + call$4(thisArg, value, unit, dartValue) { + var t1; + if (dartValue == null) { + value.toString; + t1 = A._parseNumber(value, unit); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, value) { + return this.call$4(thisArg, value, null, null); + }, + call$3(thisArg, value, unit) { + return this.call$4(thisArg, value, unit, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 543 + }; + A.legacyNumberClass_closure0.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._number1$_value; + }, + $signature: 544 + }; + A.legacyNumberClass_closure1.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = J.get$numeratorUnits$x(t1.get$dartValue(thisArg)); + t1.set$dartValue(thisArg, A.SassNumber_SassNumber$withUnits0(value, J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), t2)); + }, + $signature: 545 + }; + A.legacyNumberClass_closure2.prototype = { + call$1(thisArg) { + var t1 = J.getInterceptor$x(thisArg), + t2 = B.JSArray_methods.join$1(J.get$numeratorUnits$x(t1.get$dartValue(thisArg)), "*"), + t3 = J.get$denominatorUnits$x(t1.get$dartValue(thisArg)).length === 0 ? "" : "/"; + return t2 + t3 + B.JSArray_methods.join$1(J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), "*"); + }, + $signature: 546 + }; + A.legacyNumberClass_closure3.prototype = { + call$2(thisArg, unit) { + var t1 = J.getInterceptor$x(thisArg); + t1.set$dartValue(thisArg, A._parseNumber(t1.get$dartValue(thisArg)._number1$_value, unit)); + }, + $signature: 547 + }; + A._parseNumber_closure.prototype = { + call$1(unit) { + return unit.length === 0; + }, + $signature: 5 + }; + A._parseNumber_closure0.prototype = { + call$1(unit) { + return unit.length === 0; + }, + $signature: 5 + }; + A.SassNumber0.prototype = { + get$unitString() { + var _this = this; + return _this.get$hasUnits() ? _this._number1$_unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; + }, + accept$1$1(visitor) { + return visitor.visitNumber$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + withoutSlash$0() { + var _this = this; + return _this.asSlash == null ? _this : _this.withValue$1(_this._number1$_value); + }, + assertNumber$1($name) { + return this; + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertInt$1($name) { + var _0_0 = A.fuzzyAsInt0(this._number1$_value); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + " is not an int.", $name)); + }, + assertInt$0() { + return this.assertInt$1(null); + }, + valueInRange$3(min, max, $name) { + var _this = this, + _0_0 = A.fuzzyCheckRange0(_this._number1$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0("Expected " + _this.toString$0(0) + " to be within " + A.S(min) + _this.get$unitString() + " and " + A.S(max) + _this.get$unitString() + ".", $name)); + }, + valueInRangeWithUnit$4(min, max, $name, unit) { + var _0_0 = A.fuzzyCheckRange0(this._number1$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); + }, + hasCompatibleUnits$1(other) { + var _this = this; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) + return false; + if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + return _this.isComparableTo$1(other); + }, + assertUnit$2(unit, $name) { + if (this.hasUnit$1(unit)) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); + }, + assertNoUnits$1($name) { + if (!this.get$hasUnits()) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to have no units.", $name)); + }, + assertNoUnits$0() { + return this.assertNoUnits$1(null); + }, + convertToMatch$3(other, $name, otherName) { + var t1 = this.convertValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); + }, + convertValueToMatch$3(other, $name, otherName) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits0(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); + }, + coerceValueToUnit$2(unit, $name) { + var t1 = type$.JSArray_String; + return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = this.coerceValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + _number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { + var t1, otherHasUnits, t2, compatibilityException, oldNumerators, oldDenominators, _this = this, _box_0 = {}; + if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) + return _this._number1$_value; + t1 = J.getInterceptor$asx(newNumerators); + otherHasUnits = t1.get$isNotEmpty(newNumerators) || J.get$isNotEmpty$asx(newDenominators); + if (coerceUnitless) + t2 = !_this.get$hasUnits() || !otherHasUnits; + else + t2 = false; + if (t2) + return _this._number1$_value; + compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException0(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); + _box_0.value = _this._number1$_value; + t2 = _this.get$numeratorUnits(_this); + oldNumerators = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + for (t1 = t1.get$iterator(newNumerators); t1.moveNext$0();) + A.removeFirstWhere0(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure3(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure4(compatibilityException)); + t1 = _this.get$denominatorUnits(_this); + oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = J.get$iterator$ax(newDenominators); t1.moveNext$0();) + A.removeFirstWhere0(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure5(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure6(compatibilityException)); + if (oldNumerators.length !== 0 || oldDenominators.length !== 0) + throw A.wrapException(compatibilityException.call$0()); + return _box_0.value; + }, + _number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); + }, + isComparableTo$1(other) { + var exception; + if (!this.get$hasUnits() || !other.get$hasUnits()) + return true; + try { + this.greaterThan$1(other); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException0) + return false; + else + throw exception; + } + }, + greaterThan$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + if (other instanceof A.SassNumber0) + return this.withValue$1(this._number1$_coerceUnits$2(other, A.number2__moduloLikeSass$closure())); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) + return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_plus_closure0())); + if (!(other instanceof A.SassColor0)) + return _this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) + return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_minus_closure0())); + if (!(other instanceof A.SassColor0)) + return _this.super$Value$minus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number1$_value * other._number1$_value); + return _this.multiplyUnits$3(_this._number1$_value * other._number1$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); + } + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number1$_value / other._number1$_value); + return _this.multiplyUnits$3(_this._number1$_value / other._number1$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); + } + return _this.super$Value$dividedBy0(other); + }, + unaryPlus$0() { + return this; + }, + _number1$_coerceUnits$1$2(other, operation) { + var t1, exception; + try { + t1 = operation.call$2(this._number1$_value, other.coerceValueToMatch$1(this)); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException0) { + this.coerceValueToMatch$1(other); + throw exception; + } else + throw exception; + } + }, + _number1$_coerceUnits$2(other, operation) { + return this._number1$_coerceUnits$1$2(other, operation, type$.dynamic); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var t1, _0_1, _0_6, _0_3, _0_9, _0_9_isSet, _0_7, _0_7_isSet, t2, _0_2, denominators_case_0, _0_11_isSet, _0_11, _0_13, _0_13_isSet, _0_10, numerators_case_0, t4, t3, t5, t6, t7, numerators_case_1, denominators_case_1, t0, newNumerators, mutableOtherDenominators, _i, numerator, mutableDenominatorUnits, _this = this, _null = null, _box_0 = {}; + _box_0.value = value; + t1 = [_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this), otherNumerators, otherDenominators]; + _0_1 = t1[0]; + _0_6 = _null; + _0_3 = _null; + _0_9 = _null; + _0_9_isSet = false; + _0_7 = _null; + _0_7_isSet = false; + t2 = false; + _0_2 = t1[1]; + _0_3 = t1[2]; + _0_6 = _0_3.length <= 0; + _0_7_isSet = _0_6; + if (_0_7_isSet) { + _0_7 = t1[3]; + _0_9 = _0_7.length <= 0; + t2 = _0_9; + } + _0_9_isSet = _0_7_isSet; + denominators_case_0 = _0_2; + _0_11_isSet = !t2; + _0_11 = _null; + _0_13 = _null; + if (_0_11_isSet) { + _0_11 = _0_1.length <= 0; + _0_13_isSet = _0_11; + _0_10 = _0_1; + if (_0_13_isSet) { + _0_13 = _0_2.length <= 0; + t2 = _0_13; + if (t2) { + if (_0_7_isSet) + denominators_case_0 = _0_7; + else { + _0_7 = t1[3]; + denominators_case_0 = _0_7; + _0_7_isSet = true; + } + numerators_case_0 = _0_3; + } else + numerators_case_0 = _0_1; + } else { + numerators_case_0 = _0_1; + t2 = false; + } + _0_1 = _0_10; + } else { + numerators_case_0 = _0_1; + _0_13_isSet = false; + t2 = true; + } + if (t2) { + t4 = denominators_case_0; + t3 = numerators_case_0; + } else { + t4 = _null; + t3 = t4; + } + if (!t2) { + t2 = _null; + t5 = _null; + if (_0_11_isSet) + t6 = _0_11; + else { + _0_11 = _0_1.length <= 0; + t6 = _0_11; + } + t7 = false; + if (t6) { + if (_0_9_isSet) + t2 = _0_9; + else { + if (_0_7_isSet) + t2 = _0_7; + else { + _0_7 = t1[3]; + t2 = _0_7; + _0_7_isSet = true; + } + _0_9 = t2.length <= 0; + t2 = _0_9; + } + numerators_case_1 = _0_3; + denominators_case_1 = _0_2; + } else { + numerators_case_1 = t2; + t2 = t7; + denominators_case_1 = t5; + } + if (!t2) { + t2 = false; + if (_0_13_isSet) + t5 = _0_13; + else { + _0_13 = _0_2.length <= 0; + t5 = _0_13; + } + if (t5) { + if (_0_6) + denominators_case_1 = _0_7_isSet ? _0_7 : t1[3]; + t1 = _0_6; + } else + t1 = t2; + numerators_case_1 = _0_1; + } else + t1 = true; + if (t1) { + t1 = !_this._number1$_areAnyConvertible$2(numerators_case_1, denominators_case_1); + if (t1) { + t3 = denominators_case_1; + t2 = numerators_case_1; + } else { + t2 = t3; + t3 = t4; + } + t0 = t3; + t3 = t1; + t1 = t2; + t2 = t0; + } else { + t2 = t4; + t1 = t3; + t3 = false; + } + } else { + t2 = t4; + t1 = t3; + t3 = true; + } + if (t3) + return A.SassNumber_SassNumber$withUnits0(value, t2, t1); + newNumerators = A._setArrayType([], type$.JSArray_String); + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { + numerator = t1[_i]; + A.removeFirstWhere0(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure3(_box_0, numerator), new A.SassNumber_multiplyUnits_closure4(newNumerators, numerator)); + } + t1 = _this.get$denominatorUnits(_this); + mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { + numerator = otherNumerators[_i]; + A.removeFirstWhere0(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure5(_box_0, numerator), new A.SassNumber_multiplyUnits_closure6(newNumerators, numerator)); + } + t1 = _box_0.value; + B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); + return A.SassNumber_SassNumber$withUnits0(t1, mutableDenominatorUnits, newNumerators); + }, + _number1$_areAnyConvertible$2(units1, units2) { + return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure0(units2)); + }, + _number1$_unitString$2(numerators, denominators) { + var _0_4, _0_7, _0_6, _0_5, t1, _null = null; + $label0$0: { + _0_4 = J.get$length$asx(numerators) <= 0; + _0_7 = _null; + _0_6 = _null; + _0_5 = _null; + if (_0_4) { + _0_6 = J.get$length$asx(denominators); + t1 = _0_6; + _0_7 = t1 <= 0; + t1 = _0_7; + _0_5 = denominators; + } else + t1 = false; + if (t1) { + t1 = "no units"; + break $label0$0; + } + if (_0_4) + t1 = _0_6 === 1; + else + t1 = false; + if (t1) { + t1 = J.$index$asx(_0_4 ? _0_5 : denominators, 0) + "^-1"; + break $label0$0; + } + if (_0_4) { + t1 = "(" + J.join$1$ax(denominators, "*") + ")^-1"; + break $label0$0; + } + _0_6 = J.get$length$asx(denominators); + t1 = _0_6; + _0_7 = t1 <= 0; + t1 = _0_7; + if (t1) { + t1 = J.join$1$ax(numerators, "*"); + break $label0$0; + } + t1 = J.join$1$ax(numerators, "*") + "/" + J.join$1$ax(denominators, "*"); + break $label0$0; + } + return t1; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassNumber0)) + return false; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + if (!_this.get$hasUnits()) + return A.fuzzyEquals0(_this._number1$_value, other._number1$_value); + if (!B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$denominatorUnits(other)))) + return false; + return A.fuzzyEquals0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number1$_value * _this._number1$_canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._number1$_canonicalMultiplier$1(other.get$denominatorUnits(other))); + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; + }, + _number1$_canonicalizeUnitList$1(units) { + var type, + t1 = units.length; + if (t1 === 0) + return units; + if (t1 === 1) { + type = $.$get$_typesByUnit0().$index(0, B.JSArray_methods.get$first(units)); + if (type == null) + t1 = units; + else { + t1 = B.Map_397RH.$index(0, type); + t1.toString; + t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); + } + return t1; + } + t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); + t1 = A.List_List$of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure0(), t1), true, t1._eval$1("ListIterable.E")); + B.JSArray_methods.sort$0(t1); + return t1; + }, + _number1$_canonicalMultiplier$1(units) { + return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure0(this)); + }, + canonicalMultiplierForUnit$1(unit) { + var t1, + innerMap = B.Map_gQqJO.$index(0, unit); + if (innerMap == null) + t1 = 1; + else { + t1 = innerMap.get$values(innerMap); + t1 = 1 / t1.get$first(t1); + } + return t1; + }, + unitSuggestion$2($name, unit) { + var t2, t3, result, _this = this, + t1 = _this.get$denominatorUnits(_this); + t1 = new A.MappedListIterable(t1, new A.SassNumber_unitSuggestion_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + t2 = _this.get$numeratorUnits(_this); + t2 = new A.MappedListIterable(t2, new A.SassNumber_unitSuggestion_closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); + t3 = unit == null ? "" : " * 1" + unit; + result = "$" + $name + t1 + t2 + t3; + return _this.get$numeratorUnits(_this).length === 0 ? result : "calc(" + result + ")"; + }, + unitSuggestion$1($name) { + return this.unitSuggestion$2($name, null); + } + }; + A.SassNumber__coerceOrConvertValue_compatibilityException0.prototype = { + call$0() { + var t2, t3, message, t4, type, unit, _this = this, + t1 = _this.other; + if (t1 != null) { + t2 = _this.$this; + t3 = t2.toString$0(0) + " and"; + message = new A.StringBuffer(t3); + t4 = _this.otherName; + if (t4 != null) + t3 = message._contents = t3 + (" $" + t4 + ":"); + t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); + message._contents = t1; + if (!t2.get$hasUnits() || !_this.otherHasUnits) + message._contents = t1 + " (one has units and the other doesn't)"; + t1 = message.toString$0(0) + "."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else if (!_this.otherHasUnits) { + t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else { + t1 = _this.newNumerators; + t2 = J.getInterceptor$asx(t1); + if (t2.get$length(t1) === 1 && J.get$isEmpty$asx(_this.newDenominators)) { + type = $.$get$_typesByUnit0().$index(0, t2.get$first(t1)); + if (type != null) { + t1 = _this.$this.toString$0(0); + t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), type.charCodeAt(0)) ? "an " + type : "a " + type; + t3 = B.Map_397RH.$index(0, type); + t3.toString; + t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t3 : "$" + t2 + ": " + t3); + } + } + t3 = _this.newDenominators; + unit = A.pluralize0("unit", t2.get$length(t1) + J.get$length$asx(t3), null); + t2 = _this.$this; + t3 = "Expected " + t2.toString$0(0) + " to have " + unit + " " + t2._number1$_unitString$2(t1, t3) + "."; + t1 = _this.name; + return new A.SassScriptException0(t1 == null ? t3 : "$" + t1 + ": " + t3); + } + }, + $signature: 548 + }; + A.SassNumber__coerceOrConvertValue_closure3.prototype = { + call$1(oldNumerator) { + var factor = A.conversionFactor0(this.newNumerator, oldNumerator); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber__coerceOrConvertValue_closure4.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber__coerceOrConvertValue_closure5.prototype = { + call$1(oldDenominator) { + var factor = A.conversionFactor0(this.newDenominator, oldDenominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber__coerceOrConvertValue_closure6.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber_plus_closure0.prototype = { + call$2(num1, num2) { + return num1 + num2; + }, + $signature: 62 + }; + A.SassNumber_minus_closure0.prototype = { + call$2(num1, num2) { + return num1 - num2; + }, + $signature: 62 + }; + A.SassNumber_multiplyUnits_closure3.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber_multiplyUnits_closure4.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber_multiplyUnits_closure5.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 5 + }; + A.SassNumber_multiplyUnits_closure6.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber__areAnyConvertible_closure0.prototype = { + call$1(unit1) { + var t1, + _0_0 = B.Map_gQqJO.$index(0, unit1); + $label0$0: { + if (_0_0 != null) { + t1 = B.JSArray_methods.any$1(this.units2, _0_0.get$containsKey()); + break $label0$0; + } + t1 = B.JSArray_methods.contains$1(this.units2, unit1); + break $label0$0; + } + return t1; + }, + $signature: 5 + }; + A.SassNumber__canonicalizeUnitList_closure0.prototype = { + call$1(unit) { + var t1, + type = $.$get$_typesByUnit0().$index(0, unit); + if (type == null) + t1 = unit; + else { + t1 = B.Map_397RH.$index(0, type); + t1.toString; + t1 = B.JSArray_methods.get$first(t1); + } + return t1; + }, + $signature: 6 + }; + A.SassNumber__canonicalMultiplier_closure0.prototype = { + call$2(multiplier, unit) { + return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); + }, + $signature: 163 + }; + A.SassNumber_unitSuggestion_closure1.prototype = { + call$1(unit) { + return " * 1" + unit; + }, + $signature: 6 + }; + A.SassNumber_unitSuggestion_closure2.prototype = { + call$1(unit) { + return " / 1" + unit; + }, + $signature: 6 + }; + A.OklabColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var missingLightness, missingA, missingB, t1; + if (dest === B.OklchColorSpace_li80) + return A.labToLch0(dest, lightness, a, b, alpha, missingChroma, missingHue); + missingLightness = lightness == null; + missingA = a == null; + missingB = b == null; + if (missingLightness) + lightness = 0; + if (missingA) + a = 0; + if (missingB) + b = 0; + t1 = $.$get$oklabToLms0(); + return B.LmsColorSpace_8I80.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, Math.pow(t1[0] * lightness + t1[1] * a + t1[2] * b, 3) + 0, Math.pow(t1[3] * lightness + t1[4] * a + t1[5] * b, 3) + 0, Math.pow(t1[6] * lightness + t1[7] * a + t1[8] * b, 3) + 0, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + } + }; + A.OklchColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.OklabColorSpace_yrt0.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.SupportsOperation0.prototype = { + toString$0(_) { + var _this = this; + return _this._operation0$_parenthesize$1(_this.left) + " " + _this.operator + " " + _this._operation0$_parenthesize$1(_this.right); + }, + _operation0$_parenthesize$1(condition) { + var t1; + if (!(condition instanceof A.SupportsNegation0)) + t1 = condition instanceof A.SupportsOperation0 && condition.operator === this.operator; + else + t1 = true; + return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ParentSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitParentSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); + } + }; + A.ParentStatement0.prototype = {}; + A.ParentStatement_closure0.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration0 || child instanceof A.FunctionRule0 || child instanceof A.MixinRule0) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule0) { + t1 = B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure0()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 243 + }; + A.ParentStatement__closure0.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport0; + }, + $signature: 244 + }; + A.ParenthesizedExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitParenthesizedExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ParserExports.prototype = {}; + A.loadParserExports_closure.prototype = { + call$1(inner) { + return new A.JSExpressionVisitor(inner); + }, + $signature: 549 + }; + A.loadParserExports_closure0.prototype = { + call$1(inner) { + return new A.JSStatementVisitor(inner); + }, + $signature: 550 + }; + A._updateAstPrototypes_closure.prototype = { + call$3($self, start, end) { + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2($self._decodedChars, start, end), 0, null); + }, + call$2($self, start) { + return this.call$3($self, start, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 551 + }; + A._updateAstPrototypes_closure0.prototype = { + call$1($self) { + return $self._decodedChars; + }, + $signature: 552 + }; + A._updateAstPrototypes_closure1.prototype = { + call$1($self) { + return $self.get$asPlain(); + }, + $signature: 553 + }; + A._updateAstPrototypes_closure2.prototype = { + call$2($self, visitor) { + return $self.accept$1(visitor); + }, + $signature: 554 + }; + A._updateAstPrototypes_closure3.prototype = { + call$2($self, visitor) { + return $self.accept$1(visitor); + }, + $signature: 555 + }; + A._updateAstPrototypes_closure4.prototype = { + call$1($self) { + return $self.get$span($self); + }, + $signature: 556 + }; + A.Parser1.prototype = { + _parser1$_parseIdentifier$0() { + return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure0(this)); + }, + whitespace$0() { + do + this.whitespaceWithoutComments$0(); + while (this.scanComment$0()); + }, + whitespaceWithoutComments$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + spaces$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + scanComment$0() { + var _0_0, + t1 = this.scanner; + if (t1.peekChar$0() !== 47) + return false; + _0_0 = t1.peekChar$1(1); + if (47 === _0_0) + return this.silentComment$0(); + if (42 === _0_0) { + this.loudComment$0(); + return true; + } + return false; + }, + expectWhitespace$0() { + var t2, t3, + t1 = this.scanner; + if (t1._string_scanner$_position !== t1.string.length) { + t2 = t1.peekChar$0(); + t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); + t2 = t3; + } else + t2 = true; + if (t2) + t1.error$1(0, "Expected whitespace."); + this.whitespace$0(); + }, + silentComment$0() { + var t2, t3, + t1 = this.scanner; + t1.expect$1("//"); + t2 = t1.string.length; + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + return true; + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + if (t1.readChar$0() !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + identifier$2$normalize$unit(normalize, unit) { + var t2, _0_0, _this = this, + _s20_ = "Expected identifier.", + text = new A.StringBuffer(""), + t1 = _this.scanner; + if (t1.scanChar$1(45)) { + t2 = text._contents = "" + A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + text._contents = t2 + A.Primitives_stringFromCharCode(45); + _this._parser1$_identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + } else + t2 = ""; + $label0$0: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s20_); + if (95 === _0_0 && normalize) { + t1.readChar$0(); + text._contents = t2 + A.Primitives_stringFromCharCode(45); + break $label0$0; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128) { + text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + if (92 === _0_0) { + text._contents = t2 + _this.escape$1$identifierStart(true); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._parser1$_identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + identifier$0() { + return this.identifier$2$normalize$unit(false, false); + }, + identifier$1$normalize(normalize) { + return this.identifier$2$normalize$unit(normalize, false); + }, + identifier$1$unit(unit) { + return this.identifier$2$normalize$unit(false, unit); + }, + _parser1$_identifierBody$3$normalize$unit(text, normalize, unit) { + var t1, _1_0, _0_0, t2; + for (t1 = this.scanner; true;) { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + break; + if (45 === _1_0 && unit) { + _0_0 = t1.peekChar$1(1); + if (46 !== _0_0) + t2 = A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57; + else + t2 = true; + if (t2) + break; + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (95 === _1_0 && normalize) { + t1.readChar$0(); + t2 = A.Primitives_stringFromCharCode(45); + text._contents += t2; + continue; + } + if (_1_0 !== 95) { + if (!(_1_0 >= 97 && _1_0 <= 122)) + t2 = _1_0 >= 65 && _1_0 <= 90; + else + t2 = true; + t2 = t2 || _1_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _1_0 >= 48 && _1_0 <= 57 || _1_0 === 45; + else + t2 = true; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (92 === _1_0) { + t2 = this.escape$0(); + text._contents += t2; + continue; + } + break; + } + }, + _parser1$_identifierBody$1(text) { + return this._parser1$_identifierBody$3$normalize$unit(text, false, false); + }, + string$0() { + var buffer, _0_0, t2, + t1 = this.scanner, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); + buffer = new A.StringBuffer(""); + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 === quote) { + t1.readChar$0(); + break; + } + if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _0_0) { + t2 = t1.peekChar$1(1); + if (t2 === 10 || t2 === 13 || t2 === 12) { + t1.readChar$0(); + t1.readChar$0(); + } else { + t2 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); + buffer._contents += t2; + } + continue; + } + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$1$allowEmpty(allowEmpty) { + var t1, t2, wroteNewline, next, wroteNewline0, t3, start, end, _0_0, _this = this, + buffer = new A.StringBuffer(""), + brackets = A._setArrayType([], type$.JSArray_int); + for (t1 = _this.scanner, t2 = _this.get$string(), wroteNewline = false; true;) { + next = t1.peekChar$0(); + if (next == null) + break; + wroteNewline0 = false; + if (92 === next) { + t3 = _this.escape$1$identifierStart(true); + buffer._contents += t3; + wroteNewline = wroteNewline0; + continue; + } + if (34 === next || 39 === next) { + start = t1._string_scanner$_position; + t2.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + wroteNewline = wroteNewline0; + continue; + } + if (47 === next) { + if (t1.peekChar$1(1) === 42) { + t3 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t3.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + } else { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + } + wroteNewline = wroteNewline0; + continue; + } + if (32 === next || 9 === next) { + if (!wroteNewline) { + t3 = t1.peekChar$1(1); + t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = true; + if (t3) { + t3 = A.Primitives_stringFromCharCode(32); + buffer._contents += t3; + } + t1.readChar$0(); + continue; + } + if (10 === next || 13 === next || 12 === next) { + t3 = t1.peekChar$1(-1); + if (!(t3 === 10 || t3 === 13 || t3 === 12)) + buffer._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + continue; + } + if (40 === next || 123 === next || 91 === next) { + t3 = A.Primitives_stringFromCharCode(next); + buffer._contents += t3; + brackets.push(A.opposite0(t1.readChar$0())); + wroteNewline = wroteNewline0; + continue; + } + if (41 === next || 125 === next || 93 === next) { + if (brackets.length === 0) + break; + t3 = A.Primitives_stringFromCharCode(next); + buffer._contents += t3; + t1.expectChar$1(brackets.pop()); + wroteNewline = wroteNewline0; + continue; + } + if (59 === next) { + if (brackets.length === 0) + break; + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + continue; + } + if (117 === next || 85 === next) { + _0_0 = _this.tryUrl$0(); + if (_0_0 != null) + buffer._contents += _0_0; + else { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + } + wroteNewline = wroteNewline0; + continue; + } + if (_this.lookingAtIdentifier$0()) { + t3 = _this.identifier$0(); + buffer._contents += t3; + } else { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t3; + } + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._contents.length === 0) + t1.error$1(0, "Expected token."); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$0() { + return this.declarationValue$1$allowEmpty(false); + }, + tryUrl$0() { + var buffer, _0_0, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this.scanIdentifier$1("url")) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + _this.whitespace$0(); + buffer = new A.StringBuffer(""); + buffer._contents = "" + "url("; + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + break; + if (92 === _0_0) { + t2 = _this.escape$0(); + buffer._contents += t2; + continue; + } + t2 = true; + if (37 !== _0_0) + if (38 !== _0_0) + if (35 !== _0_0) + t2 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + continue; + } + if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { + _this.whitespace$0(); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2 = buffer._contents += t2; + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + break; + } + t1.set$state(start); + return null; + }, + variableName$0() { + this.scanner.expectChar$1(36); + return this.identifier$1$normalize(true); + }, + escape$1$identifierStart(identifierStart) { + var value, _0_0, i, next, t2, exception, + _s25_ = "Expected escape sequence.", + t1 = this.scanner, + start = t1._string_scanner$_position; + t1.expectChar$1(92); + value = 0; + $label0$1: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s25_); + if (_0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, _s25_); + if (A.CharacterExtension_get_isHex0(_0_0)) { + for (i = 0; i < 6; ++i) { + next = t1.peekChar$0(); + if (next != null) { + t2 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t2 = next >= 65 && next <= 70; + t2 = !t2; + } else + t2 = true; + if (t2) + break; + value *= 16; + value += A.asHex0(t1.readChar$0()); + } + this.scanCharIf$1(new A.Parser_escape_closure0()); + break $label0$1; + } + value = t1.readChar$0(); + } + if (identifierStart) { + t2 = value; + t2 = t2 === 95 || A.CharacterExtension_get_isAlphabetic0(t2) || t2 >= 128; + } else { + t2 = value; + if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic0(t2) || t2 >= 128)) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + } + if (t2) + try { + t2 = A.Primitives_stringFromCharCode(value); + return t2; + } catch (exception) { + if (type$.RangeError._is(A.unwrapException(exception))) + t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); + else + throw exception; + } + else { + t1 = true; + if (!(value <= 31)) + if (!J.$eq$(value, 127)) + if (identifierStart) { + t1 = value; + t1 = t1 >= 48 && t1 <= 57; + } else + t1 = false; + if (t1) { + t1 = "" + A.Primitives_stringFromCharCode(92); + if (value > 15) + t1 += A.Primitives_stringFromCharCode(A.hexCharFor0(B.JSNumber_methods._shrOtherPositive$1(value, 4))); + t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor0(value & 15)) + A.Primitives_stringFromCharCode(32); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else + return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); + } + }, + escape$0() { + return this.escape$1$identifierStart(false); + }, + scanCharIf$1(condition) { + var t1 = this.scanner; + if (!condition.call$1(t1.peekChar$0())) + return false; + t1.readChar$0(); + return true; + }, + scanIdentChar$2$caseSensitive(char, caseSensitive) { + var t3, + t1 = new A.Parser_scanIdentChar_matches0(caseSensitive, char), + t2 = this.scanner, + _0_0 = t2.peekChar$0(); + if (_0_0 != null) { + t3 = t1.call$1(_0_0); + t3 = t3; + } else + t3 = false; + if (t3) { + t2.readChar$0(); + return true; + } + if (92 === _0_0) { + t3 = t2._string_scanner$_position; + if (t1.call$1(A.consumeEscapedCharacter0(t2))) + return true; + t2.set$state(new A._SpanScannerState(t2, t3)); + } + return false; + }, + scanIdentChar$1(char) { + return this.scanIdentChar$2$caseSensitive(char, false); + }, + expectIdentChar$1(letter) { + var t1; + if (this.scanIdentChar$2$caseSensitive(letter, false)) + return; + t1 = this.scanner; + t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); + }, + lookingAtIdentifier$1($forward) { + var t1, _1_0, t2, _0_0; + if ($forward == null) + $forward = 0; + t1 = this.scanner; + _1_0 = t1.peekChar$1($forward); + $label0$0: { + if (A._isInt(_1_0)) + t2 = _1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128; + else + t2 = false; + if (t2 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1($forward + 1); + $label1$1: { + if (A._isInt(_0_0)) + t1 = _0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128; + else + t1 = false; + t1 = t1 || 92 === _0_0 || 45 === _0_0; + if (t1) + break $label1$1; + break $label1$1; + } + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + lookingAtIdentifier$0() { + return this.lookingAtIdentifier$1(null); + }, + lookingAtIdentifierBody$0() { + var t1, + next = this.scanner.peekChar$0(); + if (next != null) { + if (!(next === 95 || A.CharacterExtension_get_isAlphabetic0(next) || next >= 128)) + t1 = next >= 48 && next <= 57 || next === 45; + else + t1 = true; + t1 = t1 || next === 92; + } else + t1 = false; + return t1; + }, + scanIdentifier$2$caseSensitive(text, caseSensitive) { + var t1, t2, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + if (_this._parser1$_consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) + return true; + else { + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + } + }, + scanIdentifier$1(text) { + return this.scanIdentifier$2$caseSensitive(text, false); + }, + _parser1$_consumeIdentifier$2(text, caseSensitive) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) + return false; + } + return true; + }, + expectIdentifier$2$name(text, $name) { + var t1, start, t2, t3, t4, t5, t6; + if ($name == null) + $name = '"' + text + '"'; + t1 = this.scanner; + start = t1._string_scanner$_position; + for (t2 = new A.CodeUnits(text), t3 = type$.CodeUnits, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = "Expected " + $name, t5 = t4 + ".", t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t6 = t2.__internal$_current; + if (this.scanIdentChar$2$caseSensitive(t6 == null ? t3._as(t6) : t6, false)) + continue; + t1.error$2$position(0, t5, start); + } + if (!this.lookingAtIdentifierBody$0()) + return; + t1.error$2$position(0, t4, start); + }, + expectIdentifier$1(text) { + return this.expectIdentifier$2$name(text, null); + }, + rawText$1(consumer) { + var t1 = this.scanner, + start = t1._string_scanner$_position; + consumer.call$0(); + return t1.substring$1(0, start); + }, + spanFrom$1(state) { + var span = this.scanner.spanFrom$1(state); + return this._parser1$_interpolationMap == null ? span : new A.LazyFileSpan0(new A.Parser_spanFrom_closure0(this, span)); + }, + error$3(_, message, span, trace) { + var exception = new A.StringScannerException(this.scanner.string, message, span); + if (trace == null) + throw A.wrapException(exception); + else + A.throwWithTrace0(exception, this.get$error(this), trace); + }, + error$2(_, message, span) { + return this.error$3(0, message, span, null); + }, + withErrorMessage$1$2(message, callback) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = J.get$span$z(error); + A.throwWithTrace0(new A.SourceSpanFormatException(error.get$source(), message, t1), error, stackTrace); + } else + throw exception; + } + }, + withErrorMessage$2(message, callback) { + return this.withErrorMessage$1$2(message, callback, type$.dynamic); + }, + wrapSpanFormatException$1$1(callback) { + var error, stackTrace, map, error0, stackTrace0, span, error1, stackTrace1, span0, secondarySpans, t1, t2, span1, description, _0_0, t3, exception, t4, _this = this, + _s8_ = "expected"; + try { + try { + t3 = callback.call$0(); + return t3; + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t3)) { + error = t3; + stackTrace = A.getTraceFromException(exception); + map = _this._parser1$_interpolationMap; + if (map == null) + throw exception; + A.throwWithTrace0(map.mapException$1(error), error, stackTrace); + } else + throw exception; + } + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t3)) { + error0 = t3; + stackTrace0 = A.getTraceFromException(exception); + span = J.get$span$z(error0); + if (A.startsWithIgnoreCase0(error0._span_exception$_message, _s8_)) + span = _this._parser1$_adjustExceptionSpan$1(span); + t1 = error0._span_exception$_message; + t2 = span; + A.throwWithTrace0(new A.SassFormatException0(B.Set_empty, t1, t2), error0, stackTrace0); + } else if (type$.MultiSourceSpanFormatException._is(t3)) { + error1 = t3; + stackTrace1 = A.getTraceFromException(exception); + span0 = J.get$span$z(error1); + t3 = type$.FileSpan; + t4 = type$.String; + secondarySpans = error1.get$secondarySpans().cast$2$0(0, t3, t4); + if (A.startsWithIgnoreCase0(error1._span_exception$_message, _s8_)) { + span0 = _this._parser1$_adjustExceptionSpan$1(span0); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + for (t3 = A.MapExtensions_get_pairs0(secondarySpans, t3, t4), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t2 = t3.get$current(t3); + span1 = null; + description = null; + _0_0 = t2; + span1 = _0_0._0; + description = _0_0._1; + J.$indexSet$ax(t1, _this._parser1$_adjustExceptionSpan$1(span1), description); + } + secondarySpans = t1; + } + A.throwWithTrace0(A.MultiSpanSassFormatException$0(error1._span_exception$_message, span0, error1.get$primaryLabel(), secondarySpans, null), error1, stackTrace1); + } else + throw exception; + } + }, + wrapSpanFormatException$1(callback) { + return this.wrapSpanFormatException$1$1(callback, type$.dynamic); + }, + _parser1$_adjustExceptionSpan$1(span) { + var start, t1; + if (span.get$length(span) > 0) + return span; + start = this._parser1$_firstNewlineBefore$1(span.get$start(span)); + if (start.$eq(0, span.get$start(span))) + t1 = span; + else { + t1 = start.offset; + t1 = A._FileSpan$(start.file, t1, t1); + } + return t1; + }, + _parser1$_firstNewlineBefore$1($location) { + var lastNewline, codeUnit, + t1 = $location.file, + t2 = $location.offset, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, 0, t2), 0, null), + index = t2 - 1; + for (lastNewline = null; index >= 0;) { + codeUnit = text.charCodeAt(index); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) { + if (lastNewline == null) + t1 = $location; + else { + t2 = new A.FileLocation(t1, lastNewline); + t2.FileLocation$_$2(t1, lastNewline); + t1 = t2; + } + return t1; + } + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) + lastNewline = index; + --index; + } + return $location; + } + }; + A.Parser__parseIdentifier_closure0.prototype = { + call$0() { + var t1 = this.$this, + result = t1.identifier$0(); + t1.scanner.expectDone$0(); + return result; + }, + $signature: 29 + }; + A.Parser_escape_closure0.prototype = { + call$1(char) { + return char === 32 || char === 9 || char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A.Parser_scanIdentChar_matches0.prototype = { + call$1(actual) { + var t1 = this.char; + return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase0(t1, actual); + }, + $signature: 50 + }; + A.Parser_spanFrom_closure0.prototype = { + call$0() { + return this.$this._parser1$_interpolationMap.mapSpan$1(this.span); + }, + $signature: 30 + }; + A.PlaceholderSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitPlaceholderSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.PlaceholderSelector0(this.name + suffix, this.span); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlaceholderSelector0 && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.PlainCssCallable0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlainCssCallable0 && this.name === other.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + }, + $isAsyncCallable0: 1, + $isCallable: 1, + get$name(receiver) { + return this.name; + } + }; + A.PrefixedMapView0.prototype = { + get$keys(_) { + return new A._PrefixedKeys0(this); + }, + get$length(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$isNotEmpty(t1); + }, + $index(_, key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) ? this._prefixed_map_view0$_map.$index(0, J.substring$1$s(key, this._prefixed_map_view0$_prefix.length)) : null; + }, + containsKey$1(key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) && this._prefixed_map_view0$_map.containsKey$1(J.substring$1$s(key, this._prefixed_map_view0$_prefix.length)); + } + }; + A._PrefixedKeys0.prototype = { + get$length(_) { + var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; + return t1.get$length(t1); + }, + get$iterator(_) { + var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; + t1 = J.map$1$1$ax(t1.get$keys(t1), new A._PrefixedKeys_iterator_closure0(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._prefixed_map_view0$_view.containsKey$1(key); + } + }; + A._PrefixedKeys_iterator_closure0.prototype = { + call$1(key) { + return this.$this._prefixed_map_view0$_view._prefixed_map_view0$_prefix + key; + }, + $signature: 6 + }; + A.ProphotoRgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs <= 0.03125 ? channel / 16 : J.get$sign$in(channel) * Math.pow(abs, 1.8); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs >= 0.001953125 ? J.get$sign$in(channel) * Math.pow(abs, 0.5555555555555556) : 16 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { + t1 = $.$get$linearProphotoRgbToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$linearProphotoRgbToLinearA98Rgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$linearProphotoRgbToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$linearProphotoRgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$linearProphotoRgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$linearProphotoRgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$linearProphotoRgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.PseudoSelector0.prototype = { + get$isHostContext() { + return this.isClass && this.name === "host-context" && this.selector != null; + }, + get$hasComplicatedSuperselectorSemantics() { + return !this.isClass || this.selector != null; + }, + get$specificity() { + var result, _this = this, + value = _this._pseudo$__PseudoSelector_specificity_FI; + if (value === $) { + result = new A.PseudoSelector_specificity_closure0(_this).call$0(); + _this._pseudo$__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._pseudo$__PseudoSelector_specificity_FI = result; + value = result; + } + return value; + }, + withSelector$1(selector) { + var _this = this; + return A.PseudoSelector$0(_this.name, _this.span, _this.argument, !_this.isClass, selector); + }, + addSuffix$1(suffix) { + var _this = this; + if (_this.argument != null || _this.selector != null) + _this.super$SimpleSelector$addSuffix0(suffix); + return A.PseudoSelector$0(_this.name + suffix, _this.span, null, !_this.isClass, null); + }, + unify$1(compound) { + var other, result, t2, addedThis, _i, simple, _this = this, + t1 = _this.name; + if (t1 === "host" || t1 === "host-context") { + if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure0())) + return null; + } else { + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector0)) { + if (other instanceof A.PseudoSelector0) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector_2); + for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (simple instanceof A.PseudoSelector0 && !simple.isClass) { + if (t2) + return null; + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var selector, t1, t2, _this = this; + if (_this.super$SimpleSelector$isSuperselector0(other)) + return true; + selector = _this.selector; + if (selector == null) + return _this.$eq(0, other); + if (other instanceof A.PseudoSelector0 && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { + t1 = A.NullableExtension_andThen0(other.selector, selector.get$isSuperselector()); + return t1 == null ? false : t1; + } + t1 = type$.JSArray_SimpleSelector_2; + t2 = _this.span; + return A.compoundIsSuperselector0(A.CompoundSelector$0(A._setArrayType([_this], t1), t2), A.CompoundSelector$0(A._setArrayType([other], t1), t2), null); + }, + accept$1$1(visitor) { + return visitor.visitPseudoSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.PseudoSelector0 && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); + }, + get$hashCode(_) { + var _this = this, + t1 = B.JSString_methods.get$hashCode(_this.name), + t2 = !_this.isClass ? 519018 : 218159; + return t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector); + } + }; + A.PseudoSelector_specificity_closure0.prototype = { + call$0() { + var selector, t2, + t1 = this.$this; + if (!t1.isClass) + return 1; + selector = t1.selector; + if (selector == null) + return A.SimpleSelector0.prototype.get$specificity.call(t1); + switch (t1.normalizedName) { + case "where": + return 0; + case "is": + case "not": + case "has": + case "matches": + t1 = selector.components; + return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); + case "nth-child": + case "nth-last-child": + t1 = A.SimpleSelector0.prototype.get$specificity.call(t1); + t2 = selector.components; + return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); + default: + return A.SimpleSelector0.prototype.get$specificity.call(t1); + } + }, + $signature: 10 + }; + A.PseudoSelector_specificity__closure1.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 256 + }; + A.PseudoSelector_specificity__closure2.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 256 + }; + A.PseudoSelector_unify_closure0.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.PseudoSelector0) + t1 = simple.isClass && simple.name === "host" || simple.selector != null; + else + t1 = false; + return t1; + }, + $signature: 14 + }; + A.PublicMemberMapView0.prototype = { + get$keys(_) { + var t1 = this._public_member_map_view0$_inner; + return J.where$1$ax(t1.get$keys(t1), A.utils1__isPublic$closure()); + }, + containsKey$1(key) { + return typeof key == "string" && A.isPublic0(key) && this._public_member_map_view0$_inner.containsKey$1(key); + }, + $index(_, key) { + if (typeof key == "string" && A.isPublic0(key)) + return this._public_member_map_view0$_inner.$index(0, key); + return null; + } + }; + A.QualifiedName0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.QualifiedName0 && other.name === this.name && other.namespace == this.namespace; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? t2 : t1 + "|" + t2; + } + }; + A.Rec2020ColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs < 0.08124285829863151 ? channel / 4.5 : J.get$sign$in(channel) * Math.pow((abs + 1.09929682680944 - 1) / 1.09929682680944, 2.2222222222222223); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs > 0.018053968510807 ? J.get$sign$in(channel) * (1.09929682680944 * Math.pow(abs, 0.45) - 0.09929682680944008) : 4.5 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { + t1 = $.$get$linearRec2020ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$linearRec2020ToLinearA98Rgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$linearRec2020ToLinearDisplayP30(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$linearRec2020ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$linearRec2020ToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$linearRec2020ToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$linearRec2020ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.JSClass0.prototype = {}; + A.JSClassExtension_setCustomInspect_closure.prototype = { + call$4($self, _, __, ___) { + return this.inspect.call$1($self); + }, + call$3($self, _, __) { + return this.call$4($self, _, __, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 558 + }; + A.JSClassExtension_get_defineStaticMethod_closure.prototype = { + call$2($name, body) { + this._this[$name] = A.allowInteropNamed($name, body); + return null; + }, + $signature: 134 + }; + A.JSClassExtension_get_defineMethod_closure.prototype = { + call$2($name, body) { + J.get$$prototype$x(this._this)[$name] = A.allowInteropCaptureThisNamed($name, body); + return null; + }, + $signature: 134 + }; + A.JSClassExtension_get_defineGetter_closure.prototype = { + call$2($name, body) { + A.defineGetter(J.get$$prototype$x(this._this), $name, body, null); + return null; + }, + $signature: 134 + }; + A.RenderContext0.prototype = {}; + A.RenderContextOptions0.prototype = {}; + A.RenderContextResult0.prototype = {}; + A.RenderContextResultStats0.prototype = {}; + A.RenderOptions.prototype = {}; + A.RenderResult.prototype = {}; + A.RenderResultStats.prototype = {}; + A.ReplaceExpressionVisitor0.prototype = { + visitBinaryOperationExpression$1(_, node) { + return new A.BinaryOperationExpression0(node.operator, node.left.accept$1(this), node.right.accept$1(this), false); + }, + visitBooleanExpression$1(_, node) { + return node; + }, + visitColorExpression$1(_, node) { + return node; + }, + visitFunctionExpression$1(_, node) { + var t1 = node.originalName, + t2 = this.visitArgumentInvocation$1(node.$arguments); + return new A.FunctionExpression0(node.namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, node.span); + }, + visitInterpolatedFunctionExpression$1(_, node) { + return new A.InterpolatedFunctionExpression0(this.visitInterpolation$1(node.name), this.visitArgumentInvocation$1(node.$arguments), node.span); + }, + visitIfExpression$1(_, node) { + return new A.IfExpression0(this.visitArgumentInvocation$1(node.$arguments), node.span); + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return new A.ListExpression0(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitListExpression_closure0(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression0>")), type$.Expression_2), node.separator, node.hasBrackets, node.span); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, key, value, + t1 = A._setArrayType([], type$.JSArray_Record_2_Expression_and_Expression_2); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + value = t4._1; + t1.push(new A._Record_2(key.accept$1(this), value.accept$1(this))); + } + return new A.MapExpression0(A.List_List$unmodifiable(t1, type$.Record_2_Expression_and_Expression_2), node.span); + }, + visitNullExpression$1(_, node) { + return node; + }, + visitNumberExpression$1(_, node) { + return node; + }, + visitParenthesizedExpression$1(_, node) { + return new A.ParenthesizedExpression0(node.expression.accept$1(this), node.span); + }, + visitSelectorExpression$1(_, node) { + return node; + }, + visitStringExpression$1(_, node) { + return new A.StringExpression0(this.visitInterpolation$1(node.text), node.hasQuotes); + }, + visitSupportsExpression$1(_, node) { + return new A.SupportsExpression0(this.visitSupportsCondition$1(node.condition)); + }, + visitUnaryOperationExpression$1(_, node) { + return new A.UnaryOperationExpression0(node.operator, node.operand.accept$1(this), node.span); + }, + visitValueExpression$1(_, node) { + return node; + }, + visitVariableExpression$1(_, node) { + return node; + }, + visitArgumentInvocation$1(invocation) { + var t5, t6, _this = this, + t1 = invocation.positional, + t2 = type$.String, + t3 = type$.Expression_2, + t4 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + for (t5 = A.MapExtensions_get_pairs0(invocation.named, t2, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { + t6 = t5.get$current(t5); + t4.$indexSet(0, t6._0, t6._1.accept$1(_this)); + } + t5 = invocation.rest; + t5 = t5 == null ? null : t5.accept$1(_this); + t6 = invocation.keywordRest; + t6 = t6 == null ? null : t6.accept$1(_this); + return new A.ArgumentInvocation0(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitArgumentInvocation_closure0(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression0>")), t3), A.ConstantMap_ConstantMap$from(t4, t2, t3), t5, t6, invocation.span); + }, + visitSupportsCondition$1(condition) { + var _this = this; + if (condition instanceof A.SupportsOperation0) + return A.SupportsOperation$0(_this.visitSupportsCondition$1(condition.left), _this.visitSupportsCondition$1(condition.right), condition.operator, condition.span); + else if (condition instanceof A.SupportsNegation0) + return new A.SupportsNegation0(_this.visitSupportsCondition$1(condition.condition), condition.span); + else if (condition instanceof A.SupportsInterpolation0) + return new A.SupportsInterpolation0(condition.expression.accept$1(_this), condition.span); + else if (condition instanceof A.SupportsDeclaration0) + return new A.SupportsDeclaration0(condition.name.accept$1(_this), condition.value.accept$1(_this), condition.span); + else + throw A.wrapException(A.SassException$0("BUG: Unknown SupportsCondition " + condition.toString$0(0) + ".", condition.get$span(condition), null)); + }, + visitInterpolation$1(interpolation) { + var t1 = interpolation.contents; + return A.Interpolation$0(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitInterpolation_closure0(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>")), interpolation.span); + } + }; + A.ReplaceExpressionVisitor_visitListExpression_closure0.prototype = { + call$1(item) { + return item.accept$1(this.$this); + }, + $signature: 257 + }; + A.ReplaceExpressionVisitor_visitArgumentInvocation_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 257 + }; + A.ReplaceExpressionVisitor_visitInterpolation_closure0.prototype = { + call$1(node) { + return node instanceof A.Expression0 ? node.accept$1(this.$this) : node; + }, + $signature: 77 + }; + A.ImporterResult0.prototype = { + get$sourceMapUrl(_) { + var t1 = this._result$_sourceMapUrl; + return t1 == null ? A.Uri_Uri$dataFromString(this.contents, B.C_Utf8Codec, null) : t1; + } + }; + A.ReturnRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitReturnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@return " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.RgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1 = red == null ? null : red / 255, + t2 = green == null ? null : green / 255; + return B.SrgbColorSpace_AD40.convert$5(dest, t1, t2, blue == null ? null : blue / 255, alpha); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear0(channel / 255); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear0(channel) * 255; + } + }; + A.SassParser0.prototype = { + get$currentIndentation() { + return this._sass0$_currentIndentation; + }, + get$indented() { + return true; + }, + styleRuleSelector$0() { + var t4, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + do { + buffer.addInterpolation$1(this.almostAnyValue$1$omitComments(true)); + t4 = A.Primitives_stringFromCharCode(10); + t4 = t3._contents += t4; + } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && this.scanCharIf$1(new A.SassParser_styleRuleSelector_closure0())); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + expectStatementSeparator$1($name) { + var t1, _this = this; + if (!_this.atEndOfStatement$0()) + _this._sass0$_expectNewline$0(); + if (_this._sass0$_peekIndentation$0() <= _this._sass0$_currentIndentation) + return; + t1 = $name == null ? "here" : "beneath a " + $name; + _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._sass0$_nextIndentationEnd.position); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var t1 = this.scanner.peekChar$0(); + if (t1 == null) + t1 = null; + else + t1 = t1 === 10 || t1 === 13 || t1 === 12; + return t1 !== false; + }, + lookingAtChildren$0() { + return this.atEndOfStatement$0() && this._sass0$_peekIndentation$0() > this._sass0$_currentIndentation; + }, + importArgument$0() { + var url, span, innerError, stackTrace, t1, _0_0, start, next, t2, exception, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("url")) + if (t1.scanChar$1(40)) { + t1.set$state(start); + return _this.super$StylesheetParser$importArgument0(); + } else + t1.set$state(start); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) + return _this.super$StylesheetParser$importArgument0(); + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + next = t1.peekChar$0(); + while (true) { + t2 = false; + if (next != null) + if (next !== 44) + if (next !== 59) + t2 = !(next === 10 || next === 13 || next === 12); + if (!t2) + break; + t1.readChar$0(); + next = t1.peekChar$0(); + } + url = t1.substring$1(0, start.position); + span = t1.spanFrom$1(start); + if (_this.isPlainImportUrl$1(url)) + return new A.StaticImport0(A.Interpolation$0(A._setArrayType([A.serializeValue0(new A.SassString0(url, true), true, true)], type$.JSArray_Object), span), null, span); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport0(t1, span); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); + } else + throw exception; + } + }, + scanElse$1(ifIndentation) { + var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; + if (_this._sass0$_peekIndentation$0() !== ifIndentation) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + startIndentation = _this._sass0$_currentIndentation; + startNextIndentation = _this._sass0$_nextIndentation; + startNextIndentationEnd = _this._sass0$_nextIndentationEnd; + _this._sass0$_readIndentation$0(); + if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) + return true; + t1.set$state(new A._SpanScannerState(t1, t2)); + _this._sass0$_currentIndentation = startIndentation; + _this._sass0$_nextIndentation = startNextIndentation; + _this._sass0$_nextIndentationEnd = startNextIndentationEnd; + return false; + }, + children$1(_, child) { + var children = A._setArrayType([], type$.JSArray_Statement_2); + this._sass0$_whileIndentedLower$1(new A.SassParser_children_closure0(this, child, children)); + return children; + }, + statements$1(statement) { + var statements, t2, _1_0, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (9 === _0_0 || 32 === _0_0) + t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); + statements = A._setArrayType([], type$.JSArray_Statement_2); + for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + _1_0 = this._sass0$_child$1(statement); + if (_1_0 != null) + statements.push(_1_0); + this._sass0$_readIndentation$0(); + } + return statements; + }, + _sass0$_child$1(child) { + var _0_0, _this = this, + t1 = _this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + if (13 === _1_0 || 10 === _1_0 || 12 === _1_0) { + t1 = null; + break $label0$0; + } + if (36 === _1_0) { + t1 = _this.variableDeclarationWithoutNamespace$0(); + break $label0$0; + } + if (47 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (47 === _0_0) { + t1 = _this._sass0$_silentComment$0(); + break $label1$1; + } + if (42 === _0_0) { + t1 = _this._sass0$_loudComment$0(); + break $label1$1; + } + t1 = child.call$0(); + break $label1$1; + } + break $label0$0; + } + t1 = child.call$0(); + break $label0$0; + } + return t1; + }, + _sass0$_silentComment$0() { + var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("//"); + buffer = new A.StringBuffer(""); + parentIndentation = _this._sass0$_currentIndentation; + t3 = t1.string.length; + t4 = 1 + parentIndentation; + t5 = 2 + parentIndentation; + $label0$0: + do { + commentPrefix = t1.scanChar$1(47) ? "///" : "//"; + for (i = commentPrefix.length; true;) { + t6 = buffer._contents += commentPrefix; + for (i0 = i; i0 < _this._sass0$_currentIndentation - parentIndentation; ++i0) { + t6 += A.Primitives_stringFromCharCode(32); + buffer._contents = t6; + } + while (true) { + if (t1._string_scanner$_position !== t3) { + t7 = t1.peekChar$0(); + t7 = !(t7 === 10 || t7 === 13 || t7 === 12); + } else + t7 = false; + if (!t7) + break; + t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents = t6; + } + buffer._contents = t6 + "\n"; + if (_this._sass0$_peekIndentation$0() < parentIndentation) + break $label0$0; + if (_this._sass0$_peekIndentation$0() === parentIndentation) { + if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) + _this._sass0$_readIndentation$0(); + break; + } + _this._sass0$_readIndentation$0(); + } + } while (t1.scan$1("//")); + t3 = buffer._contents; + return _this.lastSilentComment = new A.SilentComment0(t3.charCodeAt(0) == 0 ? t3 : t3, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _sass0$_loudComment$0() { + var t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _0_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t3._contents = "" + "/*"; + parentIndentation = _this._sass0$_currentIndentation; + for (t5 = t1.string, t6 = t5.length, first = true; true; first = false) { + if (first) { + beginningOfComment = t1._string_scanner$_position; + _this.spaces$0(); + t7 = t1.peekChar$0(); + if (t7 === 10 || t7 === 13 || t7 === 12) { + _this._sass0$_readIndentation$0(); + t7 = A.Primitives_stringFromCharCode(32); + t3._contents += t7; + } else { + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); + } + } else { + t7 = t3._contents += "\n"; + t3._contents = t7 + " * "; + } + for (i = 3; i < _this._sass0$_currentIndentation - parentIndentation; ++i) { + t7 = A.Primitives_stringFromCharCode(32); + t3._contents += t7; + } + for (; t1._string_scanner$_position !== t6;) { + _0_0 = t1.peekChar$0(); + if (10 === _0_0 || 13 === _0_0 || 12 === _0_0) + break; + if (35 === _0_0) { + if (t1.peekChar$1(1) === 123) { + t7 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t7); + } else { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + continue; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + if (_this._sass0$_peekIndentation$0() <= parentIndentation) + break; + for (; _this._sass0$_lookingAtDoubleNewline$0();) { + _this._sass0$_expectNewline$0(); + t7 = t3._contents += "\n"; + t3._contents = t7 + " *"; + } + _this._sass0$_readIndentation$0(); + } + return new A.LoudComment0(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); + }, + whitespaceWithoutComments$0() { + var t1, t2, next; + for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + if (next !== 9 && next !== 32) + break; + t1.readChar$0(); + } + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (; true;) { + next = t1.readChar$0(); + if (next === 10 || next === 13 || next === 12) + t1.error$1(0, "expected */."); + if (next !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + _sass0$_expectNewline$0() { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (59 === _0_0) + t1.error$1(0, string$.semico); + if (13 === _0_0) { + t1.readChar$0(); + if (t1.peekChar$0() === 10) + t1.readChar$0(); + return; + } + if (10 === _0_0 || 12 === _0_0) { + t1.readChar$0(); + return; + } + t1.error$1(0, "expected newline."); + }, + _sass0$_lookingAtDoubleNewline$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label1$1: { + t2 = false; + if (13 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label0$0: { + if (10 === _0_0) { + t1 = t1.peekChar$1(2); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label0$0; + } + if (13 === _0_0 || 12 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + break $label1$1; + } + if (10 === _1_0 || 12 === _1_0) { + t1 = t1.peekChar$1(1); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + return t1; + }, + _sass0$_whileIndentedLower$1(body) { + var t1, t2, childIndentation, indentation, t3, t4, _this = this, + parentIndentation = _this._sass0$_currentIndentation; + for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._sass0$_peekIndentation$0() > parentIndentation;) { + indentation = _this._sass0$_readIndentation$0(); + if (childIndentation == null) + childIndentation = indentation; + if (childIndentation !== indentation) { + t3 = t1._string_scanner$_position; + t4 = t2.getColumn$1(t3); + t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); + } + body.call$0(); + } + }, + _sass0$_readIndentation$0() { + var t1, _this = this, + currentIndentation = _this._sass0$_nextIndentation; + if (currentIndentation == null) + currentIndentation = _this._sass0$_nextIndentation = _this._sass0$_peekIndentation$0(); + _this._sass0$_currentIndentation = currentIndentation; + t1 = _this._sass0$_nextIndentationEnd; + t1.toString; + _this.scanner.set$state(t1); + _this._sass0$_nextIndentationEnd = _this._sass0$_nextIndentation = null; + return currentIndentation; + }, + _sass0$_peekIndentation$0() { + var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, _1_0, t4, _this = this, + _0_0 = _this._sass0$_nextIndentation; + if (_0_0 != null) + return _0_0; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = t1.string.length; + if (t2 === t3) { + _this._sass0$_nextIndentation = 0; + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t2); + return 0; + } + start = new A._SpanScannerState(t1, t2); + if (!_this.scanCharIf$1(new A.SassParser__peekIndentation_closure1())) + t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); + containsTab = A._Cell$(); + containsSpace = A._Cell$(); + nextIndentation = A._Cell$(); + do { + containsSpace.__late_helper$_value = containsTab.__late_helper$_value = false; + nextIndentation.__late_helper$_value = 0; + for (; true;) { + $label0$0: { + _1_0 = t1.peekChar$0(); + if (32 === _1_0) { + containsSpace.__late_helper$_value = true; + break $label0$0; + } + if (9 === _1_0) { + containsTab.__late_helper$_value = true; + break $label0$0; + } + break; + } + t2 = nextIndentation.__late_helper$_value; + if (t2 === nextIndentation) + A.throwExpression(A.LateError$localNI("")); + nextIndentation.__late_helper$_value = t2 + 1; + t1.readChar$0(); + } + t2 = t1._string_scanner$_position; + if (t2 === t3) { + _this._sass0$_nextIndentation = 0; + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t2); + t1.set$state(start); + return 0; + } + } while (_this.scanCharIf$1(new A.SassParser__peekIndentation_closure2())); + t2 = containsTab._readLocal$0(); + t3 = containsSpace._readLocal$0(); + if (t2) { + if (t3) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } else if (_this._sass0$_spaces === true) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + } else if (t3 && _this._sass0$_spaces === false) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + _this._sass0$_nextIndentation = nextIndentation._readLocal$0(); + if (nextIndentation._readLocal$0() > 0) + if (_this._sass0$_spaces == null) + _this._sass0$_spaces = containsSpace._readLocal$0(); + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.set$state(start); + return nextIndentation._readLocal$0(); + } + }; + A.SassParser_styleRuleSelector_closure0.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A.SassParser_children_closure0.prototype = { + call$0() { + var _0_0 = this.$this._sass0$_child$1(this.child); + if (_0_0 != null) + this.children.push(_0_0); + }, + $signature: 0 + }; + A.SassParser__peekIndentation_closure1.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A.SassParser__peekIndentation_closure2.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 32 + }; + A._Exports.prototype = {}; + A._wrapMain_closure.prototype = { + call$1(_) { + return A._translateReturnValue(this.main.call$0()); + }, + $signature: 101 + }; + A._wrapMain_closure0.prototype = { + call$1(args) { + return A._translateReturnValue(this.main.call$1(A.List_List$from(type$.List_dynamic._as(args), true, type$.String))); + }, + $signature: 101 + }; + A.ScssParser0.prototype = { + get$indented() { + return false; + }, + get$currentIndentation() { + return 0; + }, + styleRuleSelector$0() { + return this.almostAnyValue$0(); + }, + expectStatementSeparator$1($name) { + var t1, _0_0; + this.whitespaceWithoutComments$0(); + t1 = this.scanner; + if (t1._string_scanner$_position === t1.string.length) + return; + _0_0 = t1.peekChar$0(); + if (59 === _0_0 || 125 === _0_0) + return; + t1.expectChar$1(59); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 59 || next === 125 || next === 123; + }, + lookingAtChildren$0() { + return this.scanner.peekChar$0() === 123; + }, + scanElse$1(ifIndentation) { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + _this.whitespace$0(); + t3 = t1._string_scanner$_position; + if (t1.scanChar$1(64)) { + if (_this.scanIdentifier$2$caseSensitive("else", true)) + return true; + if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { + A.WarnForDeprecation_warnForDeprecation0(_this.logger, B.Deprecation_xw8, string$.x40elsei, t1.spanFrom$1(new A._SpanScannerState(t1, t3)), null); + t1.set$position(t1._string_scanner$_position - 2); + return true; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + }, + children$1(_, child) { + var children, _this = this, + t1 = _this.scanner; + t1.expectChar$1(123); + _this.whitespaceWithoutComments$0(); + children = A._setArrayType([], type$.JSArray_Statement_2); + for (; true;) + switch (t1.peekChar$0()) { + case 36: + children.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + children.push(_this._scss0$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + children.push(_this._scss0$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + children.push(child.call$0()); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + case 125: + t1.expectChar$1(125); + return children; + default: + children.push(child.call$0()); + } + }, + statements$1(statement) { + var t1, t2, _0_0, _1_0, _this = this, + statements = A._setArrayType([], type$.JSArray_Statement_2); + _this.whitespaceWithoutComments$0(); + for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) + switch (t1.peekChar$0()) { + case 36: + statements.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + statements.push(_this._scss0$_silentComment$0()); + _this.whitespaceWithoutComments$0(); + break; + case 42: + statements.push(_this._scss0$_loudComment$0()); + _this.whitespaceWithoutComments$0(); + break; + default: + _0_0 = statement.call$0(); + if (_0_0 != null) + statements.push(_0_0); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$0(); + break; + default: + _1_0 = statement.call$0(); + if (_1_0 != null) + statements.push(_1_0); + } + return statements; + }, + _scss0$_silentComment$0() { + var t2, t3, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expect$1("//"); + t2 = t1.string.length; + do { + while (true) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.readChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + } + if (t1._string_scanner$_position === t2) + break; + _this.spaces$0(); + } while (t1.scan$1("//")); + if (_this.get$plainCss()) + _this.error$2(0, string$.Silent, t1.spanFrom$1(start)); + return _this.lastSilentComment = new A.SilentComment0(t1.substring$1(0, start.position), t1.spanFrom$1(start)); + }, + _scss0$_loudComment$0() { + var t3, t4, buffer, t5, endPosition, t6, result, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t3._contents = "" + "/*"; + $label0$1: + for (; true;) + switch (t1.peekChar$0()) { + case 35: + if (t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + } else { + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + } + break; + case 42: + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + if (t1.peekChar$0() !== 47) + continue $label0$1; + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._SpanScannerState(t1, t2).position; + t1 = new A._FileSpan(t5, t6, endPosition); + t1._FileSpan$3(t5, t6, endPosition); + t6 = type$.Object; + t5 = A.List_List$of(t4, true, t6); + t2 = t3._contents; + if (t2.length !== 0) + t5.push(t2.charCodeAt(0) == 0 ? t2 : t2); + result = A.List_List$from(t5, false, t6); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation0(result, t1); + t2.Interpolation$20(t5, t1); + return new A.LoudComment0(t2); + case 13: + t1.readChar$0(); + if (t1.peekChar$0() !== 10) { + t5 = A.Primitives_stringFromCharCode(10); + t3._contents += t5; + } + break; + case 12: + t1.readChar$0(); + t5 = A.Primitives_stringFromCharCode(10); + t3._contents += t5; + break; + default: + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + } + } + }; + A.Selector0.prototype = { + assertNotBogus$1$name($name) { + if (!this.accept$1(B._IsBogusVisitor_true0)) + return; + A.warnForDeprecation0("$" + $name + ": " + (this.toString$0(0) + string$.x20is_nov), B.Deprecation_5pG); + }, + toString$0(_) { + var _null = null, + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + this.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A._IsInvisibleVisitor2.prototype = { + visitSelectorList$1(list) { + return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); + }, + visitComplexSelector$1(complex) { + var t1; + if (!this.super$AnySelectorVisitor$visitComplexSelector0(complex)) + t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false0); + else + t1 = true; + return t1; + }, + visitPlaceholderSelector$1(placeholder) { + return true; + }, + visitPseudoSelector$1(pseudo) { + var t1, + _0_0 = pseudo.selector; + if (_0_0 != null) { + if (pseudo.name === "not") + t1 = this.includeBogus && _0_0.accept$1(B._IsBogusVisitor_true0); + else + t1 = this.visitSelectorList$1(_0_0); + return t1; + } else + return false; + } + }; + A._IsBogusVisitor0.prototype = { + visitComplexSelector$1(complex) { + var t2, + t1 = complex.components; + if (t1.length === 0) + return complex.leadingCombinators.length !== 0; + else { + t2 = this.includeLeadingCombinator ? 0 : 1; + return complex.leadingCombinators.length > t2 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure0(this)); + } + }, + visitPseudoSelector$1(pseudo) { + var selector = pseudo.selector; + if (selector == null) + return false; + return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false0) : selector.accept$1(B._IsBogusVisitor_true0); + } + }; + A._IsBogusVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 52 + }; + A._IsUselessVisitor0.prototype = { + visitComplexSelector$1(complex) { + return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure0(this)); + }, + visitPseudoSelector$1(pseudo) { + return pseudo.accept$1(B._IsBogusVisitor_true0); + } + }; + A._IsUselessVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 52 + }; + A.__IsBogusVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.__IsInvisibleVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.__IsUselessVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.SelectorExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitSelectorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "&"; + }, + get$span(receiver) { + return this.span; + } + }; + A._nest_closure0.prototype = { + call$1($arguments) { + var t1 = {}, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$0(string$.x24selec, null)); + t1.first = true; + return new A.MappedListIterable(selectors, new A._nest__closure1(t1), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList0>")).reduce$1(0, new A._nest__closure2()).get$asSassList(); + }, + $signature: 26 + }; + A._nest__closure1.prototype = { + call$1(selector) { + var t1 = this._box_0, + result = A.SassApiValue_assertSelector0(selector, !t1.first, null); + t1.first = false; + return result; + }, + $signature: 258 + }; + A._nest__closure2.prototype = { + call$2($parent, child) { + return child.nestWithin$1($parent); + }, + $signature: 259 + }; + A._append_closure1.prototype = { + call$1($arguments) { + var t1, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$0(string$.x24selec, null)); + t1 = A.EvaluationContext_currentOrNull0(); + return new A.MappedListIterable(selectors, new A._append__closure1(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList0>")).reduce$1(0, new A._append__closure2((t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan())).get$asSassList(); + }, + $signature: 26 + }; + A._append__closure1.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector0(selector, false, null); + }, + $signature: 258 + }; + A._append__closure2.prototype = { + call$2($parent, child) { + var t1 = child.components, + t2 = this.span; + return A.SelectorList$0(new A.MappedListIterable(t1, new A._append___closure0($parent, t2), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")), t2).nestWithin$1($parent); + }, + $signature: 259 + }; + A._append___closure0.prototype = { + call$1(complex) { + var _0_0, t1, component, rest, newCompound, t2, _null = null; + if (complex.leadingCombinators.length !== 0) + throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + _0_0 = complex.components; + t1 = _0_0.length >= 1; + if (t1) { + component = _0_0[0]; + rest = B.JSArray_methods.sublist$1(_0_0, 1); + } else { + rest = _null; + component = rest; + } + if (!t1) + throw A.wrapException(A.StateError$("Pattern matching error")); + newCompound = A._prependParent0(component.selector); + if (newCompound == null) + throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + t1 = this.span; + t2 = A._setArrayType([new A.ComplexSelectorComponent0(newCompound, A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator_2), t1)], type$.JSArray_ComplexSelectorComponent_2); + B.JSArray_methods.addAll$1(t2, rest); + return A.ComplexSelector$0(B.List_empty14, t2, t1, false); + }, + $signature: 61 + }; + A._extend_closure0.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "extendee", + _s8_1 = "extender", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s8_1); + source.assertNotBogus$1$name(_s8_1); + t1 = A.EvaluationContext_currentOrNull0(); + return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_allTargets_allTargets0, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 26 + }; + A._replace_closure0.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "original", + _s11_ = "replacement", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s11_); + source.assertNotBogus$1$name(_s11_); + t1 = A.EvaluationContext_currentOrNull0(); + return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_replace_replace0, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 26 + }; + A._unify_closure0.prototype = { + call$1($arguments) { + var selector2, + _s9_ = "selector1", + _s9_0 = "selector2", + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s9_); + selector1.assertNotBogus$1$name(_s9_); + selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s9_0); + selector2.assertNotBogus$1$name(_s9_0); + t1 = selector1.unify$1(selector2); + t1 = t1 == null ? null : t1.get$asSassList(); + return t1 == null ? B.C__SassNull0 : t1; + }, + $signature: 3 + }; + A._isSuperselector_closure0.prototype = { + call$1($arguments) { + var selector2, + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, "super"); + selector1.assertNotBogus$1$name("super"); + selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, "sub"); + selector2.assertNotBogus$1$name("sub"); + return A.listIsSuperselector0(selector1.components, selector2.components) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 11 + }; + A._simpleSelectors_closure0.prototype = { + call$1($arguments) { + var t1 = A.SassApiValue_assertCompoundSelector0(J.$index$asx($arguments, 0), "selector").components; + return A.SassList$0(new A.MappedListIterable(t1, new A._simpleSelectors__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_ECn0, false); + }, + $signature: 26 + }; + A._simpleSelectors__closure0.prototype = { + call$1(simple) { + return new A.SassString0(A.serializeSelector0(simple, true), false); + }, + $signature: 563 + }; + A._parse_closure0.prototype = { + call$1($arguments) { + return A.SassApiValue_assertSelector0(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); + }, + $signature: 26 + }; + A.SelectorParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure0(this)); + }, + parseCompoundSelector$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure0(this)); + }, + _selector$_selectorList$0() { + var t4, t5, lineBreak, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = t1._sourceFile, + previousLine = t3.getLine$1(t2), + components = A._setArrayType([_this._selector$_complexSelector$0()], type$.JSArray_ComplexSelector_2); + _this.whitespace$0(); + for (t4 = t1.string.length; t1.scanChar$1(44);) { + _this.whitespace$0(); + if (t1.peekChar$0() === 44) + continue; + t5 = t1._string_scanner$_position; + if (t5 === t4) + break; + lineBreak = t3.getLine$1(t5) !== previousLine; + if (lineBreak) + previousLine = t3.getLine$1(t1._string_scanner$_position); + components.push(_this._selector$_complexSelector$1$lineBreak(lineBreak)); + } + return A.SelectorList$0(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _selector$_complexSelector$1$lineBreak(lineBreak) { + var t4, lastCompound, initialCombinators, _0_0, t5, result, _this = this, + _s18_ = "expected selector.", + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + componentStart = new A._SpanScannerState(t1, t2), + t3 = type$.JSArray_CssValue_Combinator_2, + combinators = A._setArrayType([], t3), + components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); + for (t4 = type$.CssValue_Combinator_2, lastCompound = null, initialCombinators = null; true;) { + _this.whitespace$0(); + _0_0 = t1.peekChar$0(); + if (43 === _0_0) { + t5 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue0(B.Combinator_gRV0, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); + continue; + } + if (62 === _0_0) { + t5 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue0(B.Combinator_8I80, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); + continue; + } + if (126 === _0_0) { + t5 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue0(B.Combinator_y180, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); + continue; + } + if (_0_0 == null) + break; + t5 = true; + if (91 !== _0_0) + if (46 !== _0_0) + if (35 !== _0_0) + if (37 !== _0_0) + if (58 !== _0_0) + if (38 !== _0_0) + if (42 !== _0_0) + if (124 !== _0_0) + t5 = _this.lookingAtIdentifier$0(); + if (t5) { + if (lastCompound != null) { + t5 = _this.spanFrom$1(componentStart); + result = A.List_List$from(combinators, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + components.push(new A.ComplexSelectorComponent0(lastCompound, result, t5)); + } else if (combinators.length !== 0) { + componentStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + initialCombinators = combinators; + } + lastCompound = _this._selector$_compoundSelector$0(); + combinators = A._setArrayType([], t3); + if (t1.peekChar$0() === 38) + t1.error$1(0, string$.x22x26__ma); + continue; + } + break; + } + t3 = combinators.length !== 0; + if (t3 && _this._selector$_plainCss) + t1.error$1(0, _s18_); + else if (lastCompound != null) { + t3 = _this.spanFrom$1(componentStart); + components.push(new A.ComplexSelectorComponent0(lastCompound, A.List_List$unmodifiable(combinators, t4), t3)); + } else if (t3) + initialCombinators = combinators; + else + t1.error$1(0, _s18_); + t3 = initialCombinators == null ? B.List_empty14 : initialCombinators; + return A.ComplexSelector$0(t3, components, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), lineBreak); + }, + _selector$_complexSelector$0() { + return this._selector$_complexSelector$1$lineBreak(false); + }, + _selector$_compoundSelector$0() { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + components = A._setArrayType([_this._selector$_simpleSelector$0()], type$.JSArray_SimpleSelector_2); + for (t3 = _this._selector$_plainCss; _this._selector$_isSimpleSelectorStart$1(t1.peekChar$0());) + components.push(_this._selector$_simpleSelector$1$allowParent(t3)); + return A.CompoundSelector$0(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _selector$_simpleSelector$1$allowParent(allowParent) { + var t2, $name, text, t3, suffix, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (allowParent == null) + allowParent = _this._selector$_allowParent; + switch (t1.peekChar$0()) { + case 91: + return _this._selector$_attributeSelector$0(); + case 46: + t2 = t1._string_scanner$_position; + t1.expectChar$1(46); + return new A.ClassSelector0(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 35: + t2 = t1._string_scanner$_position; + t1.expectChar$1(35); + return new A.IDSelector0(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 37: + t2 = t1._string_scanner$_position; + t1.expectChar$1(37); + $name = _this.identifier$0(); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this._selector$_plainCss) + _this.error$2(0, string$.Placeh, t1.spanFrom$1(start)); + return new A.PlaceholderSelector0($name, t2); + case 58: + return _this._selector$_pseudoSelector$0(); + case 38: + t2 = t1._string_scanner$_position; + t1.expectChar$1(38); + if (_this.lookingAtIdentifierBody$0()) { + text = new A.StringBuffer(""); + _this._parser1$_identifierBody$1(text); + if (text._contents.length === 0) + t1.error$1(0, "Expected identifier body."); + t3 = text._contents; + suffix = t3.charCodeAt(0) == 0 ? t3 : t3; + } else + suffix = null; + if (_this._selector$_plainCss && suffix != null) + t1.error$3$length$position(0, string$.Parent, t1._string_scanner$_position - t2, t2); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (!allowParent) + _this.error$2(0, "Parent selectors aren't allowed here.", t1.spanFrom$1(start)); + return new A.ParentSelector0(suffix, t2); + default: + return _this._selector$_typeOrUniversalSelector$0(); + } + }, + _selector$_simpleSelector$0() { + return this._selector$_simpleSelector$1$allowParent(null); + }, + _selector$_attributeSelector$0() { + var $name, operator, next, value, modifier, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(91); + _this.whitespace$0(); + $name = _this._selector$_attributeName$0(); + _this.whitespace$0(); + if (t1.scanChar$1(93)) + return new A.AttributeSelector0($name, _null, _null, _null, _this.spanFrom$1(start)); + operator = _this._selector$_attributeOperator$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); + _this.whitespace$0(); + next = t1.peekChar$0(); + modifier = next != null && A.CharacterExtension_get_isAlphabetic0(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; + t1.expectChar$1(93); + return new A.AttributeSelector0($name, operator, value, modifier, _this.spanFrom$1(start)); + }, + _selector$_attributeName$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner; + if (t1.scanChar$1(42)) { + t1.expectChar$1(124); + return new A.QualifiedName0(_this.identifier$0(), "*"); + } + if (t1.scanChar$1(124)) + return new A.QualifiedName0(_this.identifier$0(), ""); + nameOrNamespace = _this.identifier$0(); + if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) + return new A.QualifiedName0(nameOrNamespace, null); + t1.readChar$0(); + return new A.QualifiedName0(_this.identifier$0(), nameOrNamespace); + }, + _selector$_attributeOperator$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + switch (t1.readChar$0()) { + case 61: + return B.AttributeOperator_4QF0; + case 126: + t1.expectChar$1(61); + return B.AttributeOperator_yT80; + case 124: + t1.expectChar$1(61); + return B.AttributeOperator_jqB0; + case 94: + t1.expectChar$1(61); + return B.AttributeOperator_cMb0; + case 36: + t1.expectChar$1(61); + return B.AttributeOperator_qhE0; + case 42: + t1.expectChar$1(61); + return B.AttributeOperator_61T0; + default: + t1.error$2$position(0, 'Expected "]".', t2); + } + }, + _selector$_pseudoSelector$0() { + var element, $name, unvendored, argument, selector, t2, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(58); + element = t1.scanChar$1(58); + $name = _this.identifier$0(); + if (!t1.scanChar$1(40)) + return A.PseudoSelector$0($name, _this.spanFrom$1(start), _null, element, _null); + _this.whitespace$0(); + unvendored = A.unvendor0($name); + argument = _null; + selector = _null; + if (element) + if ($._selectorPseudoElements0.contains$1(0, unvendored)) + selector = _this._selector$_selectorList$0(); + else + argument = _this.declarationValue$1$allowEmpty(true); + else if ($._selectorPseudoClasses0.contains$1(0, unvendored)) + selector = _this._selector$_selectorList$0(); + else if (unvendored === "nth-child" || unvendored === "nth-last-child") { + argument = _this._selector$_aNPlusB$0(); + _this.whitespace$0(); + t2 = t1.peekChar$1(-1); + if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { + _this.expectIdentifier$1("of"); + argument += " of"; + _this.whitespace$0(); + selector = _this._selector$_selectorList$0(); + } + } else + argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); + t1.expectChar$1(41); + return A.PseudoSelector$0($name, _this.spanFrom$1(start), argument, element, selector); + }, + _selector$_aNPlusB$0() { + var t1, _0_0, t2, $self, next, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (101 === _0_0 || 69 === _0_0) { + _this.expectIdentifier$1("even"); + return "even"; + } + if (111 === _0_0 || 79 === _0_0) { + _this.expectIdentifier$1("odd"); + return "odd"; + } + if (43 === _0_0 || 45 === _0_0) { + t2 = "" + A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + t2 = ""; + } + $self = t1.peekChar$0(); + if ($self != null && $self >= 48 && $self <= 57) { + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + _this.whitespace$0(); + if (!_this.scanIdentChar$1(110)) + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + _this.expectIdentChar$1(110); + t2 += A.Primitives_stringFromCharCode(110); + _this.whitespace$0(); + next = t1.peekChar$0(); + if (next !== 43 && next !== 45) + return t2.charCodeAt(0) == 0 ? t2 : t2; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + _this.whitespace$0(); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected a number."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + _selector$_typeOrUniversalSelector$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.scanChar$1(42)) { + if (!t1.scanChar$1(124)) + return new A.UniversalSelector0(null, _this.spanFrom$1(start)); + return t1.scanChar$1(42) ? new A.UniversalSelector0("*", _this.spanFrom$1(start)) : new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), "*"), _this.spanFrom$1(start)); + } else if (t1.scanChar$1(124)) + return t1.scanChar$1(42) ? new A.UniversalSelector0("", _this.spanFrom$1(start)) : new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), ""), _this.spanFrom$1(start)); + nameOrNamespace = _this.identifier$0(); + if (!t1.scanChar$1(124)) + return new A.TypeSelector0(new A.QualifiedName0(nameOrNamespace, null), _this.spanFrom$1(start)); + else if (t1.scanChar$1(42)) + return new A.UniversalSelector0(nameOrNamespace, _this.spanFrom$1(start)); + else + return new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), nameOrNamespace), _this.spanFrom$1(start)); + }, + _selector$_isSimpleSelectorStart$1(character) { + var t1; + $label0$0: { + if (42 === character || 91 === character || 46 === character || 35 === character || 37 === character || 58 === character) { + t1 = true; + break $label0$0; + } + if (38 === character) { + t1 = this._selector$_plainCss; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + } + }; + A.SelectorParser_parse_closure0.prototype = { + call$0() { + var t1 = this.$this, + selector = t1._selector$_selectorList$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return selector; + }, + $signature: 564 + }; + A.SelectorParser_parseCompoundSelector_closure0.prototype = { + call$0() { + var t1 = this.$this, + compound = t1._selector$_compoundSelector$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return compound; + }, + $signature: 565 + }; + A.SelectorSearchVisitor0.prototype = { + visitAttributeSelector$1(attribute) { + return null; + }, + visitClassSelector$1(klass) { + return null; + }, + visitIDSelector$1(id) { + return null; + }, + visitParentSelector$1(placeholder) { + return null; + }, + visitPlaceholderSelector$1(placeholder) { + return null; + }, + visitTypeSelector$1(type) { + return null; + }, + visitUniversalSelector$1(universal) { + return null; + }, + visitComplexSelector$1(complex) { + return A.IterableExtension_search0(complex.components, new A.SelectorSearchVisitor_visitComplexSelector_closure0(this)); + }, + visitCompoundSelector$1(compound) { + return A.IterableExtension_search0(compound.components, new A.SelectorSearchVisitor_visitCompoundSelector_closure0(this)); + }, + visitPseudoSelector$1(pseudo) { + return A.NullableExtension_andThen0(pseudo.selector, this.get$visitSelectorList()); + }, + visitSelectorList$1(list) { + return A.IterableExtension_search0(list.components, this.get$visitComplexSelector()); + } + }; + A.SelectorSearchVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor0.T?(ComplexSelectorComponent0)"); + } + }; + A.SelectorSearchVisitor_visitCompoundSelector_closure0.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor0.T?(SimpleSelector0)"); + } + }; + A.serialize_closure0.prototype = { + call$1(codeUnit) { + return codeUnit > 127; + }, + $signature: 50 + }; + A._SerializeVisitor0.prototype = { + visitCssStylesheet$1(node) { + var t1, t2, t3, t4, t5, t6, t7, previous, previous0, t8, _this = this; + for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._serialize0$_inspect, t3 = _this._serialize0$_style === B.OutputStyle_10, t4 = !t3, t5 = type$.CssParentNode_2, t6 = _this._serialize0$_buffer, t7 = _this._lineFeed.text, previous = null; t1.moveNext$0();) { + previous0 = t1.get$current(t1); + if (t2) + t8 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); + else + t8 = false; + if (t8) + continue; + if (previous != null) { + if (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) + t6.writeCharCode$1(59); + if (_this._serialize0$_isTrailingComment$2(previous0, previous)) { + if (t4) + t6.writeCharCode$1(32); + } else { + if (t4) + t6.write$1(0, t7); + if (previous.get$isGroupEnd()) + if (t4) + t6.write$1(0, t7); + } + } + previous0.accept$1(_this); + previous = previous0; + } + if (previous != null) + t1 = (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) && t4; + else + t1 = false; + if (t1) + t6.writeCharCode$1(59); + }, + visitCssComment$1(node) { + this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure0(this, node)); + }, + visitCssAtRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure0(_this, node)); + if (!node.isChildless) { + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + } + }, + visitCssMediaRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssImport$1(node) { + this._serialize0$_writeIndentation$0(); + this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure0(this, node)); + }, + _serialize0$_writeImportUrl$1(url) { + var urlContents, maybeQuote, _this = this; + if (_this._serialize0$_style !== B.OutputStyle_10 || url.charCodeAt(0) !== 117) { + _this._serialize0$_buffer.write$1(0, url); + return; + } + urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); + maybeQuote = urlContents.charCodeAt(0); + if (maybeQuote === 39 || maybeQuote === 34) + _this._serialize0$_buffer.write$1(0, urlContents); + else + _this._serialize0$_visitQuotedString$1(urlContents); + }, + visitCssKeyframeBlock$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + _serialize0$_visitMediaQuery$1(query) { + var t1, _1_0, _2_0, condition, operator, t2, _this = this, + _0_0 = query.modifier; + if (_0_0 != null) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(32); + } + _1_0 = query.type; + if (_1_0 != null) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _1_0); + if (query.conditions.length !== 0) + t1.write$1(0, " and "); + } + _2_0 = query.conditions; + if (_2_0.length === 1) + t1 = B.JSString_methods.startsWith$1(_2_0[0], "(not "); + else + t1 = false; + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, "not "); + condition = B.JSArray_methods.get$first(_2_0); + t1.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); + } else { + operator = query.conjunction ? "and" : "or"; + t1 = _this._serialize0$_style === B.OutputStyle_10 ? operator + " " : " " + operator + " "; + t2 = _this._serialize0$_buffer; + _this._serialize0$_writeBetween$3(_2_0, t1, t2.get$write(t2)); + } + }, + visitCssStyleRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node._style_rule0$_selector._box0$_inner.value.span, new A._SerializeVisitor_visitCssStyleRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssSupportsRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssDeclaration$1(node) { + var error, stackTrace, error0, stackTrace0, t3, declSpecificities, t4, t5, t6, t7, _i, rule, ruleSpecificities, exception, _this = this, + t1 = node.interleavedRules, + t2 = t1.length; + if (t2 !== 0) { + t3 = node._node$_parent; + t3.toString; + declSpecificities = _this._serialize0$_specificities$1(t3); + for (t3 = _this._serialize0$_logger, t4 = node.span, t5 = type$.SourceSpan, t6 = type$.String, t7 = node.trace, _i = 0; _i < t2; ++_i) { + rule = t1[_i]; + ruleSpecificities = _this._serialize0$_specificities$1(rule); + if (!declSpecificities.any$1(0, ruleSpecificities.get$contains(ruleSpecificities))) + continue; + A.WarnForDeprecation_warnForDeprecation0(t3, B.Deprecation_FGJ, string$.Sassx27s, new A.MultiSpan0(t4, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.span, "nested rule"], t5, t6), t5, t6)), t7); + } + } + _this._serialize0$_writeIndentation$0(); + t1 = node.name; + _this._serialize0$_write$1(t1); + t2 = _this._serialize0$_buffer; + t2.writeCharCode$1(58); + if (J.startsWith$1$s(t1.value, "--") && node.parsedAsCustomProperty) + t2.forSpan$2(node.value.span, new A._SerializeVisitor_visitCssDeclaration_closure1(_this, node)); + else { + if (_this._serialize0$_style !== B.OutputStyle_10) + t2.writeCharCode$1(32); + try { + t2.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure2(_this, node)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(A.MultiSpanSassException$0(error.message, node.value.span, error.primaryLabel, error.secondarySpans, null), error, stackTrace); + } else if (t1 instanceof A.SassScriptException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = error0.message; + A.throwWithTrace0(new A.SassException0(B.Set_empty, t1, node.value.span), error0, stackTrace0); + } else + throw exception; + } + } + }, + _serialize0$_specificities$1(node) { + var $parent, t2, t3, _i, + t1 = this.get$_serialize0$_specificities(); + if (node instanceof A.ModifiableCssStyleRule0) { + t1 = A.NullableExtension_andThen0(node._node$_parent, t1); + $parent = t1 == null ? null : A.IterableIntegerExtension_get_max(t1); + if ($parent == null) + $parent = 0; + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.int); + for (t2 = node._style_rule0$_selector._box0$_inner.value.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.add$1(0, $parent + t2[_i].get$specificity()); + return t1; + } else { + t1 = A.NullableExtension_andThen0(node.get$parent(node), t1); + return t1 == null ? B.Set_0 : t1; + } + }, + _serialize0$_writeFoldedValue$1(node) { + var t1, t2, next, t3, + scanner = A.StringScanner$(type$.SassString_2._as(node.value.value)._string0$_text, null, null); + for (t1 = scanner.string.length, t2 = this._serialize0$_buffer; scanner._string_scanner$_position !== t1;) { + next = scanner.readChar$0(); + if (next !== 10) { + t2.writeCharCode$1(next); + continue; + } + t2.writeCharCode$1(32); + while (true) { + t3 = scanner.peekChar$0(); + if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) + break; + scanner.readChar$0(); + } + } + }, + _serialize0$_writeReindentedValue$1(node) { + var _0_0, t1, _this = this, + value = type$.SassString_2._as(node.value.value)._string0$_text; + $label0$0: { + _0_0 = _this._serialize0$_minimumIndentation$1(value); + if (_0_0 == null) { + _this._serialize0$_buffer.write$1(0, value); + break $label0$0; + } + if (-1 === _0_0) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, A.trimAsciiRight0(value, true)); + t1.writeCharCode$1(32); + break $label0$0; + } + t1 = node.name.span; + t1 = t1.get$start(t1); + _this._serialize0$_writeWithIndent$2(value, Math.min(_0_0, t1.file.getColumn$1(t1.offset))); + } + }, + _serialize0$_minimumIndentation$1(text) { + var character, t2, min, next, min0, + scanner = A.LineScanner$(text), + t1 = scanner.string.length; + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + if (scanner._string_scanner$_position === t1) + return scanner.peekChar$1(-1) === 10 ? -1 : null; + for (min = null; scanner._string_scanner$_position !== t1;) { + for (; scanner._string_scanner$_position !== t1;) { + next = scanner.peekChar$0(); + if (next !== 32 && next !== 9) + break; + scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); + } + if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) + continue; + min0 = scanner._line_scanner$_column; + min = min == null ? min0 : Math.min(min, min0); + while (true) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + } + return min == null ? -1 : min; + }, + _serialize0$_writeWithIndent$2(text, minimumIndentation) { + var t1, t2, t3, character, lineStart, newlines, end, + scanner = A.LineScanner$(text); + for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize0$_buffer; scanner._string_scanner$_position !== t2;) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + for (; true;) { + lineStart = scanner._string_scanner$_position; + for (newlines = 1; true;) { + if (scanner._string_scanner$_position === t2) { + t3.writeCharCode$1(32); + return; + } + $label0$2: { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (32 === character || 9 === character) + continue; + if (10 === character) { + lineStart = scanner._string_scanner$_position; + ++newlines; + break $label0$2; + } + break; + } + } + this._serialize0$_writeTimes$2(10, newlines); + this._serialize0$_writeIndentation$0(); + end = scanner._string_scanner$_position; + t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); + for (; true;) { + if (scanner._string_scanner$_position === t2) + return; + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + } + }, + visitCalculation$1(value) { + var t2, _this = this, + t1 = _this._serialize0$_buffer; + t1.write$1(0, value.name); + t1.writeCharCode$1(40); + t2 = _this._serialize0$_style === B.OutputStyle_10 ? "," : ", "; + _this._serialize0$_writeBetween$3(value.$arguments, t2, _this.get$_serialize0$_writeCalculationValue()); + t1.writeCharCode$1(41); + }, + _serialize0$_writeCalculationValue$1(value) { + var _2_4_isSet, _2_4, t1, _0_0, _1_0, first, rest, left, right, operator, parenthesizeLeft, operatorWhitespace, parenthesizeRight, t2, _this = this, _null = null; + $label1$1: { + _2_4_isSet = value instanceof A.SassNumber0; + if (_2_4_isSet) { + _2_4 = value.get$hasComplexUnits(); + t1 = _2_4 && !_this._serialize0$_inspect; + } else { + _2_4 = _null; + t1 = false; + } + if (t1) + throw A.wrapException(A.SassScriptException$0(A.S(value) + " isn't a valid CSS value.", _null)); + if (_2_4_isSet && !isFinite(value._number1$_value)) { + $label0$0: { + _0_0 = value._number1$_value; + if (1 / 0 === _0_0) { + _this._serialize0$_buffer.write$1(0, "infinity"); + break $label0$0; + } + if (-1 / 0 === _0_0) { + _this._serialize0$_buffer.write$1(0, "-infinity"); + break $label0$0; + } + if (isNaN(_0_0)) + _this._serialize0$_buffer.write$1(0, "NaN"); + } + t1 = J.getInterceptor$x(value); + _this._serialize0$_writeCalculationUnits$2(t1.get$numeratorUnits(value), t1.get$denominatorUnits(value)); + break $label1$1; + } + if (_2_4_isSet) + t1 = _2_4; + else + t1 = false; + if (t1) { + _this._serialize0$_writeNumber$1(value._number1$_value); + t1 = J.getInterceptor$x(value); + _1_0 = t1.get$numeratorUnits(value); + if (_1_0.length >= 1) { + first = _1_0[0]; + rest = B.JSArray_methods.sublist$1(_1_0, 1); + _this._serialize0$_buffer.write$1(0, first); + _this._serialize0$_writeCalculationUnits$2(rest, t1.get$denominatorUnits(value)); + } else + _this._serialize0$_writeCalculationUnits$2(A._setArrayType([], type$.JSArray_String), t1.get$denominatorUnits(value)); + break $label1$1; + } + if (value instanceof A.Value0) { + value.accept$1(_this); + break $label1$1; + } + t1 = value instanceof A.CalculationOperation0; + left = _null; + right = _null; + if (t1) { + operator = value._calculation0$_operator; + left = value._calculation0$_left; + right = value._calculation0$_right; + right = right; + } else + operator = _null; + if (t1) { + parenthesizeLeft = left instanceof A.CalculationOperation0 && left._calculation0$_operator.precedence < operator.precedence; + if (parenthesizeLeft) + _this._serialize0$_buffer.writeCharCode$1(40); + _this._serialize0$_writeCalculationValue$1(left); + if (parenthesizeLeft) + _this._serialize0$_buffer.writeCharCode$1(41); + operatorWhitespace = _this._serialize0$_style !== B.OutputStyle_10 || operator.precedence === 1; + if (operatorWhitespace) + _this._serialize0$_buffer.writeCharCode$1(32); + t1 = _this._serialize0$_buffer; + t1.write$1(0, operator.operator); + if (operatorWhitespace) + t1.writeCharCode$1(32); + if (!(right instanceof A.CalculationOperation0 && _this._serialize0$_parenthesizeCalculationRhs$2(operator, right._calculation0$_operator))) { + parenthesizeRight = false; + if (operator === B.CalculationOperator_Qf10) { + if (right instanceof A.SassNumber0) + t2 = isFinite(right._number1$_value) ? right.get$hasComplexUnits() : right.get$hasUnits(); + else + t2 = parenthesizeRight; + parenthesizeRight = t2; + } + } else + parenthesizeRight = true; + if (parenthesizeRight) + t1.writeCharCode$1(40); + _this._serialize0$_writeCalculationValue$1(right); + if (parenthesizeRight) + t1.writeCharCode$1(41); + } + } + }, + _serialize0$_writeCalculationUnits$2(numeratorUnits, denominatorUnits) { + var t1, t2, t3, t4; + for (t1 = J.get$iterator$ax(numeratorUnits), t2 = this._serialize0$_buffer, t3 = this._serialize0$_style !== B.OutputStyle_10; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(42); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + for (t1 = J.get$iterator$ax(denominatorUnits); t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(47); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + }, + _serialize0$_parenthesizeCalculationRhs$2(outer, right) { + var t1; + $label0$0: { + if (B.CalculationOperator_Qf10 === outer) { + t1 = true; + break $label0$0; + } + if (B.CalculationOperator_g2q0 === outer) { + t1 = false; + break $label0$0; + } + t1 = right === B.CalculationOperator_g2q0 || right === B.CalculationOperator_CxF0; + break $label0$0; + } + return t1; + }, + visitColor$1(value) { + var _0_0, _0_2, _0_6, t1, _0_4, _0_6_isSet, t2, _0_10_isSet, _0_10, _0_12_isSet, _0_14, _0_12, _0_14_isSet, t3, _0_10_isSet0, polar, t4, t5, _this = this, _null = null; + $label0$0: { + _0_0 = value._color0$_space; + _0_2 = B.RgbColorSpace_mlz0 === _0_0; + _0_6 = _null; + t1 = true; + if (!_0_2) { + _0_4 = B.HslColorSpace_gsm0 === _0_0; + _0_6_isSet = !_0_4; + if (_0_6_isSet) { + _0_6 = B.HwbColorSpace_06z0 === _0_0; + t1 = _0_6; + } + } else { + _0_4 = _null; + _0_6_isSet = false; + } + if (t1 && value.channel0OrNull != null && value.channel1OrNull != null && value.channel2OrNull != null && value.alphaOrNull != null) { + _this._serialize0$_writeLegacyColor$1(value); + break $label0$0; + } + if (_0_2) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, "rgb("); + _this._serialize0$_writeChannel$1(value.channel0OrNull); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(value.channel2OrNull); + _this._serialize0$_maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + if (!_0_4) + t1 = _0_6_isSet ? _0_6 : B.HwbColorSpace_06z0 === _0_0; + else + t1 = true; + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _this._serialize0$_style === B.OutputStyle_10 ? _null : "deg"; + _this._serialize0$_writeChannel$2(value.channel0OrNull, t2); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$2(value.channel1OrNull, "%"); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$2(value.channel2OrNull, "%"); + _this._serialize0$_maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _0_10_isSet = B.LabColorSpace_IF20 !== _0_0; + if (_0_10_isSet) { + _0_10 = B.LchColorSpace_wv80 === _0_0; + t1 = _0_10; + } else { + _0_10 = _null; + t1 = true; + } + t2 = false; + if (t1) + if (!_this._serialize0$_inspect) { + t1 = value.channel0OrNull; + if (t1 == null) + t1 = 0; + if (t1 > 0 || A.fuzzyEquals0(t1, 0)) + t1 = t1 < 100 || A.fuzzyEquals0(t1, 100); + else + t1 = false; + t1 = !t1 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t1 = t2; + else + t1 = t2; + _0_12_isSet = !t1; + _0_14 = _null; + if (_0_12_isSet) { + _0_12 = B.OklabColorSpace_yrt0 === _0_0; + t1 = false; + _0_14_isSet = !_0_12; + if (_0_14_isSet) { + _0_14 = B.OklchColorSpace_li80 === _0_0; + t2 = _0_14; + } else + t2 = true; + t3 = false; + if (t2) + if (!_this._serialize0$_inspect) { + t2 = value.channel0OrNull; + if (t2 == null) + t2 = 0; + if (t2 > 0 || A.fuzzyEquals0(t2, 0)) + t2 = t2 < 1 || A.fuzzyEquals0(t2, 1); + else + t2 = false; + t2 = !t2 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t2 = t3; + else + t2 = t3; + if (!t2) { + if (_0_10_isSet) { + t2 = _0_10; + _0_10_isSet0 = _0_10_isSet; + } else { + _0_10 = B.LchColorSpace_wv80 === _0_0; + t2 = _0_10; + _0_10_isSet0 = true; + } + if (!t2) + if (_0_14_isSet) + t2 = _0_14; + else { + _0_14 = B.OklchColorSpace_li80 === _0_0; + t2 = _0_14; + _0_14_isSet = true; + } + else + t2 = true; + if (t2) + if (!_this._serialize0$_inspect) { + t1 = value.channel1OrNull; + t2 = t1 == null; + if (t2) + t1 = 0; + t1 = t1 < 0 && !A.fuzzyEquals0(t1, 0) && value.channel0OrNull != null && !t2; + } + } else { + _0_10_isSet0 = _0_10_isSet; + t1 = true; + } + } else { + _0_12 = _null; + _0_10_isSet0 = _0_10_isSet; + _0_14_isSet = false; + t1 = true; + } + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, "color-mix(in "); + t1.write$1(0, _0_0); + t2 = _this._serialize0$_style === B.OutputStyle_10; + t1.write$1(0, t2 ? "," : ", "); + _this._serialize0$_writeColorFunction$1(value.toSpace$1(B.XyzD65ColorSpace_4CA0)); + if (!t2) + t1.writeCharCode$1(32); + t1.write$1(0, "100%"); + t1.write$1(0, t2 ? "," : ", "); + t1.write$1(0, t2 ? "red" : "black"); + t1.writeCharCode$1(41); + break $label0$0; + } + t1 = true; + if (_0_10_isSet) + if (!(_0_12_isSet ? _0_12 : B.OklabColorSpace_yrt0 === _0_0)) + if (!(_0_10_isSet0 ? _0_10 : B.LchColorSpace_wv80 === _0_0)) + t1 = _0_14_isSet ? _0_14 : B.OklchColorSpace_li80 === _0_0; + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _0_0._space$_channels; + polar = t2[2].isPolarAngle; + t3 = false; + if (!_this._serialize0$_inspect) { + t4 = value.channel0OrNull; + if (t4 == null) + t4 = 0; + if (t4 > 0 || A.fuzzyEquals0(t4, 0)) + t4 = t4 < 100 || A.fuzzyEquals0(t4, 100); + else + t4 = false; + if (t4) { + if (polar) { + t3 = value.channel1OrNull; + if (t3 == null) + t3 = 0; + t3 = t3 < 0 && !A.fuzzyEquals0(t3, 0); + } + } else + t3 = true; + } + if (t3) { + t1.write$1(0, "from "); + t1.write$1(0, _this._serialize0$_style === B.OutputStyle_10 ? "red" : "black"); + t1.writeCharCode$1(32); + } + t3 = _this._serialize0$_style !== B.OutputStyle_10; + t4 = t3 && value.channel0OrNull != null; + t5 = value.channel0OrNull; + if (t4) { + t2 = type$.LinearChannel_2._as(t2[0]); + _this._serialize0$_writeNumber$1((t5 == null ? 0 : t5) * 100 / t2.max); + t1.writeCharCode$1(37); + } else + _this._serialize0$_writeChannel$1(t5); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + t2 = polar && t3 ? "deg" : _null; + _this._serialize0$_writeChannel$2(value.channel2OrNull, t2); + _this._serialize0$_maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _this._serialize0$_writeColorFunction$1(value); + } + }, + _serialize0$_writeChannel$2(channel, unit) { + var _this = this; + if (channel == null) + _this._serialize0$_buffer.write$1(0, "none"); + else if (isFinite(channel)) { + _this._serialize0$_writeNumber$1(channel); + if (unit != null) + _this._serialize0$_buffer.write$1(0, unit); + } else + _this.visitNumber$1(A.SassNumber_SassNumber0(channel, unit)); + }, + _serialize0$_writeChannel$1(channel) { + return this._serialize0$_writeChannel$2(channel, null); + }, + _serialize0$_writeLegacyColor$1(color) { + var rgb, t3, red, green, blue, hsl, hue, saturation, lightness, hwb, _0_0, format, _1_0, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1); + if (!color.get$isInGamut() && !_this._serialize0$_inspect) { + _this._serialize0$_writeHsl$1(color); + return; + } + if (_this._serialize0$_style === B.OutputStyle_10) { + rgb = color.toSpace$1(B.RgbColorSpace_mlz0); + if (opaque && _this._serialize0$_tryIntegerRgb$1(rgb)) + return; + t3 = rgb.channel0OrNull; + red = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel1OrNull; + green = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel2OrNull; + blue = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + hsl = color.toSpace$1(B.HslColorSpace_gsm0); + t3 = hsl.channel0OrNull; + hue = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel1OrNull; + saturation = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel2OrNull; + lightness = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = _this._serialize0$_buffer; + if (red.length + green.length + blue.length <= hue.length + saturation.length + lightness.length + 2) { + t3.write$1(0, opaque ? "rgb(" : "rgba("); + t3.write$1(0, red); + t3.writeCharCode$1(44); + t3.write$1(0, green); + t3.writeCharCode$1(44); + t3.write$1(0, blue); + } else { + t3.write$1(0, opaque ? "hsl(" : "hsla("); + t3.write$1(0, hue); + t3.writeCharCode$1(44); + t3.write$1(0, saturation); + t3.write$1(0, "%,"); + t3.write$1(0, lightness); + t3.writeCharCode$1(37); + } + if (!opaque) { + t3.writeCharCode$1(44); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + t3 = color._color0$_space; + if (t3 === B.HslColorSpace_gsm0) { + _this._serialize0$_writeHsl$1(color); + return; + } else if (_this._serialize0$_inspect && t3 === B.HwbColorSpace_06z0) { + t3 = _this._serialize0$_buffer; + t3.write$1(0, "hwb("); + hwb = color.toSpace$1(B.HwbColorSpace_06z0); + _this._serialize0$_writeNumber$1(hwb.channel$1(0, "hue")); + t3.writeCharCode$1(32); + _this._serialize0$_writeNumber$1(hwb.channel$1(0, "whiteness")); + t3.writeCharCode$1(37); + t3.writeCharCode$1(32); + _this._serialize0$_writeNumber$1(hwb.channel$1(0, "blackness")); + t3.writeCharCode$1(37); + if (!A.fuzzyEquals0(t2 ? 0 : t1, 1)) { + t3.write$1(0, " / "); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + _0_0 = color.format; + if (B.C__ColorFormatEnum0 === _0_0) { + _this._serialize0$_writeRgb$1(color); + return; + } + t1 = _0_0 instanceof A.SpanColorFormat0; + format = t1 ? _0_0 : null; + if (t1) { + _this._serialize0$_buffer.write$1(0, format._color0$_span.get$text()); + return; + } + if (opaque) { + rgb = color.toSpace$1(B.RgbColorSpace_mlz0); + _1_0 = $.$get$namesByColor0().$index(0, rgb); + if (_1_0 != null) { + _this._serialize0$_buffer.write$1(0, _1_0); + return; + } + if (_this._serialize0$_canUseHex$1(rgb)) { + _this._serialize0$_buffer.writeCharCode$1(35); + t1 = rgb.channel0OrNull; + _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel1OrNull; + _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel2OrNull; + _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + return; + } + } + if (t3 === B.HwbColorSpace_06z0) + _this._serialize0$_writeHsl$1(color); + else + _this._serialize0$_writeRgb$1(color); + }, + _serialize0$_tryIntegerRgb$1(rgb) { + var t1, redInt, greenInt, blueInt, shortHex, _0_0, t2, t3, $name, _this = this; + if (!_this._serialize0$_canUseHex$1(rgb)) + return false; + t1 = rgb.channel0OrNull; + redInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel1OrNull; + greenInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel2OrNull; + blueInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = redInt & 15; + shortHex = t1 === B.JSInt_methods._shrOtherPositive$1(redInt, 4) && (greenInt & 15) === B.JSInt_methods._shrOtherPositive$1(greenInt, 4) && (blueInt & 15) === B.JSInt_methods._shrOtherPositive$1(blueInt, 4); + _0_0 = $.$get$namesByColor0().$index(0, rgb); + t2 = false; + if (_0_0 != null) { + t3 = _0_0.length; + t2 = t3 <= (shortHex ? 4 : 7); + $name = _0_0; + } else + $name = null; + if (t2) + _this._serialize0$_buffer.write$1(0, $name); + else { + t2 = _this._serialize0$_buffer; + if (shortHex) { + t2.writeCharCode$1(35); + t2.writeCharCode$1(A.hexCharFor0(t1)); + t2.writeCharCode$1(A.hexCharFor0(greenInt & 15)); + t2.writeCharCode$1(A.hexCharFor0(blueInt & 15)); + } else { + t2.writeCharCode$1(35); + _this._serialize0$_writeHexComponent$1(redInt); + _this._serialize0$_writeHexComponent$1(greenInt); + _this._serialize0$_writeHexComponent$1(blueInt); + } + } + return true; + }, + _serialize0$_canUseHex$1(rgb) { + var t2, + t1 = rgb.channel0OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt0(t1)) + t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); + else + t1 = false; + t2 = false; + if (t1) { + t1 = rgb.channel1OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt0(t1)) + t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); + else + t1 = false; + if (t1) { + t1 = rgb.channel2OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt0(t1)) + t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + return t1; + }, + _serialize0$_writeRgb$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1), + rgb = color.toSpace$1(B.RgbColorSpace_mlz0), + t3 = _this._serialize0$_buffer; + t3.write$1(0, opaque ? "rgb(" : "rgba("); + _this._serialize0$_writeNumber$1(rgb.channel$1(0, "red")); + t4 = _this._serialize0$_style === B.OutputStyle_10; + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(rgb.channel$1(0, "green")); + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(rgb.channel$1(0, "blue")); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _serialize0$_writeHsl$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1), + hsl = color.toSpace$1(B.HslColorSpace_gsm0), + t3 = _this._serialize0$_buffer; + t3.write$1(0, opaque ? "hsl(" : "hsla("); + _this._serialize0$_writeChannel$1(hsl.channel$1(0, "hue")); + t4 = _this._serialize0$_style === B.OutputStyle_10; + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeChannel$2(hsl.channel$1(0, "saturation"), "%"); + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeChannel$2(hsl.channel$1(0, "lightness"), "%"); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _serialize0$_writeColorFunction$1(color) { + var _this = this, + t1 = _this._serialize0$_buffer; + t1.write$1(0, "color("); + t1.write$1(0, color._color0$_space); + t1.writeCharCode$1(32); + _this._serialize0$_writeBetween$3(color.get$channelsOrNull(), " ", _this.get$_serialize0$_writeChannel()); + _this._serialize0$_maybeWriteSlashAlpha$1(color); + t1.writeCharCode$1(41); + }, + _serialize0$_writeHexComponent$1(color) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(A.hexCharFor0(B.JSInt_methods._shrOtherPositive$1(color, 4))); + t1.writeCharCode$1(A.hexCharFor0(color & 15)); + }, + _serialize0$_maybeWriteSlashAlpha$1(color) { + var t2, t3, _this = this, + t1 = color.alphaOrNull; + if (A.fuzzyEquals0(t1 == null ? 0 : t1, 1)) + return; + t2 = _this._serialize0$_style !== B.OutputStyle_10; + if (t2) + _this._serialize0$_buffer.writeCharCode$1(32); + t3 = _this._serialize0$_buffer; + t3.writeCharCode$1(47); + if (t2) + t3.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(t1); + }, + visitList$1(value) { + var t2, singleton, t3, t4, t5, _this = this, + t1 = value._list1$_hasBrackets; + if (t1) + _this._serialize0$_buffer.writeCharCode$1(91); + else if (value._list1$_contents.length === 0) { + if (!_this._serialize0$_inspect) + throw A.wrapException(A.SassScriptException$0("() isn't a valid CSS value.", null)); + _this._serialize0$_buffer.write$1(0, "()"); + return; + } + t2 = _this._serialize0$_inspect; + singleton = false; + if (t2) + if (value._list1$_contents.length === 1) { + t3 = value._list1$_separator; + t3 = t3 === B.ListSeparator_ECn0 || t3 === B.ListSeparator_cQA0; + singleton = t3; + } + if (singleton && !t1) + _this._serialize0$_buffer.writeCharCode$1(40); + t3 = value._list1$_contents; + t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure2(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); + t4 = value._list1$_separator; + t5 = _this._serialize0$_separatorString$1(t4); + _this._serialize0$_writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure3(_this, value) : new A._SerializeVisitor_visitList_closure4(_this)); + if (singleton) { + t2 = _this._serialize0$_buffer; + t2.write$1(0, t4.separator); + if (!t1) + t2.writeCharCode$1(41); + } + if (t1) + _this._serialize0$_buffer.writeCharCode$1(93); + }, + _serialize0$_separatorString$1(separator) { + var t1; + $label0$0: { + if (B.ListSeparator_ECn0 === separator) { + t1 = this._serialize0$_style === B.OutputStyle_10 ? "," : ", "; + break $label0$0; + } + if (B.ListSeparator_cQA0 === separator) { + t1 = this._serialize0$_style === B.OutputStyle_10 ? "/" : " / "; + break $label0$0; + } + if (B.ListSeparator_nbm0 === separator) { + t1 = " "; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + _serialize0$_elementNeedsParens$2(separator, value) { + var t1; + $label1$1: { + if (value instanceof A.SassList0 && value._list1$_contents.length > 1 && !value._list1$_hasBrackets) { + $label0$0: { + if (B.ListSeparator_ECn0 === separator) { + t1 = value._list1$_separator === B.ListSeparator_ECn0; + break $label0$0; + } + if (B.ListSeparator_cQA0 === separator) { + t1 = value._list1$_separator; + t1 = t1 === B.ListSeparator_ECn0 || t1 === B.ListSeparator_cQA0; + break $label0$0; + } + t1 = value._list1$_separator !== B.ListSeparator_undecided_null_undecided0; + break $label0$0; + } + break $label1$1; + } + t1 = false; + break $label1$1; + } + return t1; + }, + visitMap$1(map) { + var t1, t2, _this = this; + if (!_this._serialize0$_inspect) + throw A.wrapException(A.SassScriptException$0(map.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(40); + t2 = map._map0$_contents; + _this._serialize0$_writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure0(_this)); + t1.writeCharCode$1(41); + }, + _serialize0$_writeMapElement$1(value) { + var needsParens = value instanceof A.SassList0 && value._list1$_separator === B.ListSeparator_ECn0 && !value._list1$_hasBrackets; + if (needsParens) + this._serialize0$_buffer.writeCharCode$1(40); + value.accept$1(this); + if (needsParens) + this._serialize0$_buffer.writeCharCode$1(41); + }, + visitNumber$1(value) { + var before, after, t1, _1_0, _this = this, + _0_0 = value.asSlash; + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_0_0)) { + before = _0_0._0; + after = _0_0._1; + _this.visitNumber$1(before); + _this._serialize0$_buffer.writeCharCode$1(47); + _this.visitNumber$1(after); + return; + } + t1 = value._number1$_value; + if (!isFinite(t1)) { + _this.visitCalculation$1(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + return; + } + if (value.get$hasComplexUnits()) { + if (!_this._serialize0$_inspect) + throw A.wrapException(A.SassScriptException$0(value.toString$0(0) + " isn't a valid CSS value.", null)); + _this.visitCalculation$1(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + } else { + _this._serialize0$_writeNumber$1(t1); + _1_0 = value.get$numeratorUnits(value); + if (_1_0.length === 1) + _this._serialize0$_buffer.write$1(0, _1_0[0]); + } + }, + _serialize0$_writeNumberToString$1(number) { + var t1 = new A.StringBuffer(""); + this._serialize0$_writeNumber$2(number, new A.NoSourceMapBuffer0(t1)); + t1 = t1._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _serialize0$_writeNumber$2(number, buffer) { + var _0_0, text, _this = this; + if (buffer == null) + buffer = _this._serialize0$_buffer; + _0_0 = A.fuzzyAsInt0(number); + if (_0_0 != null) { + buffer.write$1(0, _this._serialize0$_removeExponent$1(B.JSInt_methods.toString$0(_0_0))); + return; + } + text = _this._serialize0$_removeExponent$1(B.JSNumber_methods.toString$0(number)); + if (text.length < 12) { + buffer.write$1(0, _this._serialize0$_style === B.OutputStyle_10 && text.charCodeAt(0) === 48 ? B.JSString_methods.substring$1(text, 1) : text); + return; + } + _this._serialize0$_writeRounded$2(text, buffer); + }, + _serialize0$_writeNumber$1(number) { + return this._serialize0$_writeNumber$2(number, null); + }, + _serialize0$_removeExponent$1(text) { + var buffer, t2, t3, additionalZeroes, + negative = text.charCodeAt(0) === 45, + exponent = A._Cell$(), + t1 = text.length, + i = 0; + while (true) { + if (!(i < t1)) { + buffer = null; + break; + } + c$0: { + if (text.charCodeAt(i) !== 101) + break c$0; + buffer = new A.StringBuffer(""); + t2 = buffer._contents = "" + A.Primitives_stringFromCharCode(text.charCodeAt(0)); + if (negative) { + t2 += A.Primitives_stringFromCharCode(text.charCodeAt(1)); + buffer._contents = t2; + if (i > 3) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 3, i); + } else if (i > 2) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 2, i); + exponent.__late_helper$_value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t1), null); + break; + } + ++i; + } + if (buffer == null) + return text; + if (exponent._readLocal$0() > 0) { + t1 = exponent._readLocal$0(); + t2 = buffer._contents; + t3 = negative ? 1 : 0; + additionalZeroes = t1 - (t2.length - 1 - t3); + for (t1 = t2, i = 0; i < additionalZeroes; ++i) { + t1 = A.Primitives_stringFromCharCode(48); + t1 = buffer._contents += t1; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + negative = text.charCodeAt(0) === 45; + t1 = (negative ? "" + A.Primitives_stringFromCharCode(45) : "") + "0."; + i = -1; + while (true) { + t2 = exponent.__late_helper$_value; + if (t2 === exponent) + A.throwExpression(A.LateError$localNI("")); + if (!(i > t2)) + break; + t1 += A.Primitives_stringFromCharCode(48); + --i; + } + if (negative) { + t2 = buffer._contents; + t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); + } else + t2 = buffer; + t2 = t1 + A.S(t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }, + _serialize0$_writeRounded$2(text, buffer) { + var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex; + if (B.JSString_methods.endsWith$1(text, ".0")) { + buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); + return; + } + t1 = text.length; + digits = new Uint8Array(t1 + 1); + negative = text.charCodeAt(0) === 45; + textIndex = negative ? 1 : 0; + for (digitsIndex = 1; true; textIndex = textIndex0, digitsIndex = digitsIndex0) { + if (textIndex === t1) { + buffer.write$1(0, text); + return; + } + textIndex0 = textIndex + 1; + codeUnit = text.charCodeAt(textIndex); + if (codeUnit === 46) { + textIndex = textIndex0; + break; + } + digitsIndex0 = digitsIndex + 1; + digits[digitsIndex] = codeUnit - 48; + } + indexAfterPrecision = textIndex + 10; + if (indexAfterPrecision >= t1) { + buffer.write$1(0, text); + return; + } + for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 + 1; + textIndex0 = textIndex + 1; + digits[digitsIndex0] = text.charCodeAt(textIndex) - 48; + } + if (text.charCodeAt(textIndex) - 48 >= 5) + for (; true; digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 - 1; + newDigit = digits[digitsIndex1] + 1; + digits[digitsIndex1] = newDigit; + if (newDigit !== 10) + break; + } + for (; digitsIndex0 < digitsIndex; ++digitsIndex0) + digits[digitsIndex0] = 0; + while (true) { + t1 = digitsIndex0 > digitsIndex; + if (!(t1 && digits[digitsIndex0 - 1] === 0)) + break; + --digitsIndex0; + } + if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { + buffer.writeCharCode$1(48); + return; + } + if (negative) + buffer.writeCharCode$1(45); + if (digits[0] === 0) + writtenIndex = this._serialize0$_style === B.OutputStyle_10 && digits[1] === 0 ? 2 : 1; + else + writtenIndex = 0; + for (; writtenIndex < digitsIndex; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + if (t1) { + buffer.writeCharCode$1(46); + for (; writtenIndex < digitsIndex0; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + } + }, + _serialize0$_visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { + var t1, includesSingleQuote, includesDoubleQuote, i, char, _1_2, _1_4, _0_0, quote, _this = this, + buffer = forceDoubleQuote ? _this._serialize0$_buffer : new A.StringBuffer(""); + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { + char = string.charCodeAt(i); + _1_2 = 39 === char; + if (_1_2 && forceDoubleQuote) { + buffer.writeCharCode$1(39); + continue; + } + if (_1_2 && includesDoubleQuote) { + _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_2) { + buffer.writeCharCode$1(39); + includesSingleQuote = true; + continue; + } + _1_4 = 34 === char; + if (_1_4 && forceDoubleQuote) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(34); + continue; + } + if (_1_4 && includesSingleQuote) { + _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_4) { + buffer.writeCharCode$1(34); + includesDoubleQuote = true; + continue; + } + if (0 === char || 1 === char || 2 === char || 3 === char || 4 === char || 5 === char || 6 === char || 7 === char || 8 === char || 10 === char || 11 === char || 12 === char || 13 === char || 14 === char || 15 === char || 16 === char || 17 === char || 18 === char || 19 === char || 20 === char || 21 === char || 22 === char || 23 === char || 24 === char || 25 === char || 26 === char || 27 === char || 28 === char || 29 === char || 30 === char || 31 === char || 127 === char) { + _this._serialize0$_writeEscape$4(buffer, char, string, i); + continue; + } + if (92 === char) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(92); + continue; + } + _0_0 = _this._serialize0$_tryPrivateUseCharacter$4(buffer, char, string, i); + if (_0_0 != null) + i = _0_0; + else + buffer.writeCharCode$1(char); + } + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + else { + quote = includesDoubleQuote ? 39 : 34; + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(quote); + t1.write$1(0, buffer); + t1.writeCharCode$1(quote); + } + }, + _serialize0$_visitQuotedString$1(string) { + return this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, false); + }, + _serialize0$_visitUnquotedString$1(string) { + var t1, t2, afterNewline, i, _1_0, _0_0; + for (t1 = string.length, t2 = this._serialize0$_buffer, afterNewline = false, i = 0; i < t1; ++i) { + _1_0 = string.charCodeAt(i); + if (10 === _1_0) { + t2.writeCharCode$1(32); + afterNewline = true; + continue; + } + if (32 === _1_0) { + if (!afterNewline) + t2.writeCharCode$1(32); + continue; + } + _0_0 = this._serialize0$_tryPrivateUseCharacter$4(t2, _1_0, string, i); + if (_0_0 != null) + i = _0_0; + else + t2.writeCharCode$1(_1_0); + afterNewline = false; + } + }, + _serialize0$_tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { + var t1; + if (this._serialize0$_style === B.OutputStyle_10) + return null; + if (codeUnit >= 57344 && codeUnit <= 63743) { + this._serialize0$_writeEscape$4(buffer, codeUnit, string, i); + return i; + } + if (codeUnit >>> 7 === 439 && string.length > i + 1) { + t1 = i + 1; + this._serialize0$_writeEscape$4(buffer, 65536 + ((codeUnit & 1023) << 10) + (string.charCodeAt(t1) & 1023), string, t1); + return t1; + } + return null; + }, + _serialize0$_writeEscape$4(buffer, character, string, i) { + var t1, next; + buffer.writeCharCode$1(92); + buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); + t1 = i + 1; + if (string.length === t1) + return; + next = string.charCodeAt(t1); + if (A.CharacterExtension_get_isHex0(next) || 32 === next || 9 === next) + buffer.writeCharCode$1(32); + }, + visitAttributeSelector$1(attribute) { + var _0_0, t2, + t1 = this._serialize0$_buffer; + t1.writeCharCode$1(91); + t1.write$1(0, attribute.name); + _0_0 = attribute.value; + if (_0_0 != null) { + t1.write$1(0, attribute.op); + if (A.Parser_isIdentifier0(_0_0) && !B.JSString_methods.startsWith$1(_0_0, "--")) { + t1.write$1(0, _0_0); + t2 = attribute.modifier; + if (t2 != null) + t1.writeCharCode$1(32); + } else { + this._serialize0$_visitQuotedString$1(_0_0); + t2 = attribute.modifier; + if (t2 != null) + if (this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + } + A.NullableExtension_andThen0(t2, t1.get$write(t1)); + } + t1.writeCharCode$1(93); + }, + visitClassSelector$1(klass) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(46); + t1.write$1(0, klass.name); + }, + visitComplexSelector$1(complex) { + var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, + t1 = complex.leadingCombinators; + _this._serialize0$_writeCombinators$1(t1); + if (t1.length >= 1 && complex.components.length >= 1) + if (_this._serialize0$_style !== B.OutputStyle_10) + _this._serialize0$_buffer.writeCharCode$1(32); + for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize0$_buffer, t5 = _this._serialize0$_style === B.OutputStyle_10, t6 = !t5, i = 0; i < t2; ++i) { + component = t1[i]; + _this.visitCompoundSelector$1(component.selector); + t7 = component.combinators; + t8 = t7.length === 0; + if (!t8) + if (t6) + t4.writeCharCode$1(32); + t9 = t5 ? "" : " "; + _this._serialize0$_writeBetween$3(t7, t9, t4.get$write(t4)); + if (i !== t3) + t7 = !t5 || t8; + else + t7 = false; + if (t7) + t4.writeCharCode$1(32); + } + }, + _serialize0$_writeCombinators$1(combinators) { + var t1 = this._serialize0$_style === B.OutputStyle_10 ? "" : " ", + t2 = this._serialize0$_buffer; + return this._serialize0$_writeBetween$3(combinators, t1, t2.get$write(t2)); + }, + visitCompoundSelector$1(compound) { + var t2, t3, _i, + t1 = this._serialize0$_buffer, + start = t1.get$length(t1); + for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(this); + if (t1.get$length(t1) === start) + t1.writeCharCode$1(42); + }, + visitIDSelector$1(id) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(35); + t1.write$1(0, id.name); + }, + visitSelectorList$1(list) { + var t1, t2, t3, t4, first, t5, _this = this, + complexes = list.components; + for (t1 = J.get$iterator$ax(_this._serialize0$_inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure0(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._serialize0$_style !== B.OutputStyle_10, t3 = _this._serialize0$_buffer, t4 = _this._lineFeed.text, first = true; t1.moveNext$0();) { + t5 = t1.get$current(t1); + if (first) + first = false; + else { + t3.writeCharCode$1(44); + if (t5.lineBreak) { + if (t2) + t3.write$1(0, t4); + _this._serialize0$_writeIndentation$0(); + } else if (t2) + t3.writeCharCode$1(32); + } + _this.visitComplexSelector$1(t5); + } + }, + visitParentSelector$1($parent) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(38); + A.NullableExtension_andThen0($parent.suffix, t1.get$write(t1)); + }, + visitPlaceholderSelector$1(placeholder) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(37); + t1.write$1(0, placeholder.name); + }, + visitPseudoSelector$1(pseudo) { + var _0_4, t3, + t1 = pseudo.name, + t2 = false; + if ("not" === t1) { + _0_4 = pseudo.selector; + if (_0_4 instanceof A.SelectorList0) + t2 = (_0_4 == null ? type$.SelectorList_2._as(_0_4) : _0_4).accept$1(B._IsInvisibleVisitor_true0); + } + if (t2) + return; + t2 = this._serialize0$_buffer; + t2.writeCharCode$1(58); + if (!pseudo.isSyntacticClass) + t2.writeCharCode$1(58); + t2.write$1(0, t1); + t1 = pseudo.argument; + t3 = t1 == null; + if (t3 && pseudo.selector == null) + return; + t2.writeCharCode$1(40); + if (!t3) { + t2.write$1(0, t1); + if (pseudo.selector != null) + t2.writeCharCode$1(32); + } + A.NullableExtension_andThen0(pseudo.selector, this.get$visitSelectorList()); + t2.writeCharCode$1(41); + }, + visitTypeSelector$1(type) { + this._serialize0$_buffer.write$1(0, type.name); + }, + visitUniversalSelector$1(universal) { + var t2, + t1 = universal.namespace; + if (t1 != null) { + t2 = this._serialize0$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(124); + } + this._serialize0$_buffer.writeCharCode$1(42); + }, + _serialize0$_write$1(value) { + return this._serialize0$_buffer.forSpan$2(value.span, new A._SerializeVisitor__write_closure0(this, value)); + }, + _serialize0$_visitChildren$1($parent) { + var t2, t3, t4, t5, t6, t7, t8, prePrevious, previous, t9, previous0, t10, savedIndentation, _this = this, + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(123); + for (t2 = $parent.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = _this._serialize0$_style === B.OutputStyle_10, t5 = !t4, t6 = _this.get$_serialize0$_requiresSemicolon(), t7 = !_this._serialize0$_inspect, t3 = t3._eval$1("ListBase.E"), t8 = _this._lineFeed.text, prePrevious = null, previous = null; t2.moveNext$0();) { + t9 = t2.__internal$_current; + previous0 = t9 == null ? t3._as(t9) : t9; + if (t7) + t9 = t4 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); + else + t9 = false; + if (t9) + continue; + t9 = previous == null; + t10 = t9 ? null : t6.call$1(previous); + if (t10 == null ? false : t10) + t1.writeCharCode$1(59); + if (_this._serialize0$_isTrailingComment$2(previous0, t9 ? $parent : previous)) { + if (t5) + t1.writeCharCode$1(32); + savedIndentation = _this._serialize0$_indentation; + _this._serialize0$_indentation = 0; + new A._SerializeVisitor__visitChildren_closure1(_this, previous0).call$0(); + _this._serialize0$_indentation = savedIndentation; + } else { + if (t5) + t1.write$1(0, t8); + ++_this._serialize0$_indentation; + new A._SerializeVisitor__visitChildren_closure2(_this, previous0).call$0(); + --_this._serialize0$_indentation; + } + prePrevious = previous; + previous = previous0; + } + if (previous != null) { + if ((type$.CssParentNode_2._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) && t5) + t1.writeCharCode$1(59); + if (prePrevious == null && _this._serialize0$_isTrailingComment$2(previous, $parent)) { + if (t5) + t1.writeCharCode$1(32); + } else { + _this._serialize0$_writeLineFeed$0(); + _this._serialize0$_writeIndentation$0(); + } + } + t1.writeCharCode$1(125); + }, + _serialize0$_requiresSemicolon$1(node) { + return type$.CssParentNode_2._is(node) ? node.get$isChildless() : !(node instanceof A.ModifiableCssComment0); + }, + _serialize0$_isTrailingComment$2(node, previous) { + var t1, t2, t3, searchFrom, endOffset, t4, span; + if (this._serialize0$_style === B.OutputStyle_10) + return false; + if (!(node instanceof A.ModifiableCssComment0)) + return false; + t1 = node.span; + t2 = t1.get$sourceUrl(t1); + t3 = previous.get$span(previous); + if (!J.$eq$(t2, t3.get$sourceUrl(t3))) + return false; + t2 = previous.get$span(previous); + if (!(J.$eq$(t2.get$file(t2).url, t1.get$file(t1).url) && t2.get$start(t2).offset <= t1.get$start(t1).offset && t2.get$end(t2).offset >= t1.get$end(t1).offset)) { + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t2 = previous.get$span(previous); + t2 = t2.get$end(t2); + return t1 === t2.file.getLine$1(t2.offset); + } + t2 = t1.get$start(t1); + t3 = previous.get$span(previous); + searchFrom = t2.offset - t3.get$start(t3).offset - 1; + if (searchFrom < 0) + return false; + endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); + t2 = previous.get$span(previous); + t2 = t2.get$file(t2); + t3 = previous.get$span(previous); + t3 = t3.get$start(t3); + t4 = previous.get$span(previous); + span = t2.span$2(0, t3.offset, t4.get$start(t4).offset + endOffset); + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t4 = A.FileLocation$_(span.file, span._end); + return t1 === t4.file.getLine$1(t4.offset); + }, + _serialize0$_writeLineFeed$0() { + if (this._serialize0$_style !== B.OutputStyle_10) + this._serialize0$_buffer.write$1(0, this._lineFeed.text); + }, + _serialize0$_writeIndentation$0() { + var _this = this; + if (_this._serialize0$_style === B.OutputStyle_10) + return; + _this._serialize0$_writeTimes$2(_this._serialize0$_indentCharacter, _this._serialize0$_indentation * _this._serialize0$_indentWidth); + }, + _serialize0$_writeTimes$2(char, times) { + var t1, i; + for (t1 = this._serialize0$_buffer, i = 0; i < times; ++i) + t1.writeCharCode$1(char); + }, + _serialize0$_writeBetween$1$3(iterable, text, callback) { + var t1, t2, first, value; + for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize0$_buffer, first = true; t1.moveNext$0();) { + value = t1.get$current(t1); + if (first) + first = false; + else + t2.write$1(0, text); + callback.call$1(value); + } + }, + _serialize0$_writeBetween$3(iterable, text, callback) { + return this._serialize0$_writeBetween$1$3(iterable, text, callback, type$.dynamic); + } + }; + A._SerializeVisitor_visitCssComment_closure0.prototype = { + call$0() { + var t2, t3, _0_0, minimumIndentation, + t1 = this.$this; + if (t1._serialize0$_style === B.OutputStyle_10 && this.node.text.charCodeAt(2) !== 33) + return; + t2 = this.node; + t3 = t2.text; + if (B.JSString_methods.startsWith$1(t3, A.RegExp_RegExp("/\\*# source(Mapping)?URL=", false))) + return; + _0_0 = t1._serialize0$_minimumIndentation$1(t3); + if (_0_0 != null) { + t2 = t2.span; + t2 = t2.get$start(t2); + minimumIndentation = Math.min(_0_0, t2.file.getColumn$1(t2.offset)); + t1._serialize0$_writeIndentation$0(); + t1._serialize0$_writeWithIndent$2(t3, minimumIndentation); + } else { + t1._serialize0$_writeIndentation$0(); + t1._serialize0$_buffer.write$1(0, t3); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssAtRule_closure0.prototype = { + call$0() { + var t3, _0_0, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.writeCharCode$1(64); + t3 = this.node; + t1._serialize0$_write$1(t3.name); + _0_0 = t3.value; + if (_0_0 != null) { + t2.writeCharCode$1(32); + t1._serialize0$_write$1(_0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssMediaRule_closure0.prototype = { + call$0() { + var t3, firstQuery, t4, t5, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@media"); + t3 = this.node.queries; + firstQuery = B.JSArray_methods.get$first(t3); + t4 = t1._serialize0$_style === B.OutputStyle_10; + t5 = true; + if (t4) + if (firstQuery.modifier == null) + if (firstQuery.type == null) { + t5 = firstQuery.conditions; + t5 = t5.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t5), "(not "); + } + if (t5) + t2.writeCharCode$1(32); + t2 = t4 ? "," : ", "; + t1._serialize0$_writeBetween$3(t3, t2, t1.get$_serialize0$_visitMediaQuery()); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport_closure0.prototype = { + call$0() { + var t3, t4, _0_0, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@import"); + t3 = t1._serialize0$_style !== B.OutputStyle_10; + if (t3) + t2.writeCharCode$1(32); + t4 = this.node; + t2.forSpan$2(t4.url.span, new A._SerializeVisitor_visitCssImport__closure0(t1, t4)); + _0_0 = t4.modifiers; + if (_0_0 != null) { + if (t3) + t2.writeCharCode$1(32); + t2.write$1(0, _0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport__closure0.prototype = { + call$0() { + return this.$this._serialize0$_writeImportUrl$1(this.node.url.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize0$_style === B.OutputStyle_10 ? "," : ", ", + t3 = t1._serialize0$_buffer; + return t1._serialize0$_writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssStyleRule_closure0.prototype = { + call$0() { + return this.$this.visitSelectorList$1(this.node._style_rule0$_selector._box0$_inner.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssSupportsRule_closure0.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@supports"); + if (!(t1._serialize0$_style === B.OutputStyle_10 && J.codeUnitAt$1$s(this.node.condition.value, 0) === 40)) + t2.writeCharCode$1(32); + t1._serialize0$_write$1(this.node.condition); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + if (t1._serialize0$_style === B.OutputStyle_10) + t1._serialize0$_writeFoldedValue$1(t2); + else + t1._serialize0$_writeReindentedValue$1(t2); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure2.prototype = { + call$0() { + return this.node.value.value.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor_visitList_closure2.prototype = { + call$1(element) { + return !element.get$isBlank(); + }, + $signature: 54 + }; + A._SerializeVisitor_visitList_closure3.prototype = { + call$1(element) { + var t1 = this.$this, + needsParens = t1._serialize0$_elementNeedsParens$2(this.value._list1$_separator, element); + if (needsParens) + t1._serialize0$_buffer.writeCharCode$1(40); + element.accept$1(t1); + if (needsParens) + t1._serialize0$_buffer.writeCharCode$1(41); + }, + $signature: 59 + }; + A._SerializeVisitor_visitList_closure4.prototype = { + call$1(element) { + element.accept$1(this.$this); + }, + $signature: 59 + }; + A._SerializeVisitor_visitMap_closure0.prototype = { + call$1(entry) { + var t1 = this.$this; + t1._serialize0$_writeMapElement$1(entry.key); + t1._serialize0$_buffer.write$1(0, ": "); + t1._serialize0$_writeMapElement$1(entry.value); + }, + $signature: 569 + }; + A._SerializeVisitor_visitSelectorList_closure0.prototype = { + call$1(complex) { + return !complex.accept$1(B._IsInvisibleVisitor_true0); + }, + $signature: 20 + }; + A._SerializeVisitor__write_closure0.prototype = { + call$0() { + return this.$this._serialize0$_buffer.write$1(0, this.value.value); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure1.prototype = { + call$0() { + return this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure2.prototype = { + call$0() { + this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A.OutputStyle0.prototype = { + _enumToString$0() { + return "OutputStyle." + this._name; + } + }; + A.LineFeed0.prototype = { + _enumToString$0() { + return "LineFeed." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.ShadowedModuleView0.prototype = { + get$url(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._shadowed_view0$_inner.get$upstream(); + }, + get$extensionStore() { + return this._shadowed_view0$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._shadowed_view0$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._shadowed_view0$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._shadowed_view0$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + else + this._shadowed_view0$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + return this._shadowed_view0$_inner.variableIdentity$1($name); + }, + $eq(_, other) { + var t1, t2, t3, _this = this; + if (other == null) + return false; + t1 = false; + if (other instanceof A.ShadowedModuleView0) + if (_this._shadowed_view0$_inner.$eq(0, other._shadowed_view0$_inner)) { + t2 = _this.variables; + t2 = t2.get$keys(t2); + t3 = other.variables; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t2 = _this.functions; + t2 = t2.get$keys(t2); + t3 = other.functions; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t1 = _this.mixins; + t1 = t1.get$keys(t1); + t2 = other.mixins; + t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); + t1 = t2; + } + } + } + return t1; + }, + get$hashCode(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$hashCode(t1); + }, + cloneCss$0() { + var _this = this; + return new A.ShadowedModuleView0(_this._shadowed_view0$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); + }, + toString$0(_) { + return "shadowed " + this._shadowed_view0$_inner.toString$0(0); + }, + $isModule1: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.SilentComment0.prototype = { + accept$1$1(visitor) { + return visitor.visitSilentComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text; + }, + get$span(receiver) { + return this.span; + } + }; + A.SimpleSelector0.prototype = { + get$specificity() { + return 1000; + }, + get$hasComplicatedSuperselectorSemantics() { + return false; + }, + addSuffix$1(suffix) { + return A.throwExpression(A.MultiSpanSassException$0('Selector "' + this.toString$0(0) + "\" can't have a suffix", this.span, "outer selector", A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String), null)); + }, + unify$1(compound) { + var other, result, addedThis, _i, simple, _this = this, + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector0)) { + if (other instanceof A.PseudoSelector0) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector_2); + for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (!addedThis && simple instanceof A.PseudoSelector0) { + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var list; + if (this.$eq(0, other)) + return true; + if (other instanceof A.PseudoSelector0 && other.isClass) { + list = other.selector; + if (list != null && $._subselectorPseudos0.contains$1(0, other.normalizedName)) + return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure0(this)); + } + return false; + } + }; + A.SimpleSelector_isSuperselector_closure0.prototype = { + call$1(complex) { + var t1 = complex.components; + return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure0(this.$this)); + }, + $signature: 20 + }; + A.SimpleSelector_isSuperselector__closure0.prototype = { + call$1(simple) { + return this.$this.isSuperselector$1(simple); + }, + $signature: 14 + }; + A.SingleUnitSassNumber0.prototype = { + get$numeratorUnits(_) { + return A.List_List$unmodifiable([this._single_unit$_unit], type$.String); + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, this._number1$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return unit === this._single_unit$_unit; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.SingleUnitSassNumber0 && A.conversionFactor0(this._single_unit$_unit, other._single_unit$_unit) != null; + }, + hasPossiblyCompatibleUnits$1(other) { + var t1, knownCompatibilities, otherUnit; + if (!(other instanceof A.SingleUnitSassNumber0)) + return false; + t1 = $.$get$_knownCompatibilitiesByUnit0(); + knownCompatibilities = t1.$index(0, this._single_unit$_unit.toLowerCase()); + if (knownCompatibilities == null) + return true; + otherUnit = other._single_unit$_unit.toLowerCase(); + return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); + }, + compatibleWithUnit$1(unit) { + return A.conversionFactor0(this._single_unit$_unit, unit) != null; + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$coerceToMatch0(other, $name, otherName) : t1; + }, + coerceToMatch$1(other) { + return this.coerceToMatch$3(other, null, null); + }, + coerceValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$coerceValueToMatch0(other, $name, otherName) : t1; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$convertToMatch(other, $name, otherName) : t1; + }, + convertValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : t1; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + var t1 = J.getInterceptor$asx(newNumerators); + t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceToUnit$1(t1.$index(newNumerators, 0)) : null; + return t1 == null ? this.super$SassNumber$coerce0(newNumerators, newDenominators, $name) : t1; + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + var t1 = J.getInterceptor$asx(newNumerators); + t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceValueToUnit$1(t1.$index(newNumerators, 0)) : null; + return t1 == null ? this.super$SassNumber$coerceValue0(newNumerators, newDenominators, $name) : t1; + }, + coerceValueToUnit$2(unit, $name) { + var t1 = this._single_unit$_coerceValueToUnit$1(unit); + return t1 == null ? this.super$SassNumber$coerceValueToUnit0(unit, $name) : t1; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + _single_unit$_coerceToUnit$1(unit) { + var t1 = this._single_unit$_unit; + if (t1 === unit) + return this; + return A.NullableExtension_andThen0(A.conversionFactor0(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure0(this, unit)); + }, + _single_unit$_coerceValueToUnit$1(unit) { + return A.NullableExtension_andThen0(A.conversionFactor0(unit, this._single_unit$_unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure0(this)); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var mutableOtherDenominators, t1 = {}; + t1.value = value; + t1.newNumerators = otherNumerators; + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + A.removeFirstWhere0(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure1(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure2(t1, this)); + return A.SassNumber_SassNumber$withUnits0(t1.value, mutableOtherDenominators, t1.newNumerators); + }, + unaryMinus$0() { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, -this._number1$_value, null); + }, + $eq(_, other) { + var factor; + if (other == null) + return false; + if (other instanceof A.SingleUnitSassNumber0) { + factor = A.conversionFactor0(other._single_unit$_unit, this._single_unit$_unit); + return factor != null && A.fuzzyEquals0(this._number1$_value * factor, other._number1$_value); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this.canonicalMultiplierForUnit$1(_this._single_unit$_unit)) : t1; + } + }; + A.SingleUnitSassNumber__coerceToUnit_closure0.prototype = { + call$1(factor) { + return new A.SingleUnitSassNumber0(this.unit, this.$this._number1$_value * factor, null); + }, + $signature: 570 + }; + A.SingleUnitSassNumber__coerceValueToUnit_closure0.prototype = { + call$1(factor) { + return this.$this._number1$_value * factor; + }, + $signature: 16 + }; + A.SingleUnitSassNumber_multiplyUnits_closure1.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(denominator, this.$this._single_unit$_unit); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 5 + }; + A.SingleUnitSassNumber_multiplyUnits_closure2.prototype = { + call$0() { + var t1 = A._setArrayType([this.$this._single_unit$_unit], type$.JSArray_String), + t2 = this._box_0; + B.JSArray_methods.addAll$1(t1, t2.newNumerators); + t2.newNumerators = t1; + }, + $signature: 0 + }; + A.SourceMapBuffer0.prototype = { + get$_source_map_buffer0$_targetLocation() { + var t1 = this._source_map_buffer0$_buffer._contents, + t2 = this._source_map_buffer0$_line; + return A.SourceLocation$(t1.length, this._source_map_buffer0$_column, t2, null); + }, + get$length(_) { + return this._source_map_buffer0$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + var t1, _this = this, + wasInSpan = _this._source_map_buffer0$_inSpan; + _this._source_map_buffer0$_inSpan = true; + _this._source_map_buffer0$_addEntry$2(span.get$start(span), _this.get$_source_map_buffer0$_targetLocation()); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._source_map_buffer0$_inSpan = wasInSpan; + } + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + _source_map_buffer0$_addEntry$2(source, target) { + var entry, t2, + t1 = this._source_map_buffer0$_entries; + if (t1.length !== 0) { + entry = B.JSArray_methods.get$last(t1); + t2 = entry.source; + if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) + return; + if (entry.target.offset === target.offset) + return; + } + t1.push(new A.Entry(source, target, null)); + }, + write$1(_, object) { + var t1, i, + string = J.toString$0$(object); + this._source_map_buffer0$_buffer._contents += string; + for (t1 = string.length, i = 0; i < t1; ++i) + if (string.charCodeAt(i) === 10) + this._source_map_buffer0$_writeLine$0(); + else + ++this._source_map_buffer0$_column; + }, + writeCharCode$1(charCode) { + var t1 = this._source_map_buffer0$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + if (charCode === 10) + this._source_map_buffer0$_writeLine$0(); + else + ++this._source_map_buffer0$_column; + }, + _source_map_buffer0$_writeLine$0() { + var _this = this, + t1 = _this._source_map_buffer0$_entries; + if (B.JSArray_methods.get$last(t1).target.line === _this._source_map_buffer0$_line && B.JSArray_methods.get$last(t1).target.column === _this._source_map_buffer0$_column) + t1.pop(); + ++_this._source_map_buffer0$_line; + _this._source_map_buffer0$_column = 0; + if (_this._source_map_buffer0$_inSpan) + t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_source_map_buffer0$_targetLocation(), null)); + }, + toString$0(_) { + var t1 = this._source_map_buffer0$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + var i, t2, prefixColumn, _box_0 = {}, + t1 = prefix.length; + if (t1 === 0) + return A.SingleMapping_SingleMapping$fromEntries(this._source_map_buffer0$_entries); + _box_0.prefixColumn = _box_0.prefixLines = 0; + for (i = 0, t2 = 0; i < t1; ++i) + if (prefix.charCodeAt(i) === 10) { + ++_box_0.prefixLines; + _box_0.prefixColumn = 0; + t2 = 0; + } else { + prefixColumn = t2 + 1; + _box_0.prefixColumn = prefixColumn; + t2 = prefixColumn; + } + t2 = this._source_map_buffer0$_entries; + return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure0(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); + } + }; + A.SourceMapBuffer_buildSourceMap_closure0.prototype = { + call$1(entry) { + var t1 = entry.target, + t2 = t1.line, + t3 = this._box_0, + t4 = t3.prefixLines; + t3 = t2 === 0 ? t3.prefixColumn : 0; + return new A.Entry(entry.source, A.SourceLocation$(t1.offset + this.prefixLength, t1.column + t3, t2 + t4, null), entry.identifierName); + }, + $signature: 162 + }; + A.updateSourceSpanPrototype_closure.prototype = { + call$0() { + return this.span; + }, + $signature: 30 + }; + A.updateSourceSpanPrototype_closure0.prototype = { + call$1(span) { + return span.get$start(span); + }, + $signature: 260 + }; + A.updateSourceSpanPrototype_closure1.prototype = { + call$1(span) { + return span.get$end(span); + }, + $signature: 260 + }; + A.updateSourceSpanPrototype_closure2.prototype = { + call$1(span) { + return A.NullableExtension_andThen0(span.get$sourceUrl(span), new A.updateSourceSpanPrototype__closure()); + }, + $signature: 572 + }; + A.updateSourceSpanPrototype__closure.prototype = { + call$1(url) { + var t1, _null = null; + if (url.get$scheme() === "") { + t1 = $.$get$context(); + t1 = t1.toUri$1(A.absolute(t1.style.pathFromUri$1(A._parseUri(url)), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); + } else + t1 = url; + return new self.URL(t1.toString$0(0)); + }, + $signature: 261 + }; + A.updateSourceSpanPrototype_closure3.prototype = { + call$1(span) { + return span.get$text(); + }, + $signature: 262 + }; + A.updateSourceSpanPrototype_closure4.prototype = { + call$1(span) { + return span.get$context(span); + }, + $signature: 262 + }; + A.updateSourceSpanPrototype_closure5.prototype = { + call$1($location) { + return $location.get$line(); + }, + $signature: 263 + }; + A.updateSourceSpanPrototype_closure6.prototype = { + call$1($location) { + return $location.get$column(); + }, + $signature: 263 + }; + A.ColorSpace0.prototype = { + get$isLegacyInternal() { + return false; + }, + get$isPolarInternal() { + return false; + }, + convert$5(dest, channel0, channel1, channel2, alpha) { + return this.convertLinear$5(dest, channel0, channel1, channel2, alpha); + }, + convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, t2, transformedBlue, transformedGreen, transformedRed, linearRed, linearGreen, linearBlue, matrix, _this = this; + $label0$0: { + t1 = B.HslColorSpace_gsm0 !== dest; + if (!t1 || B.HwbColorSpace_06z0 === dest) { + t2 = B.SrgbColorSpace_AD40; + break $label0$0; + } + if (B.LabColorSpace_IF20 === dest || B.LchColorSpace_wv80 === dest) { + t2 = B.XyzD50ColorSpace_2No0; + break $label0$0; + } + if (B.OklabColorSpace_yrt0 === dest || B.OklchColorSpace_li80 === dest) { + t2 = B.LmsColorSpace_8I80; + break $label0$0; + } + t2 = dest; + break $label0$0; + } + if (t2 === _this) { + transformedBlue = blue; + transformedGreen = green; + transformedRed = red; + } else { + linearRed = _this.toLinear$1(red == null ? 0 : red); + linearGreen = _this.toLinear$1(green == null ? 0 : green); + linearBlue = _this.toLinear$1(blue == null ? 0 : blue); + matrix = _this.transformationMatrix$1(t2); + transformedRed = t2.fromLinear$1(matrix[0] * linearRed + matrix[1] * linearGreen + matrix[2] * linearBlue); + transformedGreen = t2.fromLinear$1(matrix[3] * linearRed + matrix[4] * linearGreen + matrix[5] * linearBlue); + transformedBlue = t2.fromLinear$1(matrix[6] * linearRed + matrix[7] * linearGreen + matrix[8] * linearBlue); + } + $label1$1: { + if (!t1 || B.HwbColorSpace_06z0 === dest) { + t1 = B.SrgbColorSpace_AD40.convert$8$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.LabColorSpace_IF20 === dest || B.LchColorSpace_wv80 === dest) { + t1 = B.XyzD50ColorSpace_2No0.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.OklabColorSpace_yrt0 === dest || B.OklchColorSpace_li80 === dest) { + t1 = B.LmsColorSpace_8I80.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + t1 = red == null ? null : transformedRed; + t2 = green == null ? null : transformedGreen; + t1 = A.SassColor_SassColor$forSpaceInternal0(dest, t1, t2, blue == null ? null : transformedBlue, alpha); + break $label1$1; + } + return t1; + }, + convertLinear$5(dest, red, green, blue, alpha) { + return this.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + fromLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + transformationMatrix$1(dest) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space conversion from " + this.toString$0(0) + " to " + dest.toString$0(0) + " not implemented.")); + }, + toString$0(_) { + return this.name; + } + }; + A.SrgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingChroma, missingHue, missingLightness) { + var max, min, delta, hue, lightness, saturation, t1, t2, whiteness, blackness, _null = null; + if (B.HslColorSpace_gsm0 === dest || B.HwbColorSpace_06z0 === dest) { + if (red == null) + red = 0; + if (green == null) + green = 0; + if (blue == null) + blue = 0; + max = Math.max(Math.max(red, green), blue); + min = Math.min(Math.min(red, green), blue); + delta = max - min; + if (max === min) + hue = 0; + else if (max === red) + hue = 60 * (green - blue) / delta + 360; + else + hue = max === green ? 60 * (blue - red) / delta + 120 : 60 * (red - green) / delta + 240; + if (dest === B.HslColorSpace_gsm0) { + lightness = (min + max) / 2; + saturation = lightness === 0 || lightness === 1 ? 0 : 100 * (max - lightness) / Math.min(lightness, 1 - lightness); + if (saturation < 0) { + hue += 180; + saturation = Math.abs(saturation); + } + t1 = missingHue || A.fuzzyEquals0(saturation, 0) ? _null : B.JSNumber_methods.$mod(hue, 360); + t2 = missingChroma ? _null : saturation; + return A.SassColor_SassColor$forSpaceInternal0(dest, t1, t2, missingLightness ? _null : lightness * 100, alpha); + } else { + whiteness = min * 100; + blackness = 100 - max * 100; + if (!missingHue) { + t1 = whiteness + blackness; + t1 = t1 > 100 || A.fuzzyEquals0(t1, 100); + } else + t1 = true; + return A.SassColor_SassColor$forSpaceInternal0(dest, t1 ? _null : B.JSNumber_methods.$mod(hue, 360), whiteness, blackness, alpha); + } + } + if (B.RgbColorSpace_mlz0 === dest) { + t1 = red == null ? _null : red * 255; + t2 = green == null ? _null : green * 255; + return A.SassColor_SassColor$rgbInternal0(t1, t2, blue == null ? _null : blue * 255, alpha, _null); + } + if (B.SrgbLinearColorSpace_sEs0 === dest) { + t1 = this.get$toLinear(); + return A.SassColor_SassColor$forSpaceInternal0(dest, A.NullableExtension_andThen0(red, t1), A.NullableExtension_andThen0(green, t1), A.NullableExtension_andThen0(blue, t1), alpha); + } + return this.super$ColorSpace$convertLinear0(dest, red, green, blue, alpha, false, false, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, red, green, blue, alpha) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false); + }, + convert$6$missingHue(dest, red, green, blue, alpha, missingHue) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, missingHue, false); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear0(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear0(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP30(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$linearSrgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$linearSrgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$linearSrgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$linearSrgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.SrgbLinearColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1; + $label0$0: { + if (B.RgbColorSpace_mlz0 === dest || B.HslColorSpace_gsm0 === dest || B.HwbColorSpace_06z0 === dest || B.SrgbColorSpace_AD40 === dest) { + t1 = B.SrgbColorSpace_AD40.convert$5(dest, A.NullableExtension_andThen0(red, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(green, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(blue, A.utils2__srgbAndDisplayP3FromLinear$closure()), alpha); + break $label0$0; + } + t1 = this.super$ColorSpace$convert0(dest, red, green, blue, alpha); + break $label0$0; + } + return t1; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP30(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$linearSrgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$linearSrgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$linearSrgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$linearSrgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.Statement0.prototype = {$isAstNode0: 1, $isSassNode: 1}; + A.JSStatementVisitor.prototype = { + visitAtRootRule$1(_, node) { + return J.visitAtRootRule$1$x(this._statement$_inner, node); + }, + visitAtRule$1(_, node) { + return J.visitAtRule$1$x(this._statement$_inner, node); + }, + visitContentBlock$1(_, node) { + return J.visitContentBlock$1$x(this._statement$_inner, node); + }, + visitContentRule$1(_, node) { + return J.visitContentRule$1$x(this._statement$_inner, node); + }, + visitDebugRule$1(_, node) { + return J.visitDebugRule$1$x(this._statement$_inner, node); + }, + visitDeclaration$1(_, node) { + return J.visitDeclaration$1$x(this._statement$_inner, node); + }, + visitEachRule$1(_, node) { + return J.visitEachRule$1$x(this._statement$_inner, node); + }, + visitErrorRule$1(_, node) { + return J.visitErrorRule$1$x(this._statement$_inner, node); + }, + visitExtendRule$1(_, node) { + return J.visitExtendRule$1$x(this._statement$_inner, node); + }, + visitForRule$1(_, node) { + return J.visitForRule$1$x(this._statement$_inner, node); + }, + visitForwardRule$1(_, node) { + return J.visitForwardRule$1$x(this._statement$_inner, node); + }, + visitFunctionRule$1(_, node) { + return J.visitFunctionRule$1$x(this._statement$_inner, node); + }, + visitIfRule$1(_, node) { + return J.visitIfRule$1$x(this._statement$_inner, node); + }, + visitImportRule$1(_, node) { + return J.visitImportRule$1$x(this._statement$_inner, node); + }, + visitIncludeRule$1(_, node) { + return J.visitIncludeRule$1$x(this._statement$_inner, node); + }, + visitLoudComment$1(_, node) { + return J.visitLoudComment$1$x(this._statement$_inner, node); + }, + visitMediaRule$1(_, node) { + return J.visitMediaRule$1$x(this._statement$_inner, node); + }, + visitMixinRule$1(_, node) { + return J.visitMixinRule$1$x(this._statement$_inner, node); + }, + visitReturnRule$1(_, node) { + return J.visitReturnRule$1$x(this._statement$_inner, node); + }, + visitSilentComment$1(_, node) { + return J.visitSilentComment$1$x(this._statement$_inner, node); + }, + visitStyleRule$1(_, node) { + return J.visitStyleRule$1$x(this._statement$_inner, node); + }, + visitStylesheet$1(_, node) { + return J.visitStylesheet$1$x(this._statement$_inner, node); + }, + visitSupportsRule$1(_, node) { + return J.visitSupportsRule$1$x(this._statement$_inner, node); + }, + visitUseRule$1(_, node) { + return J.visitUseRule$1$x(this._statement$_inner, node); + }, + visitVariableDeclaration$1(_, node) { + return J.visitVariableDeclaration$1$x(this._statement$_inner, node); + }, + visitWarnRule$1(_, node) { + return J.visitWarnRule$1$x(this._statement$_inner, node); + }, + visitWhileRule$1(_, node) { + return J.visitWhileRule$1$x(this._statement$_inner, node); + }, + $isStatementVisitor: 1 + }; + A.JSStatementVisitorObject.prototype = {}; + A.StatementSearchVisitor0.prototype = { + visitAtRootRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitAtRule$1(_, node) { + return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitContentRule$1(_, node) { + return null; + }, + visitDebugRule$1(_, node) { + return null; + }, + visitDeclaration$1(_, node) { + return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); + }, + visitEachRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(_, node) { + return null; + }, + visitExtendRule$1(_, node) { + return null; + }, + visitForRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(_, node) { + return null; + }, + visitFunctionRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitIfRule$1(_, node) { + var t1 = A.IterableExtension_search0(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure1(this)); + return t1 == null ? A.NullableExtension_andThen0(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure2(this)) : t1; + }, + visitImportRule$1(_, node) { + return null; + }, + visitIncludeRule$1(_, node) { + return A.NullableExtension_andThen0(node.content, this.get$visitContentBlock(this)); + }, + visitLoudComment$1(_, node) { + return null; + }, + visitMediaRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitReturnRule$1(_, node) { + return null; + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(_, node) { + return null; + }, + visitVariableDeclaration$1(_, node) { + return null; + }, + visitWarnRule$1(_, node) { + return null; + }, + visitWhileRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + return A.IterableExtension_search0(children, new A.StatementSearchVisitor_visitChildren_closure0(this)); + } + }; + A.StatementSearchVisitor_visitIfRule_closure1.prototype = { + call$1(clause) { + return A.IterableExtension_search0(clause.children, new A.StatementSearchVisitor_visitIfRule__closure2(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(IfClause0)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StatementSearchVisitor_visitIfRule_closure2.prototype = { + call$1(lastClause) { + return A.IterableExtension_search0(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure1(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(ElseClause0)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StatementSearchVisitor_visitChildren_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StaticImport0.prototype = { + toString$0(_) { + var t1 = this.url.toString$0(0), + t2 = this.modifiers; + return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); + }, + $isImport0: 1, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.StderrLogger0.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + var t2, + result = new A.StringBuffer(""), + t1 = this.color; + if (t1) { + t2 = result._contents = "" + "\x1b[33m\x1b[1m"; + t2 = result._contents = (deprecation ? result._contents = t2 + "Deprecation " : t2) + "Warning\x1b[0m"; + } else + t2 = result._contents = (deprecation ? result._contents = "" + "DEPRECATION " : "") + "WARNING"; + if (span == null) + t1 = result._contents = t2 + (": " + message + "\n"); + else if (trace != null) { + t1 = t2 + (": " + message + "\n\n" + span.highlight$1$color(t1) + "\n"); + result._contents = t1; + } else { + t1 = t2 + (" on " + span.message$2$color(0, "\n" + message, t1) + "\n"); + result._contents = t1; + } + if (trace != null) + result._contents = t1 + (A.indent0(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4) + "\n"); + A.printError0(result); + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + warn$2$span(_, message, span) { + return this.warn$4$deprecation$span$trace(0, message, false, span, null); + }, + warn$2$trace(_, message, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, null, trace); + }, + debug$2(_, message, span) { + var url, t3, t4, + t1 = span.file, + t2 = span._file$_start; + if (A.FileLocation$_(t1, t2).file.url == null) + url = "-"; + else { + t3 = A.FileLocation$_(t1, t2).file.url; + t4 = $.$get$context(); + t3.toString; + url = t4.prettyUri$1(t3); + } + t1 = A.FileLocation$_(t1, t2); + t1 = t1.file.getLine$1(t1.offset); + t2 = this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"; + t2 = "" + (url + ":" + (t1 + 1) + " ") + t2 + (": " + message); + A.printError0(t2.charCodeAt(0) == 0 ? t2 : t2); + } + }; + A.StringExpression0.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitStringExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + asInterpolation$1$static($static) { + var t1, t2, quote, t3, t4, buffer, t5, _i, value; + if (!this.hasQuotes) + return this.text; + t1 = this.text; + t2 = t1.contents; + quote = A.StringExpression__bestQuote0(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t5 = A.Primitives_stringFromCharCode(quote); + t3._contents += t5; + for (t5 = t2.length, _i = 0; _i < t5; ++_i) { + value = t2[_i]; + if (value instanceof A.Expression0) { + buffer._interpolation_buffer0$_flushText$0(); + t4.push(value); + continue; + } + if (typeof value == "string") + A.StringExpression__quoteInnerText0(value, quote, buffer, $static); + } + t2 = A.Primitives_stringFromCharCode(quote); + t3._contents += t2; + return buffer.interpolation$1(t1.span); + }, + asInterpolation$0() { + return this.asInterpolation$1$static(false); + }, + toString$0(_) { + return this.asInterpolation$0().toString$0(0); + } + }; + A.module_closure25.prototype = { + call$1($arguments) { + var limit, t2, chunks, i, lastEnd, match, t3, + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + separator = t1.$index($arguments, 1).assertString$1("separator"); + t1 = t1.$index($arguments, 2).get$realNull(); + limit = t1 == null ? null : t1.assertNumber$1("limit").assertInt$1("limit"); + if (limit != null && limit < 1) + throw A.wrapException(A.SassScriptException$0("$limit: Must be 1 or greater, was " + A.S(limit) + ".", null)); + t1 = string._string0$_text; + if (t1.length === 0) + return B.SassList_bdS2; + else { + t2 = separator._string0$_text; + if (t2.length === 0) + return A.SassList$0(A.MappedIterable_MappedIterable(new A.Runes(t1), new A.module__closure3(string), type$.Runes._eval$1("Iterable.E"), type$.Value_2), B.ListSeparator_ECn0, true); + } + chunks = A._setArrayType([], type$.JSArray_String); + for (t2 = B.JSString_methods.allMatches$1(t2, t1), t2 = new A._StringAllMatchesIterator(t2._input, t2._pattern, t2.__js_helper$_index), i = 0, lastEnd = 0; t2.moveNext$0();) { + match = t2.__js_helper$_current; + t3 = match.start; + chunks.push(B.JSString_methods.substring$2(t1, lastEnd, t3)); + lastEnd = t3 + match.pattern.length; + ++i; + if (i === limit) + break; + } + chunks.push(B.JSString_methods.substring$1(t1, lastEnd)); + return A.SassList$0(new A.MappedListIterable(chunks, new A.module__closure4(string), type$.MappedListIterable_String_Value_2), B.ListSeparator_ECn0, true); + }, + $signature: 26 + }; + A.module__closure3.prototype = { + call$1(rune) { + return new A.SassString0(A.Primitives_stringFromCharCode(rune), this.string._string0$_hasQuotes); + }, + $signature: 576 + }; + A.module__closure4.prototype = { + call$1(chunk) { + return new A.SassString0(chunk, this.string._string0$_hasQuotes); + }, + $signature: 577 + }; + A._unquote_closure0.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (!string._string0$_hasQuotes) + return string; + return new A.SassString0(string._string0$_text, false); + }, + $signature: 17 + }; + A._quote_closure0.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (string._string0$_hasQuotes) + return string; + return new A.SassString0(string._string0$_text, true); + }, + $signature: 17 + }; + A._length_closure1.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).assertString$1("string").get$_string0$_sassLength(), null); + }, + $signature: 22 + }; + A._insert_closure0.prototype = { + call$1($arguments) { + var indexInt, codeUnitIndex, _s5_ = "index", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + insert = t1.$index($arguments, 1).assertString$1("insert"), + index = t1.$index($arguments, 2).assertNumber$1(_s5_); + index.assertNoUnits$1(_s5_); + indexInt = index.assertInt$1(_s5_); + if (indexInt < 0) + indexInt = Math.max(string.get$_string0$_sassLength() + indexInt + 2, 0); + t1 = string._string0$_text; + codeUnitIndex = A.codepointIndexToCodeUnitIndex0(t1, A._codepointForIndex0(indexInt, string.get$_string0$_sassLength(), false)); + return new A.SassString0(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string0$_text), string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._index_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = t1.$index($arguments, 0).assertString$1("string")._string0$_text, + codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string0$_text); + if (codeUnitIndex === -1) + return B.C__SassNull0; + return A.SassNumber_SassNumber0(A.codeUnitIndexToCodepointIndex0(t2, codeUnitIndex) + 1, null); + }, + $signature: 3 + }; + A._slice_closure0.prototype = { + call$1($arguments) { + var lengthInCodepoints, endInt, startCodepoint, endCodepoint, + _s8_ = "start-at", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + start = t1.$index($arguments, 1).assertNumber$1(_s8_), + end = t1.$index($arguments, 2).assertNumber$1("end-at"); + start.assertNoUnits$1(_s8_); + end.assertNoUnits$1("end-at"); + lengthInCodepoints = string.get$_string0$_sassLength(); + endInt = end.assertInt$0(); + if (endInt === 0) + return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + startCodepoint = A._codepointForIndex0(start.assertInt$0(), lengthInCodepoints, false); + endCodepoint = A._codepointForIndex0(endInt, lengthInCodepoints, true); + if (endCodepoint === lengthInCodepoints) + --endCodepoint; + if (endCodepoint < startCodepoint) + return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + t1 = string._string0$_text; + return new A.SassString0(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex0(t1, startCodepoint), A.codepointIndexToCodeUnitIndex0(t1, endCodepoint + 1)), string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._toUpperCase_closure0.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); + } + return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._toLowerCase_closure0.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); + } + return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); + }, + $signature: 17 + }; + A._uniqueId_closure0.prototype = { + call$1($arguments) { + var t1 = $.$get$_previousUniqueId0() + ($.$get$_random1().nextInt$1(36) + 1); + $._previousUniqueId0 = t1; + if (t1 > Math.pow(36, 6)) + $._previousUniqueId0 = B.JSInt_methods.$mod($.$get$_previousUniqueId0(), A._asInt(Math.pow(36, 6))); + return new A.SassString0("u" + B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1($.$get$_previousUniqueId0(), 36), 6, "0"), false); + }, + $signature: 17 + }; + A.stringClass_closure.prototype = { + call$0() { + var t2, + t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassString", new A.stringClass__closure())); + A.LinkedHashMap_LinkedHashMap$_literal(["text", new A.stringClass__closure0(), "hasQuotes", new A.stringClass__closure1(), "sassLength", new A.stringClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + J.get$$prototype$x(jsClass).sassIndexToStringIndex = A.allowInteropCaptureThisNamed("sassIndexToStringIndex", new A.stringClass__closure3()); + t2 = $.$get$_emptyQuoted0(); + A.JSClassExtension_injectSuperclass(t1._as(t2.constructor), jsClass); + return jsClass; + }, + $signature: 15 + }; + A.stringClass__closure.prototype = { + call$3($self, textOrOptions, options) { + var t1; + if (typeof textOrOptions == "string") { + t1 = options == null ? null : J.get$quotes$x(options); + t1 = new A.SassString0(textOrOptions, t1 == null ? true : t1); + } else { + type$.nullable__ConstructorOptions_3._as(textOrOptions); + t1 = textOrOptions == null ? null : J.get$quotes$x(textOrOptions); + t1 = (t1 == null ? true : t1) ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + } + return t1; + }, + call$1($self) { + return this.call$3($self, null, null); + }, + call$2($self, textOrOptions) { + return this.call$3($self, textOrOptions, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 578 + }; + A.stringClass__closure0.prototype = { + call$1($self) { + return $self._string0$_text; + }, + $signature: 579 + }; + A.stringClass__closure1.prototype = { + call$1($self) { + return $self._string0$_hasQuotes; + }, + $signature: 580 + }; + A.stringClass__closure2.prototype = { + call$1($self) { + return $self.get$_string0$_sassLength(); + }, + $signature: 581 + }; + A.stringClass__closure3.prototype = { + call$3($self, sassIndex, $name) { + var t1, + index = sassIndex.assertNumber$1($name).assertInt$1($name); + if (index === 0) + A.throwExpression(A.SassScriptException$0("String index may not be 0.", $name)); + else if (Math.abs(index) > $self.get$_string0$_sassLength()) + A.throwExpression(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a string with " + $self.get$_string0$_sassLength() + " characters.", $name)); + t1 = index < 0 ? $self.get$_string0$_sassLength() + index : index - 1; + return A.codepointIndexToCodeUnitIndex0($self._string0$_text, t1); + }, + call$2($self, sassIndex) { + return this.call$3($self, sassIndex, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 582 + }; + A._ConstructorOptions1.prototype = {}; + A._NodeSassString.prototype = {}; + A.legacyStringClass_closure.prototype = { + call$3(thisArg, value, dartValue) { + var t1; + if (dartValue == null) { + value.toString; + t1 = new A.SassString0(value, false); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, value) { + return this.call$3(thisArg, value, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 583 + }; + A.legacyStringClass_closure0.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._string0$_text; + }, + $signature: 584 + }; + A.legacyStringClass_closure1.prototype = { + call$2(thisArg, value) { + J.set$dartValue$x(thisArg, new A.SassString0(value, false)); + }, + $signature: 585 + }; + A.SassString0.prototype = { + get$_string0$_sassLength() { + var result, _this = this, + value = _this._string0$__SassString__sassLength_FI; + if (value === $) { + result = new A.Runes(_this._string0$_text).get$length(0); + _this._string0$__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._string0$__SassString__sassLength_FI = result; + value = result; + } + return value; + }, + get$isSpecialNumber() { + var t1, _2_0, t2, _0_0, _1_0; + if (this._string0$_hasQuotes) + return false; + t1 = this._string0$_text; + if (t1.length < 6) + return false; + _2_0 = t1.charCodeAt(0); + $label1$1: { + t2 = false; + if (99 === _2_0 || 67 === _2_0) { + _0_0 = t1.charCodeAt(1); + $label0$0: { + if (108 === _0_0 || 76 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 97 && (t1.charCodeAt(3) | 32) === 109 && (t1.charCodeAt(4) | 32) === 112 && t1.charCodeAt(5) === 40; + break $label0$0; + } + if (97 === _0_0 || 65 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 108 && (t1.charCodeAt(3) | 32) === 99 && t1.charCodeAt(4) === 40; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + break $label1$1; + } + if (118 === _2_0 || 86 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + break $label1$1; + } + if (101 === _2_0 || 69 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 110 && (t1.charCodeAt(2) | 32) === 118 && t1.charCodeAt(3) === 40; + break $label1$1; + } + if (109 === _2_0 || 77 === _2_0) { + _1_0 = t1.charCodeAt(1); + $label2$2: { + if (97 === _1_0 || 65 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 120 && t1.charCodeAt(3) === 40; + break $label2$2; + } + if (105 === _1_0 || 73 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 110 && t1.charCodeAt(3) === 40; + break $label2$2; + } + t1 = t2; + break $label2$2; + } + break $label1$1; + } + t1 = t2; + break $label1$1; + } + return t1; + }, + get$isVar() { + if (this._string0$_hasQuotes) + return false; + var t1 = this._string0$_text; + if (t1.length < 8) + return false; + return (t1.charCodeAt(0) | 32) === 118 && (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + }, + get$isBlank() { + return !this._string0$_hasQuotes && this._string0$_text.length === 0; + }, + assertQuoted$1($name) { + if (this._string0$_hasQuotes) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be a quoted string.", $name)); + }, + assertUnquoted$1($name) { + if (!this._string0$_hasQuotes) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be an unquoted string.", $name)); + }, + assertUnquoted$0() { + return this.assertUnquoted$1(null); + }, + accept$1$1(visitor) { + var t1 = visitor._serialize0$_quote && this._string0$_hasQuotes, + t2 = this._string0$_text; + if (t1) + visitor._serialize0$_visitQuotedString$1(t2); + else + visitor._serialize0$_visitUnquotedString$1(t2); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertString$1($name) { + return this; + }, + plus$1(other) { + var t1 = this._string0$_text, + t2 = this._string0$_hasQuotes; + return other instanceof A.SassString0 ? new A.SassString0(t1 + other._string0$_text, t2) : new A.SassString0(t1 + A.serializeValue0(other, false, true), t2); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassString0 && this._string0$_text === other._string0$_text; + }, + get$hashCode(_) { + var t1 = this._string0$_hashCache; + return t1 == null ? this._string0$_hashCache = B.JSString_methods.get$hashCode(this._string0$_text) : t1; + } + }; + A.ModifiableCssStyleRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1; + if (other instanceof A.ModifiableCssStyleRule0) + t1 = B.C_ListEquality.equals$2(0, other._style_rule0$_selector._box0$_inner.value.components, this._style_rule0$_selector._box0$_inner.value.components); + else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStyleRule$0(this._style_rule0$_selector, this.span, false, this.originalSelector); + }, + $isCssStyleRule0: 1, + get$span(receiver) { + return this.span; + } + }; + A.StyleRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitStyleRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return this.selector.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.CssStylesheet0.prototype = { + get$parent(_) { + return null; + }, + get$isGroupEnd() { + return false; + }, + get$isChildless() { + return false; + }, + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$children(receiver) { + return this.children; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssStylesheet0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssStylesheet0; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStylesheet$0(this.span); + }, + $isCssStylesheet0: 1, + get$span(receiver) { + return this.span; + } + }; + A.StylesheetParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure0(this)); + }, + parseArgumentDeclaration$0() { + return this._stylesheet0$_parseSingleProduction$1$1(new A.StylesheetParser_parseArgumentDeclaration_closure0(this), type$.ArgumentDeclaration_2); + }, + _stylesheet0$_parseSingleProduction$1$1(production, $T) { + return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure0(this, production, $T)); + }, + parseSignature$1$requireParens(requireParens) { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parseSignature_closure(this, requireParens)); + }, + _stylesheet0$_statement$1$root(root) { + var t2, _this = this, + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + if (64 === _0_0) + return _this.atRule$2$root(new A.StylesheetParser__statement_closure0(_this), root); + if (43 === _0_0) { + if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) + return _this._stylesheet0$_styleRule$0(); + _this._stylesheet0$_isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + return _this._stylesheet0$_includeRule$1(new A._SpanScannerState(t1, t2)); + } + if (61 === _0_0) { + if (!_this.get$indented()) + return _this._stylesheet0$_styleRule$0(); + _this._stylesheet0$_isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$0(); + return _this._stylesheet0$_mixinRule$1(new A._SpanScannerState(t1, t2)); + } + if (125 === _0_0) + t1.error$2$length(0, 'unmatched "}".', 1); + return _this._stylesheet0$_inStyleRule || _this._stylesheet0$_inUnknownAtRule || _this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock ? _this._stylesheet0$_declarationOrStyleRule$0() : _this._stylesheet0$_variableDeclarationOrStyleRule$0(); + }, + _stylesheet0$_statement$0() { + return this._stylesheet0$_statement$1$root(false); + }, + variableDeclarationWithoutNamespace$2(namespace, start_) { + var t1, start, $name, t2, value, flagStart, t3, guarded, global, _0_0, endPosition, t4, t5, t6, declaration, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + if (start_ == null) { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + } else + start = start_; + $name = _this.variableName$0(); + t1 = namespace != null; + if (t1) + _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure1(_this, start)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sassx20v, _this.scanner.spanFrom$1(start)); + _this.whitespace$0(); + t2 = _this.scanner; + t2.expectChar$1(58); + _this.whitespace$0(); + value = _this._stylesheet0$_expression$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + for (t3 = _this.logger, guarded = false, global = false; t2.scanChar$1(33);) { + $label0$0: { + _0_0 = _this.identifier$0(); + if ("default" === _0_0) { + if (guarded) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.WarnForDeprecation_warnForDeprecation0(t3, B.Deprecation_iXE, string$.x21defau, t6, null); + } + guarded = true; + break $label0$0; + } + if ("global" === _0_0) { + if (t1) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + _this.error$2(0, string$.x21globai, t6); + } else if (global) { + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + A.WarnForDeprecation_warnForDeprecation0(t3, B.Deprecation_iXE, string$.x21globas, t6, null); + } + global = true; + break $label0$0; + } + endPosition = t2._string_scanner$_position; + t4 = t2._sourceFile; + t5 = flagStart.position; + t6 = new A._FileSpan(t4, t5, endPosition); + t6._FileSpan$3(t4, t5, endPosition); + _this.error$2(0, "Invalid flag name.", t6); + } + _this.whitespace$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + } + _this.expectStatementSeparator$1("variable declaration"); + declaration = A.VariableDeclaration$0($name, value, t2.spanFrom$1(start), precedingComment, global, guarded, namespace); + if (global) + _this._stylesheet0$_globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure2(declaration)); + return declaration; + }, + variableDeclarationWithoutNamespace$0() { + return this.variableDeclarationWithoutNamespace$2(null, null); + }, + _stylesheet0$_variableDeclarationOrStyleRule$0() { + var t1, t2, variableOrInterpolation, t3, _this = this; + if (_this.get$plainCss()) + return _this._stylesheet0$_styleRule$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._stylesheet0$_styleRule$0(); + if (!_this.lookingAtIdentifier$0()) + return _this._stylesheet0$_styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + t1 = variableOrInterpolation; + else { + t3 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t3.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); + t2 = _this._stylesheet0$_styleRule$2(t3, new A._SpanScannerState(t1, t2)); + t1 = t2; + } + return t1; + }, + _stylesheet0$_declarationOrStyleRule$0() { + var t1, t2, declarationOrBuffer, _this = this; + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._stylesheet0$_styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + declarationOrBuffer = _this._stylesheet0$_declarationOrBuffer$0(); + return declarationOrBuffer instanceof A.Statement0 ? declarationOrBuffer : _this._stylesheet0$_styleRule$2(type$.InterpolationBuffer_2._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); + }, + _stylesheet0$_declarationOrBuffer$0() { + var midBuffer, couldBeSelector, beforeDeclaration, value, additional, t2, t3, variableOrInterpolation, t4, t5, $name, postColonWhitespace, _0_0, exception, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + nameBuffer = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)), + startsWithPunctuation = _this._stylesheet0$_lookingAtPotentialPropertyHack$0(); + if (startsWithPunctuation) { + t2 = t1.readChar$0(); + t3 = nameBuffer._interpolation_buffer0$_text; + t2 = A.Primitives_stringFromCharCode(t2); + t3._contents += t2; + t2 = _this.rawText$1(_this.get$whitespace()); + t3 = nameBuffer._interpolation_buffer0$_text; + t3._contents += t2; + } + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return nameBuffer; + variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + return variableOrInterpolation; + else + nameBuffer.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); + _this._stylesheet0$_isUseAllowed = false; + if (t1.matches$1("/*")) { + t2 = _this.rawText$1(_this.get$loudComment()); + t3 = nameBuffer._interpolation_buffer0$_text; + t3._contents += t2; + } + midBuffer = new A.StringBuffer(""); + t2 = midBuffer; + t3 = _this.get$whitespace(); + t4 = _this.rawText$1(t3); + t2._contents += t4; + t4 = t1._string_scanner$_position; + if (!t1.scanChar$1(58)) { + if (midBuffer._contents.length !== 0) { + t1 = nameBuffer._interpolation_buffer0$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + } + return nameBuffer; + } + t2 = midBuffer; + t5 = A.Primitives_stringFromCharCode(58); + t2._contents += t5; + $name = nameBuffer.interpolation$1(t1.spanFrom$2(start, new A._SpanScannerState(t1, t4))); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) { + t2 = _this._stylesheet0$_interpolatedDeclarationValue$1$silentComments(false); + _this.expectStatementSeparator$1("custom property"); + return A.Declaration$0($name, new A.StringExpression0(t2, false), t1.spanFrom$1(start)); + } + if (t1.scanChar$1(58)) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer0$_text; + t3 = A.S(midBuffer); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(58); + t2._contents += t3; + return t1; + } else if (_this.get$indented() && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer0$_text; + t3 = A.S(midBuffer); + t2._contents += t3; + return t1; + } + postColonWhitespace = _this.rawText$1(t3); + _0_0 = _this._stylesheet0$_tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + midBuffer._contents += postColonWhitespace; + couldBeSelector = postColonWhitespace.length === 0 && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0(); + beforeDeclaration = new A._SpanScannerState(t1, t1._string_scanner$_position); + value = null; + try { + value = _this._stylesheet0$_expression$0(); + if (_this.lookingAtChildren$0()) { + if (couldBeSelector) + _this.expectStatementSeparator$0(); + } else if (!_this.atEndOfStatement$0()) + _this.expectStatementSeparator$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + if (!couldBeSelector) + throw exception; + t1.set$state(beforeDeclaration); + additional = _this.almostAnyValue$0(); + if (!_this.get$indented() && t1.peekChar$0() === 59) + throw exception; + t1 = nameBuffer._interpolation_buffer0$_text; + t2 = A.S(midBuffer); + t1._contents += t2; + nameBuffer.addInterpolation$1(additional); + return nameBuffer; + } else + throw exception; + } + _1_0 = _this._stylesheet0$_tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$0($name, value, t1.spanFrom$1(start)); + } + }, + _stylesheet0$_variableDeclarationOrInterpolation$0() { + var t1, start, identifier, t2, buffer, _this = this; + if (!_this.lookingAtIdentifier$0()) + return _this.interpolatedIdentifier$0(); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + if (t1.matches$1(".$")) { + t1.readChar$0(); + return _this.variableDeclarationWithoutNamespace$2(identifier, start); + } else { + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object)); + t2._contents = "" + identifier; + if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + }, + _stylesheet0$_styleRule$2(buffer, start_) { + var t2, start, interpolation, wasInStyleRule, _this = this, t1 = {}; + _this._stylesheet0$_isUseAllowed = false; + if (start_ == null) { + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + } else + start = start_; + interpolation = t1.interpolation = _this.styleRuleSelector$0(); + if (buffer != null) { + buffer.addInterpolation$1(interpolation); + t2 = t1.interpolation = buffer.interpolation$1(_this.scanner.spanFrom$1(start)); + } else + t2 = interpolation; + if (t2.contents.length === 0) + _this.scanner.error$1(0, 'expected "}".'); + wasInStyleRule = _this._stylesheet0$_inStyleRule; + _this._stylesheet0$_inStyleRule = true; + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__styleRule_closure0(t1, _this, wasInStyleRule, start)); + }, + _stylesheet0$_styleRule$0() { + return this._stylesheet0$_styleRule$2(null, null); + }, + _stylesheet0$_propertyOrVariableDeclaration$1$parseCustomProperties(parseCustomProperties) { + var t2, nameBuffer, t3, $name, variableOrInterpolation, _0_0, value, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._stylesheet0$_lookingAtPotentialPropertyHack$0()) { + t2 = new A.StringBuffer(""); + nameBuffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + t3 = _this.rawText$1(_this.get$whitespace()); + t2._contents += t3; + nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + $name = nameBuffer.interpolation$1(t1.spanFrom$1(start)); + } else if (!_this.get$plainCss()) { + variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + return variableOrInterpolation; + else + type$.Interpolation_2._as(variableOrInterpolation); + $name = variableOrInterpolation; + } else + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + _0_0 = _this._stylesheet0$_tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + value = _this._stylesheet0$_expression$0(); + _1_0 = _this._stylesheet0$_tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$0($name, value, t1.spanFrom$1(start)); + } + }, + _stylesheet0$_tryDeclarationChildren$3$value($name, start, value) { + var _this = this; + if (!_this.lookingAtChildren$0()) + return null; + if (_this.get$plainCss()) + _this.scanner.error$1(0, string$.Nested); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_declarationChild(), start, new A.StylesheetParser__tryDeclarationChildren_closure0($name, value)); + }, + _stylesheet0$_tryDeclarationChildren$2($name, start) { + return this._stylesheet0$_tryDeclarationChildren$3$value($name, start, null); + }, + _stylesheet0$_declarationChild$0() { + return this.scanner.peekChar$0() === 64 ? this._stylesheet0$_declarationAtRule$0() : this._stylesheet0$_propertyOrVariableDeclaration$1$parseCustomProperties(false); + }, + atRule$2$root(child, root) { + var $name, wasUseAllowed, value, optional, url, namespace, configuration, span, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$2$name(64, "@-rule"); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$0(); + wasUseAllowed = _this._stylesheet0$_isUseAllowed; + _this._stylesheet0$_isUseAllowed = false; + switch ($name.get$asPlain()) { + case "at-root": + return _this._stylesheet0$_atRootRule$1(start); + case "content": + return _this._stylesheet0$_contentRule$1(start); + case "debug": + return _this._stylesheet0$_debugRule$1(start); + case "each": + return _this._stylesheet0$_eachRule$2(start, child); + case "else": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "error": + return _this._stylesheet0$_errorRule$1(start); + case "extend": + if (!_this._stylesheet0$_inStyleRule && !_this._stylesheet0$_inMixin && !_this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.x40exten, t1.spanFrom$1(start)); + value = _this.almostAnyValue$0(); + optional = t1.scanChar$1(33); + if (optional) { + _this.expectIdentifier$1("optional"); + _this.whitespace$0(); + } + _this.expectStatementSeparator$1("@extend rule"); + return new A.ExtendRule0(value, optional, t1.spanFrom$1(start)); + case "for": + return _this._stylesheet0$_forRule$2(start, child); + case "forward": + _this._stylesheet0$_isUseAllowed = wasUseAllowed; + if (!root) + _this._stylesheet0$_disallowedAtRule$1(start); + return _this._stylesheet0$_forwardRule$1(start); + case "function": + return _this._stylesheet0$_functionRule$1(start); + case "if": + return _this._stylesheet0$_ifRule$2(start, child); + case "import": + return _this._stylesheet0$_importRule$1(start); + case "include": + return _this._stylesheet0$_includeRule$1(start); + case "media": + return _this.mediaRule$1(start); + case "mixin": + return _this._stylesheet0$_mixinRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "return": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "supports": + return _this.supportsRule$1(start); + case "use": + _this._stylesheet0$_isUseAllowed = wasUseAllowed; + if (!root) + _this._stylesheet0$_disallowedAtRule$1(start); + url = _this._stylesheet0$_urlString$0(); + _this.whitespace$0(); + namespace = _this._stylesheet0$_useNamespace$2(url, start); + _this.whitespace$0(); + configuration = _this._stylesheet0$_configuration$0(); + _this.whitespace$0(); + span = t1.spanFrom$1(start); + if (!_this._stylesheet0$_isUseAllowed) + _this.error$2(0, string$.x40use_r, span); + _this.expectStatementSeparator$1("@use rule"); + t1 = new A.UseRule0(url, namespace, configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); + t1.UseRule$4$configuration0(url, namespace, span, configuration); + return t1; + case "warn": + return _this._stylesheet0$_warnRule$1(start); + case "while": + return _this._stylesheet0$_whileRule$2(start, child); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + _stylesheet0$_declarationAtRule$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = _this._stylesheet0$_plainAtRuleName$0(); + $label0$0: { + if ("content" === _0_0) { + t1 = _this._stylesheet0$_contentRule$1(start); + break $label0$0; + } + if ("debug" === _0_0) { + t1 = _this._stylesheet0$_debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._stylesheet0$_disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._stylesheet0$_errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + if ("include" === _0_0) { + t1 = _this._stylesheet0$_includeRule$1(start); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._stylesheet0$_warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + t1 = _this._stylesheet0$_disallowedAtRule$1(start); + } + return t1; + }, + _stylesheet0$_functionChild$0() { + var state, variableDeclarationError, stackTrace, statement, t2, namespace, exception, t3, start, _0_0, value, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() !== 64) { + t2 = t1._string_scanner$_position; + state = new A._SpanScannerState(t1, t2); + try { + namespace = _this.identifier$0(); + t1.expectChar$1(46); + t2 = _this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + t3 = type$.SourceSpanFormatException; + if (t3._is(t2)) { + variableDeclarationError = t2; + stackTrace = A.getTraceFromException(exception); + t1.set$state(state); + statement = null; + try { + statement = _this._stylesheet0$_declarationOrStyleRule$0(); + } catch (exception) { + if (t3._is(A.unwrapException(exception))) + throw A.wrapException(variableDeclarationError); + else + throw exception; + } + t2 = statement instanceof A.StyleRule0 ? "style rules" : "declarations"; + _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$z(statement), stackTrace); + } else + throw exception; + } + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _0_0 = _this._stylesheet0$_plainAtRuleName$0(); + $label0$0: { + if ("debug" === _0_0) { + t1 = _this._stylesheet0$_debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._stylesheet0$_disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._stylesheet0$_errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + if ("return" === _0_0) { + value = _this._stylesheet0$_expression$0(); + _this.expectStatementSeparator$1("@return rule"); + t1 = new A.ReturnRule0(value, t1.spanFrom$1(start)); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._stylesheet0$_warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + t1 = _this._stylesheet0$_disallowedAtRule$1(start); + } + return t1; + }, + _stylesheet0$_plainAtRuleName$0() { + this.scanner.expectChar$2$name(64, "@-rule"); + var $name = this.identifier$0(); + this.whitespace$0(); + return $name; + }, + _stylesheet0$_atRootRule$1(start) { + var t2, t3, buffer, t4, query, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 40) { + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + t1.expectChar$1(40); + t4 = A.Primitives_stringFromCharCode(40); + t3._contents += t4; + _this.whitespace$0(); + _this._stylesheet0$_addOrInject$2(buffer, _this._stylesheet0$_expression$0()); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t4 = A.Primitives_stringFromCharCode(58); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + _this._stylesheet0$_addOrInject$2(buffer, _this._stylesheet0$_expression$0()); + } + t1.expectChar$1(41); + _this.whitespace$0(); + t4 = A.Primitives_stringFromCharCode(41); + t3._contents += t4; + query = buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure1(query)); + } else { + if (!_this.lookingAtChildren$0()) + t2 = _this.get$indented() && _this.atEndOfStatement$0(); + else + t2 = true; + if (t2) + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure2()); + else + return A.AtRootRule$0(A._setArrayType([_this._stylesheet0$_styleRule$0()], type$.JSArray_Statement_2), t1.spanFrom$1(start), null); + } + }, + _stylesheet0$_contentRule$1(start) { + var t1, beforeWhitespace, $arguments, t2, _this = this; + if (!_this._stylesheet0$_inMixin) + _this.error$2(0, string$.x40conte, _this.scanner.spanFrom$1(start)); + t1 = _this.scanner; + beforeWhitespace = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + _this.whitespace$0(); + if (t1.peekChar$0() === 40) { + $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); + _this.whitespace$0(); + } else { + t2 = beforeWhitespace.offset; + $arguments = A.ArgumentInvocation$empty0(A._FileSpan$(beforeWhitespace.file, t2, t2)); + } + _this.expectStatementSeparator$1("@content rule"); + return new A.ContentRule0($arguments, t1.spanFrom$1(start)); + }, + _stylesheet0$_debugRule$1(start) { + var value = this._stylesheet0$_expression$0(); + this.expectStatementSeparator$1("@debug rule"); + return new A.DebugRule0(value, this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_eachRule$2(start, child) { + var variables, t1, _this = this, + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); + _this.whitespace$0(); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$0(); + t1.expectChar$1(36); + variables.push(_this.identifier$1$normalize(true)); + _this.whitespace$0(); + } + _this.expectIdentifier$1("in"); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__eachRule_closure0(_this, wasInControlDirective, variables, _this._stylesheet0$_expression$0())); + }, + _stylesheet0$_errorRule$1(start) { + var value = this._stylesheet0$_expression$0(); + this.expectStatementSeparator$1("@error rule"); + return new A.ErrorRule0(value, this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_functionRule$1(start) { + var t1, t2, $name, $arguments, _0_0, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + $name = _this.identifier$0(); + if (B.JSString_methods.startsWith$1($name, "--")) + A.WarnForDeprecation_warnForDeprecation0(_this.logger, B.Deprecation_qBS, string$.Sassx20_fm, t1.spanFrom$1(new A._SpanScannerState(t1, t2)), null); + _this.whitespace$0(); + $arguments = _this._stylesheet0$_argumentDeclaration$0(); + if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.Mixinscf, t1.spanFrom$1(start)); + else if (_this._stylesheet0$_inControlDirective) + _this.error$2(0, string$.Functi, t1.spanFrom$1(start)); + _0_0 = A.unvendor0($name); + if ("calc" === _0_0 || "element" === _0_0 || "expression" === _0_0 || "url" === _0_0 || "and" === _0_0 || "or" === _0_0 || "not" === _0_0 || "clamp" === _0_0) + _this.error$2(0, "Invalid function name.", t1.spanFrom$1(start)); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_functionChild(), start, new A.StylesheetParser__functionRule_closure0($name, $arguments, precedingComment)); + }, + _stylesheet0$_forRule$2(start, child) { + var variable, from, _this = this, t1 = {}, + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + variable = _this.variableName$0(); + _this.whitespace$0(); + _this.expectIdentifier$1("from"); + _this.whitespace$0(); + t1.exclusive = null; + from = _this._stylesheet0$_expression$1$until(new A.StylesheetParser__forRule_closure1(t1, _this)); + if (t1.exclusive == null) + _this.scanner.error$1(0, 'Expected "to" or "through".'); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__forRule_closure2(t1, _this, wasInControlDirective, variable, from, _this._stylesheet0$_expression$0())); + }, + _stylesheet0$_forwardRule$1(start) { + var prefix, hiddenMixinsAndFunctions, hiddenVariables, _0_0, shownMixinsAndFunctions, shownVariables, _1_0, configuration, span, t1, t2, t3, t4, _this = this, _null = null, + url = _this._stylesheet0$_urlString$0(); + _this.whitespace$0(); + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + prefix = _this.identifier$1$normalize(true); + _this.scanner.expectChar$1(42); + _this.whitespace$0(); + } else + prefix = _null; + hiddenMixinsAndFunctions = _null; + hiddenVariables = _null; + if (_this.scanIdentifier$1("show")) { + _0_0 = _this._stylesheet0$_memberList$0(); + shownMixinsAndFunctions = _0_0._0; + shownVariables = _0_0._1; + } else { + if (_this.scanIdentifier$1("hide")) { + _1_0 = _this._stylesheet0$_memberList$0(); + hiddenMixinsAndFunctions = _1_0._0; + hiddenVariables = _1_0._1; + } + shownVariables = _null; + shownMixinsAndFunctions = shownVariables; + } + configuration = _this._stylesheet0$_configuration$1$allowGuarded(true); + _this.whitespace$0(); + _this.expectStatementSeparator$1("@forward rule"); + span = _this.scanner.spanFrom$1(start); + if (!_this._stylesheet0$_isUseAllowed) + _this.error$2(0, string$.x40forwa, span); + if (shownMixinsAndFunctions != null) { + shownVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); + t4 = configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); + return new A.ForwardRule0(url, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), _null, _null, prefix, t4, span); + } else if (hiddenMixinsAndFunctions != null) { + hiddenVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); + t4 = configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); + return new A.ForwardRule0(url, _null, _null, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), prefix, t4, span); + } else + return new A.ForwardRule0(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); + }, + _stylesheet0$_memberList$0() { + var _this = this, + t1 = type$.String, + identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), + variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t1 = _this.scanner; + do { + _this.whitespace$0(); + _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure0(_this, variables, identifiers)); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + return new A._Record_2(identifiers, variables); + }, + _stylesheet0$_ifRule$2(start, child) { + var condition, children, clauses, lastClause, span, _this = this, + ifIndentation = _this.get$currentIndentation(), + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + condition = _this._stylesheet0$_expression$0(); + children = _this.children$1(0, child); + _this.whitespaceWithoutComments$0(); + clauses = A._setArrayType([A.IfClause$0(condition, children)], type$.JSArray_IfClause_2); + while (true) { + if (!_this.scanElse$1(ifIndentation)) { + lastClause = null; + break; + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("if")) { + _this.whitespace$0(); + clauses.push(A.IfClause$0(_this._stylesheet0$_expression$0(), _this.children$1(0, child))); + } else { + lastClause = A.ElseClause$0(_this.children$1(0, child)); + break; + } + } + _this._stylesheet0$_inControlDirective = wasInControlDirective; + span = _this.scanner.spanFrom$1(start); + _this.whitespaceWithoutComments$0(); + return new A.IfRule0(A.List_List$unmodifiable(clauses, type$.IfClause_2), lastClause, span); + }, + _stylesheet0$_importRule$1(start) { + var argument, t3, _this = this, + imports = A._setArrayType([], type$.JSArray_Import_2), + t1 = _this.scanner, + t2 = _this.logger; + do { + _this.whitespace$0(); + argument = _this.importArgument$0(); + t3 = argument instanceof A.DynamicImport0; + if (t3) + A.WarnForDeprecation_warnForDeprecation0(t2, B.Deprecation_qd9, string$.Sassx20_i, argument.span, null); + if ((_this._stylesheet0$_inControlDirective || _this._stylesheet0$_inMixin) && t3) + _this._stylesheet0$_disallowedAtRule$1(start); + imports.push(argument); + _this.whitespace$0(); + } while (t1.scanChar$1(44)); + _this.expectStatementSeparator$1("@import rule"); + t1 = t1.spanFrom$1(start); + return new A.ImportRule0(A.List_List$unmodifiable(imports, type$.Import_2), t1); + }, + importArgument$0() { + var url, urlSpan, innerError, stackTrace, modifiers, t2, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + url = _this.dynamicUrl$0(); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + return new A.StaticImport0(A.Interpolation$0(A._setArrayType([url], type$.JSArray_Object), t1.spanFrom$1(start)), modifiers, t1.spanFrom$1(start)); + } + url = _this.string$0(); + urlSpan = t1.spanFrom$1(start); + _this.whitespace$0(); + modifiers = _this.tryImportModifiers$0(); + if (_this.isPlainImportUrl$1(url) || modifiers != null) { + t2 = urlSpan; + return new A.StaticImport0(A.Interpolation$0(A._setArrayType([A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null)], type$.JSArray_Object), urlSpan), modifiers, t1.spanFrom$1(start)); + } else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport0(t1, urlSpan); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); + } else + throw exception; + } + }, + parseImportUrl$1(url) { + var t1 = $.$get$windows(); + if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) + return t1.toUri$1(url).toString$0(0); + A.Uri_parse(url); + return url; + }, + isPlainImportUrl$1(url) { + var _0_0, t1; + if (url.length < 5) + return false; + if (B.JSString_methods.endsWith$1(url, ".css")) + return true; + _0_0 = url.charCodeAt(0); + $label0$0: { + if (47 === _0_0) { + t1 = url.charCodeAt(1) === 47; + break $label0$0; + } + if (104 === _0_0) { + t1 = B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + tryImportModifiers$0() { + var t1, start, t2, t3, buffer, t4, identifier, $name, query, t5, endPosition, result, _this = this; + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t2, t3); + for (; true;) + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t4 = A.Primitives_stringFromCharCode(32); + t2._contents += t4; + } + identifier = _this.interpolatedIdentifier$0(); + buffer.addInterpolation$1(identifier); + t4 = identifier.get$asPlain(); + $name = t4 == null ? null : t4.toLowerCase(); + if ($name !== "and" && t1.scanChar$1(40)) { + if ($name === "supports") { + query = _this._stylesheet0$_importSupportsQuery$0(); + t4 = !(query instanceof A.SupportsDeclaration0); + if (t4) { + t5 = A.Primitives_stringFromCharCode(40); + t2._contents += t5; + } + buffer._interpolation_buffer0$_flushText$0(); + t3.push(new A.SupportsExpression0(query)); + if (t4) { + t4 = A.Primitives_stringFromCharCode(41); + t2._contents += t4; + } + } else { + t4 = A.Primitives_stringFromCharCode(40); + t2._contents += t4; + buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true)); + t4 = A.Primitives_stringFromCharCode(41); + t2._contents += t4; + } + t1.expectChar$1(41); + _this.whitespace$0(); + } else { + _this.whitespace$0(); + if (t1.scanChar$1(44)) { + t2._contents += ", "; + buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t4, t5, endPosition); + t1._FileSpan$3(t4, t5, endPosition); + t5 = type$.Object; + t4 = A.List_List$of(t3, true, t5); + t3 = t2._contents; + if (t3.length !== 0) + t4.push(t3.charCodeAt(0) == 0 ? t3 : t3); + result = A.List_List$from(t4, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t2 = new A.Interpolation0(result, t1); + t2.Interpolation$20(t4, t1); + return t2; + } + } + } else if (t1.peekChar$0() === 40) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t4 = A.Primitives_stringFromCharCode(32); + t2._contents += t4; + } + buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation0(result, t5); + t1.Interpolation$20(t3, t5); + return t1; + } else { + endPosition = t1._string_scanner$_position; + t1 = t1._sourceFile; + t4 = start.position; + t5 = new A._FileSpan(t1, t4, endPosition); + t5._FileSpan$3(t1, t4, endPosition); + t4 = type$.Object; + t3 = A.List_List$of(t3, true, t4); + t1 = t2._contents; + if (t1.length !== 0) + t3.push(t1.charCodeAt(0) == 0 ? t1 : t1); + result = A.List_List$from(t3, false, t4); + result.fixed$length = Array; + result.immutable$list = Array; + t1 = new A.Interpolation0(result, t5); + t1.Interpolation$20(t3, t5); + return t1; + } + }, + _stylesheet0$_importSupportsQuery$0() { + var t1, t2, _0_0, $name, _this = this; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else { + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + return _this._stylesheet0$_supportsCondition$0(); + else { + _0_0 = _this._stylesheet0$_tryImportSupportsFunction$0(); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + $name = _this._stylesheet0$_expression$0(); + t1.expectChar$1(58); + return _this._stylesheet0$_supportsDeclarationValue$2($name, new A._SpanScannerState(t1, t2)); + } + } + }, + _stylesheet0$_tryImportSupportsFunction$0() { + var t1, start, $name, value, _this = this; + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $name = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + value = _this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction0($name, value, t1.spanFrom$1(start)); + }, + _stylesheet0$_includeRule$1(start) { + var name0, namespace, $arguments, t2, t3, contentArguments, contentArguments_, wasInContentBlock, $content, span, _this = this, _null = null, + $name = _this.identifier$0(), + t1 = _this.scanner; + if (t1.scanChar$1(46)) { + name0 = _this._stylesheet0$_publicIdentifier$0(); + namespace = $name; + $name = name0; + } else + namespace = _null; + _this.whitespace$0(); + if (t1.peekChar$0() === 40) + $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentInvocation$empty0(A._FileSpan$(t2.file, t3, t3)); + } + _this.whitespace$0(); + if (_this.scanIdentifier$1("using")) { + _this.whitespace$0(); + contentArguments = _this._stylesheet0$_argumentDeclaration$0(); + _this.whitespace$0(); + } else + contentArguments = _null; + t2 = contentArguments == null; + if (!t2 || _this.lookingAtChildren$0()) { + if (t2) { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + contentArguments_ = new A.ArgumentDeclaration0(B.List_empty24, _null, A._FileSpan$(t2.file, t3, t3)); + } else + contentArguments_ = contentArguments; + wasInContentBlock = _this._stylesheet0$_inContentBlock; + _this._stylesheet0$_inContentBlock = true; + $content = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__includeRule_closure0(contentArguments_)); + _this._stylesheet0$_inContentBlock = wasInContentBlock; + } else { + _this.expectStatementSeparator$0(); + $content = _null; + } + t1 = t1.spanFrom$2(start, start); + t2 = $content == null ? $arguments : $content; + span = t1.expand$1(0, t2.get$span(t2)); + return new A.IncludeRule0(namespace, A.stringReplaceAllUnchecked($name, "_", "-"), $name, $arguments, $content, span); + }, + mediaRule$1(start) { + return this._stylesheet0$_withChildren$3(this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mediaRule_closure0(this._stylesheet0$_mediaQueryList$0())); + }, + _stylesheet0$_mixinRule$1(start) { + var t1, t2, $name, $arguments, t3, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + $name = _this.identifier$0(); + if (B.JSString_methods.startsWith$1($name, "--")) + A.WarnForDeprecation_warnForDeprecation0(_this.logger, B.Deprecation_qBS, string$.Sassx20_m, t1.spanFrom$1(new A._SpanScannerState(t1, t2)), null); + _this.whitespace$0(); + if (t1.peekChar$0() === 40) + $arguments = _this._stylesheet0$_argumentDeclaration$0(); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = new A.ArgumentDeclaration0(B.List_empty24, null, A._FileSpan$(t2.file, t3, t3)); + } + if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.Mixinscm, t1.spanFrom$1(start)); + else if (_this._stylesheet0$_inControlDirective) + _this.error$2(0, string$.Mixinsb, t1.spanFrom$1(start)); + _this.whitespace$0(); + _this._stylesheet0$_inMixin = true; + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__mixinRule_closure0(_this, $name, $arguments, precedingComment)); + }, + mozDocumentRule$2(start, $name) { + var t5, t6, identifier, _0_0, argument, trailing, endPosition, t7, t8, start0, end, _this = this, _box_0 = {}, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + t4 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer0(t3, t4); + _box_0.needsDeprecationWarning = false; + for (t5 = _this.get$whitespace(); true;) { + if (t1.peekChar$0() === 35) { + t6 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t6); + _box_0.needsDeprecationWarning = true; + } else { + t6 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + $label0$0: { + if ("url" === identifier || "url-prefix" === identifier || "domain" === identifier) { + _0_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t6), identifier); + if (_0_0 != null) + buffer.addInterpolation$1(_0_0); + else { + t1.expectChar$1(40); + _this.whitespace$0(); + argument = _this.interpolatedString$0(); + t1.expectChar$1(41); + t3._contents += identifier; + t6 = A.Primitives_stringFromCharCode(40); + t3._contents += t6; + buffer.addInterpolation$1(argument.asInterpolation$0()); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + } + t6 = t3._contents; + trailing = t6.charCodeAt(0) == 0 ? t6 : t6; + if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + if ("regexp" === identifier) { + t3._contents += "regexp("; + t1.expectChar$1(40); + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + t1.expectChar$1(41); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + endPosition = t1._string_scanner$_position; + t7 = t1._sourceFile; + t8 = new A._FileSpan(t7, t6, endPosition); + t8._FileSpan$3(t7, t6, endPosition); + _this.error$2(0, "Invalid function name.", t8); + } + } + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t6 = A.Primitives_stringFromCharCode(44); + t3._contents += t6; + start0 = t1._string_scanner$_position; + t5.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t1.string, start0, end); + } + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure0(_box_0, _this, $name, buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))))); + }, + supportsRule$1(start) { + var _this = this, + condition = _this._stylesheet0$_supportsCondition$0(); + _this.whitespace$0(); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_supportsRule_closure0(condition)); + }, + _stylesheet0$_useNamespace$2(url, start) { + var namespace, basename, dot, t1, exception, _this = this; + if (_this.scanIdentifier$1("as")) { + _this.whitespace$0(); + return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); + } + basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; + namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); + try { + t1 = A.SpanScanner$(namespace, null); + t1 = new A.Parser1(t1, _this.logger, null)._parser1$_parseIdentifier$0(); + return t1; + } catch (exception) { + if (type$.SassFormatException_2._is(A.unwrapException(exception))) + _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.scanner.spanFrom$1(start)); + else + throw exception; + } + }, + _stylesheet0$_configuration$1$allowGuarded(allowGuarded) { + var variableNames, configuration, t1, t2, $name, expression, t3, guarded, endPosition, t4, t5, span, _this = this; + if (!_this.scanIdentifier$1("with")) + return null; + variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable_2); + _this.whitespace$0(); + t1 = _this.scanner; + t1.expectChar$1(40); + for (; true;) { + _this.whitespace$0(); + t2 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + expression = _this.expressionUntilComma$0(); + t3 = t1._string_scanner$_position; + if (allowGuarded && t1.scanChar$1(33)) { + guarded = _this.identifier$0() === "default"; + if (guarded) + _this.whitespace$0(); + else { + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = new A._FileSpan(t4, t3, endPosition); + t5._FileSpan$3(t4, t3, endPosition); + _this.error$2(0, "Invalid flag name.", t5); + } + } else + guarded = false; + endPosition = t1._string_scanner$_position; + t3 = t1._sourceFile; + span = new A._FileSpan(t3, t2, endPosition); + span._FileSpan$3(t3, t2, endPosition); + if (variableNames.contains$1(0, $name)) + _this.error$2(0, string$.The_sa, span); + variableNames.add$1(0, $name); + configuration.push(new A.ConfiguredVariable0($name, expression, guarded, span)); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + } + t1.expectChar$1(41); + return configuration; + }, + _stylesheet0$_configuration$0() { + return this._stylesheet0$_configuration$1$allowGuarded(false); + }, + _stylesheet0$_warnRule$1(start) { + var value = this._stylesheet0$_expression$0(); + this.expectStatementSeparator$1("@warn rule"); + return new A.WarnRule0(value, this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_whileRule$2(start, child) { + var _this = this, + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__whileRule_closure0(_this, wasInControlDirective, _this._stylesheet0$_expression$0())); + }, + unknownAtRule$2(start, $name) { + var t2, t3, rule, _this = this, t1 = {}, + wasInUnknownAtRule = _this._stylesheet0$_inUnknownAtRule; + _this._stylesheet0$_inUnknownAtRule = true; + t1.value = null; + t2 = _this.scanner; + t3 = t2.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this._stylesheet0$_interpolatedDeclarationValue$1$allowOpenBrace(false) : null; + if (_this.lookingAtChildren$0()) + rule = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_unknownAtRule_closure0(t1, $name)); + else { + _this.expectStatementSeparator$0(); + rule = A.AtRule$0($name, t2.spanFrom$1(start), null, t3); + } + _this._stylesheet0$_inUnknownAtRule = wasInUnknownAtRule; + return rule; + }, + _stylesheet0$_disallowedAtRule$1(start) { + this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(true, false); + this.error$2(0, "This at-rule is not allowed here.", this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_argumentDeclaration$0() { + var $arguments, named, restArgument, t3, $name, defaultValue, endPosition, t4, t5, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + $arguments = A._setArrayType([], type$.JSArray_Argument_2); + named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + for (; restArgument = null, t1.peekChar$0() === 36;) { + t3 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + defaultValue = _this.expressionUntilComma$0(); + } else { + if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + _this.whitespace$0(); + restArgument = $name; + break; + } + defaultValue = null; + } + endPosition = t1._string_scanner$_position; + t4 = t1._sourceFile; + t5 = new A._FileSpan(t4, t3, endPosition); + t5._FileSpan$3(t4, t3, endPosition); + $arguments.push(new A.Argument0($name, defaultValue, t5)); + if (!named.add$1(0, $name)) + _this.error$2(0, "Duplicate argument.", B.JSArray_methods.get$last($arguments).span); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentDeclaration0(A.List_List$unmodifiable($arguments, type$.Argument_2), restArgument, t1); + }, + _stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { + var positional, t3, t4, named, t5, rest, keywordRest, expression, t6, t7, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$0(); + positional = A._setArrayType([], type$.JSArray_Expression_2); + t3 = type$.String; + t4 = type$.Expression_2; + named = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + for (t5 = !mixin, rest = null; keywordRest = null, _this._stylesheet0$_lookingAtExpression$0();) { + expression = _this.expressionUntilComma$1$singleEquals(t5); + _this.whitespace$0(); + if (expression instanceof A.VariableExpression0 && t1.scanChar$1(58)) { + _this.whitespace$0(); + t6 = expression.name; + if (named.containsKey$1(t6)) + _this.error$2(0, "Duplicate argument.", expression.span); + named.$indexSet(0, t6, _this.expressionUntilComma$1$singleEquals(t5)); + } else if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + if (rest != null) { + _this.whitespace$0(); + keywordRest = expression; + break; + } + rest = expression; + } else if (named.__js_helper$_length !== 0) + _this.error$2(0, string$.Positi, expression.get$span(expression)); + else + positional.push(expression); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { + t5 = t1._sourceFile; + t6 = t1._string_scanner$_position; + new A.FileLocation(t5, t6).FileLocation$_$2(t5, t6); + t7 = new A._FileSpan(t5, t6, t6); + t7._FileSpan$3(t5, t6, t6); + t6 = A._setArrayType([""], type$.JSArray_Object); + result = A.List_List$from(t6, false, type$.Object); + result.fixed$length = Array; + result.immutable$list = Array; + t5 = new A.Interpolation0(result, t7); + t5.Interpolation$20(t6, t7); + positional.push(new A.StringExpression0(t5, false)); + break; + } + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ArgumentInvocation0(A.List_List$unmodifiable(positional, t4), A.ConstantMap_ConstantMap$from(named, t3, t4), rest, keywordRest, t1); + }, + _stylesheet0$_argumentInvocation$0() { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, false); + }, + _stylesheet0$_argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); + }, + _stylesheet0$_argumentInvocation$1$mixin(mixin) { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); + }, + _stylesheet0$_expression$3$bracketList$singleEquals$until(bracketList, singleEquals, until) { + var t2, beforeBracket, start, wasInExpression, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, _3_0, _1_0, t4, _3_28, _2_0, _3_32, _3_40, commaExpressions, spaceExpressions, singleExpression, _this = this, + _s20_ = "Expected expression.", + _box_0 = {}, + t1 = until != null; + if (t1 && until.call$0()) + _this.scanner.error$1(0, _s20_); + if (bracketList) { + t2 = _this.scanner; + beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); + t2.expectChar$1(91); + _this.whitespace$0(); + if (t2.scanChar$1(93)) { + t1 = A._setArrayType([], type$.JSArray_Expression_2); + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(t1, type$.Expression_2), B.ListSeparator_undecided_null_undecided0, true, t2); + } + } else + beforeBracket = null; + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + wasInExpression = _this._stylesheet0$_inExpression; + wasInParentheses = _this._stylesheet0$_inParentheses; + _this._stylesheet0$_inExpression = true; + _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; + _box_0.allowSlash = true; + _box_0.singleExpression_ = _this._stylesheet0$_singleExpression$0(); + resetState = new A.StylesheetParser__expression_resetState0(_box_0, _this, start); + resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation0(_box_0, _this); + resolveOperations = new A.StylesheetParser__expression_resolveOperations0(_box_0, resolveOneOperation); + addSingleExpression = new A.StylesheetParser__expression_addSingleExpression0(_box_0, _this, resetState, resolveOperations); + addOperator = new A.StylesheetParser__expression_addOperator0(_box_0, _this, resolveOneOperation); + resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions0(_box_0, _this, resolveOperations); + for (t3 = type$.JSArray_Expression_2; true;) { + _this.whitespace$0(); + if (t1 && until.call$0()) + break; + _3_0 = t2.peekChar$0(); + if (_3_0 == null) + break; + if (40 === _3_0) { + addSingleExpression.call$1(_this.parentheses$0()); + continue; + } + if (91 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_expression$1$bracketList(true)); + continue; + } + if (36 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_variable$0()); + continue; + } + if (38 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_selector$0()); + continue; + } + if (39 === _3_0 || 34 === _3_0) { + addSingleExpression.call$1(_this.interpolatedString$0()); + continue; + } + if (35 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_hashExpression$0()); + continue; + } + if (61 === _3_0) { + t2.readChar$0(); + if (singleEquals && t2.peekChar$0() !== 61) + addOperator.call$1(B.BinaryOperator_wdM0); + else { + t2.expectChar$1(61); + addOperator.call$1(B.BinaryOperator_g8k0); + } + continue; + } + if (33 === _3_0) { + $label0$1: { + _1_0 = t2.peekChar$1(1); + if (61 === _1_0) { + t2.readChar$0(); + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_icU0); + break $label0$1; + } + t4 = true; + if (_1_0 != null) + if (105 !== _1_0) + if (73 !== _1_0) + t4 = _1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12; + if (t4) { + addSingleExpression.call$1(_this._stylesheet0$_importantExpression$0()); + break $label0$1; + } + break; + } + continue; + } + if (60 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_SPQ0 : B.BinaryOperator_miq0); + continue; + } + if (62 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_oEm0 : B.BinaryOperator_bEa0); + continue; + } + if (42 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_2No0); + continue; + } + _3_28 = 43 === _3_0; + if (_3_28 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + continue; + } + if (_3_28) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_u150); + continue; + } + if (45 === _3_0) { + _2_0 = t2.peekChar$1(1); + if (A._isInt(_2_0) && _2_0 >= 48 && _2_0 <= 57 || 46 === _2_0) + if (_box_0.singleExpression_ != null) { + t4 = t2.peekChar$1(-1); + t4 = t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12; + } else + t4 = true; + else + t4 = false; + if (t4) + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + else if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + addSingleExpression.call$1(_this.identifierLike$0()); + else if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_SjO0); + } + continue; + } + _3_32 = 47 === _3_0; + if (_3_32 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + continue; + } + if (_3_32) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_U770); + continue; + } + if (37 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_KNx0); + continue; + } + if (_3_0 >= 48 && _3_0 <= 57) { + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + continue; + } + _3_40 = 46 === _3_0; + if (_3_40 && t2.peekChar$1(1) === 46) + break; + if (_3_40) { + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + continue; + } + if (97 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("and")) { + addOperator.call$1(B.BinaryOperator_eDt0); + continue; + } + if (111 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("or")) { + addOperator.call$1(B.BinaryOperator_qNM0); + continue; + } + if ((117 === _3_0 || 85 === _3_0) && t2.peekChar$1(1) === 43) { + addSingleExpression.call$1(_this._stylesheet0$_unicodeRange$0()); + continue; + } + if (!(_3_0 >= 97 && _3_0 <= 122)) + t4 = _3_0 >= 65 && _3_0 <= 90 || 95 === _3_0 || 92 === _3_0 || _3_0 >= 128; + else + t4 = true; + if (t4) { + addSingleExpression.call$1(_this.identifierLike$0()); + continue; + } + if (44 === _3_0) { + if (_this._stylesheet0$_inParentheses) { + _this._stylesheet0$_inParentheses = false; + if (_box_0.allowSlash) { + resetState.call$0(); + continue; + } + } + commaExpressions = _box_0.commaExpressions_; + if (commaExpressions == null) + commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t3); + if (_box_0.singleExpression_ == null) + t2.error$1(0, _s20_); + resolveSpaceExpressions.call$0(); + t4 = _box_0.singleExpression_; + t4.toString; + commaExpressions.push(t4); + t2.readChar$0(); + _box_0.allowSlash = true; + _box_0.singleExpression_ = null; + continue; + } + break; + } + if (bracketList) + t2.expectChar$1(93); + commaExpressions = _box_0.commaExpressions_; + spaceExpressions = _box_0.spaceExpressions_; + if (commaExpressions != null) { + resolveSpaceExpressions.call$0(); + _this._stylesheet0$_inParentheses = wasInParentheses; + singleExpression = _box_0.singleExpression_; + if (singleExpression != null) + commaExpressions.push(singleExpression); + _this._stylesheet0$_inExpression = wasInExpression; + t1 = t2.spanFrom$1(beforeBracket == null ? start : beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(commaExpressions, type$.Expression_2), B.ListSeparator_ECn0, bracketList, t1); + } else if (bracketList && spaceExpressions != null) { + resolveOperations.call$0(); + _this._stylesheet0$_inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + spaceExpressions.push(t1); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_nbm0, true, t2); + } else { + resolveSpaceExpressions.call$0(); + if (bracketList) { + t1 = _box_0.singleExpression_; + t1.toString; + t3 = A._setArrayType([t1], t3); + beforeBracket.toString; + t2 = t2.spanFrom$1(beforeBracket); + _box_0.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(t3, type$.Expression_2), B.ListSeparator_undecided_null_undecided0, true, t2); + } + _this._stylesheet0$_inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + return t1; + } + }, + _stylesheet0$_expression$2$singleEquals$until(singleEquals, until) { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, singleEquals, until); + }, + _stylesheet0$_expression$1$bracketList(bracketList) { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(bracketList, false, null); + }, + _stylesheet0$_expression$0() { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, false, null); + }, + _stylesheet0$_expression$1$until(until) { + return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, false, until); + }, + expressionUntilComma$1$singleEquals(singleEquals) { + return this._stylesheet0$_expression$2$singleEquals$until(singleEquals, new A.StylesheetParser_expressionUntilComma_closure0(this)); + }, + expressionUntilComma$0() { + return this.expressionUntilComma$1$singleEquals(false); + }, + _stylesheet0$_isSlashOperand$1(expression) { + var t1 = true; + if (!(expression instanceof A.NumberExpression0)) + if (!(expression instanceof A.FunctionExpression0)) + t1 = expression instanceof A.BinaryOperationExpression0 && expression.allowsSlash; + return t1; + }, + _stylesheet0$_singleExpression$0() { + var next, t2, _this = this, + _s20_ = "Expected expression.", + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (_0_0 == null) + t1.error$1(0, _s20_); + if (40 === _0_0) { + t1 = _this.parentheses$0(); + break $label0$0; + } + if (47 === _0_0) { + t1 = _this._stylesheet0$_unaryOperation$0(); + break $label0$0; + } + if (46 === _0_0) { + t1 = _this._stylesheet0$_number$0(); + break $label0$0; + } + if (91 === _0_0) { + t1 = _this._stylesheet0$_expression$1$bracketList(true); + break $label0$0; + } + if (36 === _0_0) { + t1 = _this._stylesheet0$_variable$0(); + break $label0$0; + } + if (38 === _0_0) { + t1 = _this._stylesheet0$_selector$0(); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) { + t1 = _this.interpolatedString$0(); + break $label0$0; + } + if (35 === _0_0) { + t1 = _this._stylesheet0$_hashExpression$0(); + break $label0$0; + } + if (43 === _0_0) { + next = t1.peekChar$1(1); + t1 = next != null && next >= 48 && next <= 57 || next === 46 ? _this._stylesheet0$_number$0() : _this._stylesheet0$_unaryOperation$0(); + break $label0$0; + } + if (45 === _0_0) { + t1 = _this._stylesheet0$_minusExpression$0(); + break $label0$0; + } + if (33 === _0_0) { + t1 = _this._stylesheet0$_importantExpression$0(); + break $label0$0; + } + if ((117 === _0_0 || 85 === _0_0) && t1.peekChar$1(1) === 43) { + t1 = _this._stylesheet0$_unicodeRange$0(); + break $label0$0; + } + if (_0_0 >= 48 && _0_0 <= 57) { + t1 = _this._stylesheet0$_number$0(); + break $label0$0; + } + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90 || 95 === _0_0 || 92 === _0_0 || _0_0 >= 128; + else + t2 = true; + if (t2) { + t1 = _this.identifierLike$0(); + break $label0$0; + } + t1 = t1.error$1(0, _s20_); + } + return t1; + }, + parentheses$0() { + var start, first, expressions, t1, t2, _this = this, + wasInParentheses = _this._stylesheet0$_inParentheses; + _this._stylesheet0$_inParentheses = true; + try { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(40); + _this.whitespace$0(); + if (!_this._stylesheet0$_lookingAtExpression$0()) { + t1.expectChar$1(41); + t2 = A._setArrayType([], type$.JSArray_Expression_2); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(t2, type$.Expression_2); + return new A.ListExpression0(t2, B.ListSeparator_undecided_null_undecided0, false, t1); + } + first = _this.expressionUntilComma$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t1 = _this._stylesheet0$_map$2(first, start); + return t1; + } + if (!t1.scanChar$1(44)) { + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + return new A.ParenthesizedExpression0(first, t1); + } + _this.whitespace$0(); + expressions = A._setArrayType([first], type$.JSArray_Expression_2); + for (; true;) { + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + J.add$1$ax(expressions, _this.expressionUntilComma$0()); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$0(); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(expressions, type$.Expression_2); + return new A.ListExpression0(t2, B.ListSeparator_ECn0, false, t1); + } finally { + _this._stylesheet0$_inParentheses = wasInParentheses; + } + }, + _stylesheet0$_map$2(first, start) { + var t1, key, _this = this, + pairs = A._setArrayType([new A._Record_2(first, _this.expressionUntilComma$0())], type$.JSArray_Record_2_Expression_and_Expression_2); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$0(); + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + key = _this.expressionUntilComma$0(); + t1.expectChar$1(58); + _this.whitespace$0(); + pairs.push(new A._Record_2(key, _this.expressionUntilComma$0())); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + return new A.MapExpression0(A.List_List$unmodifiable(pairs, type$.Record_2_Expression_and_Expression_2), t1); + }, + _stylesheet0$_hashExpression$0() { + var start, t2, identifier, buffer, t3, _this = this, + t1 = _this.scanner; + if (t1.peekChar$1(1) === 123) + return _this.identifierLike$0(); + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(35); + t2 = t1.peekChar$0(); + if (t2 == null) + t2 = null; + else + t2 = t2 >= 48 && t2 <= 57; + if (t2 === true) + return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), t1.spanFrom$1(start)); + t2 = t1._string_scanner$_position; + identifier = _this.interpolatedIdentifier$0(); + if (_this._stylesheet0$_isHexColor$1(identifier)) { + t1.set$state(new A._SpanScannerState(t1, t2)); + return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), t1.spanFrom$1(start)); + } + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object)); + t3 = A.Primitives_stringFromCharCode(35); + t2._contents += t3; + buffer.addInterpolation$1(identifier); + return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _stylesheet0$_hexColorContents$1(start) { + var red, green, blue, alpha, digit4, t2, t3, t4, _this = this, + digit1 = _this._stylesheet0$_hexDigit$0(), + digit2 = _this._stylesheet0$_hexDigit$0(), + digit3 = _this._stylesheet0$_hexDigit$0(), + t1 = _this.scanner, + $self = t1.peekChar$0(); + if (!($self != null && A.CharacterExtension_get_isHex0($self))) { + red = (digit1 << 4 >>> 0) + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = (digit3 << 4 >>> 0) + digit3; + alpha = null; + } else { + digit4 = _this._stylesheet0$_hexDigit$0(); + $self = t1.peekChar$0(); + t2 = $self != null && A.CharacterExtension_get_isHex0($self); + t3 = digit1 << 4 >>> 0; + t4 = digit3 << 4 >>> 0; + if (!t2) { + red = t3 + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = t4 + digit3; + alpha = ((digit4 << 4 >>> 0) + digit4) / 255; + } else { + red = t3 + digit2; + green = t4 + digit4; + blue = (_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0(); + $self = t1.peekChar$0(); + alpha = $self != null && A.CharacterExtension_get_isHex0($self) ? ((_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0()) / 255 : null; + } + } + t2 = alpha == null; + t3 = t2 ? 1 : alpha; + return A.SassColor_SassColor$rgbInternal0(red, green, blue, t3, t2 ? new A.SpanColorFormat0(t1.spanFrom$1(start)) : null); + }, + _stylesheet0$_isHexColor$1(interpolation) { + var _0_2, t1, + plain = interpolation.get$asPlain(); + if (typeof plain == "string") { + _0_2 = plain.length; + t1 = true; + if (3 !== _0_2) + if (4 !== _0_2) + if (6 !== _0_2) + t1 = 8 === _0_2; + } else + t1 = false; + if (t1) { + t1 = new A.CodeUnits(plain); + return t1.every$1(t1, new A.StylesheetParser__isHexColor_closure0()); + } else + return false; + }, + _stylesheet0$_hexDigit$0() { + var t1 = this.scanner, + t2 = t1.peekChar$0(); + t2 = t2 == null ? null : A.CharacterExtension_get_isHex0(t2); + return t2 === true ? A.asHex0(t1.readChar$0()) : t1.error$1(0, "Expected hex digit."); + }, + _stylesheet0$_minusExpression$0() { + var _this = this, + _0_0 = _this.scanner.peekChar$1(1); + if (A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57 || 46 === _0_0) + return _this._stylesheet0$_number$0(); + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return _this.identifierLike$0(); + return _this._stylesheet0$_unaryOperation$0(); + }, + _stylesheet0$_importantExpression$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.readChar$0(); + this.whitespace$0(); + this.expectIdentifier$1("important"); + t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.StringExpression0(A.Interpolation$0(A._setArrayType(["!important"], type$.JSArray_Object), t2), false); + }, + _stylesheet0$_unaryOperation$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + operator = _this._stylesheet0$_unaryOperatorFor$1(t1.readChar$0()); + if (operator == null) + t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); + else if (_this.get$plainCss() && operator !== B.UnaryOperator_SJr0) + t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); + _this.whitespace$0(); + return new A.UnaryOperationExpression0(operator, _this._stylesheet0$_singleExpression$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_unaryOperatorFor$1(character) { + var t1; + $label0$0: { + if (43 === character) { + t1 = B.UnaryOperator_cLp0; + break $label0$0; + } + if (45 === character) { + t1 = B.UnaryOperator_AiQ0; + break $label0$0; + } + if (47 === character) { + t1 = B.UnaryOperator_SJr0; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + _stylesheet0$_number$0() { + var number, unit, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + first = t1.peekChar$0(), + t3 = first !== 43; + if (!t3 || first === 45) + t1.readChar$0(); + if (t1.peekChar$0() !== 46) + _this._stylesheet0$_consumeNaturalNumber$0(); + _this._stylesheet0$_tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2 && t3 && first !== 45); + _this._stylesheet0$_tryExponent$0(); + number = A.double_parse(t1.substring$1(0, t2)); + if (t1.scanChar$1(37)) + unit = "%"; + else { + if (_this.lookingAtIdentifier$0()) + t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; + else + t3 = false; + unit = t3 ? _this.identifier$1$unit(true) : null; + } + return new A.NumberExpression0(number, unit, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_consumeNaturalNumber$0() { + var $self, + t1 = this.scanner, + t2 = t1.readChar$0(); + if (!(t2 >= 48 && t2 <= 57)) + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_tryDecimal$1$allowTrailingDot(allowTrailingDot) { + var $self, + t1 = this.scanner; + if (t1.peekChar$0() !== 46) + return; + $self = t1.peekChar$1(1); + if (!($self != null && $self >= 48 && $self <= 57)) { + if (allowTrailingDot) + return; + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); + } + t1.readChar$0(); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_tryExponent$0() { + var next, $self, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first !== 101 && first !== 69) + return; + next = t1.peekChar$1(1); + if (!(next != null && next >= 48 && next <= 57) && next !== 45 && next !== 43) + return; + t1.readChar$0(); + if (43 === next || 45 === next) + t1.readChar$0(); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + while (true) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_unicodeRange$0() { + var firstRangeLength, hasQuestionMark, t2, secondRangeLength, _this = this, + _s26_ = "Expected at most 6 digits.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentChar$1(117); + t1.expectChar$1(43); + for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure1());) + ++firstRangeLength; + for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) + ++firstRangeLength; + if (firstRangeLength === 0) + t1.error$1(0, 'Expected hex digit or "?".'); + else if (firstRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(start)); + else if (hasQuestionMark) { + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression0(A.Interpolation$0(A._setArrayType([t2], type$.JSArray_Object), t1), false); + } + if (t1.scanChar$1(45)) { + t2 = t1._string_scanner$_position; + for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure2());) + ++secondRangeLength; + if (secondRangeLength === 0) + t1.error$1(0, "Expected hex digit."); + else if (secondRangeLength > 6) + _this.error$2(0, _s26_, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) + t1.error$1(0, "Expected end of identifier."); + t2 = t1.substring$1(0, start.position); + t1 = t1.spanFrom$1(start); + return new A.StringExpression0(A.Interpolation$0(A._setArrayType([t2], type$.JSArray_Object), t1), false); + }, + _stylesheet0$_variable$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + $name = _this.variableName$0(); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sassx20v, t1.spanFrom$1(start)); + return new A.VariableExpression0(null, $name, t1.spanFrom$1(start)); + }, + _stylesheet0$_selector$0() { + var t1, start, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, string$.The_pa, 1); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(38); + if (t1.scanChar$1(38)) { + _this.logger.warn$2$span(0, string$.In_Sas, t1.spanFrom$1(start)); + t1.set$position(t1._string_scanner$_position - 1); + } + return new A.SelectorExpression0(t1.spanFrom$1(start)); + }, + interpolatedString$0() { + var t3, t4, buffer, _0_0, second, t5, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 === quote) { + t1.readChar$0(); + break; + } + if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _0_0) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t1.readChar$0(); + t1.readChar$0(); + if (second === 13) + t1.scanChar$1(10); + } else { + t5 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); + t3._contents += t5; + } + continue; + } + if (35 === _0_0 && t1.peekChar$1(1) === 123) { + t5 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + continue; + } + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + } + return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))), true); + }, + identifierLike$0() { + var invocation, expression, _0_0, t3, t4, t5, _1_0, _2_0, _2_2, _2_4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = A._Cell$(), + t2 = plain != null; + if (t2) { + if (plain === "if" && t1.peekChar$0() === 40) { + invocation = _this._stylesheet0$_argumentInvocation$0(); + return new A.IfExpression0(invocation, identifier.span.expand$1(0, invocation.span)); + } else if (plain === "not") { + _this.whitespace$0(); + expression = _this._stylesheet0$_singleExpression$0(); + return new A.UnaryOperationExpression0(B.UnaryOperator_not_not_not0, expression, identifier.span.expand$1(0, expression.get$span(expression))); + } + lower.__late_helper$_value = plain.toLowerCase(); + if (t1.peekChar$0() !== 40) { + switch (plain) { + case "false": + return new A.BooleanExpression0(false, identifier.span); + case "null": + return new A.NullExpression0(identifier.span); + case "true": + return new A.BooleanExpression0(true, identifier.span); + } + _0_0 = $.$get$colorsByName0().$index(0, lower._readLocal$0()); + if (_0_0 != null) { + t1 = B.JSNumber_methods.round$0(_0_0._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); + t2 = B.JSNumber_methods.round$0(_0_0._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); + t3 = B.JSNumber_methods.round$0(_0_0._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); + t4 = _0_0.alphaOrNull; + if (t4 == null) + t4 = 0; + t5 = identifier.span; + return new A.ColorExpression0(A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4, new A.SpanColorFormat0(t5)), t5); + } + } + _1_0 = _this.trySpecialFunction$2(lower._readLocal$0(), start); + if (_1_0 != null) + return _1_0; + } + _2_0 = t1.peekChar$0(); + _2_2 = 46 === _2_0; + if (_2_2 && t1.peekChar$1(1) === 46) + return new A.StringExpression0(identifier, false); + if (_2_2) { + t1.readChar$0(); + if (t2) + return _this.namespacedExpression$2(plain, start); + _this.error$2(0, string$.Interpn, identifier.span); + } + _2_4 = 40 === _2_0; + if (_2_4 && t2) { + t2 = _this._stylesheet0$_argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")); + t1 = t1.spanFrom$1(start); + return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t2, t1); + } + if (_2_4) + return new A.InterpolatedFunctionExpression0(identifier, _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); + return new A.StringExpression0(identifier, false); + }, + namespacedExpression$2(namespace, start) { + var $name, t2, t3, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 36) { + $name = _this.variableName$0(); + _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure0(_this, start)); + return new A.VariableExpression0(namespace, $name, t1.spanFrom$1(start)); + } + t2 = _this._stylesheet0$_publicIdentifier$0(); + t3 = _this._stylesheet0$_argumentInvocation$0(); + t1 = t1.spanFrom$1(start); + return new A.FunctionExpression0(namespace, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, t3, t1); + }, + trySpecialFunction$2($name, start) { + var t1, buffer, t2, next, t3, _this = this, + normalized = A.unvendor0($name); + $label0$0: { + if (!("calc" === normalized && normalized !== $name && _this.scanner.scanChar$1(40))) + t1 = ("element" === normalized || "expression" === normalized) && _this.scanner.scanChar$1(40); + else + t1 = true; + if (t1) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object)); + t1._contents = "" + $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + break $label0$0; + } + if ("progid" === normalized && _this.scanner.scanChar$1(58)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object)); + t1._contents = "" + $name; + t2 = A.Primitives_stringFromCharCode(58); + t1._contents += t2; + t2 = _this.scanner; + next = t2.peekChar$0(); + while (true) { + if (next != null) { + if (!(next >= 97 && next <= 122)) + t3 = next >= 65 && next <= 90; + else + t3 = true; + t3 = t3 || next === 46; + } else + t3 = false; + if (!t3) + break; + t3 = A.Primitives_stringFromCharCode(t2.readChar$0()); + t1._contents += t3; + next = t2.peekChar$0(); + } + t2.expectChar$1(40); + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + break $label0$0; + } + if ("url" === normalized) + return A.NullableExtension_andThen0(_this._stylesheet0$_tryUrlContents$1(start), new A.StylesheetParser_trySpecialFunction_closure0()); + return null; + } + buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true)); + t1 = _this.scanner; + t1.expectChar$1(41); + t2 = buffer._interpolation_buffer0$_text; + t3 = A.Primitives_stringFromCharCode(41); + t2._contents += t3; + return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(start)), false); + }, + _stylesheet0$_tryUrlContents$2$name(start, $name) { + var t3, t4, buffer, t5, _0_0, _0_6, endPosition, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return null; + _this.whitespaceWithoutComments$0(); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + buffer = new A.InterpolationBuffer0(t3, t4); + t3._contents = "" + ($name == null ? "url" : $name); + t5 = A.Primitives_stringFromCharCode(40); + t3._contents += t5; + for (; true;) { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + break; + if (92 === _0_0) { + t5 = _this.escape$0(); + t3._contents += t5; + continue; + } + _0_6 = 35 === _0_0; + if (_0_6 && t1.peekChar$1(1) === 123) { + t5 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + continue; + } + t5 = true; + if (33 !== _0_0) + if (37 !== _0_0) + if (38 !== _0_0) + if (!_0_6) + t5 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; + if (t5) { + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t5; + continue; + } + if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { + _this.whitespaceWithoutComments$0(); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t2; + endPosition = t1._string_scanner$_position; + t2 = t1._sourceFile; + t5 = start.position; + t1 = new A._FileSpan(t2, t5, endPosition); + t1._FileSpan$3(t2, t5, endPosition); + t5 = type$.Object; + t2 = A.List_List$of(t4, true, t5); + t4 = t3._contents; + if (t4.length !== 0) + t2.push(t4.charCodeAt(0) == 0 ? t4 : t4); + result = A.List_List$from(t2, false, t5); + result.fixed$length = Array; + result.immutable$list = Array; + t3 = new A.Interpolation0(result, t1); + t3.Interpolation$20(t2, t1); + return t3; + } + break; + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return null; + }, + _stylesheet0$_tryUrlContents$1(start) { + return this._stylesheet0$_tryUrlContents$2$name(start, null); + }, + dynamicUrl$0() { + var _0_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentifier$1("url"); + _0_0 = _this._stylesheet0$_tryUrlContents$1(start); + if (_0_0 != null) + return new A.StringExpression0(_0_0, false); + return new A.InterpolatedFunctionExpression0(A.Interpolation$0(A._setArrayType(["url"], type$.JSArray_Object), t1.spanFrom$1(start)), _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); + }, + almostAnyValue$1$omitComments(omitComments) { + var t4, t5, t6, _2_0, t7, _0_0, _0_2, start, end, _0_4, identifier, _1_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + for (t4 = t1.string, t5 = t4.length, t6 = !omitComments; true;) + $label0$0: { + _2_0 = t1.peekChar$0(); + if (92 === _2_0) { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + _0_2 = 42 === _0_0; + if (_0_2 && t6) { + t7 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t7.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_2) { + _this.loudComment$0(); + break $label1$1; + } + _0_4 = 47 === _0_0; + if (_0_4 && t6) { + t7 = _this.get$silentComment(); + start = t1._string_scanner$_position; + t7.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_4) { + _this.silentComment$0(); + break $label1$1; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + break $label0$0; + } + if (13 === _2_0 || 10 === _2_0 || 12 === _2_0) { + if (_this.get$indented()) + break; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + break $label0$0; + } + if (33 === _2_0 || 59 === _2_0 || 123 === _2_0 || 125 === _2_0) + break; + if (117 === _2_0 || 85 === _2_0) { + t7 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + continue; + } + _1_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t7 === 0 ? 1 / t7 < 0 : t7 < 0) || t7 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t7, null)); + t1._string_scanner$_position = t7; + t1._lastMatch = null; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + break $label0$0; + } + if (_2_0 == null) + break; + t7 = _this.lookingAtIdentifier$0(); + if (t7) { + t7 = _this.identifier$0(); + t3._contents += t7; + break $label0$0; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + almostAnyValue$0() { + return this.almostAnyValue$1$omitComments(false); + }, + _stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, allowOpenBrace, allowSemicolon, silentComments) { + var t4, t5, t6, t7, t8, wroteNewline, _2_0, wroteNewline0, t9, _0_0, start, end, _2_14_isSet, _2_14, t10, _2_18_isSet, _2_20, _2_18, _2_20_isSet, _2_22, bracket, identifier, _1_0, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)), + brackets = A._setArrayType([], type$.JSArray_int); + for (t4 = !allowOpenBrace, t5 = t1.string, t6 = t5.length, t7 = !allowColon, t8 = !allowSemicolon, wroteNewline = false; true;) + $label0$0: { + _2_0 = t1.peekChar$0(); + wroteNewline0 = false; + if (92 === _2_0) { + t9 = _this.escape$1$identifierStart(true); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + if (42 === _0_0) { + t9 = _this.get$loudComment(); + start = t1._string_scanner$_position; + t9.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t5, start, end); + break $label1$1; + } + if (47 === _0_0 && silentComments) { + _this.silentComment$0(); + break $label1$1; + } + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + _2_14_isSet = 32 !== _2_0; + if (_2_14_isSet) { + _2_14 = 9 === _2_0; + t9 = _2_14; + } else { + _2_14 = _null; + t9 = true; + } + t10 = false; + if (t9) + if (!wroteNewline) { + t9 = t1.peekChar$1(1); + t9 = t9 === 32 || t9 === 9 || t9 === 10 || t9 === 13 || t9 === 12; + } else + t9 = t10; + else + t9 = t10; + if (t9) { + t1.readChar$0(); + break $label0$0; + } + if (_2_14_isSet) + t9 = _2_14; + else + t9 = true; + if (t9) { + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + break $label0$0; + } + _2_18_isSet = 10 !== _2_0; + _2_20 = _null; + t9 = true; + if (_2_18_isSet) { + _2_18 = 13 === _2_0; + _2_20_isSet = !_2_18; + if (_2_20_isSet) { + _2_20 = 12 === _2_0; + t9 = _2_20; + } + } else { + _2_18 = _null; + _2_20_isSet = false; + } + if (t9 && _this.get$indented()) + break; + t9 = true; + if (_2_18_isSet) + if (!_2_18) + t9 = _2_20_isSet ? _2_20 : 12 === _2_0; + if (t9) { + t9 = t1.peekChar$1(-1); + if (!(t9 === 10 || t9 === 13 || t9 === 12)) + t3._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break $label0$0; + } + _2_22 = 123 === _2_0; + if (_2_22 && t4) + break; + if (40 !== _2_0) + t9 = _2_22 || 91 === _2_0; + else + t9 = true; + if (t9) { + bracket = t1.readChar$0(); + t9 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t9; + brackets.push(A.opposite0(bracket)); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (41 === _2_0 || 125 === _2_0 || 93 === _2_0) { + if (brackets.length === 0) + break; + bracket = brackets.pop(); + t1.expectChar$1(bracket); + t9 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (59 === _2_0) { + if (t8 && brackets.length === 0) + break; + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (58 === _2_0) { + if (t7 && brackets.length === 0) + break; + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (117 === _2_0 || 85 === _2_0) { + t9 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + wroteNewline = wroteNewline0; + continue; + } + _1_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t9), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t9 === 0 ? 1 / t9 < 0 : t9 < 0) || t9 > t6) + A.throwExpression(A.ArgumentError$("Invalid position " + t9, _null)); + t1._string_scanner$_position = t9; + t1._lastMatch = null; + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (_2_0 == null) + break; + t9 = _this.lookingAtIdentifier$0(); + if (t9) { + t9 = _this.identifier$0(); + t3._contents += t9; + wroteNewline = wroteNewline0; + break $label0$0; + } + t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t9; + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._interpolation_buffer0$_contents.length === 0 && t3._contents.length === 0) + t1.error$1(0, "Expected token."); + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { + return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$1$allowOpenBrace(allowOpenBrace) { + return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, allowOpenBrace, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(allowEmpty, allowSemicolon) { + return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, allowSemicolon, true); + }, + _stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(allowColon, allowEmpty, allowSemicolon) { + return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, true, allowSemicolon, true); + }, + _stylesheet0$_interpolatedDeclarationValue$0() { + return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(allowEmpty, allowOpenBrace) { + return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, allowOpenBrace, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$1$silentComments(silentComments) { + return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, silentComments); + }, + interpolatedIdentifier$0() { + var t4, _0_0, _this = this, + _s20_ = "Expected identifier.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + t2 = new A.StringBuffer(""), + t3 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer0(t2, t3); + if (t1.scanChar$1(45)) { + t4 = A.Primitives_stringFromCharCode(45); + t2._contents += t4; + if (t1.scanChar$1(45)) { + t3 = A.Primitives_stringFromCharCode(45); + t2._contents += t3; + _this._stylesheet0$_interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + } + } + $label0$0: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s20_); + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128) { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + break $label0$0; + } + if (92 === _0_0) { + t3 = _this.escape$1$identifierStart(true); + t2._contents += t3; + break $label0$0; + } + if (35 === _0_0 && t1.peekChar$1(1) === 123) { + t2 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(t2); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._stylesheet0$_interpolatedIdentifierBody$1(buffer); + return buffer.interpolation$1(t1.spanFrom$1(start)); + }, + _stylesheet0$_interpolatedIdentifierBody$1(buffer) { + var t1, t2, t3, _0_0, t4; + for (t1 = buffer._interpolation_buffer0$_contents, t2 = this.scanner, t3 = buffer._interpolation_buffer0$_text; true;) { + _0_0 = t2.peekChar$0(); + if (_0_0 == null) + break; + t4 = true; + if (95 !== _0_0) + if (45 !== _0_0) { + if (!(_0_0 >= 97 && _0_0 <= 122)) + t4 = _0_0 >= 65 && _0_0 <= 90; + else + t4 = true; + if (!t4) + t4 = _0_0 >= 48 && _0_0 <= 57; + else + t4 = true; + t4 = t4 || _0_0 >= 128; + } + if (t4) { + t4 = A.Primitives_stringFromCharCode(t2.readChar$0()); + t3._contents += t4; + continue; + } + if (92 === _0_0) { + t4 = this.escape$0(); + t3._contents += t4; + continue; + } + if (35 === _0_0 && t2.peekChar$1(1) === 123) { + t4 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t1.push(t4); + continue; + } + break; + } + }, + singleInterpolation$0() { + var contents, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("#{"); + _this.whitespace$0(); + contents = _this._stylesheet0$_expression$0(); + t1.expectChar$1(125); + if (_this.get$plainCss()) + _this.error$2(0, string$.Interpp, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + return contents; + }, + _stylesheet0$_mediaQueryList$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object)); + for (; true;) { + _this.whitespace$0(); + _this._stylesheet0$_mediaQuery$1(buffer); + _this.whitespace$0(); + if (!t1.scanChar$1(44)) + break; + t4 = A.Primitives_stringFromCharCode(44); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + } + return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_mediaQuery$1(buffer) { + var identifier1, t1, t2, identifier2, _this = this, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + _this._stylesheet0$_mediaInParens$1(buffer); + _this.whitespace$0(); + if (_this.scanIdentifier$1(_s3_)) { + buffer._interpolation_buffer0$_text._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); + } else if (_this.scanIdentifier$1("or")) { + buffer._interpolation_buffer0$_text._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, "or"); + } + return; + } + identifier1 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase0(identifier1.get$asPlain(), "not")) { + _this.expectWhitespace$0(); + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + buffer._interpolation_buffer0$_text._contents += "not "; + _this._stylesheet0$_mediaOrInterp$1(buffer); + return; + } + } + _this.whitespace$0(); + buffer.addInterpolation$1(identifier1); + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return; + t1 = buffer._interpolation_buffer0$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + identifier2 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase0(identifier2.get$asPlain(), _s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else { + _this.whitespace$0(); + buffer.addInterpolation$1(identifier2); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else + return; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + t1._contents += "not "; + _this._stylesheet0$_mediaOrInterp$1(buffer); + return; + } + _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); + return; + }, + _stylesheet0$_mediaLogicSequence$2(buffer, operator) { + var t1, t2, _this = this; + for (t1 = buffer._interpolation_buffer0$_text; true;) { + _this._stylesheet0$_mediaOrInterp$1(buffer); + _this.whitespace$0(); + if (!_this.scanIdentifier$1(operator)) + return; + _this.expectWhitespace$0(); + t2 = A.Primitives_stringFromCharCode(32); + t2 = t1._contents += t2; + t1._contents = t2 + operator; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + } + }, + _stylesheet0$_mediaOrInterp$1(buffer) { + var interpolation; + if (this.scanner.peekChar$0() === 35) { + interpolation = this.singleInterpolation$0(); + buffer.addInterpolation$1(A.Interpolation$0(A._setArrayType([interpolation], type$.JSArray_Object), interpolation.get$span(interpolation))); + } else + this._stylesheet0$_mediaInParens$1(buffer); + }, + _stylesheet0$_mediaInParens$1(buffer) { + var t2, t3, t4, next, t5, _this = this, + t1 = _this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = buffer._interpolation_buffer0$_text; + t3 = A.Primitives_stringFromCharCode(40); + t2._contents += t3; + _this.whitespace$0(); + if (t1.peekChar$0() === 40) { + _this._stylesheet0$_mediaInParens$1(buffer); + _this.whitespace$0(); + if (_this.scanIdentifier$1("and")) { + t2._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, "and"); + } else if (_this.scanIdentifier$1("or")) { + t2._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, "or"); + } + } else if (_this.scanIdentifier$1("not")) { + t2._contents += "not "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaOrInterp$1(buffer); + } else { + t3 = _this._stylesheet0$_expressionUntilComparison$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4 = buffer._interpolation_buffer0$_contents; + t4.push(t3); + if (t1.scanChar$1(58)) { + _this.whitespace$0(); + t3 = A.Primitives_stringFromCharCode(58); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + t3 = _this._stylesheet0$_expression$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t3); + } else { + next = t1.peekChar$0(); + t3 = 60 !== next; + if (!t3 || 62 === next || 61 === next) { + t5 = A.Primitives_stringFromCharCode(32); + t2._contents += t5; + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t5; + if ((!t3 || 62 === next) && t1.scanChar$1(61)) { + t5 = A.Primitives_stringFromCharCode(61); + t2._contents += t5; + } + t5 = A.Primitives_stringFromCharCode(32); + t2._contents += t5; + _this.whitespace$0(); + t5 = _this._stylesheet0$_expressionUntilComparison$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t5); + if (!t3 || 62 === next) { + next.toString; + t3 = t1.scanChar$1(next); + } else + t3 = false; + if (t3) { + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(next); + t2._contents += t3; + if (t1.scanChar$1(61)) { + t3 = A.Primitives_stringFromCharCode(61); + t2._contents += t3; + } + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + _this.whitespace$0(); + t3 = _this._stylesheet0$_expressionUntilComparison$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(t3); + } + } + } + } + t1.expectChar$1(41); + _this.whitespace$0(); + t1 = A.Primitives_stringFromCharCode(41); + t2._contents += t1; + }, + _stylesheet0$_expressionUntilComparison$0() { + return this._stylesheet0$_expression$1$until(new A.StylesheetParser__expressionUntilComparison_closure0(this)); + }, + _stylesheet0$_supportsCondition$0() { + var condition, operator, right, endPosition, t3, t4, lowerOperator, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + condition = _this._stylesheet0$_supportsConditionInParens$0(); + _this.whitespace$0(); + for (operator = null; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("or")) + operator = "or"; + else { + _this.expectIdentifier$1("and"); + operator = "and"; + } + _this.whitespace$0(); + right = _this._stylesheet0$_supportsConditionInParens$0(); + endPosition = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = new A._FileSpan(t3, t2, endPosition); + t4._FileSpan$3(t3, t2, endPosition); + condition = new A.SupportsOperation0(condition, right, operator, t4); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return condition; + }, + _stylesheet0$_supportsConditionInParens$0() { + var $name, nameStart, wasInParentheses, identifier, _1_0, operation, contents, identifier0, t2, $arguments, _0_0, _0_4_isSet, _0_4, _0_40, condition, exception, declaration, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + identifier0 = _this.interpolatedIdentifier$0(); + t2 = identifier0.get$asPlain(); + if ((t2 == null ? null : t2.toLowerCase()) === "not") + _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); + if (t1.scanChar$1(40)) { + $arguments = _this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); + t1.expectChar$1(41); + return new A.SupportsFunction0(identifier0, $arguments, t1.spanFrom$1(start)); + } else { + _0_0 = identifier0.contents; + _0_4_isSet = _0_0.length === 1; + _0_4 = null; + if (_0_4_isSet) { + _0_40 = _0_0[0]; + t2 = _0_40; + _0_4 = t2; + t2 = t2 instanceof A.Expression0; + } else + t2 = false; + if (t2) { + t2 = _0_4_isSet ? _0_4 : _0_0[0]; + return new A.SupportsInterpolation0(type$.Expression_2._as(t2), t1.spanFrom$1(start)); + } else + _this.error$2(0, "Expected @supports condition.", identifier0.span); + } + } + t1.expectChar$1(40); + _this.whitespace$0(); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$0(); + condition = _this._stylesheet0$_supportsConditionInParens$0(); + t1.expectChar$1(41); + return new A.SupportsNegation0(condition, t1.spanFrom$1(start)); + } else if (t1.peekChar$0() === 40) { + condition = _this._stylesheet0$_supportsCondition$0(); + t1.expectChar$1(41); + return condition; + } + $name = null; + nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + wasInParentheses = _this._stylesheet0$_inParentheses; + try { + $name = _this._stylesheet0$_expression$0(); + t1.expectChar$1(58); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(nameStart); + _this._stylesheet0$_inParentheses = wasInParentheses; + identifier = _this.interpolatedIdentifier$0(); + _1_0 = _this._stylesheet0$_trySupportsOperation$2(identifier, nameStart); + operation = null; + if (_1_0 != null) { + operation = _1_0; + t1.expectChar$1(41); + return operation; + } + t2 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object)); + t2.addInterpolation$1(identifier); + t2.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(false, true, true)); + contents = t2.interpolation$1(t1.spanFrom$1(nameStart)); + if (t1.peekChar$0() === 58) + throw exception; + t1.expectChar$1(41); + return new A.SupportsAnything0(contents, t1.spanFrom$1(start)); + } else + throw exception; + } + declaration = _this._stylesheet0$_supportsDeclarationValue$2($name, start); + t1.expectChar$1(41); + return declaration; + }, + _stylesheet0$_supportsDeclarationValue$2($name, start) { + var value, _this = this, + t1 = false; + if ($name instanceof A.StringExpression0) + if (!$name.hasQuotes) + t1 = B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); + if (t1) + value = new A.StringExpression0(_this._stylesheet0$_interpolatedDeclarationValue$0(), false); + else { + _this.whitespace$0(); + value = _this._stylesheet0$_expression$0(); + } + return new A.SupportsDeclaration0($name, value, _this.scanner.spanFrom$1(start)); + }, + _stylesheet0$_trySupportsOperation$2(interpolation, start) { + var expression, beforeWhitespace, t2, t3, operator, operation, right, t4, endPosition, t5, t6, lowerOperator, _this = this, _null = null, + t1 = interpolation.contents; + if (t1.length !== 1) + return _null; + expression = B.JSArray_methods.get$first(t1); + if (!(expression instanceof A.Expression0)) + return _null; + t1 = _this.scanner; + beforeWhitespace = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.whitespace$0(); + for (t2 = start.position, t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator); + else if (_this.scanIdentifier$1("and")) + operator = "and"; + else { + if (!_this.scanIdentifier$1("or")) { + if (beforeWhitespace._scanner !== t1) + A.throwExpression(A.ArgumentError$(string$.The_gi, _null)); + t2 = beforeWhitespace.position; + if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) + A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); + t1._string_scanner$_position = t2; + return t1._lastMatch = null; + } + operator = "or"; + } + _this.whitespace$0(); + right = _this._stylesheet0$_supportsConditionInParens$0(); + t4 = operation == null ? new A.SupportsInterpolation0(expression, t3) : operation; + endPosition = t1._string_scanner$_position; + t5 = t1._sourceFile; + t6 = new A._FileSpan(t5, t2, endPosition); + t6._FileSpan$3(t5, t2, endPosition); + operation = new A.SupportsOperation0(t4, right, operator, t6); + lowerOperator = operator.toLowerCase(); + if (lowerOperator !== "and" && lowerOperator !== "or") + A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); + _this.whitespace$0(); + } + return operation; + }, + _stylesheet0$_lookingAtInterpolatedIdentifier$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_1_0 == null) { + t1 = t2; + break $label0$0; + } + if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (35 === _1_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 == null) { + t1 = t2; + break $label1$1; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(2) === 123; + break $label1$1; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128 || 92 === _0_0 || 45 === _0_0) { + t1 = true; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _stylesheet0$_lookingAtPotentialPropertyHack$0() { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (58 === _0_0 || 42 === _0_0 || 46 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) !== 123; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _stylesheet0$_lookingAtInterpolatedIdentifierBody$0() { + var t2, t3, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_0_0 == null) { + t1 = t2; + break $label0$0; + } + if (!(_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128)) + t3 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t3 = true; + if (t3 || 92 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _stylesheet0$_lookingAtExpression$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = true; + if (_1_0 == null) { + t1 = false; + break $label0$0; + } + if (46 === _1_0) { + t1 = t1.peekChar$1(1) !== 46; + break $label0$0; + } + if (33 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 != null) + if (105 !== _0_0) + if (73 !== _0_0) + t1 = _0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12; + else + t1 = t2; + else + t1 = t2; + else + t1 = t2; + if (t1) + break $label1$1; + break $label1$1; + } + break $label0$0; + } + t1 = true; + if (40 !== _1_0) + if (47 !== _1_0) + if (91 !== _1_0) + if (39 !== _1_0) + if (34 !== _1_0) + if (35 !== _1_0) + if (43 !== _1_0) + if (45 !== _1_0) + if (92 !== _1_0) + if (36 !== _1_0) + if (38 !== _1_0) + if (!(_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128)) + t1 = _1_0 >= 48 && _1_0 <= 57; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _stylesheet0$_withChildren$1$3(child, start, create) { + var result = create.call$2(this.children$1(0, child), this.scanner.spanFrom$1(start)); + this.whitespaceWithoutComments$0(); + return result; + }, + _stylesheet0$_withChildren$3(child, start, create) { + return this._stylesheet0$_withChildren$1$3(child, start, create, type$.dynamic); + }, + _stylesheet0$_urlString$0() { + var innerError, stackTrace, t2, exception, + t1 = this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + url = this.string$0(); + try { + t2 = A.Uri_parse(url); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + if (type$.FormatException._is(t2)) { + innerError = t2; + stackTrace = A.getTraceFromException(exception); + this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), t1.spanFrom$1(start), stackTrace); + } else + throw exception; + } + }, + _stylesheet0$_publicIdentifier$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + result = _this.identifier$0(); + _this._stylesheet0$_assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure0(_this, new A._SpanScannerState(t1, t2))); + return result; + }, + _stylesheet0$_assertPublic$2(identifier, span) { + var first = identifier.charCodeAt(0); + if (!(first === 45 || first === 95)) + return; + this.error$2(0, string$.Privat, span.call$0()); + }, + _stylesheet0$_addOrInject$2(buffer, expression) { + if (expression instanceof A.StringExpression0 && !expression.hasQuotes) + buffer.addInterpolation$1(expression.text); + else { + buffer._interpolation_buffer0$_flushText$0(); + buffer._interpolation_buffer0$_contents.push(expression); + } + }, + get$plainCss() { + return false; + } + }; + A.StylesheetParser_parse_closure0.prototype = { + call$0() { + var statements, t4, + t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.scanChar$1(65279); + statements = t1.statements$1(new A.StylesheetParser_parse__closure1(t1)); + t2.expectDone$0(); + t4 = t1._stylesheet0$_globalVariables.get$values(0); + B.JSArray_methods.addAll$1(statements, A.MappedIterable_MappedIterable(t4, new A.StylesheetParser_parse__closure2(), A._instanceType(t4)._eval$1("Iterable.E"), type$.Statement_2)); + return A.Stylesheet$internal0(statements, t2.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.get$plainCss()); + }, + $signature: 589 + }; + A.StylesheetParser_parse__closure1.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.scan$1("@charset")) { + t1.whitespace$0(); + t1.string$0(); + return null; + } + return t1._stylesheet0$_statement$1$root(true); + }, + $signature: 590 + }; + A.StylesheetParser_parse__closure2.prototype = { + call$1(declaration) { + var t1 = declaration.expression; + return A.VariableDeclaration$0(declaration.name, new A.NullExpression0(t1.get$span(t1)), declaration.span, null, false, true, null); + }, + $signature: 591 + }; + A.StylesheetParser_parseArgumentDeclaration_closure0.prototype = { + call$0() { + var $arguments, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$2$name(64, "@-rule"); + t1.identifier$0(); + t1.whitespace$0(); + t1.identifier$0(); + $arguments = t1._stylesheet0$_argumentDeclaration$0(); + t1.whitespace$0(); + t2.expectChar$1(123); + return $arguments; + }, + $signature: 592 + }; + A.StylesheetParser__parseSingleProduction_closure0.prototype = { + call$0() { + var result = this.production.call$0(); + this.$this.scanner.expectDone$0(); + return result; + }, + $signature() { + return this.T._eval$1("0()"); + } + }; + A.StylesheetParser_parseSignature_closure.prototype = { + call$0() { + var $arguments, t2, t3, + t1 = this.$this, + $name = t1.identifier$0(); + if (this.requireParens || t1.scanner.peekChar$0() === 40) + $arguments = t1._stylesheet0$_argumentDeclaration$0(); + else { + t2 = t1.scanner; + t2 = A.FileLocation$_(t2._sourceFile, t2._string_scanner$_position); + t3 = t2.offset; + $arguments = new A.ArgumentDeclaration0(B.List_empty24, null, A._FileSpan$(t2.file, t3, t3)); + } + t1.scanner.expectDone$0(); + return new A._Record_2($name, $arguments); + }, + $signature: 593 + }; + A.StylesheetParser__statement_closure0.prototype = { + call$0() { + return this.$this._stylesheet0$_statement$0(); + }, + $signature: 135 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure1.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 30 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure2.prototype = { + call$0() { + return this.declaration; + }, + $signature: 594 + }; + A.StylesheetParser__styleRule_closure0.prototype = { + call$2(children, span) { + var _this = this, + t1 = _this.$this; + if (t1.get$indented() && children.length === 0) + t1.logger.warn$2$span(0, string$.This_s, _this._box_0.interpolation.span); + t1._stylesheet0$_inStyleRule = _this.wasInStyleRule; + return A.StyleRule$0(_this._box_0.interpolation, children, t1.scanner.spanFrom$1(_this.start)); + }, + $signature: 595 + }; + A.StylesheetParser__tryDeclarationChildren_closure0.prototype = { + call$2(children, span) { + return A.Declaration$nested0(this.name, children, span, this.value); + }, + $signature: 596 + }; + A.StylesheetParser__atRootRule_closure1.prototype = { + call$2(children, span) { + return A.AtRootRule$0(children, span, this.query); + }, + $signature: 265 + }; + A.StylesheetParser__atRootRule_closure2.prototype = { + call$2(children, span) { + return A.AtRootRule$0(children, span, null); + }, + $signature: 265 + }; + A.StylesheetParser__eachRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; + return A.EachRule$0(_this.variables, _this.list, children, span); + }, + $signature: 598 + }; + A.StylesheetParser__functionRule_closure0.prototype = { + call$2(children, span) { + return A.FunctionRule$0(this.name, this.$arguments, children, span, this.precedingComment); + }, + $signature: 599 + }; + A.StylesheetParser__forRule_closure1.prototype = { + call$0() { + var t1 = this.$this; + if (!t1.lookingAtIdentifier$0()) + return false; + if (t1.scanIdentifier$1("to")) + return this._box_0.exclusive = true; + else if (t1.scanIdentifier$1("through")) { + this._box_0.exclusive = false; + return true; + } else + return false; + }, + $signature: 23 + }; + A.StylesheetParser__forRule_closure2.prototype = { + call$2(children, span) { + var t1, _this = this; + _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; + t1 = _this._box_0.exclusive; + t1.toString; + return A.ForRule$0(_this.variable, _this.from, _this.to, children, span, t1); + }, + $signature: 600 + }; + A.StylesheetParser__memberList_closure0.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.peekChar$0() === 36) + this.variables.add$1(0, t1.variableName$0()); + else + this.identifiers.add$1(0, t1.identifier$1$normalize(true)); + }, + $signature: 1 + }; + A.StylesheetParser__includeRule_closure0.prototype = { + call$2(children, span) { + return A.ContentBlock$0(this.contentArguments_, children, span); + }, + $signature: 601 + }; + A.StylesheetParser_mediaRule_closure0.prototype = { + call$2(children, span) { + return A.MediaRule$0(this.query, children, span); + }, + $signature: 602 + }; + A.StylesheetParser__mixinRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet0$_inMixin = false; + return A.MixinRule$0(_this.name, _this.$arguments, children, span, _this.precedingComment); + }, + $signature: 603 + }; + A.StylesheetParser_mozDocumentRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + if (_this._box_0.needsDeprecationWarning) + A.WarnForDeprecation_warnForDeprecation0(_this.$this.logger, B.Deprecation_Iit, string$.x40_moz_, span, null); + return A.AtRule$0(_this.name, span, children, _this.value); + }, + $signature: 266 + }; + A.StylesheetParser_supportsRule_closure0.prototype = { + call$2(children, span) { + return A.SupportsRule$0(this.condition, children, span); + }, + $signature: 605 + }; + A.StylesheetParser__whileRule_closure0.prototype = { + call$2(children, span) { + this.$this._stylesheet0$_inControlDirective = this.wasInControlDirective; + return A.WhileRule$0(this.condition, children, span); + }, + $signature: 606 + }; + A.StylesheetParser_unknownAtRule_closure0.prototype = { + call$2(children, span) { + return A.AtRule$0(this.name, span, children, this._box_0.value); + }, + $signature: 266 + }; + A.StylesheetParser__expression_resetState0.prototype = { + call$0() { + var t2, + t1 = this._box_0; + t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; + t2 = this.$this; + t2.scanner.set$state(this.start); + t1.allowSlash = true; + t1.singleExpression_ = t2._stylesheet0$_singleExpression$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOneOperation0.prototype = { + call$0() { + var t2, t3, t4, t5, t6, t7, _this = this, + t1 = _this._box_0, + operator = t1.operators_.pop(), + left = t1.operands_.pop(), + right = t1.singleExpression_; + if (right == null) { + t2 = _this.$this.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); + } + if (t1.allowSlash) { + t2 = _this.$this; + t2 = !t2._stylesheet0$_inParentheses && operator === B.BinaryOperator_U770 && t2._stylesheet0$_isSlashOperand$1(left) && t2._stylesheet0$_isSlashOperand$1(right); + } else + t2 = false; + if (t2) + t1.singleExpression_ = new A.BinaryOperationExpression0(B.BinaryOperator_U770, left, right, true); + else { + t1.singleExpression_ = new A.BinaryOperationExpression0(operator, left, right, false); + t2 = t1.allowSlash = false; + if (B.BinaryOperator_u150 === operator || B.BinaryOperator_SjO0 === operator) { + t3 = _this.$this; + t4 = t3.scanner.string; + t5 = right.get$span(right); + t5 = t5.get$start(t5); + t6 = right.get$span(right); + t7 = operator.operator; + if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { + t2 = left.get$span(left); + t2 = t4.charCodeAt(t2.get$end(t2).offset); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } + if (t2) { + t2 = left.toString$0(0); + t4 = right.toString$0(0); + t5 = left.toString$0(0); + t6 = right.toString$0(0); + t1 = t1.singleExpression_; + A.WarnForDeprecation_warnForDeprecation0(t3.logger, B.Deprecation_woc, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, t1.get$span(t1), null); + } + } + } + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOperations0.prototype = { + call$0() { + var t1, + operators = this._box_0.operators_; + if (operators == null) + return; + for (t1 = this.resolveOneOperation; operators.length !== 0;) + t1.call$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_addSingleExpression0.prototype = { + call$1(expression) { + var t2, spaceExpressions, _this = this, + t1 = _this._box_0; + if (t1.singleExpression_ != null) { + t2 = _this.$this; + if (t2._stylesheet0$_inParentheses) { + t2._stylesheet0$_inParentheses = false; + if (t1.allowSlash) { + _this.resetState.call$0(); + return; + } + } + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression_2); + _this.resolveOperations.call$0(); + t2 = t1.singleExpression_; + t2.toString; + spaceExpressions.push(t2); + t1.allowSlash = true; + } + t1.singleExpression_ = expression; + }, + $signature: 607 + }; + A.StylesheetParser__expression_addOperator0.prototype = { + call$1(operator) { + var t2, t3, operators, operands, t4, singleExpression, + t1 = this.$this; + if (t1.get$plainCss() && operator !== B.BinaryOperator_wdM0 && operator !== B.BinaryOperator_u150 && operator !== B.BinaryOperator_SjO0 && operator !== B.BinaryOperator_2No0 && operator !== B.BinaryOperator_U770) { + t2 = t1.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); + } + t2 = this._box_0; + t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_U770; + operators = t2.operators_; + if (operators == null) + operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator_2); + operands = t2.operands_; + if (operands == null) + operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression_2); + t3 = this.resolveOneOperation; + t4 = operator.precedence; + while (true) { + if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) + break; + t3.call$0(); + } + operators.push(operator); + singleExpression = t2.singleExpression_; + if (singleExpression == null) { + t3 = t1.scanner; + t4 = operator.operator.length; + t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); + } + operands.push(singleExpression); + t1.whitespace$0(); + t2.singleExpression_ = t1._stylesheet0$_singleExpression$0(); + }, + $signature: 608 + }; + A.StylesheetParser__expression_resolveSpaceExpressions0.prototype = { + call$0() { + var t1, spaceExpressions, singleExpression, t2; + this.resolveOperations.call$0(); + t1 = this._box_0; + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + return; + singleExpression = t1.singleExpression_; + if (singleExpression == null) + this.$this.scanner.error$1(0, "Expected expression."); + spaceExpressions.push(singleExpression); + t2 = B.JSArray_methods.get$first(spaceExpressions); + t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); + t1.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_nbm0, false, t2); + t1.spaceExpressions_ = null; + }, + $signature: 0 + }; + A.StylesheetParser_expressionUntilComma_closure0.prototype = { + call$0() { + return this.$this.scanner.peekChar$0() === 44; + }, + $signature: 23 + }; + A.StylesheetParser__isHexColor_closure0.prototype = { + call$1(char) { + return A.CharacterExtension_get_isHex0(char); + }, + $signature: 50 + }; + A.StylesheetParser__unicodeRange_closure1.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex0(char); + }, + $signature: 32 + }; + A.StylesheetParser__unicodeRange_closure2.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex0(char); + }, + $signature: 32 + }; + A.StylesheetParser_namespacedExpression_closure0.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 30 + }; + A.StylesheetParser_trySpecialFunction_closure0.prototype = { + call$1(contents) { + return new A.StringExpression0(contents, false); + }, + $signature: 609 + }; + A.StylesheetParser__expressionUntilComparison_closure0.prototype = { + call$0() { + var t1 = this.$this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (61 === _0_0) { + t1 = t1.peekChar$1(1) !== 61; + break $label0$0; + } + if (60 === _0_0 || 62 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 23 + }; + A.StylesheetParser__publicIdentifier_closure0.prototype = { + call$0() { + return this.$this.scanner.spanFrom$1(this.start); + }, + $signature: 30 + }; + A.Stylesheet0.prototype = { + Stylesheet$internal$3$plainCss0(children, span, plainCss) { + var t1, t2, t3, t4, _i, child; + for (t1 = this.children, t2 = t1.length, t3 = this._stylesheet1$_forwards, t4 = this._stylesheet1$_uses, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + if (child instanceof A.UseRule0) { + t4.push(child); + continue; + } + if (child instanceof A.ForwardRule0) { + t3.push(child); + continue; + } + if (child instanceof A.SilentComment0 || child instanceof A.LoudComment0 || child instanceof A.VariableDeclaration0) + continue; + break; + } + }, + accept$1$1(visitor) { + return visitor.visitStylesheet$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return (t1 && B.JSArray_methods).join$1(t1, " "); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsExpression0.prototype = { + get$span(_) { + var t1 = this.condition; + return t1.get$span(t1); + }, + accept$1$1(visitor) { + return visitor.visitSupportsExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.condition.toString$0(0); + } + }; + A.ModifiableCssSupportsRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssSupportsRule0) { + t1 = this.condition; + t2 = other.condition; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value); + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssSupportsRule$0(this.condition, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitSupportsRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@supports " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.JSToDartImporter.prototype = { + canonicalize$1(_, url) { + var t1, + result = A.wrapJSExceptions(new A.JSToDartImporter_canonicalize_closure(this, url)); + if (result == null) + return null; + t1 = self.URL; + if (result instanceof t1) + return A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The canonicalize() function can't return a Promise for synchronous compile functions.")); + else + A.jsThrow(new self.Error(string$.The_ca)); + }, + load$1(_, url) { + var t1, contents, syntax, t2, + result = A.wrapJSExceptions(new A.JSToDartImporter_load_closure(this, url)); + if (result == null) + return null; + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The load() function can't return a Promise for synchronous compile functions.")); + type$.JSImporterResult._as(result); + t1 = J.getInterceptor$x(result); + contents = t1.get$contents(result); + if (A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") + A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); + syntax = t1.get$syntax(result); + if (contents == null || syntax == null) + A.jsThrow(new self.Error(string$.The_lo)); + t2 = A.parseSyntax(syntax); + return A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils3__jsToDartUrl$closure()), t2); + }, + isNonCanonicalScheme$1(scheme) { + return this._sync$_nonCanonicalSchemes.contains$1(0, scheme); + } + }; + A.JSToDartImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._sync$_canonicalize.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 35 + }; + A.JSToDartImporter_load_closure.prototype = { + call$0() { + return this.$this._sync$_load.call$1(new self.URL(this.url.toString$0(0))); + }, + $signature: 35 + }; + A.Syntax0.prototype = { + _enumToString$0() { + return "Syntax." + this._name; + }, + toString$0(_) { + return this._syntax0$_name; + } + }; + A.TypeSelector0.prototype = { + get$specificity() { + return 1; + }, + accept$1$1(visitor) { + return visitor.visitTypeSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + var t1 = this.name; + return new A.TypeSelector0(new A.QualifiedName0(t1.name + suffix, t1.namespace), this.span); + }, + unify$1(compound) { + var unified, t1, + _0_0 = B.JSArray_methods.get$first(compound); + if (_0_0 instanceof A.UniversalSelector0 || _0_0 instanceof A.TypeSelector0) { + unified = A.unifyUniversalAndElement0(this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + t1 = A._setArrayType([this], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + }, + isSuperselector$1(other) { + var t1, t2, t3; + if (!this.super$SimpleSelector$isSuperselector0(other)) { + t1 = false; + if (other instanceof A.TypeSelector0) { + t2 = this.name; + t3 = other.name; + if (t2.name === t3.name) { + t1 = t2.namespace; + t1 = t1 === "*" || t1 == t3.namespace; + } + } + } else + t1 = true; + return t1; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.TypeSelector0 && other.name.$eq(0, this.name); + }, + get$hashCode(_) { + var t1 = this.name; + return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); + } + }; + A.Types.prototype = {}; + A.UnaryOperationExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitUnaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var operand, + t1 = this.operator, + t2 = t1.operator; + t1 = t1 === B.UnaryOperator_not_not_not0 ? t2 + A.Primitives_stringFromCharCode(32) : t2; + operand = this.operand; + $label0$0: { + t2 = true; + if (!(operand instanceof A.BinaryOperationExpression0)) + if (!(operand instanceof A.UnaryOperationExpression0)) + t2 = operand instanceof A.ListExpression0 && !operand.hasBrackets && operand.contents.length >= 2; + if (t2) + break $label0$0; + break $label0$0; + } + if (t2) + t1 += "40"; + t1 += operand.toString$0(0); + if (t2) + t1 += "41"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.UnaryOperator0.prototype = { + _enumToString$0() { + return "UnaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.UnitlessSassNumber0.prototype = { + get$numeratorUnits(_) { + return B.List_empty; + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return false; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.UnitlessSassNumber0(value, null); + }, + withSlash$2(numerator, denominator) { + return new A.UnitlessSassNumber0(this._number1$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return false; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber0; + }, + hasPossiblyCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber0; + }, + compatibleWithUnit$1(unit) { + return true; + }, + coerceToMatch$3(other, $name, otherName) { + return other.withValue$1(this._number1$_value); + }, + coerceToMatch$1(other) { + return this.coerceToMatch$3(other, null, null); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number1$_value; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertToMatch(other, $name, otherName) : this; + }, + convertValueToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : this._number1$_value; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits0(this._number1$_value, newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number1$_value; + }, + coerceValueToUnit$2(unit, $name) { + return this._number1$_value; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + greaterThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 > t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$greaterThan0(other); + }, + greaterThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 > t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$greaterThanOrEquals0(other); + }, + lessThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 < t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$lessThan0(other); + }, + lessThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 < t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$lessThanOrEquals0(other); + }, + modulo$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(A.moduloLikeSass0(this._number1$_value, other._number1$_value)); + return this.super$SassNumber$modulo0(other); + }, + plus$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value + other._number1$_value); + return this.super$SassNumber$plus0(other); + }, + minus$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value - other._number1$_value); + return this.super$SassNumber$minus0(other); + }, + times$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value * other._number1$_value); + return this.super$SassNumber$times0(other); + }, + dividedBy$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value / other._number1$_value; + if (other.get$hasUnits()) { + t2 = other.get$denominatorUnits(other); + t2 = A.SassNumber_SassNumber$withUnits0(t1, other.get$numeratorUnits(other), t2); + t1 = t2; + } else + t1 = new A.UnitlessSassNumber0(t1, null); + return t1; + } + return this.super$SassNumber$dividedBy0(other); + }, + unaryMinus$0() { + return new A.UnitlessSassNumber0(-this._number1$_value, null); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UnitlessSassNumber0 && A.fuzzyEquals0(this._number1$_value, other._number1$_value); + }, + get$hashCode(_) { + var t1 = this.hashCache; + return t1 == null ? this.hashCache = A.fuzzyHashCode0(this._number1$_value) : t1; + } + }; + A.UniversalSelector0.prototype = { + get$specificity() { + return 0; + }, + accept$1$1(visitor) { + return visitor.visitUniversalSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + var _0_40, t1, rest, unified, t2, _this = this, _null = null, + _0_1 = compound.length, + _0_4_isSet = _0_1 >= 1, + _0_4 = _null; + if (_0_4_isSet) { + _0_40 = compound[0]; + t1 = _0_40; + _0_4 = t1; + if (!(t1 instanceof A.UniversalSelector0)) + t1 = _0_4 instanceof A.TypeSelector0; + else + t1 = true; + rest = t1 ? B.JSArray_methods.sublist$1(compound, 1) : _null; + } else { + rest = _null; + t1 = false; + } + if (t1) { + unified = A.unifyUniversalAndElement0(_this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return _null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, rest); + return t1; + } + t1 = false; + if (_0_1 === 1) { + if (_0_4_isSet) + t2 = _0_4; + else { + _0_4 = compound[0]; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2 instanceof A.PseudoSelector0) { + t2 = _0_4_isSet ? _0_4 : compound[0]; + type$.PseudoSelector_2._as(t2); + t1 = t2.isClass && t2.name === "host" || t2.get$isHostContext(); + } + } + if (t1) + return _null; + if (_0_1 <= 0) + return A._setArrayType([_this], type$.JSArray_SimpleSelector_2); + t1 = _this.namespace; + if (t1 == null || t1 === "*") + t1 = compound; + else { + t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, compound); + } + return t1; + }, + isSuperselector$1(other) { + var t1 = this.namespace; + if (t1 === "*") + return true; + if (other instanceof A.TypeSelector0) + return t1 == other.name.namespace; + if (other instanceof A.UniversalSelector0) + return t1 == other.namespace; + return t1 == null || this.super$SimpleSelector$isSuperselector0(other); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UniversalSelector0 && other.namespace == this.namespace; + }, + get$hashCode(_) { + return J.get$hashCode$(this.namespace); + } + }; + A.UnprefixedMapView0.prototype = { + get$keys(_) { + return new A._UnprefixedKeys0(this); + }, + $index(_, key) { + return typeof key == "string" ? this._unprefixed_map_view0$_map.$index(0, this._unprefixed_map_view0$_prefix + key) : null; + }, + containsKey$1(key) { + return typeof key == "string" && this._unprefixed_map_view0$_map.containsKey$1(this._unprefixed_map_view0$_prefix + key); + }, + remove$1(_, key) { + return typeof key == "string" ? this._unprefixed_map_view0$_map.remove$1(0, this._unprefixed_map_view0$_prefix + key) : null; + } + }; + A._UnprefixedKeys0.prototype = { + get$iterator(_) { + var t1 = this._unprefixed_map_view0$_view._unprefixed_map_view0$_map; + t1 = J.where$1$ax(t1.get$keys(t1), new A._UnprefixedKeys_iterator_closure1(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure2(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._unprefixed_map_view0$_view.containsKey$1(key); + } + }; + A._UnprefixedKeys_iterator_closure1.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix); + }, + $signature: 5 + }; + A._UnprefixedKeys_iterator_closure2.prototype = { + call$1(key) { + return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix.length); + }, + $signature: 6 + }; + A.JSUrl0.prototype = {}; + A.UseRule0.prototype = { + UseRule$4$configuration0(url, namespace, span, configuration) { + var t1, t2, _i, variable; + for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (variable.isGuarded) + throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); + } + }, + accept$1$1(visitor) { + return visitor.visitUseRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.url, + t2 = "@use " + A.StringExpression_quoteText0(t1.toString$0(0)), + basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = this.namespace; + if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) + t1 = t2 + (" as " + (t1 == null ? "*" : t1)); + else + t1 = t2; + t2 = this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.UserDefinedCallable0.prototype = { + get$name(_) { + return this.declaration.name; + }, + $isAsyncCallable0: 1, + $isCallable: 1 + }; + A.resolveImportPath_closure1.prototype = { + call$0() { + return A._exactlyOne0(A._tryPath0($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); + }, + $signature: 49 + }; + A.resolveImportPath_closure2.prototype = { + call$0() { + return A._exactlyOne0(A._tryPathWithExtensions0(this.path + ".import")); + }, + $signature: 49 + }; + A._tryPathAsDirectory_closure0.prototype = { + call$0() { + return A._exactlyOne0(A._tryPathWithExtensions0(A.join(this.path, "index.import", null))); + }, + $signature: 49 + }; + A._exactlyOne_closure0.prototype = { + call$1(path) { + var t1 = $.$get$context(); + return " " + t1.prettyUri$1(t1.toUri$1(path)); + }, + $signature: 6 + }; + A._PropertyDescriptor0.prototype = {}; + A.futureToPromise_closure0.prototype = { + call$2(resolve, reject) { + this.future.then$1$2$onError(0, new A.futureToPromise__closure0(resolve), new A.futureToPromise__closure1(reject), type$.void); + }, + $signature: 610 + }; + A.futureToPromise__closure0.prototype = { + call$1(result) { + return this.resolve.call$1(result); + }, + $signature: 34 + }; + A.futureToPromise__closure1.prototype = { + call$2(error, stackTrace) { + A.attachTrace0(error, stackTrace); + this.reject.call$1(error); + }, + $signature: 55 + }; + A.objectToMap_closure.prototype = { + call$2(key, value) { + this.map.$indexSet(0, key, value); + return value; + }, + $signature: 125 + }; + A._RequireMain0.prototype = {}; + A.indent_closure0.prototype = { + call$1(line) { + return B.JSString_methods.$mul(" ", this.indentation) + line; + }, + $signature: 6 + }; + A.flattenVertically_closure1.prototype = { + call$1(inner) { + return A.QueueList_QueueList$from(inner, this.T); + }, + $signature() { + return this.T._eval$1("QueueList<0>(Iterable<0>)"); + } + }; + A.flattenVertically_closure2.prototype = { + call$1(queue) { + this.result.push(queue.removeFirst$0()); + return queue.get$length(0) === 0; + }, + $signature() { + return this.T._eval$1("bool(QueueList<0>)"); + } + }; + A.longestCommonSubsequence_backtrack0.prototype = { + call$2(i, j) { + var selection, t1, _this = this; + if (i === -1 || j === -1) + return A._setArrayType([], _this.T._eval$1("JSArray<0>")); + selection = _this.selections[i][j]; + if (selection != null) { + t1 = _this.call$2(i - 1, j - 1); + J.add$1$ax(t1, selection); + return t1; + } + t1 = _this.lengths; + return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); + }, + $signature() { + return this.T._eval$1("List<0>(int,int)"); + } + }; + A.mapAddAll2_closure0.prototype = { + call$2(key, inner) { + var t1 = this.destination, + _0_0 = t1.$index(0, key); + if (_0_0 != null) + _0_0.addAll$1(0, inner); + else + t1.$indexSet(0, key, inner); + }, + $signature() { + return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); + } + }; + A.CssValue0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && J.$eq$(other.value, this.value); + }, + get$hashCode(_) { + return J.get$hashCode$(this.value); + }, + toString$0(_) { + return J.toString$0$(this.value); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ValueExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitValueExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.value.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.valueClass_closure.prototype = { + call$0() { + var t2, + t1 = type$.JSClass, + jsClass = t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(B.C__SassNull0.constructor))).constructor); + A.JSClassExtension_setCustomInspect(jsClass, new A.valueClass__closure()); + t1 = type$.String; + t2 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["asList", new A.valueClass__closure0(), "hasBrackets", new A.valueClass__closure1(), "isTruthy", new A.valueClass__closure2(), "realNull", new A.valueClass__closure3(), "separator", new A.valueClass__closure4()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["sassIndexToListIndex", new A.valueClass__closure5(), "get", new A.valueClass__closure6(), "assertBoolean", new A.valueClass__closure7(), "assertCalculation", new A.valueClass__closure8(), "assertColor", new A.valueClass__closure9(), "assertFunction", new A.valueClass__closure10(), "assertMap", new A.valueClass__closure11(), "assertMixin", new A.valueClass__closure12(), "assertNumber", new A.valueClass__closure13(), "assertString", new A.valueClass__closure14(), "tryMap", new A.valueClass__closure15(), "equals", new A.valueClass__closure16(), "hashCode", new A.valueClass__closure17(), "toString", new A.valueClass__closure18()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + return jsClass; + }, + $signature: 15 + }; + A.valueClass__closure.prototype = { + call$1($self) { + return J.toString$0$($self); + }, + $signature: 118 + }; + A.valueClass__closure0.prototype = { + call$1($self) { + return new self.immutable.List($self.get$asList()); + }, + $signature: 611 + }; + A.valueClass__closure1.prototype = { + call$1($self) { + return $self.get$hasBrackets(); + }, + $signature: 54 + }; + A.valueClass__closure2.prototype = { + call$1($self) { + return $self.get$isTruthy(); + }, + $signature: 54 + }; + A.valueClass__closure3.prototype = { + call$1($self) { + return $self.get$realNull(); + }, + $signature: 236 + }; + A.valueClass__closure4.prototype = { + call$1($self) { + return $self.get$separator($self).separator; + }, + $signature: 612 + }; + A.valueClass__closure5.prototype = { + call$3($self, sassIndex, $name) { + return $self.sassIndexToListIndex$2(sassIndex, $name); + }, + call$2($self, sassIndex) { + return this.call$3($self, sassIndex, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 613 + }; + A.valueClass__closure6.prototype = { + call$2($self, index) { + return index < 1 && index >= -1 ? $self : self.undefined; + }, + $signature: 245 + }; + A.valueClass__closure7.prototype = { + call$2($self, $name) { + return $self.assertBoolean$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 614 + }; + A.valueClass__closure8.prototype = { + call$2($self, $name) { + return $self.assertCalculation$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 615 + }; + A.valueClass__closure9.prototype = { + call$2($self, $name) { + return $self.assertColor$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 616 + }; + A.valueClass__closure10.prototype = { + call$2($self, $name) { + return $self.assertFunction$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 617 + }; + A.valueClass__closure11.prototype = { + call$2($self, $name) { + return $self.assertMap$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 618 + }; + A.valueClass__closure12.prototype = { + call$2($self, $name) { + return $self.assertMixin$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 619 + }; + A.valueClass__closure13.prototype = { + call$2($self, $name) { + return $self.assertNumber$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 620 + }; + A.valueClass__closure14.prototype = { + call$2($self, $name) { + return $self.assertString$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 621 + }; + A.valueClass__closure15.prototype = { + call$1($self) { + return $self.tryMap$0(); + }, + $signature: 622 + }; + A.valueClass__closure16.prototype = { + call$2($self, other) { + return $self.$eq(0, other); + }, + $signature: 623 + }; + A.valueClass__closure17.prototype = { + call$2($self, _) { + return $self.get$hashCode($self); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 624 + }; + A.valueClass__closure18.prototype = { + call$1($self) { + return $self.toString$0(0); + }, + $signature: 223 + }; + A.Value0.prototype = { + get$isTruthy() { + return true; + }, + get$separator(_) { + return B.ListSeparator_undecided_null_undecided0; + }, + get$hasBrackets() { + return false; + }, + get$asList() { + return A._setArrayType([this], type$.JSArray_Value_2); + }, + get$lengthAsList() { + return 1; + }, + get$isBlank() { + return false; + }, + get$isSpecialNumber() { + return false; + }, + get$isVar() { + return false; + }, + get$realNull() { + return this; + }, + sassIndexToListIndex$2(sassIndex, $name) { + var t1, index, + indexValue = sassIndex.assertNumber$1($name); + if (indexValue.get$hasUnits()) { + t1 = indexValue.get$unitString(); + A.warnForDeprecation0("$" + A.S($name) + ": Passing a number with unit " + t1 + string$.x20is_de + indexValue.unitSuggestion$1($name == null ? "index" : $name) + string$.x0a_Morex3af, B.Deprecation_oCX); + } + index = indexValue.assertInt$1($name); + if (index === 0) + throw A.wrapException(A.SassScriptException$0("List index may not be 0.", $name)); + if (Math.abs(index) > this.get$lengthAsList()) + throw A.wrapException(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); + return index < 0 ? this.get$lengthAsList() + index : index - 1; + }, + assertBoolean$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a boolean.", $name)); + }, + assertCalculation$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a calculation.", $name)); + }, + assertColor$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a color.", $name)); + }, + assertFunction$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a function reference.", $name)); + }, + assertMixin$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a mixin reference.", $name)); + }, + assertMap$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a map.", $name)); + }, + tryMap$0() { + return null; + }, + assertNumber$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a number.", $name)); + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertString$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a string.", $name)); + }, + assertCommonListStyle$2$allowSlash($name, allowSlash) { + var invalidSeparator, buffer, t1, _this = this, + _s8_ = "Expected"; + if (_this.get$separator(_this) !== B.ListSeparator_ECn0) + invalidSeparator = !allowSlash && _this.get$separator(_this) === B.ListSeparator_cQA0; + else + invalidSeparator = true; + if (!invalidSeparator && !_this.get$hasBrackets()) + return _this.get$asList(); + buffer = new A.StringBuffer(_s8_); + if (_this.get$hasBrackets()) { + t1 = "Expected" + " an unbracketed"; + buffer._contents = t1; + } else + t1 = _s8_; + if (invalidSeparator) { + t1 += _this.get$hasBrackets() ? "," : " a"; + buffer._contents = t1; + t1 = buffer._contents = t1 + " space-"; + t1 = buffer._contents = (allowSlash ? buffer._contents = t1 + " or slash-" : t1) + "separated"; + } + buffer._contents = t1 + (" list, was " + _this.toString$0(0)); + throw A.wrapException(A.SassScriptException$0(buffer.toString$0(0), $name)); + }, + _value$_selectorString$1($name) { + var _0_0 = this._value$_selectorStringOrNull$0(); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + string$.x20is_noav, $name)); + }, + _value$_selectorStringOrNull$0() { + var t1, t2, result, _1_0, _i, complex, string, compound, _this = this, _null = null; + if (_this instanceof A.SassString0) + return _this._string0$_text; + if (!(_this instanceof A.SassList0)) + return _null; + t1 = _this._list1$_contents; + t2 = t1.length; + if (t2 === 0) + return _null; + result = A._setArrayType([], type$.JSArray_String); + $label0$1: { + _1_0 = _this._list1$_separator; + if (B.ListSeparator_ECn0 === _1_0) { + for (_i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex instanceof A.SassString0) { + result.push(complex._string0$_text); + continue; + } + if (complex instanceof A.SassList0 && B.ListSeparator_nbm0 === complex._list1$_separator) { + string = complex._value$_selectorStringOrNull$0(); + if (string == null) + return _null; + result.push(string); + continue; + } + return _null; + } + break $label0$1; + } + if (B.ListSeparator_cQA0 === _1_0) + return _null; + for (_i = 0; _i < t2; ++_i) { + compound = t1[_i]; + if (!(compound instanceof A.SassString0)) + return _null; + result.push(compound._string0$_text); + } + break $label0$1; + } + return B.JSArray_methods.join$1(result, _1_0 === B.ListSeparator_ECn0 ? ", " : " "); + }, + withListContents$2$separator(contents, separator) { + var t1 = separator == null ? this.get$separator(this) : separator, + t2 = this.get$hasBrackets(); + return A.SassList$0(contents, t1, t2); + }, + withListContents$1(contents) { + return this.withListContents$2$separator(contents, null); + }, + greaterThan$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var t1; + $label0$0: { + if (other instanceof A.SassString0) { + t1 = new A.SassString0(A.serializeValue0(this, false, true) + other._string0$_text, other._string0$_hasQuotes); + break $label0$0; + } + if (other instanceof A.SassCalculation0) + A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + t1 = new A.SassString0(A.serializeValue0(this, false, true) + A.serializeValue0(other, false, true), false); + break $label0$0; + } + return t1; + }, + minus$1(other) { + return other instanceof A.SassCalculation0 ? A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)) : new A.SassString0(A.serializeValue0(this, false, true) + "-" + A.serializeValue0(other, false, true), false); + }, + dividedBy$1(other) { + return new A.SassString0(A.serializeValue0(this, false, true) + "/" + A.serializeValue0(other, false, true), false); + }, + unaryPlus$0() { + return new A.SassString0("+" + A.serializeValue0(this, false, true), false); + }, + unaryMinus$0() { + return new A.SassString0("-" + A.serializeValue0(this, false, true), false); + }, + unaryNot$0() { + return B.SassBoolean_false0; + }, + withoutSlash$0() { + return this; + }, + toString$0(_) { + return A.serializeValue0(this, true, true); + } + }; + A.VariableExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.span; + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); + }, + get$span(receiver) { + return this.span; + } + }; + A.VariableDeclaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? "" + (t1 + ".") : ""; + t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.WarnRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitWarnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@warn " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.WhileRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitWhileRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.children; + return "@while " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.XyzD50ColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var f0, f1, f2, lightness, a, b, t1, _this = this, _null = null; + if (B.LabColorSpace_IF20 === dest || B.LchColorSpace_wv80 === dest) { + f0 = _this._xyz_d50$_convertComponentToLabF$1((x == null ? 0 : x) / 0.9642956764295677); + f1 = _this._xyz_d50$_convertComponentToLabF$1((y == null ? 0 : y) / 1); + f2 = _this._xyz_d50$_convertComponentToLabF$1((z == null ? 0 : z) / 0.8251046025104602); + lightness = missingLightness ? _null : 116 * f1 - 16; + a = 500 * (f0 - f1); + b = 200 * (f1 - f2); + if (dest === B.LabColorSpace_IF20) { + t1 = missingA ? _null : a; + t1 = A.SassColor$_forSpace0(B.LabColorSpace_IF20, lightness, t1, missingB ? _null : b, alpha, _null); + } else + t1 = A.labToLch0(B.LchColorSpace_wv80, lightness, a, b, alpha, missingChroma, missingHue); + return t1; + } + return _this.super$ColorSpace$convertLinear0(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, x, y, z, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, false, false, false, false, false); + }, + _xyz_d50$_convertComponentToLabF$1(component) { + return component > 0.008856451679035631 ? Math.pow(component, 0.3333333333333333) + 0 : (903.2962962962963 * component + 16) / 116; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { + t1 = $.$get$xyzD50ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$xyzD50ToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$xyzD50ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$xyzD50ToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$xyzD50ToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_4CA0 === dest) { + t1 = $.$get$xyzD50ToXyzD650(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$xyzD50ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.XyzD65ColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { + t1 = $.$get$xyzD65ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_bdu0 === dest) { + t1 = $.$get$xyzD65ToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_KiG0 === dest) { + t1 = $.$get$xyzD65ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_NQk0 === dest) { + t1 = $.$get$xyzD65ToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_2jN0 === dest) { + t1 = $.$get$xyzD65ToLinearRec20200(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2No0 === dest) { + t1 = $.$get$xyzD65ToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_8I80 === dest) { + t1 = $.$get$xyzD65ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + (function aliases() { + var _ = J.LegacyJavaScriptObject.prototype; + _.super$LegacyJavaScriptObject$toString = _.toString$0; + _ = A.JsLinkedHashMap.prototype; + _.super$JsLinkedHashMap$internalContainsKey = _.internalContainsKey$1; + _.super$JsLinkedHashMap$internalGet = _.internalGet$1; + _.super$JsLinkedHashMap$internalSet = _.internalSet$2; + _.super$JsLinkedHashMap$internalRemove = _.internalRemove$1; + _ = A._BufferingStreamSubscription.prototype; + _.super$_BufferingStreamSubscription$_add = _._async$_add$1; + _.super$_BufferingStreamSubscription$_addError = _._addError$2; + _ = A.ListBase.prototype; + _.super$ListBase$setRange = _.setRange$4; + _ = A.Iterable.prototype; + _.super$Iterable$where = _.where$1; + _.super$Iterable$skipWhile = _.skipWhile$1; + _ = A.ModifiableCssParentNode.prototype; + _.super$ModifiableCssParentNode$addChild = _.addChild$1; + _ = A.SimpleSelector.prototype; + _.super$SimpleSelector$addSuffix = _.addSuffix$1; + _.super$SimpleSelector$unify = _.unify$1; + _.super$SimpleSelector$isSuperselector = _.isSuperselector$1; + _ = A.Parser.prototype; + _.super$Parser$silentComment = _.silentComment$0; + _ = A.StylesheetParser.prototype; + _.super$StylesheetParser$importArgument = _.importArgument$0; + _.super$StylesheetParser$namespacedExpression = _.namespacedExpression$2; + _ = A.Value.prototype; + _.super$Value$assertMap = _.assertMap$1; + _.super$Value$plus = _.plus$1; + _.super$Value$minus = _.minus$1; + _.super$Value$dividedBy = _.dividedBy$1; + _.super$Value$toString = _.toString$0; + _ = A.ColorSpace.prototype; + _.super$ColorSpace$convert = _.convert$5; + _.super$ColorSpace$convertLinear = _.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness; + _.super$ColorSpace$transformationMatrix = _.transformationMatrix$1; + _ = A.SassNumber.prototype; + _.super$SassNumber$convertValueToMatch = _.convertValueToMatch$3; + _.super$SassNumber$coerce = _.coerce$3; + _.super$SassNumber$coerceValue = _.coerceValue$3; + _.super$SassNumber$coerceValueToUnit = _.coerceValueToUnit$2; + _.super$SassNumber$coerceToMatch = _.coerceToMatch$3; + _.super$SassNumber$coerceValueToMatch = _.coerceValueToMatch$3; + _.super$SassNumber$greaterThan = _.greaterThan$1; + _.super$SassNumber$greaterThanOrEquals = _.greaterThanOrEquals$1; + _.super$SassNumber$lessThan = _.lessThan$1; + _.super$SassNumber$lessThanOrEquals = _.lessThanOrEquals$1; + _.super$SassNumber$modulo = _.modulo$1; + _.super$SassNumber$plus = _.plus$1; + _.super$SassNumber$minus = _.minus$1; + _.super$SassNumber$times = _.times$1; + _.super$SassNumber$dividedBy = _.dividedBy$1; + _ = A.AnySelectorVisitor.prototype; + _.super$AnySelectorVisitor$visitComplexSelector = _.visitComplexSelector$1; + _ = A.EveryCssVisitor.prototype; + _.super$EveryCssVisitor$visitCssStyleRule = _.visitCssStyleRule$1; + _ = A.ReplaceExpressionVisitor.prototype; + _.super$ReplaceExpressionVisitor$visitBinaryOperationExpression = _.visitBinaryOperationExpression$1; + _.super$ReplaceExpressionVisitor$visitUnaryOperationExpression = _.visitUnaryOperationExpression$1; + _ = A.SourceSpanMixin.prototype; + _.super$SourceSpanMixin$compareTo = _.compareTo$1; + _.super$SourceSpanMixin$$eq = _.$eq; + _ = A.StringScanner.prototype; + _.super$StringScanner$readChar = _.readChar$0; + _.super$StringScanner$scanChar = _.scanChar$1; + _.super$StringScanner$scan = _.scan$1; + _.super$StringScanner$matches = _.matches$1; + _ = A.AnySelectorVisitor0.prototype; + _.super$AnySelectorVisitor$visitComplexSelector0 = _.visitComplexSelector$1; + _ = A.EveryCssVisitor0.prototype; + _.super$EveryCssVisitor$visitCssStyleRule0 = _.visitCssStyleRule$1; + _ = A.ModifiableCssParentNode0.prototype; + _.super$ModifiableCssParentNode$addChild0 = _.addChild$1; + _ = A.SassNumber0.prototype; + _.super$SassNumber$convertToMatch = _.convertToMatch$3; + _.super$SassNumber$convertValueToMatch0 = _.convertValueToMatch$3; + _.super$SassNumber$coerce0 = _.coerce$3; + _.super$SassNumber$coerceValue0 = _.coerceValue$3; + _.super$SassNumber$coerceValueToUnit0 = _.coerceValueToUnit$2; + _.super$SassNumber$coerceToMatch0 = _.coerceToMatch$3; + _.super$SassNumber$coerceValueToMatch0 = _.coerceValueToMatch$3; + _.super$SassNumber$greaterThan0 = _.greaterThan$1; + _.super$SassNumber$greaterThanOrEquals0 = _.greaterThanOrEquals$1; + _.super$SassNumber$lessThan0 = _.lessThan$1; + _.super$SassNumber$lessThanOrEquals0 = _.lessThanOrEquals$1; + _.super$SassNumber$modulo0 = _.modulo$1; + _.super$SassNumber$plus0 = _.plus$1; + _.super$SassNumber$minus0 = _.minus$1; + _.super$SassNumber$times0 = _.times$1; + _.super$SassNumber$dividedBy0 = _.dividedBy$1; + _ = A.Parser1.prototype; + _.super$Parser$silentComment0 = _.silentComment$0; + _ = A.ReplaceExpressionVisitor0.prototype; + _.super$ReplaceExpressionVisitor$visitBinaryOperationExpression0 = _.visitBinaryOperationExpression$1; + _.super$ReplaceExpressionVisitor$visitUnaryOperationExpression0 = _.visitUnaryOperationExpression$1; + _ = A.SimpleSelector0.prototype; + _.super$SimpleSelector$addSuffix0 = _.addSuffix$1; + _.super$SimpleSelector$unify0 = _.unify$1; + _.super$SimpleSelector$isSuperselector0 = _.isSuperselector$1; + _ = A.ColorSpace0.prototype; + _.super$ColorSpace$convert0 = _.convert$5; + _.super$ColorSpace$convertLinear0 = _.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness; + _.super$ColorSpace$transformationMatrix0 = _.transformationMatrix$1; + _ = A.StylesheetParser0.prototype; + _.super$StylesheetParser$importArgument0 = _.importArgument$0; + _.super$StylesheetParser$namespacedExpression0 = _.namespacedExpression$2; + _ = A.Value0.prototype; + _.super$Value$assertMap0 = _.assertMap$1; + _.super$Value$plus0 = _.plus$1; + _.super$Value$minus0 = _.minus$1; + _.super$Value$dividedBy0 = _.dividedBy$1; + _.super$Value$toString0 = _.toString$0; + })(); + (function installTearOffs() { + var _static_2 = hunkHelpers._static_2, + _instance_1_i = hunkHelpers._instance_1i, + _instance_1_u = hunkHelpers._instance_1u, + _static_1 = hunkHelpers._static_1, + _static_0 = hunkHelpers._static_0, + _static = hunkHelpers.installStaticTearOff, + _instance = hunkHelpers.installInstanceTearOff, + _instance_2_u = hunkHelpers._instance_2u, + _instance_0_i = hunkHelpers._instance_0i, + _instance_0_u = hunkHelpers._instance_0u; + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 267); + _instance_1_i(J.JSArray.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A._CastIterableBase.prototype, "get$contains", "contains$1", 9); + _instance_1_u(A.CastMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.ConstantStringMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A.ConstantStringSet.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.GeneralConstantSet.prototype, "get$contains", "contains$1", 9); + _instance_1_u(A.JsLinkedHashMap.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 136); + _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 136); + _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 136); + _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); + _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 74); + _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 67); + _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); + _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 627, 0); + _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { + return A._rootRun($self, $parent, zone, f, type$.dynamic); + }], 628, 1); + _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { + var t1 = type$.dynamic; + return A._rootRunUnary($self, $parent, zone, f, arg, t1, t1); + }], 629, 1); + _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6", "call$6"], ["_rootRunBinary", function($self, $parent, zone, f, arg1, arg2) { + var t1 = type$.dynamic; + return A._rootRunBinary($self, $parent, zone, f, arg1, arg2, t1, t1, t1); + }], 630, 1); + _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { + return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); + }], 631, 0); + _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { + var t1 = type$.dynamic; + return A._rootRegisterUnaryCallback($self, $parent, zone, f, t1, t1); + }], 632, 0); + _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { + var t1 = type$.dynamic; + return A._rootRegisterBinaryCallback($self, $parent, zone, f, t1, t1, t1); + }], 633, 0); + _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 634, 0); + _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 635, 0); + _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 636, 0); + _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 637, 0); + _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 638, 0); + _static_1(A, "async___printToZone$closure", "_printToZone", 95); + _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 639, 0); + _instance(A._AsyncCompleter.prototype, "get$complete", 0, 0, function() { + return [null]; + }, ["call$1", "call$0"], ["complete$1", "complete$0"], 196, 0, 0); + _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 67); + var _; + _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 34); + _instance(_, "get$addError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["addError$2", "addError$1"], 234, 0, 0); + _instance_0_i(_, "get$close", "close$0", 343); + _instance_1_u(_, "get$_async$_add", "_async$_add$1", 34); + _instance_2_u(_, "get$_addError", "_addError$2", 67); + _instance_0_u(_, "get$_close", "_close$0", 0); + _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance(_ = A._BufferingStreamSubscription.prototype, "get$pause", 1, 0, null, ["call$1", "call$0"], ["pause$1", "pause$0"], 349, 0, 0); + _instance_0_i(_, "get$resume", "resume$0", 0); + _instance_0_u(_, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance_1_u(_ = A._StreamIterator.prototype, "get$_onData", "_onData$1", 34); + _instance_2_u(_, "get$_onError", "_onError$2", 67); + _instance_0_u(_, "get$_onDone", "_onDone$0", 0); + _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance_1_u(_, "get$_handleData", "_handleData$1", 34); + _instance_2_u(_, "get$_handleError", "_handleError$2", 359); + _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); + _static_2(A, "collection___defaultEquals$closure", "_defaultEquals", 268); + _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 269); + _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 267); + _instance_1_u(A._HashMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A._LinkedCustomHashMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance(_ = A._LinkedHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 157, 0, 0); + _instance_1_i(_, "get$contains", "contains$1", 9); + _instance_1_i(_, "get$add", "add$1", 9); + _instance(A._LinkedIdentityHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 157, 0, 0); + _instance_1_u(A.MapBase.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.MapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A.UnmodifiableSetView.prototype, "get$contains", "contains$1", 9); + _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 101); + _instance_1_u(A._JsonMap.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "core__identityHashCode$closure", "identityHashCode", 269); + _static_2(A, "core__identical$closure", "identical", 268); + _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 6); + _instance_1_i(A.Iterable.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.StringBuffer.prototype, "get$write", "write$1", 34); + _static(A, "math0__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { + return A.max(a, b, type$.num); + }], 642, 1); + _instance_1_u(A.ArgResults.prototype, "get$wasParsed", "wasParsed$1", 5); + _instance_1_u(_ = A.StreamCompleter.prototype, "get$setSourceStream", "setSourceStream$1", 34); + _instance(_, "get$setError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["setError$2", "setError$1"], 234, 0, 0); + _instance_0_u(_ = A.StreamGroup.prototype, "get$_onListen", "_onListen$0", 0); + _instance_0_u(_, "get$_onPause", "_onPause$0", 0); + _instance_0_u(_, "get$_onResume", "_onResume$0", 0); + _instance_0_u(_, "get$_onCancel", "_onCancel$0", 228); + _instance_0_i(A.ReplAdapter.prototype, "get$exit", "exit$0", 0); + _instance_1_i(A.EmptyUnmodifiableSet.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.UnionSet.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A._DelegatingIterableBase.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.MapKeySet.prototype, "get$contains", "contains$1", 9); + _static_1(A, "version_Version___parse_tearOff$closure", "Version___parse_tearOff", 230); + _instance_1_u(A.VersionRange.prototype, "get$allows", "allows$1", 422); + _instance_1_u(A._IsInvisibleVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); + _instance_1_u(A._IsBogusVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); + _instance_1_u(A._IsUselessVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); + _instance_1_u(A.SelectorList.prototype, "get$isSuperselector", "isSuperselector$1", 71); + _instance_1_u(A.PseudoSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_u(A.SimpleSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_u(A.TypeSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_u(A.UniversalSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); + _instance_1_u(A.EmptyExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 208); + _instance_1_u(A.ExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 208); + _static_1(A, "functions___isUnique$closure", "_isUnique", 13); + _instance_2_u(A.NodePackageImporter.prototype, "get$_compareExpansionKeys", "_compareExpansionKeys$2", 145); + _instance_0_u(A.CssParser.prototype, "get$silentComment", "silentComment$0", 23); + _instance_0_u(_ = A.Parser.prototype, "get$whitespace", "whitespace$0", 0); + _instance_0_u(_, "get$silentComment", "silentComment$0", 23); + _instance_0_u(_, "get$loudComment", "loudComment$0", 0); + _instance_0_u(_, "get$string", "string$0", 29); + _instance(_, "get$error", 1, 2, function() { + return [null]; + }, ["call$3", "call$2"], ["error$3", "error$2"], 156, 0, 0); + _instance_0_u(A.SassParser.prototype, "get$loudComment", "loudComment$0", 0); + _instance(_ = A.StylesheetParser.prototype, "get$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_statement$1$root", "_statement$0"], 533, 0, 0); + _instance_0_u(_, "get$_declarationChild", "_declarationChild$0", 124); + _instance_0_u(_, "get$_functionChild", "_functionChild$0", 124); + _instance(_, "get$_expression", 0, 0, null, ["call$3$bracketList$singleEquals$until", "call$0", "call$2$singleEquals$until", "call$1$bracketList", "call$1$until"], ["_expression$3$bracketList$singleEquals$until", "_expression$0", "_expression$2$singleEquals$until", "_expression$1$bracketList", "_expression$1$until"], 542, 0, 0); + _instance_0_u(_, "get$_number", "_number$0", 557); + _instance(A.LazyFileSpan.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 128, 0, 0); + _instance_1_u(A.LimitedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.MergedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance(A.MultiSpan.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 161, 0, 0); + _instance_1_i(A.NoSourceMapBuffer.prototype, "get$write", "write$1", 34); + _instance_1_u(A.PrefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.PublicMemberMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A.SourceMapBuffer.prototype, "get$write", "write$1", 34); + _instance_1_u(A.UnprefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "utils__isPublic$closure", "isPublic", 5); + _static_1(A, "calculation_SassCalculation__simplify$closure", "SassCalculation__simplify", 77); + _instance_1_u(A.ColorChannel.prototype, "get$isAnalogous", "isAnalogous$1", 100); + _instance_1_u(A.SrgbColorSpace.prototype, "get$toLinear", "toLinear$1", 16); + _instance_1_u(A.AnySelectorVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); + _instance(_ = A._EvaluateVisitor0.prototype, "get$_async_evaluate$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate$_interpolationToValue$3$trim$warnForColor", "_async_evaluate$_interpolationToValue$1", "_async_evaluate$_interpolationToValue$2$warnForColor"], 357, 0, 0); + _instance_1_u(_, "get$_async_evaluate$_expressionNode", "_async_evaluate$_expressionNode$1", 164); + _instance(_ = A._EvaluateVisitor.prototype, "get$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_interpolationToValue$3$trim$warnForColor", "_interpolationToValue$1", "_interpolationToValue$2$warnForColor"], 560, 0, 0); + _instance_1_u(_, "get$_expressionNode", "_expressionNode$1", 164); + _instance_1_i(_ = A.RecursiveStatementVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", 272); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", 273); + _instance_1_u(_ = A.SelectorSearchVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", "SelectorSearchVisitor.T?(ComplexSelector)"); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", "SelectorSearchVisitor.T?(SelectorList)"); + _instance_1_u(_ = A._SerializeVisitor.prototype, "get$_visitMediaQuery", "_visitMediaQuery$1", 276); + _instance_1_u(_, "get$_specificities", "_specificities$1", 277); + _instance_1_u(_, "get$_writeCalculationValue", "_writeCalculationValue$1", 90); + _instance(_, "get$_writeChannel", 0, 1, null, ["call$2", "call$1"], ["_writeChannel$2", "_writeChannel$1"], 190, 0, 0); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", 279); + _instance_1_u(_, "get$_requiresSemicolon", "_requiresSemicolon$1", 8); + _instance_1_i(_ = A.StatementSearchVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor.T?(ContentBlock)"); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor.T?(List)"); + _instance(A.SourceSpanMixin.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 128, 0, 0); + _static_1(A, "frame_Frame___parseVM_tearOff$closure", "Frame___parseVM_tearOff", 110); + _static_1(A, "frame_Frame___parseV8_tearOff$closure", "Frame___parseV8_tearOff", 110); + _static_1(A, "frame_Frame___parseFirefox_tearOff$closure", "Frame___parseFirefox_tearOff", 110); + _static_1(A, "frame_Frame___parseFriendly_tearOff$closure", "Frame___parseFriendly_tearOff", 110); + _static_1(A, "trace_Trace___parseVM_tearOff$closure", "Trace___parseVM_tearOff", 184); + _static_1(A, "trace_Trace___parseFriendly_tearOff$closure", "Trace___parseFriendly_tearOff", 184); + _static(A, "from_handlers__TransformByHandlers__defaultHandleError$closure", 3, null, ["call$1$3", "call$3"], ["TransformByHandlers__defaultHandleError", function(error, stackTrace, sink) { + return A.TransformByHandlers__defaultHandleError(error, stackTrace, sink, type$.dynamic); + }], 645, 0); + _static(A, "rate_limit___collect$closure", 2, null, ["call$1$2", "call$2"], ["_collect", function($event, soFar) { + return A._collect($event, soFar, type$.dynamic); + }], 646, 0); + _instance_1_u(A.AnySelectorVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); + _instance(_ = A._EvaluateVisitor2.prototype, "get$_async_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate0$_interpolationToValue$3$trim$warnForColor", "_async_evaluate0$_interpolationToValue$1", "_async_evaluate0$_interpolationToValue$2$warnForColor"], 319, 0, 0); + _instance_1_u(_, "get$_async_evaluate0$_expressionNode", "_async_evaluate0$_expressionNode$1", 202); + _static_1(A, "calculation1___assertCalculationValue$closure", "_assertCalculationValue", 90); + _static_1(A, "calculation1___isValidClampArg$closure", "_isValidClampArg", 9); + _static_1(A, "calculation0_SassCalculation__simplify$closure", "SassCalculation__simplify0", 77); + _instance_1_u(A.ColorChannel0.prototype, "get$isAnalogous", "isAnalogous$1", 78); + _static(A, "compile__compile$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compile0", function(path) { + return A.compile0(path, null); + }], 647, 0); + _static(A, "compile__compileString$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileString0", function(text) { + return A.compileString0(text, null); + }], 648, 0); + _static(A, "compile__compileAsync$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileAsync1", function(path) { + return A.compileAsync1(path, null); + }], 649, 0); + _static(A, "compile__compileStringAsync$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileStringAsync1", function(text) { + return A.compileStringAsync1(text, null); + }], 650, 0); + _static_1(A, "compile___parseImporter$closure", "_parseImporter0", 651); + _static_1(A, "compile___simplifyCalcArg$closure", "_simplifyCalcArg", 77); + _static_0(A, "compiler__initCompiler$closure", "initCompiler", 652); + _static_0(A, "compiler__initAsyncCompiler$closure", "initAsyncCompiler", 653); + _instance_0_u(A.CssParser0.prototype, "get$silentComment", "silentComment$0", 23); + _instance_1_u(A.EmptyExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 231); + _instance(_ = A._EvaluateVisitor1.prototype, "get$_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_evaluate0$_interpolationToValue$3$trim$warnForColor", "_evaluate0$_interpolationToValue$1", "_evaluate0$_interpolationToValue$2$warnForColor"], 449, 0, 0); + _instance_1_u(_, "get$_evaluate0$_expressionNode", "_evaluate0$_expressionNode$1", 202); + _instance_1_u(A.ExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 231); + _static_1(A, "functions0___isUnique$closure", "_isUnique0", 14); + _static_1(A, "immutable__jsToDartList$closure", "jsToDartList", 654); + _instance(A.LazyFileSpan0.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 128, 0, 0); + _static_2(A, "legacy__render$closure", "render", 655); + _static_1(A, "legacy__renderSync$closure", "renderSync", 656); + _instance_1_u(A.LimitedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.SelectorList0.prototype, "get$isSuperselector", "isSuperselector$1", 72); + _instance_1_u(A.MergedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance(A.MultiSpan0.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 161, 0, 0); + _instance_1_i(A.NoSourceMapBuffer0.prototype, "get$write", "write$1", 34); + _instance_2_u(A.NodePackageImporter0.prototype, "get$_node_package$_compareExpansionKeys", "_node_package$_compareExpansionKeys$2", 145); + _static_0(A, "parser0__loadParserExports$closure", "loadParserExports", 657); + _static(A, "parser0___parse$closure", 4, null, ["call$4"], ["_parse"], 658, 0); + _instance_0_u(_ = A.Parser1.prototype, "get$whitespace", "whitespace$0", 0); + _instance_0_u(_, "get$silentComment", "silentComment$0", 23); + _instance_0_u(_, "get$loudComment", "loudComment$0", 0); + _instance_0_u(_, "get$string", "string$0", 29); + _instance(_, "get$error", 1, 2, function() { + return [null]; + }, ["call$3", "call$2"], ["error$3", "error$2"], 156, 0, 0); + _instance_1_u(A.PrefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.PseudoSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.PublicMemberMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_0_u(A.SassParser0.prototype, "get$loudComment", "loudComment$0", 0); + _instance_1_u(A._IsInvisibleVisitor2.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); + _instance_1_u(A._IsBogusVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); + _instance_1_u(A._IsUselessVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); + _instance_1_u(_ = A.SelectorSearchVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", "SelectorSearchVisitor0.T?(ComplexSelector0)"); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", "SelectorSearchVisitor0.T?(SelectorList0)"); + _instance_1_u(_ = A._SerializeVisitor0.prototype, "get$_serialize0$_visitMediaQuery", "_serialize0$_visitMediaQuery$1", 566); + _instance_1_u(_, "get$_serialize0$_specificities", "_serialize0$_specificities$1", 567); + _instance_1_u(_, "get$_serialize0$_writeCalculationValue", "_serialize0$_writeCalculationValue$1", 90); + _instance(_, "get$_serialize0$_writeChannel", 0, 1, null, ["call$2", "call$1"], ["_serialize0$_writeChannel$2", "_serialize0$_writeChannel$1"], 190, 0, 0); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", 568); + _instance_1_u(_, "get$_serialize0$_requiresSemicolon", "_serialize0$_requiresSemicolon$1", 7); + _instance_1_u(A.SimpleSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_i(A.SourceMapBuffer0.prototype, "get$write", "write$1", 34); + _instance_1_u(A.SrgbColorSpace0.prototype, "get$toLinear", "toLinear$1", 16); + _instance_1_i(_ = A.StatementSearchVisitor0.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor0.T?(ContentBlock0)"); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor0.T?(List)"); + _instance(_ = A.StylesheetParser0.prototype, "get$_stylesheet0$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_stylesheet0$_statement$1$root", "_stylesheet0$_statement$0"], 586, 0, 0); + _instance_0_u(_, "get$_stylesheet0$_declarationChild", "_stylesheet0$_declarationChild$0", 135); + _instance_0_u(_, "get$_stylesheet0$_functionChild", "_stylesheet0$_functionChild$0", 135); + _instance_0_u(_, "get$_stylesheet0$_number", "_stylesheet0$_number$0", 588); + _instance_1_u(A.TypeSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.UniversalSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.UnprefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "utils3__jsToDartUrl$closure", "jsToDartUrl", 659); + _static_1(A, "utils3__dartToJSUrl$closure", "dartToJSUrl", 261); + _static_1(A, "utils1__isPublic$closure", "isPublic0", 5); + _static(A, "path__absolute$closure", 1, function() { + return [null, null, null, null, null, null, null, null, null, null, null, null, null, null]; + }, ["call$15", "call$1", "call$2", "call$3", "call$4", "call$5", "call$6"], ["absolute", function(part1) { + var _null = null; + return A.absolute(part1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2) { + var _null = null; + return A.absolute(part1, part2, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3) { + var _null = null; + return A.absolute(part1, part2, part3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3, part4) { + var _null = null; + return A.absolute(part1, part2, part3, part4, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3, part4, part5) { + var _null = null; + return A.absolute(part1, part2, part3, part4, part5, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3, part4, part5, part6) { + var _null = null; + return A.absolute(part1, part2, part3, part4, part5, part6, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }], 660, 0); + _static_1(A, "path__toUri$closure", "toUri", 122); + _static_1(A, "path__prettyUri$closure", "prettyUri", 661); + _static_2(A, "number0__fuzzyLessThan$closure", "fuzzyLessThan", 46); + _static_2(A, "number0__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals", 46); + _static_2(A, "number0__fuzzyGreaterThan$closure", "fuzzyGreaterThan", 46); + _static_2(A, "number0__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals", 46); + _static_2(A, "number0__moduloLikeSass$closure", "moduloLikeSass", 62); + _static_1(A, "number0__sqrt$closure", "sqrt", 56); + _static_1(A, "number0__sin$closure", "sin", 56); + _static_1(A, "number0__cos$closure", "cos", 56); + _static_1(A, "number0__tan$closure", "tan", 56); + _static_1(A, "number0__atan$closure", "atan", 56); + _static_1(A, "number0__asin$closure", "asin", 56); + _static_1(A, "number0__acos$closure", "acos", 56); + _static_1(A, "utils0__srgbAndDisplayP3FromLinear$closure", "srgbAndDisplayP3FromLinear", 16); + _static_2(A, "number2__fuzzyLessThan$closure", "fuzzyLessThan0", 46); + _static_2(A, "number2__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals0", 46); + _static_2(A, "number2__fuzzyGreaterThan$closure", "fuzzyGreaterThan0", 46); + _static_2(A, "number2__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals0", 46); + _static_2(A, "number2__moduloLikeSass$closure", "moduloLikeSass0", 62); + _static_1(A, "number2__sqrt$closure", "sqrt0", 51); + _static_1(A, "number2__sin$closure", "sin0", 51); + _static_1(A, "number2__cos$closure", "cos0", 51); + _static_1(A, "number2__tan$closure", "tan0", 51); + _static_1(A, "number2__atan$closure", "atan0", 51); + _static_1(A, "number2__asin$closure", "asin0", 51); + _static_1(A, "number2__acos$closure", "acos0", 51); + _static_1(A, "sass__main$closure", "main1", 490); + _static_1(A, "utils4__validateUrlScheme$closure", "validateUrlScheme", 95); + _static_1(A, "utils2__srgbAndDisplayP3FromLinear$closure", "srgbAndDisplayP3FromLinear0", 16); + _static_1(A, "value0__wrapValue$closure", "wrapValue", 444); + })(); + (function inheritance() { + var _mixin = hunkHelpers.mixin, + _inherit = hunkHelpers.inherit, + _inheritMany = hunkHelpers.inheritMany; + _inherit(A.Object, null); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.SkipWhileIterator, A.EmptyIterator, A.FollowedByIterator, A.WhereTypeIterator, A.NonNullsIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A.Symbol, A._Record, A.MapView, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.SetBase, A.JSInvocationMirror, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A._Required, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._SyncStarIterator, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._MapBaseValueIterator, A._UnmodifiableMapMixin, A._ListQueueIterator, A._UnmodifiableSetMixin, A.Codec, A.Converter, A._Base64Encoder, A.ByteConversionSink, A._JsonStringifier, A.StringConversionSink, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.RuneIterator, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.Expando, A.NullRejectionException, A._JSRandom, A.ArgParser, A.ArgResults, A.Option, A.OptionType, A.Parser0, A._Usage, A.FutureGroup, A.ErrorResult, A.ValueResult, A.StreamCompleter, A.StreamGroup, A._StreamGroupState, A.StreamQueue, A._NextRequest, A.Repl, A.ReplAdapter, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._MapEntry, A.MapEquality, A._QueueList_Object_ListMixin, A._DelegatingIterableBase, A.UnmodifiableSetMixin, A.Context, A._PathDirection, A._PathRelation, A.Style, A.ParsedPath, A.PathException, A.Version, A.VersionRange, A.CssMediaQuery, A.MediaQuerySuccessfulMergeResult, A.CssNode, A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.CssValue, A._FakeAstNode, A.Argument, A.ArgumentDeclaration, A.ArgumentInvocation, A.AtRootQuery, A.ConfiguredVariable, A.Expression, A._IsCalculationSafeVisitor, A.DynamicImport, A.StaticImport, A.Interpolation, A.Statement, A.IfRuleClause, A.__HasContentVisitor_Object_StatementSearchVisitor, A.SupportsAnything, A.SupportsDeclaration, A.SupportsFunction, A.SupportsInterpolation, A.SupportsNegation, A.SupportsOperation, A.Selector, A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor, A.ComplexSelectorComponent, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor, A.QualifiedName, A.AsyncEnvironment, A._EnvironmentModule0, A.AsyncImportCache, A.AsyncBuiltInCallable, A.BuiltInCallable, A.PlainCssCallable, A.UserDefinedCallable, A.CompileResult, A.Configuration, A.ConfiguredValue, A.Environment, A._EnvironmentModule, A.SourceSpanException, A.SassScriptException, A.ExecutableOptions, A.UsageException, A._Watcher, A.EmptyExtensionStore, A.Extension, A.Extender, A.ExtensionStore, A.ImportCache, A.AsyncImporter, A.CanonicalizeContext, A.ImporterResult, A.InterpolationBuffer, A.InterpolationMap, A.FileSystemException, A.LoggerWithDeprecationType0, A._QuietLogger, A.StderrLogger, A.TrackingLogger, A.BuiltInModule, A.ForwardedModuleView, A.ShadowedModuleView, A.Parser, A.StylesheetGraph, A.StylesheetNode, A.Box, A.ModifiableBox, A.LazyFileSpan, A.MultiDirWatcher, A.MultiSpan, A.NoSourceMapBuffer, A.SourceMapBuffer, A.Value, A.CalculationOperation, A._ColorFormatEnum, A.SpanColorFormat, A.ColorChannel, A.GamutMapMethod, A.InterpolationMethod, A.ColorSpace, A.AnySelectorVisitor, A._EvaluateVisitor0, A._ImportedCssVisitor0, A._EvaluationContext0, A._CloneCssVisitor, A.Evaluator, A._EvaluateVisitor, A._ImportedCssVisitor, A._EvaluationContext, A.EveryCssVisitor, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.DependencyReport, A.RecursiveStatementVisitor, A.ReplaceExpressionVisitor, A.SelectorSearchVisitor, A._SerializeVisitor, A.StatementSearchVisitor, A.Entry, A.Mapping, A.TargetLineEntry, A.TargetEntry, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.Chain, A.Frame, A.LazyTrace, A.Trace, A.UnparsedFrame, A.StringScanner, A._SpanScannerState, A.AsciiGlyphSet, A.UnicodeGlyphSet, A.WatchEvent, A.ChangeType, A.ColorSpace0, A.AnySelectorVisitor0, A.SupportsAnything0, A.Argument0, A.ArgumentDeclaration0, A.ArgumentInvocation0, A.Value0, A.AsyncImporter0, A.AsyncBuiltInCallable0, A.AsyncEnvironment0, A._EnvironmentModule2, A._EvaluateVisitor2, A._ImportedCssVisitor2, A._EvaluationContext2, A.AsyncImportCache0, A.Parser1, A.AtRootQuery0, A.Statement0, A.CssNode0, A.Selector0, A.Expression0, A.Box0, A.ModifiableBox0, A.BuiltInCallable0, A.BuiltInModule0, A.CalculationOperation0, A.CalculationInterpolation, A.CanonicalizeContext0, A.ColorChannel0, A.GamutMapMethod0, A._CloneCssVisitor0, A._ColorFormatEnum0, A.SpanColorFormat0, A.CompileResult0, A.Compiler, A.ComplexSelectorComponent0, A.Configuration0, A.ConfiguredValue0, A.ConfiguredVariable0, A.SupportsDeclaration0, A.LoggerWithDeprecationType, A.DynamicImport0, A.EmptyExtensionStore0, A.Environment0, A._EnvironmentModule1, A._EvaluateVisitor1, A._ImportedCssVisitor1, A._EvaluationContext1, A.EveryCssVisitor0, A.SassScriptException0, A._IsCalculationSafeVisitor0, A.JSExpressionVisitor, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0, A.Extension0, A.Extender0, A.ExtensionStore0, A.ForwardedModuleView0, A.SupportsFunction0, A.IfRuleClause0, A.NodeImporter, A.ImportCache0, A.Interpolation0, A.SupportsInterpolation0, A.InterpolationBuffer0, A.InterpolationMap0, A.InterpolationMethod0, A.FileSystemException0, A.LazyFileSpan0, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0, A._QuietLogger0, A.CssMediaQuery0, A.MediaQuerySuccessfulMergeResult0, A.__HasContentVisitor_Object_StatementSearchVisitor0, A.MultiSpan0, A.SupportsNegation0, A.NoSourceMapBuffer0, A._FakeAstNode0, A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.SupportsOperation0, A.PlainCssCallable0, A.QualifiedName0, A.ReplaceExpressionVisitor0, A.ImporterResult0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.SelectorSearchVisitor0, A._SerializeVisitor0, A.ShadowedModuleView0, A.SourceMapBuffer0, A.JSStatementVisitor, A.StatementSearchVisitor0, A.StaticImport0, A.StderrLogger0, A.UserDefinedCallable0, A.CssValue0]); + _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); + _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]); + _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, A.Stdin, A.Stdout, A.ReadlineModule, A.ReadlineOptions, A.ReadlineInterface, A.BufferModule, A.BufferConstants, A.Buffer, A.ConsoleModule, A.Console, A.EventEmitter, A.FS, A.FSConstants, A.FSWatcher, A.ReadStream, A.ReadStreamOptions, A.WriteStream, A.WriteStreamOptions, A.FileOptions, A.StatOptions, A.MkdirOptions, A.RmdirOptions, A.WatchOptions, A.WatchFileOptions, A.Stats, A.Promise, A.Date, A.JsError, A.Atomics, A.Modules, A.Module, A.Net, A.Socket, A.NetAddress, A.NetServer, A.NodeJsError, A.Process, A.CPUUsage, A.Release, A.StreamModule, A.Readable, A.Writable, A.Duplex, A.Transform, A.WritableOptions, A.ReadableOptions, A.Immediate, A.Timeout, A.TTY, A.Util, A.JSArray0, A.Chokidar, A.ChokidarOptions, A.ChokidarWatcher, A.JSFunction, A.ImmutableList, A.ImmutableMap, A.NodeImporterResult, A.RenderContext, A.RenderContextOptions, A.RenderContextResult, A.RenderContextResultStats, A.JSModule, A.JSModuleRequire, A.JSClass, A.JSUrl, A._PropertyDescriptor, A._RequireMain, A.JSArray1, A.Chokidar0, A.ChokidarOptions0, A.ChokidarWatcher0, A._Channels, A._ChannelOptions, A._ToGamutOptions, A._InterpolationOptions, A._NodeSassColor, A.CompileOptions, A.NodeCompileResult, A.Deprecation1, A.Exports, A.LoggerNamespace, A.JSExpressionVisitorObject, A.FiberClass, A.Fiber, A.JSFunction0, A.ImmutableList0, A.ImmutableMap0, A.JSImporter, A.JSImporterResult, A.NodeImporterResult0, A._ConstructorOptions, A._NodeSassList, A.JSLogger, A.WarnOptions, A.DebugOptions, A._NodeSassMap, A.JSModule0, A.JSModuleRequire0, A._ConstructorOptions0, A._NodeSassNumber, A.ParserExports, A.JSClass0, A.RenderContext0, A.RenderContextOptions0, A.RenderContextResult0, A.RenderContextResultStats0, A.RenderOptions, A.RenderResult, A.RenderResultStats, A._Exports, A.JSStatementVisitorObject, A._ConstructorOptions1, A._NodeSassString, A.Types, A.JSUrl0, A._PropertyDescriptor0, A._RequireMain0]); + _inherit(J.JSUnmodifiableArray, J.JSArray); + _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); + _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.SkipWhileIterable, A.FollowedByIterable, A.WhereTypeIterable, A.NonNullsIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable, A._SyncStarIterable, A.Runes, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A._PrefixedKeys, A._UnprefixedKeys, A._PrefixedKeys0, A._UnprefixedKeys0]); + _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin, A.CastSet]); + _inherit(A._EfficientLengthCastIterable, A.CastIterable); + _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin); + _inheritMany(A.Closure, [A.Closure2Args, A.CastMap_entries_closure, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.JsLinkedHashMap_values_closure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A.Future_wait_closure, A._Future__chainForeignFuture_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_Stream$fromFuture_closure, A.Stream_length_closure, A._CustomZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallback_closure, A._HashMap_values_closure, A._LinkedCustomHashMap_closure, A.MapBase_entries_closure, A._JsonMap_values_closure, A._Uri__makePath_closure, A._createTables_setChars, A._createTables_setRange, A.jsify__convert, A.promiseToFuture_closure1, A.promiseToFuture_closure2, A.ArgParser__addOption_closure, A._Usage__writeOption_closure, A._Usage__buildAllowedList_closure, A.FutureGroup_add_closure, A.StreamGroup__onListen_closure, A.StreamGroup__onCancel_closure, A.StreamQueue__ensureListening_closure, A.alwaysValid_closure, A.ReplAdapter_runAsync__closure, A.UnionSet__iterable_closure, A.UnionSet_contains_closure, A.MapKeySet_difference_closure, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.futureToPromise__closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.ParsedPath__splitExtension_closure, A.PathMap__create_closure0, A.PathMap__create_closure1, A.WindowsStyle_absolutePathToUri_closure, A.Version__splitParts_closure, A.ModifiableCssNode_hasFollowingSibling_closure, A.ArgumentDeclaration_verify_closure, A.ArgumentDeclaration_verify_closure0, A._IsCalculationSafeVisitor_visitListExpression_closure, A.ListExpression_toString_closure, A.Interpolation_toString_closure, A.EachRule_toString_closure, A.IfRuleClause$__closure, A.IfRuleClause$___closure, A.ParentStatement_closure, A.ParentStatement__closure, A._IsBogusVisitor_visitComplexSelector_closure, A._IsUselessVisitor_visitComplexSelector_closure, A.ComplexSelectorComponent_toString_closure, A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure, A.IDSelector_unify_closure, A.SelectorList_asSassList_closure, A.SelectorList_nestWithin_closure, A.SelectorList_nestWithin__closure, A.SelectorList_nestWithin__closure0, A.SelectorList__nestWithinCompound_closure, A.SelectorList__nestWithinCompound_closure0, A.SelectorList__nestWithinCompound_closure1, A.SelectorList_withAdditionalCombinators_closure, A.PseudoSelector_specificity__closure, A.PseudoSelector_specificity__closure0, A.PseudoSelector_unify_closure, A.SimpleSelector_isSuperselector_closure, A.SimpleSelector_isSuperselector__closure, A._compileStylesheet_closure0, A.AsyncEnvironment__getVariableFromGlobalModule_closure, A.AsyncEnvironment_setVariable_closure0, A.AsyncEnvironment__getFunctionFromGlobalModule_closure, A.AsyncEnvironment__getMixinFromGlobalModule_closure, A.AsyncEnvironment_toModule_closure, A.AsyncEnvironment_toDummyModule_closure, A._EnvironmentModule__EnvironmentModule_closure5, A._EnvironmentModule__EnvironmentModule_closure6, A._EnvironmentModule__EnvironmentModule_closure7, A._EnvironmentModule__EnvironmentModule_closure8, A._EnvironmentModule__EnvironmentModule_closure9, A._EnvironmentModule__EnvironmentModule_closure10, A.AsyncImportCache_humanize_closure, A.AsyncImportCache_humanize_closure0, A.AsyncImportCache_humanize_closure1, A.AsyncImportCache_humanize_closure2, A.AsyncBuiltInCallable$mixin_closure, A.AsyncBuiltInCallable_withDeprecationWarning_closure, A.BuiltInCallable$mixin_closure, A.BuiltInCallable_withDeprecationWarning_closure, A._compileStylesheet_closure, A.Deprecation_fromId_closure, A.Environment__getVariableFromGlobalModule_closure, A.Environment_setVariable_closure0, A.Environment__getFunctionFromGlobalModule_closure, A.Environment__getMixinFromGlobalModule_closure, A.Environment_toModule_closure, A.Environment_toDummyModule_closure, A._EnvironmentModule__EnvironmentModule_closure, A._EnvironmentModule__EnvironmentModule_closure0, A._EnvironmentModule__EnvironmentModule_closure1, A._EnvironmentModule__EnvironmentModule_closure2, A._EnvironmentModule__EnvironmentModule_closure3, A._EnvironmentModule__EnvironmentModule_closure4, A._writeSourceMap_closure, A.ExecutableOptions_emitErrorCss_closure, A.watch_closure, A._Watcher__debounceEvents_closure, A.ExtensionStore_extensionsWhereTarget_closure, A.ExtensionStore__extendComplex_closure, A.ExtensionStore__extendComplex__closure, A.ExtensionStore__extendCompound_closure, A.ExtensionStore__extendCompound_closure0, A.ExtensionStore__extendCompound_closure1, A.ExtensionStore__extendSimple_withoutPseudo, A.ExtensionStore__extendSimple_closure, A.ExtensionStore__extendSimple_closure0, A.ExtensionStore__extendPseudo_closure, A.ExtensionStore__extendPseudo_closure0, A.ExtensionStore__extendPseudo_closure1, A.ExtensionStore__extendPseudo_closure2, A.ExtensionStore__extendPseudo_closure3, A.ExtensionStore__trim_closure, A.ExtensionStore__trim_closure0, A.unifyComplex_closure, A._weaveParents_closure0, A._weaveParents_closure1, A._weaveParents_closure2, A._mustUnify_closure, A._mustUnify__closure, A.paths__closure, A.paths___closure, A.listIsSuperselector_closure, A.listIsSuperselector__closure, A.complexIsSuperselector_closure, A.complexIsSuperselector_closure0, A._compatibleWithPreviousCombinator_closure, A.compoundIsSuperselector_closure, A._selectorPseudoIsSuperselector_closure, A._selectorPseudoIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure1, A._selectorPseudoIsSuperselector_closure2, A._selectorPseudoIsSuperselector_closure3, A._selectorPseudoIsSuperselector__closure, A._selectorPseudoIsSuperselector___closure, A._selectorPseudoIsSuperselector___closure0, A._selectorPseudoIsSuperselector_closure4, A._selectorPseudoIsSuperselector_closure5, A._selectorPseudoArgs_closure, A._selectorPseudoArgs_closure0, A.globalFunctions_closure, A.global_closure0, A.global_closure1, A.global_closure2, A.global_closure3, A.global_closure4, A.global_closure5, A.global_closure6, A.global_closure7, A.global_closure8, A.global_closure9, A.global_closure10, A.global_closure11, A.global_closure12, A.global_closure13, A.global_closure14, A.global_closure15, A.global_closure16, A.global_closure17, A.global_closure18, A.global_closure19, A.global_closure20, A.global_closure21, A.global_closure22, A.global_closure23, A.global_closure24, A.global_closure25, A.global_closure26, A.global_closure27, A.global_closure28, A.global_closure29, A.global_closure30, A.global_closure31, A.global_closure32, A.global_closure33, A.global_closure34, A.global_closure35, A.global__closure, A.global_closure36, A.global_closure37, A.global_closure38, A.global_closure39, A.global_closure40, A.global_closure41, A.global_closure42, A.module_closure1, A.module_closure2, A.module_closure3, A.module_closure4, A.module_closure5, A.module_closure6, A.module_closure7, A.module_closure8, A.module_closure9, A.module_closure10, A.module_closure11, A.module_closure12, A.module_closure13, A.module_closure14, A.module__closure2, A.module_closure15, A.module_closure16, A.module_closure17, A.module_closure18, A.module_closure19, A.module_closure20, A.module_closure21, A.module_closure22, A.module__closure1, A.module_closure23, A.module_closure_toXyzNoMissing, A.module_closure24, A._mix_closure, A._complement_closure, A._adjust_closure, A._scale_closure, A._change_closure, A._ieHexStr_closure, A._ieHexStr_closure_hexString, A._updateComponents_closure, A._updateComponents_closure0, A._adjustColor_closure, A._functionString_closure, A._removedColorFunction_closure, A._rgb_closure, A._hsl_closure, A._parseChannels_closure, A._parseChannels_closure0, A._colorFromChannels_closure, A._colorFromChannels_closure0, A._channelFromValue_closure, A._channelFunction_closure, A._suggestScaleAndAdjust_closure, A._length_closure0, A._nth_closure, A._setNth_closure, A._join_closure, A._append_closure0, A._zip_closure, A._zip__closure, A._zip__closure0, A._zip__closure1, A._index_closure0, A._separator_closure, A._isBracketed_closure, A._slash_closure, A._get_closure, A._set_closure, A._set__closure0, A._set_closure0, A._set__closure, A._merge_closure, A._merge_closure0, A._merge__closure, A._deepMerge_closure, A._deepRemove_closure, A._deepRemove__closure, A._remove_closure, A._remove_closure0, A._keys_closure, A._values_closure, A._hasKey_closure, A._modify_modifyNestedMap, A.global_closure, A.module_closure0, A._ceil_closure, A._clamp_closure, A._floor_closure, A._max_closure, A._min_closure, A._round_closure, A._hypot_closure, A._hypot__closure, A._log_closure, A._pow_closure, A._atan2_closure, A._compatible_closure, A._isUnitless_closure, A._unit_closure, A._percentage_closure, A._randomFunction_closure, A._div_closure, A._singleArgumentMathFunc_closure, A._numberFunction_closure, A._shared_closure, A._shared_closure0, A._shared_closure1, A._shared_closure2, A.moduleFunctions_closure, A.moduleFunctions_closure0, A.moduleFunctions__closure, A.moduleFunctions_closure1, A._nest_closure, A._nest__closure, A._append_closure, A._append__closure, A._append___closure, A._extend_closure, A._replace_closure, A._unify_closure, A._isSuperselector_closure, A._simpleSelectors_closure, A._simpleSelectors__closure, A._parse_closure, A.module_closure, A.module__closure, A.module__closure0, A._unquote_closure, A._quote_closure, A._length_closure, A._insert_closure, A._index_closure, A._slice_closure, A._toUpperCase_closure, A._toLowerCase_closure, A._uniqueId_closure, A.ImportCache_humanize_closure, A.ImportCache_humanize_closure0, A.ImportCache_humanize_closure1, A.ImportCache_humanize_closure2, A.FilesystemImporter_canonicalize_closure, A.NodePackageImporter__nodePackageExportsResolve_closure, A.NodePackageImporter__nodePackageExportsResolve_closure0, A.NodePackageImporter__nodePackageExportsResolve_closure1, A.NodePackageImporter__nodePackageExportsResolve_closure2, A.NodePackageImporter__nodePackageExportsResolve__closure, A.NodePackageImporter__nodePackageExportsResolve__closure0, A.NodePackageImporter__getMainExport_closure, A._exactlyOne_closure, A.InterpolationMap_mapException_closure, A._realCasePath_helper, A._realCasePath_helper__closure, A.readStdin_closure, A.readStdin_closure0, A.readStdin_closure1, A.readStdin_closure2, A.listDir__closure, A.listDir__closure0, A.listDir_closure_list, A.listDir__list_closure, A.watchDir_closure, A.watchDir_closure0, A.watchDir_closure1, A.watchDir_closure2, A.DeprecationProcessingLogger_summarize_closure, A.DeprecationProcessingLogger_summarize_closure0, A._disallowedFunctionNames_closure, A.Parser_escape_closure, A.Parser_scanIdentChar_matches, A.SassParser_styleRuleSelector_closure, A.SassParser__peekIndentation_closure, A.SassParser__peekIndentation_closure0, A.StylesheetParser_parse__closure0, A.StylesheetParser__expression_addSingleExpression, A.StylesheetParser__expression_addOperator, A.StylesheetParser__isHexColor_closure, A.StylesheetParser__unicodeRange_closure, A.StylesheetParser__unicodeRange_closure0, A.StylesheetParser_trySpecialFunction_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime, A.MapExtensions_get_pairs_closure, A._PrefixedKeys_iterator_closure, A.SourceMapBuffer_buildSourceMap_closure, A._UnprefixedKeys_iterator_closure, A._UnprefixedKeys_iterator_closure0, A.indent_closure, A.flattenVertically_closure, A.flattenVertically_closure0, A.SassCalculation__verifyLength_closure, A.SassColor$_forSpace_closure, A.HwbColorSpace_convert_toRgb, A.SassList_isBlank_closure, A.SassNumber__coerceOrConvertValue_closure, A.SassNumber__coerceOrConvertValue_closure1, A.SassNumber_multiplyUnits_closure, A.SassNumber_multiplyUnits_closure1, A.SassNumber__areAnyConvertible_closure, A.SassNumber__canonicalizeUnitList_closure, A.SassNumber_unitSuggestion_closure, A.SassNumber_unitSuggestion_closure0, A.SingleUnitSassNumber__coerceToUnit_closure, A.SingleUnitSassNumber__coerceValueToUnit_closure, A.SingleUnitSassNumber_multiplyUnits_closure, A.AnySelectorVisitor_visitComplexSelector_closure, A.AnySelectorVisitor_visitCompoundSelector_closure, A._EvaluateVisitor_closure12, A._EvaluateVisitor_closure13, A._EvaluateVisitor_closure14, A._EvaluateVisitor_closure15, A._EvaluateVisitor_closure16, A._EvaluateVisitor_closure17, A._EvaluateVisitor_closure18, A._EvaluateVisitor_closure19, A._EvaluateVisitor_closure20, A._EvaluateVisitor_closure21, A._EvaluateVisitor_closure22, A._EvaluateVisitor_closure23, A._EvaluateVisitor_closure24, A._EvaluateVisitor__loadModule__closure1, A._EvaluateVisitor__combineCss_closure1, A._EvaluateVisitor__combineCss_closure2, A._EvaluateVisitor__combineCss_visitModule0, A._EvaluateVisitor__extendModules_closure1, A._EvaluateVisitor__scopeForAtRoot_closure5, A._EvaluateVisitor__scopeForAtRoot_closure6, A._EvaluateVisitor__scopeForAtRoot_closure7, A._EvaluateVisitor__scopeForAtRoot_closure8, A._EvaluateVisitor__scopeForAtRoot_closure9, A._EvaluateVisitor__scopeForAtRoot_closure10, A._EvaluateVisitor_visitEachRule_closure2, A._EvaluateVisitor_visitEachRule_closure3, A._EvaluateVisitor_visitEachRule__closure0, A._EvaluateVisitor_visitEachRule___closure0, A._EvaluateVisitor_visitAtRule_closure2, A._EvaluateVisitor_visitAtRule_closure4, A._EvaluateVisitor_visitForRule__closure0, A._EvaluateVisitor_visitIfRule_closure0, A._EvaluateVisitor_visitIfRule___closure0, A._EvaluateVisitor__visitDynamicImport__closure3, A._EvaluateVisitor__visitDynamicImport__closure4, A._EvaluateVisitor__visitDynamicImport__closure5, A._EvaluateVisitor_visitIncludeRule_closure3, A._EvaluateVisitor_visitMediaRule_closure2, A._EvaluateVisitor_visitMediaRule_closure4, A._EvaluateVisitor_visitStyleRule_closure4, A._EvaluateVisitor_visitStyleRule_closure5, A._EvaluateVisitor__warnForBogusCombinators_closure0, A._EvaluateVisitor_visitSupportsRule_closure2, A._EvaluateVisitor_visitWhileRule__closure0, A._EvaluateVisitor__slash_recommendation0, A._EvaluateVisitor_visitListExpression_closure0, A._EvaluateVisitor_visitFunctionExpression_closure3, A._EvaluateVisitor__checkCalculationArguments_check0, A._EvaluateVisitor__runUserDefinedCallable____closure0, A._EvaluateVisitor__runBuiltInCallable_closure4, A._EvaluateVisitor__evaluateArguments_closure3, A._EvaluateVisitor__evaluateArguments_closure4, A._EvaluateVisitor__evaluateArguments_closure6, A._EvaluateVisitor__evaluateMacroArguments_closure3, A._EvaluateVisitor__evaluateMacroArguments_closure4, A._EvaluateVisitor__evaluateMacroArguments_closure6, A._EvaluateVisitor_visitCssAtRule_closure2, A._EvaluateVisitor_visitCssKeyframeBlock_closure2, A._EvaluateVisitor_visitCssMediaRule_closure2, A._EvaluateVisitor_visitCssMediaRule_closure4, A._EvaluateVisitor_visitCssStyleRule_closure1, A._EvaluateVisitor_visitCssSupportsRule_closure2, A._EvaluateVisitor__performInterpolationHelper_closure0, A._EvaluateVisitor__withoutSlash_recommendation0, A._EvaluateVisitor__stackFrame_closure0, A._ImportedCssVisitor_visitCssAtRule_closure0, A._ImportedCssVisitor_visitCssMediaRule_closure0, A._ImportedCssVisitor_visitCssStyleRule_closure0, A._ImportedCssVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor_closure, A._EvaluateVisitor_closure0, A._EvaluateVisitor_closure1, A._EvaluateVisitor_closure2, A._EvaluateVisitor_closure3, A._EvaluateVisitor_closure4, A._EvaluateVisitor_closure5, A._EvaluateVisitor_closure6, A._EvaluateVisitor_closure7, A._EvaluateVisitor_closure8, A._EvaluateVisitor_closure9, A._EvaluateVisitor_closure10, A._EvaluateVisitor_closure11, A._EvaluateVisitor__loadModule__closure, A._EvaluateVisitor__combineCss_closure, A._EvaluateVisitor__combineCss_closure0, A._EvaluateVisitor__combineCss_visitModule, A._EvaluateVisitor__extendModules_closure, A._EvaluateVisitor__scopeForAtRoot_closure, A._EvaluateVisitor__scopeForAtRoot_closure0, A._EvaluateVisitor__scopeForAtRoot_closure1, A._EvaluateVisitor__scopeForAtRoot_closure2, A._EvaluateVisitor__scopeForAtRoot_closure3, A._EvaluateVisitor__scopeForAtRoot_closure4, A._EvaluateVisitor_visitEachRule_closure, A._EvaluateVisitor_visitEachRule_closure0, A._EvaluateVisitor_visitEachRule__closure, A._EvaluateVisitor_visitEachRule___closure, A._EvaluateVisitor_visitAtRule_closure, A._EvaluateVisitor_visitAtRule_closure1, A._EvaluateVisitor_visitForRule__closure, A._EvaluateVisitor_visitIfRule_closure, A._EvaluateVisitor_visitIfRule___closure, A._EvaluateVisitor__visitDynamicImport__closure, A._EvaluateVisitor__visitDynamicImport__closure0, A._EvaluateVisitor__visitDynamicImport__closure1, A._EvaluateVisitor_visitIncludeRule_closure0, A._EvaluateVisitor_visitMediaRule_closure, A._EvaluateVisitor_visitMediaRule_closure1, A._EvaluateVisitor_visitStyleRule_closure0, A._EvaluateVisitor_visitStyleRule_closure1, A._EvaluateVisitor__warnForBogusCombinators_closure, A._EvaluateVisitor_visitSupportsRule_closure0, A._EvaluateVisitor_visitWhileRule__closure, A._EvaluateVisitor__slash_recommendation, A._EvaluateVisitor_visitListExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure0, A._EvaluateVisitor__checkCalculationArguments_check, A._EvaluateVisitor__runUserDefinedCallable____closure, A._EvaluateVisitor__runBuiltInCallable_closure1, A._EvaluateVisitor__evaluateArguments_closure, A._EvaluateVisitor__evaluateArguments_closure0, A._EvaluateVisitor__evaluateArguments_closure2, A._EvaluateVisitor__evaluateMacroArguments_closure, A._EvaluateVisitor__evaluateMacroArguments_closure0, A._EvaluateVisitor__evaluateMacroArguments_closure2, A._EvaluateVisitor_visitCssAtRule_closure0, A._EvaluateVisitor_visitCssKeyframeBlock_closure0, A._EvaluateVisitor_visitCssMediaRule_closure, A._EvaluateVisitor_visitCssMediaRule_closure1, A._EvaluateVisitor_visitCssStyleRule_closure, A._EvaluateVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor__performInterpolationHelper_closure, A._EvaluateVisitor__withoutSlash_recommendation, A._EvaluateVisitor__stackFrame_closure, A._ImportedCssVisitor_visitCssAtRule_closure, A._ImportedCssVisitor_visitCssMediaRule_closure, A._ImportedCssVisitor_visitCssStyleRule_closure, A._ImportedCssVisitor_visitCssSupportsRule_closure, A.EveryCssVisitor_visitCssAtRule_closure, A.EveryCssVisitor_visitCssKeyframeBlock_closure, A.EveryCssVisitor_visitCssMediaRule_closure, A.EveryCssVisitor_visitCssStyleRule_closure, A.EveryCssVisitor_visitCssStylesheet_closure, A.EveryCssVisitor_visitCssSupportsRule_closure, A.ReplaceExpressionVisitor_visitListExpression_closure, A.ReplaceExpressionVisitor_visitArgumentInvocation_closure, A.ReplaceExpressionVisitor_visitInterpolation_closure, A.SelectorSearchVisitor_visitComplexSelector_closure, A.SelectorSearchVisitor_visitCompoundSelector_closure, A.serialize_closure, A._SerializeVisitor_visitList_closure, A._SerializeVisitor_visitList_closure0, A._SerializeVisitor_visitList_closure1, A._SerializeVisitor_visitMap_closure, A._SerializeVisitor_visitSelectorList_closure, A.StatementSearchVisitor_visitIfRule_closure, A.StatementSearchVisitor_visitIfRule__closure0, A.StatementSearchVisitor_visitIfRule_closure0, A.StatementSearchVisitor_visitIfRule__closure, A.StatementSearchVisitor_visitChildren_closure, A.SingleMapping_SingleMapping$fromEntries_closure1, A.SingleMapping_toJson_closure, A.Highlighter$__closure, A.Highlighter$___closure, A.Highlighter$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.Chain_Chain$parse_closure, A.Chain_toTrace_closure, A.Chain_toString_closure0, A.Chain_toString__closure0, A.Chain_toString_closure, A.Chain_toString__closure, A.Trace__parseVM_closure, A.Trace$parseV8_closure, A.Trace$parseJSCore_closure, A.Trace$parseFirefox_closure, A.Trace$parseFriendly_closure, A.Trace_terse_closure, A.Trace_foldFrames_closure, A.Trace_foldFrames_closure0, A.Trace_toString_closure0, A.Trace_toString_closure, A.TransformByHandlers_transformByHandlers__closure, A.RateLimit__debounceAggregate_closure0, A.AnySelectorVisitor_visitComplexSelector_closure0, A.AnySelectorVisitor_visitCompoundSelector_closure0, A.ArgumentDeclaration_verify_closure1, A.ArgumentDeclaration_verify_closure2, A.argumentListClass__closure, A.argumentListClass__closure0, A.AsyncBuiltInCallable$mixin_closure0, A.AsyncBuiltInCallable_withDeprecationWarning_closure0, A._compileStylesheet_closure2, A.AsyncEnvironment__getVariableFromGlobalModule_closure0, A.AsyncEnvironment_setVariable_closure3, A.AsyncEnvironment__getFunctionFromGlobalModule_closure0, A.AsyncEnvironment__getMixinFromGlobalModule_closure0, A.AsyncEnvironment_toModule_closure0, A.AsyncEnvironment_toDummyModule_closure0, A._EnvironmentModule__EnvironmentModule_closure17, A._EnvironmentModule__EnvironmentModule_closure18, A._EnvironmentModule__EnvironmentModule_closure19, A._EnvironmentModule__EnvironmentModule_closure20, A._EnvironmentModule__EnvironmentModule_closure21, A._EnvironmentModule__EnvironmentModule_closure22, A._EvaluateVisitor_closure38, A._EvaluateVisitor_closure39, A._EvaluateVisitor_closure40, A._EvaluateVisitor_closure41, A._EvaluateVisitor_closure42, A._EvaluateVisitor_closure43, A._EvaluateVisitor_closure44, A._EvaluateVisitor_closure45, A._EvaluateVisitor_closure46, A._EvaluateVisitor_closure47, A._EvaluateVisitor_closure48, A._EvaluateVisitor_closure49, A._EvaluateVisitor_closure50, A._EvaluateVisitor__loadModule__closure5, A._EvaluateVisitor__combineCss_closure5, A._EvaluateVisitor__combineCss_closure6, A._EvaluateVisitor__combineCss_visitModule2, A._EvaluateVisitor__extendModules_closure5, A._EvaluateVisitor__scopeForAtRoot_closure17, A._EvaluateVisitor__scopeForAtRoot_closure18, A._EvaluateVisitor__scopeForAtRoot_closure19, A._EvaluateVisitor__scopeForAtRoot_closure20, A._EvaluateVisitor__scopeForAtRoot_closure21, A._EvaluateVisitor__scopeForAtRoot_closure22, A._EvaluateVisitor_visitEachRule_closure8, A._EvaluateVisitor_visitEachRule_closure9, A._EvaluateVisitor_visitEachRule__closure2, A._EvaluateVisitor_visitEachRule___closure2, A._EvaluateVisitor_visitAtRule_closure8, A._EvaluateVisitor_visitAtRule_closure10, A._EvaluateVisitor_visitForRule__closure2, A._EvaluateVisitor_visitIfRule_closure2, A._EvaluateVisitor_visitIfRule___closure2, A._EvaluateVisitor__visitDynamicImport__closure11, A._EvaluateVisitor__visitDynamicImport__closure12, A._EvaluateVisitor__visitDynamicImport__closure13, A._EvaluateVisitor_visitIncludeRule_closure9, A._EvaluateVisitor_visitMediaRule_closure8, A._EvaluateVisitor_visitMediaRule_closure10, A._EvaluateVisitor_visitStyleRule_closure12, A._EvaluateVisitor_visitStyleRule_closure13, A._EvaluateVisitor__warnForBogusCombinators_closure2, A._EvaluateVisitor_visitSupportsRule_closure6, A._EvaluateVisitor_visitWhileRule__closure2, A._EvaluateVisitor__slash_recommendation2, A._EvaluateVisitor_visitListExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure9, A._EvaluateVisitor__checkCalculationArguments_check2, A._EvaluateVisitor__runUserDefinedCallable____closure2, A._EvaluateVisitor__runBuiltInCallable_closure10, A._EvaluateVisitor__evaluateArguments_closure11, A._EvaluateVisitor__evaluateArguments_closure12, A._EvaluateVisitor__evaluateArguments_closure14, A._EvaluateVisitor__evaluateMacroArguments_closure11, A._EvaluateVisitor__evaluateMacroArguments_closure12, A._EvaluateVisitor__evaluateMacroArguments_closure14, A._EvaluateVisitor_visitCssAtRule_closure6, A._EvaluateVisitor_visitCssKeyframeBlock_closure6, A._EvaluateVisitor_visitCssMediaRule_closure8, A._EvaluateVisitor_visitCssMediaRule_closure10, A._EvaluateVisitor_visitCssStyleRule_closure5, A._EvaluateVisitor_visitCssSupportsRule_closure6, A._EvaluateVisitor__performInterpolationHelper_closure2, A._EvaluateVisitor__withoutSlash_recommendation2, A._EvaluateVisitor__stackFrame_closure2, A._ImportedCssVisitor_visitCssAtRule_closure2, A._ImportedCssVisitor_visitCssMediaRule_closure2, A._ImportedCssVisitor_visitCssStyleRule_closure2, A._ImportedCssVisitor_visitCssSupportsRule_closure2, A.AsyncImportCache_humanize_closure3, A.AsyncImportCache_humanize_closure4, A.AsyncImportCache_humanize_closure5, A.AsyncImportCache_humanize_closure6, A.booleanClass__closure, A.legacyBooleanClass__closure, A.legacyBooleanClass__closure0, A.BuiltInCallable$mixin_closure0, A.BuiltInCallable_withDeprecationWarning_closure0, A.calculationClass__closure, A.calculationClass__closure0, A.calculationClass__closure1, A.calculationClass__closure2, A.calculationClass__closure3, A.calculationClass__closure4, A.calculationClass__closure5, A.calculationOperationClass__closure, A.calculationOperationClass___closure, A.calculationOperationClass__closure1, A.calculationOperationClass__closure2, A.calculationOperationClass__closure3, A.calculationOperationClass__closure4, A.calculationInterpolationClass__closure1, A.calculationInterpolationClass__closure2, A.SassCalculation__verifyLength_closure0, A.updateCanonicalizeContextPrototype_closure, A.updateCanonicalizeContextPrototype_closure0, A.global_closure44, A.global_closure45, A.global_closure46, A.global_closure47, A.global_closure48, A.global_closure49, A.global_closure50, A.global_closure51, A.global_closure52, A.global_closure53, A.global_closure54, A.global_closure55, A.global_closure56, A.global_closure57, A.global_closure58, A.global_closure59, A.global_closure60, A.global_closure61, A.global_closure62, A.global_closure63, A.global_closure64, A.global_closure65, A.global_closure66, A.global_closure67, A.global_closure68, A.global_closure69, A.global_closure70, A.global_closure71, A.global_closure72, A.global_closure73, A.global_closure74, A.global_closure75, A.global_closure76, A.global_closure77, A.global_closure78, A.global_closure79, A.global__closure0, A.global_closure80, A.global_closure81, A.global_closure82, A.global_closure83, A.global_closure84, A.global_closure85, A.global_closure86, A.module_closure27, A.module_closure28, A.module_closure29, A.module_closure30, A.module_closure31, A.module_closure32, A.module_closure33, A.module_closure34, A.module_closure35, A.module_closure36, A.module_closure37, A.module_closure38, A.module_closure39, A.module_closure40, A.module__closure6, A.module_closure41, A.module_closure42, A.module_closure43, A.module_closure44, A.module_closure45, A.module_closure46, A.module_closure47, A.module_closure48, A.module__closure5, A.module_closure49, A.module_closure_toXyzNoMissing0, A.module_closure50, A._mix_closure0, A._complement_closure0, A._adjust_closure0, A._scale_closure0, A._change_closure0, A._ieHexStr_closure0, A._ieHexStr_closure_hexString0, A._updateComponents_closure1, A._updateComponents_closure2, A._adjustColor_closure0, A._functionString_closure0, A._removedColorFunction_closure0, A._rgb_closure0, A._hsl_closure0, A._parseChannels_closure1, A._parseChannels_closure2, A._colorFromChannels_closure1, A._colorFromChannels_closure2, A._channelFromValue_closure0, A._channelFunction_closure0, A._suggestScaleAndAdjust_closure0, A.colorClass__closure1, A.colorClass__closure3, A.colorClass__closure5, A.colorClass__closure7, A.colorClass___closure, A.colorClass__closure_changedValue, A.colorClass__closure9, A.colorClass__closure10, A.colorClass__closure11, A.colorClass__closure12, A.colorClass__closure13, A.colorClass__closure14, A.colorClass__closure15, A.colorClass__closure16, A.colorClass__closure17, A.colorClass__closure18, A.colorClass__closure19, A.colorClass__closure20, A.colorClass__closure21, A.colorClass__closure22, A.legacyColorClass_closure, A.legacyColorClass__closure, A.legacyColorClass_closure0, A.legacyColorClass_closure1, A.legacyColorClass_closure2, A.legacyColorClass_closure3, A.SassColor$_forSpace_closure0, A.compileAsync__closure, A.compileStringAsync__closure, A.compileStringAsync__closure0, A._wrapAsyncSassExceptions_closure, A._parseFunctions__closure2, A._parseFunctions__closure3, A.nodePackageImporterClass__closure, A._compileStylesheet_closure1, A.AsyncCompiler_addCompilation_closure, A.compilerClass__closure, A.compilerClass__closure0, A.compilerClass__closure1, A.compilerClass__closure2, A.asyncCompilerClass__closure, A.asyncCompilerClass__closure0, A.asyncCompilerClass__closure1, A.asyncCompilerClass__closure2, A.ComplexSelectorComponent_toString_closure0, A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0, A._disallowedFunctionNames_closure0, A.Deprecation_fromId_closure0, A.DeprecationProcessingLogger_summarize_closure1, A.DeprecationProcessingLogger_summarize_closure2, A.versionClass__closure, A.versionClass__closure0, A.EachRule_toString_closure0, A.Environment__getVariableFromGlobalModule_closure0, A.Environment_setVariable_closure3, A.Environment__getFunctionFromGlobalModule_closure0, A.Environment__getMixinFromGlobalModule_closure0, A.Environment_toModule_closure0, A.Environment_toDummyModule_closure0, A._EnvironmentModule__EnvironmentModule_closure11, A._EnvironmentModule__EnvironmentModule_closure12, A._EnvironmentModule__EnvironmentModule_closure13, A._EnvironmentModule__EnvironmentModule_closure14, A._EnvironmentModule__EnvironmentModule_closure15, A._EnvironmentModule__EnvironmentModule_closure16, A._EvaluateVisitor_closure25, A._EvaluateVisitor_closure26, A._EvaluateVisitor_closure27, A._EvaluateVisitor_closure28, A._EvaluateVisitor_closure29, A._EvaluateVisitor_closure30, A._EvaluateVisitor_closure31, A._EvaluateVisitor_closure32, A._EvaluateVisitor_closure33, A._EvaluateVisitor_closure34, A._EvaluateVisitor_closure35, A._EvaluateVisitor_closure36, A._EvaluateVisitor_closure37, A._EvaluateVisitor__loadModule__closure3, A._EvaluateVisitor__combineCss_closure3, A._EvaluateVisitor__combineCss_closure4, A._EvaluateVisitor__combineCss_visitModule1, A._EvaluateVisitor__extendModules_closure3, A._EvaluateVisitor__scopeForAtRoot_closure11, A._EvaluateVisitor__scopeForAtRoot_closure12, A._EvaluateVisitor__scopeForAtRoot_closure13, A._EvaluateVisitor__scopeForAtRoot_closure14, A._EvaluateVisitor__scopeForAtRoot_closure15, A._EvaluateVisitor__scopeForAtRoot_closure16, A._EvaluateVisitor_visitEachRule_closure5, A._EvaluateVisitor_visitEachRule_closure6, A._EvaluateVisitor_visitEachRule__closure1, A._EvaluateVisitor_visitEachRule___closure1, A._EvaluateVisitor_visitAtRule_closure5, A._EvaluateVisitor_visitAtRule_closure7, A._EvaluateVisitor_visitForRule__closure1, A._EvaluateVisitor_visitIfRule_closure1, A._EvaluateVisitor_visitIfRule___closure1, A._EvaluateVisitor__visitDynamicImport__closure7, A._EvaluateVisitor__visitDynamicImport__closure8, A._EvaluateVisitor__visitDynamicImport__closure9, A._EvaluateVisitor_visitIncludeRule_closure6, A._EvaluateVisitor_visitMediaRule_closure5, A._EvaluateVisitor_visitMediaRule_closure7, A._EvaluateVisitor_visitStyleRule_closure8, A._EvaluateVisitor_visitStyleRule_closure9, A._EvaluateVisitor__warnForBogusCombinators_closure1, A._EvaluateVisitor_visitSupportsRule_closure4, A._EvaluateVisitor_visitWhileRule__closure1, A._EvaluateVisitor__slash_recommendation1, A._EvaluateVisitor_visitListExpression_closure1, A._EvaluateVisitor_visitFunctionExpression_closure6, A._EvaluateVisitor__checkCalculationArguments_check1, A._EvaluateVisitor__runUserDefinedCallable____closure1, A._EvaluateVisitor__runBuiltInCallable_closure7, A._EvaluateVisitor__evaluateArguments_closure7, A._EvaluateVisitor__evaluateArguments_closure8, A._EvaluateVisitor__evaluateArguments_closure10, A._EvaluateVisitor__evaluateMacroArguments_closure7, A._EvaluateVisitor__evaluateMacroArguments_closure8, A._EvaluateVisitor__evaluateMacroArguments_closure10, A._EvaluateVisitor_visitCssAtRule_closure4, A._EvaluateVisitor_visitCssKeyframeBlock_closure4, A._EvaluateVisitor_visitCssMediaRule_closure5, A._EvaluateVisitor_visitCssMediaRule_closure7, A._EvaluateVisitor_visitCssStyleRule_closure3, A._EvaluateVisitor_visitCssSupportsRule_closure4, A._EvaluateVisitor__performInterpolationHelper_closure1, A._EvaluateVisitor__withoutSlash_recommendation1, A._EvaluateVisitor__stackFrame_closure1, A._ImportedCssVisitor_visitCssAtRule_closure1, A._ImportedCssVisitor_visitCssMediaRule_closure1, A._ImportedCssVisitor_visitCssStyleRule_closure1, A._ImportedCssVisitor_visitCssSupportsRule_closure1, A.EveryCssVisitor_visitCssAtRule_closure0, A.EveryCssVisitor_visitCssKeyframeBlock_closure0, A.EveryCssVisitor_visitCssMediaRule_closure0, A.EveryCssVisitor_visitCssStyleRule_closure0, A.EveryCssVisitor_visitCssStylesheet_closure0, A.EveryCssVisitor_visitCssSupportsRule_closure0, A.exceptionClass__closure, A.exceptionClass__closure0, A.exceptionClass__closure1, A._IsCalculationSafeVisitor_visitListExpression_closure0, A.ExtensionStore_extensionsWhereTarget_closure0, A.ExtensionStore__extendComplex_closure0, A.ExtensionStore__extendComplex__closure0, A.ExtensionStore__extendCompound_closure2, A.ExtensionStore__extendCompound_closure3, A.ExtensionStore__extendCompound_closure4, A.ExtensionStore__extendSimple_withoutPseudo0, A.ExtensionStore__extendSimple_closure1, A.ExtensionStore__extendSimple_closure2, A.ExtensionStore__extendPseudo_closure4, A.ExtensionStore__extendPseudo_closure5, A.ExtensionStore__extendPseudo_closure6, A.ExtensionStore__extendPseudo_closure7, A.ExtensionStore__extendPseudo_closure8, A.ExtensionStore__trim_closure1, A.ExtensionStore__trim_closure2, A.FilesystemImporter_canonicalize_closure0, A.functionClass__closure, A.functionClass__closure0, A.unifyComplex_closure0, A._weaveParents_closure4, A._weaveParents_closure5, A._weaveParents_closure6, A._mustUnify_closure0, A._mustUnify__closure0, A.paths__closure0, A.paths___closure0, A.listIsSuperselector_closure0, A.listIsSuperselector__closure0, A.complexIsSuperselector_closure1, A.complexIsSuperselector_closure2, A._compatibleWithPreviousCombinator_closure0, A.compoundIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure6, A._selectorPseudoIsSuperselector_closure7, A._selectorPseudoIsSuperselector_closure8, A._selectorPseudoIsSuperselector_closure9, A._selectorPseudoIsSuperselector_closure10, A._selectorPseudoIsSuperselector__closure0, A._selectorPseudoIsSuperselector___closure1, A._selectorPseudoIsSuperselector___closure2, A._selectorPseudoIsSuperselector_closure11, A._selectorPseudoIsSuperselector_closure12, A._selectorPseudoArgs_closure1, A._selectorPseudoArgs_closure2, A.globalFunctions_closure0, A.HwbColorSpace_convert_toRgb0, A.IDSelector_unify_closure0, A.IfRuleClause$__closure0, A.IfRuleClause$___closure0, A.immutableMapToDartMap_closure, A.NodeImporter__tryPath_closure0, A.ImportCache_humanize_closure3, A.ImportCache_humanize_closure4, A.ImportCache_humanize_closure5, A.ImportCache_humanize_closure6, A.Interpolation_toString_closure0, A.InterpolationMap_mapException_closure0, A._realCasePath_helper0, A._realCasePath_helper__closure0, A.listDir__closure1, A.listDir__closure2, A.listDir_closure_list0, A.listDir__list_closure0, A.render_closure0, A._parseFunctions__closure, A._parseFunctions___closure2, A._parseFunctions__closure0, A._parseFunctions__closure1, A._parseFunctions___closure, A._parseImporter_closure, A._parseImporter__closure, A._parseImporter___closure, A.ListExpression_toString_closure0, A._length_closure2, A._nth_closure0, A._setNth_closure0, A._join_closure0, A._append_closure2, A._zip_closure0, A._zip__closure2, A._zip__closure3, A._zip__closure4, A._index_closure2, A._separator_closure0, A._isBracketed_closure0, A._slash_closure0, A.SelectorList_asSassList_closure0, A.SelectorList_nestWithin_closure0, A.SelectorList_nestWithin__closure1, A.SelectorList_nestWithin__closure2, A.SelectorList__nestWithinCompound_closure2, A.SelectorList__nestWithinCompound_closure3, A.SelectorList__nestWithinCompound_closure4, A.SelectorList_withAdditionalCombinators_closure0, A.listClass__closure, A.legacyListClass_closure, A.legacyListClass__closure, A.legacyListClass_closure1, A.legacyListClass_closure2, A.legacyListClass_closure4, A.SassList_isBlank_closure0, A._get_closure0, A._set_closure1, A._set__closure2, A._set_closure2, A._set__closure1, A._merge_closure1, A._merge_closure2, A._merge__closure0, A._deepMerge_closure0, A._deepRemove_closure0, A._deepRemove__closure0, A._remove_closure1, A._remove_closure2, A._keys_closure0, A._values_closure0, A._hasKey_closure0, A._modify_modifyNestedMap0, A.MapExtensions_get_pairs_closure0, A.mapClass__closure, A.mapClass__closure0, A.legacyMapClass_closure, A.legacyMapClass__closure, A.legacyMapClass__closure0, A.legacyMapClass_closure2, A.legacyMapClass_closure3, A.legacyMapClass_closure4, A.global_closure43, A.module_closure26, A._ceil_closure0, A._clamp_closure0, A._floor_closure0, A._max_closure0, A._min_closure0, A._round_closure0, A._hypot_closure0, A._hypot__closure0, A._log_closure0, A._pow_closure0, A._atan2_closure0, A._compatible_closure0, A._isUnitless_closure0, A._unit_closure0, A._percentage_closure0, A._randomFunction_closure0, A._div_closure0, A._singleArgumentMathFunc_closure0, A._numberFunction_closure0, A._shared_closure3, A._shared_closure4, A._shared_closure5, A._shared_closure6, A.moduleFunctions_closure2, A.moduleFunctions_closure3, A.moduleFunctions__closure0, A.moduleFunctions_closure4, A.mixinClass__closure, A.mixinClass__closure0, A.ModifiableCssNode_hasFollowingSibling_closure0, A.NodePackageImporter__nodePackageExportsResolve_closure3, A.NodePackageImporter__nodePackageExportsResolve_closure4, A.NodePackageImporter__nodePackageExportsResolve_closure5, A.NodePackageImporter__nodePackageExportsResolve_closure6, A.NodePackageImporter__nodePackageExportsResolve__closure1, A.NodePackageImporter__nodePackageExportsResolve__closure2, A.NodePackageImporter__getMainExport_closure0, A.legacyNullClass__closure, A.numberClass__closure, A.numberClass__closure0, A.numberClass__closure1, A.numberClass__closure2, A.numberClass__closure3, A.numberClass__closure4, A.numberClass__closure5, A.numberClass__closure6, A.numberClass__closure7, A.numberClass__closure8, A.numberClass__closure9, A.numberClass__closure12, A.numberClass__closure13, A.numberClass__closure14, A.numberClass__closure15, A.numberClass__closure16, A.numberClass__closure17, A.numberClass__closure18, A.numberClass__closure19, A.legacyNumberClass_closure, A.legacyNumberClass_closure0, A.legacyNumberClass_closure2, A._parseNumber_closure, A._parseNumber_closure0, A.SassNumber__coerceOrConvertValue_closure3, A.SassNumber__coerceOrConvertValue_closure5, A.SassNumber_multiplyUnits_closure3, A.SassNumber_multiplyUnits_closure5, A.SassNumber__areAnyConvertible_closure0, A.SassNumber__canonicalizeUnitList_closure0, A.SassNumber_unitSuggestion_closure1, A.SassNumber_unitSuggestion_closure2, A.ParentStatement_closure0, A.ParentStatement__closure0, A.loadParserExports_closure, A.loadParserExports_closure0, A._updateAstPrototypes_closure, A._updateAstPrototypes_closure0, A._updateAstPrototypes_closure1, A._updateAstPrototypes_closure4, A.Parser_escape_closure0, A.Parser_scanIdentChar_matches0, A._PrefixedKeys_iterator_closure0, A.PseudoSelector_specificity__closure1, A.PseudoSelector_specificity__closure2, A.PseudoSelector_unify_closure0, A.JSClassExtension_setCustomInspect_closure, A.ReplaceExpressionVisitor_visitListExpression_closure0, A.ReplaceExpressionVisitor_visitArgumentInvocation_closure0, A.ReplaceExpressionVisitor_visitInterpolation_closure0, A.SassParser_styleRuleSelector_closure0, A.SassParser__peekIndentation_closure1, A.SassParser__peekIndentation_closure2, A._wrapMain_closure, A._wrapMain_closure0, A._IsBogusVisitor_visitComplexSelector_closure0, A._IsUselessVisitor_visitComplexSelector_closure0, A._nest_closure0, A._nest__closure1, A._append_closure1, A._append__closure1, A._append___closure0, A._extend_closure0, A._replace_closure0, A._unify_closure0, A._isSuperselector_closure0, A._simpleSelectors_closure0, A._simpleSelectors__closure0, A._parse_closure0, A.SelectorSearchVisitor_visitComplexSelector_closure0, A.SelectorSearchVisitor_visitCompoundSelector_closure0, A.serialize_closure0, A._SerializeVisitor_visitList_closure2, A._SerializeVisitor_visitList_closure3, A._SerializeVisitor_visitList_closure4, A._SerializeVisitor_visitMap_closure0, A._SerializeVisitor_visitSelectorList_closure0, A.SimpleSelector_isSuperselector_closure0, A.SimpleSelector_isSuperselector__closure0, A.SingleUnitSassNumber__coerceToUnit_closure0, A.SingleUnitSassNumber__coerceValueToUnit_closure0, A.SingleUnitSassNumber_multiplyUnits_closure1, A.SourceMapBuffer_buildSourceMap_closure0, A.updateSourceSpanPrototype_closure0, A.updateSourceSpanPrototype_closure1, A.updateSourceSpanPrototype_closure2, A.updateSourceSpanPrototype__closure, A.updateSourceSpanPrototype_closure3, A.updateSourceSpanPrototype_closure4, A.updateSourceSpanPrototype_closure5, A.updateSourceSpanPrototype_closure6, A.StatementSearchVisitor_visitIfRule_closure1, A.StatementSearchVisitor_visitIfRule__closure2, A.StatementSearchVisitor_visitIfRule_closure2, A.StatementSearchVisitor_visitIfRule__closure1, A.StatementSearchVisitor_visitChildren_closure0, A.module_closure25, A.module__closure3, A.module__closure4, A._unquote_closure0, A._quote_closure0, A._length_closure1, A._insert_closure0, A._index_closure1, A._slice_closure0, A._toUpperCase_closure0, A._toLowerCase_closure0, A._uniqueId_closure0, A.stringClass__closure, A.stringClass__closure0, A.stringClass__closure1, A.stringClass__closure2, A.stringClass__closure3, A.legacyStringClass_closure, A.legacyStringClass_closure0, A.StylesheetParser_parse__closure2, A.StylesheetParser__expression_addSingleExpression0, A.StylesheetParser__expression_addOperator0, A.StylesheetParser__isHexColor_closure0, A.StylesheetParser__unicodeRange_closure1, A.StylesheetParser__unicodeRange_closure2, A.StylesheetParser_trySpecialFunction_closure0, A._UnprefixedKeys_iterator_closure1, A._UnprefixedKeys_iterator_closure2, A._exactlyOne_closure0, A.futureToPromise__closure0, A.indent_closure0, A.flattenVertically_closure1, A.flattenVertically_closure2, A.valueClass__closure, A.valueClass__closure0, A.valueClass__closure1, A.valueClass__closure2, A.valueClass__closure3, A.valueClass__closure4, A.valueClass__closure5, A.valueClass__closure7, A.valueClass__closure8, A.valueClass__closure9, A.valueClass__closure10, A.valueClass__closure11, A.valueClass__closure12, A.valueClass__closure13, A.valueClass__closure14, A.valueClass__closure15, A.valueClass__closure17, A.valueClass__closure18]); + _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.Primitives_functionNoSuchMethod_closure, A.JsLinkedHashMap_addAll_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A.Future_wait_handleError, A._Future__chainForeignFuture_closure0, A.Stream_Stream$fromFuture_closure0, A._AddStreamState_makeErrorHandler_closure, A._HashMap_addAll_closure, A.HashMap_HashMap$from_closure, A.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_addAll_closure, A.MapBase_mapToString_closure, A._JsonMap_addAll_closure, A._JsonStringifier_writeMap_closure, A.NoSuchMethodError_toString_closure, A.Uri__parseIPv4Address_error, A.Uri_parseIPv6Address_error, A.Uri_parseIPv6Address_parseHex, A._createTables_build, A.Parser_parse_closure, A.FutureGroup_add_closure0, A.StreamQueue__ensureListening_closure1, A.futureToPromise_closure, A.PathMap__create_closure, A.IfRule_toString_closure, A.ComplexSelector_specificity_closure, A.CompoundSelector_specificity_closure, A.ExtensionStore_clone_closure, A._weaveParents_closure, A.paths_closure, A._nest__closure0, A._append__closure0, A.ImportCache_clearCanonicalize_closure, A.StylesheetParser__styleRule_closure, A.StylesheetParser__tryDeclarationChildren_closure, A.StylesheetParser__atRootRule_closure, A.StylesheetParser__atRootRule_closure0, A.StylesheetParser__eachRule_closure, A.StylesheetParser__functionRule_closure, A.StylesheetParser__forRule_closure0, A.StylesheetParser__includeRule_closure, A.StylesheetParser_mediaRule_closure, A.StylesheetParser__mixinRule_closure, A.StylesheetParser_mozDocumentRule_closure, A.StylesheetParser_supportsRule_closure, A.StylesheetParser__whileRule_closure, A.StylesheetParser_unknownAtRule_closure, A.longestCommonSubsequence_backtrack, A.mapAddAll2_closure, A.SassNumber_plus_closure, A.SassNumber_minus_closure, A.SassNumber__canonicalMultiplier_closure, A._EvaluateVisitor__closure3, A._EvaluateVisitor__closure4, A._EvaluateVisitor_visitForwardRule_closure1, A._EvaluateVisitor_visitForwardRule_closure2, A._EvaluateVisitor_visitUseRule_closure0, A._EvaluateVisitor__evaluateArguments_closure5, A._EvaluateVisitor__evaluateMacroArguments_closure5, A._EvaluateVisitor__addRestMap_closure0, A._EvaluateVisitor__closure, A._EvaluateVisitor__closure0, A._EvaluateVisitor_visitForwardRule_closure, A._EvaluateVisitor_visitForwardRule_closure0, A._EvaluateVisitor_visitUseRule_closure, A._EvaluateVisitor__evaluateArguments_closure1, A._EvaluateVisitor__evaluateMacroArguments_closure1, A._EvaluateVisitor__addRestMap_closure, A.SingleMapping_toJson_closure0, A.Highlighter__collateLines_closure0, A.Frame_Frame$parseV8_closure_parseLocation, A.TransformByHandlers_transformByHandlers__closure1, A.RateLimit__debounceAggregate_closure, A._EvaluateVisitor__closure11, A._EvaluateVisitor__closure12, A._EvaluateVisitor_visitForwardRule_closure5, A._EvaluateVisitor_visitForwardRule_closure6, A._EvaluateVisitor_visitUseRule_closure2, A._EvaluateVisitor__evaluateArguments_closure13, A._EvaluateVisitor__evaluateMacroArguments_closure13, A._EvaluateVisitor__addRestMap_closure2, A.calculationOperationClass__closure0, A.calculationInterpolationClass__closure, A.calculationInterpolationClass__closure0, A.colorClass__closure, A.colorClass__closure0, A.colorClass__closure2, A.colorClass__closure4, A.colorClass__closure6, A.colorClass__closure8, A.legacyColorClass_closure4, A.legacyColorClass_closure5, A.legacyColorClass_closure6, A.legacyColorClass_closure7, A._parseFunctions_closure0, A.ComplexSelector_specificity_closure0, A.CompoundSelector_specificity_closure0, A._EvaluateVisitor__closure7, A._EvaluateVisitor__closure8, A._EvaluateVisitor_visitForwardRule_closure3, A._EvaluateVisitor_visitForwardRule_closure4, A._EvaluateVisitor_visitUseRule_closure1, A._EvaluateVisitor__evaluateArguments_closure9, A._EvaluateVisitor__evaluateMacroArguments_closure9, A._EvaluateVisitor__addRestMap_closure1, A.ExtensionStore_clone_closure0, A._weaveParents_closure3, A.paths_closure0, A.IfRule_toString_closure0, A.main_closure, A.main_closure0, A.render_closure1, A._parseFunctions_closure, A.listClass__closure0, A.legacyListClass_closure0, A.legacyListClass_closure3, A.mapClass__closure1, A.legacyMapClass_closure0, A.legacyMapClass_closure1, A.numberClass__closure10, A.numberClass__closure11, A.legacyNumberClass_closure1, A.legacyNumberClass_closure3, A.SassNumber_plus_closure0, A.SassNumber_minus_closure0, A.SassNumber__canonicalMultiplier_closure0, A._updateAstPrototypes_closure2, A._updateAstPrototypes_closure3, A.JSClassExtension_get_defineStaticMethod_closure, A.JSClassExtension_get_defineMethod_closure, A.JSClassExtension_get_defineGetter_closure, A._nest__closure2, A._append__closure2, A.legacyStringClass_closure1, A.StylesheetParser__styleRule_closure0, A.StylesheetParser__tryDeclarationChildren_closure0, A.StylesheetParser__atRootRule_closure1, A.StylesheetParser__atRootRule_closure2, A.StylesheetParser__eachRule_closure0, A.StylesheetParser__functionRule_closure0, A.StylesheetParser__forRule_closure2, A.StylesheetParser__includeRule_closure0, A.StylesheetParser_mediaRule_closure0, A.StylesheetParser__mixinRule_closure0, A.StylesheetParser_mozDocumentRule_closure0, A.StylesheetParser_supportsRule_closure0, A.StylesheetParser__whileRule_closure0, A.StylesheetParser_unknownAtRule_closure0, A.futureToPromise_closure0, A.futureToPromise__closure1, A.objectToMap_closure, A.longestCommonSubsequence_backtrack0, A.mapAddAll2_closure0, A.valueClass__closure6, A.valueClass__closure16]); + _inherit(A.CastList, A._CastListBase); + _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A.UnmodifiableMapBase, A._JsonMap, A.MergedMapView, A.MergedMapView0]); + _inheritMany(A.Error, [A.LateError, A.ReachabilityError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A._CyclicInitializationError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.NoSuchMethodError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError]); + _inherit(A.UnmodifiableListBase, A.ListBase); + _inheritMany(A.UnmodifiableListBase, [A.CodeUnits, A.UnmodifiableListView]); + _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainForeignFuture_closure1, A._Future__chainCoreFutureAsync_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteError_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A.Stream_length_closure0, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._AddStreamState_cancel_closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.Parser__setOption_closure, A.StreamGroup_add_closure, A.StreamGroup_add_closure0, A.StreamGroup__listenToStream_closure, A.StreamQueue__ensureListening_closure0, A._isStrictMode_closure, A.ReplAdapter_runAsync_closure, A.ParsedPath__splitExtension_closure0, A.PseudoSelector_specificity_closure, A.AsyncEnvironment_setVariable_closure, A.AsyncEnvironment_setVariable_closure1, A.AsyncImportCache_canonicalize_closure, A.AsyncImportCache__canonicalize_closure, A.AsyncImportCache_importCanonical_closure, A.Environment_setVariable_closure, A.Environment_setVariable_closure1, A.ExecutableOptions__parser_closure, A.ExecutableOptions_interactive_closure, A.ExecutableOptions_fatalDeprecations_closure, A.ExtensionStore__registerSelector_closure, A.ExtensionStore_addExtension_closure, A.ExtensionStore_addExtension_closure0, A.ExtensionStore_addExtension_closure1, A.ExtensionStore__extendExistingExtensions_closure, A.ExtensionStore__extendExistingExtensions_closure0, A.ExtensionStore_addExtensions_closure, A._changeColor_closure, A.ImportCache_canonicalize_closure, A.ImportCache__canonicalize_closure, A.ImportCache_importCanonical_closure, A.resolveImportPath_closure, A.resolveImportPath_closure0, A._tryPathAsDirectory_closure, A._realCasePath_helper_closure, A._readFile_closure, A.writeFile_closure, A.deleteFile_closure, A.fileExists_closure, A.dirExists_closure, A.ensureDir_closure, A.listDir_closure, A.modificationTime_closure, A.watchDir_closure3, A.watchDir__closure, A.AtRootQueryParser_parse_closure, A.KeyframeSelectorParser_parse_closure, A.MediaQueryParser_parse_closure, A.Parser__parseIdentifier_closure, A.Parser_spanFrom_closure, A.SassParser_children_closure, A.SelectorParser_parse_closure, A.SelectorParser_parseCompoundSelector_closure, A.StylesheetParser_parse_closure, A.StylesheetParser_parse__closure, A.StylesheetParser_parseArgumentDeclaration_closure, A.StylesheetParser_parseVariableDeclaration_closure, A.StylesheetParser_parseUseRule_closure, A.StylesheetParser__parseSingleProduction_closure, A.StylesheetParser__statement_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure0, A.StylesheetParser__forRule_closure, A.StylesheetParser__memberList_closure, A.StylesheetParser__expression_resetState, A.StylesheetParser__expression_resolveOneOperation, A.StylesheetParser__expression_resolveOperations, A.StylesheetParser__expression_resolveSpaceExpressions, A.StylesheetParser_expressionUntilComma_closure, A.StylesheetParser_namespacedExpression_closure, A.StylesheetParser__expressionUntilComparison_closure, A.StylesheetParser__publicIdentifier_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure, A.StylesheetGraph__add_closure, A.StylesheetGraph_addCanonical_closure, A.StylesheetGraph_reload_closure, A.StylesheetGraph__nodeFor_closure, A.StylesheetGraph__nodeFor_closure0, A.SassNumber__coerceOrConvertValue_compatibilityException, A.SassNumber__coerceOrConvertValue_closure0, A.SassNumber__coerceOrConvertValue_closure2, A.SassNumber_multiplyUnits_closure0, A.SassNumber_multiplyUnits_closure2, A.SingleUnitSassNumber_multiplyUnits_closure0, A._EvaluateVisitor__closure6, A._EvaluateVisitor__closure5, A._EvaluateVisitor_run_closure0, A._EvaluateVisitor_run__closure0, A._EvaluateVisitor__loadModule_closure1, A._EvaluateVisitor__loadModule_closure2, A._EvaluateVisitor__loadModule__closure2, A._EvaluateVisitor__execute_closure0, A._EvaluateVisitor__extendModules_closure2, A._EvaluateVisitor_visitAtRootRule_closure1, A._EvaluateVisitor_visitAtRootRule_closure2, A._EvaluateVisitor__scopeForAtRoot__closure0, A._EvaluateVisitor_visitContentRule_closure0, A._EvaluateVisitor_visitDeclaration_closure0, A._EvaluateVisitor_visitEachRule_closure4, A._EvaluateVisitor_visitAtRule_closure3, A._EvaluateVisitor_visitAtRule__closure0, A._EvaluateVisitor_visitForRule_closure4, A._EvaluateVisitor_visitForRule_closure5, A._EvaluateVisitor_visitForRule_closure6, A._EvaluateVisitor_visitForRule_closure7, A._EvaluateVisitor_visitForRule_closure8, A._EvaluateVisitor__registerCommentsForModule_closure0, A._EvaluateVisitor_visitIfRule__closure0, A._EvaluateVisitor__visitDynamicImport_closure0, A._EvaluateVisitor__visitDynamicImport__closure6, A._EvaluateVisitor__applyMixin_closure1, A._EvaluateVisitor__applyMixin__closure2, A._EvaluateVisitor__applyMixin_closure2, A._EvaluateVisitor__applyMixin__closure1, A._EvaluateVisitor__applyMixin___closure0, A._EvaluateVisitor__applyMixin____closure0, A._EvaluateVisitor_visitIncludeRule_closure2, A._EvaluateVisitor_visitIncludeRule_closure4, A._EvaluateVisitor_visitMediaRule_closure3, A._EvaluateVisitor_visitMediaRule__closure0, A._EvaluateVisitor_visitMediaRule___closure0, A._EvaluateVisitor_visitStyleRule_closure3, A._EvaluateVisitor_visitStyleRule_closure6, A._EvaluateVisitor_visitStyleRule__closure0, A._EvaluateVisitor_visitSupportsRule_closure1, A._EvaluateVisitor_visitSupportsRule__closure0, A._EvaluateVisitor__visitSupportsCondition_closure0, A._EvaluateVisitor_visitVariableDeclaration_closure2, A._EvaluateVisitor_visitVariableDeclaration_closure3, A._EvaluateVisitor_visitVariableDeclaration_closure4, A._EvaluateVisitor_visitWarnRule_closure0, A._EvaluateVisitor_visitWhileRule_closure0, A._EvaluateVisitor_visitBinaryOperationExpression_closure0, A._EvaluateVisitor_visitVariableExpression_closure0, A._EvaluateVisitor_visitUnaryOperationExpression_closure0, A._EvaluateVisitor_visitFunctionExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure4, A._EvaluateVisitor__visitCalculationExpression_closure0, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0, A._EvaluateVisitor__runUserDefinedCallable_closure0, A._EvaluateVisitor__runUserDefinedCallable__closure0, A._EvaluateVisitor__runUserDefinedCallable___closure0, A._EvaluateVisitor__runFunctionCallable_closure0, A._EvaluateVisitor__runBuiltInCallable_closure2, A._EvaluateVisitor__runBuiltInCallable_closure3, A._EvaluateVisitor__verifyArguments_closure0, A._EvaluateVisitor_visitCssAtRule_closure1, A._EvaluateVisitor_visitCssKeyframeBlock_closure1, A._EvaluateVisitor_visitCssMediaRule_closure3, A._EvaluateVisitor_visitCssMediaRule__closure0, A._EvaluateVisitor_visitCssMediaRule___closure0, A._EvaluateVisitor_visitCssStyleRule_closure2, A._EvaluateVisitor_visitCssStyleRule__closure0, A._EvaluateVisitor_visitCssSupportsRule_closure1, A._EvaluateVisitor_visitCssSupportsRule__closure0, A._EvaluateVisitor__serialize_closure0, A._EvaluateVisitor__expressionNode_closure0, A._EvaluateVisitor__closure2, A._EvaluateVisitor__closure1, A._EvaluateVisitor_run_closure, A._EvaluateVisitor_run__closure, A._EvaluateVisitor_runExpression_closure, A._EvaluateVisitor_runExpression__closure, A._EvaluateVisitor_runExpression___closure, A._EvaluateVisitor_runStatement_closure, A._EvaluateVisitor_runStatement__closure, A._EvaluateVisitor_runStatement___closure, A._EvaluateVisitor__loadModule_closure, A._EvaluateVisitor__loadModule_closure0, A._EvaluateVisitor__loadModule__closure0, A._EvaluateVisitor__execute_closure, A._EvaluateVisitor__extendModules_closure0, A._EvaluateVisitor_visitAtRootRule_closure, A._EvaluateVisitor_visitAtRootRule_closure0, A._EvaluateVisitor__scopeForAtRoot__closure, A._EvaluateVisitor_visitContentRule_closure, A._EvaluateVisitor_visitDeclaration_closure, A._EvaluateVisitor_visitEachRule_closure1, A._EvaluateVisitor_visitAtRule_closure0, A._EvaluateVisitor_visitAtRule__closure, A._EvaluateVisitor_visitForRule_closure, A._EvaluateVisitor_visitForRule_closure0, A._EvaluateVisitor_visitForRule_closure1, A._EvaluateVisitor_visitForRule_closure2, A._EvaluateVisitor_visitForRule_closure3, A._EvaluateVisitor__registerCommentsForModule_closure, A._EvaluateVisitor_visitIfRule__closure, A._EvaluateVisitor__visitDynamicImport_closure, A._EvaluateVisitor__visitDynamicImport__closure2, A._EvaluateVisitor__applyMixin_closure, A._EvaluateVisitor__applyMixin__closure0, A._EvaluateVisitor__applyMixin_closure0, A._EvaluateVisitor__applyMixin__closure, A._EvaluateVisitor__applyMixin___closure, A._EvaluateVisitor__applyMixin____closure, A._EvaluateVisitor_visitIncludeRule_closure, A._EvaluateVisitor_visitIncludeRule_closure1, A._EvaluateVisitor_visitMediaRule_closure0, A._EvaluateVisitor_visitMediaRule__closure, A._EvaluateVisitor_visitMediaRule___closure, A._EvaluateVisitor_visitStyleRule_closure, A._EvaluateVisitor_visitStyleRule_closure2, A._EvaluateVisitor_visitStyleRule__closure, A._EvaluateVisitor_visitSupportsRule_closure, A._EvaluateVisitor_visitSupportsRule__closure, A._EvaluateVisitor__visitSupportsCondition_closure, A._EvaluateVisitor_visitVariableDeclaration_closure, A._EvaluateVisitor_visitVariableDeclaration_closure0, A._EvaluateVisitor_visitVariableDeclaration_closure1, A._EvaluateVisitor_visitWarnRule_closure, A._EvaluateVisitor_visitWhileRule_closure, A._EvaluateVisitor_visitBinaryOperationExpression_closure, A._EvaluateVisitor_visitVariableExpression_closure, A._EvaluateVisitor_visitUnaryOperationExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure1, A._EvaluateVisitor__visitCalculationExpression_closure, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure, A._EvaluateVisitor__runUserDefinedCallable_closure, A._EvaluateVisitor__runUserDefinedCallable__closure, A._EvaluateVisitor__runUserDefinedCallable___closure, A._EvaluateVisitor__runFunctionCallable_closure, A._EvaluateVisitor__runBuiltInCallable_closure, A._EvaluateVisitor__runBuiltInCallable_closure0, A._EvaluateVisitor__verifyArguments_closure, A._EvaluateVisitor_visitCssAtRule_closure, A._EvaluateVisitor_visitCssKeyframeBlock_closure, A._EvaluateVisitor_visitCssMediaRule_closure0, A._EvaluateVisitor_visitCssMediaRule__closure, A._EvaluateVisitor_visitCssMediaRule___closure, A._EvaluateVisitor_visitCssStyleRule_closure0, A._EvaluateVisitor_visitCssStyleRule__closure, A._EvaluateVisitor_visitCssSupportsRule_closure, A._EvaluateVisitor_visitCssSupportsRule__closure, A._EvaluateVisitor__serialize_closure, A._EvaluateVisitor__expressionNode_closure, A._SerializeVisitor_visitCssComment_closure, A._SerializeVisitor_visitCssAtRule_closure, A._SerializeVisitor_visitCssMediaRule_closure, A._SerializeVisitor_visitCssImport_closure, A._SerializeVisitor_visitCssImport__closure, A._SerializeVisitor_visitCssKeyframeBlock_closure, A._SerializeVisitor_visitCssStyleRule_closure, A._SerializeVisitor_visitCssSupportsRule_closure, A._SerializeVisitor_visitCssDeclaration_closure, A._SerializeVisitor_visitCssDeclaration_closure0, A._SerializeVisitor__write_closure, A._SerializeVisitor__visitChildren_closure, A._SerializeVisitor__visitChildren_closure0, A.SingleMapping_SingleMapping$fromEntries_closure, A.SingleMapping_SingleMapping$fromEntries_closure0, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeLabel_closure, A.Highlighter__writeLabel_closure0, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.Frame_Frame$parseVM_closure, A.Frame_Frame$parseV8_closure, A.Frame_Frame$_parseFirefoxEval_closure, A.Frame_Frame$parseFirefox_closure, A.Frame_Frame$parseFriendly_closure, A.LazyTrace_terse_closure, A.Trace_Trace$from_closure, A.TransformByHandlers_transformByHandlers_closure, A.TransformByHandlers_transformByHandlers__closure0, A.TransformByHandlers_transformByHandlers__closure2, A.RateLimit__debounceAggregate_closure_emit, A.RateLimit__debounceAggregate__closure, A.argumentListClass_closure, A.JSToDartAsyncImporter_canonicalize_closure, A.JSToDartAsyncImporter_load_closure, A.AsyncEnvironment_setVariable_closure2, A.AsyncEnvironment_setVariable_closure4, A._EvaluateVisitor__closure14, A._EvaluateVisitor__closure13, A._EvaluateVisitor_run_closure2, A._EvaluateVisitor_run__closure2, A._EvaluateVisitor__loadModule_closure5, A._EvaluateVisitor__loadModule_closure6, A._EvaluateVisitor__loadModule__closure6, A._EvaluateVisitor__execute_closure2, A._EvaluateVisitor__extendModules_closure6, A._EvaluateVisitor_visitAtRootRule_closure5, A._EvaluateVisitor_visitAtRootRule_closure6, A._EvaluateVisitor__scopeForAtRoot__closure2, A._EvaluateVisitor_visitContentRule_closure2, A._EvaluateVisitor_visitDeclaration_closure2, A._EvaluateVisitor_visitEachRule_closure10, A._EvaluateVisitor_visitAtRule_closure9, A._EvaluateVisitor_visitAtRule__closure2, A._EvaluateVisitor_visitForRule_closure14, A._EvaluateVisitor_visitForRule_closure15, A._EvaluateVisitor_visitForRule_closure16, A._EvaluateVisitor_visitForRule_closure17, A._EvaluateVisitor_visitForRule_closure18, A._EvaluateVisitor__registerCommentsForModule_closure2, A._EvaluateVisitor_visitIfRule__closure2, A._EvaluateVisitor__visitDynamicImport_closure2, A._EvaluateVisitor__visitDynamicImport__closure14, A._EvaluateVisitor__applyMixin_closure5, A._EvaluateVisitor__applyMixin__closure6, A._EvaluateVisitor__applyMixin_closure6, A._EvaluateVisitor__applyMixin__closure5, A._EvaluateVisitor__applyMixin___closure2, A._EvaluateVisitor__applyMixin____closure2, A._EvaluateVisitor_visitIncludeRule_closure8, A._EvaluateVisitor_visitIncludeRule_closure10, A._EvaluateVisitor_visitMediaRule_closure9, A._EvaluateVisitor_visitMediaRule__closure2, A._EvaluateVisitor_visitMediaRule___closure2, A._EvaluateVisitor_visitStyleRule_closure11, A._EvaluateVisitor_visitStyleRule_closure14, A._EvaluateVisitor_visitStyleRule__closure2, A._EvaluateVisitor_visitSupportsRule_closure5, A._EvaluateVisitor_visitSupportsRule__closure2, A._EvaluateVisitor__visitSupportsCondition_closure2, A._EvaluateVisitor_visitVariableDeclaration_closure8, A._EvaluateVisitor_visitVariableDeclaration_closure9, A._EvaluateVisitor_visitVariableDeclaration_closure10, A._EvaluateVisitor_visitWarnRule_closure2, A._EvaluateVisitor_visitWhileRule_closure2, A._EvaluateVisitor_visitBinaryOperationExpression_closure2, A._EvaluateVisitor_visitVariableExpression_closure2, A._EvaluateVisitor_visitUnaryOperationExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure8, A._EvaluateVisitor_visitFunctionExpression_closure10, A._EvaluateVisitor__visitCalculationExpression_closure2, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2, A._EvaluateVisitor__runUserDefinedCallable_closure2, A._EvaluateVisitor__runUserDefinedCallable__closure2, A._EvaluateVisitor__runUserDefinedCallable___closure2, A._EvaluateVisitor__runFunctionCallable_closure2, A._EvaluateVisitor__runBuiltInCallable_closure8, A._EvaluateVisitor__runBuiltInCallable_closure9, A._EvaluateVisitor__verifyArguments_closure2, A._EvaluateVisitor_visitCssAtRule_closure5, A._EvaluateVisitor_visitCssKeyframeBlock_closure5, A._EvaluateVisitor_visitCssMediaRule_closure9, A._EvaluateVisitor_visitCssMediaRule__closure2, A._EvaluateVisitor_visitCssMediaRule___closure2, A._EvaluateVisitor_visitCssStyleRule_closure6, A._EvaluateVisitor_visitCssStyleRule__closure2, A._EvaluateVisitor_visitCssSupportsRule_closure5, A._EvaluateVisitor_visitCssSupportsRule__closure2, A._EvaluateVisitor__serialize_closure2, A._EvaluateVisitor__expressionNode_closure2, A.JSToDartAsyncFileImporter_canonicalize_closure, A.AsyncImportCache_canonicalize_closure0, A.AsyncImportCache__canonicalize_closure0, A.AsyncImportCache_importCanonical_closure0, A.AtRootQueryParser_parse_closure0, A.booleanClass_closure, A.legacyBooleanClass_closure, A.calculationClass_closure, A.calculationOperationClass_closure, A.calculationInterpolationClass_closure, A._changeColor_closure0, A.colorClass_closure, A.compileAsync_closure, A.compileStringAsync_closure, A._parseFunctions___closure6, A._parseFunctions___closure5, A.nodePackageImporterClass_closure, A.compilerClass_closure, A.asyncCompilerClass_closure, A.asyncCompilerClass___closure, A.initAsyncCompiler_closure, A.deprecations_closure, A.parseDeprecations_closure, A.versionClass_closure, A.Environment_setVariable_closure2, A.Environment_setVariable_closure4, A._EvaluateVisitor__closure10, A._EvaluateVisitor__closure9, A._EvaluateVisitor_run_closure1, A._EvaluateVisitor_run__closure1, A._EvaluateVisitor__loadModule_closure3, A._EvaluateVisitor__loadModule_closure4, A._EvaluateVisitor__loadModule__closure4, A._EvaluateVisitor__execute_closure1, A._EvaluateVisitor__extendModules_closure4, A._EvaluateVisitor_visitAtRootRule_closure3, A._EvaluateVisitor_visitAtRootRule_closure4, A._EvaluateVisitor__scopeForAtRoot__closure1, A._EvaluateVisitor_visitContentRule_closure1, A._EvaluateVisitor_visitDeclaration_closure1, A._EvaluateVisitor_visitEachRule_closure7, A._EvaluateVisitor_visitAtRule_closure6, A._EvaluateVisitor_visitAtRule__closure1, A._EvaluateVisitor_visitForRule_closure9, A._EvaluateVisitor_visitForRule_closure10, A._EvaluateVisitor_visitForRule_closure11, A._EvaluateVisitor_visitForRule_closure12, A._EvaluateVisitor_visitForRule_closure13, A._EvaluateVisitor__registerCommentsForModule_closure1, A._EvaluateVisitor_visitIfRule__closure1, A._EvaluateVisitor__visitDynamicImport_closure1, A._EvaluateVisitor__visitDynamicImport__closure10, A._EvaluateVisitor__applyMixin_closure3, A._EvaluateVisitor__applyMixin__closure4, A._EvaluateVisitor__applyMixin_closure4, A._EvaluateVisitor__applyMixin__closure3, A._EvaluateVisitor__applyMixin___closure1, A._EvaluateVisitor__applyMixin____closure1, A._EvaluateVisitor_visitIncludeRule_closure5, A._EvaluateVisitor_visitIncludeRule_closure7, A._EvaluateVisitor_visitMediaRule_closure6, A._EvaluateVisitor_visitMediaRule__closure1, A._EvaluateVisitor_visitMediaRule___closure1, A._EvaluateVisitor_visitStyleRule_closure7, A._EvaluateVisitor_visitStyleRule_closure10, A._EvaluateVisitor_visitStyleRule__closure1, A._EvaluateVisitor_visitSupportsRule_closure3, A._EvaluateVisitor_visitSupportsRule__closure1, A._EvaluateVisitor__visitSupportsCondition_closure1, A._EvaluateVisitor_visitVariableDeclaration_closure5, A._EvaluateVisitor_visitVariableDeclaration_closure6, A._EvaluateVisitor_visitVariableDeclaration_closure7, A._EvaluateVisitor_visitWarnRule_closure1, A._EvaluateVisitor_visitWhileRule_closure1, A._EvaluateVisitor_visitBinaryOperationExpression_closure1, A._EvaluateVisitor_visitVariableExpression_closure1, A._EvaluateVisitor_visitUnaryOperationExpression_closure1, A._EvaluateVisitor_visitFunctionExpression_closure5, A._EvaluateVisitor_visitFunctionExpression_closure7, A._EvaluateVisitor__visitCalculationExpression_closure1, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1, A._EvaluateVisitor__runUserDefinedCallable_closure1, A._EvaluateVisitor__runUserDefinedCallable__closure1, A._EvaluateVisitor__runUserDefinedCallable___closure1, A._EvaluateVisitor__runFunctionCallable_closure1, A._EvaluateVisitor__runBuiltInCallable_closure5, A._EvaluateVisitor__runBuiltInCallable_closure6, A._EvaluateVisitor__verifyArguments_closure1, A._EvaluateVisitor_visitCssAtRule_closure3, A._EvaluateVisitor_visitCssKeyframeBlock_closure3, A._EvaluateVisitor_visitCssMediaRule_closure6, A._EvaluateVisitor_visitCssMediaRule__closure1, A._EvaluateVisitor_visitCssMediaRule___closure1, A._EvaluateVisitor_visitCssStyleRule_closure4, A._EvaluateVisitor_visitCssStyleRule__closure1, A._EvaluateVisitor_visitCssSupportsRule_closure3, A._EvaluateVisitor_visitCssSupportsRule__closure1, A._EvaluateVisitor__serialize_closure1, A._EvaluateVisitor__expressionNode_closure1, A.exceptionClass_closure, A.ExtensionStore__registerSelector_closure0, A.ExtensionStore_addExtension_closure2, A.ExtensionStore_addExtension_closure3, A.ExtensionStore_addExtension_closure4, A.ExtensionStore__extendExistingExtensions_closure1, A.ExtensionStore__extendExistingExtensions_closure2, A.ExtensionStore_addExtensions_closure0, A.JSToDartFileImporter_canonicalize_closure, A.functionClass_closure, A.NodeImporter_load_closure, A.NodeImporter__tryPath_closure, A.NodeImporter__callImporterAsync_closure, A.ImportCache_canonicalize_closure0, A.ImportCache__canonicalize_closure0, A.ImportCache_importCanonical_closure0, A._realCasePath_helper_closure0, A._readFile_closure0, A.fileExists_closure0, A.dirExists_closure0, A.listDir_closure0, A.JSToDartLogger_internalWarn_closure, A.JSToDartLogger_debug_closure, A.KeyframeSelectorParser_parse_closure0, A.render_closure, A._parseFunctions____closure, A._parseFunctions___closure3, A._parseFunctions___closure4, A._parseFunctions___closure1, A._parseFunctions___closure0, A._parseImporter____closure, A._parseImporter___closure0, A.listClass_closure, A.mapClass_closure, A.MediaQueryParser_parse_closure0, A.mixinClass_closure, A.legacyNullClass_closure, A.numberClass_closure, A.SassNumber__coerceOrConvertValue_compatibilityException0, A.SassNumber__coerceOrConvertValue_closure4, A.SassNumber__coerceOrConvertValue_closure6, A.SassNumber_multiplyUnits_closure4, A.SassNumber_multiplyUnits_closure6, A.Parser__parseIdentifier_closure0, A.Parser_spanFrom_closure0, A.PseudoSelector_specificity_closure0, A.SassParser_children_closure0, A.SelectorParser_parse_closure0, A.SelectorParser_parseCompoundSelector_closure0, A._SerializeVisitor_visitCssComment_closure0, A._SerializeVisitor_visitCssAtRule_closure0, A._SerializeVisitor_visitCssMediaRule_closure0, A._SerializeVisitor_visitCssImport_closure0, A._SerializeVisitor_visitCssImport__closure0, A._SerializeVisitor_visitCssKeyframeBlock_closure0, A._SerializeVisitor_visitCssStyleRule_closure0, A._SerializeVisitor_visitCssSupportsRule_closure0, A._SerializeVisitor_visitCssDeclaration_closure1, A._SerializeVisitor_visitCssDeclaration_closure2, A._SerializeVisitor__write_closure0, A._SerializeVisitor__visitChildren_closure1, A._SerializeVisitor__visitChildren_closure2, A.SingleUnitSassNumber_multiplyUnits_closure2, A.updateSourceSpanPrototype_closure, A.stringClass_closure, A.StylesheetParser_parse_closure0, A.StylesheetParser_parse__closure1, A.StylesheetParser_parseArgumentDeclaration_closure0, A.StylesheetParser__parseSingleProduction_closure0, A.StylesheetParser_parseSignature_closure, A.StylesheetParser__statement_closure0, A.StylesheetParser_variableDeclarationWithoutNamespace_closure1, A.StylesheetParser_variableDeclarationWithoutNamespace_closure2, A.StylesheetParser__forRule_closure1, A.StylesheetParser__memberList_closure0, A.StylesheetParser__expression_resetState0, A.StylesheetParser__expression_resolveOneOperation0, A.StylesheetParser__expression_resolveOperations0, A.StylesheetParser__expression_resolveSpaceExpressions0, A.StylesheetParser_expressionUntilComma_closure0, A.StylesheetParser_namespacedExpression_closure0, A.StylesheetParser__expressionUntilComparison_closure0, A.StylesheetParser__publicIdentifier_closure0, A.JSToDartImporter_canonicalize_closure, A.JSToDartImporter_load_closure, A.resolveImportPath_closure1, A.resolveImportPath_closure2, A._tryPathAsDirectory_closure0, A.valueClass_closure]); + _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.EmptyIterable, A.LinkedHashMapKeyIterable, A._HashMapKeyIterable, A._MapBaseValueIterable]); + _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A.ListQueue, A._JsonMapKeyIterable, A._GeneratorIterable]); + _inherit(A.EfficientLengthMappedIterable, A.MappedIterable); + _inherit(A.EfficientLengthTakeIterable, A.TakeIterable); + _inherit(A.EfficientLengthSkipIterable, A.SkipIterable); + _inherit(A.EfficientLengthFollowedByIterable, A.FollowedByIterable); + _inheritMany(A._Record, [A._Record1, A._Record2, A._Record3, A._RecordN]); + _inherit(A._Record_1, A._Record1); + _inheritMany(A._Record2, [A._Record_2, A._Record_2_forImport, A._Record_2_imports_modules, A._Record_2_loadedUrls_stylesheet, A._Record_2_sourceMap]); + _inheritMany(A._Record3, [A._Record_3, A._Record_3_forImport, A._Record_3_importer_isDependency, A._Record_3_originalUrl]); + _inherit(A._Record_5_named_namedNodes_positional_positionalNodes_separator, A._RecordN); + _inheritMany(A.MapView, [A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A.PathMap]); + _inherit(A.UnmodifiableMapView, A._UnmodifiableMapView_MapView__UnmodifiableMapMixin); + _inherit(A.ConstantMapView, A.UnmodifiableMapView); + _inherit(A.ConstantStringMap, A.ConstantMap); + _inheritMany(A.SetBase, [A.ConstantSet, A._SetBase, A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin, A._UnionSet_SetBase_UnmodifiableSetMixin]); + _inheritMany(A.ConstantSet, [A.ConstantStringSet, A.GeneralConstantSet]); + _inherit(A.Instantiation1, A.Instantiation); + _inherit(A.NullError, A.TypeError); + _inheritMany(A.TearOffClosure, [A.StaticClosure, A.BoundClosure]); + _inheritMany(A.JsLinkedHashMap, [A.JsIdentityLinkedHashMap, A.JsConstantLinkedHashMap, A._LinkedCustomHashMap]); + _inheritMany(A.NativeTypedData, [A.NativeByteData, A.NativeTypedArray]); + _inheritMany(A.NativeTypedArray, [A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); + _inherit(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfDouble, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inherit(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfInt, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inheritMany(A.NativeTypedArrayOfDouble, [A.NativeFloat32List, A.NativeFloat64List]); + _inheritMany(A.NativeTypedArrayOfInt, [A.NativeInt16List, A.NativeInt32List, A.NativeInt8List, A.NativeUint16List, A.NativeUint32List, A.NativeUint8ClampedList, A.NativeUint8List]); + _inherit(A._TypeError, A._Error); + _inheritMany(A._Completer, [A._AsyncCompleter, A._SyncCompleter]); + _inheritMany(A._StreamController, [A._AsyncStreamController, A._SyncStreamController]); + _inheritMany(A.Stream, [A._StreamImpl, A._ForwardingStream, A._CompleterStream]); + _inherit(A._ControllerStream, A._StreamImpl); + _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]); + _inherit(A._StreamControllerAddStreamState, A._AddStreamState); + _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]); + _inherit(A._ExpandStream, A._ForwardingStream); + _inheritMany(A._Zone, [A._CustomZone, A._RootZone]); + _inherit(A._IdentityHashMap, A._HashMap); + _inherit(A._LinkedHashSet, A._SetBase); + _inherit(A._LinkedIdentityHashSet, A._LinkedHashSet); + _inherit(A.UnmodifiableSetView, A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin); + _inheritMany(A.Codec, [A.Encoding, A.Base64Codec, A.JsonCodec]); + _inheritMany(A.Encoding, [A.AsciiCodec, A.Utf8Codec]); + _inheritMany(A.Converter, [A._UnicodeSubsetEncoder, A.Base64Encoder, A.JsonEncoder, A.JsonDecoder, A.Utf8Encoder, A.Utf8Decoder]); + _inherit(A.AsciiEncoder, A._UnicodeSubsetEncoder); + _inheritMany(A.ByteConversionSink, [A._Base64EncoderSink, A._Utf8StringSinkAdapter]); + _inherit(A._Utf8Base64EncoderSink, A._Base64EncoderSink); + _inherit(A.JsonCyclicError, A.JsonUnsupportedObjectError); + _inherit(A._JsonStringStringifier, A._JsonStringifier); + _inherit(A._StringSinkConversionSink, A.StringConversionSink); + _inherit(A._StringCallbackSink, A._StringSinkConversionSink); + _inheritMany(A.ArgumentError, [A.RangeError, A.IndexError]); + _inherit(A._DataUri, A._Uri); + _inherit(A.ArgParserException, A.FormatException); + _inherit(A.EmptyUnmodifiableSet, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin); + _inherit(A.QueueList, A._QueueList_Object_ListMixin); + _inherit(A._CastQueueList, A.QueueList); + _inherit(A.UnionSet, A._UnionSet_SetBase_UnmodifiableSetMixin); + _inheritMany(A._DelegatingIterableBase, [A.DelegatingSet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin]); + _inherit(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.DelegatingSet); + _inherit(A.UnmodifiableSetView0, A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin); + _inherit(A.MapKeySet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin); + _inheritMany(A.NodeJsError, [A.JsAssertionError, A.JsRangeError, A.JsReferenceError, A.JsSyntaxError, A.JsTypeError, A.JsSystemError]); + _inheritMany(A.Socket, [A.TTYReadStream, A.TTYWriteStream]); + _inherit(A.InternalStyle, A.Style); + _inheritMany(A.InternalStyle, [A.PosixStyle, A.UrlStyle, A.WindowsStyle]); + _inheritMany(A._Enum, [A._SingletonCssMediaQueryMergeResult, A.BinaryOperator, A.UnaryOperator, A.AttributeOperator, A.Combinator, A.Deprecation, A.ExtendMode, A.Syntax, A.CalculationOperator, A.HueInterpolationMethod, A.ListSeparator, A.OutputStyle, A.LineFeed, A.AttributeOperator0, A.BinaryOperator0, A.CalculationOperator0, A.Combinator0, A.Deprecation0, A.HueInterpolationMethod0, A.ListSeparator0, A._SingletonCssMediaQueryMergeResult0, A.ExtendMode0, A.OutputStyle0, A.LineFeed0, A.Syntax0, A.UnaryOperator0]); + _inheritMany(A.CssNode, [A.ModifiableCssNode, A.CssParentNode]); + _inheritMany(A.ModifiableCssNode, [A.ModifiableCssParentNode, A.ModifiableCssComment, A.ModifiableCssDeclaration, A.ModifiableCssImport]); + _inheritMany(A.ModifiableCssParentNode, [A.ModifiableCssAtRule, A.ModifiableCssKeyframeBlock, A.ModifiableCssMediaRule, A.ModifiableCssStyleRule, A.ModifiableCssStylesheet, A.ModifiableCssSupportsRule]); + _inherit(A._IsInvisibleVisitor, A.__IsInvisibleVisitor_Object_EveryCssVisitor); + _inherit(A.CssStylesheet, A.CssParentNode); + _inheritMany(A.Expression, [A.BinaryOperationExpression, A.BooleanExpression, A.ColorExpression, A.FunctionExpression, A.IfExpression, A.InterpolatedFunctionExpression, A.ListExpression, A.MapExpression, A.NullExpression, A.NumberExpression, A.ParenthesizedExpression, A.SelectorExpression, A.StringExpression, A.SupportsExpression, A.UnaryOperationExpression, A.ValueExpression, A.VariableExpression]); + _inheritMany(A.Statement, [A.ParentStatement, A.ContentRule, A.DebugRule, A.ErrorRule, A.ExtendRule, A.ForwardRule, A.IfRule, A.ImportRule, A.IncludeRule, A.LoudComment, A.ReturnRule, A.SilentComment, A.UseRule, A.VariableDeclaration, A.WarnRule]); + _inheritMany(A.ParentStatement, [A.AtRootRule, A.AtRule, A.CallableDeclaration, A.Declaration, A.EachRule, A.ForRule, A.MediaRule, A.StyleRule, A.Stylesheet, A.SupportsRule, A.WhileRule]); + _inheritMany(A.CallableDeclaration, [A.ContentBlock, A.FunctionRule, A.MixinRule]); + _inheritMany(A.IfRuleClause, [A.IfClause, A.ElseClause]); + _inherit(A._HasContentVisitor, A.__HasContentVisitor_Object_StatementSearchVisitor); + _inherit(A._IsInvisibleVisitor0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor); + _inherit(A._IsBogusVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor); + _inherit(A._IsUselessVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor); + _inheritMany(A.Selector, [A.SimpleSelector, A.ComplexSelector, A.CompoundSelector, A.SelectorList]); + _inheritMany(A.SimpleSelector, [A.AttributeSelector, A.ClassSelector, A.IDSelector, A.ParentSelector, A.PlaceholderSelector, A.PseudoSelector, A.TypeSelector, A.UniversalSelector]); + _inherit(A._ParentSelectorVisitor, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor); + _inherit(A.ExplicitConfiguration, A.Configuration); + _inheritMany(A.SourceSpanException, [A.SassException, A.SourceSpanFormatException, A.MultiSourceSpanException, A.SassException0]); + _inheritMany(A.SassException, [A.MultiSpanSassException, A.SassRuntimeException, A.SassFormatException]); + _inheritMany(A.MultiSpanSassException, [A.MultiSpanSassRuntimeException, A.MultiSpanSassFormatException]); + _inherit(A.MultiSpanSassScriptException, A.SassScriptException); + _inherit(A.MergedExtension, A.Extension); + _inherit(A.Importer, A.AsyncImporter); + _inheritMany(A.Importer, [A.FilesystemImporter, A.NoOpImporter, A.NodePackageImporter]); + _inherit(A.DeprecationProcessingLogger, A.LoggerWithDeprecationType0); + _inheritMany(A.Parser, [A.AtRootQueryParser, A.StylesheetParser, A.KeyframeSelectorParser, A.MediaQueryParser, A.SelectorParser]); + _inheritMany(A.StylesheetParser, [A.ScssParser, A.SassParser]); + _inherit(A.CssParser, A.ScssParser); + _inheritMany(A.UnmodifiableMapBase, [A.LimitedMapView, A.PrefixedMapView, A.PublicMemberMapView, A.UnprefixedMapView, A.LimitedMapView0, A.PrefixedMapView0, A.PublicMemberMapView0, A.UnprefixedMapView0]); + _inheritMany(A.Value, [A.SassList, A.SassBoolean, A.SassCalculation, A.SassColor, A.SassFunction, A.SassMap, A.SassMixin, A._SassNull, A.SassNumber, A.SassString]); + _inherit(A.SassArgumentList, A.SassList); + _inherit(A.LinearChannel, A.ColorChannel); + _inheritMany(A.GamutMapMethod, [A.ClipGamutMap, A.LocalMindeGamutMap]); + _inheritMany(A.ColorSpace, [A.A98RgbColorSpace, A.DisplayP3ColorSpace, A.HslColorSpace, A.HwbColorSpace, A.LabColorSpace, A.LchColorSpace, A.LmsColorSpace, A.OklabColorSpace, A.OklchColorSpace, A.ProphotoRgbColorSpace, A.Rec2020ColorSpace, A.RgbColorSpace, A.SrgbColorSpace, A.SrgbLinearColorSpace, A.XyzD50ColorSpace, A.XyzD65ColorSpace]); + _inheritMany(A.SassNumber, [A.ComplexSassNumber, A.SingleUnitSassNumber, A.UnitlessSassNumber]); + _inherit(A._MakeExpressionCalculationSafe, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor); + _inherit(A._FindDependenciesVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor); + _inherit(A.SingleMapping, A.Mapping); + _inherit(A.FileLocation, A.SourceLocationMixin); + _inheritMany(A.SourceSpanMixin, [A._FileSpan, A.SourceSpanBase]); + _inherit(A.MultiSourceSpanFormatException, A.MultiSourceSpanException); + _inherit(A.SourceSpanWithContext, A.SourceSpanBase); + _inherit(A.StringScannerException, A.SourceSpanFormatException); + _inheritMany(A.StringScanner, [A.LineScanner, A.SpanScanner]); + _inheritMany(A.ColorSpace0, [A.A98RgbColorSpace0, A.DisplayP3ColorSpace0, A.HslColorSpace0, A.HwbColorSpace0, A.LabColorSpace0, A.LchColorSpace0, A.LmsColorSpace0, A.OklabColorSpace0, A.OklchColorSpace0, A.ProphotoRgbColorSpace0, A.Rec2020ColorSpace0, A.RgbColorSpace0, A.SrgbColorSpace0, A.SrgbLinearColorSpace0, A.XyzD50ColorSpace0, A.XyzD65ColorSpace0]); + _inheritMany(A.Value0, [A.SassList0, A.SassBoolean0, A.SassCalculation0, A.SassColor0, A.SassNumber0, A.SassFunction0, A.SassMap0, A.SassMixin0, A._SassNull0, A.SassString0]); + _inherit(A.SassArgumentList0, A.SassList0); + _inheritMany(A.AsyncImporter0, [A.JSToDartAsyncImporter, A.JSToDartAsyncFileImporter, A.Importer0]); + _inheritMany(A.Parser1, [A.AtRootQueryParser0, A.StylesheetParser0, A.KeyframeSelectorParser0, A.MediaQueryParser0, A.SelectorParser0]); + _inheritMany(A.Statement0, [A.ParentStatement0, A.ContentRule0, A.DebugRule0, A.ErrorRule0, A.ExtendRule0, A.ForwardRule0, A.IfRule0, A.ImportRule0, A.IncludeRule0, A.LoudComment0, A.ReturnRule0, A.SilentComment0, A.UseRule0, A.VariableDeclaration0, A.WarnRule0]); + _inheritMany(A.ParentStatement0, [A.AtRootRule0, A.AtRule0, A.CallableDeclaration0, A.Declaration0, A.EachRule0, A.ForRule0, A.MediaRule0, A.StyleRule0, A.Stylesheet0, A.SupportsRule0, A.WhileRule0]); + _inheritMany(A.CssNode0, [A.ModifiableCssNode0, A.CssParentNode0]); + _inheritMany(A.ModifiableCssNode0, [A.ModifiableCssParentNode0, A.ModifiableCssComment0, A.ModifiableCssDeclaration0, A.ModifiableCssImport0]); + _inheritMany(A.ModifiableCssParentNode0, [A.ModifiableCssAtRule0, A.ModifiableCssKeyframeBlock0, A.ModifiableCssMediaRule0, A.ModifiableCssStyleRule0, A.ModifiableCssStylesheet0, A.ModifiableCssSupportsRule0]); + _inheritMany(A.Selector0, [A.SimpleSelector0, A.ComplexSelector0, A.CompoundSelector0, A.SelectorList0]); + _inheritMany(A.SimpleSelector0, [A.AttributeSelector0, A.ClassSelector0, A.IDSelector0, A.ParentSelector0, A.PlaceholderSelector0, A.PseudoSelector0, A.TypeSelector0, A.UniversalSelector0]); + _inheritMany(A.Expression0, [A.BinaryOperationExpression0, A.BooleanExpression0, A.ColorExpression0, A.FunctionExpression0, A.IfExpression0, A.InterpolatedFunctionExpression0, A.ListExpression0, A.MapExpression0, A.NullExpression0, A.NumberExpression0, A.ParenthesizedExpression0, A.SelectorExpression0, A.StringExpression0, A.SupportsExpression0, A.UnaryOperationExpression0, A.ValueExpression0, A.VariableExpression0]); + _inherit(A.LinearChannel0, A.ColorChannel0); + _inheritMany(A.GamutMapMethod0, [A.ClipGamutMap0, A.LocalMindeGamutMap0]); + _inherit(A._ConstructionOptions, A._Channels); + _inherit(A.CompileStringOptions, A.CompileOptions); + _inherit(A.AsyncCompiler, A.Compiler); + _inheritMany(A.SassNumber0, [A.ComplexSassNumber0, A.SingleUnitSassNumber0, A.UnitlessSassNumber0]); + _inherit(A.ExplicitConfiguration0, A.Configuration0); + _inheritMany(A.CallableDeclaration0, [A.ContentBlock0, A.FunctionRule0, A.MixinRule0]); + _inheritMany(A.StylesheetParser0, [A.ScssParser0, A.SassParser0]); + _inherit(A.CssParser0, A.ScssParser0); + _inheritMany(A.LoggerWithDeprecationType, [A.DeprecationProcessingLogger0, A.JSToDartLogger]); + _inherit(A._NodeException, A.JsError); + _inheritMany(A.SassException0, [A.MultiSpanSassException0, A.SassRuntimeException0, A.SassFormatException0]); + _inheritMany(A.MultiSpanSassException0, [A.MultiSpanSassRuntimeException0, A.MultiSpanSassFormatException0]); + _inherit(A.MultiSpanSassScriptException0, A.SassScriptException0); + _inherit(A._MakeExpressionCalculationSafe0, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0); + _inheritMany(A.Importer0, [A.JSToDartFileImporter, A.FilesystemImporter0, A.NoOpImporter0, A.NodePackageImporter0, A.JSToDartImporter]); + _inheritMany(A.IfRuleClause0, [A.IfClause0, A.ElseClause0]); + _inherit(A._ParentSelectorVisitor0, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0); + _inherit(A.MergedExtension0, A.Extension0); + _inherit(A._HasContentVisitor0, A.__HasContentVisitor_Object_StatementSearchVisitor0); + _inherit(A._IsInvisibleVisitor1, A.__IsInvisibleVisitor_Object_EveryCssVisitor0); + _inherit(A._IsInvisibleVisitor2, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0); + _inherit(A._IsBogusVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0); + _inherit(A._IsUselessVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0); + _inherit(A.CssStylesheet0, A.CssParentNode0); + _mixin(A.UnmodifiableListBase, A.UnmodifiableListMixin); + _mixin(A.__CastListBase__CastIterableBase_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._AsyncStreamController, A._AsyncStreamControllerDispatch); + _mixin(A._SyncStreamController, A._SyncStreamControllerDispatch); + _mixin(A.UnmodifiableMapBase, A._UnmodifiableMapMixin); + _mixin(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A._UnmodifiableMapMixin); + _mixin(A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin, A._UnmodifiableSetMixin); + _mixin(A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._QueueList_Object_ListMixin, A.ListBase); + _mixin(A._UnionSet_SetBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.EveryCssVisitor); + _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor, A.StatementSearchVisitor); + _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__ParentSelectorVisitor_Object_SelectorSearchVisitor, A.SelectorSearchVisitor); + _mixin(A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor, A.ReplaceExpressionVisitor); + _mixin(A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.RecursiveStatementVisitor); + _mixin(A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0, A.ReplaceExpressionVisitor0); + _mixin(A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0, A.SelectorSearchVisitor0); + _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor0, A.StatementSearchVisitor0); + _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.EveryCssVisitor0); + _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + })(); + var init = { + typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, + mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map"}, + mangledNames: {}, + types: ["~()", "Null()", "Future()", "Value0(List)", "Value(List)", "bool(String)", "String(String)", "bool(CssNode0)", "bool(CssNode)", "bool(Object?)", "int()", "SassBoolean0(List)", "SassBoolean(List)", "bool(SimpleSelector)", "bool(SimpleSelector0)", "JSClass0()", "double(double)", "SassString0(List)", "SassString(List)", "bool(ComplexSelector)", "bool(ComplexSelector0)", "SassColor0(List)", "SassNumber0(List)", "bool()", "SassColor(List)", "SassNumber(List)", "SassList0(List)", "SassList(List)", "double(SassColor0)", "String()", "FileSpan()", "Future<~>()", "bool(int?)", "SassMap0(List)", "~(Object?)", "Object?()", "Value()", "Null(~())", "SassMap(List)", "int(SassColor0)", "Future(Future<~>())", "Value0(Value0)", "Value?()", "Value0?()", "Value(Value)", "double(SassColor)", "bool(num,num)", "Value0()", "Uri(Uri)", "String?()", "bool(int)", "SassNumber0(SassNumber0)", "bool(ComplexSelectorComponent0)", "bool(ComplexSelectorComponent)", "bool(Value0)", "Null(Object,StackTrace)", "SassNumber(SassNumber)", "@()", "~(Value)", "~(Value0)", "ComplexSelector(ComplexSelector)", "ComplexSelector0(ComplexSelector0)", "double(double,double)", "Null(@)", "ValueExpression0(Value0)", "ValueExpression(Value)", "int(SassColor)", "~(Object,StackTrace)", "Future()", "bool(Object)", "Future()", "bool(SelectorList)", "bool(SelectorList0)", "Frame()", "~(@)", "Future()", "bool(Value)", "Object(Object)", "bool(ColorChannel0)", "Future()", "Null([Object?])", "~(Module0,bool)", "Value?(Statement)", "Object()", "~([int?])", "List?(List)", "Future(Statement)", "SassRuntimeException(AstNode)", "~(Value,Value)", "AsyncCallable?()", "~(Object)", "AsyncCallable0?()", "~(Value0,Value0)", "SassRuntimeException0(AstNode0)", "Callable0?()", "~(String)", "Future(Statement0)", "List?(List)", "Stylesheet?()", "Value0?(Statement0)", "bool(ColorChannel)", "@(@)", "double(SassNumber0)", "~(String,Value)", "~(Module1,bool)", "Callable?()", "Future(List)", "int(Uri)", "~(String,Value0)", "Null(_NodeSassColor,num)", "Frame(String)", "double(SassNumber)", "Map()", "bool(Module0)", "SassCalculation0(Object)", "String(Expression0)", "+originalUrl(Importer,Uri,Uri)?()", "bool(Module0)", "String(Object)", "Null(Module1,bool)", "bool(Expression)", "String(@)", "Uri(String)", "int(_NodeSassColor)", "Statement()", "~(String,Object?)", "bool(Module1)", "bool(Module1)", "String(String{color:Object?})", "String(Expression)", "Map()", "List()", "bool(@)", "Null(Module0,bool)", "~(String,Function)", "Statement0()", "~(~())", "bool(_Highlight)", "~(String,@)", "bool(Expression0)", "MapKeySet>(Map,AstNode0>)", "AstNode?()", "SelectorList(Value)", "SelectorList(SelectorList,SelectorList)", "Uri?()", "int(String,String)", "String?(String?)", "String?(Object)", "Iterable()", "Iterable(String)", "Iterable(@)", "DateTime()", "~(String[~])", "bool(Statement)", "bool(Import)", "int(int)", "0&(String,FileSpan[StackTrace?])", "Set<0^>()", "VariableDeclaration()", "AtRootRule(List,FileSpan)", "AtRule(List,FileSpan)", "String(String{color:@})", "Entry(Entry)", "double(double,String)", "AstNode(AstNode)", "SassFunction(List)", "~(@,@)", "SassMixin(List)", "Future<~>(List)", "~(Object?,Object?)", "List()", "@(String)", "bool(ModifiableCssParentNode)", "int(ComplexSelector)", "Future()", "List()", "bool(UseRule)", "bool(ForwardRule)", "AsyncCallable?(Module0)", "Future()", "MapKeySet>(Map,AstNode>)", "Map(Module0)", "Future()", "InterpolationMap(List)", "Trace(String)", "String(SassNumber)", "Uri?/()", "~(List)", "SassNumber()", "Expression(Expression)", "~(double?[String?])", "int(Frame)", "String(Frame)", "Future(List)", "Trace()", "bool(Frame)", "~([Object?])", "Callable0?(Module0)", "AsyncCallable0?(Module1)", "MapKeySet>(Map,AstNode0>)", "Map(Module1)", "MapKeySet>(Map,AstNode>)", "AstNode0(AstNode0)", "SassFunction0(List)", "Map(Module0)", "SassMixin0(List)", "Future<~>(List)", "bool(ModifiableCssParentNode0)", "~(Iterable)", "Future()", "List()", "bool(UseRule0)", "bool(ForwardRule0)", "~(Uint8List,String,int)", "List()", "List()", "InterpolationMap0(List)", "AstNode0?()", "String(SassNumber0)", "0&(Object[Object?])", "0&(@[@])", "Object(CalculationOperation0)", "bool(Queue>)", "String(Value0)", "double(Value0)", "ImmutableList0(SassColor0)", "bool(String?)", "AsyncImporter0(Object?)", "Future<~>?()", "Set<0&>(Object)", "Version(String)", "~(Iterable)", "Callable?(Module1)", "Map(Module1)", "~(Object[StackTrace?])", "~(List)", "Value0?(Value0)", "String(double)", "SassNumber0()", "String(_NodeException)", "List()", "double()", "bool(Queue>)", "bool(Statement0)", "bool(Import0)", "@(Value0,num)", "Value0(int)", "Object(_NodeSassMap,int)", "Null(_NodeSassMap,int,Object)", "bool(SassNumber0)", "ImmutableList0(SassNumber0)", "bool(SassNumber0,String)", "SassNumber0(SassNumber0,Object,Object[String?])", "SassNumber0(SassNumber0,SassNumber0[String?,String?])", "double(SassNumber0,Object,Object[String?])", "double(SassNumber0,SassNumber0[String?,String?])", "int(ComplexSelector0)", "Expression0(Expression0)", "SelectorList0(Value0)", "SelectorList0(SelectorList0,SelectorList0)", "FileLocation(FileSpan)", "JSUrl0(Uri)", "String(FileSpan)", "int(SourceLocation)", "double(Value)", "AtRootRule0(List,FileSpan)", "AtRule0(List,FileSpan)", "int(@,@)", "bool(Object?,Object?)", "int(Object?)", "Future()", "Map(Module1)", "~(ContentBlock)", "~(List)", "ArgumentDeclaration()", "~(String,int?)", "~(CssMediaQuery)", "Set(CssParentNode)", "Value(Object)", "~(SelectorList)", "~(MapEntry)", "SourceFile()", "SourceFile?(int)", "String?(SourceFile?)", "int(_Line)", "int(int,int)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "SourceSpanWithContext()", "List(Trace)", "int(Trace)", "UseRule()", "String(Trace)", "StyleRule(List,FileSpan)", "Declaration(List,FileSpan)", "Frame(String,String)", "SassMap(Value)", "EachRule(List,FileSpan)", "Frame(Frame)", "Value/(List)", "FunctionRule(List,FileSpan)", "bool(Deprecation)", "String(Argument0)", "Value?(Module0)", "SassArgumentList0(Object,Object,Object[String?])", "ImmutableMap0(SassArgumentList0)", "Module0?(Module0)", "ForRule(List,FileSpan)", "Value0/(List)", "Value0?(Module1)", "Module1?(Module1)", "ContentBlock(List,FileSpan)", "MediaRule(List,FileSpan)", "Map(Module1)", "int(String?)", "MixinRule(List,FileSpan)", "SassMap(SassMap)", "Future>(Interpolation0{trim:bool,warnForColor:bool})", "SupportsRule(List,FileSpan)", "Map(Module0)", "Map(Module0)", "WhileRule(List,FileSpan)", "~(Expression)", "~(BinaryOperator)", "StringExpression(Interpolation)", "Uint8List(@,@)", "~(Module1,bool)", "Future<+loadedUrls,stylesheet(Set,CssStylesheet0)>()", "Future>()", "ArgParser()", "~(Module1)", "~(Module0,bool)", "DateTime(StylesheetNode)", "Set()", "Future<~>(String)", "Future(Value0)", "List(List)", "Future>(Interpolation0)", "String(CssValue)", "String(Argument)", "bool(Extension)", "Future<@>()", "Future(IfRuleClause0)", "SassScriptException()", "int(int,SimpleSelector)", "UserDefinedCallable0(ContentBlock0)", "Set>()", "~([Future<~>?])", "SingleUnitSassNumber(double)", "Iterable(List)", "List(Extender)", "Future(Expression0)", "List?(SimpleSelector)", "Value0/()", "List(PseudoSelector)", "Future>(Interpolation{trim:bool,warnForColor:bool})", "List(ComplexSelector)", "~(@,StackTrace)", "String(int,IfClause)", "SassString(SimpleSelector)", "Future<+originalUrl(AsyncImporter0,Uri,Uri)?>()", "Future()", "bool(+originalUrl(AsyncImporter0,Uri,Uri))", "Uri(+originalUrl(AsyncImporter0,Uri,Uri))", "AtRootQuery0()", "SassString(int)", "SassString(String)", "PseudoSelector(ComplexSelector)", "~(SimpleSelector,Set>)", "SassCalculation0(Object[Object?,Object?])", "SassCalculation0(SassCalculation0[String?])", "ImmutableList(SassCalculation0)", "Object(Object,String,Object,Object)", "bool(CalculationOperator0)", "bool(CalculationOperation0,Object)", "int(CalculationOperation0)", "String(CalculationOperation0)", "Object(String)", "CalculationInterpolation(Object,String)", "bool(CalculationInterpolation,Object)", "int(CalculationInterpolation)", "String(CalculationInterpolation)", "bool(CanonicalizeContext0)", "JSUrl0?(CanonicalizeContext0)", "List?(List,List)", "SassList(ComplexSelector)", "bool(List>)", "bool(PseudoSelector)", "SelectorList?(PseudoSelector)", "Object?(Object?)", "@(@,String)", "SassColor0(SassColor0)", "SassColor0(ColorSpace0)", "Future<+loadedUrls,stylesheet(Set,CssStylesheet)>()", "0&(List)", "Future>()", "~(String,Option)", "SassColor0(Object,_ConstructionOptions)", "bool(SassColor0,Object)", "SassColor0(SassColor0,String)", "bool(SassColor0[String?])", "SassColor0(SassColor0,_ToGamutOptions)", "double(SassColor0,String[_ChannelOptions?])", "bool(SassColor0,String)", "bool(SassColor0,String[_ChannelOptions?])", "SassColor0(SassColor0,_ConstructionOptions)", "double?(String)", "SassColor0(SassColor0,SassColor0,_InterpolationOptions)", "String(SassColor0)", "bool(SassColor0)", "Iterable(ComplexSelector)", "Null(_NodeSassColor,num?[num?,num?,num?,SassColor0?])", "double(num)", "_Future<@>(@)", "double(_NodeSassColor)", "Null(@,@)", "~(Module0)", "SassNumber(Value)", "AsyncImporter0(JSImporter)", "0&(@)", "bool(Version)", "NodePackageImporter0(Object[String?])", "bool(+originalUrl(Importer,Uri,Uri))", "NodeCompileResult(Compiler,String[CompileOptions?])", "NodeCompileResult(Compiler,String[CompileStringOptions?])", "Null(Compiler)", "Promise(AsyncCompiler,String[CompileOptions?])", "Promise(AsyncCompiler,String[CompileStringOptions?])", "Promise(AsyncCompiler)", "Future()", "int(int,ComplexSelectorComponent0)", "String(CssValue0)", "int(int,SimpleSelector0)", "String(BuiltInCallable0)", "bool(Deprecation0)", "Iterable()", "Version(Object,int,int,int)", "SimpleSelector(SimpleSelector)", "~(Symbol0,@)", "Value0?(Module1)", "Module1?(Module1)", "Future(Value)", "Object(Value0)", "Map(Module1)", "Map(Module1)", "Uri(+originalUrl(Importer,Uri,Uri))", "Null(@,StackTrace)", "CssValue0(Interpolation0{trim:bool,warnForColor:bool})", "Future>(Interpolation)", "Value?(Module0)", "SassColor(SassColor)", "+loadedUrls,stylesheet(Set,CssStylesheet0)()", "Module1()", "~(Module1)", "AtRootQuery()", "Module0?(Module0)", "CssValue0(Interpolation0)", "String(BuiltInCallable)", "Value0?(IfRuleClause0)", "UserDefinedCallable0(ContentBlock0)", "Value0(Expression0)", "Future(IfRuleClause)", "FileSpan(_NodeException)", "bool(Extension0)", "Set>()", "SassColor(ColorSpace)", "List()", "Iterable(List)", "bool(+forImport(Importer,Uri,bool),+originalUrl(Importer,Uri,Uri)?)", "List(Extender0)", "List?(SimpleSelector0)", "List(PseudoSelector0)", "List>(List)", "List(ComplexSelector0)", "PseudoSelector0(ComplexSelector0)", "~(SimpleSelector0,Set>)", "SassFunction0(Object,String,Value0(List))", "List?(List,List)", "UserDefinedCallable(ContentBlock)", "bool(List>)", "Null(Function,Function)", "bool(PseudoSelector0)", "SelectorList0?(PseudoSelector0)", "String(int,IfClause0)", "~(int,@)", "bool(ModifiableCssNode)", "~(Object?,Object,Object?)", "+(String,String)(String)", "Future<~>(List)", "Stylesheet0?()", "bool(+originalUrl(Importer0,Uri,Uri))", "Uri(+originalUrl(Importer0,Uri,Uri))", "~(String,WarnOptions)", "~(String,DebugOptions)", "Null(RenderResult)", "JSFunction0(JSFunction0)", "Object?(Object,String,String[Object?])", "Null(Object)", "String(Value)", "List(Value0)", "bool(List)", "SassList0(ComplexSelector0)", "Iterable(ComplexSelector0)", "SimpleSelector0(SimpleSelector0)", "SassList0(Object[Object?,_ConstructorOptions?])", "SelectorList()", "Null(_NodeSassList,int?[bool?,SassList0?])", "Map(Module0)", "Object(_NodeSassList,int)", "Null(_NodeSassList,int,Object)", "bool(_NodeSassList)", "Null(_NodeSassList,bool)", "int(_NodeSassList)", "SassMap0(Value0)", "SassMap0(SassMap0)", "SassMap0(Object[ImmutableMap0?])", "ImmutableMap0(SassMap0)", "@(SassMap0,Object)", "Null(_NodeSassMap,int?[SassMap0?])", "SassNumber0(int)", "Map(Module0)", "int(_NodeSassMap)", "Future(Expression)", "SassNumber0(Value0)", "List()", "Value0(Object)", "0&(Object)", "bool(ModifiableCssNode0)", "SassNumber0(Object,num[Object?])", "CompoundSelector()", "int?(SassNumber0)", "Statement({root:bool})", "int(SassNumber0[String?])", "double(SassNumber0,num,num[String?])", "SassNumber0(SassNumber0[String?])", "SassNumber0(SassNumber0,String[String?])", "Value/()", "~(String,int)", "Future<+originalUrl(AsyncImporter,Uri,Uri)?>()", "int(int,ComplexSelectorComponent)", "Expression({bracketList:bool,singleEquals:bool,until:bool()?})", "Null(_NodeSassNumber,num?[String?,SassNumber0?])", "double(_NodeSassNumber)", "Null(_NodeSassNumber,num)", "String(_NodeSassNumber)", "Null(_NodeSassNumber,String)", "SassScriptException0()", "JSExpressionVisitor(JSExpressionVisitorObject)", "JSStatementVisitor(JSStatementVisitorObject)", "String(SourceFile,int[int?])", "List(SourceFile)", "String?(Interpolation0)", "Object?(Statement0,StatementVisitor)", "Object?(Expression0,ExpressionVisitor)", "FileSpan(SassNode)", "NumberExpression()", "String(Object,@,@[@])", "0&(List)", "CssValue(Interpolation{trim:bool,warnForColor:bool})", "Stylesheet()", "Statement?()", "SassString0(SimpleSelector0)", "SelectorList0()", "CompoundSelector0()", "~(CssMediaQuery0)", "Set(CssParentNode0)", "~(SelectorList0)", "~(MapEntry)", "SingleUnitSassNumber0(double)", "Future()", "JSUrl0?(FileSpan)", "+loadedUrls,stylesheet(Set,CssStylesheet)()", "Module0()", "~(Module0)", "SassString0(int)", "SassString0(String)", "SassString0(Object[Object?,_ConstructorOptions1?])", "String(SassString0)", "bool(SassString0)", "int(SassString0)", "int(SassString0,Value0[String?])", "Null(_NodeSassString,String?[SassString0?])", "String(_NodeSassString)", "Null(_NodeSassString,String)", "Statement0({root:bool})", "Value?(Value)", "NumberExpression0()", "Stylesheet0()", "Statement0?()", "VariableDeclaration0(VariableDeclaration0)", "ArgumentDeclaration0()", "+(String,ArgumentDeclaration0)()", "VariableDeclaration0()", "StyleRule0(List,FileSpan)", "Declaration0(List,FileSpan)", "bool(+originalUrl(AsyncImporter,Uri,Uri))", "EachRule0(List,FileSpan)", "FunctionRule0(List,FileSpan)", "ForRule0(List,FileSpan)", "ContentBlock0(List,FileSpan)", "MediaRule0(List,FileSpan)", "MixinRule0(List,FileSpan)", "CssValue(Interpolation)", "SupportsRule0(List,FileSpan)", "WhileRule0(List,FileSpan)", "~(Expression0)", "~(BinaryOperator0)", "StringExpression0(Interpolation0)", "Null(~(Object?),~(Object?))", "ImmutableList0(Value0)", "String?(Value0)", "int(Value0,Value0[String?])", "SassBoolean0(Value0[String?])", "SassCalculation0(Value0[String?])", "SassColor0(Value0[String?])", "SassFunction0(Value0[String?])", "SassMap0(Value0[String?])", "SassMixin0(Value0[String?])", "SassNumber0(Value0[String?])", "SassString0(Value0[String?])", "SassMap0?(Value0)", "bool(Value0,Object?)", "int(Value0[Object?])", "VariableDeclaration(VariableDeclaration)", "String(String?)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "Value?(IfRuleClause)", "UserDefinedCallable(ContentBlock)", "0^(0^,0^)", "Value(Expression)", "Uri(+originalUrl(AsyncImporter,Uri,Uri))", "~(Object,StackTrace,EventSink<0^>)", "List<0^>(0^,List<0^>?)", "NodeCompileResult(String[CompileOptions?])", "NodeCompileResult(String[CompileStringOptions?])", "Promise(String[CompileOptions?])", "Promise(String[CompileStringOptions?])", "Importer0(Object?)", "Compiler()", "Promise()", "List(Object?)", "~(RenderOptions,~(Object?,RenderResult?))", "RenderResult(RenderOptions)", "ParserExports()", "Stylesheet0(String,String,String?,JSLogger?)", "Uri(JSUrl0)", "String(String[String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?])", "String(Object?)", "List(Value)", "bool(List)", "bool(String?,String?)", "+originalUrl(Importer0,Uri,Uri)?()", "List>(List)"], + interceptorsByTag: null, + leafTags: null, + arrayRti: Symbol("$ti"), + rttc: { + "1;": t1 => o => o instanceof A._Record_1 && t1._is(o._0), + "2;": (t1, t2) => o => o instanceof A._Record_2 && t1._is(o._0) && t2._is(o._1), + "2;forImport": (t1, t2) => o => o instanceof A._Record_2_forImport && t1._is(o._0) && t2._is(o._1), + "2;sourceMap": (t1, t2) => o => o instanceof A._Record_2_sourceMap && t1._is(o._0) && t2._is(o._1), + "2;imports,modules": (t1, t2) => o => o instanceof A._Record_2_imports_modules && t1._is(o._0) && t2._is(o._1), + "2;loadedUrls,stylesheet": (t1, t2) => o => o instanceof A._Record_2_loadedUrls_stylesheet && t1._is(o._0) && t2._is(o._1), + "3;": (t1, t2, t3) => o => o instanceof A._Record_3 && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "3;forImport": (t1, t2, t3) => o => o instanceof A._Record_3_forImport && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "3;originalUrl": (t1, t2, t3) => o => o instanceof A._Record_3_originalUrl && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "3;importer,isDependency": (t1, t2, t3) => o => o instanceof A._Record_3_importer_isDependency && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "5;named,namedNodes,positional,positionalNodes,separator": types => o => o instanceof A._Record_5_named_namedNodes_positional_positionalNodes_separator && A.pairwiseIsTest(types, o._values) + } + }; + A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","Stdin":"LegacyJavaScriptObject","Stdout":"LegacyJavaScriptObject","ReadlineModule":"LegacyJavaScriptObject","ReadlineOptions":"LegacyJavaScriptObject","ReadlineInterface":"LegacyJavaScriptObject","BufferModule":"LegacyJavaScriptObject","BufferConstants":"LegacyJavaScriptObject","Buffer":"LegacyJavaScriptObject","ConsoleModule":"LegacyJavaScriptObject","Console":"LegacyJavaScriptObject","EventEmitter":"LegacyJavaScriptObject","FS":"LegacyJavaScriptObject","FSConstants":"LegacyJavaScriptObject","FSWatcher":"LegacyJavaScriptObject","ReadStream":"LegacyJavaScriptObject","ReadStreamOptions":"LegacyJavaScriptObject","WriteStream":"LegacyJavaScriptObject","WriteStreamOptions":"LegacyJavaScriptObject","FileOptions":"LegacyJavaScriptObject","StatOptions":"LegacyJavaScriptObject","MkdirOptions":"LegacyJavaScriptObject","RmdirOptions":"LegacyJavaScriptObject","WatchOptions":"LegacyJavaScriptObject","WatchFileOptions":"LegacyJavaScriptObject","Stats":"LegacyJavaScriptObject","Promise":"LegacyJavaScriptObject","Date":"LegacyJavaScriptObject","JsError":"LegacyJavaScriptObject","Atomics":"LegacyJavaScriptObject","Modules":"LegacyJavaScriptObject","Module":"LegacyJavaScriptObject","Net":"LegacyJavaScriptObject","Socket":"LegacyJavaScriptObject","NetAddress":"LegacyJavaScriptObject","NetServer":"LegacyJavaScriptObject","NodeJsError":"LegacyJavaScriptObject","JsAssertionError":"LegacyJavaScriptObject","JsRangeError":"LegacyJavaScriptObject","JsReferenceError":"LegacyJavaScriptObject","JsSyntaxError":"LegacyJavaScriptObject","JsTypeError":"LegacyJavaScriptObject","JsSystemError":"LegacyJavaScriptObject","Process":"LegacyJavaScriptObject","CPUUsage":"LegacyJavaScriptObject","Release":"LegacyJavaScriptObject","StreamModule":"LegacyJavaScriptObject","Readable":"LegacyJavaScriptObject","Writable":"LegacyJavaScriptObject","Duplex":"LegacyJavaScriptObject","Transform":"LegacyJavaScriptObject","WritableOptions":"LegacyJavaScriptObject","ReadableOptions":"LegacyJavaScriptObject","Immediate":"LegacyJavaScriptObject","Timeout":"LegacyJavaScriptObject","TTY":"LegacyJavaScriptObject","TTYReadStream":"LegacyJavaScriptObject","TTYWriteStream":"LegacyJavaScriptObject","Util":"LegacyJavaScriptObject","JSArray0":"LegacyJavaScriptObject","Chokidar":"LegacyJavaScriptObject","ChokidarOptions":"LegacyJavaScriptObject","ChokidarWatcher":"LegacyJavaScriptObject","JSFunction":"LegacyJavaScriptObject","ImmutableList":"LegacyJavaScriptObject","ImmutableMap":"LegacyJavaScriptObject","NodeImporterResult":"LegacyJavaScriptObject","RenderContext":"LegacyJavaScriptObject","RenderContextOptions":"LegacyJavaScriptObject","RenderContextResult":"LegacyJavaScriptObject","RenderContextResultStats":"LegacyJavaScriptObject","JSModule":"LegacyJavaScriptObject","JSModuleRequire":"LegacyJavaScriptObject","JSClass":"LegacyJavaScriptObject","JSUrl":"LegacyJavaScriptObject","_PropertyDescriptor":"LegacyJavaScriptObject","_RequireMain":"LegacyJavaScriptObject","JSArray1":"LegacyJavaScriptObject","Chokidar0":"LegacyJavaScriptObject","ChokidarOptions0":"LegacyJavaScriptObject","ChokidarWatcher0":"LegacyJavaScriptObject","_ConstructionOptions":"LegacyJavaScriptObject","_ChannelOptions":"LegacyJavaScriptObject","_ToGamutOptions":"LegacyJavaScriptObject","_InterpolationOptions":"LegacyJavaScriptObject","_Channels":"LegacyJavaScriptObject","_NodeSassColor":"LegacyJavaScriptObject","CompileOptions":"LegacyJavaScriptObject","CompileStringOptions":"LegacyJavaScriptObject","NodeCompileResult":"LegacyJavaScriptObject","Deprecation1":"LegacyJavaScriptObject","_NodeException":"LegacyJavaScriptObject","Exports":"LegacyJavaScriptObject","LoggerNamespace":"LegacyJavaScriptObject","JSExpressionVisitorObject":"LegacyJavaScriptObject","Fiber":"LegacyJavaScriptObject","FiberClass":"LegacyJavaScriptObject","JSFunction0":"LegacyJavaScriptObject","ImmutableList0":"LegacyJavaScriptObject","ImmutableMap0":"LegacyJavaScriptObject","JSImporter":"LegacyJavaScriptObject","JSImporterResult":"LegacyJavaScriptObject","NodeImporterResult0":"LegacyJavaScriptObject","_ConstructorOptions":"LegacyJavaScriptObject","_NodeSassList":"LegacyJavaScriptObject","JSLogger":"LegacyJavaScriptObject","WarnOptions":"LegacyJavaScriptObject","DebugOptions":"LegacyJavaScriptObject","_NodeSassMap":"LegacyJavaScriptObject","JSModule0":"LegacyJavaScriptObject","JSModuleRequire0":"LegacyJavaScriptObject","_ConstructorOptions0":"LegacyJavaScriptObject","_NodeSassNumber":"LegacyJavaScriptObject","ParserExports":"LegacyJavaScriptObject","JSClass0":"LegacyJavaScriptObject","RenderContext0":"LegacyJavaScriptObject","RenderContextOptions0":"LegacyJavaScriptObject","RenderContextResult0":"LegacyJavaScriptObject","RenderContextResultStats0":"LegacyJavaScriptObject","RenderOptions":"LegacyJavaScriptObject","RenderResult":"LegacyJavaScriptObject","RenderResultStats":"LegacyJavaScriptObject","_Exports":"LegacyJavaScriptObject","JSStatementVisitorObject":"LegacyJavaScriptObject","_ConstructorOptions1":"LegacyJavaScriptObject","_NodeSassString":"LegacyJavaScriptObject","Types":"LegacyJavaScriptObject","JSUrl0":"LegacyJavaScriptObject","_PropertyDescriptor0":"LegacyJavaScriptObject","_RequireMain0":"LegacyJavaScriptObject","JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"Promise":[],"JsSystemError":[],"ImmutableList":[],"_ConstructionOptions":[],"_ChannelOptions":[],"_ToGamutOptions":[],"_InterpolationOptions":[],"_NodeSassColor":[],"CompileOptions":[],"CompileStringOptions":[],"NodeCompileResult":[],"Deprecation1":[],"_NodeException":[],"JSExpressionVisitorObject":[],"Fiber":[],"JSFunction0":[],"ImmutableList0":[],"ImmutableMap0":[],"JSImporter":[],"JSImporterResult":[],"NodeImporterResult0":[],"_ConstructorOptions":[],"_NodeSassList":[],"JSLogger":[],"WarnOptions":[],"DebugOptions":[],"_NodeSassMap":[],"_ConstructorOptions0":[],"_NodeSassNumber":[],"ParserExports":[],"JSClass0":[],"RenderContextOptions0":[],"RenderOptions":[],"RenderResult":[],"JSStatementVisitorObject":[],"_ConstructorOptions1":[],"_NodeSassString":[],"JSUrl0":[]},"JSArray":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastSet":{"Set":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.V":"4","MapBase.K":"3"},"LateError":{"Error":[]},"ReachabilityError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipWhileIterable":{"Iterable":["1"],"Iterable.E":"1"},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"FollowedByIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthFollowedByIterable":{"FollowedByIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"NonNullsIterable":{"Iterable":["1"],"Iterable.E":"1"},"UnmodifiableListBase":{"ListBase":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"ConstantSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ConstantStringSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"GeneralConstantSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"Instantiation":{"Function":[]},"Instantiation1":{"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"_CyclicInitializationError":{"Error":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"LinkedHashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"JsConstantLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"NativeByteBuffer":{"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeByteData":{"ByteData":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"NativeFloat32List":{"NativeTypedArrayOfDouble":[],"Float32List":[],"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"NativeTypedArrayOfDouble":[],"Float64List":[],"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_Future":{"Future":["1"]},"_SyncStarIterable":{"Iterable":["1"],"Iterable.E":"1"},"_AsyncCompleter":{"_Completer":["1"]},"_SyncCompleter":{"_Completer":["1"]},"_StreamController":{"EventSink":["1"]},"_AsyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_SyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_BufferingStreamSubscription.T":"2"},"_ExpandStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"Zone":[]},"_RootZone":{"Zone":[]},"Queue":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"_HashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_LinkedIdentityHashSet":{"_LinkedHashSet":["1"],"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableListView":{"ListBase":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"UnmodifiableMapBase":{"MapBase":["1","2"],"Map":["1","2"]},"_MapBaseValueIterable":{"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableSetView":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.V":"@","MapBase.K":"String"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Codec":["String","List"]},"_UnicodeSubsetEncoder":{"Converter":["String","List"]},"AsciiEncoder":{"Converter":["String","List"]},"Base64Codec":{"Codec":["List","String"]},"Base64Encoder":{"Converter":["List","String"]},"Encoding":{"Codec":["String","List"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"Utf8Codec":{"Codec":["String","List"]},"Utf8Encoder":{"Converter":["String","List"]},"Utf8Decoder":{"Converter":["List","String"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"RangeError":[],"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"_GeneratorIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_StringStackTrace":{"StackTrace":[]},"Runes":{"Iterable":["int"],"Iterable.E":"int"},"_Uri":{"_PlatformUri":[],"Uri":[]},"_SimpleUri":{"_PlatformUri":[],"Uri":[]},"_DataUri":{"_PlatformUri":[],"Uri":[]},"NullRejectionException":{"Exception":[]},"ArgParserException":{"FormatException":[],"Exception":[]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_CompleterStream":{"Stream":["1"],"Stream.T":"1"},"_NextRequest":{"_EventRequest":["1"]},"EmptyUnmodifiableSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2"},"UnionSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableSetView0":{"DelegatingSet":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapKeySet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_DelegatingIterableBase":{"Iterable":["1"]},"DelegatingSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"PathException":{"Exception":[]},"PathMap":{"Map":["String?","1"]},"Version":{"VersionRange":[],"Comparable":["VersionRange"]},"VersionRange":{"Comparable":["VersionRange"]},"ModifiableCssAtRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssComment":{"ModifiableCssNode":[],"CssComment":[],"CssNode":[],"AstNode":[]},"ModifiableCssDeclaration":{"ModifiableCssNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssImport":{"ModifiableCssNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssKeyframeBlock":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssMediaRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssNode":{"CssNode":[],"AstNode":[]},"ModifiableCssParentNode":{"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStyleRule":{"ModifiableCssParentNode":[],"CssStyleRule":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStylesheet":{"ModifiableCssParentNode":[],"CssStylesheet":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssSupportsRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"CssNode":{"AstNode":[]},"CssParentNode":{"CssNode":[],"AstNode":[]},"CssStylesheet":{"CssParentNode":[],"CssNode":[],"AstNode":[]},"CssValue":{"AstNode":[]},"_FakeAstNode":{"AstNode":[]},"Argument":{"AstNode":[]},"ArgumentDeclaration":{"AstNode":[]},"ArgumentInvocation":{"AstNode":[]},"ConfiguredVariable":{"AstNode":[]},"Expression":{"AstNode":[]},"BinaryOperationExpression":{"Expression":[],"AstNode":[]},"BooleanExpression":{"Expression":[],"AstNode":[]},"ColorExpression":{"Expression":[],"AstNode":[]},"FunctionExpression":{"Expression":[],"AstNode":[]},"IfExpression":{"Expression":[],"AstNode":[]},"InterpolatedFunctionExpression":{"Expression":[],"AstNode":[]},"ListExpression":{"Expression":[],"AstNode":[]},"MapExpression":{"Expression":[],"AstNode":[]},"NullExpression":{"Expression":[],"AstNode":[]},"NumberExpression":{"Expression":[],"AstNode":[]},"ParenthesizedExpression":{"Expression":[],"AstNode":[]},"SelectorExpression":{"Expression":[],"AstNode":[]},"StringExpression":{"Expression":[],"AstNode":[]},"SupportsExpression":{"Expression":[],"AstNode":[]},"UnaryOperationExpression":{"Expression":[],"AstNode":[]},"ValueExpression":{"Expression":[],"AstNode":[]},"VariableExpression":{"Expression":[],"AstNode":[]},"DynamicImport":{"Import":[],"AstNode":[]},"StaticImport":{"Import":[],"AstNode":[]},"Interpolation":{"AstNode":[]},"Statement":{"AstNode":[]},"AtRootRule":{"Statement":[],"AstNode":[]},"AtRule":{"Statement":[],"AstNode":[]},"CallableDeclaration":{"Statement":[],"AstNode":[]},"ContentBlock":{"Statement":[],"AstNode":[]},"ContentRule":{"Statement":[],"AstNode":[]},"DebugRule":{"Statement":[],"AstNode":[]},"Declaration":{"Statement":[],"AstNode":[]},"EachRule":{"Statement":[],"AstNode":[]},"ErrorRule":{"Statement":[],"AstNode":[]},"ExtendRule":{"Statement":[],"AstNode":[]},"ForRule":{"Statement":[],"AstNode":[]},"ForwardRule":{"Statement":[],"AstNode":[]},"FunctionRule":{"Statement":[],"AstNode":[]},"IfClause":{"IfRuleClause":[]},"ElseClause":{"IfRuleClause":[]},"IfRule":{"Statement":[],"AstNode":[]},"ImportRule":{"Statement":[],"AstNode":[]},"IncludeRule":{"Statement":[],"AstNode":[]},"LoudComment":{"Statement":[],"AstNode":[]},"MediaRule":{"Statement":[],"AstNode":[]},"MixinRule":{"Statement":[],"AstNode":[]},"_HasContentVisitor":{"StatementSearchVisitor":["bool"],"StatementSearchVisitor.T":"bool"},"ParentStatement":{"Statement":[],"AstNode":[]},"ReturnRule":{"Statement":[],"AstNode":[]},"SilentComment":{"Statement":[],"AstNode":[]},"StyleRule":{"Statement":[],"AstNode":[]},"Stylesheet":{"Statement":[],"AstNode":[]},"SupportsRule":{"Statement":[],"AstNode":[]},"UseRule":{"Statement":[],"AstNode":[]},"VariableDeclaration":{"Statement":[],"AstNode":[]},"WarnRule":{"Statement":[],"AstNode":[]},"WhileRule":{"Statement":[],"AstNode":[]},"SupportsAnything":{"AstNode":[]},"SupportsDeclaration":{"AstNode":[]},"SupportsFunction":{"AstNode":[]},"SupportsInterpolation":{"AstNode":[]},"SupportsNegation":{"AstNode":[]},"SupportsOperation":{"AstNode":[]},"Selector":{"AstNode":[]},"AttributeSelector":{"SimpleSelector":[],"AstNode":[]},"ClassSelector":{"SimpleSelector":[],"AstNode":[]},"ComplexSelector":{"AstNode":[]},"CompoundSelector":{"AstNode":[]},"IDSelector":{"SimpleSelector":[],"AstNode":[]},"SelectorList":{"AstNode":[]},"_ParentSelectorVisitor":{"SelectorSearchVisitor":["ParentSelector"],"SelectorSearchVisitor.T":"ParentSelector"},"ParentSelector":{"SimpleSelector":[],"AstNode":[]},"PlaceholderSelector":{"SimpleSelector":[],"AstNode":[]},"PseudoSelector":{"SimpleSelector":[],"AstNode":[]},"SimpleSelector":{"AstNode":[]},"TypeSelector":{"SimpleSelector":[],"AstNode":[]},"UniversalSelector":{"SimpleSelector":[],"AstNode":[]},"_EnvironmentModule0":{"Module0":["AsyncCallable"]},"AsyncBuiltInCallable":{"AsyncCallable":[]},"BuiltInCallable":{"Callable0":[],"AsyncBuiltInCallable":[],"AsyncCallable":[]},"PlainCssCallable":{"Callable0":[],"AsyncCallable":[]},"UserDefinedCallable":{"Callable0":[],"AsyncCallable":[]},"ExplicitConfiguration":{"Configuration":[]},"_EnvironmentModule":{"Module0":["Callable0"]},"SassRuntimeException":{"Exception":[]},"SassException":{"Exception":[]},"MultiSpanSassException":{"Exception":[]},"MultiSpanSassRuntimeException":{"SassRuntimeException":[],"Exception":[]},"SassFormatException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"MultiSpanSassFormatException":{"MultiSourceSpanFormatException":[],"SassFormatException":[],"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"UsageException":{"Exception":[]},"EmptyExtensionStore":{"ExtensionStore":[]},"MergedExtension":{"Extension":[]},"Importer":{"AsyncImporter":[]},"FilesystemImporter":{"Importer":[],"AsyncImporter":[]},"NodePackageImporter":{"Importer":[],"AsyncImporter":[]},"BuiltInModule":{"Module0":["1"]},"ForwardedModuleView":{"Module0":["1"]},"ShadowedModuleView":{"Module0":["1"]},"LazyFileSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"LimitedMapView":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"MergedMapView":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"MultiSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"PrefixedMapView":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_PrefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"PublicMemberMapView":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"UnprefixedMapView":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_UnprefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"SassArgumentList":{"SassList":[],"Value":[]},"SassBoolean":{"Value":[]},"SassCalculation":{"Value":[]},"SassColor":{"Value":[]},"LinearChannel":{"ColorChannel":[]},"A98RgbColorSpace":{"ColorSpace":[]},"DisplayP3ColorSpace":{"ColorSpace":[]},"HslColorSpace":{"ColorSpace":[]},"HwbColorSpace":{"ColorSpace":[]},"LabColorSpace":{"ColorSpace":[]},"LchColorSpace":{"ColorSpace":[]},"LmsColorSpace":{"ColorSpace":[]},"OklabColorSpace":{"ColorSpace":[]},"OklchColorSpace":{"ColorSpace":[]},"ProphotoRgbColorSpace":{"ColorSpace":[]},"Rec2020ColorSpace":{"ColorSpace":[]},"RgbColorSpace":{"ColorSpace":[]},"SrgbColorSpace":{"ColorSpace":[]},"SrgbLinearColorSpace":{"ColorSpace":[]},"XyzD50ColorSpace":{"ColorSpace":[]},"XyzD65ColorSpace":{"ColorSpace":[]},"SassFunction":{"Value":[]},"SassList":{"Value":[]},"SassMap":{"Value":[]},"SassMixin":{"Value":[]},"_SassNull":{"Value":[]},"SassNumber":{"Value":[]},"ComplexSassNumber":{"SassNumber":[],"Value":[]},"SingleUnitSassNumber":{"SassNumber":[],"Value":[]},"UnitlessSassNumber":{"SassNumber":[],"Value":[]},"SassString":{"Value":[]},"_EvaluationContext0":{"EvaluationContext":[]},"_EvaluationContext":{"EvaluationContext":[]},"Entry":{"Comparable":["Entry"]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"_FileSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"MultiSourceSpanException":{"Exception":[]},"MultiSourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"Chain":{"StackTrace":[]},"LazyTrace":{"Trace":[],"StackTrace":[]},"Trace":{"StackTrace":[]},"UnparsedFrame":{"Frame":[]},"StringScannerException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"A98RgbColorSpace0":{"ColorSpace0":[]},"SupportsAnything0":{"SassNode":[],"AstNode0":[]},"Argument0":{"SassNode":[],"AstNode0":[]},"ArgumentDeclaration0":{"SassNode":[],"AstNode0":[]},"ArgumentInvocation0":{"SassNode":[],"AstNode0":[]},"SassArgumentList0":{"SassList0":[],"Value0":[]},"JSToDartAsyncImporter":{"AsyncImporter0":[]},"AsyncBuiltInCallable0":{"AsyncCallable0":[]},"_EnvironmentModule2":{"Module1":["AsyncCallable0"]},"_EvaluateVisitor2":{"StatementVisitor":["Future"],"ExpressionVisitor":["Future"]},"_EvaluationContext2":{"EvaluationContext0":[]},"JSToDartAsyncFileImporter":{"AsyncImporter0":[]},"AtRootRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssAtRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"AtRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"AttributeSelector0":{"SimpleSelector0":[],"AstNode0":[]},"BinaryOperationExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"BooleanExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassBoolean0":{"Value0":[]},"BuiltInCallable0":{"Callable":[],"AsyncBuiltInCallable0":[],"AsyncCallable0":[]},"BuiltInModule0":{"Module1":["1"]},"SassCalculation0":{"Value0":[]},"CallableDeclaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"LinearChannel0":{"ColorChannel0":[]},"ClassSelector0":{"SimpleSelector0":[],"AstNode0":[]},"ColorExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassColor0":{"Value0":[]},"ModifiableCssComment0":{"ModifiableCssNode0":[],"CssComment0":[],"CssNode0":[],"AstNode0":[]},"AsyncCompiler":{"Compiler":[]},"ComplexSassNumber0":{"SassNumber0":[],"Value0":[]},"ComplexSelector0":{"AstNode0":[]},"CompoundSelector0":{"AstNode0":[]},"ExplicitConfiguration0":{"Configuration0":[]},"ConfiguredVariable0":{"SassNode":[],"AstNode0":[]},"ContentBlock0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ContentRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"DebugRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssDeclaration0":{"ModifiableCssNode0":[],"CssNode0":[],"AstNode0":[]},"Declaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SupportsDeclaration0":{"SassNode":[],"AstNode0":[]},"DisplayP3ColorSpace0":{"ColorSpace0":[]},"DynamicImport0":{"Import0":[],"SassNode":[],"AstNode0":[]},"EachRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"EmptyExtensionStore0":{"ExtensionStore0":[]},"_EnvironmentModule1":{"Module1":["Callable"]},"ErrorRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"_EvaluateVisitor1":{"StatementVisitor":["Value0?"],"ExpressionVisitor":["Value0"]},"_EvaluationContext1":{"EvaluationContext0":[]},"SassRuntimeException0":{"Exception":[]},"SassException0":{"Exception":[]},"MultiSpanSassException0":{"Exception":[]},"MultiSpanSassRuntimeException0":{"SassRuntimeException0":[],"Exception":[]},"SassFormatException0":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"MultiSpanSassFormatException0":{"MultiSourceSpanFormatException":[],"SassFormatException0":[],"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"Expression0":{"SassNode":[],"AstNode0":[]},"_IsCalculationSafeVisitor0":{"ExpressionVisitor":["bool"]},"JSExpressionVisitor":{"ExpressionVisitor":["Object?"]},"_MakeExpressionCalculationSafe0":{"ExpressionVisitor":["Expression0"]},"ExtendRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"JSToDartFileImporter":{"Importer0":[],"AsyncImporter0":[]},"FilesystemImporter0":{"Importer0":[],"AsyncImporter0":[]},"ForRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ForwardRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ForwardedModuleView0":{"Module1":["1"]},"FunctionExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SupportsFunction0":{"SassNode":[],"AstNode0":[]},"SassFunction0":{"Value0":[]},"FunctionRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"HslColorSpace0":{"ColorSpace0":[]},"HwbColorSpace0":{"ColorSpace0":[]},"IDSelector0":{"SimpleSelector0":[],"AstNode0":[]},"IfExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"IfClause0":{"IfRuleClause0":[]},"ElseClause0":{"IfRuleClause0":[]},"IfRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssImport0":{"ModifiableCssNode0":[],"CssNode0":[],"AstNode0":[]},"ImportRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"Importer0":{"AsyncImporter0":[]},"IncludeRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"InterpolatedFunctionExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"Interpolation0":{"SassNode":[],"AstNode0":[]},"SupportsInterpolation0":{"SassNode":[],"AstNode0":[]},"ModifiableCssKeyframeBlock0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"LabColorSpace0":{"ColorSpace0":[]},"LazyFileSpan0":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"LchColorSpace0":{"ColorSpace0":[]},"LimitedMapView0":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"ListExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SelectorList0":{"AstNode0":[]},"_ParentSelectorVisitor0":{"SelectorSearchVisitor0":["ParentSelector0"],"SelectorSearchVisitor0.T":"ParentSelector0"},"SassList0":{"Value0":[]},"LmsColorSpace0":{"ColorSpace0":[]},"LoudComment0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"MapExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassMap0":{"Value0":[]},"ModifiableCssMediaRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"MediaRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"MergedExtension0":{"Extension0":[]},"MergedMapView0":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"SassMixin0":{"Value0":[]},"MixinRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"_HasContentVisitor0":{"StatementSearchVisitor0":["bool"],"StatementVisitor":["bool?"],"StatementSearchVisitor0.T":"bool"},"MultiSpan0":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SupportsNegation0":{"SassNode":[],"AstNode0":[]},"NoOpImporter0":{"Importer0":[],"AsyncImporter0":[]},"_FakeAstNode0":{"AstNode0":[]},"CssNode0":{"AstNode0":[]},"CssParentNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssParentNode0":{"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"NodePackageImporter0":{"Importer0":[],"AsyncImporter0":[]},"NullExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"_SassNull0":{"Value0":[]},"NumberExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassNumber0":{"Value0":[]},"OklabColorSpace0":{"ColorSpace0":[]},"OklchColorSpace0":{"ColorSpace0":[]},"SupportsOperation0":{"SassNode":[],"AstNode0":[]},"ParentSelector0":{"SimpleSelector0":[],"AstNode0":[]},"ParentStatement0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ParenthesizedExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"PlaceholderSelector0":{"SimpleSelector0":[],"AstNode0":[]},"PlainCssCallable0":{"Callable":[],"AsyncCallable0":[]},"PrefixedMapView0":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_PrefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"ProphotoRgbColorSpace0":{"ColorSpace0":[]},"PseudoSelector0":{"SimpleSelector0":[],"AstNode0":[]},"PublicMemberMapView0":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"Rec2020ColorSpace0":{"ColorSpace0":[]},"ReturnRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"RgbColorSpace0":{"ColorSpace0":[]},"Selector0":{"AstNode0":[]},"SelectorExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"ShadowedModuleView0":{"Module1":["1"]},"SilentComment0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SimpleSelector0":{"AstNode0":[]},"SingleUnitSassNumber0":{"SassNumber0":[],"Value0":[]},"SrgbColorSpace0":{"ColorSpace0":[]},"SrgbLinearColorSpace0":{"ColorSpace0":[]},"Statement0":{"SassNode":[],"AstNode0":[]},"JSStatementVisitor":{"StatementVisitor":["Object?"]},"StaticImport0":{"Import0":[],"SassNode":[],"AstNode0":[]},"StringExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassString0":{"Value0":[]},"ModifiableCssStyleRule0":{"ModifiableCssParentNode0":[],"CssStyleRule0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"StyleRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"CssStylesheet0":{"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"ModifiableCssStylesheet0":{"ModifiableCssParentNode0":[],"CssStylesheet0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"Stylesheet0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SupportsExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssSupportsRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"SupportsRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"JSToDartImporter":{"Importer0":[],"AsyncImporter0":[]},"TypeSelector0":{"SimpleSelector0":[],"AstNode0":[]},"UnaryOperationExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"UnitlessSassNumber0":{"SassNumber0":[],"Value0":[]},"UniversalSelector0":{"SimpleSelector0":[],"AstNode0":[]},"UnprefixedMapView0":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_UnprefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"UseRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"UserDefinedCallable0":{"Callable":[],"AsyncCallable0":[]},"CssValue0":{"AstNode0":[]},"ValueExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"VariableExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"VariableDeclaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"WarnRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"WhileRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"XyzD50ColorSpace0":{"ColorSpace0":[]},"XyzD65ColorSpace0":{"ColorSpace0":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"CssComment":{"CssNode":[],"AstNode":[]},"CssStyleRule":{"CssParentNode":[],"CssNode":[],"AstNode":[]},"Import":{"AstNode":[]},"Callable0":{"AsyncCallable":[]},"Callable":{"AsyncCallable0":[]},"CssComment0":{"CssNode0":[],"AstNode0":[]},"Import0":{"SassNode":[],"AstNode0":[]},"SassNode":{"AstNode0":[]},"CssStyleRule0":{"CssParentNode0":[],"CssNode0":[],"AstNode0":[]}}')); + A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"WhereIterator":1,"SkipIterator":1,"SkipWhileIterator":1,"EmptyIterator":1,"FollowedByIterator":1,"NonNullsIterator":1,"FixedLengthListMixin":1,"UnmodifiableListMixin":1,"UnmodifiableListBase":1,"__CastListBase__CastIterableBase_ListMixin":2,"ConstantSet":1,"LinkedHashMapKeyIterator":1,"NativeTypedArray":1,"EventSink":1,"_SyncStarIterator":1,"_SyncStreamControllerDispatch":1,"_AsyncStreamControllerDispatch":1,"_AddStreamState":1,"_StreamControllerAddStreamState":1,"_DelayedEvent":1,"_DelayedData":1,"_PendingEvents":1,"_StreamIterator":1,"_ZoneFunction":1,"Queue":1,"UnmodifiableMapBase":2,"_UnmodifiableMapMixin":2,"MapView":2,"_UnmodifiableSetMixin":1,"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":2,"_UnmodifiableSetView_SetBase__UnmodifiableSetMixin":1,"_StringSinkConversionSink":1,"Expando":1,"_EventRequest":1,"_EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin":1,"DefaultEquality":1,"IterableEquality":1,"ListEquality":1,"_QueueList_Object_ListMixin":1,"_UnionSet_SetBase_UnmodifiableSetMixin":1,"UnmodifiableSetMixin":1,"_UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin":1,"_DelegatingIterableBase":1,"_MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin":1,"ParentStatement":1,"ParentStatement0":1,"ExpressionVisitor":1}')); + var string$ = { + x0a_BUG_: "\n\nBUG: This should include a source span!", + x0a_Morex20: "\n\nMore info and automated migrator: https://sass-lang.com/d/slash-div", + x0a_Morex3ac: "\n\nMore info: https://sass-lang.com/d/color-functions", + x0a_Morex3af: "\n\nMore info: https://sass-lang.com/d/function-units", + x0a_See_: "\n\nSee https://sass-lang.com/d/function-units", + x0a_This: "\n\nThis is only an error because you've set the ", + x0a_To_p: "\n\nTo preserve current behavior: math.random(math.div($limit, 1", + x0a_but_: "\n\nbut you may have intended it to mean:\n\n ", + x0aRun_i: "\nRun in verbose mode to see all warnings.", + x0aThis_: "\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x0aYou_m: "\nYou may not @extend the same selector from within different media queries.", + x20It_wi: " It will be omitted from the generated CSS.", + x20be_an: " be an extender.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x20can_n: " can not have both conditions and paths at the same level.\nFound ", + x20deprex20i: " deprecation is not yet active, so silencing it is unnecessary.", + x20deprex20m: " deprecation must be enabled before it can be made fatal.", + x20deprex20t: " deprecation to be fatal.\nRemove this setting if you need to keep using this feature.", + x20deprex2c: " deprecation, since it has also been made fatal.", + x20hue__: ' hue" may not be set for rectangular color space ', + x20in_in: " in interpolation here.\nIt may end up represented as ", + x20is_as: " is asynchronous.\nThis is probably caused by a bug in a Sass plugin.", + x20is_av: " is available from multiple global modules.", + x20is_de: " is deprecated.\n\nTo preserve current behavior: ", + x20is_noaf: " is not a future deprecation, so it does not need to be explicitly enabled.", + x20is_noav: " is not a valid selector: it must be a string,\na list of strings, or a list of lists of strings.", + x20is_nov: " is not valid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x20must_b: " must be either nearest, up, down or to-zero.", + x20must_n: " must not be greater than the number of characters in the file, ", + x20repet: " repetitive deprecation warnings omitted.", + x20targe: " targetLocations if the interpolation has ", + x20to_be: " to be in the legacy RGB, HSL, or HWB color space.", + x20to_be_: " to be in the legacy RGB, HSL, or HWB color space.\n\nRecommendation: color.change(", + x20to_cl: " to clarify that it's meant to be a binary operation, or wrap\nit in parentheses to make it a unary operation. This will be an error in future\nversions of Sass.\n\nMore info and automated migrator: https://sass-lang.com/d/strict-unary", + x20to_co: " to color.opacity() is deprecated.\n\nRecommendation: ", + x20was_a: ' was already loaded, so it can\'t be configured using "with".', + x20was_n: " was not declared with !default in the @used module.", + x20was_p: " was passed both by position and by name.", + x21defau: "!default should only be written once for each variable.\nThis will be an error in Dart Sass 2.0.0.", + x21globai: "!global isn't allowed for variables in other modules.", + x21globas: "!global should only be written once for each variable.\nThis will be an error in Dart Sass 2.0.0.", + x22x20can_: "\" can't be used as a parent in a compound selector.", + x22x20is_ix0a: '" is invalid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', + x22x20is_ix20: '" is invalid CSS. It will be omitted from the generated CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', + x22x20is_n: '" is not a valid Sass identifier.\n\nRecommendation: add an "as" clause to define an explicit namespace.', + x22x20is_o: "\" is only valid for nesting and shouldn't\nhave children other than style rules.", + x22x26__ma: '"&" may only used at the beginning of a compound selector.', + x22x29__If: "\").\nIf you really want to use the color value here, use '", + x22x2b__an: '"+" and "-" must be surrounded by whitespace in calculations.', + x22packa: '"package:" URLs aren\'t supported on this platform.', + x24color: "$color1, $color2, $weight: 50%, $method: null", + x24css_a: "$css and $module may not both be passed at once.", + x24list1: "$list1, $list2, $separator: auto, $bracketed: auto", + x24selec: "$selectors: At least one selector must be passed.", + x24separ: '$separator: Must be "space", "comma", "slash", or "auto".', + x27x20must: "' must be a path relative to the package root at '", + x27x2c_whi: "', which is not a '.scss', '.sass', or '.css' file.", + x28__is_d: '() is deprecated. Suggestion:\n\ncolor.channel($color, "', + x28__is_oa: "() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + x28__is_oc: "() is only supported for legacy colors. Please use color.channel() instead with an explicit $space argument.", + x28__isn: "() isn't in the sass:color module.\n\nRecommendation: color.adjust(", + x29x0a_Mor_: ")\n\nMore info: https://sass-lang.com/d/color-functions", + x29x0a_Moro: ")\n\nMore info: https://sass-lang.com/documentation/functions/color#", + x29x20in_a: ") in a future release.\n\nRecommendation: math.random(math.div($limit, 1", + x29x20is_d: ") is deprecated.\n\nTo preserve current behavior: ", + x29x20to_cg: ") to color.grayscale() is deprecated.\n\nRecommendation: ", + x29x20to_ci: ") to color.invert() is deprecated.\n\nRecommendation: ", + x29x29__Mo: "))\n\nMore info: https://sass-lang.com/d/function-units", + x2c_whicu: ", which uses a scheme declared as non-canonical.", + x2c_whicw: ', which will likely produce invalid CSS.\nAlways quote color names when using them as strings or map keys (for example, "', + x2e_Rela: ".\nRelative canonical URLs are deprecated and will eventually be disallowed.", + x3d_____: "===== asynchronous gap ===========================\n", + x40_moz_: "@-moz-document is deprecated and support will be removed in Dart Sass 2.0.0.\n\nFor details, see https://sass-lang.com/d/moz-document.", + x40conte: "@content is only allowed within mixin declarations.", + x40elsei: "@elseif is deprecated and will not be supported in future Sass versions.\n\nRecommendation: @else if", + x40exten: "@extend may only be used within style rules.", + x40forwa: "@forward rules must be written before any other rules.", + x40funct: "@function if($condition, $if-true, $if-false) {", + x40use_r: "@use rules must be written before any other rules.", + A_list: "A list with more than one element must have an explicit separator.", + A_pkg_h: "A pkg: URL must not have a host, port, username or password.", + A_pkg_q: "A pkg: URL must not have a query or fragment.", + ABCDEF: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + An_impa: "An importer may not have a findFileUrl method as well as canonicalize and load methods.", + An_impu: "An importer must have either canonicalize and load methods, or a findFileUrl method.", + As_of_R: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nRecommendation: add `", + As_of_S: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nSince this assignment is at the root of the stylesheet, the !global flag is\nunnecessary and can safely be removed.", + At_rul: "At-rules may not be used within nested declarations.", + Becaus: "Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: ", + Cannotff: "Cannot extract a file path from a URI with a fragment component", + Cannotfq: "Cannot extract a file path from a URI with a query component", + Cannotn: "Cannot extract a non-Windows file path from a file URI with an authority", + Comple: "ComplexSassNumber.hasPossiblyCompatibleUnits is not implemented.", + Could_: 'Could not find an option with short name "-', + CssNod: "CssNodes must have a CssStylesheet transitive parent node.", + Custom: "Custom importers are required to load stylesheets when compiling in the browser.", + Declarm: "Declarations may only be used within style rules.", + Declarw: 'Declarations whose names begin with "--" may not be nested.', + Either: "Either options.data or options.file must be set.", + Entrie: "Entries may not be removed from MergedMapView.", + Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type", + Evalua: "Evaluation handles @include and its content block together.", + Expecta: "Expected a color interpolation method, got an empty list.", + Expectu: 'Expected unquoted string "hue" at the end of ', + Expectv: "Expected variable, mixin, or function name", + Functi: "Functions may not be declared in control directives.", + Global: "Global built-in functions will be deprecated in the future.\nRemove the --future-deprecation=global-builtin flag to silence this warning for now.", + Hue_in: "Hue interpolation method may not be set for rectangular color space ", + If_con: "If conditions is longer than one element, conjunction may not be null.", + If_par: "If parsedAsCustomProperty is true, value must contain a SassString (was `", + If_str: "If strategy is not null, step is required.", + In_Sas: 'In Sass, "&&" means two copies of the parent selector. You probably want to use "and" instead.', + Indent: "Indenting at the beginning of the document is illegal.", + Interpn: "Interpolation isn't allowed in namespaces.", + Interpp: "Interpolation isn't allowed in plain CSS.", + Invali: 'Invalid return value for custom function "', + It_s_n: "It's not clear which file to import. Found:\n", + Keywor: "Keyword arguments can't be used with calculations.", + May_on: "May only contains Strings or Expressions.", + Media_: "Media rules may not be used within nested declarations.", + Mixinsb: "Mixins may not be declared in control directives.", + Mixinscf: "Mixins may not contain function declarations.", + Mixinscm: "Mixins may not contain mixin declarations.", + Modulel: "Module loop: this module is already being loaded.", + Modulen: "Module namespaces aren't allowed in plain CSS.", + Nested: "Nested declarations aren't allowed in plain CSS.", + New_en: "New entries may not be added to MergedMapView.", + No_Sasc: "No Sass callable is currently being evaluated.", + No_Sass: "No Sass stylesheet is currently being evaluated.", + NoSour: "NoSourceMapBuffer.buildSourceMap() is not supported.", + None_o: "None of the patterns in the switch expression the matched input value. See https://github.com/dart-lang/language/issues/3488 for details.", + Number: "Number to round and step arguments are required.", + Only_2: "Only 2 slash-separated elements allowed, but ", + Only_oa: "Only one argument may be passed to the plain-CSS invert() function.", + Only_op: "Only one positional argument is allowed. All other arguments must be passed by name.", + Other_: "Other modules' members can't be defined with !global.", + Parent: "Parent selectors can't have suffixes in plain CSS.", + Passin_: "Passing `alpha: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/null-alpha", + Passina: "Passing a string to call() is deprecated and will be illegal in Dart Sass 2.0.0.\n\nRecommendation: call(get-function(", + Passinp: "Passing percentage units to the global abs() function is deprecated.\nIn the future, this will emit a CSS abs() function to be resolved by the browser.\nTo preserve current behavior: math.abs(", + Placeh: "Placeholder selectors aren't allowed in plain CSS.", + Plain_: "Plain CSS functions don't support keyword arguments.", + Positi: "Positional arguments must come before keyword arguments.", + Privat: "Private members can't be accessed from outside their modules.", + Rest_a: "Rest arguments can't be used with calculations.", + Sassx20_ff: "Sass @function names beginning with -- are deprecated for forward-compatibility with plain CSS functions.\n\nFor details, see https://sass-lang.com/d/css-function-mixin", + Sassx20_fm: "Sass @function names beginning with -- are deprecated for forward-compatibility with plain CSS mixins.\n\nFor details, see https://sass-lang.com/d/css-function-mixin", + Sassx20_i: "Sass @import rules will be deprecated in the future.\nRemove the --future-deprecation=import flag to silence this warning for now.", + Sassx20_m: "Sass @mixin names beginning with -- are deprecated for forward-compatibility with plain CSS mixins.\n\nFor details, see https://sass-lang.com/d/css-function-mixin", + Sassx20v: "Sass variables aren't allowed in plain CSS.", + Sassx27s: "Sass's behavior for declarations that appear after nested\nrules will be changing to match the behavior specified by CSS in an upcoming\nversion. To keep the existing behavior, move the declaration above the nested\nrule. To opt into the new behavior, wrap the declaration in `& {}`.\n\nMore info: https://sass-lang.com/d/mixed-decls", + Silent: "Silent comments aren't allowed in plain CSS.", + Style_k: "Style rules may not be used within keyframe blocks.", + Style_n: "Style rules may not be used within nested declarations.", + Suppor: "Supports rules may not be used within nested declarations.", + The_Ex: "The ExtensionStore and CssStylesheet passed to cloneCssStylesheet() must come from the same compilation.", + The_No: "The Node package importer cannot be used without a filesystem.", + The_ca: "The canonicalize() method must return a URL.", + The_co: "The color() function doesn't support the color space ", + The_fe: "The feature-exists() function is deprecated.\n\nMore info: https://sass-lang.com/d/feature-exists", + The_fie: "The findFileUrl() method must return a URL.", + The_fiu: 'The findFileUrl() must return a URL with scheme file://, was "', + The_gi: "The given LineScannerState was not returned by this LineScanner.", + The_le: "The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/legacy-js-api", + The_lo: "The load() function must return an object with contents and syntax fields.", + The_pa: "The parent selector isn't allowed in plain CSS.", + The_sa: "The same variable may only be configured once.", + The_ta: 'The target selector was not found.\nUse "@extend ', + There_: "There's already a module with namespace \"", + This_d: 'This declaration has no argument named "$', + This_e: "This expression can't be used in a calculation.", + This_f: "This function isn't allowed in plain CSS.", + This_ma: 'This module and the new module both define a variable named "$', + This_mw: 'This module was already loaded, so it can\'t be configured using "with".', + This_o: "This operation can't be used in a calculation.", + This_s: "This selector doesn't have any properties and won't be rendered.", + This_v: "This variable was not declared with !default in the @used module.", + To_usei: "To use color.invert() with non-legacy color ", + To_usem: "To use color.mix() with non-legacy color ", + Top_lel: "Top-level leading combinators aren't allowed in plain CSS.", + Top_les: 'Top-level selectors may not contain the parent selector "&".', + Unable: "Unable to determine which of multiple potential resolutions found for ", + Unexpe: "Unexpected Zone.current[#_canonicalizeContext] value ", + User_a: "User-authored deprecations should not be silenced.", + Using__i: "Using / for division is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", + Using__o: "Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", + Using_c: "Using color.alpha() for a Microsoft filter is deprecated.\n\nRecommendation: ", + Using_t: "Using the current working directory as an implicit load path is deprecated. Either add it as an explicit load path or importer, or load this stylesheet from a different URL.", + Variab_: "Variable keyword argument map must have string keys.\n", + Variabs: "Variable keyword arguments must be a map (was ", + You_ma: "You may not @extend selectors across media queries.", + You_pr: "You probably don't mean to use the color value ", + x60_inst: "` instead.\nSee https://sass-lang.com/d/extend-compound for details.\n", + addExt: "addExtensions() can't be called for a const ExtensionStore.", + adjustd: "adjust-hue() is deprecated. Suggestion:\n\ncolor.adjust($color, $hue: ", + adjusto: "adjust-hue() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + alpha_: "alpha() is only supported for legacy colors. Please use color.channel() instead.", + canoni: "canonicalizeContext may only be accessed within a call to canonicalize().", + color_a: "color.alpha() is only supported for legacy colors. Please use color.channel() instead.", + color_c: "color.changeHsl() is only supported for legacy colors. Please use color.changeChannels() instead with an explicit $space argument.", + color_t: "color.to-gamut() requires a $method argument for forwards-compatibility with changes in the CSS spec. Suggestion:\n\n$method: local-minde", + compou: "compound selectors may no longer be extended.\nConsider `@extend ", + conten: "content-exists() may only be called within a mixin.", + darken: "darken() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + desatu: "desaturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + fileEx: "fileExists() is only supported on Node.js", + leadin: "leadingCombinators and components may not both be empty.", + lighte: "lighten() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + math_d: "math.div() will only support number arguments in a future release.\nUse list.slash() instead for a slash separator.", + math_r: "math.random() will no longer ignore $limit units (", + must_b: "must be a UniversalSelector or a TypeSelector", + parsed: 'parsedAsCustomProperty must be false if name doesn\'t begin with "--".', + satura: "saturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + semico: "semicolons aren't allowed in the indented syntax.", + throug: "through() must return false for at least one parent of ", + x7d__Mor: "})\nMore info: https://sass-lang.com/d/abs-percent" + }; + var type$ = (function rtii() { + var findType = A.findType; + return { + $env_1_1_String: findType("@"), + ArgParser: findType("ArgParser"), + Argument: findType("Argument"), + ArgumentDeclaration: findType("ArgumentDeclaration"), + ArgumentDeclaration_2: findType("ArgumentDeclaration0"), + Argument_2: findType("Argument0"), + AstNode: findType("AstNode"), + AstNode_2: findType("AstNode0"), + AsyncBuiltInCallable: findType("AsyncBuiltInCallable"), + AsyncBuiltInCallable_2: findType("AsyncBuiltInCallable0"), + AsyncCallable: findType("AsyncCallable"), + AsyncCallable_2: findType("AsyncCallable0"), + AsyncCompiler: findType("AsyncCompiler"), + AsyncImporter: findType("AsyncImporter0"), + Box_SelectorList: findType("Box"), + Box_SelectorList_2: findType("Box0"), + BuiltInCallable: findType("BuiltInCallable"), + BuiltInCallable_2: findType("BuiltInCallable0"), + BuiltInModule_AsyncCallable: findType("BuiltInModule"), + BuiltInModule_AsyncCallable_2: findType("BuiltInModule0"), + BuiltInModule_Callable: findType("BuiltInModule"), + BuiltInModule_Callable_2: findType("BuiltInModule0"), + ByteBuffer: findType("ByteBuffer"), + ByteData: findType("ByteData"), + Callable: findType("Callable0"), + Callable_2: findType("Callable"), + ChangeType: findType("ChangeType"), + CodeUnits: findType("CodeUnits"), + Combinator: findType("Combinator"), + Combinator_2: findType("Combinator0"), + Comparable_dynamic: findType("Comparable<@>"), + Comparable_nullable_Object: findType("Comparable"), + CompileResult: findType("CompileResult"), + CompileResult_2: findType("CompileResult0"), + ComplexSelector: findType("ComplexSelector"), + ComplexSelectorComponent: findType("ComplexSelectorComponent"), + ComplexSelectorComponent_2: findType("ComplexSelectorComponent0"), + ComplexSelector_2: findType("ComplexSelector0"), + Configuration: findType("Configuration"), + Configuration_2: findType("Configuration0"), + ConfiguredValue: findType("ConfiguredValue"), + ConfiguredValue_2: findType("ConfiguredValue0"), + ConfiguredVariable: findType("ConfiguredVariable"), + ConfiguredVariable_2: findType("ConfiguredVariable0"), + ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), + ConstantStringMap_String_double: findType("ConstantStringMap"), + ConstantStringSet_String: findType("ConstantStringSet"), + CssComment: findType("CssComment"), + CssComment_2: findType("CssComment0"), + CssMediaQuery: findType("CssMediaQuery"), + CssMediaQuery_2: findType("CssMediaQuery0"), + CssParentNode: findType("CssParentNode"), + CssParentNode_2: findType("CssParentNode0"), + CssStyleRule: findType("CssStyleRule"), + CssStyleRule_2: findType("CssStyleRule0"), + CssStylesheet: findType("CssStylesheet"), + CssStylesheet_2: findType("CssStylesheet0"), + CssValue_Combinator: findType("CssValue"), + CssValue_Combinator_2: findType("CssValue0"), + CssValue_List_String: findType("CssValue>"), + CssValue_List_String_2: findType("CssValue0>"), + CssValue_String: findType("CssValue"), + CssValue_String_2: findType("CssValue0"), + CssValue_Value: findType("CssValue"), + CssValue_Value_2: findType("CssValue0"), + DateTime: findType("DateTime"), + Deprecation: findType("Deprecation"), + Deprecation_2: findType("Deprecation1"), + Deprecation_3: findType("Deprecation0"), + EfficientLengthIterable_dynamic: findType("EfficientLengthIterable<@>"), + Error: findType("Error"), + EvaluationContext: findType("EvaluationContext"), + EvaluationContext_2: findType("EvaluationContext0"), + Exception: findType("Exception"), + Expression: findType("Expression"), + Expression_2: findType("Expression0"), + Extender: findType("Extender"), + Extender_2: findType("Extender0"), + Extension: findType("Extension"), + Extension_2: findType("Extension0"), + FileLocation: findType("FileLocation"), + FileSpan: findType("FileSpan"), + Float32List: findType("Float32List"), + Float64List: findType("Float64List"), + FormatException: findType("FormatException"), + Frame: findType("Frame"), + Function: findType("Function"), + FutureGroup_void: findType("FutureGroup<~>"), + FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("+loadedUrls,stylesheet(Set,CssStylesheet)/"), + FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("+loadedUrls,stylesheet(Set,CssStylesheet0)/"), + FutureOr_nullable_Uri: findType("Uri?/"), + Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("Future<+loadedUrls,stylesheet(Set,CssStylesheet)>"), + Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("Future<+loadedUrls,stylesheet(Set,CssStylesheet0)>"), + Future_Value: findType("Future"), + Future_Value_2: findType("Future"), + Future_nullable_CssValue_String: findType("Future?>"), + Future_nullable_CssValue_String_2: findType("Future?>"), + Future_nullable_ImporterResult: findType("Future"), + Future_nullable_Uri: findType("Future"), + Future_nullable_Value: findType("Future"), + Future_nullable_Value_2: findType("Future"), + Future_void: findType("Future<~>"), + IfClause: findType("IfClause"), + IfClause_2: findType("IfClause0"), + ImmutableList: findType("ImmutableList0"), + ImmutableList_2: findType("ImmutableList"), + ImmutableMap: findType("ImmutableMap0"), + Import: findType("Import"), + Import_2: findType("Import0"), + Importer: findType("Importer0"), + ImporterResult: findType("ImporterResult"), + ImporterResult_2: findType("ImporterResult0"), + Importer_2: findType("Importer"), + Int16List: findType("Int16List"), + Int32List: findType("Int32List"), + Int8List: findType("Int8List"), + Interpolation: findType("Interpolation"), + InterpolationBuffer: findType("InterpolationBuffer"), + InterpolationBuffer_2: findType("InterpolationBuffer0"), + Interpolation_2: findType("Interpolation0"), + Iterable_ComplexSelectorComponent: findType("Iterable"), + Iterable_ComplexSelectorComponent_2: findType("Iterable"), + Iterable_dynamic: findType("Iterable<@>"), + Iterable_nullable_Object: findType("Iterable"), + JSArray_Argument: findType("JSArray"), + JSArray_Argument_2: findType("JSArray"), + JSArray_AstNode: findType("JSArray"), + JSArray_AstNode_2: findType("JSArray"), + JSArray_AsyncBuiltInCallable: findType("JSArray"), + JSArray_AsyncBuiltInCallable_2: findType("JSArray"), + JSArray_AsyncCallable: findType("JSArray"), + JSArray_AsyncCallable_2: findType("JSArray"), + JSArray_AsyncImporter: findType("JSArray"), + JSArray_AsyncImporter_2: findType("JSArray"), + JSArray_BinaryOperator: findType("JSArray"), + JSArray_BinaryOperator_2: findType("JSArray"), + JSArray_BuiltInCallable: findType("JSArray"), + JSArray_BuiltInCallable_2: findType("JSArray"), + JSArray_Callable: findType("JSArray"), + JSArray_Callable_2: findType("JSArray"), + JSArray_ColorChannel: findType("JSArray"), + JSArray_ColorChannel_2: findType("JSArray"), + JSArray_ComplexSelector: findType("JSArray"), + JSArray_ComplexSelectorComponent: findType("JSArray"), + JSArray_ComplexSelectorComponent_2: findType("JSArray"), + JSArray_ComplexSelector_2: findType("JSArray"), + JSArray_ConfiguredVariable: findType("JSArray"), + JSArray_ConfiguredVariable_2: findType("JSArray"), + JSArray_CssComment: findType("JSArray"), + JSArray_CssComment_2: findType("JSArray"), + JSArray_CssMediaQuery: findType("JSArray"), + JSArray_CssMediaQuery_2: findType("JSArray"), + JSArray_CssNode: findType("JSArray"), + JSArray_CssNode_2: findType("JSArray"), + JSArray_CssStyleRule: findType("JSArray"), + JSArray_CssStyleRule_2: findType("JSArray"), + JSArray_CssValue_Combinator: findType("JSArray>"), + JSArray_CssValue_Combinator_2: findType("JSArray>"), + JSArray_Entry: findType("JSArray"), + JSArray_Expression: findType("JSArray"), + JSArray_Expression_2: findType("JSArray"), + JSArray_Extender: findType("JSArray"), + JSArray_Extender_2: findType("JSArray"), + JSArray_Extension: findType("JSArray"), + JSArray_ExtensionStore: findType("JSArray"), + JSArray_ExtensionStore_2: findType("JSArray"), + JSArray_Extension_2: findType("JSArray"), + JSArray_ForwardRule: findType("JSArray"), + JSArray_ForwardRule_2: findType("JSArray"), + JSArray_Frame: findType("JSArray"), + JSArray_Future_nullable_Record_3_int_and_String_and_nullable_String: findType("JSArray>"), + JSArray_IfClause: findType("JSArray"), + JSArray_IfClause_2: findType("JSArray"), + JSArray_Import: findType("JSArray"), + JSArray_Import_2: findType("JSArray"), + JSArray_Importer: findType("JSArray"), + JSArray_Importer_2: findType("JSArray"), + JSArray_Iterable_ComplexSelectorComponent: findType("JSArray>"), + JSArray_Iterable_ComplexSelectorComponent_2: findType("JSArray>"), + JSArray_JSFunction: findType("JSArray"), + JSArray_LinearChannel: findType("JSArray"), + JSArray_LinearChannel_2: findType("JSArray"), + JSArray_List_ComplexSelector: findType("JSArray>"), + JSArray_List_ComplexSelectorComponent: findType("JSArray>"), + JSArray_List_ComplexSelectorComponent_2: findType("JSArray>"), + JSArray_List_ComplexSelector_2: findType("JSArray>"), + JSArray_List_Extender: findType("JSArray>"), + JSArray_List_Extender_2: findType("JSArray>"), + JSArray_List_Iterable_ComplexSelectorComponent: findType("JSArray>>"), + JSArray_List_Iterable_ComplexSelectorComponent_2: findType("JSArray>>"), + JSArray_Map_String_AstNode: findType("JSArray>"), + JSArray_Map_String_AstNode_2: findType("JSArray>"), + JSArray_Map_String_AsyncCallable: findType("JSArray>"), + JSArray_Map_String_AsyncCallable_2: findType("JSArray>"), + JSArray_Map_String_Callable: findType("JSArray>"), + JSArray_Map_String_Callable_2: findType("JSArray>"), + JSArray_Map_String_Value: findType("JSArray>"), + JSArray_Map_String_Value_2: findType("JSArray>"), + JSArray_ModifiableCssImport: findType("JSArray"), + JSArray_ModifiableCssImport_2: findType("JSArray"), + JSArray_ModifiableCssNode: findType("JSArray"), + JSArray_ModifiableCssNode_2: findType("JSArray"), + JSArray_ModifiableCssParentNode: findType("JSArray"), + JSArray_ModifiableCssParentNode_2: findType("JSArray"), + JSArray_Module_AsyncCallable: findType("JSArray>"), + JSArray_Module_AsyncCallable_2: findType("JSArray>"), + JSArray_Module_Callable: findType("JSArray>"), + JSArray_Module_Callable_2: findType("JSArray>"), + JSArray_Object: findType("JSArray"), + JSArray_PseudoSelector: findType("JSArray"), + JSArray_PseudoSelector_2: findType("JSArray"), + JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value: findType("JSArray<+(ArgumentDeclaration,Value(List))>"), + JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2: findType("JSArray<+(ArgumentDeclaration0,Value0(List))>"), + JSArray_Record_2_Expression_and_Expression: findType("JSArray<+(Expression,Expression)>"), + JSArray_Record_2_Expression_and_Expression_2: findType("JSArray<+(Expression0,Expression0)>"), + JSArray_Record_2_String_and_AstNode: findType("JSArray<+(String,AstNode)>"), + JSArray_Record_2_String_and_AstNode_2: findType("JSArray<+(String,AstNode0)>"), + JSArray_SassList: findType("JSArray"), + JSArray_SassList_2: findType("JSArray"), + JSArray_SimpleSelector: findType("JSArray"), + JSArray_SimpleSelector_2: findType("JSArray"), + JSArray_SourceLocation: findType("JSArray"), + JSArray_Statement: findType("JSArray"), + JSArray_Statement_2: findType("JSArray"), + JSArray_String: findType("JSArray"), + JSArray_StylesheetNode: findType("JSArray"), + JSArray_TargetEntry: findType("JSArray"), + JSArray_TargetLineEntry: findType("JSArray"), + JSArray_Trace: findType("JSArray"), + JSArray_UseRule: findType("JSArray"), + JSArray_UseRule_2: findType("JSArray"), + JSArray_Value: findType("JSArray"), + JSArray_Value_2: findType("JSArray"), + JSArray_WatchEvent: findType("JSArray"), + JSArray__Highlight: findType("JSArray<_Highlight>"), + JSArray__Line: findType("JSArray<_Line>"), + JSArray_double: findType("JSArray"), + JSArray_dynamic: findType("JSArray<@>"), + JSArray_int: findType("JSArray"), + JSArray_nullable_Record_3_int_and_String_and_nullable_String: findType("JSArray<+(int,String,String?)?>"), + JSArray_nullable_SassNumber: findType("JSArray"), + JSArray_nullable_SassNumber_2: findType("JSArray"), + JSArray_nullable_String: findType("JSArray"), + JSClass: findType("JSClass0"), + JSFunction: findType("JSFunction0"), + JSImporter: findType("JSImporter"), + JSImporterResult: findType("JSImporterResult"), + JSNull: findType("JSNull"), + JSUrl: findType("JSUrl0"), + JavaScriptFunction: findType("JavaScriptFunction"), + JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), + JsIdentityLinkedHashMap_SimpleSelector_int: findType("JsIdentityLinkedHashMap"), + JsIdentityLinkedHashMap_SimpleSelector_int_2: findType("JsIdentityLinkedHashMap"), + JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList: findType("JsIdentityLinkedHashMap>"), + JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList_2: findType("JsIdentityLinkedHashMap>"), + JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), + JsSystemError: findType("JsSystemError"), + LimitedMapView_String_ConfiguredValue: findType("LimitedMapView"), + LimitedMapView_String_ConfiguredValue_2: findType("LimitedMapView0"), + LinearChannel: findType("LinearChannel"), + LinearChannel_2: findType("LinearChannel0"), + List_ComplexSelectorComponent: findType("List"), + List_ComplexSelectorComponent_2: findType("List"), + List_CssComment: findType("List"), + List_CssComment_2: findType("List"), + List_CssMediaQuery: findType("List"), + List_CssMediaQuery_2: findType("List"), + List_CssValue_Combinator: findType("List>"), + List_CssValue_Combinator_2: findType("List>"), + List_Extension: findType("List"), + List_ExtensionStore: findType("List"), + List_ExtensionStore_2: findType("List"), + List_Extension_2: findType("List"), + List_List_ComplexSelectorComponent: findType("List>"), + List_List_ComplexSelectorComponent_2: findType("List>"), + List_Module_AsyncCallable: findType("List>"), + List_Module_AsyncCallable_2: findType("List>"), + List_Module_Callable: findType("List>"), + List_Module_Callable_2: findType("List>"), + List_String: findType("List"), + List_WatchEvent: findType("List"), + List_dynamic: findType("List<@>"), + List_int: findType("List"), + List_nullable_Object: findType("List"), + MapKeySet_Module_AsyncCallable: findType("MapKeySet>"), + MapKeySet_Module_AsyncCallable_2: findType("MapKeySet>"), + MapKeySet_Module_Callable: findType("MapKeySet>"), + MapKeySet_Module_Callable_2: findType("MapKeySet>"), + MapKeySet_SimpleSelector: findType("MapKeySet"), + MapKeySet_SimpleSelector_2: findType("MapKeySet"), + MapKeySet_String: findType("MapKeySet"), + MapKeySet_nullable_Object: findType("MapKeySet"), + Map_ComplexSelector_Extension: findType("Map"), + Map_ComplexSelector_Extension_2: findType("Map"), + Map_String_AstNode: findType("Map"), + Map_String_AstNode_2: findType("Map"), + Map_String_AsyncCallable: findType("Map"), + Map_String_AsyncCallable_2: findType("Map"), + Map_String_Callable: findType("Map"), + Map_String_Callable_2: findType("Map"), + Map_String_Value: findType("Map"), + Map_String_Value_2: findType("Map"), + Map_String_dynamic: findType("Map"), + Map_dynamic_dynamic: findType("Map<@,@>"), + Map_of_nullable_Object_and_nullable_Object: findType("Map"), + MappedIterable_String_Frame: findType("MappedIterable"), + MappedListIterable_Frame_Frame: findType("MappedListIterable"), + MappedListIterable_String_Object: findType("MappedListIterable"), + MappedListIterable_String_String: findType("MappedListIterable"), + MappedListIterable_String_Trace: findType("MappedListIterable"), + MappedListIterable_String_Value: findType("MappedListIterable"), + MappedListIterable_String_Value_2: findType("MappedListIterable"), + MappedListIterable_String_dynamic: findType("MappedListIterable"), + MixinRule: findType("MixinRule"), + MixinRule_2: findType("MixinRule0"), + ModifiableBox_SelectorList: findType("ModifiableBox"), + ModifiableBox_SelectorList_2: findType("ModifiableBox0"), + ModifiableCssAtRule: findType("ModifiableCssAtRule"), + ModifiableCssAtRule_2: findType("ModifiableCssAtRule0"), + ModifiableCssKeyframeBlock: findType("ModifiableCssKeyframeBlock"), + ModifiableCssKeyframeBlock_2: findType("ModifiableCssKeyframeBlock0"), + ModifiableCssMediaRule: findType("ModifiableCssMediaRule"), + ModifiableCssMediaRule_2: findType("ModifiableCssMediaRule0"), + ModifiableCssNode: findType("ModifiableCssNode"), + ModifiableCssNode_2: findType("ModifiableCssNode0"), + ModifiableCssParentNode: findType("ModifiableCssParentNode"), + ModifiableCssParentNode_2: findType("ModifiableCssParentNode0"), + ModifiableCssStyleRule: findType("ModifiableCssStyleRule"), + ModifiableCssStyleRule_2: findType("ModifiableCssStyleRule0"), + ModifiableCssSupportsRule: findType("ModifiableCssSupportsRule"), + ModifiableCssSupportsRule_2: findType("ModifiableCssSupportsRule0"), + Module_AsyncCallable: findType("Module0"), + Module_AsyncCallable_2: findType("Module1"), + Module_Callable: findType("Module0"), + Module_Callable_2: findType("Module1"), + MultiSourceSpanFormatException: findType("MultiSourceSpanFormatException"), + NativeTypedArrayOfDouble: findType("NativeTypedArrayOfDouble"), + NativeTypedArrayOfInt: findType("NativeTypedArrayOfInt"), + NativeUint8List: findType("NativeUint8List"), + Never: findType("0&"), + NodeCompileResult: findType("NodeCompileResult"), + NodeImporterResult: findType("NodeImporterResult0"), + NonNullsIterable_Object: findType("NonNullsIterable"), + NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("NonNullsIterable<+originalUrl(AsyncImporter,Uri,Uri)>"), + NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("NonNullsIterable<+originalUrl(AsyncImporter0,Uri,Uri)>"), + NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("NonNullsIterable<+originalUrl(Importer,Uri,Uri)>"), + NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("NonNullsIterable<+originalUrl(Importer0,Uri,Uri)>"), + NonNullsIterable_SelectorList: findType("NonNullsIterable"), + NonNullsIterable_SelectorList_2: findType("NonNullsIterable"), + NonNullsIterable_String: findType("NonNullsIterable"), + Null: findType("Null"), + NumberExpression: findType("NumberExpression"), + NumberExpression_2: findType("NumberExpression0"), + Object: findType("Object"), + Option: findType("Option"), + PathMap_ChangeType: findType("PathMap"), + PathMap_Stream_WatchEvent: findType("PathMap>"), + PathMap_String: findType("PathMap"), + PathMap_nullable_String: findType("PathMap"), + Promise: findType("Promise"), + PseudoSelector: findType("PseudoSelector"), + PseudoSelector_2: findType("PseudoSelector0"), + RangeError: findType("RangeError"), + Record: findType("Record"), + Record_0: findType("+()"), + Record_1_nullable_Object: findType("+(Object?)"), + Record_2_Expression_and_Expression: findType("+(Expression,Expression)"), + Record_2_Expression_and_Expression_2: findType("+(Expression0,Expression0)"), + Record_2_List_Expression_and_Map_String_Expression: findType("+(List,Map)"), + Record_2_List_Expression_and_Map_String_Expression_2: findType("+(List,Map)"), + Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("+loadedUrls,stylesheet(Set,CssStylesheet)"), + Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("+loadedUrls,stylesheet(Set,CssStylesheet0)"), + Record_2_String_and_InterpolationMap: findType("+(String,InterpolationMap)"), + Record_2_String_and_InterpolationMap_2: findType("+(String,InterpolationMap0)"), + Record_2_String_and_SourceSpan: findType("+(String,SourceSpan)"), + Record_2_String_and_nullable_InterpolationMap: findType("+(String,InterpolationMap?)"), + Record_2_String_and_nullable_InterpolationMap_2: findType("+(String,InterpolationMap0?)"), + Record_2_Uri_and_bool_forImport: findType("+forImport(Uri,bool)"), + Record_2_nullable_Object_and_nullable_Object: findType("+(Object?,Object?)"), + Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool: findType("+(+originalUrl(AsyncImporter,Uri,Uri)?,bool)"), + Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool_2: findType("+(+originalUrl(AsyncImporter0,Uri,Uri)?,bool)"), + Record_2_nullable_String_and_nullable_String: findType("+(String?,String?)"), + Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("+originalUrl(AsyncImporter,Uri,Uri)"), + Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(AsyncImporter0,Uri,Uri)"), + Record_3_AsyncImporter_and_Uri_and_bool_forImport: findType("+forImport(AsyncImporter,Uri,bool)"), + Record_3_AsyncImporter_and_Uri_and_bool_forImport_2: findType("+forImport(AsyncImporter0,Uri,bool)"), + Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("+originalUrl(Importer,Uri,Uri)"), + Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(Importer0,Uri,Uri)"), + Record_3_Importer_and_Uri_and_bool_forImport: findType("+forImport(Importer,Uri,bool)"), + Record_3_Importer_and_Uri_and_bool_forImport_2: findType("+forImport(Importer0,Uri,bool)"), + Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency: findType("+importer,isDependency(Stylesheet,AsyncImporter?,bool)"), + Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency_2: findType("+importer,isDependency(Stylesheet0,AsyncImporter0?,bool)"), + Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl: findType("+originalUrl(Object?,Object?,Object?)"), + Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator: findType("+named,namedNodes,positional,positionalNodes,separator(Map,Map,List,List,ListSeparator)"), + Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator_2: findType("+named,namedNodes,positional,positionalNodes,separator(Map,Map,List,List,ListSeparator0)"), + RegExpMatch: findType("RegExpMatch"), + RenderContextOptions: findType("RenderContextOptions0"), + RenderResult: findType("RenderResult"), + Result_String: findType("Result"), + ReversedListIterable_Frame: findType("ReversedListIterable"), + Runes: findType("Runes"), + SassArgumentList: findType("SassArgumentList"), + SassArgumentList_2: findType("SassArgumentList0"), + SassBoolean: findType("SassBoolean"), + SassBoolean_2: findType("SassBoolean0"), + SassColor: findType("SassColor"), + SassColor_2: findType("SassColor0"), + SassFormatException: findType("SassFormatException"), + SassFormatException_2: findType("SassFormatException0"), + SassList: findType("SassList"), + SassList_2: findType("SassList0"), + SassMap: findType("SassMap"), + SassMap_2: findType("SassMap0"), + SassNumber: findType("SassNumber"), + SassNumber_2: findType("SassNumber0"), + SassRuntimeException: findType("SassRuntimeException"), + SassRuntimeException_2: findType("SassRuntimeException0"), + SassString: findType("SassString"), + SassString_2: findType("SassString0"), + SelectorList: findType("SelectorList"), + SelectorList_2: findType("SelectorList0"), + Set_ModifiableBox_SelectorList: findType("Set>"), + Set_ModifiableBox_SelectorList_2: findType("Set>"), + Set_Uri: findType("Set"), + SimpleSelector: findType("SimpleSelector"), + SimpleSelector_2: findType("SimpleSelector0"), + SourceFile: findType("SourceFile"), + SourceLocation: findType("SourceLocation"), + SourceSpan: findType("SourceSpan"), + SourceSpanFormatException: findType("SourceSpanFormatException"), + SourceSpanWithContext: findType("SourceSpanWithContext"), + StackTrace: findType("StackTrace"), + Statement: findType("Statement"), + Statement_2: findType("Statement0"), + StaticImport: findType("StaticImport"), + StaticImport_2: findType("StaticImport0"), + StreamCompleter_WatchEvent: findType("StreamCompleter"), + StreamGroup_WatchEvent: findType("StreamGroup"), + StreamQueue_String: findType("StreamQueue"), + Stream_WatchEvent: findType("Stream"), + String: findType("String"), + StringExpression: findType("StringExpression"), + StylesheetNode: findType("StylesheetNode"), + Timer: findType("Timer"), + Trace: findType("Trace"), + TrustedGetRuntimeType: findType("TrustedGetRuntimeType"), + TypeError: findType("TypeError"), + TypeSelector: findType("TypeSelector"), + TypeSelector_2: findType("TypeSelector0"), + Uint16List: findType("Uint16List"), + Uint32List: findType("Uint32List"), + Uint8ClampedList: findType("Uint8ClampedList"), + Uint8List: findType("Uint8List"), + UnionSet_Uri: findType("UnionSet"), + UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), + UnmodifiableListView_CssComment: findType("UnmodifiableListView"), + UnmodifiableListView_CssComment_2: findType("UnmodifiableListView"), + UnmodifiableListView_CssNode: findType("UnmodifiableListView"), + UnmodifiableListView_CssNode_2: findType("UnmodifiableListView"), + UnmodifiableListView_ForwardRule: findType("UnmodifiableListView"), + UnmodifiableListView_ForwardRule_2: findType("UnmodifiableListView"), + UnmodifiableListView_ModifiableCssNode: findType("UnmodifiableListView"), + UnmodifiableListView_ModifiableCssNode_2: findType("UnmodifiableListView"), + UnmodifiableListView_String: findType("UnmodifiableListView"), + UnmodifiableListView_UseRule: findType("UnmodifiableListView"), + UnmodifiableListView_UseRule_2: findType("UnmodifiableListView"), + UnmodifiableMapView_String_ArgParser: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_ConfiguredValue: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_ConfiguredValue_2: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Option: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Value: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Value_2: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_nullable_String_and_String: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_nullable_String_and_nullable_String: findType("UnmodifiableMapView"), + UnmodifiableSetView_String: findType("UnmodifiableSetView0"), + UnmodifiableSetView_StylesheetNode: findType("UnmodifiableSetView0"), + UnmodifiableSetView_Uri: findType("UnmodifiableSetView0"), + UnprefixedMapView_ConfiguredValue: findType("UnprefixedMapView"), + UnprefixedMapView_ConfiguredValue_2: findType("UnprefixedMapView0"), + Uri: findType("Uri"), + UseRule: findType("UseRule"), + UserDefinedCallable_AsyncEnvironment: findType("UserDefinedCallable"), + UserDefinedCallable_AsyncEnvironment_2: findType("UserDefinedCallable0"), + UserDefinedCallable_Environment: findType("UserDefinedCallable"), + UserDefinedCallable_Environment_2: findType("UserDefinedCallable0"), + Value: findType("Value"), + Value_2: findType("Value0"), + Value_Function_List_Value: findType("Value(List)"), + Value_Function_List_Value_2: findType("Value0(List)"), + VariableDeclaration: findType("VariableDeclaration"), + VariableDeclaration_2: findType("VariableDeclaration0"), + VersionRange: findType("VersionRange"), + WatchEvent: findType("WatchEvent"), + WhereIterable_List_Iterable_ComplexSelectorComponent: findType("WhereIterable>>"), + WhereIterable_List_Iterable_ComplexSelectorComponent_2: findType("WhereIterable>>"), + WhereIterable_String: findType("WhereIterable"), + WhereTypeIterable_PseudoSelector: findType("WhereTypeIterable"), + WhereTypeIterable_PseudoSelector_2: findType("WhereTypeIterable"), + WhereTypeIterable_String: findType("WhereTypeIterable"), + _AsyncCompleter_List_void: findType("_AsyncCompleter>"), + _AsyncCompleter_Object: findType("_AsyncCompleter"), + _AsyncCompleter_Stream_WatchEvent: findType("_AsyncCompleter>"), + _AsyncCompleter_String: findType("_AsyncCompleter"), + _AsyncCompleter_nullable_Object: findType("_AsyncCompleter"), + _CompleterStream_WatchEvent: findType("_CompleterStream"), + _EventRequest_dynamic: findType("_EventRequest<@>"), + _Future_List_void: findType("_Future>"), + _Future_Object: findType("_Future"), + _Future_Stream_WatchEvent: findType("_Future>"), + _Future_String: findType("_Future"), + _Future_Value: findType("_Future"), + _Future_Value_2: findType("_Future"), + _Future_bool: findType("_Future"), + _Future_dynamic: findType("_Future<@>"), + _Future_int: findType("_Future"), + _Future_nullable_Object: findType("_Future"), + _Future_void: findType("_Future<~>"), + _Highlight: findType("_Highlight"), + _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType("_IdentityHashMap"), + _LinkedIdentityHashSet_ComplexSelector: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_ComplexSelector_2: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_Extension: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_Extension_2: findType("_LinkedIdentityHashSet"), + _MapEntry: findType("_MapEntry"), + _NodeException: findType("_NodeException"), + _PlatformUri: findType("_PlatformUri"), + _SyncStarIterable_Deprecation: findType("_SyncStarIterable"), + _SyncStarIterable_Extension: findType("_SyncStarIterable"), + _SyncStarIterable_Extension_2: findType("_SyncStarIterable"), + _SyncStarIterable_SimpleSelector: findType("_SyncStarIterable"), + _SyncStarIterable_SimpleSelector_2: findType("_SyncStarIterable"), + _SyncStarIterable_String: findType("_SyncStarIterable"), + bool: findType("bool"), + double: findType("double"), + dynamic: findType("@"), + dynamic_Function: findType("@()"), + dynamic_Function_Object: findType("@(Object)"), + dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), + int: findType("int"), + legacy_Never: findType("0&*"), + legacy_Object: findType("Object*"), + nullable_AstNode: findType("AstNode?"), + nullable_AstNode_2: findType("AstNode0?"), + nullable_CanonicalizeContext: findType("CanonicalizeContext?"), + nullable_CanonicalizeContext_2: findType("CanonicalizeContext0?"), + nullable_CssValue_String: findType("CssValue?"), + nullable_CssValue_String_2: findType("CssValue0?"), + nullable_Future_Null: findType("Future?"), + nullable_Future_void: findType("Future<~>?"), + nullable_ImporterResult: findType("ImporterResult?"), + nullable_ImporterResult_2: findType("ImporterResult0?"), + nullable_Object: findType("Object?"), + nullable_Record_2_String_and_String: findType("+(String,String)?"), + nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("+originalUrl(AsyncImporter,Uri,Uri)?"), + nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(AsyncImporter0,Uri,Uri)?"), + nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("+originalUrl(Importer,Uri,Uri)?"), + nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(Importer0,Uri,Uri)?"), + nullable_Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency: findType("+importer,isDependency(Stylesheet0,AsyncImporter0?,bool)?"), + nullable_Record_3_int_and_String_and_nullable_String: findType("+(int,String,String?)?"), + nullable_SourceFile: findType("SourceFile?"), + nullable_SourceSpan: findType("SourceSpan?"), + nullable_StreamSubscription_WatchEvent: findType("StreamSubscription?"), + nullable_String: findType("String?"), + nullable_Stylesheet: findType("Stylesheet?"), + nullable_StylesheetNode: findType("StylesheetNode?"), + nullable_Stylesheet_2: findType("Stylesheet0?"), + nullable_Uri: findType("Uri?"), + nullable_Value: findType("Value?"), + nullable_Value_2: findType("Value0?"), + nullable__ConstructorOptions: findType("_ConstructorOptions?"), + nullable__ConstructorOptions_2: findType("_ConstructorOptions0?"), + nullable__ConstructorOptions_3: findType("_ConstructorOptions1?"), + nullable__Highlight: findType("_Highlight?"), + nullable_double: findType("double?"), + num: findType("num"), + void: findType("~"), + void_Function_Object: findType("~(Object)"), + void_Function_Object_StackTrace: findType("~(Object,StackTrace)") + }; + })(); + (function constants() { + var makeConstList = hunkHelpers.makeConstList; + B.Interceptor_methods = J.Interceptor.prototype; + B.JSArray_methods = J.JSArray.prototype; + B.JSInt_methods = J.JSInt.prototype; + B.JSNull_methods = J.JSNull.prototype; + B.JSNumber_methods = J.JSNumber.prototype; + B.JSString_methods = J.JSString.prototype; + B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; + B.JavaScriptObject_methods = J.JavaScriptObject.prototype; + B.NativeUint32List_methods = A.NativeUint32List.prototype; + B.NativeUint8List_methods = A.NativeUint8List.prototype; + B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; + B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; + B.LinearChannel_4KI = new A.LinearChannel(0, 1, false, false, false, "red", false, null); + B.LinearChannel_qbH = new A.LinearChannel(0, 1, false, false, false, "green", false, null); + B.LinearChannel_W3m = new A.LinearChannel(0, 1, false, false, false, "blue", false, null); + B.List_V3K = A._setArrayType(makeConstList([B.LinearChannel_4KI, B.LinearChannel_qbH, B.LinearChannel_W3m]), type$.JSArray_LinearChannel); + B.A98RgbColorSpace_bdu = new A.A98RgbColorSpace("a98-rgb", B.List_V3K); + B.LinearChannel_4KI0 = new A.LinearChannel0(0, 1, false, false, false, "red", false, null); + B.LinearChannel_qbH0 = new A.LinearChannel0(0, 1, false, false, false, "green", false, null); + B.LinearChannel_W3m0 = new A.LinearChannel0(0, 1, false, false, false, "blue", false, null); + B.List_V3K0 = A._setArrayType(makeConstList([B.LinearChannel_4KI0, B.LinearChannel_qbH0, B.LinearChannel_W3m0]), type$.JSArray_LinearChannel_2); + B.A98RgbColorSpace_bdu0 = new A.A98RgbColorSpace0("a98-rgb", B.List_V3K0); + B.AsciiEncoder_127 = new A.AsciiEncoder(127); + B.C_EmptyUnmodifiableSet1 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.AtRootQuery_n2q = new A.AtRootQuery(false, B.C_EmptyUnmodifiableSet1, false, true); + B.AtRootQuery_n2q0 = new A.AtRootQuery0(false, B.C_EmptyUnmodifiableSet1, false, true); + B.AttributeOperator_4QF = new A.AttributeOperator("=", "equal"); + B.AttributeOperator_4QF0 = new A.AttributeOperator0("=", "equal"); + B.AttributeOperator_61T = new A.AttributeOperator("*=", "substring"); + B.AttributeOperator_61T0 = new A.AttributeOperator0("*=", "substring"); + B.AttributeOperator_cMb = new A.AttributeOperator("^=", "prefix"); + B.AttributeOperator_cMb0 = new A.AttributeOperator0("^=", "prefix"); + B.AttributeOperator_jqB = new A.AttributeOperator("|=", "dash"); + B.AttributeOperator_jqB0 = new A.AttributeOperator0("|=", "dash"); + B.AttributeOperator_qhE = new A.AttributeOperator("$=", "suffix"); + B.AttributeOperator_qhE0 = new A.AttributeOperator0("$=", "suffix"); + B.AttributeOperator_yT8 = new A.AttributeOperator("~=", "include"); + B.AttributeOperator_yT80 = new A.AttributeOperator0("~=", "include"); + B.BinaryOperator_2No = new A.BinaryOperator("times", "*", 6, true, "times"); + B.BinaryOperator_2No0 = new A.BinaryOperator0("times", "*", 6, true, "times"); + B.BinaryOperator_KNx = new A.BinaryOperator("modulo", "%", 6, false, "modulo"); + B.BinaryOperator_KNx0 = new A.BinaryOperator0("modulo", "%", 6, false, "modulo"); + B.BinaryOperator_SPQ = new A.BinaryOperator("less than or equals", "<=", 4, false, "lessThanOrEquals"); + B.BinaryOperator_SPQ0 = new A.BinaryOperator0("less than or equals", "<=", 4, false, "lessThanOrEquals"); + B.BinaryOperator_SjO = new A.BinaryOperator("minus", "-", 5, false, "minus"); + B.BinaryOperator_SjO0 = new A.BinaryOperator0("minus", "-", 5, false, "minus"); + B.BinaryOperator_U77 = new A.BinaryOperator("divided by", "/", 6, false, "dividedBy"); + B.BinaryOperator_U770 = new A.BinaryOperator0("divided by", "/", 6, false, "dividedBy"); + B.BinaryOperator_bEa = new A.BinaryOperator("greater than", ">", 4, false, "greaterThan"); + B.BinaryOperator_bEa0 = new A.BinaryOperator0("greater than", ">", 4, false, "greaterThan"); + B.BinaryOperator_eDt = new A.BinaryOperator("and", "and", 2, true, "and"); + B.BinaryOperator_eDt0 = new A.BinaryOperator0("and", "and", 2, true, "and"); + B.BinaryOperator_g8k = new A.BinaryOperator("equals", "==", 3, false, "equals"); + B.BinaryOperator_g8k0 = new A.BinaryOperator0("equals", "==", 3, false, "equals"); + B.BinaryOperator_icU = new A.BinaryOperator("not equals", "!=", 3, false, "notEquals"); + B.BinaryOperator_icU0 = new A.BinaryOperator0("not equals", "!=", 3, false, "notEquals"); + B.BinaryOperator_miq = new A.BinaryOperator("less than", "<", 4, false, "lessThan"); + B.BinaryOperator_miq0 = new A.BinaryOperator0("less than", "<", 4, false, "lessThan"); + B.BinaryOperator_oEm = new A.BinaryOperator("greater than or equals", ">=", 4, false, "greaterThanOrEquals"); + B.BinaryOperator_oEm0 = new A.BinaryOperator0("greater than or equals", ">=", 4, false, "greaterThanOrEquals"); + B.BinaryOperator_qNM = new A.BinaryOperator("or", "or", 1, true, "or"); + B.BinaryOperator_qNM0 = new A.BinaryOperator0("or", "or", 1, true, "or"); + B.BinaryOperator_u15 = new A.BinaryOperator("plus", "+", 5, true, "plus"); + B.BinaryOperator_u150 = new A.BinaryOperator0("plus", "+", 5, true, "plus"); + B.BinaryOperator_wdM = new A.BinaryOperator("single equals", "=", 0, false, "singleEquals"); + B.BinaryOperator_wdM0 = new A.BinaryOperator0("single equals", "=", 0, false, "singleEquals"); + B.CONSTANT = new A.Instantiation1(A.math0__max$closure(), A.findType("Instantiation1")); + B.C_AsciiCodec = new A.AsciiCodec(); + B.C_AsciiGlyphSet = new A.AsciiGlyphSet(); + B.C_Base64Encoder = new A.Base64Encoder(); + B.C_Base64Codec = new A.Base64Codec(); + B.C_DefaultEquality = new A.DefaultEquality(); + B.C_EmptyExtensionStore = new A.EmptyExtensionStore(); + B.C_EmptyExtensionStore0 = new A.EmptyExtensionStore0(); + B.C_EmptyIterator = new A.EmptyIterator(); + B.C_EmptyUnmodifiableSet = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.C_EmptyUnmodifiableSet0 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.C_IterableEquality = new A.IterableEquality(); + B.C_JS_CONST = function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +}; + B.C_JS_CONST0 = function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof HTMLElement == "function"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; +}; + B.C_JS_CONST6 = function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; + if (userAgent.indexOf("DumpRenderTree") >= 0) return hooks; + if (userAgent.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +}; + B.C_JS_CONST1 = function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +}; + B.C_JS_CONST5 = function(hooks) { + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +}; + B.C_JS_CONST4 = function(hooks) { + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; +}; + B.C_JS_CONST2 = function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +}; + B.C_JS_CONST3 = function(hooks) { return hooks; } +; + B.C_JsonCodec = new A.JsonCodec(); + B.C_ListEquality0 = new A.ListEquality(); + B.C_ListEquality = new A.ListEquality(); + B.C_MapEquality = new A.MapEquality(A.findType("MapEquality")); + B.C_OutOfMemoryError = new A.OutOfMemoryError(); + B.C_SentinelValue = new A.SentinelValue(); + B.C_UnicodeGlyphSet = new A.UnicodeGlyphSet(); + B.C_Utf8Codec = new A.Utf8Codec(); + B.C_Utf8Encoder = new A.Utf8Encoder(); + B.C__ColorFormatEnum = new A._ColorFormatEnum(); + B.C__ColorFormatEnum0 = new A._ColorFormatEnum0(); + B.C__DelayedDone = new A._DelayedDone(); + B.C__HasContentVisitor = new A._HasContentVisitor(); + B.C__HasContentVisitor0 = new A._HasContentVisitor0(); + B.C__IsUselessVisitor = new A._IsUselessVisitor(); + B.C__IsUselessVisitor0 = new A._IsUselessVisitor0(); + B.C__JSRandom = new A._JSRandom(); + B.C__MakeExpressionCalculationSafe = new A._MakeExpressionCalculationSafe(); + B.C__MakeExpressionCalculationSafe0 = new A._MakeExpressionCalculationSafe0(); + B.C__ParentSelectorVisitor = new A._ParentSelectorVisitor(); + B.C__ParentSelectorVisitor0 = new A._ParentSelectorVisitor0(); + B.C__Required = new A._Required(); + B.C__RootZone = new A._RootZone(); + B.C__SassNull = new A._SassNull(); + B.C__SassNull0 = new A._SassNull0(); + B.CalculationOperator_171 = new A.CalculationOperator("times", "*", 2, "times"); + B.CalculationOperator_1710 = new A.CalculationOperator0("times", "*", 2, "times"); + B.CalculationOperator_CxF = new A.CalculationOperator("minus", "-", 1, "minus"); + B.CalculationOperator_CxF0 = new A.CalculationOperator0("minus", "-", 1, "minus"); + B.CalculationOperator_Qf1 = new A.CalculationOperator("divided by", "/", 2, "dividedBy"); + B.CalculationOperator_Qf10 = new A.CalculationOperator0("divided by", "/", 2, "dividedBy"); + B.CalculationOperator_g2q = new A.CalculationOperator("plus", "+", 1, "plus"); + B.CalculationOperator_g2q0 = new A.CalculationOperator0("plus", "+", 1, "plus"); + B.ChangeType_add = new A.ChangeType("add"); + B.ChangeType_modify = new A.ChangeType("modify"); + B.ChangeType_remove = new A.ChangeType("remove"); + B.ClipGamutMap_clip = new A.ClipGamutMap("clip"); + B.ClipGamutMap_clip0 = new A.ClipGamutMap0("clip"); + B.Combinator_8I8 = new A.Combinator(">", "child"); + B.Combinator_8I80 = new A.Combinator0(">", "child"); + B.Combinator_gRV = new A.Combinator("+", "nextSibling"); + B.Combinator_gRV0 = new A.Combinator0("+", "nextSibling"); + B.Combinator_y18 = new A.Combinator("~", "followingSibling"); + B.Combinator_y180 = new A.Combinator0("~", "followingSibling"); + B.Object_empty = {}; + B.Map_empty17 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Configuration_Map_empty_null = new A.Configuration(B.Map_empty17, null); + B.Map_empty18 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Configuration_Map_empty_null0 = new A.Configuration0(B.Map_empty18, null); + B.Deprecation_2Vk = new A.Deprecation("strict-unary", "1.55.0", false, "strictUnary"); + B.Deprecation_2jN = new A.Deprecation("function-units", "1.56.0", false, "functionUnits"); + B.Deprecation_2nU = new A.Deprecation("new-global", "1.17.2", false, "newGlobal"); + B.Deprecation_5pG = new A.Deprecation0("bogus-combinators", "1.54.0", "Leading, trailing, and repeated combinators.", false, "bogusCombinators"); + B.Deprecation_Agq = new A.Deprecation0("calc-interp", null, null, false, "calcInterp"); + B.Deprecation_B4v = new A.Deprecation("fs-importer-cwd", "1.73.0", false, "fsImporterCwd"); + B.Deprecation_E6M = new A.Deprecation("feature-exists", "1.78.0", false, "featureExists"); + B.Deprecation_E8a = new A.Deprecation0("slash-div", "1.33.0", "/ operator for division.", false, "slashDiv"); + B.Deprecation_EJz = new A.Deprecation("elseif", "1.3.2", false, "elseif"); + B.Deprecation_EfO = new A.Deprecation0("color-module-compat", "1.23.0", "Using color module functions in place of plain CSS functions.", false, "colorModuleCompat"); + B.Deprecation_EuK = new A.Deprecation0("legacy-js-api", "1.79.0", "Legacy JS API.", false, "legacyJsApi"); + B.Deprecation_FGJ = new A.Deprecation0("mixed-decls", "1.77.7", "Declarations after or between nested rules.", false, "mixedDecls"); + B.Deprecation_GFc = new A.Deprecation("abs-percent", "1.65.0", false, "absPercent"); + B.Deprecation_HJ0 = new A.Deprecation("css-function-mixin", "1.76.0", false, "cssFunctionMixin"); + B.Deprecation_IIf = new A.Deprecation("global-builtin", null, true, "globalBuiltin"); + B.Deprecation_IMm = new A.Deprecation("relative-canonical", "1.14.2", false, "relativeCanonical"); + B.Deprecation_Iit = new A.Deprecation0("moz-document", "1.7.2", "@-moz-document.", false, "mozDocument"); + B.Deprecation_JeE = new A.Deprecation("user-authored", null, false, "userAuthored"); + B.Deprecation_LBt = new A.Deprecation0("feature-exists", "1.78.0", "meta.feature-exists", false, "featureExists"); + B.Deprecation_MMc = new A.Deprecation0("call-string", "0.0.0", "Passing a string directly to meta.call().", false, "callString"); + B.Deprecation_Ssf = new A.Deprecation0("relative-canonical", "1.14.2", "Imports using relative canonical URLs.", false, "relativeCanonical"); + B.Deprecation_W6Z = new A.Deprecation0("new-global", "1.17.2", "Declaring new variables with !global.", false, "newGlobal"); + B.Deprecation_gf0 = new A.Deprecation("mixed-decls", "1.77.7", false, "mixedDecls"); + B.Deprecation_gkc = new A.Deprecation("call-string", "0.0.0", false, "callString"); + B.Deprecation_iDZ = new A.Deprecation("color-module-compat", "1.23.0", false, "colorModuleCompat"); + B.Deprecation_iXE = new A.Deprecation0("duplicate-var-flags", "1.62.0", "Using !default or !global multiple times for one variable.", false, "duplicateVarFlags"); + B.Deprecation_ido = new A.Deprecation("bogus-combinators", "1.54.0", false, "bogusCombinators"); + B.Deprecation_import_null_true_import = new A.Deprecation("import", null, true, "import"); + B.Deprecation_ivT = new A.Deprecation0("color-functions", "1.79.0", "Using global color functions instead of sass:color.", false, "colorFunctions"); + B.Deprecation_jYb = new A.Deprecation0("abs-percent", "1.65.0", "Passing percentages to the Sass abs() function.", false, "absPercent"); + B.Deprecation_kmo = new A.Deprecation0("fs-importer-cwd", "1.73.0", "Using the current working directory as an implicit load path.", false, "fsImporterCwd"); + B.Deprecation_oCX = new A.Deprecation0("function-units", "1.56.0", "Passing invalid units to built-in functions.", false, "functionUnits"); + B.Deprecation_oJv = new A.Deprecation("slash-div", "1.33.0", false, "slashDiv"); + B.Deprecation_omH = new A.Deprecation0("null-alpha", "1.62.3", "Passing null as alpha in the JS API.", false, "nullAlpha"); + B.Deprecation_oty = new A.Deprecation0("user-authored", null, null, false, "userAuthored"); + B.Deprecation_qBS = new A.Deprecation0("css-function-mixin", "1.76.0", "Function and mixin names beginning with --.", false, "cssFunctionMixin"); + B.Deprecation_qd9 = new A.Deprecation0("import", null, "@import rules.", true, "import"); + B.Deprecation_uNF = new A.Deprecation("moz-document", "1.7.2", false, "mozDocument"); + B.Deprecation_ukt = new A.Deprecation("color-functions", "1.79.0", false, "colorFunctions"); + B.Deprecation_wdM = new A.Deprecation0("global-builtin", null, "Global built-in functions that are available in sass: modules.", true, "globalBuiltin"); + B.Deprecation_woc = new A.Deprecation0("strict-unary", "1.55.0", "Ambiguous + and - operators.", false, "strictUnary"); + B.Deprecation_xw8 = new A.Deprecation0("elseif", "1.3.2", "@elseif.", false, "elseif"); + B.Deprecation_zPV = new A.Deprecation0("color-4-api", "1.79.0", "Certain uses of built-in sass:color functions.", false, "color4Api"); + B.Deprecation_zrt = new A.Deprecation("duplicate-var-flags", "1.62.0", false, "duplicateVarFlags"); + B.DisplayP3ColorSpace_NQk = new A.DisplayP3ColorSpace("display-p3", B.List_V3K); + B.DisplayP3ColorSpace_NQk0 = new A.DisplayP3ColorSpace0("display-p3", B.List_V3K0); + B.Duration_0 = new A.Duration(0); + B.ExtendMode_allTargets_allTargets = new A.ExtendMode("allTargets", "allTargets"); + B.ExtendMode_allTargets_allTargets0 = new A.ExtendMode0("allTargets", "allTargets"); + B.ExtendMode_normal_normal = new A.ExtendMode("normal", "normal"); + B.ExtendMode_normal_normal0 = new A.ExtendMode0("normal", "normal"); + B.ExtendMode_replace_replace = new A.ExtendMode("replace", "replace"); + B.ExtendMode_replace_replace0 = new A.ExtendMode0("replace", "replace"); + B.ColorChannel_hue_true_deg = new A.ColorChannel("hue", true, "deg"); + B.LinearChannel_Bq6 = new A.LinearChannel(0, 100, true, true, false, "saturation", false, "%"); + B.LinearChannel_cKo = new A.LinearChannel(0, 100, true, false, false, "lightness", false, "%"); + B.List_8aB = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg, B.LinearChannel_Bq6, B.LinearChannel_cKo]), type$.JSArray_ColorChannel); + B.HslColorSpace_gsm = new A.HslColorSpace("hsl", B.List_8aB); + B.ColorChannel_hue_true_deg0 = new A.ColorChannel0("hue", true, "deg"); + B.LinearChannel_Bq60 = new A.LinearChannel0(0, 100, true, true, false, "saturation", false, "%"); + B.LinearChannel_cKo0 = new A.LinearChannel0(0, 100, true, false, false, "lightness", false, "%"); + B.List_8aB0 = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg0, B.LinearChannel_Bq60, B.LinearChannel_cKo0]), type$.JSArray_ColorChannel_2); + B.HslColorSpace_gsm0 = new A.HslColorSpace0("hsl", B.List_8aB0); + B.HueInterpolationMethod_0 = new A.HueInterpolationMethod("shorter"); + B.HueInterpolationMethod_00 = new A.HueInterpolationMethod0("shorter"); + B.HueInterpolationMethod_1 = new A.HueInterpolationMethod("longer"); + B.HueInterpolationMethod_10 = new A.HueInterpolationMethod0("longer"); + B.HueInterpolationMethod_2 = new A.HueInterpolationMethod("increasing"); + B.HueInterpolationMethod_20 = new A.HueInterpolationMethod0("increasing"); + B.HueInterpolationMethod_3 = new A.HueInterpolationMethod("decreasing"); + B.HueInterpolationMethod_30 = new A.HueInterpolationMethod0("decreasing"); + B.LinearChannel_A0x = new A.LinearChannel(0, 100, true, false, false, "whiteness", false, "%"); + B.LinearChannel_SYB = new A.LinearChannel(0, 100, true, false, false, "blackness", false, "%"); + B.List_gc6 = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg, B.LinearChannel_A0x, B.LinearChannel_SYB]), type$.JSArray_ColorChannel); + B.HwbColorSpace_06z = new A.HwbColorSpace("hwb", B.List_gc6); + B.LinearChannel_A0x0 = new A.LinearChannel0(0, 100, true, false, false, "whiteness", false, "%"); + B.LinearChannel_SYB0 = new A.LinearChannel0(0, 100, true, false, false, "blackness", false, "%"); + B.List_gc60 = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg0, B.LinearChannel_A0x0, B.LinearChannel_SYB0]), type$.JSArray_ColorChannel_2); + B.HwbColorSpace_06z0 = new A.HwbColorSpace0("hwb", B.List_gc60); + B.JsonDecoder_null = new A.JsonDecoder(null); + B.JsonEncoder_null = new A.JsonEncoder(null); + B.LinearChannel_cKo1 = new A.LinearChannel(0, 100, false, true, true, "lightness", false, "%"); + B.LinearChannel_EgN = new A.LinearChannel(-125, 125, false, false, false, "a", false, null); + B.LinearChannel_WFl = new A.LinearChannel(-125, 125, false, false, false, "b", false, null); + B.List_gT2 = A._setArrayType(makeConstList([B.LinearChannel_cKo1, B.LinearChannel_EgN, B.LinearChannel_WFl]), type$.JSArray_ColorChannel); + B.LabColorSpace_IF2 = new A.LabColorSpace("lab", B.List_gT2); + B.LinearChannel_cKo2 = new A.LinearChannel0(0, 100, false, true, true, "lightness", false, "%"); + B.LinearChannel_EgN0 = new A.LinearChannel0(-125, 125, false, false, false, "a", false, null); + B.LinearChannel_WFl0 = new A.LinearChannel0(-125, 125, false, false, false, "b", false, null); + B.List_gT20 = A._setArrayType(makeConstList([B.LinearChannel_cKo2, B.LinearChannel_EgN0, B.LinearChannel_WFl0]), type$.JSArray_ColorChannel_2); + B.LabColorSpace_IF20 = new A.LabColorSpace0("lab", B.List_gT20); + B.LinearChannel_a4O = new A.LinearChannel(0, 150, false, true, false, "chroma", false, null); + B.List_i7B = A._setArrayType(makeConstList([B.LinearChannel_cKo1, B.LinearChannel_a4O, B.ColorChannel_hue_true_deg]), type$.JSArray_ColorChannel); + B.LchColorSpace_wv8 = new A.LchColorSpace("lch", B.List_i7B); + B.LinearChannel_a4O0 = new A.LinearChannel0(0, 150, false, true, false, "chroma", false, null); + B.List_i7B0 = A._setArrayType(makeConstList([B.LinearChannel_cKo2, B.LinearChannel_a4O0, B.ColorChannel_hue_true_deg0]), type$.JSArray_ColorChannel_2); + B.LchColorSpace_wv80 = new A.LchColorSpace0("lch", B.List_i7B0); + B.LineFeed_75j = new A.LineFeed0("lfcr", "\n\r", "lfcr"); + B.LineFeed_89t = new A.LineFeed0("cr", "\r", "cr"); + B.LineFeed_A4L = new A.LineFeed0("crlf", "\r\n", "crlf"); + B.LineFeed_LvD = new A.LineFeed0("lf", "\n", "lf"); + B.LineFeed_lf = new A.LineFeed("lf"); + B.LinearChannel_Npb = new A.LinearChannel(0, 255, false, true, true, "blue", false, null); + B.LinearChannel_Npb0 = new A.LinearChannel0(0, 255, false, true, true, "blue", false, null); + B.LinearChannel_bdu = new A.LinearChannel(0, 255, false, true, true, "red", false, null); + B.LinearChannel_bdu0 = new A.LinearChannel0(0, 255, false, true, true, "red", false, null); + B.LinearChannel_kUZ = new A.LinearChannel(0, 255, false, true, true, "green", false, null); + B.LinearChannel_kUZ0 = new A.LinearChannel0(0, 255, false, true, true, "green", false, null); + B.LinearChannel_omH = new A.LinearChannel(0, 1, false, false, false, "alpha", false, null); + B.LinearChannel_omH0 = new A.LinearChannel0(0, 1, false, false, false, "alpha", false, null); + B.ListSeparator_ECn = new A.ListSeparator("comma", ",", "comma"); + B.ListSeparator_ECn0 = new A.ListSeparator0("comma", ",", "comma"); + B.ListSeparator_cQA = new A.ListSeparator("slash", "/", "slash"); + B.ListSeparator_cQA0 = new A.ListSeparator0("slash", "/", "slash"); + B.ListSeparator_nbm = new A.ListSeparator("space", " ", "space"); + B.ListSeparator_nbm0 = new A.ListSeparator0("space", " ", "space"); + B.ListSeparator_undecided_null_undecided = new A.ListSeparator("undecided", null, "undecided"); + B.ListSeparator_undecided_null_undecided0 = new A.ListSeparator0("undecided", null, "undecided"); + B.List_23h = A._setArrayType(makeConstList([B.HueInterpolationMethod_00, B.HueInterpolationMethod_10, B.HueInterpolationMethod_20, B.HueInterpolationMethod_30]), A.findType("JSArray")); + B.List_2jN = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.List_42A = A._setArrayType(makeConstList([0, 0, 65490, 45055, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_4AN = A._setArrayType(makeConstList([0, 0, 32754, 11263, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.Object_79D = {em: 0, rem: 1, ex: 2, rex: 3, cap: 4, rcap: 5, ch: 6, rch: 7, ic: 8, ric: 9, lh: 10, rlh: 11, vw: 12, lvw: 13, svw: 14, dvw: 15, vh: 16, lvh: 17, svh: 18, dvh: 19, vi: 20, lvi: 21, svi: 22, dvi: 23, vb: 24, lvb: 25, svb: 26, dvb: 27, vmin: 28, lvmin: 29, svmin: 30, dvmin: 31, vmax: 32, lvmax: 33, svmax: 34, dvmax: 35, cqw: 36, cqh: 37, cqi: 38, cqb: 39, cqmin: 40, cqmax: 41, cm: 42, mm: 43, q: 44, in: 45, pt: 46, pc: 47, px: 48}; + B.Set_ot1A = new A.ConstantStringSet(B.Object_79D, 49, type$.ConstantStringSet_String); + B.Object_Yf3 = {deg: 0, grad: 1, rad: 2, turn: 3}; + B.Set_YZQG9 = new A.ConstantStringSet(B.Object_Yf3, 4, type$.ConstantStringSet_String); + B.Object_s_0_ms_1 = {s: 0, ms: 1}; + B.Set_wEo81 = new A.ConstantStringSet(B.Object_s_0_ms_1, 2, type$.ConstantStringSet_String); + B.Object_hz_0_khz_1 = {hz: 0, khz: 1}; + B.Set_y00Wb = new A.ConstantStringSet(B.Object_hz_0_khz_1, 2, type$.ConstantStringSet_String); + B.Object_3CF = {dpi: 0, dpcm: 1, dppx: 2}; + B.Set_Db0y4 = new A.ConstantStringSet(B.Object_3CF, 3, type$.ConstantStringSet_String); + B.List_Eeh = A._setArrayType(makeConstList([B.Set_ot1A, B.Set_YZQG9, B.Set_wEo81, B.Set_y00Wb, B.Set_Db0y4]), A.findType("JSArray>")); + B.List_GVy = A._setArrayType(makeConstList([0, 0, 26624, 1023, 65534, 2047, 65534, 2047]), type$.JSArray_int); + B.List_IYb = A._setArrayType(makeConstList([B.Deprecation_MMc, B.Deprecation_xw8, B.Deprecation_Iit, B.Deprecation_Ssf, B.Deprecation_W6Z, B.Deprecation_EfO, B.Deprecation_E8a, B.Deprecation_5pG, B.Deprecation_woc, B.Deprecation_oCX, B.Deprecation_iXE, B.Deprecation_omH, B.Deprecation_jYb, B.Deprecation_kmo, B.Deprecation_qBS, B.Deprecation_FGJ, B.Deprecation_LBt, B.Deprecation_zPV, B.Deprecation_ivT, B.Deprecation_EuK, B.Deprecation_qd9, B.Deprecation_wdM, B.Deprecation_oty, B.Deprecation_Agq]), A.findType("JSArray")); + B.List_M2I0 = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_M2I = A._setArrayType(makeConstList([0, 0, 65490, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_VOY = A._setArrayType(makeConstList([0, 0, 32776, 33792, 1, 10240, 0, 0]), type$.JSArray_int); + B.List_empty12 = A._setArrayType(makeConstList([]), type$.JSArray_Argument); + B.List_empty24 = A._setArrayType(makeConstList([]), type$.JSArray_Argument_2); + B.List_empty26 = A._setArrayType(makeConstList([]), type$.JSArray_AsyncCallable_2); + B.List_empty27 = A._setArrayType(makeConstList([]), type$.JSArray_AsyncImporter); + B.List_empty1 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelector); + B.List_empty15 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelector_2); + B.List_empty2 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelectorComponent); + B.List_empty16 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelectorComponent_2); + B.List_empty10 = A._setArrayType(makeConstList([]), type$.JSArray_ConfiguredVariable); + B.List_empty22 = A._setArrayType(makeConstList([]), type$.JSArray_ConfiguredVariable_2); + B.List_empty3 = A._setArrayType(makeConstList([]), type$.JSArray_CssNode); + B.List_empty17 = A._setArrayType(makeConstList([]), type$.JSArray_CssNode_2); + B.List_empty11 = A._setArrayType(makeConstList([]), type$.JSArray_CssStyleRule); + B.List_empty23 = A._setArrayType(makeConstList([]), type$.JSArray_CssStyleRule_2); + B.List_empty0 = A._setArrayType(makeConstList([]), type$.JSArray_CssValue_Combinator); + B.List_empty14 = A._setArrayType(makeConstList([]), type$.JSArray_CssValue_Combinator_2); + B.List_empty9 = A._setArrayType(makeConstList([]), type$.JSArray_Expression); + B.List_empty21 = A._setArrayType(makeConstList([]), type$.JSArray_Expression_2); + B.List_empty5 = A._setArrayType(makeConstList([]), type$.JSArray_Extension); + B.List_empty18 = A._setArrayType(makeConstList([]), type$.JSArray_Extension_2); + B.List_empty25 = A._setArrayType(makeConstList([]), type$.JSArray_Importer_2); + B.List_empty7 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); + B.List_empty19 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); + B.List_empty28 = A._setArrayType(makeConstList([]), type$.JSArray_Object); + B.List_empty13 = A._setArrayType(makeConstList([]), type$.JSArray_Statement); + B.List_empty = A._setArrayType(makeConstList([]), type$.JSArray_String); + B.List_empty8 = A._setArrayType(makeConstList([]), type$.JSArray_Value); + B.List_empty20 = A._setArrayType(makeConstList([]), type$.JSArray_Value_2); + B.List_empty4 = A._setArrayType(makeConstList([]), type$.JSArray_int); + B.List_empty6 = A._setArrayType(makeConstList([]), type$.JSArray_dynamic); + B.List_kUZ = A._setArrayType(makeConstList([B.CalculationOperator_g2q0, B.CalculationOperator_CxF0, B.CalculationOperator_1710, B.CalculationOperator_Qf10]), A.findType("JSArray")); + B.Deprecation_gQW = new A.Deprecation("null-alpha", "1.62.3", false, "nullAlpha"); + B.Deprecation_kOq = new A.Deprecation("color-4-api", "1.79.0", false, "color4Api"); + B.Deprecation_FYo = new A.Deprecation("legacy-js-api", "1.79.0", false, "legacyJsApi"); + B.Deprecation_ErI = new A.Deprecation("calc-interp", null, false, "calcInterp"); + B.List_kyy = A._setArrayType(makeConstList([B.Deprecation_gkc, B.Deprecation_EJz, B.Deprecation_uNF, B.Deprecation_IMm, B.Deprecation_2nU, B.Deprecation_iDZ, B.Deprecation_oJv, B.Deprecation_ido, B.Deprecation_2Vk, B.Deprecation_2jN, B.Deprecation_zrt, B.Deprecation_gQW, B.Deprecation_GFc, B.Deprecation_B4v, B.Deprecation_HJ0, B.Deprecation_gf0, B.Deprecation_E6M, B.Deprecation_kOq, B.Deprecation_ukt, B.Deprecation_FYo, B.Deprecation_import_null_true_import, B.Deprecation_IIf, B.Deprecation_JeE, B.Deprecation_ErI]), A.findType("JSArray")); + B.List_oyU = A._setArrayType(makeConstList([0, 0, 27858, 1023, 65534, 51199, 65535, 32767]), type$.JSArray_int); + B.List_piR = A._setArrayType(makeConstList([0, 0, 24576, 1023, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.LinearChannel_WRn = new A.LinearChannel(0, 1, false, false, false, "long", false, null); + B.LinearChannel_AKA = new A.LinearChannel(0, 1, false, false, false, "medium", false, null); + B.LinearChannel_Kdl = new A.LinearChannel(0, 1, false, false, false, "short", false, null); + B.List_Na9 = A._setArrayType(makeConstList([B.LinearChannel_WRn, B.LinearChannel_AKA, B.LinearChannel_Kdl]), type$.JSArray_ColorChannel); + B.LmsColorSpace_8I8 = new A.LmsColorSpace("lms", B.List_Na9); + B.LinearChannel_WRn0 = new A.LinearChannel0(0, 1, false, false, false, "long", false, null); + B.LinearChannel_AKA0 = new A.LinearChannel0(0, 1, false, false, false, "medium", false, null); + B.LinearChannel_Kdl0 = new A.LinearChannel0(0, 1, false, false, false, "short", false, null); + B.List_Na90 = A._setArrayType(makeConstList([B.LinearChannel_WRn0, B.LinearChannel_AKA0, B.LinearChannel_Kdl0]), type$.JSArray_ColorChannel_2); + B.LmsColorSpace_8I80 = new A.LmsColorSpace0("lms", B.List_Na90); + B.LocalMindeGamutMap_Q7f = new A.LocalMindeGamutMap("local-minde"); + B.LocalMindeGamutMap_Q7f0 = new A.LocalMindeGamutMap0("local-minde"); + B.Object_Jgz = {length: 0, angle: 1, time: 2, frequency: 3, "pixel density": 4}; + B.List_Mul = A._setArrayType(makeConstList(["in", "cm", "pc", "mm", "q", "pt", "px"]), type$.JSArray_String); + B.List_deg_grad_rad_turn = A._setArrayType(makeConstList(["deg", "grad", "rad", "turn"]), type$.JSArray_String); + B.List_s_ms = A._setArrayType(makeConstList(["s", "ms"]), type$.JSArray_String); + B.List_Hz_kHz = A._setArrayType(makeConstList(["Hz", "kHz"]), type$.JSArray_String); + B.List_dpi_dpcm_dppx = A._setArrayType(makeConstList(["dpi", "dpcm", "dppx"]), type$.JSArray_String); + B.Map_397RH = new A.ConstantStringMap(B.Object_Jgz, [B.List_Mul, B.List_deg_grad_rad_turn, B.List_s_ms, B.List_Hz_kHz, B.List_dpi_dpcm_dppx], A.findType("ConstantStringMap>")); + B.Map_empty7 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty0 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty2 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty15 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty9 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty11 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty4 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty12 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty6 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty14 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty8 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty16 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty10 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty5 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty13 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty3 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Object_AiQ = {in: 0, cm: 1, pc: 2, mm: 3, q: 4, pt: 5, px: 6, deg: 7, grad: 8, rad: 9, turn: 10, s: 11, ms: 12, Hz: 13, kHz: 14, dpi: 15, dpcm: 16, dppx: 17}; + B.Object_Uy1 = {in: 0, cm: 1, pc: 2, mm: 3, q: 4, pt: 5, px: 6}; + B.Map_MuACk = new A.ConstantStringMap(B.Object_Uy1, [1, 0.39370078740157477, 0.16666666666666666, 0.03937007874015748, 0.00984251968503937, 0.013888888888888888, 0.010416666666666666], type$.ConstantStringMap_String_double); + B.Map_MuHeh = new A.ConstantStringMap(B.Object_Uy1, [2.54, 1, 0.42333333333333334, 0.1, 0.025, 0.035277777777777776, 0.026458333333333334], type$.ConstantStringMap_String_double); + B.Map_Mudgs = new A.ConstantStringMap(B.Object_Uy1, [6, 2.3622047244094486, 1, 0.2362204724409449, 0.05905511811023623, 0.08333333333333333, 0.0625], type$.ConstantStringMap_String_double); + B.Map_Mu8oi = new A.ConstantStringMap(B.Object_Uy1, [25.4, 10, 4.233333333333333, 1, 0.25, 0.35277777777777775, 0.26458333333333334], type$.ConstantStringMap_String_double); + B.Map_MusBb = new A.ConstantStringMap(B.Object_Uy1, [101.6, 40, 16.933333333333334, 4, 1, 1.411111111111111, 1.0583333333333333], type$.ConstantStringMap_String_double); + B.Map_MuX5a = new A.ConstantStringMap(B.Object_Uy1, [72, 28.346456692913385, 12, 2.834645669291339, 0.7086614173228347, 1, 0.75], type$.ConstantStringMap_String_double); + B.Map_MuVWp = new A.ConstantStringMap(B.Object_Uy1, [96, 37.79527559055118, 16, 3.7795275590551185, 0.9448818897637796, 1.3333333333333333, 1], type$.ConstantStringMap_String_double); + B.Map_P98ha = new A.ConstantStringMap(B.Object_Yf3, [1, 0.9, 57.29577951308232, 360], type$.ConstantStringMap_String_double); + B.Map_P9IYz = new A.ConstantStringMap(B.Object_Yf3, [1.1111111111111112, 1, 63.66197723675813, 400], type$.ConstantStringMap_String_double); + B.Map_P9t42 = new A.ConstantStringMap(B.Object_Yf3, [0.017453292519943295, 0.015707963267948967, 1, 6.283185307179586], type$.ConstantStringMap_String_double); + B.Map_P9ZUB = new A.ConstantStringMap(B.Object_Yf3, [0.002777777777777778, 0.0025, 0.15915494309189535, 1], type$.ConstantStringMap_String_double); + B.Map_kUCK0 = new A.ConstantStringMap(B.Object_s_0_ms_1, [1, 0.001], type$.ConstantStringMap_String_double); + B.Map_kUfVB = new A.ConstantStringMap(B.Object_s_0_ms_1, [1000, 1], type$.ConstantStringMap_String_double); + B.Object_Hz_0_kHz_1 = {Hz: 0, kHz: 1}; + B.Map_WfkC8 = new A.ConstantStringMap(B.Object_Hz_0_kHz_1, [1, 1000], type$.ConstantStringMap_String_double); + B.Map_Wfs7p = new A.ConstantStringMap(B.Object_Hz_0_kHz_1, [0.001, 1], type$.ConstantStringMap_String_double); + B.Map_dgy9B = new A.ConstantStringMap(B.Object_3CF, [1, 2.54, 96], type$.ConstantStringMap_String_double); + B.Map_dgLkt = new A.ConstantStringMap(B.Object_3CF, [0.39370078740157477, 1, 37.79527559055118], type$.ConstantStringMap_String_double); + B.Map_dgw3K = new A.ConstantStringMap(B.Object_3CF, [0.010416666666666666, 0.026458333333333334, 1], type$.ConstantStringMap_String_double); + B.Map_gQqJO = new A.ConstantStringMap(B.Object_AiQ, [B.Map_MuACk, B.Map_MuHeh, B.Map_Mudgs, B.Map_Mu8oi, B.Map_MusBb, B.Map_MuX5a, B.Map_MuVWp, B.Map_P98ha, B.Map_P9IYz, B.Map_P9t42, B.Map_P9ZUB, B.Map_kUCK0, B.Map_kUfVB, B.Map_WfkC8, B.Map_Wfs7p, B.Map_dgy9B, B.Map_dgLkt, B.Map_dgw3K], A.findType("ConstantStringMap>")); + B.LinearChannel_cKo3 = new A.LinearChannel(0, 1, false, true, true, "lightness", false, "%"); + B.LinearChannel_6h9 = new A.LinearChannel(-0.4, 0.4, false, false, false, "a", false, null); + B.LinearChannel_kOG = new A.LinearChannel(-0.4, 0.4, false, false, false, "b", false, null); + B.List_9dS = A._setArrayType(makeConstList([B.LinearChannel_cKo3, B.LinearChannel_6h9, B.LinearChannel_kOG]), type$.JSArray_ColorChannel); + B.OklabColorSpace_yrt = new A.OklabColorSpace("oklab", B.List_9dS); + B.LinearChannel_cKo4 = new A.LinearChannel0(0, 1, false, true, true, "lightness", false, "%"); + B.LinearChannel_6h90 = new A.LinearChannel0(-0.4, 0.4, false, false, false, "a", false, null); + B.LinearChannel_kOG0 = new A.LinearChannel0(-0.4, 0.4, false, false, false, "b", false, null); + B.List_9dS0 = A._setArrayType(makeConstList([B.LinearChannel_cKo4, B.LinearChannel_6h90, B.LinearChannel_kOG0]), type$.JSArray_ColorChannel_2); + B.OklabColorSpace_yrt0 = new A.OklabColorSpace0("oklab", B.List_9dS0); + B.LinearChannel_kmC = new A.LinearChannel(0, 0.4, false, true, false, "chroma", false, null); + B.List_e5Y = A._setArrayType(makeConstList([B.LinearChannel_cKo3, B.LinearChannel_kmC, B.ColorChannel_hue_true_deg]), type$.JSArray_ColorChannel); + B.OklchColorSpace_li8 = new A.OklchColorSpace("oklch", B.List_e5Y); + B.LinearChannel_kmC0 = new A.LinearChannel0(0, 0.4, false, true, false, "chroma", false, null); + B.List_e5Y0 = A._setArrayType(makeConstList([B.LinearChannel_cKo4, B.LinearChannel_kmC0, B.ColorChannel_hue_true_deg0]), type$.JSArray_ColorChannel_2); + B.OklchColorSpace_li80 = new A.OklchColorSpace0("oklch", B.List_e5Y0); + B.OptionType_I6i = new A.OptionType("OptionType.flag"); + B.OptionType_tew = new A.OptionType("OptionType.single"); + B.OptionType_yPm = new A.OptionType("OptionType.multiple"); + B.OutputStyle_0 = new A.OutputStyle("expanded"); + B.OutputStyle_00 = new A.OutputStyle0("expanded"); + B.OutputStyle_1 = new A.OutputStyle("compressed"); + B.OutputStyle_10 = new A.OutputStyle0("compressed"); + B.ProphotoRgbColorSpace_KiG = new A.ProphotoRgbColorSpace("prophoto-rgb", B.List_V3K); + B.ProphotoRgbColorSpace_KiG0 = new A.ProphotoRgbColorSpace0("prophoto-rgb", B.List_V3K0); + B.Rec2020ColorSpace_2jN = new A.Rec2020ColorSpace("rec2020", B.List_V3K); + B.Rec2020ColorSpace_2jN0 = new A.Rec2020ColorSpace0("rec2020", B.List_V3K0); + B.Map_empty19 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Record2_EmptyExtensionStore_Map_empty = new A._Record_2(B.C_EmptyExtensionStore, B.Map_empty19); + B.Map_empty20 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Record2_EmptyExtensionStore_Map_empty0 = new A._Record_2(B.C_EmptyExtensionStore0, B.Map_empty20); + B.List_wEo = A._setArrayType(makeConstList([B.LinearChannel_bdu, B.LinearChannel_kUZ, B.LinearChannel_Npb]), type$.JSArray_ColorChannel); + B.RgbColorSpace_mlz = new A.RgbColorSpace("rgb", B.List_wEo); + B.List_wEo0 = A._setArrayType(makeConstList([B.LinearChannel_bdu0, B.LinearChannel_kUZ0, B.LinearChannel_Npb0]), type$.JSArray_ColorChannel_2); + B.RgbColorSpace_mlz0 = new A.RgbColorSpace0("rgb", B.List_wEo0); + B.SassBoolean_false = new A.SassBoolean(false); + B.SassBoolean_false0 = new A.SassBoolean0(false); + B.SassBoolean_true = new A.SassBoolean(true); + B.SassBoolean_true0 = new A.SassBoolean0(true); + B.SassList_bdS = new A.SassList(B.List_empty8, B.ListSeparator_ECn, false); + B.SassList_bdS0 = new A.SassList(B.List_empty8, B.ListSeparator_ECn, true); + B.SassList_bdS1 = new A.SassList0(B.List_empty20, B.ListSeparator_ECn0, false); + B.SassList_bdS2 = new A.SassList0(B.List_empty20, B.ListSeparator_ECn0, true); + B.SassList_k8F = new A.SassList0(B.List_empty20, B.ListSeparator_undecided_null_undecided0, false); + B.Map_empty21 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.SassMap_Map_empty = new A.SassMap(B.Map_empty21); + B.Map_empty22 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.SassMap_Map_empty0 = new A.SassMap0(B.Map_empty22); + B.Set_0 = new A.GeneralConstantSet([0], A.findType("GeneralConstantSet")); + B.Object_oyn = {".scss": 0, ".sass": 1, ".css": 2}; + B.Set_00 = new A.ConstantStringSet(B.Object_oyn, 3, type$.ConstantStringSet_String); + B.Set_2Dcfy = new A.GeneralConstantSet([B.RgbColorSpace_mlz, B.HslColorSpace_gsm], A.findType("GeneralConstantSet")); + B.Set_2Dcfy0 = new A.GeneralConstantSet([B.RgbColorSpace_mlz0, B.HslColorSpace_gsm0], A.findType("GeneralConstantSet")); + B.Object_6Gw = {sass: 0, style: 1, default: 2}; + B.Set_TnQrk = new A.ConstantStringSet(B.Object_6Gw, 3, type$.ConstantStringSet_String); + B.Set_empty1 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Set_empty5 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Set_empty2 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty0 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty6 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty4 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty7 = new A.ConstantStringSet(B.Object_empty, 0, type$.ConstantStringSet_String); + B.Set_empty3 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Set_empty = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Object_q8Y = {is: 0, matches: 1, where: 2}; + B.Set_mlzm2 = new A.ConstantStringSet(B.Object_q8Y, 3, type$.ConstantStringSet_String); + B.Set_mqKz = new A.GeneralConstantSet([B.BinaryOperator_2No, B.BinaryOperator_U77, B.BinaryOperator_u15, B.BinaryOperator_SjO], A.findType("GeneralConstantSet")); + B.Set_mqKz0 = new A.GeneralConstantSet([B.BinaryOperator_2No0, B.BinaryOperator_U770, B.BinaryOperator_u150, B.BinaryOperator_SjO0], A.findType("GeneralConstantSet")); + B.Object_GUq = {calc: 0, clamp: 1, hypot: 2, sin: 3, cos: 4, tan: 5, asin: 6, acos: 7, atan: 8, sqrt: 9, exp: 10, sign: 11, mod: 12, rem: 13, atan2: 14, pow: 15, log: 16}; + B.Set_yHF81 = new A.ConstantStringSet(B.Object_GUq, 17, type$.ConstantStringSet_String); + B.SrgbColorSpace_AD4 = new A.SrgbColorSpace("srgb", B.List_V3K); + B.SrgbColorSpace_AD40 = new A.SrgbColorSpace0("srgb", B.List_V3K0); + B.SrgbLinearColorSpace_sEs = new A.SrgbLinearColorSpace("srgb-linear", B.List_V3K); + B.SrgbLinearColorSpace_sEs0 = new A.SrgbLinearColorSpace0("srgb-linear", B.List_V3K0); + B.StderrLogger_false = new A.StderrLogger(false); + B.StderrLogger_false0 = new A.StderrLogger0(false); + B.Symbol__canonicalizeContext = new A.Symbol("_canonicalizeContext"); + B.Symbol__evaluationContext = new A.Symbol("_evaluationContext"); + B.Symbol__extensions = new A.Symbol("_extensions"); + B.Symbol__sourceSpecificity = new A.Symbol("_sourceSpecificity"); + B.Symbol_call = new A.Symbol("call"); + B.Syntax_CSS_css = new A.Syntax("CSS", "css"); + B.Syntax_CSS_css0 = new A.Syntax0("CSS", "css"); + B.Syntax_SCSS_scss = new A.Syntax("SCSS", "scss"); + B.Syntax_SCSS_scss0 = new A.Syntax0("SCSS", "scss"); + B.Syntax_Sass_sass = new A.Syntax("Sass", "sass"); + B.Syntax_Sass_sass0 = new A.Syntax0("Sass", "sass"); + B.Type_ByteBuffer_EOZ = A.typeLiteral("ByteBuffer"); + B.Type_ByteData_mF8 = A.typeLiteral("ByteData"); + B.Type_Float32List_Ymk = A.typeLiteral("Float32List"); + B.Type_Float64List_Ymk = A.typeLiteral("Float64List"); + B.Type_Int16List_cot = A.typeLiteral("Int16List"); + B.Type_Int32List_m1p = A.typeLiteral("Int32List"); + B.Type_Int8List_woc = A.typeLiteral("Int8List"); + B.Type_Object_QJv = A.typeLiteral("Object"); + B.Type_Uint16List_2mh = A.typeLiteral("Uint16List"); + B.Type_Uint32List_2mh = A.typeLiteral("Uint32List"); + B.Type_Uint8ClampedList_9Bb = A.typeLiteral("Uint8ClampedList"); + B.Type_Uint8List_CSc = A.typeLiteral("Uint8List"); + B.UnaryOperator_AiQ = new A.UnaryOperator("minus", "-", "minus"); + B.UnaryOperator_AiQ0 = new A.UnaryOperator0("minus", "-", "minus"); + B.UnaryOperator_SJr = new A.UnaryOperator("divide", "/", "divide"); + B.UnaryOperator_SJr0 = new A.UnaryOperator0("divide", "/", "divide"); + B.UnaryOperator_cLp = new A.UnaryOperator("plus", "+", "plus"); + B.UnaryOperator_cLp0 = new A.UnaryOperator0("plus", "+", "plus"); + B.UnaryOperator_not_not_not = new A.UnaryOperator("not", "not", "not"); + B.UnaryOperator_not_not_not0 = new A.UnaryOperator0("not", "not", "not"); + B.Utf8Decoder_false = new A.Utf8Decoder(false); + B.LinearChannel_qJx = new A.LinearChannel(0, 1, false, false, false, "x", false, null); + B.LinearChannel_FCG = new A.LinearChannel(0, 1, false, false, false, "y", false, null); + B.LinearChannel_AWj = new A.LinearChannel(0, 1, false, false, false, "z", false, null); + B.List_8eb = A._setArrayType(makeConstList([B.LinearChannel_qJx, B.LinearChannel_FCG, B.LinearChannel_AWj]), type$.JSArray_LinearChannel); + B.XyzD50ColorSpace_2No = new A.XyzD50ColorSpace("xyz-d50", B.List_8eb); + B.LinearChannel_qJx0 = new A.LinearChannel0(0, 1, false, false, false, "x", false, null); + B.LinearChannel_FCG0 = new A.LinearChannel0(0, 1, false, false, false, "y", false, null); + B.LinearChannel_AWj0 = new A.LinearChannel0(0, 1, false, false, false, "z", false, null); + B.List_8eb0 = A._setArrayType(makeConstList([B.LinearChannel_qJx0, B.LinearChannel_FCG0, B.LinearChannel_AWj0]), type$.JSArray_LinearChannel_2); + B.XyzD50ColorSpace_2No0 = new A.XyzD50ColorSpace0("xyz-d50", B.List_8eb0); + B.XyzD65ColorSpace_4CA = new A.XyzD65ColorSpace("xyz", B.List_8eb); + B.XyzD65ColorSpace_4CA0 = new A.XyzD65ColorSpace0("xyz", B.List_8eb0); + B._IsBogusVisitor_false = new A._IsBogusVisitor(false); + B._IsBogusVisitor_false0 = new A._IsBogusVisitor0(false); + B._IsBogusVisitor_true = new A._IsBogusVisitor(true); + B._IsBogusVisitor_true0 = new A._IsBogusVisitor0(true); + B._IsInvisibleVisitor_false = new A._IsInvisibleVisitor0(false); + B._IsInvisibleVisitor_false0 = new A._IsInvisibleVisitor2(false); + B._IsInvisibleVisitor_false_false = new A._IsInvisibleVisitor(false, false); + B._IsInvisibleVisitor_false_false0 = new A._IsInvisibleVisitor1(false, false); + B._IsInvisibleVisitor_true = new A._IsInvisibleVisitor0(true); + B._IsInvisibleVisitor_true0 = new A._IsInvisibleVisitor2(true); + B._IsInvisibleVisitor_true_false = new A._IsInvisibleVisitor(true, false); + B._IsInvisibleVisitor_true_false0 = new A._IsInvisibleVisitor1(true, false); + B._IsInvisibleVisitor_true_true = new A._IsInvisibleVisitor(true, true); + B._IsInvisibleVisitor_true_true0 = new A._IsInvisibleVisitor1(true, true); + B._PathDirection_3KU = new A._PathDirection("above root"); + B._PathDirection_8OV = new A._PathDirection("at root"); + B._PathDirection_e7w = new A._PathDirection("reaches root"); + B._PathDirection_yLX = new A._PathDirection("below root"); + B._PathRelation_different = new A._PathRelation("different"); + B._PathRelation_equal = new A._PathRelation("equal"); + B._PathRelation_inconclusive = new A._PathRelation("inconclusive"); + B._PathRelation_within = new A._PathRelation("within"); + B._SingletonCssMediaQueryMergeResult_0 = new A._SingletonCssMediaQueryMergeResult("empty"); + B._SingletonCssMediaQueryMergeResult_00 = new A._SingletonCssMediaQueryMergeResult0("empty"); + B._SingletonCssMediaQueryMergeResult_1 = new A._SingletonCssMediaQueryMergeResult("unrepresentable"); + B._SingletonCssMediaQueryMergeResult_10 = new A._SingletonCssMediaQueryMergeResult0("unrepresentable"); + B._StreamGroupState_canceled = new A._StreamGroupState("canceled"); + B._StreamGroupState_dormant = new A._StreamGroupState("dormant"); + B._StreamGroupState_listening = new A._StreamGroupState("listening"); + B._StreamGroupState_paused = new A._StreamGroupState("paused"); + B._StringStackTrace_uwd = new A._StringStackTrace(""); + B._ZoneFunction_NIe = new A._ZoneFunction(B.C__RootZone, A.async___rootHandleUncaughtError$closure()); + B._ZoneFunction_QOa = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterUnaryCallback$closure()); + B._ZoneFunction__RootZone__rootCreateTimer = new A._ZoneFunction(B.C__RootZone, A.async___rootCreateTimer$closure()); + B._ZoneFunction__RootZone__rootErrorCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootErrorCallback$closure()); + B._ZoneFunction__RootZone__rootFork = new A._ZoneFunction(B.C__RootZone, A.async___rootFork$closure()); + B._ZoneFunction__RootZone__rootPrint = new A._ZoneFunction(B.C__RootZone, A.async___rootPrint$closure()); + B._ZoneFunction__RootZone__rootRegisterCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterCallback$closure()); + B._ZoneFunction__RootZone__rootRun = new A._ZoneFunction(B.C__RootZone, A.async___rootRun$closure()); + B._ZoneFunction__RootZone__rootRunBinary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunBinary$closure()); + B._ZoneFunction__RootZone__rootRunUnary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunUnary$closure()); + B._ZoneFunction__RootZone__rootScheduleMicrotask = new A._ZoneFunction(B.C__RootZone, A.async___rootScheduleMicrotask$closure()); + B._ZoneFunction_kWM = new A._ZoneFunction(B.C__RootZone, A.async___rootCreatePeriodicTimer$closure()); + B._ZoneFunction_qxw = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterBinaryCallback$closure()); + B._ZoneSpecification_48t = new A._ZoneSpecification(null, null, null, null, null, null, null, null, null, null, null, null, null); + })(); + (function staticFields() { + $._JS_INTEROP_INTERCEPTOR_TAG = null; + $.toStringVisiting = A._setArrayType([], type$.JSArray_Object); + $.printToZone = null; + $.Primitives__identityHashCodeProperty = null; + $.BoundClosure__receiverFieldNameCache = null; + $.BoundClosure__interceptorFieldNameCache = null; + $.getTagFunction = null; + $.alternateTagFunction = null; + $.prototypeForTagFunction = null; + $.dispatchRecordsForInstanceTags = null; + $.interceptorsForUncacheableTags = null; + $.initNativeDispatchFlag = null; + $._Record__computedFieldKeys = A._setArrayType([], A.findType("JSArray?>")); + $._nextCallback = null; + $._lastCallback = null; + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + $.Zone__current = B.C__RootZone; + $._RootZone__rootDelegate = null; + $.Uri__cachedBaseString = ""; + $.Uri__cachedBaseUri = null; + $._fs = null; + $._currentUriBase = null; + $._current = null; + $._subselectorPseudos = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); + $._rootishPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); + $._features = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); + $._realCaseCache = function() { + var t1 = type$.String; + return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + }(); + $._selectorPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); + $._selectorPseudoElements = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); + $._glyphs = B.C_UnicodeGlyphSet; + $._rootishPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); + $._realCaseCache0 = function() { + var t1 = type$.String; + return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + }(); + $._features0 = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); + $._selectorPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); + $._selectorPseudoElements0 = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); + $._subselectorPseudos0 = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); + })(); + (function lazyInitializers() { + var _lazyFinal = hunkHelpers.lazyFinal, + _lazy = hunkHelpers.lazy; + _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure")); + _lazyFinal($, "nullFuture", "$get$nullFuture", () => B.C__RootZone.run$1$1(0, new A.nullFuture_closure(), A.findType("Future"))); + _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({ + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({$method$: null, + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + null.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + (void 0).$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + null.$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + (void 0).$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", () => A._AsyncRun__initializeScheduleImmediate()); + _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", () => A.findType("_Future")._as($.$get$nullFuture())); + _lazyFinal($, "Future__falseFuture", "$get$Future__falseFuture", () => A._Future$zoneValue(false, B.C__RootZone, type$.bool)); + _lazyFinal($, "_RootZone__rootMap", "$get$_RootZone__rootMap", () => { + var t1 = type$.dynamic; + return A.HashMap_HashMap(t1, t1); + }); + _lazyFinal($, "_Utf8Decoder__reusableBuffer", "$get$_Utf8Decoder__reusableBuffer", () => A.NativeUint8List_NativeUint8List(4096)); + _lazyFinal($, "_Utf8Decoder__decoder", "$get$_Utf8Decoder__decoder", () => new A._Utf8Decoder__decoder_closure().call$0()); + _lazyFinal($, "_Utf8Decoder__decoderNonfatal", "$get$_Utf8Decoder__decoderNonfatal", () => new A._Utf8Decoder__decoderNonfatal_closure().call$0()); + _lazyFinal($, "_Base64Decoder__inverseAlphabet", "$get$_Base64Decoder__inverseAlphabet", () => A.NativeInt8List__create1(A._ensureNativeList(A._setArrayType([-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, 62, -2, 62, -2, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -1, -2, -2, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, 63, -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2], type$.JSArray_int)))); + _lazyFinal($, "_Uri__isWindowsCached", "$get$_Uri__isWindowsCached", () => { + var t1 = typeof process != "undefined" && Object.prototype.toString.call(process) == "[object process]" && process.platform == "win32"; + return t1; + }); + _lazyFinal($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", () => A.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", false)); + _lazyFinal($, "_hashSeed", "$get$_hashSeed", () => A.objectHashCode(B.Type_Object_QJv)); + _lazyFinal($, "_scannerTables", "$get$_scannerTables", () => A._createTables()); + _lazyFinal($, "Option__invalidChars", "$get$Option__invalidChars", () => A.RegExp_RegExp("[ \\t\\r\\n\"'\\\\/]", false)); + _lazyFinal($, "_isStrictMode", "$get$_isStrictMode", () => new A._isStrictMode_closure().call$0()); + _lazyFinal($, "alwaysValid", "$get$alwaysValid", () => new A.alwaysValid_closure()); + _lazyFinal($, "readline", "$get$readline", () => self.readline); + _lazyFinal($, "windows", "$get$windows", () => A.Context_Context($.$get$Style_windows())); + _lazyFinal($, "url", "$get$url", () => A.Context_Context($.$get$Style_url())); + _lazyFinal($, "context", "$get$context", () => new A.Context($.$get$Style_platform(), null)); + _lazyFinal($, "Style_posix", "$get$Style_posix", () => new A.PosixStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("[^/]$", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_windows", "$get$Style_windows", () => new A.WindowsStyle(A.RegExp_RegExp("[/\\\\]", false), A.RegExp_RegExp("[^/\\\\]$", false), A.RegExp_RegExp("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])", false), A.RegExp_RegExp("^[/\\\\](?![/\\\\])", false))); + _lazyFinal($, "Style_url", "$get$Style_url", () => new A.UrlStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$", false), A.RegExp_RegExp("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_platform", "$get$Style_platform", () => A.Style__getPlatformStyle()); + _lazyFinal($, "startVersion", "$get$startVersion", () => A.RegExp_RegExp("^(\\d+)\\.(\\d+)\\.(\\d+)(-([0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*))?(\\+([0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*))?", false)); + _lazyFinal($, "completeVersion", "$get$completeVersion", () => A.RegExp_RegExp($.$get$startVersion().pattern + "$", false)); + _lazyFinal($, "IfExpression_declaration", "$get$IfExpression_declaration", () => A.ArgumentDeclaration_ArgumentDeclaration$parse(string$.x40funct, null)); + _lazyFinal($, "colorsByName", "$get$colorsByName", () => A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor_SassColor$rgb(154, 205, 50, 1), "yellow", A.SassColor_SassColor$rgb(255, 255, 0, 1), "whitesmoke", A.SassColor_SassColor$rgb(245, 245, 245, 1), "white", A.SassColor_SassColor$rgb(255, 255, 255, 1), "wheat", A.SassColor_SassColor$rgb(245, 222, 179, 1), "violet", A.SassColor_SassColor$rgb(238, 130, 238, 1), "turquoise", A.SassColor_SassColor$rgb(64, 224, 208, 1), "transparent", A.SassColor_SassColor$rgb(0, 0, 0, 0), "tomato", A.SassColor_SassColor$rgb(255, 99, 71, 1), "thistle", A.SassColor_SassColor$rgb(216, 191, 216, 1), "teal", A.SassColor_SassColor$rgb(0, 128, 128, 1), "tan", A.SassColor_SassColor$rgb(210, 180, 140, 1), "steelblue", A.SassColor_SassColor$rgb(70, 130, 180, 1), "springgreen", A.SassColor_SassColor$rgb(0, 255, 127, 1), "snow", A.SassColor_SassColor$rgb(255, 250, 250, 1), "slategrey", A.SassColor_SassColor$rgb(112, 128, 144, 1), "slategray", A.SassColor_SassColor$rgb(112, 128, 144, 1), "slateblue", A.SassColor_SassColor$rgb(106, 90, 205, 1), "skyblue", A.SassColor_SassColor$rgb(135, 206, 235, 1), "silver", A.SassColor_SassColor$rgb(192, 192, 192, 1), "sienna", A.SassColor_SassColor$rgb(160, 82, 45, 1), "seashell", A.SassColor_SassColor$rgb(255, 245, 238, 1), "seagreen", A.SassColor_SassColor$rgb(46, 139, 87, 1), "sandybrown", A.SassColor_SassColor$rgb(244, 164, 96, 1), "salmon", A.SassColor_SassColor$rgb(250, 128, 114, 1), "saddlebrown", A.SassColor_SassColor$rgb(139, 69, 19, 1), "royalblue", A.SassColor_SassColor$rgb(65, 105, 225, 1), "rosybrown", A.SassColor_SassColor$rgb(188, 143, 143, 1), "red", A.SassColor_SassColor$rgb(255, 0, 0, 1), "rebeccapurple", A.SassColor_SassColor$rgb(102, 51, 153, 1), "purple", A.SassColor_SassColor$rgb(128, 0, 128, 1), "powderblue", A.SassColor_SassColor$rgb(176, 224, 230, 1), "plum", A.SassColor_SassColor$rgb(221, 160, 221, 1), "pink", A.SassColor_SassColor$rgb(255, 192, 203, 1), "peru", A.SassColor_SassColor$rgb(205, 133, 63, 1), "peachpuff", A.SassColor_SassColor$rgb(255, 218, 185, 1), "papayawhip", A.SassColor_SassColor$rgb(255, 239, 213, 1), "palevioletred", A.SassColor_SassColor$rgb(219, 112, 147, 1), "paleturquoise", A.SassColor_SassColor$rgb(175, 238, 238, 1), "palegreen", A.SassColor_SassColor$rgb(152, 251, 152, 1), "palegoldenrod", A.SassColor_SassColor$rgb(238, 232, 170, 1), "orchid", A.SassColor_SassColor$rgb(218, 112, 214, 1), "orangered", A.SassColor_SassColor$rgb(255, 69, 0, 1), "orange", A.SassColor_SassColor$rgb(255, 165, 0, 1), "olivedrab", A.SassColor_SassColor$rgb(107, 142, 35, 1), "olive", A.SassColor_SassColor$rgb(128, 128, 0, 1), "oldlace", A.SassColor_SassColor$rgb(253, 245, 230, 1), "navy", A.SassColor_SassColor$rgb(0, 0, 128, 1), "navajowhite", A.SassColor_SassColor$rgb(255, 222, 173, 1), "moccasin", A.SassColor_SassColor$rgb(255, 228, 181, 1), "mistyrose", A.SassColor_SassColor$rgb(255, 228, 225, 1), "mintcream", A.SassColor_SassColor$rgb(245, 255, 250, 1), "midnightblue", A.SassColor_SassColor$rgb(25, 25, 112, 1), "mediumvioletred", A.SassColor_SassColor$rgb(199, 21, 133, 1), "mediumturquoise", A.SassColor_SassColor$rgb(72, 209, 204, 1), "mediumspringgreen", A.SassColor_SassColor$rgb(0, 250, 154, 1), "mediumslateblue", A.SassColor_SassColor$rgb(123, 104, 238, 1), "mediumseagreen", A.SassColor_SassColor$rgb(60, 179, 113, 1), "mediumpurple", A.SassColor_SassColor$rgb(147, 112, 219, 1), "mediumorchid", A.SassColor_SassColor$rgb(186, 85, 211, 1), "mediumblue", A.SassColor_SassColor$rgb(0, 0, 205, 1), "mediumaquamarine", A.SassColor_SassColor$rgb(102, 205, 170, 1), "maroon", A.SassColor_SassColor$rgb(128, 0, 0, 1), "magenta", A.SassColor_SassColor$rgb(255, 0, 255, 1), "linen", A.SassColor_SassColor$rgb(250, 240, 230, 1), "limegreen", A.SassColor_SassColor$rgb(50, 205, 50, 1), "lime", A.SassColor_SassColor$rgb(0, 255, 0, 1), "lightyellow", A.SassColor_SassColor$rgb(255, 255, 224, 1), "lightsteelblue", A.SassColor_SassColor$rgb(176, 196, 222, 1), "lightslategrey", A.SassColor_SassColor$rgb(119, 136, 153, 1), "lightslategray", A.SassColor_SassColor$rgb(119, 136, 153, 1), "lightskyblue", A.SassColor_SassColor$rgb(135, 206, 250, 1), "lightseagreen", A.SassColor_SassColor$rgb(32, 178, 170, 1), "lightsalmon", A.SassColor_SassColor$rgb(255, 160, 122, 1), "lightpink", A.SassColor_SassColor$rgb(255, 182, 193, 1), "lightgrey", A.SassColor_SassColor$rgb(211, 211, 211, 1), "lightgreen", A.SassColor_SassColor$rgb(144, 238, 144, 1), "lightgray", A.SassColor_SassColor$rgb(211, 211, 211, 1), "lightgoldenrodyellow", A.SassColor_SassColor$rgb(250, 250, 210, 1), "lightcyan", A.SassColor_SassColor$rgb(224, 255, 255, 1), "lightcoral", A.SassColor_SassColor$rgb(240, 128, 128, 1), "lightblue", A.SassColor_SassColor$rgb(173, 216, 230, 1), "lemonchiffon", A.SassColor_SassColor$rgb(255, 250, 205, 1), "lawngreen", A.SassColor_SassColor$rgb(124, 252, 0, 1), "lavenderblush", A.SassColor_SassColor$rgb(255, 240, 245, 1), "lavender", A.SassColor_SassColor$rgb(230, 230, 250, 1), "khaki", A.SassColor_SassColor$rgb(240, 230, 140, 1), "ivory", A.SassColor_SassColor$rgb(255, 255, 240, 1), "indigo", A.SassColor_SassColor$rgb(75, 0, 130, 1), "indianred", A.SassColor_SassColor$rgb(205, 92, 92, 1), "hotpink", A.SassColor_SassColor$rgb(255, 105, 180, 1), "honeydew", A.SassColor_SassColor$rgb(240, 255, 240, 1), "grey", A.SassColor_SassColor$rgb(128, 128, 128, 1), "greenyellow", A.SassColor_SassColor$rgb(173, 255, 47, 1), "green", A.SassColor_SassColor$rgb(0, 128, 0, 1), "gray", A.SassColor_SassColor$rgb(128, 128, 128, 1), "goldenrod", A.SassColor_SassColor$rgb(218, 165, 32, 1), "gold", A.SassColor_SassColor$rgb(255, 215, 0, 1), "ghostwhite", A.SassColor_SassColor$rgb(248, 248, 255, 1), "gainsboro", A.SassColor_SassColor$rgb(220, 220, 220, 1), "fuchsia", A.SassColor_SassColor$rgb(255, 0, 255, 1), "forestgreen", A.SassColor_SassColor$rgb(34, 139, 34, 1), "floralwhite", A.SassColor_SassColor$rgb(255, 250, 240, 1), "firebrick", A.SassColor_SassColor$rgb(178, 34, 34, 1), "dodgerblue", A.SassColor_SassColor$rgb(30, 144, 255, 1), "dimgrey", A.SassColor_SassColor$rgb(105, 105, 105, 1), "dimgray", A.SassColor_SassColor$rgb(105, 105, 105, 1), "deepskyblue", A.SassColor_SassColor$rgb(0, 191, 255, 1), "deeppink", A.SassColor_SassColor$rgb(255, 20, 147, 1), "darkviolet", A.SassColor_SassColor$rgb(148, 0, 211, 1), "darkturquoise", A.SassColor_SassColor$rgb(0, 206, 209, 1), "darkslategrey", A.SassColor_SassColor$rgb(47, 79, 79, 1), "darkslategray", A.SassColor_SassColor$rgb(47, 79, 79, 1), "darkslateblue", A.SassColor_SassColor$rgb(72, 61, 139, 1), "darkseagreen", A.SassColor_SassColor$rgb(143, 188, 143, 1), "darksalmon", A.SassColor_SassColor$rgb(233, 150, 122, 1), "darkred", A.SassColor_SassColor$rgb(139, 0, 0, 1), "darkorchid", A.SassColor_SassColor$rgb(153, 50, 204, 1), "darkorange", A.SassColor_SassColor$rgb(255, 140, 0, 1), "darkolivegreen", A.SassColor_SassColor$rgb(85, 107, 47, 1), "darkmagenta", A.SassColor_SassColor$rgb(139, 0, 139, 1), "darkkhaki", A.SassColor_SassColor$rgb(189, 183, 107, 1), "darkgrey", A.SassColor_SassColor$rgb(169, 169, 169, 1), "darkgreen", A.SassColor_SassColor$rgb(0, 100, 0, 1), "darkgray", A.SassColor_SassColor$rgb(169, 169, 169, 1), "darkgoldenrod", A.SassColor_SassColor$rgb(184, 134, 11, 1), "darkcyan", A.SassColor_SassColor$rgb(0, 139, 139, 1), "darkblue", A.SassColor_SassColor$rgb(0, 0, 139, 1), "cyan", A.SassColor_SassColor$rgb(0, 255, 255, 1), "crimson", A.SassColor_SassColor$rgb(220, 20, 60, 1), "cornsilk", A.SassColor_SassColor$rgb(255, 248, 220, 1), "cornflowerblue", A.SassColor_SassColor$rgb(100, 149, 237, 1), "coral", A.SassColor_SassColor$rgb(255, 127, 80, 1), "chocolate", A.SassColor_SassColor$rgb(210, 105, 30, 1), "chartreuse", A.SassColor_SassColor$rgb(127, 255, 0, 1), "cadetblue", A.SassColor_SassColor$rgb(95, 158, 160, 1), "burlywood", A.SassColor_SassColor$rgb(222, 184, 135, 1), "brown", A.SassColor_SassColor$rgb(165, 42, 42, 1), "blueviolet", A.SassColor_SassColor$rgb(138, 43, 226, 1), "blue", A.SassColor_SassColor$rgb(0, 0, 255, 1), "blanchedalmond", A.SassColor_SassColor$rgb(255, 235, 205, 1), "black", A.SassColor_SassColor$rgb(0, 0, 0, 1), "bisque", A.SassColor_SassColor$rgb(255, 228, 196, 1), "beige", A.SassColor_SassColor$rgb(245, 245, 220, 1), "azure", A.SassColor_SassColor$rgb(240, 255, 255, 1), "aquamarine", A.SassColor_SassColor$rgb(127, 255, 212, 1), "aqua", A.SassColor_SassColor$rgb(0, 255, 255, 1), "antiquewhite", A.SassColor_SassColor$rgb(250, 235, 215, 1), "aliceblue", A.SassColor_SassColor$rgb(240, 248, 255, 1)], type$.String, type$.SassColor)); + _lazyFinal($, "namesByColor", "$get$namesByColor", () => { + var $name, + t1 = type$.SassColor, + t2 = type$.String, + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs($.$get$colorsByName(), t2, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + t3.$indexSet(0, t2._1, $name); + } + return t3; + }); + _lazyFinal($, "ExecutableOptions__separatorBar", "$get$ExecutableOptions__separatorBar", () => A.isWindows() ? "=" : "\u2501"); + _lazyFinal($, "ExecutableOptions__parser", "$get$ExecutableOptions__parser", () => new A.ExecutableOptions__parser_closure().call$0()); + _lazyFinal($, "globalFunctions", "$get$globalFunctions", () => { + var t1 = type$.BuiltInCallable, + t2 = A.List_List$of($.$get$global(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$global0()); + B.JSArray_methods.addAll$1(t2, $.$get$global1()); + B.JSArray_methods.addAll$1(t2, $.$get$global2()); + B.JSArray_methods.addAll$1(t2, $.$get$global3()); + B.JSArray_methods.addAll$1(t2, $.$get$global4()); + B.JSArray_methods.addAll$1(t2, $.$get$global5()); + t2.push(A.BuiltInCallable$function("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure(), null)); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "coreModules", "$get$coreModules", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module(), $.$get$module0(), $.$get$module1(), $.$get$module2(), $.$get$module3(), $.$get$module4()], A.findType("JSArray>")), type$.BuiltInModule_Callable)); + _lazyFinal($, "_microsoftFilterStart", "$get$_microsoftFilterStart", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); + _lazyFinal($, "global", "$get$global", () => { + var _s5_ = "color", + _s27_ = "$red, $green, $blue, $alpha", + _s19_ = "$red, $green, $blue", + _s9_ = "$channels", + _s37_ = "$hue, $saturation, $lightness, $alpha", + _s29_ = "$hue, $saturation, $lightness", + _s17_ = "$hue, $saturation", + _s6_ = "adjust", + _s15_ = "$color, $amount", + t1 = type$.String, + t2 = type$.Value_Function_List_Value; + return A.UnmodifiableListView$(A._setArrayType([A._channelFunction("red", B.RgbColorSpace_mlz, new A.global_closure0(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction("green", B.RgbColorSpace_mlz, new A.global_closure1(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction("blue", B.RgbColorSpace_mlz, new A.global_closure2(), true, null).withDeprecationWarning$1(_s5_), $.$get$_mix().withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure3(), _s19_, new A.global_closure4(), "$color, $alpha", new A.global_closure5(), "$channels", new A.global_closure6()], t1, t2)), A.BuiltInCallable$overloadedFunction("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure7(), _s19_, new A.global_closure8(), "$color, $alpha", new A.global_closure9(), "$channels", new A.global_closure10()], t1, t2)), A._function5("invert", "$color, $weight: 100%, $space: null", new A.global_closure11()).withDeprecationWarning$1(_s5_), A._channelFunction("hue", B.HslColorSpace_gsm, new A.global_closure12(), true, "deg").withDeprecationWarning$1(_s5_), A._channelFunction("saturation", B.HslColorSpace_gsm, new A.global_closure13(), true, "%").withDeprecationWarning$1(_s5_), A._channelFunction("lightness", B.HslColorSpace_gsm, new A.global_closure14(), true, "%").withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure15(), _s29_, new A.global_closure16(), _s17_, new A.global_closure17(), "$channels", new A.global_closure18()], t1, t2)), A.BuiltInCallable$overloadedFunction("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure19(), _s29_, new A.global_closure20(), _s17_, new A.global_closure21(), "$channels", new A.global_closure22()], t1, t2)), A._function5("grayscale", "$color", new A.global_closure23()), A._function5("adjust-hue", "$color, $degrees", new A.global_closure24()).withDeprecationWarning$2(_s5_, _s6_), A._function5("lighten", _s15_, new A.global_closure25()).withDeprecationWarning$2(_s5_, _s6_), A._function5("darken", _s15_, new A.global_closure26()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure27(), "$color, $amount", new A.global_closure28()], t1, t2)), A._function5("desaturate", _s15_, new A.global_closure29()).withDeprecationWarning$2(_s5_, _s6_), A._function5("opacify", _s15_, new A.global_closure30()).withDeprecationWarning$2(_s5_, _s6_), A._function5("fade-in", _s15_, new A.global_closure31()).withDeprecationWarning$2(_s5_, _s6_), A._function5("transparentize", _s15_, new A.global_closure32()).withDeprecationWarning$2(_s5_, _s6_), A._function5("fade-out", _s15_, new A.global_closure33()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure34(), "$args...", new A.global_closure35()], t1, t2)), A._function5("opacity", "$color", new A.global_closure36()), A._function5(_s5_, "$description", new A.global_closure37()), A._function5("hwb", _s9_, new A.global_closure38()), A._function5("lab", _s9_, new A.global_closure39()), A._function5("lch", _s9_, new A.global_closure40()), A._function5("oklab", _s9_, new A.global_closure41()), A._function5("oklch", _s9_, new A.global_closure42()), $.$get$_complement().withDeprecationWarning$1(_s5_), $.$get$_ieHexStr(), $.$get$_adjust().withDeprecationWarning$1(_s5_).withName$1("adjust-color"), $.$get$_scale().withDeprecationWarning$1(_s5_).withName$1("scale-color"), $.$get$_change().withDeprecationWarning$1(_s5_).withName$1("change-color")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module", "$get$module", () => { + var _null = null, + _s10_ = "saturation", + _s9_ = "lightness", + _s6_ = "$color", _s5_ = "alpha", + _s30_ = "$color, $channel, $space: null", + t1 = type$.String, + t2 = type$.Value_Function_List_Value; + return A.BuiltInModule$("color", A._setArrayType([A._channelFunction("red", B.RgbColorSpace_mlz, new A.module_closure1(), false, _null), A._channelFunction("green", B.RgbColorSpace_mlz, new A.module_closure2(), false, _null), A._channelFunction("blue", B.RgbColorSpace_mlz, new A.module_closure3(), false, _null), $.$get$_mix(), A._function5("invert", "$color, $weight: 100%, $space: null", new A.module_closure4()), A._channelFunction("hue", B.HslColorSpace_gsm, new A.module_closure5(), false, "deg"), A._channelFunction(_s10_, B.HslColorSpace_gsm, new A.module_closure6(), false, "%"), A._channelFunction(_s9_, B.HslColorSpace_gsm, new A.module_closure7(), false, "%"), A._removedColorFunction("adjust-hue", "hue", false), A._removedColorFunction("lighten", _s9_, false), A._removedColorFunction("darken", _s9_, true), A._removedColorFunction("saturate", _s10_, false), A._removedColorFunction("desaturate", _s10_, true), A._function5("grayscale", _s6_, new A.module_closure8()), A.BuiltInCallable$overloadedFunction("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure9(), "$channels", new A.module_closure10()], t1, t2)), A._channelFunction("whiteness", B.HwbColorSpace_06z, new A.module_closure11(), false, "%"), A._channelFunction("blackness", B.HwbColorSpace_06z, new A.module_closure12(), false, "%"), A._removedColorFunction("opacify", _s5_, false), A._removedColorFunction("fade-in", _s5_, false), A._removedColorFunction("transparentize", _s5_, true), A._removedColorFunction("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure13(), "$args...", new A.module_closure14()], t1, t2)), A._function5("opacity", _s6_, new A.module_closure15()), A._function5("space", _s6_, new A.module_closure16()), A._function5("to-space", "$color, $space", new A.module_closure17()), A._function5("is-legacy", _s6_, new A.module_closure18()), A._function5("is-missing", "$color, $channel", new A.module_closure19()), A._function5("is-in-gamut", "$color, $space: null", new A.module_closure20()), A._function5("to-gamut", "$color, $space: null, $method: null", new A.module_closure21()), A._function5("channel", _s30_, new A.module_closure22()), A._function5("same", "$color1, $color2", new A.module_closure23()), A._function5("is-powerless", _s30_, new A.module_closure24()), $.$get$_complement(), $.$get$_adjust(), $.$get$_scale(), $.$get$_change(), $.$get$_ieHexStr()], type$.JSArray_Callable), _null, _null, type$.Callable); + }); + _lazyFinal($, "_mix", "$get$_mix", () => A._function5("mix", string$.x24color, new A._mix_closure())); + _lazyFinal($, "_complement", "$get$_complement", () => A._function5("complement", "$color, $space: null", new A._complement_closure())); + _lazyFinal($, "_adjust", "$get$_adjust", () => A._function5("adjust", "$color, $kwargs...", new A._adjust_closure())); + _lazyFinal($, "_scale", "$get$_scale", () => A._function5("scale", "$color, $kwargs...", new A._scale_closure())); + _lazyFinal($, "_change", "$get$_change", () => A._function5("change", "$color, $kwargs...", new A._change_closure())); + _lazyFinal($, "_ieHexStr", "$get$_ieHexStr", () => A._function5("ie-hex-str", "$color", new A._ieHexStr_closure())); + _lazyFinal($, "global0", "$get$global0", () => { + var _s4_ = "list"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_length0().withDeprecationWarning$1(_s4_), $.$get$_nth().withDeprecationWarning$1(_s4_), $.$get$_setNth().withDeprecationWarning$1(_s4_), $.$get$_join().withDeprecationWarning$1(_s4_), $.$get$_append0().withDeprecationWarning$1(_s4_), $.$get$_zip().withDeprecationWarning$1(_s4_), $.$get$_index0().withDeprecationWarning$1(_s4_), $.$get$_isBracketed().withDeprecationWarning$1(_s4_), $.$get$_separator().withDeprecationWarning$1(_s4_).withName$1("list-separator")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module0", "$get$module0", () => A.BuiltInModule$("list", A._setArrayType([$.$get$_length0(), $.$get$_nth(), $.$get$_setNth(), $.$get$_join(), $.$get$_append0(), $.$get$_zip(), $.$get$_index0(), $.$get$_isBracketed(), $.$get$_separator(), $.$get$_slash()], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_length", "$get$_length0", () => A._function4("length", "$list", new A._length_closure0())); + _lazyFinal($, "_nth", "$get$_nth", () => A._function4("nth", "$list, $n", new A._nth_closure())); + _lazyFinal($, "_setNth", "$get$_setNth", () => A._function4("set-nth", "$list, $n, $value", new A._setNth_closure())); + _lazyFinal($, "_join", "$get$_join", () => A._function4("join", string$.x24list1, new A._join_closure())); + _lazyFinal($, "_append", "$get$_append0", () => A._function4("append", "$list, $val, $separator: auto", new A._append_closure0())); + _lazyFinal($, "_zip", "$get$_zip", () => A._function4("zip", "$lists...", new A._zip_closure())); + _lazyFinal($, "_index", "$get$_index0", () => A._function4("index", "$list, $value", new A._index_closure0())); + _lazyFinal($, "_separator", "$get$_separator", () => A._function4("separator", "$list", new A._separator_closure())); + _lazyFinal($, "_isBracketed", "$get$_isBracketed", () => A._function4("is-bracketed", "$list", new A._isBracketed_closure())); + _lazyFinal($, "_slash", "$get$_slash", () => A._function4("slash", "$elements...", new A._slash_closure())); + _lazyFinal($, "global1", "$get$global1", () => { + var _s3_ = "map"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_get().withDeprecationWarning$1(_s3_).withName$1("map-get"), $.$get$_merge().withDeprecationWarning$1(_s3_).withName$1("map-merge"), $.$get$_remove().withDeprecationWarning$1(_s3_).withName$1("map-remove"), $.$get$_keys().withDeprecationWarning$1(_s3_).withName$1("map-keys"), $.$get$_values().withDeprecationWarning$1(_s3_).withName$1("map-values"), $.$get$_hasKey().withDeprecationWarning$1(_s3_).withName$1("map-has-key")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module1", "$get$module1", () => A.BuiltInModule$("map", A._setArrayType([$.$get$_get(), $.$get$_set(), $.$get$_merge(), $.$get$_remove(), $.$get$_keys(), $.$get$_values(), $.$get$_hasKey(), $.$get$_deepMerge(), $.$get$_deepRemove()], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_get", "$get$_get", () => A._function3("get", "$map, $key, $keys...", new A._get_closure())); + _lazyFinal($, "_set", "$get$_set", () => A.BuiltInCallable$overloadedFunction("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure(), "$map, $args...", new A._set_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_merge", "$get$_merge", () => A.BuiltInCallable$overloadedFunction("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure(), "$map1, $args...", new A._merge_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_deepMerge", "$get$_deepMerge", () => A._function3("deep-merge", "$map1, $map2", new A._deepMerge_closure())); + _lazyFinal($, "_deepRemove", "$get$_deepRemove", () => A._function3("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure())); + _lazyFinal($, "_remove", "$get$_remove", () => A.BuiltInCallable$overloadedFunction("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure(), "$map, $key, $keys...", new A._remove_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_keys", "$get$_keys", () => A._function3("keys", "$map", new A._keys_closure())); + _lazyFinal($, "_values", "$get$_values", () => A._function3("values", "$map", new A._values_closure())); + _lazyFinal($, "_hasKey", "$get$_hasKey", () => A._function3("has-key", "$map, $key, $keys...", new A._hasKey_closure())); + _lazyFinal($, "global2", "$get$global2", () => { + var _s4_ = "math"; + return A.UnmodifiableListView$(A._setArrayType([A._function2("abs", "$number", new A.global_closure()), $.$get$_ceil().withDeprecationWarning$1(_s4_), $.$get$_floor().withDeprecationWarning$1(_s4_), $.$get$_max().withDeprecationWarning$1(_s4_), $.$get$_min().withDeprecationWarning$1(_s4_), $.$get$_percentage().withDeprecationWarning$1(_s4_), $.$get$_randomFunction().withDeprecationWarning$1(_s4_), $.$get$_round().withDeprecationWarning$1(_s4_), $.$get$_unit().withDeprecationWarning$1(_s4_), $.$get$_compatible().withDeprecationWarning$1(_s4_).withName$1("comparable"), $.$get$_isUnitless().withDeprecationWarning$1(_s4_).withName$1("unitless")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module2", "$get$module2", () => { + var _null = null; + return A.BuiltInModule$("math", A._setArrayType([A._numberFunction("abs", new A.module_closure0()), $.$get$_acos(), $.$get$_asin(), $.$get$_atan(), $.$get$_atan2(), $.$get$_ceil(), $.$get$_clamp(), $.$get$_cos(), $.$get$_compatible(), $.$get$_floor(), $.$get$_hypot(), $.$get$_isUnitless(), $.$get$_log(), $.$get$_max(), $.$get$_min(), $.$get$_percentage(), $.$get$_pow(), $.$get$_randomFunction(), $.$get$_round(), $.$get$_sin(), $.$get$_sqrt(), $.$get$_tan(), $.$get$_unit(), $.$get$_div()], type$.JSArray_Callable), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber(2.718281828459045, _null), "pi", A.SassNumber_SassNumber(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber(5e-324, _null)], type$.String, type$.Value), type$.Callable); + }); + _lazyFinal($, "_ceil", "$get$_ceil", () => A._numberFunction("ceil", new A._ceil_closure())); + _lazyFinal($, "_clamp", "$get$_clamp", () => A._function2("clamp", "$min, $number, $max", new A._clamp_closure())); + _lazyFinal($, "_floor", "$get$_floor", () => A._numberFunction("floor", new A._floor_closure())); + _lazyFinal($, "_max", "$get$_max", () => A._function2("max", "$numbers...", new A._max_closure())); + _lazyFinal($, "_min", "$get$_min", () => A._function2("min", "$numbers...", new A._min_closure())); + _lazyFinal($, "_round", "$get$_round", () => A._numberFunction("round", new A._round_closure())); + _lazyFinal($, "_hypot", "$get$_hypot", () => A._function2("hypot", "$numbers...", new A._hypot_closure())); + _lazyFinal($, "_log", "$get$_log", () => A._function2("log", "$number, $base: null", new A._log_closure())); + _lazyFinal($, "_pow", "$get$_pow", () => A._function2("pow", "$base, $exponent", new A._pow_closure())); + _lazyFinal($, "_sqrt", "$get$_sqrt", () => A._singleArgumentMathFunc("sqrt", A.number0__sqrt$closure())); + _lazyFinal($, "_acos", "$get$_acos", () => A._singleArgumentMathFunc("acos", A.number0__acos$closure())); + _lazyFinal($, "_asin", "$get$_asin", () => A._singleArgumentMathFunc("asin", A.number0__asin$closure())); + _lazyFinal($, "_atan", "$get$_atan", () => A._singleArgumentMathFunc("atan", A.number0__atan$closure())); + _lazyFinal($, "_atan2", "$get$_atan2", () => A._function2("atan2", "$y, $x", new A._atan2_closure())); + _lazyFinal($, "_cos", "$get$_cos", () => A._singleArgumentMathFunc("cos", A.number0__cos$closure())); + _lazyFinal($, "_sin", "$get$_sin", () => A._singleArgumentMathFunc("sin", A.number0__sin$closure())); + _lazyFinal($, "_tan", "$get$_tan", () => A._singleArgumentMathFunc("tan", A.number0__tan$closure())); + _lazyFinal($, "_compatible", "$get$_compatible", () => A._function2("compatible", "$number1, $number2", new A._compatible_closure())); + _lazyFinal($, "_isUnitless", "$get$_isUnitless", () => A._function2("is-unitless", "$number", new A._isUnitless_closure())); + _lazyFinal($, "_unit", "$get$_unit", () => A._function2("unit", "$number", new A._unit_closure())); + _lazyFinal($, "_percentage", "$get$_percentage", () => A._function2("percentage", "$number", new A._percentage_closure())); + _lazyFinal($, "_random", "$get$_random0", () => A.Random_Random()); + _lazyFinal($, "_randomFunction", "$get$_randomFunction", () => A._function2("random", "$limit: null", new A._randomFunction_closure())); + _lazyFinal($, "_div", "$get$_div", () => A._function2("div", "$number1, $number2", new A._div_closure())); + _lazyFinal($, "_shared", "$get$_shared", () => A.UnmodifiableListView$(A._setArrayType([A._function("feature-exists", "$feature", new A._shared_closure()), A._function("inspect", "$value", new A._shared_closure0()), A._function("type-of", "$value", new A._shared_closure1()), A._function("keywords", "$args", new A._shared_closure2())], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "global3", "$get$global5", () => { + var t2, + t1 = A._setArrayType([], type$.JSArray_BuiltInCallable); + for (t2 = $.$get$_shared(), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(0).withDeprecationWarning$1("meta")); + return A.UnmodifiableListView$(t1, type$.BuiltInCallable); + }); + _lazyFinal($, "moduleFunctions", "$get$moduleFunctions", () => { + var t1 = type$.BuiltInCallable, + t2 = A.List_List$of($.$get$_shared(), true, t1); + t2.push(A._function("calc-name", "$calc", new A.moduleFunctions_closure())); + t2.push(A._function("calc-args", "$calc", new A.moduleFunctions_closure0())); + t2.push(A._function("accepts-content", "$mixin", new A.moduleFunctions_closure1())); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "global4", "$get$global3", () => { + var _s8_ = "selector"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector().withDeprecationWarning$1(_s8_), $.$get$_simpleSelectors().withDeprecationWarning$1(_s8_), $.$get$_parse().withDeprecationWarning$1(_s8_).withName$1("selector-parse"), $.$get$_nest().withDeprecationWarning$1(_s8_).withName$1("selector-nest"), $.$get$_append().withDeprecationWarning$1(_s8_).withName$1("selector-append"), $.$get$_extend().withDeprecationWarning$1(_s8_).withName$1("selector-extend"), $.$get$_replace().withDeprecationWarning$1(_s8_).withName$1("selector-replace"), $.$get$_unify().withDeprecationWarning$1(_s8_).withName$1("selector-unify")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module3", "$get$module3", () => A.BuiltInModule$("selector", A._setArrayType([$.$get$_isSuperselector(), $.$get$_simpleSelectors(), $.$get$_parse(), $.$get$_nest(), $.$get$_append(), $.$get$_extend(), $.$get$_replace(), $.$get$_unify()], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_nest", "$get$_nest", () => A._function1("nest", "$selectors...", new A._nest_closure())); + _lazyFinal($, "_append0", "$get$_append", () => A._function1("append", "$selectors...", new A._append_closure())); + _lazyFinal($, "_extend", "$get$_extend", () => A._function1("extend", "$selector, $extendee, $extender", new A._extend_closure())); + _lazyFinal($, "_replace", "$get$_replace", () => A._function1("replace", "$selector, $original, $replacement", new A._replace_closure())); + _lazyFinal($, "_unify", "$get$_unify", () => A._function1("unify", "$selector1, $selector2", new A._unify_closure())); + _lazyFinal($, "_isSuperselector", "$get$_isSuperselector", () => A._function1("is-superselector", "$super, $sub", new A._isSuperselector_closure())); + _lazyFinal($, "_simpleSelectors", "$get$_simpleSelectors", () => A._function1("simple-selectors", "$selector", new A._simpleSelectors_closure())); + _lazyFinal($, "_parse0", "$get$_parse", () => A._function1("parse", "$selector", new A._parse_closure())); + _lazyFinal($, "_random0", "$get$_random", () => A.Random_Random()); + _lazy($, "_previousUniqueId", "$get$_previousUniqueId", () => $.$get$_random().nextInt$1(A._asInt(A.pow(36, 6)))); + _lazyFinal($, "global5", "$get$global4", () => { + var _s6_ = "string"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote().withDeprecationWarning$1(_s6_), $.$get$_quote().withDeprecationWarning$1(_s6_), $.$get$_toUpperCase().withDeprecationWarning$1(_s6_), $.$get$_toLowerCase().withDeprecationWarning$1(_s6_), $.$get$_uniqueId().withDeprecationWarning$1(_s6_), $.$get$_length().withDeprecationWarning$1(_s6_).withName$1("str-length"), $.$get$_insert().withDeprecationWarning$1(_s6_).withName$1("str-insert"), $.$get$_index().withDeprecationWarning$1(_s6_).withName$1("str-index"), $.$get$_slice().withDeprecationWarning$1(_s6_).withName$1("str-slice")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module4", "$get$module4", () => A.BuiltInModule$("string", A._setArrayType([$.$get$_unquote(), $.$get$_quote(), $.$get$_toUpperCase(), $.$get$_toLowerCase(), $.$get$_length(), $.$get$_insert(), $.$get$_index(), $.$get$_slice(), $.$get$_uniqueId(), A._function0("split", "$string, $separator, $limit: null", new A.module_closure())], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_unquote", "$get$_unquote", () => A._function0("unquote", "$string", new A._unquote_closure())); + _lazyFinal($, "_quote", "$get$_quote", () => A._function0("quote", "$string", new A._quote_closure())); + _lazyFinal($, "_length0", "$get$_length", () => A._function0("length", "$string", new A._length_closure())); + _lazyFinal($, "_insert", "$get$_insert", () => A._function0("insert", "$string, $insert, $index", new A._insert_closure())); + _lazyFinal($, "_index0", "$get$_index", () => A._function0("index", "$string, $substring", new A._index_closure())); + _lazyFinal($, "_slice", "$get$_slice", () => A._function0("slice", "$string, $start-at, $end-at: -1", new A._slice_closure())); + _lazyFinal($, "_toUpperCase", "$get$_toUpperCase", () => A._function0("to-upper-case", "$string", new A._toUpperCase_closure())); + _lazyFinal($, "_toLowerCase", "$get$_toLowerCase", () => A._function0("to-lower-case", "$string", new A._toLowerCase_closure())); + _lazyFinal($, "_uniqueId", "$get$_uniqueId", () => A._function0("unique-id", "", new A._uniqueId_closure())); + _lazyFinal($, "FilesystemImporter_cwd", "$get$FilesystemImporter_cwd", () => { + var _null = null; + return new A.FilesystemImporter(A.absolute(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), true); + }); + _lazyFinal($, "FilesystemImporter_noLoadPath", "$get$FilesystemImporter_noLoadPath", () => new A.FilesystemImporter(null, false)); + _lazyFinal($, "_jsThrow", "$get$_jsThrow0", () => new self.Function("error", "throw error;")); + _lazyFinal($, "Logger_quiet", "$get$Logger_quiet", () => new A._QuietLogger()); + _lazyFinal($, "_disallowedFunctionNames", "$get$_disallowedFunctionNames", () => { + var t1 = $.$get$globalFunctions(); + t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure(), type$.String).toSet$0(0); + t1.add$1(0, "if"); + t1.remove$1(0, "rgb"); + t1.remove$1(0, "rgba"); + t1.remove$1(0, "hsl"); + t1.remove$1(0, "hsla"); + t1.remove$1(0, "grayscale"); + t1.remove$1(0, "invert"); + t1.remove$1(0, "alpha"); + t1.remove$1(0, "opacity"); + t1.remove$1(0, "saturate"); + t1.remove$1(0, "min"); + t1.remove$1(0, "max"); + t1.remove$1(0, "round"); + t1.remove$1(0, "abs"); + return t1; + }); + _lazyFinal($, "_epsilon", "$get$_epsilon", () => A.pow(10, -11)); + _lazyFinal($, "_inverseEpsilon", "$get$_inverseEpsilon", () => A.pow(10, 11)); + _lazyFinal($, "bogusSpan", "$get$bogusSpan", () => A.SourceFile$decoded(A._setArrayType([], type$.JSArray_int), null).span$1(0, 0)); + _lazyFinal($, "_noSourceUrl", "$get$_noSourceUrl", () => A.Uri_parse("-")); + _lazyFinal($, "_traces", "$get$_traces", () => A.Expando$()); + _lazyFinal($, "lmsToOklab", "$get$lmsToOklab", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.2104542553, 0.793617785, -0.0040720468, 1.9779984951, -2.428592205, 0.4505937099, 0.0259040371, 0.7827717662, -0.808675766], type$.JSArray_double))); + _lazyFinal($, "oklabToLms", "$get$oklabToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9999999984505198, 0.39633779217376786, 0.2158037580607588, 1.0000000088817609, -0.10556134232365635, -0.06385417477170591, 1.0000000546724108, -0.08948418209496575, -1.2914855378640917], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearDisplayP3", "$get$linearSrgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8224619687143623, 0.17753803128563775, 0, 0.03319419885096161, 0.9668058011490384, 0, 0.01708263072112003, 0.07239744066396346, 0.9105199286149165], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearSrgb", "$get$linearDisplayP3ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2249401762805598, -0.22494017628055996, 0, -0.04205695470968816, 1.042056954709688, 0, -0.01963755459033443, -0.07863604555063188, 1.0982736001409663], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearA98Rgb", "$get$linearSrgbToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7151256068556247, 0.28487439314437535, 0, 0, 1, 0, 0, 0.04116194845011846, 0.9588380515498816], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearSrgb", "$get$linearA98RgbToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3983557439607783, -0.3983557439607783, 0, 0, 1, 0, 0, -0.04292898929447326, 1.0429289892944733], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearRec2020", "$get$linearSrgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.627403895934699, 0.3292830383778837, 0.04331306568741722, 0.06909728935823208, 0.9195403950754587, 0.01136231556630917, 0.01639143887515027, 0.08801330787722575, 0.895595253247624], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearSrgb", "$get$linearRec2020ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6604910021084345, -0.5876411387885495, -0.07284986331988487, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0181507633549053, -0.10057889800800737, 1.1187296613629127], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD65", "$get$linearSrgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4123907992659595, 0.35758433938387796, 0.1804807884018343, 0.21263900587151036, 0.7151686787677559, 0.07219231536073371, 0.01933081871559185, 0.11919477979462598, 0.9505321522496606], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearSrgb", "$get$xyzD65ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.2409699419045213, -1.5373831775700935, -0.4986107602930033, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.0556300796969936, -0.20397695888897657, 1.0569715142428786], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLms", "$get$linearSrgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.41222147080000016, 0.5363325362999999, 0.05144599290000001, 0.21190349820000007, 0.6806995450999999, 0.1073969566, 0.08830246190000005, 0.28171883759999994, 0.6299787005], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearSrgb", "$get$lmsToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([4.076741661347993, -3.3077115904081924, 0.23096992872942781, -1.2684380040921766, 2.6097574006633724, -0.34131939631021974, -0.0041960865418372, -0.7034186144594495, 1.7076147009309448], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearProphotoRgb", "$get$linearSrgbToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5292769776226116, 0.33015450197849283, 0.14056852039889556, 0.09836585954044917, 0.8734707129069618, 0.028163427552589, 0.01687534092138684, 0.11765941425612084, 0.8654652448224923], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearSrgb", "$get$linearProphotoRgbToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.034380849516996, -0.7276357899341342, -0.3067450595828618, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.00855882878391742, -0.1532667021380372, 1.1618255309219547], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD50", "$get$linearSrgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.43606574687426936, 0.3851515095901596, 0.14307841996513868, 0.22249317711056518, 0.7168870130944824, 0.06061980979495235, 0.01392392146316939, 0.09708132423141015, 0.7140993568158807], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearSrgb", "$get$xyzD50ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1341358529001178, -1.617385998018042, -0.49066221791109754, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.07195539255794733, -0.228976759815182, 1.4053860351131182], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearA98Rgb", "$get$linearDisplayP3ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8640051374740484, 0.13599486252595164, 0, -0.04205695470968816, 1.042056954709688, 0, -0.02056038078232985, -0.03250613804550798, 1.0530665188278379], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearDisplayP3", "$get$linearA98RgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1500944181410184, -0.15009441814101834, 0, 0.04641729862941844, 0.9535827013705815, 0, 0.02388759479083904, 0.02650477632633013, 0.9496076288828308], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearRec2020", "$get$linearDisplayP3ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7538330343617218, 0.1985973690526163, 0.04756959658566187, 0.04574384896535833, 0.9417772198116935, 0.01247893122294812, -0.00121034035451832, 0.01760171730108989, 0.9836086230534284], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearDisplayP3", "$get$linearRec2020ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.343578252584332, -0.2821796705261357, -0.06139858205819628, -0.06529745278911953, 1.0757879158485746, -0.01049046305945495, 0.00282178726170095, -0.01959849452449406, 1.0167767072627931], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD65", "$get$linearDisplayP3ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48657094864821626, 0.26566769316909294, 0.1982172852343625, 0.22897456406974884, 0.6917385218365062, 0.079286914093745, 0, 0.04511338185890257, 1.0439443689009757], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearDisplayP3", "$get$xyzD65ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4934969119414245, -0.9313836179191236, -0.40271078445071684, -0.8294889695615749, 1.7626640603183468, 0.02362468584194359, 0.03584583024378433, -0.0761723892680417, 0.9568845240076873], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLms", "$get$linearDisplayP3ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4813798544258549, 0.46211836973903553, 0.0565017758351096, 0.2288319449023311, 0.6532168128284037, 0.11795124216926511, 0.0839457557301676, 0.2241652688595698, 0.6918889754102626], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearDisplayP3", "$get$lmsToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1277689866777214, -2.2571357955395377, 0.12936680863610234, -1.091009047383439, 2.4133317582793437, -0.3223227106545711, -0.02601081320950207, -0.5080413256930673, 1.5340521388517652], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearProphotoRgb", "$get$linearDisplayP3ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6316869193403589, 0.21393038569465722, 0.1543826949649839, 0.08320371426648458, 0.8858651367630243, 0.03093114897049121, -0.00127273456473881, 0.05075510433665735, 0.9505176302280814], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearDisplayP3", "$get$linearProphotoRgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6325756087069179, -0.3797716184825984, -0.2528039902243195, -0.15370040233755072, 1.1667025472425014, -0.01300214490495082, 0.01039319529676572, -0.0628073126495944, 1.0524141173528287], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD50", "$get$linearDisplayP3ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.515146442968116, 0.2920099820638577, 0.15713925139759397, 0.2412003221252552, 0.6922225411313818, 0.06657713674336294, -0.00105013914714014, 0.0418782701890746, 0.7842764714685257], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearDisplayP3", "$get$xyzD50ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4039341218554973, -0.9900304424955931, -0.39761363181465614, -0.8422700161454688, 1.7989580161067082, 0.01604562477090472, 0.04819381686413303, -0.09738519815446048, 1.2736713693321273], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearRec2020", "$get$linearA98RgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8773338416636568, 0.07749370651571998, 0.04517245182062317, 0.09662259146620378, 0.8915273202441805, 0.01185008828961569, 0.02292106270284839, 0.04303668501067932, 0.9340422522864723], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearA98Rgb", "$get$linearRec2020ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1519783947159163, -0.0975030553024086, -0.05447533941350766, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0225303827810559, -0.04980650742838876, 1.0723368902094446], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD65", "$get$linearA98RgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5766690429101308, 0.18555823790654627, 0.18822864623499472, 0.29734497525053616, 0.627363566255466, 0.07529145849399789, 0.02703136138641237, 0.07068885253582714, 0.9913375368376389], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearA98Rgb", "$get$xyzD65ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.041587903810746, -0.5650069742788596, -0.3447313507783295, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.01344428063203102, -0.11836239223101823, 1.0151749943912054], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLms", "$get$linearA98RgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5764322614771404, 0.36991322114441194, 0.05365451737844765, 0.2963164738733526, 0.5916761266265069, 0.11200739940014041, 0.12347825480374285, 0.21949869580674647, 0.6570230493895107], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearA98Rgb", "$get$lmsToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.5540368479080695, -1.6219762026260214, 0.06793935455575403, -1.2684380040921766, 2.6097574006633724, -0.34131939631021974, -0.05623474718052319, -0.567041834118795, 1.623276581242614], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearProphotoRgb", "$get$linearA98RgbToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7401175018047792, 0.11327951328898105, 0.1466029849062397, 0.1375504646980262, 0.833077080269484, 0.02937245503248977, 0.02359772990871766, 0.07378347703906656, 0.9026187930522158], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearA98Rgb", "$get$linearProphotoRgbToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.38965124815152, -0.16945907691487766, -0.22019217123664242, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.01762544368426068, -0.09625702306122665, 1.1138824667454874], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD50", "$get$linearA98RgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6097750418861814, 0.20530000261929401, 0.14922063192409227, 0.31112461220464155, 0.6256532308346856, 0.06322215696067286, 0.01947059555648168, 0.06087908649415867, 0.7447549204598198], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearA98Rgb", "$get$xyzD50ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.9624670363768806, -0.6107423404815073, -0.3413580980827154, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.02870443944957101, -0.1406748663317068, 1.3489141814137937], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD65", "$get$linearRec2020ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6369580483012913, 0.14461690358620838, 0.16888097516417205, 0.26270021201126703, 0.677998071518871, 0.05930171646986194, 0, 0.0280726930490875, 1.0609850577107909], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearRec2020", "$get$xyzD65ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7166511879712676, -0.3556707837763924, -0.2533662813736598, -0.666684351832489, 1.616481236634939, 0.01576854581391113, 0.01763985744531091, -0.04277061325780865, 0.942103121235474], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLms", "$get$linearRec2020ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6167557871990856, 0.36019839939276255, 0.02304581340815186, 0.2651330639832814, 0.6358393640777106, 0.099027571839008, 0.10010263423281572, 0.20390651940192997, 0.6959908463652543], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearRec2020", "$get$lmsToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.1399067356955617, -1.2463895087846906, 0.10648277296448995, -0.8847358624581563, 2.1632309821083826, -0.2784951194339029, -0.04857375801465988, -0.4545031429172517, 1.5030769008864613], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearProphotoRgb", "$get$linearRec2020ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8351873331297235, 0.04886884858605698, 0.11594381828421951, 0.05403324519953363, 0.9289184085692044, 0.01704834623126199, -0.00234203897072539, 0.03633215316169465, 0.9660098858090307], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearRec2020", "$get$linearProphotoRgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.200659329517408, -0.05756805370122346, -0.14309127581618444, -0.06994154955888504, 1.080617897597214, -0.01067634803832895, 0.00554147334294746, -0.04078219298657951, 1.035240719643632], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD50", "$get$linearRec2020ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.673515463188276, 0.16569726370390453, 0.12508294953738705, 0.2790590051411206, 0.6753180057491098, 0.04562298910976962, -0.00193242713400438, 0.02997782679282923, 0.7970592028516355], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearRec2020", "$get$xyzD50ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.647184904671766, -0.3936818981316471, -0.23595963848828266, -0.6826641074173818, 1.6477146127444076, 0.01281708338512084, 0.02966887665275675, -0.0629258964297003, 1.2535578201865771], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLms", "$get$xyzD65ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8190224432164319, 0.3619062562801221, -0.12887378261216414, 0.0329836671980271, 0.9292868468965546, 0.03614466816999844, 0.04817719956604625, 0.26423952494422764, 0.6335478258136937], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD65", "$get$lmsToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2268798733741557, -0.5578149965554814, 0.2813910501772159, -0.04057576262431372, 1.1122868293970596, -0.07171106666151703, -0.07637294974672143, -0.42149332396279143, 1.5869240244272418], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearProphotoRgb", "$get$xyzD65ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.4031904633774979, -0.22301514479051668, -0.1016066850741379, -0.5262384021633072, 1.4816319629234644, 0.01701879027252688, -0.0112022652862215, 0.01824640347962099, 0.9112472274915048], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD65", "$get$linearProphotoRgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.755590742296921, 0.11271984265940525, 0.0821453420953454, 0.2683218435785719, 0.7151152566617912, 0.01656289975963685, 0.0039159727624258, -0.01293344283684181, 1.0980752208342945], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToXyzD50", "$get$xyzD65ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0479297925449966, 0.02294687060160952, -0.05019226628920519, 0.02962780877005567, 0.99043442675388, -0.01707379906341879, -0.00924304064620452, 0.01505519149029816, 0.751874281428137], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToXyzD65", "$get$xyzD50ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9554734214880752, -0.02309845494876452, 0.06325924320057065, -0.02836970933386358, 1.0099953980813041, 0.0210414411919173, 0.01231401486448199, -0.02050764929889898, 1.330365926242124], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearProphotoRgb", "$get$lmsToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7383551498581524, -0.9879509523734343, 0.24959580241648663, -0.7070494262491486, 1.9343700843817762, -0.2273206579391904, -0.08407883426424761, -0.35754059702097796, 1.4416194312494715], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLms", "$get$linearProphotoRgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7154484634929431, 0.3527915479817274, -0.06824001147467047, 0.2744116550904942, 0.6677976408081148, 0.05779070400139092, 0.10978443849083751, 0.1861982874659698, 0.7040172740431927], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD50", "$get$lmsToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2885862158390884, -0.5378717465173621, 0.21358120705405403, -0.00253389352489796, 1.0923168245326655, -0.08978293089853581, -0.06937383312514489, -0.29500839218634667, 1.1894868277924509], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLms", "$get$xyzD50ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.770700047124025, 0.3492483987107274, -0.1120235200424989, 0.00559650559780223, 0.9370723249333315, 0.06972569131301698, 0.04633715253432816, 0.2527753086852587, 0.8514580737160835], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD50", "$get$linearProphotoRgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7977666449006423, 0.13518129740053308, 0.0313477341283922, 0.2880748288194013, 0.711835234241873, 0.00008993693872564, 0, 0, 0.8251046025104602], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearProphotoRgb", "$get$xyzD50ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3457868816471583, -0.25557208737979464, -0.05110186497554526, -0.5446307051249019, 1.5082477428451468, 0.02052744743642139, 0, 0, 1.2119675456389452], type$.JSArray_double))); + _lazyFinal($, "_typesByUnit", "$get$_typesByUnit", () => { + var t3, type, + t1 = type$.String, + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t1 = A.MapExtensions_get_pairs(B.Map_397RH, t1, type$.List_String), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + type = t3._0; + for (t3 = J.get$iterator$ax(t3._1); t3.moveNext$0();) + t2.$indexSet(0, t3.get$current(t3), type); + } + return t2; + }); + _lazyFinal($, "_knownCompatibilitiesByUnit", "$get$_knownCompatibilitiesByUnit", () => { + var _i, set, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); + for (_i = 0; _i < 5; ++_i) { + set = B.List_Eeh[_i]; + for (t2 = set.get$iterator(set); t2.moveNext$0();) + t1.$indexSet(0, t2.get$current(0), set); + } + return t1; + }); + _lazyFinal($, "_emptyQuoted", "$get$_emptyQuoted", () => A.SassString$("", true)); + _lazyFinal($, "_emptyUnquoted", "$get$_emptyUnquoted", () => A.SassString$("", false)); + _lazyFinal($, "maxInt32", "$get$maxInt32", () => A._asInt(A.pow(2, 31)) - 1); + _lazyFinal($, "minInt32", "$get$minInt32", () => -A._asInt(A.pow(2, 31))); + _lazyFinal($, "_vmFrame", "$get$_vmFrame", () => A.RegExp_RegExp("^#\\d+\\s+(\\S.*) \\((.+?)((?::\\d+){0,2})\\)$", false)); + _lazyFinal($, "_v8Frame", "$get$_v8Frame", () => A.RegExp_RegExp("^\\s*at (?:(\\S.*?)(?: \\[as [^\\]]+\\])? \\((.*)\\)|(.*))$", false)); + _lazyFinal($, "_v8UrlLocation", "$get$_v8UrlLocation", () => A.RegExp_RegExp("^(.*?):(\\d+)(?::(\\d+))?$|native$", false)); + _lazyFinal($, "_v8EvalLocation", "$get$_v8EvalLocation", () => A.RegExp_RegExp("^eval at (?:\\S.*?) \\((.*)\\)(?:, .*?:\\d+:\\d+)?$", false)); + _lazyFinal($, "_firefoxEvalLocation", "$get$_firefoxEvalLocation", () => A.RegExp_RegExp("(\\S+)@(\\S+) line (\\d+) >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariFrame", "$get$_firefoxSafariFrame", () => A.RegExp_RegExp("^(?:([^@(/]*)(?:\\(.*\\))?((?:/[^/]*)*)(?:\\(.*\\))?@)?(.*?):(\\d*)(?::(\\d*))?$", false)); + _lazyFinal($, "_friendlyFrame", "$get$_friendlyFrame", () => A.RegExp_RegExp("^(\\S+)(?: (\\d+)(?::(\\d+))?)?\\s+([^\\d].*)$", false)); + _lazyFinal($, "_asyncBody", "$get$_asyncBody", () => A.RegExp_RegExp("<(|[^>]+)_async_body>", false)); + _lazyFinal($, "_initialDot", "$get$_initialDot", () => A.RegExp_RegExp("^\\.", false)); + _lazyFinal($, "Frame__uriRegExp", "$get$Frame__uriRegExp", () => A.RegExp_RegExp("^[a-zA-Z][-+.a-zA-Z\\d]*://", false)); + _lazyFinal($, "Frame__windowsRegExp", "$get$Frame__windowsRegExp", () => A.RegExp_RegExp("^([a-zA-Z]:[\\\\/]|\\\\\\\\)", false)); + _lazyFinal($, "_terseRegExp", "$get$_terseRegExp", () => A.RegExp_RegExp("(-patch)?([/\\\\].*)?$", false)); + _lazyFinal($, "_v8Trace", "$get$_v8Trace", () => A.RegExp_RegExp("\\n ?at ", false)); + _lazyFinal($, "_v8TraceLine", "$get$_v8TraceLine", () => A.RegExp_RegExp(" ?at ", false)); + _lazyFinal($, "_firefoxEvalTrace", "$get$_firefoxEvalTrace", () => A.RegExp_RegExp("@\\S+ line \\d+ >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariTrace", "$get$_firefoxSafariTrace", () => A.RegExp_RegExp("^(([.0-9A-Za-z_$/<]|\\(.*\\))*@)?[^\\s]*:\\d*$", true)); + _lazyFinal($, "_friendlyTrace", "$get$_friendlyTrace", () => A.RegExp_RegExp("^[^\\s<][^\\s]*( \\d+(:\\d+)?)?[ \\t]+[^\\s]+$", true)); + _lazyFinal($, "vmChainGap", "$get$vmChainGap", () => A.RegExp_RegExp("^\\n?$", true)); + _lazyFinal($, "_newlineRegExp", "$get$_newlineRegExp", () => A.RegExp_RegExp("\\r\\n?|\\n", false)); + _lazyFinal($, "argumentListClass", "$get$argumentListClass", () => new A.argumentListClass_closure().call$0()); + _lazyFinal($, "booleanClass", "$get$booleanClass", () => new A.booleanClass_closure().call$0()); + _lazyFinal($, "legacyBooleanClass", "$get$legacyBooleanClass", () => new A.legacyBooleanClass_closure().call$0()); + _lazyFinal($, "calculationClass", "$get$calculationClass", () => new A.calculationClass_closure().call$0()); + _lazyFinal($, "calculationOperationClass", "$get$calculationOperationClass", () => new A.calculationOperationClass_closure().call$0()); + _lazyFinal($, "calculationInterpolationClass", "$get$calculationInterpolationClass", () => new A.calculationInterpolationClass_closure().call$0()); + _lazyFinal($, "_microsoftFilterStart0", "$get$_microsoftFilterStart0", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); + _lazyFinal($, "global6", "$get$global6", () => { + var _s5_ = "color", + _s27_ = "$red, $green, $blue, $alpha", + _s19_ = "$red, $green, $blue", + _s9_ = "$channels", + _s37_ = "$hue, $saturation, $lightness, $alpha", + _s29_ = "$hue, $saturation, $lightness", + _s17_ = "$hue, $saturation", + _s6_ = "adjust", + _s15_ = "$color, $amount", + t1 = type$.String, + t2 = type$.Value_Function_List_Value_2; + return A.UnmodifiableListView$(A._setArrayType([A._channelFunction0("red", B.RgbColorSpace_mlz0, new A.global_closure44(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction0("green", B.RgbColorSpace_mlz0, new A.global_closure45(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction0("blue", B.RgbColorSpace_mlz0, new A.global_closure46(), true, null).withDeprecationWarning$1(_s5_), $.$get$_mix0().withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction0("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure47(), _s19_, new A.global_closure48(), "$color, $alpha", new A.global_closure49(), "$channels", new A.global_closure50()], t1, t2)), A.BuiltInCallable$overloadedFunction0("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure51(), _s19_, new A.global_closure52(), "$color, $alpha", new A.global_closure53(), "$channels", new A.global_closure54()], t1, t2)), A._function12("invert", "$color, $weight: 100%, $space: null", new A.global_closure55()).withDeprecationWarning$1(_s5_), A._channelFunction0("hue", B.HslColorSpace_gsm0, new A.global_closure56(), true, "deg").withDeprecationWarning$1(_s5_), A._channelFunction0("saturation", B.HslColorSpace_gsm0, new A.global_closure57(), true, "%").withDeprecationWarning$1(_s5_), A._channelFunction0("lightness", B.HslColorSpace_gsm0, new A.global_closure58(), true, "%").withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction0("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure59(), _s29_, new A.global_closure60(), _s17_, new A.global_closure61(), "$channels", new A.global_closure62()], t1, t2)), A.BuiltInCallable$overloadedFunction0("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure63(), _s29_, new A.global_closure64(), _s17_, new A.global_closure65(), "$channels", new A.global_closure66()], t1, t2)), A._function12("grayscale", "$color", new A.global_closure67()), A._function12("adjust-hue", "$color, $degrees", new A.global_closure68()).withDeprecationWarning$2(_s5_, _s6_), A._function12("lighten", _s15_, new A.global_closure69()).withDeprecationWarning$2(_s5_, _s6_), A._function12("darken", _s15_, new A.global_closure70()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction0("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure71(), "$color, $amount", new A.global_closure72()], t1, t2)), A._function12("desaturate", _s15_, new A.global_closure73()).withDeprecationWarning$2(_s5_, _s6_), A._function12("opacify", _s15_, new A.global_closure74()).withDeprecationWarning$2(_s5_, _s6_), A._function12("fade-in", _s15_, new A.global_closure75()).withDeprecationWarning$2(_s5_, _s6_), A._function12("transparentize", _s15_, new A.global_closure76()).withDeprecationWarning$2(_s5_, _s6_), A._function12("fade-out", _s15_, new A.global_closure77()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction0("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure78(), "$args...", new A.global_closure79()], t1, t2)), A._function12("opacity", "$color", new A.global_closure80()), A._function12(_s5_, "$description", new A.global_closure81()), A._function12("hwb", _s9_, new A.global_closure82()), A._function12("lab", _s9_, new A.global_closure83()), A._function12("lch", _s9_, new A.global_closure84()), A._function12("oklab", _s9_, new A.global_closure85()), A._function12("oklch", _s9_, new A.global_closure86()), $.$get$_complement0().withDeprecationWarning$1(_s5_), $.$get$_ieHexStr0(), $.$get$_adjust0().withDeprecationWarning$1(_s5_).withName$1("adjust-color"), $.$get$_scale0().withDeprecationWarning$1(_s5_).withName$1("scale-color"), $.$get$_change0().withDeprecationWarning$1(_s5_).withName$1("change-color")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module5", "$get$module5", () => { + var _null = null, + _s10_ = "saturation", + _s9_ = "lightness", + _s6_ = "$color", _s5_ = "alpha", + _s30_ = "$color, $channel, $space: null", + t1 = type$.String, + t2 = type$.Value_Function_List_Value_2; + return A.BuiltInModule$0("color", A._setArrayType([A._channelFunction0("red", B.RgbColorSpace_mlz0, new A.module_closure27(), false, _null), A._channelFunction0("green", B.RgbColorSpace_mlz0, new A.module_closure28(), false, _null), A._channelFunction0("blue", B.RgbColorSpace_mlz0, new A.module_closure29(), false, _null), $.$get$_mix0(), A._function12("invert", "$color, $weight: 100%, $space: null", new A.module_closure30()), A._channelFunction0("hue", B.HslColorSpace_gsm0, new A.module_closure31(), false, "deg"), A._channelFunction0(_s10_, B.HslColorSpace_gsm0, new A.module_closure32(), false, "%"), A._channelFunction0(_s9_, B.HslColorSpace_gsm0, new A.module_closure33(), false, "%"), A._removedColorFunction0("adjust-hue", "hue", false), A._removedColorFunction0("lighten", _s9_, false), A._removedColorFunction0("darken", _s9_, true), A._removedColorFunction0("saturate", _s10_, false), A._removedColorFunction0("desaturate", _s10_, true), A._function12("grayscale", _s6_, new A.module_closure34()), A.BuiltInCallable$overloadedFunction0("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure35(), "$channels", new A.module_closure36()], t1, t2)), A._channelFunction0("whiteness", B.HwbColorSpace_06z0, new A.module_closure37(), false, "%"), A._channelFunction0("blackness", B.HwbColorSpace_06z0, new A.module_closure38(), false, "%"), A._removedColorFunction0("opacify", _s5_, false), A._removedColorFunction0("fade-in", _s5_, false), A._removedColorFunction0("transparentize", _s5_, true), A._removedColorFunction0("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction0(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure39(), "$args...", new A.module_closure40()], t1, t2)), A._function12("opacity", _s6_, new A.module_closure41()), A._function12("space", _s6_, new A.module_closure42()), A._function12("to-space", "$color, $space", new A.module_closure43()), A._function12("is-legacy", _s6_, new A.module_closure44()), A._function12("is-missing", "$color, $channel", new A.module_closure45()), A._function12("is-in-gamut", "$color, $space: null", new A.module_closure46()), A._function12("to-gamut", "$color, $space: null, $method: null", new A.module_closure47()), A._function12("channel", _s30_, new A.module_closure48()), A._function12("same", "$color1, $color2", new A.module_closure49()), A._function12("is-powerless", _s30_, new A.module_closure50()), $.$get$_complement0(), $.$get$_adjust0(), $.$get$_scale0(), $.$get$_change0(), $.$get$_ieHexStr0()], type$.JSArray_Callable_2), _null, _null, type$.Callable_2); + }); + _lazyFinal($, "_mix0", "$get$_mix0", () => A._function12("mix", string$.x24color, new A._mix_closure0())); + _lazyFinal($, "_complement0", "$get$_complement0", () => A._function12("complement", "$color, $space: null", new A._complement_closure0())); + _lazyFinal($, "_adjust0", "$get$_adjust0", () => A._function12("adjust", "$color, $kwargs...", new A._adjust_closure0())); + _lazyFinal($, "_scale0", "$get$_scale0", () => A._function12("scale", "$color, $kwargs...", new A._scale_closure0())); + _lazyFinal($, "_change0", "$get$_change0", () => A._function12("change", "$color, $kwargs...", new A._change_closure0())); + _lazyFinal($, "_ieHexStr0", "$get$_ieHexStr0", () => A._function12("ie-hex-str", "$color", new A._ieHexStr_closure0())); + _lazyFinal($, "colorClass", "$get$colorClass", () => new A.colorClass_closure().call$0()); + _lazyFinal($, "legacyColorClass", "$get$legacyColorClass", () => { + var t1 = A.createJSClass("sass.types.Color", new A.legacyColorClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getR", new A.legacyColorClass_closure0(), "getG", new A.legacyColorClass_closure1(), "getB", new A.legacyColorClass_closure2(), "getA", new A.legacyColorClass_closure3(), "setR", new A.legacyColorClass_closure4(), "setG", new A.legacyColorClass_closure5(), "setB", new A.legacyColorClass_closure6(), "setA", new A.legacyColorClass_closure7()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "colorsByName0", "$get$colorsByName0", () => A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor_SassColor$rgb0(154, 205, 50, 1), "yellow", A.SassColor_SassColor$rgb0(255, 255, 0, 1), "whitesmoke", A.SassColor_SassColor$rgb0(245, 245, 245, 1), "white", A.SassColor_SassColor$rgb0(255, 255, 255, 1), "wheat", A.SassColor_SassColor$rgb0(245, 222, 179, 1), "violet", A.SassColor_SassColor$rgb0(238, 130, 238, 1), "turquoise", A.SassColor_SassColor$rgb0(64, 224, 208, 1), "transparent", A.SassColor_SassColor$rgb0(0, 0, 0, 0), "tomato", A.SassColor_SassColor$rgb0(255, 99, 71, 1), "thistle", A.SassColor_SassColor$rgb0(216, 191, 216, 1), "teal", A.SassColor_SassColor$rgb0(0, 128, 128, 1), "tan", A.SassColor_SassColor$rgb0(210, 180, 140, 1), "steelblue", A.SassColor_SassColor$rgb0(70, 130, 180, 1), "springgreen", A.SassColor_SassColor$rgb0(0, 255, 127, 1), "snow", A.SassColor_SassColor$rgb0(255, 250, 250, 1), "slategrey", A.SassColor_SassColor$rgb0(112, 128, 144, 1), "slategray", A.SassColor_SassColor$rgb0(112, 128, 144, 1), "slateblue", A.SassColor_SassColor$rgb0(106, 90, 205, 1), "skyblue", A.SassColor_SassColor$rgb0(135, 206, 235, 1), "silver", A.SassColor_SassColor$rgb0(192, 192, 192, 1), "sienna", A.SassColor_SassColor$rgb0(160, 82, 45, 1), "seashell", A.SassColor_SassColor$rgb0(255, 245, 238, 1), "seagreen", A.SassColor_SassColor$rgb0(46, 139, 87, 1), "sandybrown", A.SassColor_SassColor$rgb0(244, 164, 96, 1), "salmon", A.SassColor_SassColor$rgb0(250, 128, 114, 1), "saddlebrown", A.SassColor_SassColor$rgb0(139, 69, 19, 1), "royalblue", A.SassColor_SassColor$rgb0(65, 105, 225, 1), "rosybrown", A.SassColor_SassColor$rgb0(188, 143, 143, 1), "red", A.SassColor_SassColor$rgb0(255, 0, 0, 1), "rebeccapurple", A.SassColor_SassColor$rgb0(102, 51, 153, 1), "purple", A.SassColor_SassColor$rgb0(128, 0, 128, 1), "powderblue", A.SassColor_SassColor$rgb0(176, 224, 230, 1), "plum", A.SassColor_SassColor$rgb0(221, 160, 221, 1), "pink", A.SassColor_SassColor$rgb0(255, 192, 203, 1), "peru", A.SassColor_SassColor$rgb0(205, 133, 63, 1), "peachpuff", A.SassColor_SassColor$rgb0(255, 218, 185, 1), "papayawhip", A.SassColor_SassColor$rgb0(255, 239, 213, 1), "palevioletred", A.SassColor_SassColor$rgb0(219, 112, 147, 1), "paleturquoise", A.SassColor_SassColor$rgb0(175, 238, 238, 1), "palegreen", A.SassColor_SassColor$rgb0(152, 251, 152, 1), "palegoldenrod", A.SassColor_SassColor$rgb0(238, 232, 170, 1), "orchid", A.SassColor_SassColor$rgb0(218, 112, 214, 1), "orangered", A.SassColor_SassColor$rgb0(255, 69, 0, 1), "orange", A.SassColor_SassColor$rgb0(255, 165, 0, 1), "olivedrab", A.SassColor_SassColor$rgb0(107, 142, 35, 1), "olive", A.SassColor_SassColor$rgb0(128, 128, 0, 1), "oldlace", A.SassColor_SassColor$rgb0(253, 245, 230, 1), "navy", A.SassColor_SassColor$rgb0(0, 0, 128, 1), "navajowhite", A.SassColor_SassColor$rgb0(255, 222, 173, 1), "moccasin", A.SassColor_SassColor$rgb0(255, 228, 181, 1), "mistyrose", A.SassColor_SassColor$rgb0(255, 228, 225, 1), "mintcream", A.SassColor_SassColor$rgb0(245, 255, 250, 1), "midnightblue", A.SassColor_SassColor$rgb0(25, 25, 112, 1), "mediumvioletred", A.SassColor_SassColor$rgb0(199, 21, 133, 1), "mediumturquoise", A.SassColor_SassColor$rgb0(72, 209, 204, 1), "mediumspringgreen", A.SassColor_SassColor$rgb0(0, 250, 154, 1), "mediumslateblue", A.SassColor_SassColor$rgb0(123, 104, 238, 1), "mediumseagreen", A.SassColor_SassColor$rgb0(60, 179, 113, 1), "mediumpurple", A.SassColor_SassColor$rgb0(147, 112, 219, 1), "mediumorchid", A.SassColor_SassColor$rgb0(186, 85, 211, 1), "mediumblue", A.SassColor_SassColor$rgb0(0, 0, 205, 1), "mediumaquamarine", A.SassColor_SassColor$rgb0(102, 205, 170, 1), "maroon", A.SassColor_SassColor$rgb0(128, 0, 0, 1), "magenta", A.SassColor_SassColor$rgb0(255, 0, 255, 1), "linen", A.SassColor_SassColor$rgb0(250, 240, 230, 1), "limegreen", A.SassColor_SassColor$rgb0(50, 205, 50, 1), "lime", A.SassColor_SassColor$rgb0(0, 255, 0, 1), "lightyellow", A.SassColor_SassColor$rgb0(255, 255, 224, 1), "lightsteelblue", A.SassColor_SassColor$rgb0(176, 196, 222, 1), "lightslategrey", A.SassColor_SassColor$rgb0(119, 136, 153, 1), "lightslategray", A.SassColor_SassColor$rgb0(119, 136, 153, 1), "lightskyblue", A.SassColor_SassColor$rgb0(135, 206, 250, 1), "lightseagreen", A.SassColor_SassColor$rgb0(32, 178, 170, 1), "lightsalmon", A.SassColor_SassColor$rgb0(255, 160, 122, 1), "lightpink", A.SassColor_SassColor$rgb0(255, 182, 193, 1), "lightgrey", A.SassColor_SassColor$rgb0(211, 211, 211, 1), "lightgreen", A.SassColor_SassColor$rgb0(144, 238, 144, 1), "lightgray", A.SassColor_SassColor$rgb0(211, 211, 211, 1), "lightgoldenrodyellow", A.SassColor_SassColor$rgb0(250, 250, 210, 1), "lightcyan", A.SassColor_SassColor$rgb0(224, 255, 255, 1), "lightcoral", A.SassColor_SassColor$rgb0(240, 128, 128, 1), "lightblue", A.SassColor_SassColor$rgb0(173, 216, 230, 1), "lemonchiffon", A.SassColor_SassColor$rgb0(255, 250, 205, 1), "lawngreen", A.SassColor_SassColor$rgb0(124, 252, 0, 1), "lavenderblush", A.SassColor_SassColor$rgb0(255, 240, 245, 1), "lavender", A.SassColor_SassColor$rgb0(230, 230, 250, 1), "khaki", A.SassColor_SassColor$rgb0(240, 230, 140, 1), "ivory", A.SassColor_SassColor$rgb0(255, 255, 240, 1), "indigo", A.SassColor_SassColor$rgb0(75, 0, 130, 1), "indianred", A.SassColor_SassColor$rgb0(205, 92, 92, 1), "hotpink", A.SassColor_SassColor$rgb0(255, 105, 180, 1), "honeydew", A.SassColor_SassColor$rgb0(240, 255, 240, 1), "grey", A.SassColor_SassColor$rgb0(128, 128, 128, 1), "greenyellow", A.SassColor_SassColor$rgb0(173, 255, 47, 1), "green", A.SassColor_SassColor$rgb0(0, 128, 0, 1), "gray", A.SassColor_SassColor$rgb0(128, 128, 128, 1), "goldenrod", A.SassColor_SassColor$rgb0(218, 165, 32, 1), "gold", A.SassColor_SassColor$rgb0(255, 215, 0, 1), "ghostwhite", A.SassColor_SassColor$rgb0(248, 248, 255, 1), "gainsboro", A.SassColor_SassColor$rgb0(220, 220, 220, 1), "fuchsia", A.SassColor_SassColor$rgb0(255, 0, 255, 1), "forestgreen", A.SassColor_SassColor$rgb0(34, 139, 34, 1), "floralwhite", A.SassColor_SassColor$rgb0(255, 250, 240, 1), "firebrick", A.SassColor_SassColor$rgb0(178, 34, 34, 1), "dodgerblue", A.SassColor_SassColor$rgb0(30, 144, 255, 1), "dimgrey", A.SassColor_SassColor$rgb0(105, 105, 105, 1), "dimgray", A.SassColor_SassColor$rgb0(105, 105, 105, 1), "deepskyblue", A.SassColor_SassColor$rgb0(0, 191, 255, 1), "deeppink", A.SassColor_SassColor$rgb0(255, 20, 147, 1), "darkviolet", A.SassColor_SassColor$rgb0(148, 0, 211, 1), "darkturquoise", A.SassColor_SassColor$rgb0(0, 206, 209, 1), "darkslategrey", A.SassColor_SassColor$rgb0(47, 79, 79, 1), "darkslategray", A.SassColor_SassColor$rgb0(47, 79, 79, 1), "darkslateblue", A.SassColor_SassColor$rgb0(72, 61, 139, 1), "darkseagreen", A.SassColor_SassColor$rgb0(143, 188, 143, 1), "darksalmon", A.SassColor_SassColor$rgb0(233, 150, 122, 1), "darkred", A.SassColor_SassColor$rgb0(139, 0, 0, 1), "darkorchid", A.SassColor_SassColor$rgb0(153, 50, 204, 1), "darkorange", A.SassColor_SassColor$rgb0(255, 140, 0, 1), "darkolivegreen", A.SassColor_SassColor$rgb0(85, 107, 47, 1), "darkmagenta", A.SassColor_SassColor$rgb0(139, 0, 139, 1), "darkkhaki", A.SassColor_SassColor$rgb0(189, 183, 107, 1), "darkgrey", A.SassColor_SassColor$rgb0(169, 169, 169, 1), "darkgreen", A.SassColor_SassColor$rgb0(0, 100, 0, 1), "darkgray", A.SassColor_SassColor$rgb0(169, 169, 169, 1), "darkgoldenrod", A.SassColor_SassColor$rgb0(184, 134, 11, 1), "darkcyan", A.SassColor_SassColor$rgb0(0, 139, 139, 1), "darkblue", A.SassColor_SassColor$rgb0(0, 0, 139, 1), "cyan", A.SassColor_SassColor$rgb0(0, 255, 255, 1), "crimson", A.SassColor_SassColor$rgb0(220, 20, 60, 1), "cornsilk", A.SassColor_SassColor$rgb0(255, 248, 220, 1), "cornflowerblue", A.SassColor_SassColor$rgb0(100, 149, 237, 1), "coral", A.SassColor_SassColor$rgb0(255, 127, 80, 1), "chocolate", A.SassColor_SassColor$rgb0(210, 105, 30, 1), "chartreuse", A.SassColor_SassColor$rgb0(127, 255, 0, 1), "cadetblue", A.SassColor_SassColor$rgb0(95, 158, 160, 1), "burlywood", A.SassColor_SassColor$rgb0(222, 184, 135, 1), "brown", A.SassColor_SassColor$rgb0(165, 42, 42, 1), "blueviolet", A.SassColor_SassColor$rgb0(138, 43, 226, 1), "blue", A.SassColor_SassColor$rgb0(0, 0, 255, 1), "blanchedalmond", A.SassColor_SassColor$rgb0(255, 235, 205, 1), "black", A.SassColor_SassColor$rgb0(0, 0, 0, 1), "bisque", A.SassColor_SassColor$rgb0(255, 228, 196, 1), "beige", A.SassColor_SassColor$rgb0(245, 245, 220, 1), "azure", A.SassColor_SassColor$rgb0(240, 255, 255, 1), "aquamarine", A.SassColor_SassColor$rgb0(127, 255, 212, 1), "aqua", A.SassColor_SassColor$rgb0(0, 255, 255, 1), "antiquewhite", A.SassColor_SassColor$rgb0(250, 235, 215, 1), "aliceblue", A.SassColor_SassColor$rgb0(240, 248, 255, 1)], type$.String, type$.SassColor_2)); + _lazyFinal($, "namesByColor0", "$get$namesByColor0", () => { + var $name, + t1 = type$.SassColor_2, + t2 = type$.String, + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs0($.$get$colorsByName0(), t2, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + t3.$indexSet(0, t2._1, $name); + } + return t3; + }); + _lazyFinal($, "nodePackageImporterClass", "$get$nodePackageImporterClass", () => new A.nodePackageImporterClass_closure().call$0()); + _lazyFinal($, "compilerClass", "$get$compilerClass", () => new A.compilerClass_closure().call$0()); + _lazyFinal($, "asyncCompilerClass", "$get$asyncCompilerClass", () => new A.asyncCompilerClass_closure().call$0()); + _lazyFinal($, "lmsToOklab0", "$get$lmsToOklab0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.2104542553, 0.793617785, -0.0040720468, 1.9779984951, -2.428592205, 0.4505937099, 0.0259040371, 0.7827717662, -0.808675766], type$.JSArray_double))); + _lazyFinal($, "oklabToLms0", "$get$oklabToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9999999984505198, 0.39633779217376786, 0.2158037580607588, 1.0000000088817609, -0.10556134232365635, -0.06385417477170591, 1.0000000546724108, -0.08948418209496575, -1.2914855378640917], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearDisplayP30", "$get$linearSrgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8224619687143623, 0.17753803128563775, 0, 0.03319419885096161, 0.9668058011490384, 0, 0.01708263072112003, 0.07239744066396346, 0.9105199286149165], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearSrgb0", "$get$linearDisplayP3ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2249401762805598, -0.22494017628055996, 0, -0.04205695470968816, 1.042056954709688, 0, -0.01963755459033443, -0.07863604555063188, 1.0982736001409663], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearA98Rgb0", "$get$linearSrgbToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7151256068556247, 0.28487439314437535, 0, 0, 1, 0, 0, 0.04116194845011846, 0.9588380515498816], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearSrgb0", "$get$linearA98RgbToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3983557439607783, -0.3983557439607783, 0, 0, 1, 0, 0, -0.04292898929447326, 1.0429289892944733], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearRec20200", "$get$linearSrgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.627403895934699, 0.3292830383778837, 0.04331306568741722, 0.06909728935823208, 0.9195403950754587, 0.01136231556630917, 0.01639143887515027, 0.08801330787722575, 0.895595253247624], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearSrgb0", "$get$linearRec2020ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6604910021084345, -0.5876411387885495, -0.07284986331988487, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0181507633549053, -0.10057889800800737, 1.1187296613629127], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD650", "$get$linearSrgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4123907992659595, 0.35758433938387796, 0.1804807884018343, 0.21263900587151036, 0.7151686787677559, 0.07219231536073371, 0.01933081871559185, 0.11919477979462598, 0.9505321522496606], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearSrgb0", "$get$xyzD65ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.2409699419045213, -1.5373831775700935, -0.4986107602930033, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.0556300796969936, -0.20397695888897657, 1.0569715142428786], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLms0", "$get$linearSrgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.41222147080000016, 0.5363325362999999, 0.05144599290000001, 0.21190349820000007, 0.6806995450999999, 0.1073969566, 0.08830246190000005, 0.28171883759999994, 0.6299787005], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearSrgb0", "$get$lmsToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([4.076741661347993, -3.3077115904081924, 0.23096992872942781, -1.2684380040921766, 2.6097574006633724, -0.34131939631021974, -0.0041960865418372, -0.7034186144594495, 1.7076147009309448], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearProphotoRgb0", "$get$linearSrgbToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5292769776226116, 0.33015450197849283, 0.14056852039889556, 0.09836585954044917, 0.8734707129069618, 0.028163427552589, 0.01687534092138684, 0.11765941425612084, 0.8654652448224923], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearSrgb0", "$get$linearProphotoRgbToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.034380849516996, -0.7276357899341342, -0.3067450595828618, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.00855882878391742, -0.1532667021380372, 1.1618255309219547], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD500", "$get$linearSrgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.43606574687426936, 0.3851515095901596, 0.14307841996513868, 0.22249317711056518, 0.7168870130944824, 0.06061980979495235, 0.01392392146316939, 0.09708132423141015, 0.7140993568158807], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearSrgb0", "$get$xyzD50ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1341358529001178, -1.617385998018042, -0.49066221791109754, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.07195539255794733, -0.228976759815182, 1.4053860351131182], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearA98Rgb0", "$get$linearDisplayP3ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8640051374740484, 0.13599486252595164, 0, -0.04205695470968816, 1.042056954709688, 0, -0.02056038078232985, -0.03250613804550798, 1.0530665188278379], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearDisplayP30", "$get$linearA98RgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1500944181410184, -0.15009441814101834, 0, 0.04641729862941844, 0.9535827013705815, 0, 0.02388759479083904, 0.02650477632633013, 0.9496076288828308], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearRec20200", "$get$linearDisplayP3ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7538330343617218, 0.1985973690526163, 0.04756959658566187, 0.04574384896535833, 0.9417772198116935, 0.01247893122294812, -0.00121034035451832, 0.01760171730108989, 0.9836086230534284], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearDisplayP30", "$get$linearRec2020ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.343578252584332, -0.2821796705261357, -0.06139858205819628, -0.06529745278911953, 1.0757879158485746, -0.01049046305945495, 0.00282178726170095, -0.01959849452449406, 1.0167767072627931], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD650", "$get$linearDisplayP3ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48657094864821626, 0.26566769316909294, 0.1982172852343625, 0.22897456406974884, 0.6917385218365062, 0.079286914093745, 0, 0.04511338185890257, 1.0439443689009757], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearDisplayP30", "$get$xyzD65ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4934969119414245, -0.9313836179191236, -0.40271078445071684, -0.8294889695615749, 1.7626640603183468, 0.02362468584194359, 0.03584583024378433, -0.0761723892680417, 0.9568845240076873], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLms0", "$get$linearDisplayP3ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4813798544258549, 0.46211836973903553, 0.0565017758351096, 0.2288319449023311, 0.6532168128284037, 0.11795124216926511, 0.0839457557301676, 0.2241652688595698, 0.6918889754102626], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearDisplayP30", "$get$lmsToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1277689866777214, -2.2571357955395377, 0.12936680863610234, -1.091009047383439, 2.4133317582793437, -0.3223227106545711, -0.02601081320950207, -0.5080413256930673, 1.5340521388517652], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearProphotoRgb0", "$get$linearDisplayP3ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6316869193403589, 0.21393038569465722, 0.1543826949649839, 0.08320371426648458, 0.8858651367630243, 0.03093114897049121, -0.00127273456473881, 0.05075510433665735, 0.9505176302280814], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearDisplayP30", "$get$linearProphotoRgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6325756087069179, -0.3797716184825984, -0.2528039902243195, -0.15370040233755072, 1.1667025472425014, -0.01300214490495082, 0.01039319529676572, -0.0628073126495944, 1.0524141173528287], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD500", "$get$linearDisplayP3ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.515146442968116, 0.2920099820638577, 0.15713925139759397, 0.2412003221252552, 0.6922225411313818, 0.06657713674336294, -0.00105013914714014, 0.0418782701890746, 0.7842764714685257], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearDisplayP30", "$get$xyzD50ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4039341218554973, -0.9900304424955931, -0.39761363181465614, -0.8422700161454688, 1.7989580161067082, 0.01604562477090472, 0.04819381686413303, -0.09738519815446048, 1.2736713693321273], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearRec20200", "$get$linearA98RgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8773338416636568, 0.07749370651571998, 0.04517245182062317, 0.09662259146620378, 0.8915273202441805, 0.01185008828961569, 0.02292106270284839, 0.04303668501067932, 0.9340422522864723], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearA98Rgb0", "$get$linearRec2020ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1519783947159163, -0.0975030553024086, -0.05447533941350766, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0225303827810559, -0.04980650742838876, 1.0723368902094446], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD650", "$get$linearA98RgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5766690429101308, 0.18555823790654627, 0.18822864623499472, 0.29734497525053616, 0.627363566255466, 0.07529145849399789, 0.02703136138641237, 0.07068885253582714, 0.9913375368376389], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearA98Rgb0", "$get$xyzD65ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.041587903810746, -0.5650069742788596, -0.3447313507783295, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.01344428063203102, -0.11836239223101823, 1.0151749943912054], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLms0", "$get$linearA98RgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5764322614771404, 0.36991322114441194, 0.05365451737844765, 0.2963164738733526, 0.5916761266265069, 0.11200739940014041, 0.12347825480374285, 0.21949869580674647, 0.6570230493895107], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearA98Rgb0", "$get$lmsToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.5540368479080695, -1.6219762026260214, 0.06793935455575403, -1.2684380040921766, 2.6097574006633724, -0.34131939631021974, -0.05623474718052319, -0.567041834118795, 1.623276581242614], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearProphotoRgb0", "$get$linearA98RgbToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7401175018047792, 0.11327951328898105, 0.1466029849062397, 0.1375504646980262, 0.833077080269484, 0.02937245503248977, 0.02359772990871766, 0.07378347703906656, 0.9026187930522158], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearA98Rgb0", "$get$linearProphotoRgbToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.38965124815152, -0.16945907691487766, -0.22019217123664242, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.01762544368426068, -0.09625702306122665, 1.1138824667454874], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD500", "$get$linearA98RgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6097750418861814, 0.20530000261929401, 0.14922063192409227, 0.31112461220464155, 0.6256532308346856, 0.06322215696067286, 0.01947059555648168, 0.06087908649415867, 0.7447549204598198], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearA98Rgb0", "$get$xyzD50ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.9624670363768806, -0.6107423404815073, -0.3413580980827154, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.02870443944957101, -0.1406748663317068, 1.3489141814137937], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD650", "$get$linearRec2020ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6369580483012913, 0.14461690358620838, 0.16888097516417205, 0.26270021201126703, 0.677998071518871, 0.05930171646986194, 0, 0.0280726930490875, 1.0609850577107909], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearRec20200", "$get$xyzD65ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7166511879712676, -0.3556707837763924, -0.2533662813736598, -0.666684351832489, 1.616481236634939, 0.01576854581391113, 0.01763985744531091, -0.04277061325780865, 0.942103121235474], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLms0", "$get$linearRec2020ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6167557871990856, 0.36019839939276255, 0.02304581340815186, 0.2651330639832814, 0.6358393640777106, 0.099027571839008, 0.10010263423281572, 0.20390651940192997, 0.6959908463652543], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearRec20200", "$get$lmsToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.1399067356955617, -1.2463895087846906, 0.10648277296448995, -0.8847358624581563, 2.1632309821083826, -0.2784951194339029, -0.04857375801465988, -0.4545031429172517, 1.5030769008864613], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearProphotoRgb0", "$get$linearRec2020ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8351873331297235, 0.04886884858605698, 0.11594381828421951, 0.05403324519953363, 0.9289184085692044, 0.01704834623126199, -0.00234203897072539, 0.03633215316169465, 0.9660098858090307], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearRec20200", "$get$linearProphotoRgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.200659329517408, -0.05756805370122346, -0.14309127581618444, -0.06994154955888504, 1.080617897597214, -0.01067634803832895, 0.00554147334294746, -0.04078219298657951, 1.035240719643632], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD500", "$get$linearRec2020ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.673515463188276, 0.16569726370390453, 0.12508294953738705, 0.2790590051411206, 0.6753180057491098, 0.04562298910976962, -0.00193242713400438, 0.02997782679282923, 0.7970592028516355], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearRec20200", "$get$xyzD50ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.647184904671766, -0.3936818981316471, -0.23595963848828266, -0.6826641074173818, 1.6477146127444076, 0.01281708338512084, 0.02966887665275675, -0.0629258964297003, 1.2535578201865771], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLms0", "$get$xyzD65ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8190224432164319, 0.3619062562801221, -0.12887378261216414, 0.0329836671980271, 0.9292868468965546, 0.03614466816999844, 0.04817719956604625, 0.26423952494422764, 0.6335478258136937], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD650", "$get$lmsToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2268798733741557, -0.5578149965554814, 0.2813910501772159, -0.04057576262431372, 1.1122868293970596, -0.07171106666151703, -0.07637294974672143, -0.42149332396279143, 1.5869240244272418], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearProphotoRgb0", "$get$xyzD65ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.4031904633774979, -0.22301514479051668, -0.1016066850741379, -0.5262384021633072, 1.4816319629234644, 0.01701879027252688, -0.0112022652862215, 0.01824640347962099, 0.9112472274915048], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD650", "$get$linearProphotoRgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.755590742296921, 0.11271984265940525, 0.0821453420953454, 0.2683218435785719, 0.7151152566617912, 0.01656289975963685, 0.0039159727624258, -0.01293344283684181, 1.0980752208342945], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToXyzD500", "$get$xyzD65ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0479297925449966, 0.02294687060160952, -0.05019226628920519, 0.02962780877005567, 0.99043442675388, -0.01707379906341879, -0.00924304064620452, 0.01505519149029816, 0.751874281428137], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToXyzD650", "$get$xyzD50ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9554734214880752, -0.02309845494876452, 0.06325924320057065, -0.02836970933386358, 1.0099953980813041, 0.0210414411919173, 0.01231401486448199, -0.02050764929889898, 1.330365926242124], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearProphotoRgb0", "$get$lmsToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7383551498581524, -0.9879509523734343, 0.24959580241648663, -0.7070494262491486, 1.9343700843817762, -0.2273206579391904, -0.08407883426424761, -0.35754059702097796, 1.4416194312494715], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLms0", "$get$linearProphotoRgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7154484634929431, 0.3527915479817274, -0.06824001147467047, 0.2744116550904942, 0.6677976408081148, 0.05779070400139092, 0.10978443849083751, 0.1861982874659698, 0.7040172740431927], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD500", "$get$lmsToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2885862158390884, -0.5378717465173621, 0.21358120705405403, -0.00253389352489796, 1.0923168245326655, -0.08978293089853581, -0.06937383312514489, -0.29500839218634667, 1.1894868277924509], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLms0", "$get$xyzD50ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.770700047124025, 0.3492483987107274, -0.1120235200424989, 0.00559650559780223, 0.9370723249333315, 0.06972569131301698, 0.04633715253432816, 0.2527753086852587, 0.8514580737160835], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD500", "$get$linearProphotoRgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7977666449006423, 0.13518129740053308, 0.0313477341283922, 0.2880748288194013, 0.711835234241873, 0.00008993693872564, 0, 0, 0.8251046025104602], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearProphotoRgb0", "$get$xyzD50ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3457868816471583, -0.25557208737979464, -0.05110186497554526, -0.5446307051249019, 1.5082477428451468, 0.02052744743642139, 0, 0, 1.2119675456389452], type$.JSArray_double))); + _lazyFinal($, "_disallowedFunctionNames0", "$get$_disallowedFunctionNames0", () => { + var t1 = $.$get$globalFunctions0(); + t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure0(), type$.String).toSet$0(0); + t1.add$1(0, "if"); + t1.remove$1(0, "rgb"); + t1.remove$1(0, "rgba"); + t1.remove$1(0, "hsl"); + t1.remove$1(0, "hsla"); + t1.remove$1(0, "grayscale"); + t1.remove$1(0, "invert"); + t1.remove$1(0, "alpha"); + t1.remove$1(0, "opacity"); + t1.remove$1(0, "saturate"); + t1.remove$1(0, "min"); + t1.remove$1(0, "max"); + t1.remove$1(0, "round"); + t1.remove$1(0, "abs"); + return t1; + }); + _lazyFinal($, "deprecations", "$get$deprecations", () => { + var _i, deprecation, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Deprecation1?")); + for (_i = 0; _i < 24; ++_i) { + deprecation = B.List_IYb[_i]; + if (deprecation !== B.Deprecation_Agq) { + t2 = deprecation.id; + t1.$indexSet(0, t2, {id: t2, status: new A.deprecations_closure(deprecation).call$0(), description: deprecation.description, deprecatedIn: deprecation.get$deprecatedIn(0), obsoleteIn: deprecation.get$deprecatedIn(0)}); + } + } + return t1; + }); + _lazyFinal($, "versionClass", "$get$versionClass", () => new A.versionClass_closure().call$0()); + _lazyFinal($, "exceptionClass", "$get$exceptionClass", () => new A.exceptionClass_closure().call$0()); + _lazyFinal($, "FilesystemImporter_cwd0", "$get$FilesystemImporter_cwd0", () => { + var _null = null; + return new A.FilesystemImporter0(A.absolute(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), true); + }); + _lazyFinal($, "functionClass", "$get$functionClass", () => new A.functionClass_closure().call$0()); + _lazyFinal($, "globalFunctions0", "$get$globalFunctions0", () => { + var t1 = type$.BuiltInCallable_2, + t2 = A.List_List$of($.$get$global6(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$global7()); + B.JSArray_methods.addAll$1(t2, $.$get$global8()); + B.JSArray_methods.addAll$1(t2, $.$get$global9()); + B.JSArray_methods.addAll$1(t2, $.$get$global10()); + B.JSArray_methods.addAll$1(t2, $.$get$global11()); + B.JSArray_methods.addAll$1(t2, $.$get$global12()); + t2.push(A.BuiltInCallable$function0("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure0(), null)); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "coreModules0", "$get$coreModules0", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module5(), $.$get$module6(), $.$get$module7(), $.$get$module8(), $.$get$module9(), $.$get$module10()], A.findType("JSArray>")), type$.BuiltInModule_Callable_2)); + _lazyFinal($, "IfExpression_declaration0", "$get$IfExpression_declaration0", () => A.ArgumentDeclaration_ArgumentDeclaration$parse0(string$.x40funct, null)); + _lazyFinal($, "global7", "$get$global7", () => { + var _s4_ = "list"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_length2().withDeprecationWarning$1(_s4_), $.$get$_nth0().withDeprecationWarning$1(_s4_), $.$get$_setNth0().withDeprecationWarning$1(_s4_), $.$get$_join0().withDeprecationWarning$1(_s4_), $.$get$_append2().withDeprecationWarning$1(_s4_), $.$get$_zip0().withDeprecationWarning$1(_s4_), $.$get$_index2().withDeprecationWarning$1(_s4_), $.$get$_isBracketed0().withDeprecationWarning$1(_s4_), $.$get$_separator0().withDeprecationWarning$1(_s4_).withName$1("list-separator")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module6", "$get$module6", () => A.BuiltInModule$0("list", A._setArrayType([$.$get$_length2(), $.$get$_nth0(), $.$get$_setNth0(), $.$get$_join0(), $.$get$_append2(), $.$get$_zip0(), $.$get$_index2(), $.$get$_isBracketed0(), $.$get$_separator0(), $.$get$_slash0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_length1", "$get$_length2", () => A._function11("length", "$list", new A._length_closure2())); + _lazyFinal($, "_nth0", "$get$_nth0", () => A._function11("nth", "$list, $n", new A._nth_closure0())); + _lazyFinal($, "_setNth0", "$get$_setNth0", () => A._function11("set-nth", "$list, $n, $value", new A._setNth_closure0())); + _lazyFinal($, "_join0", "$get$_join0", () => A._function11("join", string$.x24list1, new A._join_closure0())); + _lazyFinal($, "_append1", "$get$_append2", () => A._function11("append", "$list, $val, $separator: auto", new A._append_closure2())); + _lazyFinal($, "_zip0", "$get$_zip0", () => A._function11("zip", "$lists...", new A._zip_closure0())); + _lazyFinal($, "_index1", "$get$_index2", () => A._function11("index", "$list, $value", new A._index_closure2())); + _lazyFinal($, "_separator0", "$get$_separator0", () => A._function11("separator", "$list", new A._separator_closure0())); + _lazyFinal($, "_isBracketed0", "$get$_isBracketed0", () => A._function11("is-bracketed", "$list", new A._isBracketed_closure0())); + _lazyFinal($, "_slash0", "$get$_slash0", () => A._function11("slash", "$elements...", new A._slash_closure0())); + _lazyFinal($, "listClass", "$get$listClass", () => new A.listClass_closure().call$0()); + _lazyFinal($, "legacyListClass", "$get$legacyListClass", () => { + var t1 = A.createJSClass("sass.types.List", new A.legacyListClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyListClass_closure0(), "setValue", new A.legacyListClass_closure1(), "getSeparator", new A.legacyListClass_closure2(), "setSeparator", new A.legacyListClass_closure3(), "getLength", new A.legacyListClass_closure4()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "Logger_quiet0", "$get$Logger_quiet0", () => new A._QuietLogger0()); + _lazyFinal($, "global8", "$get$global8", () => { + var _s3_ = "map"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_get0().withDeprecationWarning$1(_s3_).withName$1("map-get"), $.$get$_merge0().withDeprecationWarning$1(_s3_).withName$1("map-merge"), $.$get$_remove0().withDeprecationWarning$1(_s3_).withName$1("map-remove"), $.$get$_keys0().withDeprecationWarning$1(_s3_).withName$1("map-keys"), $.$get$_values0().withDeprecationWarning$1(_s3_).withName$1("map-values"), $.$get$_hasKey0().withDeprecationWarning$1(_s3_).withName$1("map-has-key")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module7", "$get$module7", () => A.BuiltInModule$0("map", A._setArrayType([$.$get$_get0(), $.$get$_set0(), $.$get$_merge0(), $.$get$_remove0(), $.$get$_keys0(), $.$get$_values0(), $.$get$_hasKey0(), $.$get$_deepMerge0(), $.$get$_deepRemove0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_get0", "$get$_get0", () => A._function10("get", "$map, $key, $keys...", new A._get_closure0())); + _lazyFinal($, "_set0", "$get$_set0", () => A.BuiltInCallable$overloadedFunction0("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure1(), "$map, $args...", new A._set_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_merge0", "$get$_merge0", () => A.BuiltInCallable$overloadedFunction0("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure1(), "$map1, $args...", new A._merge_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_deepMerge0", "$get$_deepMerge0", () => A._function10("deep-merge", "$map1, $map2", new A._deepMerge_closure0())); + _lazyFinal($, "_deepRemove0", "$get$_deepRemove0", () => A._function10("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure0())); + _lazyFinal($, "_remove0", "$get$_remove0", () => A.BuiltInCallable$overloadedFunction0("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure1(), "$map, $key, $keys...", new A._remove_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_keys0", "$get$_keys0", () => A._function10("keys", "$map", new A._keys_closure0())); + _lazyFinal($, "_values0", "$get$_values0", () => A._function10("values", "$map", new A._values_closure0())); + _lazyFinal($, "_hasKey0", "$get$_hasKey0", () => A._function10("has-key", "$map, $key, $keys...", new A._hasKey_closure0())); + _lazyFinal($, "mapClass", "$get$mapClass", () => new A.mapClass_closure().call$0()); + _lazyFinal($, "legacyMapClass", "$get$legacyMapClass", () => { + var t1 = A.createJSClass("sass.types.Map", new A.legacyMapClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getKey", new A.legacyMapClass_closure0(), "getValue", new A.legacyMapClass_closure1(), "getLength", new A.legacyMapClass_closure2(), "setKey", new A.legacyMapClass_closure3(), "setValue", new A.legacyMapClass_closure4()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "global9", "$get$global9", () => { + var _s4_ = "math"; + return A.UnmodifiableListView$(A._setArrayType([A._function9("abs", "$number", new A.global_closure43()), $.$get$_ceil0().withDeprecationWarning$1(_s4_), $.$get$_floor0().withDeprecationWarning$1(_s4_), $.$get$_max0().withDeprecationWarning$1(_s4_), $.$get$_min0().withDeprecationWarning$1(_s4_), $.$get$_percentage0().withDeprecationWarning$1(_s4_), $.$get$_randomFunction0().withDeprecationWarning$1(_s4_), $.$get$_round0().withDeprecationWarning$1(_s4_), $.$get$_unit0().withDeprecationWarning$1(_s4_), $.$get$_compatible0().withDeprecationWarning$1(_s4_).withName$1("comparable"), $.$get$_isUnitless0().withDeprecationWarning$1(_s4_).withName$1("unitless")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module8", "$get$module8", () => { + var _null = null; + return A.BuiltInModule$0("math", A._setArrayType([A._numberFunction0("abs", new A.module_closure26()), $.$get$_acos0(), $.$get$_asin0(), $.$get$_atan0(), $.$get$_atan20(), $.$get$_ceil0(), $.$get$_clamp0(), $.$get$_cos0(), $.$get$_compatible0(), $.$get$_floor0(), $.$get$_hypot0(), $.$get$_isUnitless0(), $.$get$_log0(), $.$get$_max0(), $.$get$_min0(), $.$get$_percentage0(), $.$get$_pow0(), $.$get$_randomFunction0(), $.$get$_round0(), $.$get$_sin0(), $.$get$_sqrt0(), $.$get$_tan0(), $.$get$_unit0(), $.$get$_div0()], type$.JSArray_Callable_2), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber0(2.718281828459045, _null), "pi", A.SassNumber_SassNumber0(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber0(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber0(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber0(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber0(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber0(5e-324, _null)], type$.String, type$.Value_2), type$.Callable_2); + }); + _lazyFinal($, "_ceil0", "$get$_ceil0", () => A._numberFunction0("ceil", new A._ceil_closure0())); + _lazyFinal($, "_clamp0", "$get$_clamp0", () => A._function9("clamp", "$min, $number, $max", new A._clamp_closure0())); + _lazyFinal($, "_floor0", "$get$_floor0", () => A._numberFunction0("floor", new A._floor_closure0())); + _lazyFinal($, "_max0", "$get$_max0", () => A._function9("max", "$numbers...", new A._max_closure0())); + _lazyFinal($, "_min0", "$get$_min0", () => A._function9("min", "$numbers...", new A._min_closure0())); + _lazyFinal($, "_round0", "$get$_round0", () => A._numberFunction0("round", new A._round_closure0())); + _lazyFinal($, "_hypot0", "$get$_hypot0", () => A._function9("hypot", "$numbers...", new A._hypot_closure0())); + _lazyFinal($, "_log0", "$get$_log0", () => A._function9("log", "$number, $base: null", new A._log_closure0())); + _lazyFinal($, "_pow0", "$get$_pow0", () => A._function9("pow", "$base, $exponent", new A._pow_closure0())); + _lazyFinal($, "_sqrt0", "$get$_sqrt0", () => A._singleArgumentMathFunc0("sqrt", A.number2__sqrt$closure())); + _lazyFinal($, "_acos0", "$get$_acos0", () => A._singleArgumentMathFunc0("acos", A.number2__acos$closure())); + _lazyFinal($, "_asin0", "$get$_asin0", () => A._singleArgumentMathFunc0("asin", A.number2__asin$closure())); + _lazyFinal($, "_atan0", "$get$_atan0", () => A._singleArgumentMathFunc0("atan", A.number2__atan$closure())); + _lazyFinal($, "_atan20", "$get$_atan20", () => A._function9("atan2", "$y, $x", new A._atan2_closure0())); + _lazyFinal($, "_cos0", "$get$_cos0", () => A._singleArgumentMathFunc0("cos", A.number2__cos$closure())); + _lazyFinal($, "_sin0", "$get$_sin0", () => A._singleArgumentMathFunc0("sin", A.number2__sin$closure())); + _lazyFinal($, "_tan0", "$get$_tan0", () => A._singleArgumentMathFunc0("tan", A.number2__tan$closure())); + _lazyFinal($, "_compatible0", "$get$_compatible0", () => A._function9("compatible", "$number1, $number2", new A._compatible_closure0())); + _lazyFinal($, "_isUnitless0", "$get$_isUnitless0", () => A._function9("is-unitless", "$number", new A._isUnitless_closure0())); + _lazyFinal($, "_unit0", "$get$_unit0", () => A._function9("unit", "$number", new A._unit_closure0())); + _lazyFinal($, "_percentage0", "$get$_percentage0", () => A._function9("percentage", "$number", new A._percentage_closure0())); + _lazyFinal($, "_random1", "$get$_random2", () => A.Random_Random()); + _lazyFinal($, "_randomFunction0", "$get$_randomFunction0", () => A._function9("random", "$limit: null", new A._randomFunction_closure0())); + _lazyFinal($, "_div0", "$get$_div0", () => A._function9("div", "$number1, $number2", new A._div_closure0())); + _lazyFinal($, "_shared0", "$get$_shared0", () => A.UnmodifiableListView$(A._setArrayType([A._function6("feature-exists", "$feature", new A._shared_closure3()), A._function6("inspect", "$value", new A._shared_closure4()), A._function6("type-of", "$value", new A._shared_closure5()), A._function6("keywords", "$args", new A._shared_closure6())], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "global10", "$get$global12", () => { + var t2, + t1 = A._setArrayType([], type$.JSArray_BuiltInCallable_2); + for (t2 = $.$get$_shared0(), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(0).withDeprecationWarning$1("meta")); + return A.UnmodifiableListView$(t1, type$.BuiltInCallable_2); + }); + _lazyFinal($, "moduleFunctions0", "$get$moduleFunctions0", () => { + var t1 = type$.BuiltInCallable_2, + t2 = A.List_List$of($.$get$_shared0(), true, t1); + t2.push(A._function6("calc-name", "$calc", new A.moduleFunctions_closure2())); + t2.push(A._function6("calc-args", "$calc", new A.moduleFunctions_closure3())); + t2.push(A._function6("accepts-content", "$mixin", new A.moduleFunctions_closure4())); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "mixinClass", "$get$mixinClass", () => new A.mixinClass_closure().call$0()); + _lazyFinal($, "legacyNullClass", "$get$legacyNullClass", () => new A.legacyNullClass_closure().call$0()); + _lazyFinal($, "_epsilon0", "$get$_epsilon0", () => A.pow(10, -11)); + _lazyFinal($, "_inverseEpsilon0", "$get$_inverseEpsilon0", () => A.pow(10, 11)); + _lazyFinal($, "numberClass", "$get$numberClass", () => new A.numberClass_closure().call$0()); + _lazyFinal($, "legacyNumberClass", "$get$legacyNumberClass", () => { + var t1 = A.createJSClass("sass.types.Number", new A.legacyNumberClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyNumberClass_closure0(), "setValue", new A.legacyNumberClass_closure1(), "getUnit", new A.legacyNumberClass_closure2(), "setUnit", new A.legacyNumberClass_closure3()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "_typesByUnit0", "$get$_typesByUnit0", () => { + var t3, type, + t1 = type$.String, + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t1 = A.MapExtensions_get_pairs0(B.Map_397RH, t1, type$.List_String), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + type = t3._0; + for (t3 = J.get$iterator$ax(t3._1); t3.moveNext$0();) + t2.$indexSet(0, t3.get$current(t3), type); + } + return t2; + }); + _lazyFinal($, "global11", "$get$global10", () => { + var _s8_ = "selector"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector0().withDeprecationWarning$1(_s8_), $.$get$_simpleSelectors0().withDeprecationWarning$1(_s8_), $.$get$_parse0().withDeprecationWarning$1(_s8_).withName$1("selector-parse"), $.$get$_nest0().withDeprecationWarning$1(_s8_).withName$1("selector-nest"), $.$get$_append1().withDeprecationWarning$1(_s8_).withName$1("selector-append"), $.$get$_extend0().withDeprecationWarning$1(_s8_).withName$1("selector-extend"), $.$get$_replace0().withDeprecationWarning$1(_s8_).withName$1("selector-replace"), $.$get$_unify0().withDeprecationWarning$1(_s8_).withName$1("selector-unify")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module9", "$get$module9", () => A.BuiltInModule$0("selector", A._setArrayType([$.$get$_isSuperselector0(), $.$get$_simpleSelectors0(), $.$get$_parse0(), $.$get$_nest0(), $.$get$_append1(), $.$get$_extend0(), $.$get$_replace0(), $.$get$_unify0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_nest0", "$get$_nest0", () => A._function8("nest", "$selectors...", new A._nest_closure0())); + _lazyFinal($, "_append2", "$get$_append1", () => A._function8("append", "$selectors...", new A._append_closure1())); + _lazyFinal($, "_extend0", "$get$_extend0", () => A._function8("extend", "$selector, $extendee, $extender", new A._extend_closure0())); + _lazyFinal($, "_replace0", "$get$_replace0", () => A._function8("replace", "$selector, $original, $replacement", new A._replace_closure0())); + _lazyFinal($, "_unify0", "$get$_unify0", () => A._function8("unify", "$selector1, $selector2", new A._unify_closure0())); + _lazyFinal($, "_isSuperselector0", "$get$_isSuperselector0", () => A._function8("is-superselector", "$super, $sub", new A._isSuperselector_closure0())); + _lazyFinal($, "_simpleSelectors0", "$get$_simpleSelectors0", () => A._function8("simple-selectors", "$selector", new A._simpleSelectors_closure0())); + _lazyFinal($, "_parse1", "$get$_parse0", () => A._function8("parse", "$selector", new A._parse_closure0())); + _lazyFinal($, "_knownCompatibilitiesByUnit0", "$get$_knownCompatibilitiesByUnit0", () => { + var _i, set, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); + for (_i = 0; _i < 5; ++_i) { + set = B.List_Eeh[_i]; + for (t2 = set.get$iterator(set); t2.moveNext$0();) + t1.$indexSet(0, t2.get$current(0), set); + } + return t1; + }); + _lazyFinal($, "bogusSpan0", "$get$bogusSpan0", () => A.SourceFile$decoded(A._setArrayType([], type$.JSArray_int), null).span$1(0, 0)); + _lazyFinal($, "_random2", "$get$_random1", () => A.Random_Random()); + _lazy($, "_previousUniqueId0", "$get$_previousUniqueId0", () => $.$get$_random1().nextInt$1(A._asInt(A.pow(36, 6)))); + _lazyFinal($, "global12", "$get$global11", () => { + var _s6_ = "string"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote0().withDeprecationWarning$1(_s6_), $.$get$_quote0().withDeprecationWarning$1(_s6_), $.$get$_toUpperCase0().withDeprecationWarning$1(_s6_), $.$get$_toLowerCase0().withDeprecationWarning$1(_s6_), $.$get$_uniqueId0().withDeprecationWarning$1(_s6_), $.$get$_length1().withDeprecationWarning$1(_s6_).withName$1("str-length"), $.$get$_insert0().withDeprecationWarning$1(_s6_).withName$1("str-insert"), $.$get$_index1().withDeprecationWarning$1(_s6_).withName$1("str-index"), $.$get$_slice0().withDeprecationWarning$1(_s6_).withName$1("str-slice")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module10", "$get$module10", () => A.BuiltInModule$0("string", A._setArrayType([$.$get$_unquote0(), $.$get$_quote0(), $.$get$_toUpperCase0(), $.$get$_toLowerCase0(), $.$get$_length1(), $.$get$_insert0(), $.$get$_index1(), $.$get$_slice0(), $.$get$_uniqueId0(), A._function7("split", "$string, $separator, $limit: null", new A.module_closure25())], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_unquote0", "$get$_unquote0", () => A._function7("unquote", "$string", new A._unquote_closure0())); + _lazyFinal($, "_quote0", "$get$_quote0", () => A._function7("quote", "$string", new A._quote_closure0())); + _lazyFinal($, "_length2", "$get$_length1", () => A._function7("length", "$string", new A._length_closure1())); + _lazyFinal($, "_insert0", "$get$_insert0", () => A._function7("insert", "$string, $insert, $index", new A._insert_closure0())); + _lazyFinal($, "_index2", "$get$_index1", () => A._function7("index", "$string, $substring", new A._index_closure1())); + _lazyFinal($, "_slice0", "$get$_slice0", () => A._function7("slice", "$string, $start-at, $end-at: -1", new A._slice_closure0())); + _lazyFinal($, "_toUpperCase0", "$get$_toUpperCase0", () => A._function7("to-upper-case", "$string", new A._toUpperCase_closure0())); + _lazyFinal($, "_toLowerCase0", "$get$_toLowerCase0", () => A._function7("to-lower-case", "$string", new A._toLowerCase_closure0())); + _lazyFinal($, "_uniqueId0", "$get$_uniqueId0", () => A._function7("unique-id", "", new A._uniqueId_closure0())); + _lazyFinal($, "stringClass", "$get$stringClass", () => new A.stringClass_closure().call$0()); + _lazyFinal($, "legacyStringClass", "$get$legacyStringClass", () => { + var t1 = A.createJSClass("sass.types.String", new A.legacyStringClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyStringClass_closure0(), "setValue", new A.legacyStringClass_closure1()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "_emptyQuoted0", "$get$_emptyQuoted0", () => A.SassString$0("", true)); + _lazyFinal($, "_emptyUnquoted0", "$get$_emptyUnquoted0", () => A.SassString$0("", false)); + _lazyFinal($, "_urlSchemeRegExp", "$get$_urlSchemeRegExp", () => A.RegExp_RegExp("^[a-z0-9+.-]+$", false)); + _lazyFinal($, "_jsThrow0", "$get$_jsThrow", () => new self.Function("error", "throw error;")); + _lazyFinal($, "_isUndefined", "$get$_isUndefined", () => new self.Function("value", "return value === undefined;")); + _lazyFinal($, "_isNull", "$get$_isNull", () => new self.Function("value", "return value === null;")); + _lazyFinal($, "_noSourceUrl0", "$get$_noSourceUrl0", () => A.Uri_parse("-")); + _lazyFinal($, "_traces0", "$get$_traces0", () => A.Expando$()); + _lazyFinal($, "valueClass", "$get$valueClass", () => new A.valueClass_closure().call$0()); + })(); + (function nativeSupport() { + !function() { + var intern = function(s) { + var o = {}; + o[s] = 1; + return Object.keys(hunkHelpers.convertToFastObject(o))[0]; + }; + init.getIsolateTag = function(name) { + return intern("___dart_" + name + init.isolateTag); + }; + var tableProperty = "___dart_isolate_tags_"; + var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null)); + var rootProperty = "_ZxYxX"; + for (var i = 0;; i++) { + var property = intern(rootProperty + "_" + i + "_"); + if (!(property in usedProperties)) { + usedProperties[property] = 1; + init.isolateTag = property; + break; + } + } + init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); + }(); + hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: A.NativeByteBuffer, ArrayBufferView: A.NativeTypedData, DataView: A.NativeByteData, Float32Array: A.NativeFloat32List, Float64Array: A.NativeFloat64List, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List}); + hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, ArrayBufferView: false, DataView: true, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false}); + A.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; + })(); + Function.prototype.call$0 = function() { + return this(); + }; + Function.prototype.call$1 = function(a) { + return this(a); + }; + Function.prototype.call$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$3$1 = function(a) { + return this(a); + }; + Function.prototype.call$2$1 = function(a) { + return this(a); + }; + Function.prototype.call$1$1 = function(a) { + return this(a); + }; + Function.prototype.call$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$4 = function(a, b, c, d) { + return this(a, b, c, d); + }; + Function.prototype.call$3$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$2$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$5 = function(a, b, c, d, e) { + return this(a, b, c, d, e); + }; + Function.prototype.call$6 = function(a, b, c, d, e, f) { + return this(a, b, c, d, e, f); + }; + Function.prototype.call$2$0 = function() { + return this(); + }; + Function.prototype.call$1$0 = function() { + return this(); + }; + Function.prototype.call$1$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$2$3 = function(a, b, c) { + return this(a, b, c); + }; + convertAllToFastObject(holders); + convertToFastObject($); + (function(callback) { + if (typeof document === "undefined") { + callback(null); + return; + } + if (typeof document.currentScript != "undefined") { + callback(document.currentScript); + return; + } + var scripts = document.scripts; + function onLoad(event) { + for (var i = 0; i < scripts.length; ++i) { + scripts[i].removeEventListener("load", onLoad, false); + } + callback(event.target); + } + for (var i = 0; i < scripts.length; ++i) { + scripts[i].addEventListener("load", onLoad, false); + } + })(function(currentScript) { + init.currentScript = currentScript; + var callMain = A.main2; + if (typeof dartMainRunner === "function") { + dartMainRunner(callMain, []); + } else { + callMain([]); + } + }); +})(); +} diff --git a/node_modules/sass/sass.default.cjs b/node_modules/sass/sass.default.cjs new file mode 100644 index 0000000..94d102a --- /dev/null +++ b/node_modules/sass/sass.default.cjs @@ -0,0 +1,8 @@ +require('./sass.dart.js'); +const library = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; +library.load({ + immutable: require("immutable"), +}); + +module.exports = library; diff --git a/node_modules/sass/sass.default.js b/node_modules/sass/sass.default.js new file mode 100644 index 0000000..4a0540a --- /dev/null +++ b/node_modules/sass/sass.default.js @@ -0,0 +1,48 @@ +import * as immutable from "immutable" +import "./sass.dart.js"; + +const _cliPkgLibrary = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; +const _cliPkgExports = {}; +_cliPkgLibrary.load({immutable}, _cliPkgExports); + +export const compile = _cliPkgExports.compile; +export const compileAsync = _cliPkgExports.compileAsync; +export const compileString = _cliPkgExports.compileString; +export const compileStringAsync = _cliPkgExports.compileStringAsync; +export const initCompiler = _cliPkgExports.initCompiler; +export const initAsyncCompiler = _cliPkgExports.initAsyncCompiler; +export const Compiler = _cliPkgExports.Compiler; +export const AsyncCompiler = _cliPkgExports.AsyncCompiler; +export const Logger = _cliPkgExports.Logger; +export const SassArgumentList = _cliPkgExports.SassArgumentList; +export const SassBoolean = _cliPkgExports.SassBoolean; +export const SassCalculation = _cliPkgExports.SassCalculation; +export const CalculationOperation = _cliPkgExports.CalculationOperation; +export const CalculationInterpolation = _cliPkgExports.CalculationInterpolation; +export const SassColor = _cliPkgExports.SassColor; +export const SassFunction = _cliPkgExports.SassFunction; +export const SassList = _cliPkgExports.SassList; +export const SassMap = _cliPkgExports.SassMap; +export const SassMixin = _cliPkgExports.SassMixin; +export const SassNumber = _cliPkgExports.SassNumber; +export const SassString = _cliPkgExports.SassString; +export const Value = _cliPkgExports.Value; +export const CustomFunction = _cliPkgExports.CustomFunction; +export const ListSeparator = _cliPkgExports.ListSeparator; +export const sassFalse = _cliPkgExports.sassFalse; +export const sassNull = _cliPkgExports.sassNull; +export const sassTrue = _cliPkgExports.sassTrue; +export const Exception = _cliPkgExports.Exception; +export const PromiseOr = _cliPkgExports.PromiseOr; +export const info = _cliPkgExports.info; +export const render = _cliPkgExports.render; +export const renderSync = _cliPkgExports.renderSync; +export const TRUE = _cliPkgExports.TRUE; +export const FALSE = _cliPkgExports.FALSE; +export const NULL = _cliPkgExports.NULL; +export const types = _cliPkgExports.types; +export const NodePackageImporter = _cliPkgExports.NodePackageImporter; +export const deprecations = _cliPkgExports.deprecations; +export const Version = _cliPkgExports.Version; +export const parser_ = _cliPkgExports.parser_; diff --git a/node_modules/sass/sass.js b/node_modules/sass/sass.js new file mode 100644 index 0000000..992dbb5 --- /dev/null +++ b/node_modules/sass/sass.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node + +require('./sass.dart.js'); +var library = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; + +library.load({ + readline: require("readline"), + chokidar: require("chokidar"), + util: require("util"), + stream: require("stream"), + nodeModule: require("module"), + fs: require("fs"), + immutable: require("immutable"), +}); + +library.cli_pkg_main_0_(process.argv.slice(2)); diff --git a/node_modules/sass/sass.node.js b/node_modules/sass/sass.node.js new file mode 100644 index 0000000..204ae2c --- /dev/null +++ b/node_modules/sass/sass.node.js @@ -0,0 +1,12 @@ +require('./sass.dart.js'); +const library = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; +library.load({ + util: require("util"), + stream: require("stream"), + nodeModule: require("module"), + fs: require("fs"), + immutable: require("immutable"), +}); + +module.exports = library; diff --git a/node_modules/sass/sass.node.mjs b/node_modules/sass/sass.node.mjs new file mode 100644 index 0000000..dfeadc4 --- /dev/null +++ b/node_modules/sass/sass.node.mjs @@ -0,0 +1,214 @@ +import cjs from "./sass.node.js"; + +export const compile = cjs.compile; +export const compileAsync = cjs.compileAsync; +export const compileString = cjs.compileString; +export const compileStringAsync = cjs.compileStringAsync; +export const initCompiler = cjs.initCompiler; +export const initAsyncCompiler = cjs.initAsyncCompiler; +export const Compiler = cjs.Compiler; +export const AsyncCompiler = cjs.AsyncCompiler; +export const Logger = cjs.Logger; +export const SassArgumentList = cjs.SassArgumentList; +export const SassBoolean = cjs.SassBoolean; +export const SassCalculation = cjs.SassCalculation; +export const CalculationOperation = cjs.CalculationOperation; +export const CalculationInterpolation = cjs.CalculationInterpolation; +export const SassColor = cjs.SassColor; +export const SassFunction = cjs.SassFunction; +export const SassList = cjs.SassList; +export const SassMap = cjs.SassMap; +export const SassMixin = cjs.SassMixin; +export const SassNumber = cjs.SassNumber; +export const SassString = cjs.SassString; +export const Value = cjs.Value; +export const CustomFunction = cjs.CustomFunction; +export const ListSeparator = cjs.ListSeparator; +export const sassFalse = cjs.sassFalse; +export const sassNull = cjs.sassNull; +export const sassTrue = cjs.sassTrue; +export const Exception = cjs.Exception; +export const PromiseOr = cjs.PromiseOr; +export const info = cjs.info; +export const render = cjs.render; +export const renderSync = cjs.renderSync; +export const TRUE = cjs.TRUE; +export const FALSE = cjs.FALSE; +export const NULL = cjs.NULL; +export const types = cjs.types; +export const NodePackageImporter = cjs.NodePackageImporter; +export const deprecations = cjs.deprecations; +export const Version = cjs.Version; +export const parser_ = cjs.parser_; + +let printedDefaultExportDeprecation = false; +function defaultExportDeprecation() { + if (printedDefaultExportDeprecation) return; + printedDefaultExportDeprecation = true; + console.error( + "`import sass from 'sass'` is deprecated.\n" + + "Please use `import * as sass from 'sass'` instead."); +} + +export default { + get compile() { + defaultExportDeprecation(); + return cjs.compile; + }, + get compileAsync() { + defaultExportDeprecation(); + return cjs.compileAsync; + }, + get compileString() { + defaultExportDeprecation(); + return cjs.compileString; + }, + get compileStringAsync() { + defaultExportDeprecation(); + return cjs.compileStringAsync; + }, + get initCompiler() { + defaultExportDeprecation(); + return cjs.initCompiler; + }, + get initAsyncCompiler() { + defaultExportDeprecation(); + return cjs.initAsyncCompiler; + }, + get Compiler() { + defaultExportDeprecation(); + return cjs.Compiler; + }, + get AsyncCompiler() { + defaultExportDeprecation(); + return cjs.AsyncCompiler; + }, + get Logger() { + defaultExportDeprecation(); + return cjs.Logger; + }, + get SassArgumentList() { + defaultExportDeprecation(); + return cjs.SassArgumentList; + }, + get SassBoolean() { + defaultExportDeprecation(); + return cjs.SassBoolean; + }, + get SassCalculation() { + defaultExportDeprecation(); + return cjs.SassCalculation; + }, + get CalculationOperation() { + defaultExportDeprecation(); + return cjs.CalculationOperation; + }, + get CalculationInterpolation() { + defaultExportDeprecation(); + return cjs.CalculationInterpolation; + }, + get SassColor() { + defaultExportDeprecation(); + return cjs.SassColor; + }, + get SassFunction() { + defaultExportDeprecation(); + return cjs.SassFunction; + }, + get SassList() { + defaultExportDeprecation(); + return cjs.SassList; + }, + get SassMap() { + defaultExportDeprecation(); + return cjs.SassMap; + }, + get SassMixin() { + defaultExportDeprecation(); + return cjs.SassMixin; + }, + get SassNumber() { + defaultExportDeprecation(); + return cjs.SassNumber; + }, + get SassString() { + defaultExportDeprecation(); + return cjs.SassString; + }, + get Value() { + defaultExportDeprecation(); + return cjs.Value; + }, + get CustomFunction() { + defaultExportDeprecation(); + return cjs.CustomFunction; + }, + get ListSeparator() { + defaultExportDeprecation(); + return cjs.ListSeparator; + }, + get sassFalse() { + defaultExportDeprecation(); + return cjs.sassFalse; + }, + get sassNull() { + defaultExportDeprecation(); + return cjs.sassNull; + }, + get sassTrue() { + defaultExportDeprecation(); + return cjs.sassTrue; + }, + get Exception() { + defaultExportDeprecation(); + return cjs.Exception; + }, + get PromiseOr() { + defaultExportDeprecation(); + return cjs.PromiseOr; + }, + get info() { + defaultExportDeprecation(); + return cjs.info; + }, + get render() { + defaultExportDeprecation(); + return cjs.render; + }, + get renderSync() { + defaultExportDeprecation(); + return cjs.renderSync; + }, + get TRUE() { + defaultExportDeprecation(); + return cjs.TRUE; + }, + get FALSE() { + defaultExportDeprecation(); + return cjs.FALSE; + }, + get NULL() { + defaultExportDeprecation(); + return cjs.NULL; + }, + get types() { + defaultExportDeprecation(); + return cjs.types; + }, + get NodePackageImporter() { + defaultExportDeprecation(); + return cjs.NodePackageImporter; + }, + get deprecations() { + defaultExportDeprecation(); + return cjs.deprecations; + }, + get Version() { + defaultExportDeprecation(); + return cjs.Version; + }, + get parser_() { + defaultExportDeprecation(); + return cjs.parser_; + }, +}; diff --git a/node_modules/sass/types/compile.d.ts b/node_modules/sass/types/compile.d.ts new file mode 100644 index 0000000..872754c --- /dev/null +++ b/node_modules/sass/types/compile.d.ts @@ -0,0 +1,342 @@ +import {RawSourceMap} from 'source-map-js'; + +import {Options, StringOptions} from './options'; + +/** + * The result of compiling Sass to CSS. Returned by {@link compile}, {@link + * compileAsync}, {@link compileString}, and {@link compileStringAsync}. + * + * @category Compile + */ +export interface CompileResult { + /** + * The generated CSS. + * + * Note that this *never* includes a `sourceMapUrl` comment—it's up to the + * caller to determine where to save the source map and how to link to it from + * the stylesheet. + */ + css: string; + + /** + * The canonical URLs of all the stylesheets that were loaded during the + * Sass compilation. The order of these URLs is not guaranteed. + */ + loadedUrls: URL[]; + + /** + * The object representation of the source map that maps locations in the + * generated CSS back to locations in the Sass source code. + * + * This typically uses absolute `file:` URLs to refer to Sass files, although + * this can be controlled by having a custom {@link Importer} return {@link + * ImporterResult.sourceMapUrl}. + * + * This is set if and only if {@link Options.sourceMap} is `true`. + */ + sourceMap?: RawSourceMap; +} + +/** + * The result of creating a synchronous compiler. Returned by + * {@link initCompiler}. + * + * @category Compile + */ +export class Compiler { + /** + * Throws an error if constructed directly, instead of via + * {@link initCompiler}. + */ + private constructor(); + + /** + * The {@link compile} method exposed through a Compiler instance while it is + * active. If this is called after {@link dispose} on the Compiler + * instance, an error will be thrown. + * + * During the Compiler instance's lifespan, given the same input, this will + * return an identical result to the {@link compile} method exposed at the + * module root. + */ + compile(path: string, options?: Options<'sync'>): CompileResult; + + /** + * The {@link compileString} method exposed through a Compiler instance while + * it is active. If this is called after {@link dispose} on the Compiler + * instance, an error will be thrown. + * + * During the Compiler instance's lifespan, given the same input, this will + * return an identical result to the {@link compileString} method exposed at + * the module root. + */ + compileString(source: string, options?: StringOptions<'sync'>): CompileResult; + + /** + * Ends the lifespan of this Compiler instance. After this is invoked, all + * calls to the Compiler instance's {@link compile} or {@link compileString} + * methods will result in an error. + */ + dispose(): void; +} + +/** + * The result of creating an asynchronous compiler. Returned by + * {@link initAsyncCompiler}. + * + * @category Compile + */ +export class AsyncCompiler { + /** + * Throws an error if constructed directly, instead of via + * {@link initAsyncCompiler}. + */ + private constructor(); + + /** + * The {@link compileAsync} method exposed through an Async Compiler instance + * while it is active. If this is called after {@link dispose} on the Async + * Compiler instance, an error will be thrown. + * + * During the Async Compiler instance's lifespan, given the same input, this + * will return an identical result to the {@link compileAsync} method exposed + * at the module root. + */ + compileAsync( + path: string, + options?: Options<'async'> + ): Promise; + + /** + * The {@link compileStringAsync} method exposed through an Async Compiler + * instance while it is active. If this is called after {@link dispose} on the + * Async Compiler instance, an error will be thrown. + * + * During the Async Compiler instance's lifespan, given the same input, this + * will return an identical result to the {@link compileStringAsync} method + * exposed at the module root. + */ + compileStringAsync( + source: string, + options?: StringOptions<'async'> + ): Promise; + + /** + * Ends the lifespan of this Async Compiler instance. After this is invoked, + * all subsequent calls to the Compiler instance's `compileAsync` or + * `compileStringAsync` methods will result in an error. + * + * Any compilations that are submitted before `dispose` will not be cancelled, + * and will be allowed to settle. + * + * After all compilations have been settled and Sass completes any internal + * task cleanup, `dispose` will resolve its promise. + */ + dispose(): Promise; +} + +/** + * Synchronously compiles the Sass file at `path` to CSS. If it succeeds it + * returns a {@link CompileResult}, and if it fails it throws an {@link + * Exception}. + * + * This only allows synchronous {@link Importer}s and {@link CustomFunction}s. + * + * **Heads up!** When using the [sass-embedded] npm package for single + * compilations, **{@link compileAsync} is almost always faster than + * {@link compile}**, due to the overhead of emulating synchronous messaging + * with worker threads and concurrent compilations being blocked on main thread. + * + * If you are running multiple compilations with the [sass-embedded] npm + * package, using a {@link Compiler} will provide some speed improvements over + * the module-level methods, and an {@link AsyncCompiler} will be much faster. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.compile("style.scss"); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compile(path: string, options?: Options<'sync'>): CompileResult; + +/** + * Asynchronously compiles the Sass file at `path` to CSS. Returns a promise + * that resolves with a {@link CompileResult} if it succeeds and rejects with an + * {@link Exception} if it fails. + * + * This only allows synchronous or asynchronous {@link Importer}s and + * {@link CustomFunction}s. + * + * **Heads up!** When using the `sass` npm package, **{@link compile} is almost + * twice as fast as {@link compileAsync}**, due to the overhead of making the + * entire evaluation process asynchronous. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = await sass.compileAsync("style.scss"); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileAsync( + path: string, + options?: Options<'async'> +): Promise; + +/** + * Synchronously compiles a stylesheet whose contents is `source` to CSS. If it + * succeeds it returns a {@link CompileResult}, and if it fails it throws an + * {@link Exception}. + * + * This only allows synchronous {@link Importer}s and {@link CustomFunction}s. + * + * **Heads up!** When using the [sass-embedded] npm package for single + * compilations, **{@link compileStringAsync} is almost always faster than + * {@link compileString}**, due to the overhead of emulating synchronous + * messaging with worker threads and concurrent compilations being blocked on + * main thread. + * + * If you are running multiple compilations with the [sass-embedded] npm + * package, using a {@link Compiler} will provide some speed improvements over + * the module-level methods, and an {@link AsyncCompiler} will be much faster. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.compileString(` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileString( + source: string, + options?: StringOptions<'sync'> +): CompileResult; + +/** + * Asynchronously compiles a stylesheet whose contents is `source` to CSS. + * Returns a promise that resolves with a {@link CompileResult} if it succeeds + * and rejects with an {@link Exception} if it fails. + * + * This only allows synchronous or asynchronous {@link Importer}s and {@link + * CustomFunction}s. + * + * **Heads up!** When using the `sass` npm package, **{@link compileString} is + * almost twice as fast as {@link compileStringAsync}**, due to the overhead + * of making the entire evaluation process asynchronous. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = await sass.compileStringAsync(` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileStringAsync( + source: string, + options?: StringOptions<'async'> +): Promise; + +/** + * Creates a synchronous {@link Compiler}. Each compiler instance exposes the + * {@link compile} and {@link compileString} methods within the lifespan of the + * Compiler. Given identical input, these methods will return results identical + * to their counterparts exposed at the module root. To use asynchronous + * compilation, use {@link initAsyncCompiler}. + * + * When calling the compile functions multiple times, using a compiler instance + * with the [sass-embedded] npm package is much faster than using the top-level + * compilation methods or the [sass] npm package. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * [sass]: https://www.npmjs.com/package/sass + * + * @example + * + * ```js + * const sass = require('sass'); + * function setup() { + * const compiler = sass.initCompiler(); + * const result1 = compiler.compileString('a {b: c}').css; + * const result2 = compiler.compileString('a {b: c}').css; + * compiler.dispose(); + * + * // throws error + * const result3 = sass.compileString('a {b: c}').css; + * } + * ``` + * @category Compile + * @compatibility dart: "1.70.0", node: false + */ +export function initCompiler(): Compiler; + +/** + * Creates an asynchronous {@link AsyncCompiler}. Each compiler + * instance exposes the {@link compileAsync} and {@link compileStringAsync} + * methods within the lifespan of the Compiler. Given identical input, these + * methods will return results identical to their counterparts exposed at the + * module root. To use synchronous compilation, use {@link initCompiler}; + * + * When calling the compile functions multiple times, using a compiler instance + * with the [sass-embedded] npm package is much faster than using the top-level + * compilation methods or the [sass] npm package. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * [sass]: https://www.npmjs.com/package/sass + * + * @example + * + * ```js + * const sass = require('sass'); + * async function setup() { + * const compiler = await sass.initAsyncCompiler(); + * const result1 = await compiler.compileStringAsync('a {b: c}').css; + * const result2 = await compiler.compileStringAsync('a {b: c}').css; + * await compiler.dispose(); + * + * // throws error + * const result3 = await sass.compileStringAsync('a {b: c}').css; + * } + * ``` + * @category Compile + * @compatibility dart: "1.70.0", node: false + */ +export function initAsyncCompiler(): Promise; diff --git a/node_modules/sass/types/deprecations.d.ts b/node_modules/sass/types/deprecations.d.ts new file mode 100644 index 0000000..8bbbeb8 --- /dev/null +++ b/node_modules/sass/types/deprecations.d.ts @@ -0,0 +1,260 @@ +/** + * All of the deprecation types currently used by Sass. + * + * Any of these IDs or the deprecation objects they point to can be passed to + * `fatalDeprecations`, `futureDeprecations`, or `silenceDeprecations`. + */ +export interface Deprecations { + // START AUTOGENERATED LIST + // Checksum: 0243e0f7ee85127d6e1bda5c08e363509959e758 + + /** + * Deprecation for passing a string directly to meta.call(). + * + * This deprecation was active in the first version of Dart Sass. + */ + 'call-string': Deprecation<'call-string'>; + + /** + * Deprecation for @elseif. + * + * This deprecation became active in Dart Sass 1.3.2. + */ + elseif: Deprecation<'elseif'>; + + /** + * Deprecation for @-moz-document. + * + * This deprecation became active in Dart Sass 1.7.2. + */ + 'moz-document': Deprecation<'moz-document'>; + + /** + * Deprecation for imports using relative canonical URLs. + * + * This deprecation became active in Dart Sass 1.14.2. + */ + 'relative-canonical': Deprecation<'relative-canonical'>; + + /** + * Deprecation for declaring new variables with !global. + * + * This deprecation became active in Dart Sass 1.17.2. + */ + 'new-global': Deprecation<'new-global'>; + + /** + * Deprecation for using color module functions in place of plain CSS functions. + * + * This deprecation became active in Dart Sass 1.23.0. + */ + 'color-module-compat': Deprecation<'color-module-compat'>; + + /** + * Deprecation for / operator for division. + * + * This deprecation became active in Dart Sass 1.33.0. + */ + 'slash-div': Deprecation<'slash-div'>; + + /** + * Deprecation for leading, trailing, and repeated combinators. + * + * This deprecation became active in Dart Sass 1.54.0. + */ + 'bogus-combinators': Deprecation<'bogus-combinators'>; + + /** + * Deprecation for ambiguous + and - operators. + * + * This deprecation became active in Dart Sass 1.55.0. + */ + 'strict-unary': Deprecation<'strict-unary'>; + + /** + * Deprecation for passing invalid units to built-in functions. + * + * This deprecation became active in Dart Sass 1.56.0. + */ + 'function-units': Deprecation<'function-units'>; + + /** + * Deprecation for using !default or !global multiple times for one variable. + * + * This deprecation became active in Dart Sass 1.62.0. + */ + 'duplicate-var-flags': Deprecation<'duplicate-var-flags'>; + + /** + * Deprecation for passing null as alpha in the JS API. + * + * This deprecation became active in Dart Sass 1.62.3. + */ + 'null-alpha': Deprecation<'null-alpha'>; + + /** + * Deprecation for passing percentages to the Sass abs() function. + * + * This deprecation became active in Dart Sass 1.65.0. + */ + 'abs-percent': Deprecation<'abs-percent'>; + + /** + * Deprecation for using the current working directory as an implicit load path. + * + * This deprecation became active in Dart Sass 1.73.0. + */ + 'fs-importer-cwd': Deprecation<'fs-importer-cwd'>; + + /** + * Deprecation for function and mixin names beginning with --. + * + * This deprecation became active in Dart Sass 1.76.0. + */ + 'css-function-mixin': Deprecation<'css-function-mixin'>; + + /** + * Deprecation for declarations after or between nested rules. + * + * This deprecation became active in Dart Sass 1.77.7. + */ + 'mixed-decls': Deprecation<'mixed-decls'>; + + /** + * Deprecation for meta.feature-exists + * + * This deprecation became active in Dart Sass 1.78.0. + */ + 'feature-exists': Deprecation<'feature-exists'>; + + /** + * Deprecation for certain uses of built-in sass:color functions. + * + * This deprecation became active in Dart Sass 1.79.0. + */ + 'color-4-api': Deprecation<'color-4-api'>; + + /** + * Deprecation for using global color functions instead of sass:color. + * + * This deprecation became active in Dart Sass 1.79.0. + */ + 'color-functions': Deprecation<'color-functions'>; + + /** + * Deprecation for legacy JS API. + * + * This deprecation became active in Dart Sass 1.79.0. + */ + 'legacy-js-api': Deprecation<'legacy-js-api'>; + + /** + * Deprecation for @import rules. + * + * This deprecation is not yet active, but will be soon. + */ + import: Deprecation<'import'>; + + /** + * Deprecation for global built-in functions that are available in sass: modules. + * + * This deprecation is not yet active, but will be soon. + */ + 'global-builtin': Deprecation<'global-builtin'>; + + // END AUTOGENERATED LIST + + /** + * Used for any user-emitted deprecation warnings. + */ + 'user-authored': Deprecation<'user-authored', 'user'>; +} + +/** + * Either a deprecation or its ID, either of which can be passed to any of + * the relevant compiler options. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export type DeprecationOrId = Deprecation | keyof Deprecations; + +/** + * The possible statuses that each deprecation can have. + * + * "active" deprecations are currently emitting deprecation warnings. + * "future" deprecations are not yet active, but will be in the future. + * "obsolete" deprecations were once active, but no longer are. + * + * The only "user" deprecation is "user-authored", which is used for deprecation + * warnings coming from user code. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export type DeprecationStatus = 'active' | 'user' | 'future' | 'obsolete'; + +/** + * A deprecated feature in the language. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export interface Deprecation< + id extends keyof Deprecations = keyof Deprecations, + status extends DeprecationStatus = DeprecationStatus +> { + /** The unique ID of this deprecation. */ + id: id; + + /** The current status of this deprecation. */ + status: status; + + /** A human-readable description of this deprecation. */ + description?: string; + + /** The version this deprecation first became active in. */ + deprecatedIn: status extends 'future' | 'user' ? null : Version; + + /** The version this deprecation became obsolete in. */ + obsoleteIn: status extends 'obsolete' ? Version : null; +} + +/** + * A semantic version of the compiler. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export class Version { + /** + * Constructs a new version. + * + * All components must be non-negative integers. + * + * @param major - The major version. + * @param minor - The minor version. + * @param patch - The patch version. + */ + constructor(major: number, minor: number, patch: number); + readonly major: number; + readonly minor: number; + readonly patch: number; + + /** + * Parses a version from a string. + * + * This throws an error if a valid version can't be parsed. + * + * @param version - A string in the form "major.minor.patch". + */ + static parse(version: string): Version; +} + +/** + * An object containing all deprecation types. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export const deprecations: Deprecations; diff --git a/node_modules/sass/types/exception.d.ts b/node_modules/sass/types/exception.d.ts new file mode 100644 index 0000000..616d652 --- /dev/null +++ b/node_modules/sass/types/exception.d.ts @@ -0,0 +1,41 @@ +import {SourceSpan} from './logger'; + +/** + * An exception thrown because a Sass compilation failed. + * + * @category Other + */ +export class Exception extends Error { + private constructor(); + + /** + * A human-friendly representation of the exception. + * + * Because many tools simply print `Error.message` directly, this includes not + * only the textual description of what went wrong (the {@link sassMessage}) + * but also an indication of where in the Sass stylesheet the error occurred + * (the {@link span}) and the Sass stack trace at the point of error (the + * {@link sassStack}). + */ + message: string; + + /** + * A textual description of what went wrong. + * + * Unlike {@link message}, this does *not* include representations of {@link + * span} or {@link sassStack}. + */ + readonly sassMessage: string; + + /** + * A human-friendly representation of the Sass stack trace at the point of + * error. + */ + readonly sassStack: string; + + /** The location the error occurred in the Sass file that triggered it. */ + readonly span: SourceSpan; + + /** Returns the same string as {@link message}. */ + toString(): string; +} diff --git a/node_modules/sass/types/importer.d.ts b/node_modules/sass/types/importer.d.ts new file mode 100644 index 0000000..dca4266 --- /dev/null +++ b/node_modules/sass/types/importer.d.ts @@ -0,0 +1,465 @@ +import {Syntax} from './options'; +import {PromiseOr} from './util/promise_or'; + +/** + * Contextual information passed to {@link Importer.canonicalize} and {@link + * FileImporter.findFileUrl}. Not all importers will need this information to + * resolve loads, but some may find it useful. + */ +export interface CanonicalizeContext { + /** + * Whether this is being invoked because of a Sass + * `@import` rule, as opposed to a `@use` or `@forward` rule. + * + * This should *only* be used for determining whether or not to load + * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). + */ + fromImport: boolean; + + /** + * The canonical URL of the file that contains the load, if that information + * is available. + * + * For an {@link Importer}, this is only passed when the `url` parameter is a + * relative URL _or_ when its [URL scheme] is included in {@link + * Importer.nonCanonicalScheme}. This ensures that canonical URLs are always + * resolved the same way regardless of context. + * + * [URL scheme]: https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#scheme + * + * For a {@link FileImporter}, this is always available as long as Sass knows + * the canonical URL of the containing file. + */ + containingUrl: URL | null; +} + +/** + * A special type of importer that redirects all loads to existing files on + * disk. Although this is less powerful than a full {@link Importer}, it + * automatically takes care of Sass features like resolving partials and file + * extensions and of loading the file from disk. + * + * Like all importers, this implements custom Sass loading logic for [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed + * to {@link Options.importers} or {@link StringOptions.importer}. + * + * @typeParam sync - A `FileImporter<'sync'>`'s {@link findFileUrl} must return + * synchronously, but in return it can be passed to {@link compile} and {@link + * compileString} in addition to {@link compileAsync} and {@link + * compileStringAsync}. + * + * A `FileImporter<'async'>`'s {@link findFileUrl} may either return + * synchronously or asynchronously, but it can only be used with {@link + * compileAsync} and {@link compileStringAsync}. + * + * @example + * + * ```js + * const {pathToFileURL} = require('url'); + * + * sass.compile('style.scss', { + * importers: [{ + * // An importer that redirects relative URLs starting with "~" to + * // `node_modules`. + * findFileUrl(url) { + * if (!url.startsWith('~')) return null; + * return new URL(url.substring(1), pathToFileURL('node_modules')); + * } + * }] + * }); + * ``` + * + * @category Importer + */ +export interface FileImporter< + sync extends 'sync' | 'async' = 'sync' | 'async' +> { + /** + * A callback that's called to partially resolve a load (such as + * [`@use`](https://sass-lang.com/documentation/at-rules/use) or + * [`@import`](https://sass-lang.com/documentation/at-rules/import)) to a file + * on disk. + * + * Unlike an {@link Importer}, the compiler will automatically handle relative + * loads for a {@link FileImporter}. See {@link Options.importers} for more + * details on the way loads are resolved. + * + * @param url - The loaded URL. Since this might be relative, it's represented + * as a string rather than a {@link URL} object. + * + * @returns An absolute `file:` URL if this importer recognizes the `url`. + * This may be only partially resolved: the compiler will automatically look + * for [partials](https://sass-lang.com/documentation/at-rules/use#partials), + * [index files](https://sass-lang.com/documentation/at-rules/use#index-files), + * and file extensions based on the returned URL. An importer may also return + * a fully resolved URL if it so chooses. + * + * If this importer doesn't recognize the URL, it should return `null` instead + * to allow other importers or {@link Options.loadPaths | load paths} to + * handle it. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link + * compile} or {@link compileString}. + * + * @throws any - If this importer recognizes `url` but determines that it's + * invalid, it may throw an exception that will be wrapped by Sass. If the + * exception object has a `message` property, it will be used as the wrapped + * exception's message; otherwise, the exception object's `toString()` will be + * used. This means it's safe for importers to throw plain strings. + */ + findFileUrl( + url: string, + context: CanonicalizeContext + ): PromiseOr; + + /** @hidden */ + canonicalize?: never; +} + +/** + * An object that implements custom Sass loading logic for [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed + * to {@link Options.importers} or {@link StringOptions.importer}. + * + * Importers that simply redirect to files on disk are encouraged to use the + * {@link FileImporter} interface instead. + * + * ### Resolving a Load + * + * This is the process of resolving a load using a custom importer: + * + * - The compiler encounters `@use "db:foo/bar/baz"`. + * - It calls {@link canonicalize} with `"db:foo/bar/baz"`. + * - {@link canonicalize} returns `new URL("db:foo/bar/baz/_index.scss")`. + * - If the compiler has already loaded a stylesheet with this canonical URL, it + * re-uses the existing module. + * - Otherwise, it calls {@link load} with `new + * URL("db:foo/bar/baz/_index.scss")`. + * - {@link load} returns an {@link ImporterResult} that the compiler uses as + * the contents of the module. + * + * See {@link Options.importers} for more details on the way loads are resolved + * using multiple importers and load paths. + * + * @typeParam sync - An `Importer<'sync'>`'s {@link canonicalize} and {@link + * load} must return synchronously, but in return it can be passed to {@link + * compile} and {@link compileString} in addition to {@link compileAsync} and + * {@link compileStringAsync}. + * + * An `Importer<'async'>`'s {@link canonicalize} and {@link load} may either + * return synchronously or asynchronously, but it can only be used with {@link + * compileAsync} and {@link compileStringAsync}. + * + * @example + * + * ```js + * sass.compile('style.scss', { + * // An importer for URLs like `bgcolor:orange` that generates a + * // stylesheet with the given background color. + * importers: [{ + * canonicalize(url) { + * if (!url.startsWith('bgcolor:')) return null; + * return new URL(url); + * }, + * load(canonicalUrl) { + * return { + * contents: `body {background-color: ${canonicalUrl.pathname}}`, + * syntax: 'scss' + * }; + * } + * }] + * }); + * ``` + * + * @category Importer + */ +export interface Importer { + /** + * If `url` is recognized by this importer, returns its canonical format. + * + * If Sass has already loaded a stylesheet with the returned canonical URL, it + * re-uses the existing parse tree (and the loaded module for `@use`). This + * means that importers **must ensure** that the same canonical URL always + * refers to the same stylesheet, *even across different importers*. As such, + * importers are encouraged to use unique URL schemes to disambiguate between + * one another. + * + * As much as possible, custom importers should canonicalize URLs the same way + * as the built-in filesystem importer: + * + * - The importer should look for stylesheets by adding the prefix `_` to the + * URL's basename, and by adding the extensions `.sass` and `.scss` if the + * URL doesn't already have one of those extensions. For example, if the + * URL was `foo/bar/baz`, the importer would look for: + * - `foo/bar/baz.sass` + * - `foo/bar/baz.scss` + * - `foo/bar/_baz.sass` + * - `foo/bar/_baz.scss` + * + * If the URL was `foo/bar/baz.scss`, the importer would just look for: + * - `foo/bar/baz.scss` + * - `foo/bar/_baz.scss` + * + * If the importer finds a stylesheet at more than one of these URLs, it + * should throw an exception indicating that the URL is ambiguous. Note that + * if the extension is explicitly specified, a stylesheet with the opposite + * extension is allowed to exist. + * + * - If none of the possible paths is valid, the importer should perform the + * same resolution on the URL followed by `/index`. In the example above, + * it would look for: + * - `foo/bar/baz/index.sass` + * - `foo/bar/baz/index.scss` + * - `foo/bar/baz/_index.sass` + * - `foo/bar/baz/_index.scss` + * + * As above, if the importer finds a stylesheet at more than one of these + * URLs, it should throw an exception indicating that the import is + * ambiguous. + * + * If no stylesheets are found, the importer should return `null`. + * + * Calling {@link canonicalize} multiple times with the same URL must return + * the same result. Calling {@link canonicalize} with a URL returned by a + * previous call to {@link canonicalize} must return that URL. + * + * Relative loads in stylesheets loaded from an importer are handled by + * resolving the loaded URL relative to the canonical URL of the stylesheet + * that contains it, and passing that URL back to the importer's {@link + * canonicalize} method. For example, suppose the "Resolving a Load" example + * {@link Importer | above} returned a stylesheet that contained `@use + * "mixins"`: + * + * - The compiler resolves the URL `mixins` relative to the current + * stylesheet's canonical URL `db:foo/bar/baz/_index.scss` to get + * `db:foo/bar/baz/mixins`. + * - It calls {@link canonicalize} with `"db:foo/bar/baz/mixins"`. + * - {@link canonicalize} returns `new URL("db:foo/bar/baz/_mixins.scss")`. + * + * Because of this, {@link canonicalize} must return a meaningful result when + * called with a URL relative to one returned by an earlier call to {@link + * canonicalize}. + * + * @param url - The loaded URL. Since this might be relative, it's represented + * as a string rather than a {@link URL} object. + * + * @returns An absolute URL if this importer recognizes the `url`, or `null` + * if it doesn't. If this returns `null`, other importers or {@link + * Options.loadPaths | load paths} may handle the load. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link + * compile} or {@link compileString}. + * + * @throws any - If this importer recognizes `url` but determines that it's + * invalid, it may throw an exception that will be wrapped by Sass. If the + * exception object has a `message` property, it will be used as the wrapped + * exception's message; otherwise, the exception object's `toString()` will be + * used. This means it's safe for importers to throw plain strings. + */ + canonicalize( + url: string, + context: CanonicalizeContext + ): PromiseOr; + + /** + * Loads the Sass text for the given `canonicalUrl`, or returns `null` if this + * importer can't find the stylesheet it refers to. + * + * @param canonicalUrl - The canonical URL of the stylesheet to load. This is + * guaranteed to come from a call to {@link canonicalize}, although not every + * call to {@link canonicalize} will result in a call to {@link load}. + * + * @returns The contents of the stylesheet at `canonicalUrl` if it can be + * loaded, or `null` if it can't. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link + * compile} or {@link compileString}. + * + * @throws any - If this importer finds a stylesheet at `url` but it fails to + * load for some reason, or if `url` is uniquely associated with this importer + * but doesn't refer to a real stylesheet, the importer may throw an exception + * that will be wrapped by Sass. If the exception object has a `message` + * property, it will be used as the wrapped exception's message; otherwise, + * the exception object's `toString()` will be used. This means it's safe for + * importers to throw plain strings. + */ + load(canonicalUrl: URL): PromiseOr; + + /** @hidden */ + findFileUrl?: never; + + /** + * A URL scheme or set of schemes (without the `:`) that this importer + * promises never to use for URLs returned by {@link canonicalize}. If it does + * return a URL with one of these schemes, that's an error. + * + * If this is set, any call to canonicalize for a URL with a non-canonical + * scheme will be passed {@link CanonicalizeContext.containingUrl} if it's + * known. + * + * These schemes may only contain lowercase ASCII letters, ASCII numerals, + * `+`, `-`, and `.`. They may not be empty. + */ + nonCanonicalScheme?: string | string[]; +} + +declare const nodePackageImporterKey: unique symbol; + +/** + * The built-in Node.js package importer. This loads pkg: URLs from node_modules + * according to the standard Node.js resolution algorithm. + * + * A Node.js package importer is exposed as a class that can be added to the + * `importers` option. + * + *```js + * const sass = require('sass'); + * sass.compileString('@use "pkg:vuetify', { + * importers: [new sass.NodePackageImporter()] + * }); + *``` + * + * ## Writing Sass packages + * + * Package authors can control what is exposed to their users through their + * `package.json` manifest. The recommended method is to add a `sass` + * conditional export to `package.json`. + * + * ```json + * // node_modules/uicomponents/package.json + * { + * "exports": { + * ".": { + * "sass": "./src/scss/index.scss", + * "import": "./dist/js/index.mjs", + * "default": "./dist/js/index.js" + * } + * } + * } + * ``` + * + * This allows a package user to write `@use "pkg:uicomponents"` to load the + * file at `node_modules/uicomponents/src/scss/index.scss`. + * + * The Node.js package importer supports the variety of formats supported by + * Node.js [package entry points], allowing authors to expose multiple subpaths. + * + * [package entry points]: + * https://nodejs.org/api/packages.html#package-entry-points + * + * ```json + * // node_modules/uicomponents/package.json + * { + * "exports": { + * ".": { + * "sass": "./src/scss/index.scss", + * }, + * "./colors.scss": { + * "sass": "./src/scss/_colors.scss", + * }, + * "./theme/*.scss": { + * "sass": "./src/scss/theme/*.scss", + * }, + * } + * } + * ``` + * + * This allows a package user to write: + * + * - `@use "pkg:uicomponents";` to import the root export. + * - `@use "pkg:uicomponents/colors";` to import the colors partial. + * - `@use "pkg:uicomponents/theme/purple";` to import a purple theme. + * + * Note that while library users can rely on the importer to resolve + * [partials](https://sass-lang.com/documentation/at-rules/use#partials), [index + * files](https://sass-lang.com/documentation/at-rules/use#index-files), and + * extensions, library authors must specify the entire file path in `exports`. + * + * In addition to the `sass` condition, the `style` condition is also + * acceptable. Sass will match the `default` condition if it's a relevant file + * type, but authors are discouraged from relying on this. Notably, the key + * order matters, and the importer will resolve to the first value with a key + * that is `sass`, `style`, or `default`, so you should always put `default` + * last. + * + * To help package authors who haven't transitioned to package entry points + * using the `exports` field, the Node.js package importer provides several + * fallback options. If the `pkg:` URL does not have a subpath, the Node.js + * package importer will look for a `sass` or `style` key at the root of + * `package.json`. + * + * ```json + * // node_modules/uicomponents/package.json + * { + * "sass": "./src/scss/index.scss", + * } + * ``` + * + * This allows a user to write `@use "pkg:uicomponents";` to import the + * `index.scss` file. + * + * Finally, the Node.js package importer will look for an `index` file at the + * package root, resolving partials and extensions. For example, if the file + * `_index.scss` exists in the package root of `uicomponents`, a user can import + * that with `@use "pkg:uicomponents";`. + * + * If a `pkg:` URL includes a subpath that doesn't have a match in package entry + * points, the Node.js importer will attempt to find that file relative to the + * package root, resolving for file extensions, partials and index files. For + * example, if the file `src/sass/_colors.scss` exists in the `uicomponents` + * package, a user can import that file using `@use + * "pkg:uicomponents/src/sass/colors";`. + * + * @compatibility dart: "1.71.0", node: false + * @category Importer + */ +export class NodePackageImporter { + /** Used to distinguish this type from any arbitrary object. */ + private readonly [nodePackageImporterKey]: true; + + /** + * The NodePackageImporter has an optional `entryPointDirectory` option, which + * is the directory where the Node Package Importer should start when + * resolving `pkg:` URLs in sources other than files on disk. This will be + * used as the `parentURL` in the [Node Module + * Resolution](https://nodejs.org/api/esm.html#resolution-algorithm-specification) + * algorithm. + * + * In order to be found by the Node Package Importer, a package will need to + * be inside a node_modules folder located in the `entryPointDirectory`, or + * one of its parent directories, up to the filesystem root. + * + * Relative paths will be resolved relative to the current working directory. + * If a path is not provided, this defaults to the parent directory of the + * Node.js entrypoint. If that's not available, this will throw an error. + */ + constructor(entryPointDirectory?: string); +} + +/** + * The result of successfully loading a stylesheet with an {@link Importer}. + * + * @category Importer + */ +export interface ImporterResult { + /** The contents of the stylesheet. */ + contents: string; + + /** The syntax with which to parse {@link contents}. */ + syntax: Syntax; + + /** + * The URL to use to link to the loaded stylesheet's source code in source + * maps. A `file:` URL is ideal because it's accessible to both browsers and + * other build tools, but an `http:` URL is also acceptable. + * + * If this isn't set, it defaults to a `data:` URL that contains the contents + * of the loaded stylesheet. + */ + sourceMapUrl?: URL; +} diff --git a/node_modules/sass/types/index.d.ts b/node_modules/sass/types/index.d.ts new file mode 100644 index 0000000..3520dda --- /dev/null +++ b/node_modules/sass/types/index.d.ts @@ -0,0 +1,122 @@ +// This is a mirror of the JS API definitions in `spec/js-api`, but with comments +// written to provide user-facing documentation rather than to specify behavior for +// implementations. + +export { + AsyncCompiler, + CompileResult, + Compiler, + compile, + compileAsync, + compileString, + compileStringAsync, + initCompiler, + initAsyncCompiler, +} from './compile'; +export { + deprecations, + Deprecation, + Deprecations, + DeprecationOrId, + DeprecationStatus, + Version, +} from './deprecations'; +export {Exception} from './exception'; +export { + CanonicalizeContext, + FileImporter, + Importer, + ImporterResult, + NodePackageImporter, +} from './importer'; +export {Logger, LoggerWarnOptions, SourceSpan, SourceLocation} from './logger'; +export { + CustomFunction, + Options, + OutputStyle, + StringOptions, + StringOptionsWithImporter, + StringOptionsWithoutImporter, + Syntax, +} from './options'; +export {PromiseOr} from './util/promise_or'; +export { + CalculationInterpolation, + CalculationOperation, + CalculationOperator, + CalculationValue, + ChannelName, + ChannelNameHsl, + ChannelNameHwb, + ChannelNameLch, + ChannelNameLab, + ChannelNameRgb, + ChannelNameXyz, + ColorSpaceHsl, + ColorSpaceHwb, + ColorSpaceLch, + ColorSpaceLab, + ColorSpaceRgb, + ColorSpaceXyz, + GamutMapMethod, + HueInterpolationMethod, + KnownColorSpace, + ListSeparator, + PolarColorSpace, + RectangularColorSpace, + SassArgumentList, + SassBoolean, + SassCalculation, + SassColor, + SassFunction, + SassList, + SassMap, + SassMixin, + SassNumber, + SassString, + Value, + sassFalse, + sassNull, + sassTrue, +} from './value'; + +// Legacy APIs +export {LegacyException} from './legacy/exception'; +export { + FALSE, + LegacyAsyncFunction, + LegacyAsyncFunctionDone, + LegacyFunction, + LegacySyncFunction, + LegacyValue, + NULL, + TRUE, + types, +} from './legacy/function'; +export { + LegacyAsyncImporter, + LegacyImporter, + LegacyImporterResult, + LegacyImporterThis, + LegacySyncImporter, +} from './legacy/importer'; +export { + LegacySharedOptions, + LegacyFileOptions, + LegacyStringOptions, + LegacyOptions, +} from './legacy/options'; +export {LegacyPluginThis} from './legacy/plugin_this'; +export {LegacyResult, render, renderSync} from './legacy/render'; + +/** + * Information about the Sass implementation. This always begins with a unique + * identifier for the Sass implementation, followed by U+0009 TAB, followed by + * its npm package version. Some implementations include additional information + * as well, but not in any standardized format. + * + * * For Dart Sass, the implementation name is `dart-sass`. + * * For Node Sass, the implementation name is `node-sass`. + * * For the embedded host, the implementation name is `sass-embedded`. + */ +export const info: string; diff --git a/node_modules/sass/types/legacy/exception.d.ts b/node_modules/sass/types/legacy/exception.d.ts new file mode 100644 index 0000000..29d3a54 --- /dev/null +++ b/node_modules/sass/types/legacy/exception.d.ts @@ -0,0 +1,55 @@ +/** + * The exception type thrown by {@link renderSync} and passed as the error to + * {@link render}'s callback. + * + * @category Legacy + * @deprecated This is only thrown by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link + * compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyException extends Error { + /** + * The error message. For Dart Sass, when possible this includes a highlighted + * indication of where in the source file the error occurred as well as the + * Sass stack trace. + */ + message: string; + + /** + * The error message. For Dart Sass, this is the same as the result of calling + * {@link toString}, which is itself the same as {@link message} but with the + * prefix "Error:". + */ + formatted: string; + + /** + * The (1-based) line number on which the error occurred, if this exception is + * associated with a specific Sass file location. + */ + line?: number; + + /** + * The (1-based) column number within {@link line} at which the error + * occurred, if this exception is associated with a specific Sass file + * location. + */ + column?: number; + + /** + * Analogous to the exit code for an executable. `1` for an error caused by a + * Sass file, `3` for any other type of error. + */ + status: number; + + /** + * If this exception was caused by an error in a Sass file, this will + * represent the Sass file's location. It can be in one of three formats: + * + * * If the Sass file was loaded from disk, this is the path to that file. + * * If the Sass file was generated by an importer, this is its canonical URL. + * * If the Sass file was passed as {@link LegacyStringOptions.data} without a + * corresponding {@link LegacyStringOptions.file}, this is the special + * string `"stdin"`. + */ + file?: string; +} diff --git a/node_modules/sass/types/legacy/function.d.ts b/node_modules/sass/types/legacy/function.d.ts new file mode 100644 index 0000000..7c27eb8 --- /dev/null +++ b/node_modules/sass/types/legacy/function.d.ts @@ -0,0 +1,757 @@ +import {LegacyPluginThis} from './plugin_this'; + +/** + * A synchronous callback that implements a custom Sass function. This can be + * passed to {@link LegacySharedOptions.functions} for either {@link render} or + * {@link renderSync}. + * + * If this throws an error, Sass will treat that as the function failing with + * that error message. + * + * ```js + * const result = sass.renderSync({ + * file: 'style.scss', + * functions: { + * "sum($arg1, $arg2)": (arg1, arg2) => { + * if (!(arg1 instanceof sass.types.Number)) { + * throw new Error("$arg1: Expected a number"); + * } else if (!(arg2 instanceof sass.types.Number)) { + * throw new Error("$arg2: Expected a number"); + * } + * return new sass.types.Number(arg1.getValue() + arg2.getValue()); + * } + * } + * }); + * ``` + * + * @param args - One argument for each argument that's declared in the signature + * that's passed to {@link LegacySharedOptions.functions}. If the signature + * [takes arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * they're passed as a single argument list in the last argument. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacySyncFunction = ( + this: LegacyPluginThis, + ...args: LegacyValue[] +) => LegacyValue; + +/** + * An asynchronous callback that implements a custom Sass function. This can be + * passed to {@link LegacySharedOptions.functions}, but only for {@link render}. + * + * An asynchronous function must return `undefined`. Its final argument will + * always be a callback, which it should call with the result of the function + * once it's done running. + * + * If this throws an error, Sass will treat that as the function failing with + * that error message. + * + * ```js + * sass.render({ + * file: 'style.scss', + * functions: { + * "sum($arg1, $arg2)": (arg1, arg2, done) => { + * if (!(arg1 instanceof sass.types.Number)) { + * throw new Error("$arg1: Expected a number"); + * } else if (!(arg2 instanceof sass.types.Number)) { + * throw new Error("$arg2: Expected a number"); + * } + * done(new sass.types.Number(arg1.getValue() + arg2.getValue())); + * } + * } + * }, (result, error) => { + * // ... + * }); + * ``` + * + * This is passed one argument for each argument that's declared in the + * signature that's passed to {@link LegacySharedOptions.functions}. If the + * signature [takes arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * they're passed as a single argument list in the last argument before the + * callback. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyAsyncFunction = + | ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + arg5: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + arg5: LegacyValue, + arg6: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + ...args: [...LegacyValue[], LegacyAsyncFunctionDone] + ) => void); + +/** + * The function called by a {@link LegacyAsyncFunction} to indicate that it's + * finished. + * + * @param result - If this is a {@link LegacyValue}, that indicates that the + * function call completed successfully. If it's a {@link types.Error}, that + * indicates that the function call failed. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyAsyncFunctionDone = ( + result: LegacyValue | types.Error +) => void; + +/** + * A callback that implements a custom Sass function. For {@link renderSync}, + * this must be a {@link LegacySyncFunction} which returns its result directly; + * for {@link render}, it may be either a {@link LegacySyncFunction} or a {@link + * LegacyAsyncFunction} which calls a callback with its result. + * + * See {@link LegacySharedOptions.functions} for more details. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyFunction = sync extends 'async' + ? LegacySyncFunction | LegacyAsyncFunction + : LegacySyncFunction; + +/** + * A type representing all the possible values that may be passed to or returned + * from a {@link LegacyFunction}. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Value} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyValue = + | types.Null + | types.Number + | types.String + | types.Boolean + | types.Color + | types.List + | types.Map; + +/** + * A shorthand for `sass.types.Boolean.TRUE`. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link sassTrue} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export const TRUE: types.Boolean; + +/** + * A shorthand for `sass.types.Boolean.FALSE`. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link sassFalse} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export const FALSE: types.Boolean; + +/** + * A shorthand for `sass.types.Null.NULL`. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link sassNull} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export const NULL: types.Null; + +/** + * The namespace for value types used in the legacy function API. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Value} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export namespace types { + /** + * The class for Sass's singleton [`null` + * value](https://sass-lang.com/documentation/values/null). The value itself + * can be accessed through the {@link NULL} field. + */ + export class Null { + /** Sass's singleton `null` value. */ + static readonly NULL: Null; + } + + /** + * Sass's [number type](https://sass-lang.com/documentation/values/numbers). + */ + export class Number { + /** + * @param value - The numeric value of the number. + * + * @param unit - If passed, the number's unit. + * + * Complex units can be represented as + * `**.../**...`, with numerator units on the + * left-hand side of the `/` and denominator units on the right. A number + * with only numerator units may omit the `/` and the units after it, and a + * number with only denominator units may be represented + * with no units before the `/`. + * + * @example + * + * ```scss + * new sass.types.Number(0.5); // == 0.5 + * new sass.types.Number(10, "px"); // == 10px + * new sass.types.Number(10, "px*px"); // == 10px * 1px + * new sass.types.Number(10, "px/s"); // == math.div(10px, 1s) + * new sass.types.Number(10, "px*px/s*s"); // == 10px * math.div(math.div(1px, 1s), 1s) + * ``` + */ + constructor(value: number, unit?: string); + + /** + * Returns the value of the number, ignoring units. + * + * **Heads up!** This means that `96px` and `1in` will return different + * values, even though they represent the same length. + * + * @example + * + * ```js + * const number = new sass.types.Number(10, "px"); + * number.getValue(); // 10 + * ``` + */ + getValue(): number; + + /** + * Destructively modifies this number by setting its numeric value to + * `value`, independent of its units. + * + * @deprecated Use {@link constructor} instead. + */ + setValue(value: number): void; + + /** + * Returns a string representation of this number's units. Complex units are + * returned in the same format that {@link constructor} accepts them. + * + * @example + * + * ```js + * // number is `10px`. + * number.getUnit(); // "px" + * + * // number is `math.div(10px, 1s)`. + * number.getUnit(); // "px/s" + * ``` + */ + getUnit(): string; + + /** + * Destructively modifies this number by setting its units to `unit`, + * independent of its numeric value. Complex units are specified in the same + * format as {@link constructor}. + * + * @deprecated Use {@link constructor} instead. + */ + setUnit(unit: string): void; + } + + /** + * Sass's [string type](https://sass-lang.com/documentation/values/strings). + * + * **Heads up!** This API currently provides no way of distinguishing between + * a [quoted](https://sass-lang.com/documentation/values/strings#quoted) and + * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted) + * string. + */ + export class String { + /** + * Creates an unquoted string with the given contents. + * + * **Heads up!** This API currently provides no way of creating a + * [quoted](https://sass-lang.com/documentation/values/strings#quoted) + * string. + */ + constructor(value: string); + + /** + * Returns the contents of the string. If the string contains escapes, + * those escapes are included literally if it’s + * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted), + * while the values of the escapes are included if it’s + * [quoted](https://sass-lang.com/documentation/values/strings#quoted). + * + * @example + * + * ``` + * // string is `Arial`. + * string.getValue(); // "Arial" + * + * // string is `"Helvetica Neue"`. + * string.getValue(); // "Helvetica Neue" + * + * // string is `\1F46D`. + * string.getValue(); // "\\1F46D" + * + * // string is `"\1F46D"`. + * string.getValue(); // "👭" + * ``` + */ + getValue(): string; + + /** + * Destructively modifies this string by setting its numeric value to + * `value`. + * + * **Heads up!** Even if the string was originally quoted, this will cause + * it to become unquoted. + * + * @deprecated Use {@link constructor} instead. + */ + setValue(value: string): void; + } + + /** + * Sass's [boolean type](https://sass-lang.com/documentation/values/booleans). + * + * Custom functions should respect Sass’s notion of + * [truthiness](https://sass-lang.com/documentation/at-rules/control/if#truthiness-and-falsiness) + * by treating `false` and `null` as falsey and everything else as truthy. + * + * **Heads up!** Boolean values can't be constructed, they can only be + * accessed through the {@link TRUE} and {@link FALSE} constants. + */ + export class Boolean { + /** + * Returns `true` if this is Sass's `true` value and `false` if this is + * Sass's `false` value. + * + * @example + * + * ```js + * // boolean is `true`. + * boolean.getValue(); // true + * boolean === sass.types.Boolean.TRUE; // true + * + * // boolean is `false`. + * boolean.getValue(); // false + * boolean === sass.types.Boolean.FALSE; // true + * ``` + */ + getValue(): T; + + /** Sass's `true` value. */ + static readonly TRUE: Boolean; + + /** Sass's `false` value. */ + static readonly FALSE: Boolean; + } + + /** + * Sass's [color type](https://sass-lang.com/documentation/values/colors). + */ + export class Color { + /** + * Creates a new Sass color with the given red, green, blue, and alpha + * channels. The red, green, and blue channels must be integers between 0 + * and 255 (inclusive), and alpha must be between 0 and 1 (inclusive). + * + * @example + * + * ```js + * new sass.types.Color(107, 113, 127); // #6b717f + * new sass.types.Color(0, 0, 0, 0); // rgba(0, 0, 0, 0) + * ``` + */ + constructor(r: number, g: number, b: number, a?: number); + + /** + * Creates a new Sass color with alpha, red, green, and blue channels taken + * from respective two-byte chunks of a hexidecimal number. + * + * @example + * + * ```js + * new sass.types.Color(0xff6b717f); // #6b717f + * new sass.types.Color(0x00000000); // rgba(0, 0, 0, 0) + * ``` + */ + constructor(argb: number); + + /** + * Returns the red channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getR(); // 107 + * + * // color is `#b37399`. + * color.getR(); // 179 + * ``` + */ + getR(): number; + + /** + * Sets the red channel of the color. The value must be an integer between 0 + * and 255 (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setR(value: number): void; + + /** + * Returns the green channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getG(); // 113 + * + * // color is `#b37399`. + * color.getG(); // 115 + * ``` + */ + getG(): number; + + /** + * Sets the green channel of the color. The value must be an integer between + * 0 and 255 (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setG(value: number): void; + + /** + * Returns the blue channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getB(); // 127 + * + * // color is `#b37399`. + * color.getB(); // 153 + * ``` + */ + getB(): number; + + /** + * Sets the blue channel of the color. The value must be an integer between + * 0 and 255 (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setB(value: number): void; + + /** + * Returns the alpha channel of the color as a number from 0 to 1. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getA(); // 1 + * + * // color is `transparent`. + * color.getA(); // 0 + * ``` + */ + getA(): number; + + /** + * Sets the alpha channel of the color. The value must be between 0 and 1 + * (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setA(value: number): void; + } + + /** + * Sass's [list type](https://sass-lang.com/documentation/values/lists). + * + * **Heads up!** This list type’s methods use 0-based indexing, even though + * within Sass lists use 1-based indexing. These methods also don’t support + * using negative numbers to index backwards from the end of the list. + */ + export class List { + /** + * Creates a new Sass list. + * + * **Heads up!** The initial values of the list elements are undefined. + * These elements must be set using {@link setValue} before accessing them + * or passing the list back to Sass. + * + * @example + * + * ```js + * const list = new sass.types.List(3); + * list.setValue(0, new sass.types.Number(10, "px")); + * list.setValue(1, new sass.types.Number(15, "px")); + * list.setValue(2, new sass.types.Number(32, "px")); + * list; // 10px, 15px, 32px + * ``` + * + * @param length - The number of (initially undefined) elements in the list. + * @param commaSeparator - If `true`, the list is comma-separated; otherwise, + * it's space-separated. Defaults to `true`. + */ + constructor(length: number, commaSeparator?: boolean); + + /** + * Returns the element at `index`, or `undefined` if that value hasn't yet + * been set. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getValue(0); // 10px + * list.getValue(2); // 32px + * ``` + * + * @param index - A (0-based) index into this list. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of elements in this list. + */ + getValue(index: number): LegacyValue | undefined; + + /** + * Sets the element at `index` to `value`. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.setValue(1, new sass.types.Number(18, "px")); + * list; // 10px, 18px, 32px + * ``` + * + * @param index - A (0-based) index into this list. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of elements in this list. + */ + setValue(index: number, value: LegacyValue): void; + + /** + * Returns `true` if this list is comma-separated and `false` otherwise. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getSeparator(); // true + * + * // list is `1px solid` + * list.getSeparator(); // false + * ``` + */ + getSeparator(): boolean; + + /** + * Sets whether the list is comma-separated. + * + * @param isComma - `true` to make the list comma-separated, `false` otherwise. + */ + setSeparator(isComma: boolean): void; + + /** + * Returns the number of elements in the list. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getLength(); // 3 + * + * // list is `1px solid` + * list.getLength(); // 2 + * ``` + */ + getLength(): number; + } + + /** + * Sass's [map type](https://sass-lang.com/documentation/values/maps). + * + * **Heads up!** This map type is represented as a list of key-value pairs + * rather than a mapping from keys to values. The only way to find the value + * associated with a given key is to iterate through the map checking for that + * key. Maps created through this API are still forbidden from having duplicate + * keys. + */ + export class Map { + /** + * Creates a new Sass map. + * + * **Heads up!** The initial keys and values of the map are undefined. They + * must be set using {@link setKey} and {@link setValue} before accessing + * them or passing the map back to Sass. + * + * @example + * + * ```js + * const map = new sass.types.Map(2); + * map.setKey(0, new sass.types.String("width")); + * map.setValue(0, new sass.types.Number(300, "px")); + * map.setKey(1, new sass.types.String("height")); + * map.setValue(1, new sass.types.Number(100, "px")); + * map; // (width: 300px, height: 100px) + * ``` + * + * @param length - The number of (initially undefined) key/value pairs in the map. + */ + constructor(length: number); + + /** + * Returns the value in the key/value pair at `index`. + * + * @example + * + * ```js + * // map is `(width: 300px, height: 100px)` + * map.getValue(0); // 300px + * map.getValue(1); // 100px + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + getValue(index: number): LegacyValue; + + /** + * Sets the value in the key/value pair at `index` to `value`. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.setValue(1, new sass.types.Number(300)); + * map; // ("light": 200, "medium": 300, "bold": 600) + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + setValue(index: number, value: LegacyValue): void; + + /** + * Returns the key in the key/value pair at `index`. + * + * @example + * + * ```js + * // map is `(width: 300px, height: 100px)` + * map.getKey(0); // width + * map.getKey(1); // height + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + getKey(index: number): LegacyValue; + + /** + * Sets the value in the key/value pair at `index` to `value`. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.setValue(1, new sass.types.String("lighter")); + * map; // ("lighter": 200, "medium": 300, "bold": 600) + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + setKey(index: number, key: LegacyValue): void; + + /** + * Returns the number of key/value pairs in this map. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.getLength(); // 3 + * + * // map is `(width: 300px, height: 100px)` + * map.getLength(); // 2 + * ``` + */ + getLength(): number; + } + + /** + * An error that can be returned from a Sass function to signal that it + * encountered an error. This is the only way to signal an error + * asynchronously from a {@link LegacyAsyncFunction}. + */ + export class Error { + constructor(message: string); + } +} diff --git a/node_modules/sass/types/legacy/importer.d.ts b/node_modules/sass/types/legacy/importer.d.ts new file mode 100644 index 0000000..4b7777a --- /dev/null +++ b/node_modules/sass/types/legacy/importer.d.ts @@ -0,0 +1,169 @@ +import {LegacyPluginThis} from './plugin_this'; + +/** + * The value of `this` in the context of a {@link LegacyImporter} function. + * + * @category Legacy + * @deprecated This is only used by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +interface LegacyImporterThis extends LegacyPluginThis { + /** + * Whether the importer is being invoked because of a Sass `@import` rule, as + * opposed to a `@use` or `@forward` rule. + * + * This should *only* be used for determining whether or not to load + * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). + * + * @compatibility dart: "1.33.0", node: false + */ + fromImport: boolean; +} + +/** + * The result of running a {@link LegacyImporter}. It must be one of the + * following types: + * + * * An object with the key `contents` whose value is the contents of a stylesheet + * (in SCSS syntax). This causes Sass to load that stylesheet’s contents. + * + * * An object with the key `file` whose value is a path on disk. This causes Sass + * to load that file as though it had been imported directly. + * + * * `null`, which indicates that it doesn’t recognize the URL and another + * importer should be tried instead. + * + * * An [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) + * object, indicating that importing failed. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link ImporterResult} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyImporterResult = + | {file: string} + | {contents: string} + | Error + | null; + +/** + * A synchronous callback that implements custom Sass loading logic for + * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and + * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be + * passed to {@link LegacySharedOptions.importer} for either {@link render} or + * {@link renderSync}. + * + * See {@link LegacySharedOptions.importer} for more detailed documentation. + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * importer: [ + * function(url, prev) { + * if (url != "big-headers") return null; + * + * return { + * contents: 'h1 { font-size: 40px; }' + * }; + * } + * ] + * }); + * ``` + * + * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it + * appears in the stylesheet. + * + * @param prev - A string identifying the stylesheet that contained the `@use` + * or `@import`. This string’s format depends on how that stylesheet was loaded: + * + * * If the stylesheet was loaded from the filesystem, it’s the absolute path of + * its file. + * * If the stylesheet was loaded from an importer that returned its contents, + * it’s the URL of the `@use` or `@import` rule that loaded it. + * * If the stylesheet came from the data option, it’s the string "stdin". + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +type LegacySyncImporter = ( + this: LegacyImporterThis, + url: string, + prev: string +) => LegacyImporterResult; + +/** + * An asynchronous callback that implements custom Sass loading logic for + * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and + * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be + * passed to {@link LegacySharedOptions.importer} for either {@link render} or + * {@link renderSync}. + * + * An asynchronous importer must return `undefined`, and then call `done` with + * the result of its {@link LegacyImporterResult} once it's done running. + * + * See {@link LegacySharedOptions.importer} for more detailed documentation. + * + * ```js + * sass.render({ + * file: "style.scss", + * importer: [ + * function(url, prev, done) { + * if (url != "big-headers") done(null); + * + * done({ + * contents: 'h1 { font-size: 40px; }' + * }); + * } + * ] + * }); + * ``` + * + * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it + * appears in the stylesheet. + * + * @param prev - A string identifying the stylesheet that contained the `@use` + * or `@import`. This string’s format depends on how that stylesheet was loaded: + * + * * If the stylesheet was loaded from the filesystem, it’s the absolute path of + * its file. + * * If the stylesheet was loaded from an importer that returned its contents, + * it’s the URL of the `@use` or `@import` rule that loaded it. + * * If the stylesheet came from the data option, it’s the string "stdin". + * + * @param done - The callback to call once the importer has finished running. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +type LegacyAsyncImporter = ( + this: LegacyImporterThis, + url: string, + prev: string, + done: (result: LegacyImporterResult) => void +) => void; + +/** + * A callback that implements custom Sass loading logic for [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import) and [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use). For {@link + * renderSync}, this must be a {@link LegacySyncImporter} which returns its + * result directly; for {@link render}, it may be either a {@link + * LegacySyncImporter} or a {@link LegacyAsyncImporter} which calls a callback + * with its result. + * + * See {@link LegacySharedOptions.importer} for more details. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyImporter = sync extends 'async' + ? LegacySyncImporter | LegacyAsyncImporter + : LegacySyncImporter; diff --git a/node_modules/sass/types/legacy/options.d.ts b/node_modules/sass/types/legacy/options.d.ts new file mode 100644 index 0000000..922fd5d --- /dev/null +++ b/node_modules/sass/types/legacy/options.d.ts @@ -0,0 +1,700 @@ +import {DeprecationOrId, Version} from '../deprecations'; +import {Logger} from '../logger'; +import {LegacyImporter} from './importer'; +import {LegacyFunction} from './function'; +import {NodePackageImporter} from '../importer'; + +/** + * Options for {@link render} and {@link renderSync} that are shared between + * {@link LegacyFileOptions} and {@link LegacyStringOptions}. + * + * @typeParam sync - This lets the TypeScript checker verify that {@link + * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to + * {@link renderSync}. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Options} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacySharedOptions { + /** + * This array of strings option provides [load + * paths](https://sass-lang.com/documentation/at-rules/import#load-paths) for + * Sass to look for stylesheets. Earlier load paths will take precedence over + * later ones. + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * includePaths: ["node_modules/bootstrap/dist/css"] + * }); + * ``` + * + * Load paths are also loaded from the `SASS_PATH` environment variable, if + * it’s set. This variable should be a list of paths separated by `;` (on + * Windows) or `:` (on other operating systems). Load paths from the + * `includePaths` option take precedence over load paths from `SASS_PATH`. + * + * ```sh + * $ SASS_PATH=node_modules/bootstrap/dist/css sass style.scss style.css + * ``` + * + * @category Input + * @compatibility feature: "SASS_PATH", dart: "1.15.0", node: "3.9.0" + * + * Earlier versions of Dart Sass and Node Sass didn’t support the `SASS_PATH` + * environment variable. + */ + includePaths?: string[]; + + /** + * Whether the generated CSS should use spaces or tabs for indentation. + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * indentType: "tab", + * indentWidth: 1 + * }); + * + * result.css.toString(); + * // "h1 {\n\tfont-size: 40px;\n}\n" + * ``` + * + * @defaultValue `'space'` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + indentType?: 'space' | 'tab'; + + /** + * How many spaces or tabs (depending on {@link indentType}) should be used + * per indentation level in the generated CSS. It must be between 0 and 10 + * (inclusive). + * + * @defaultValue `2` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + indentWidth?: number; + + /** + * Which character sequence to use at the end of each line in the generated + * CSS. It can have the following values: + * + * * `'lf'` uses U+000A LINE FEED. + * * `'lfcr'` uses U+000A LINE FEED followed by U+000D CARRIAGE RETURN. + * * `'cr'` uses U+000D CARRIAGE RETURN. + * * `'crlf'` uses U+000D CARRIAGE RETURN followed by U+000A LINE FEED. + * + * @defaultValue `'lf'` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + linefeed?: 'cr' | 'crlf' | 'lf' | 'lfcr'; + + /** + * If `true`, Sass won't add a link from the generated CSS to the source map. + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * omitSourceMapUrl: true + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + omitSourceMapUrl?: boolean; + + /** + * The location that Sass expects the generated CSS to be saved to. It’s used + * to determine the URL used to link from the generated CSS to the source map, + * and from the source map to the Sass source files. + * + * **Heads up!** Despite the name, Sass does *not* write the CSS output to + * this file. The caller must do that themselves. + * + * ```js + * result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "out.css" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.css.map * / + * ``` + * + * @category Source Maps + */ + outFile?: string; + + /** + * The output style of the compiled CSS. There are four possible output styles: + * + * * `"expanded"` (the default for Dart Sass) writes each selector and + * declaration on its own line. + * + * * `"compressed"` removes as many extra characters as possible, and writes + * the entire stylesheet on a single line. + * + * * `"nested"` (the default for Node Sass, not supported by Dart Sass) + * indents CSS rules to match the nesting of the Sass source. + * + * * `"compact"` (not supported by Dart Sass) puts each CSS rule on its own single line. + * + * @example + * + * ```js + * const source = ` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`; + * + * let result = sass.renderSync({ + * data: source, + * outputStyle: "expanded" + * }); + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // h1 code { + * // font-face: Roboto Mono; + * // } + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "compressed" + * }); + * console.log(result.css.toString()); + * // h1{font-size:40px}h1 code{font-face:Roboto Mono} + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "nested" + * }); + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; } + * // h1 code { + * // font-face: Roboto Mono; } + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "compact" + * }); + * console.log(result.css.toString()); + * // h1 { font-size: 40px; } + * // h1 code { font-face: Roboto Mono; } + * ``` + * + * @category Output + */ + outputStyle?: 'compressed' | 'expanded' | 'nested' | 'compact'; + + /** + * Whether or not Sass should generate a source map. If it does, the source + * map will be available as {@link LegacyResult.map} (unless {@link + * sourceMapEmbed} is `true`). + * + * If this option is a string, it’s the path that the source map is expected + * to be written to, which is used to link to the source map from the + * generated CSS and to link *from* the source map to the Sass source files. + * Note that if `sourceMap` is a string and {@link outFile} isn’t passed, Sass + * assumes that the CSS will be written to the same directory as the file + * option if it’s passed. + * + * If this option is `true`, the path is assumed to be {@link outFile} with + * `.map` added to the end. If it’s `true` and {@link outFile} isn’t passed, + * it has no effect. + * + * @example + * + * ```js + * let result = sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.map * / + * + * result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "out.css" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.css.map * / + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMap?: boolean | string; + + /** + * Whether to embed the entire contents of the Sass files that contributed to + * the generated CSS in the source map. This may produce very large source + * maps, but it guarantees that the source will be available on any computer + * no matter how the CSS is served. + * + * @example + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * sourceMapContents: true + * }) + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMapContents?: boolean; + + /** + * Whether to embed the contents of the source map file in the generated CSS, + * rather than creating a separate file and linking to it from the CSS. + * + * @example + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * sourceMapEmbed: true + * }); + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMapEmbed?: boolean; + + /** + * If this is passed, it's prepended to all the links from the source map to + * the Sass source files. + * + * @category Source Maps + */ + sourceMapRoot?: string; + + /** + * Additional handler(s) for loading files when a [`@use` + * rule](https://sass-lang.com/documentation/at-rules/use) or an [`@import` + * rule](https://sass-lang.com/documentation/at-rules/import) is encountered. + * It can either be a single {@link LegacyImporter} function, or an array of + * {@link LegacyImporter}s. + * + * Importers take the URL of the `@import` or `@use` rule and return a {@link + * LegacyImporterResult} indicating how to handle that rule. For more details, + * see {@link LegacySyncImporter} and {@link LegacyAsyncImporter}. + * + * Loads are resolved by trying, in order: + * + * * Loading a file from disk relative to the file in which the `@use` or + * `@import` appeared. + * + * * Each custom importer. + * + * * Loading a file relative to the current working directory. + * + * * Each load path in {@link includePaths}. + * + * * Each load path specified in the `SASS_PATH` environment variable, which + * should be semicolon-separated on Windows and colon-separated elsewhere. + * + * @example + * + * ```js + * sass.render({ + * file: "style.scss", + * importer: [ + * // This importer uses the synchronous API, and can be passed to either + * // renderSync() or render(). + * function(url, prev) { + * // This generates a stylesheet from scratch for `@use "big-headers"`. + * if (url != "big-headers") return null; + * + * return { + * contents: ` + * h1 { + * font-size: 40px; + * }` + * }; + * }, + * + * // This importer uses the asynchronous API, and can only be passed to + * // render(). + * function(url, prev, done) { + * // Convert `@use "foo/bar"` to "node_modules/foo/sass/bar". + * const components = url.split('/'); + * const innerPath = components.slice(1).join('/'); + * done({ + * file: `node_modules/${components.first}/sass/${innerPath}` + * }); + * } + * ] + * }, function(err, result) { + * // ... + * }); + * ``` + * + * @category Plugins + * @compatibility dart: true, node: "3.0.0" + * + * Versions of Node Sass before 3.0.0 don’t support arrays of importers, nor + * do they support importers that return `Error` objects. + * + * Versions of Node Sass before 2.0.0 don’t support the `importer` option at + * all. + * + * @compatibility feature: "Import order", dart: "1.20.2", node: false + * + * Versions of Dart Sass before 1.20.2 preferred resolving imports using + * {@link includePaths} before resolving them using custom importers. + * + * All versions of Node Sass currently pass imports to importers before + * loading them relative to the file in which the `@import` appears. This + * behavior is considered incorrect and should not be relied on because it + * violates the principle of *locality*, which says that it should be possible + * to reason about a stylesheet without knowing everything about how the + * entire system is set up. If a user tries to import a stylesheet relative to + * another stylesheet, that import should *always* work. It shouldn’t be + * possible for some configuration somewhere else to break it. + */ + importer?: LegacyImporter | LegacyImporter[]; + + /** + * Additional built-in Sass functions that are available in all stylesheets. + * This option takes an object whose keys are Sass function signatures and + * whose values are {@link LegacyFunction}s. Each function should take the + * same arguments as its signature. + * + * Functions are passed subclasses of {@link LegacyValue}, and must return the + * same. + * + * **Heads up!** When writing custom functions, it’s important to ensure that + * all the arguments are the types you expect. Otherwise, users’ stylesheets + * could crash in hard-to-debug ways or, worse, compile to meaningless CSS. + * + * @example + * + * ```js + * sass.render({ + * data: ` + * h1 { + * font-size: pow(2, 5) * 1px; + * }`, + * functions: { + * // This function uses the synchronous API, and can be passed to either + * // renderSync() or render(). + * 'pow($base, $exponent)': function(base, exponent) { + * if (!(base instanceof sass.types.Number)) { + * throw "$base: Expected a number."; + * } else if (base.getUnit()) { + * throw "$base: Expected a unitless number."; + * } + * + * if (!(exponent instanceof sass.types.Number)) { + * throw "$exponent: Expected a number."; + * } else if (exponent.getUnit()) { + * throw "$exponent: Expected a unitless number."; + * } + * + * return new sass.types.Number( + * Math.pow(base.getValue(), exponent.getValue())); + * }, + * + * // This function uses the asynchronous API, and can only be passed to + * // render(). + * 'sqrt($number)': function(number, done) { + * if (!(number instanceof sass.types.Number)) { + * throw "$number: Expected a number."; + * } else if (number.getUnit()) { + * throw "$number: Expected a unitless number."; + * } + * + * done(new sass.types.Number(Math.sqrt(number.getValue()))); + * } + * } + * }, function(err, result) { + * console.log(result.css.toString()); + * // h1 { + * // font-size: 32px; + * // } + * }); + * ``` + * + * @category Plugins + */ + functions?: {[key: string]: LegacyFunction}; + + /** + * By default, if the CSS document contains non-ASCII characters, Sass adds a + * `@charset` declaration (in expanded output mode) or a byte-order mark (in + * compressed mode) to indicate its encoding to browsers or other consumers. + * If `charset` is `false`, these annotations are omitted. + * + * @category Output + * @compatibility dart: "1.39.0", node: false + */ + charset?: boolean; + + /** + * If this option is set to `true`, Sass won’t print warnings that are caused + * by dependencies. A “dependency” is defined as any file that’s loaded + * through {@link includePaths} or {@link importer}. Stylesheets that are + * imported relative to the entrypoint are not considered dependencies. + * + * This is useful for silencing deprecation warnings that you can’t fix on + * your own. However, please also notify your dependencies of the deprecations + * so that they can get fixed as soon as possible! + * + * **Heads up!** If {@link render} or {@link renderSync} is called without + * {@link LegacyFileOptions.file} or {@link LegacyStringOptions.file}, + * all stylesheets it loads will be considered dependencies. Since it + * doesn’t have a path of its own, everything it loads is coming from a load + * path rather than a relative import. + * + * @defaultValue `false` + * @category Messages + * @compatibility dart: "1.35.0", node: false + */ + quietDeps?: boolean; + + /** + * A set of deprecations to treat as fatal. + * + * If a deprecation warning of any provided type is encountered during + * compilation, the compiler will error instead. + * + * If a `Version` is provided, then all deprecations that were active in that + * compiler version will be treated as fatal. + * + * @category Messages + * @compatiblity dart: "1.78.0", node: false + */ + fatalDeprecations?: (DeprecationOrId | Version)[]; + + /** + * A set of future deprecations to opt into early. + * + * Future deprecations passed here will be treated as active by the compiler, + * emitting warnings as necessary. + * + * @category Messages + * @compatiblity dart: "1.78.0", node: false + */ + futureDeprecations?: DeprecationOrId[]; + + /** + * A set of active deprecations to ignore. + * + * If a deprecation warning of any provided type is encountered during + * compilation, the compiler will ignore it instead. + * + * **Heads up!** The deprecated functionality you're depending on will + * eventually break. + * + * @category Messages + * @compatiblity dart: "1.78.0", node: false + */ + silenceDeprecations?: DeprecationOrId[]; + + /** + * By default, Dart Sass will print only five instances of the same + * deprecation warning per compilation to avoid deluging users in console + * noise. If you set `verbose` to `true`, it will instead print every + * deprecation warning it encounters. + * + * @defaultValue `false` + * @category Messages + * @compatibility dart: "1.35.0", node: false + */ + verbose?: boolean; + + /** + * An object to use to handle warnings and/or debug messages from Sass. + * + * By default, Sass emits warnings and debug messages to standard error, but + * if {@link Logger.warn} or {@link Logger.debug} is set, this will invoke + * them instead. + * + * The special value {@link Logger.silent} can be used to easily silence all + * messages. + * + * @category Messages + * @compatibility dart: "1.43.0", node: false + */ + logger?: Logger; + + /** + * If this option is set to an instance of `NodePackageImporter`, Sass will + * use the built-in Node.js package importer to resolve Sass files with a + * `pkg:` URL scheme. Details for library authors and users can be found in + * the {@link NodePackageImporter} documentation. + * + * @example + * ```js + * sass.renderSync({ + * data: '@use "pkg:vuetify";', + * pkgImporter: new sass.NodePackageImporter() + * }); + * ``` + * @category Plugins + * @compatibility dart: "2.0", node: false + */ + pkgImporter?: NodePackageImporter; +} + +/** + * If {@link file} is passed without {@link data}, Sass will load the stylesheet + * at {@link file} and compile it to CSS. + * + * @typeParam sync - This lets the TypeScript checker verify that {@link + * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to + * {@link renderSync}. + */ +export interface LegacyFileOptions + extends LegacySharedOptions { + /** + * The path to the file for Sass to load and compile. If the file’s extension + * is `.scss`, it will be parsed as SCSS; if it’s `.sass`, it will be parsed + * as the indented syntax; and if it’s `.css`, it will be parsed as plain CSS. + * If it has no extension, it will be parsed as SCSS. + * + * @example + * + * ```js + * sass.renderSync({file: "style.scss"}); + * ``` + * + * @category Input + * @compatibility feature: "Plain CSS files", dart: "1.11.0", node: "partial" + * + * Node Sass and older versions of Dart Sass support loading files with the + * extension `.css`, but contrary to the specification they’re treated as SCSS + * files rather than being parsed as CSS. This behavior has been deprecated + * and should not be relied on. Any files that use Sass features should use + * the `.scss` extension. + * + * All versions of Node Sass and Dart Sass otherwise support the file option + * as described below. + */ + file: string; + + /** + * See {@link LegacyStringOptions.file} for documentation of passing {@link + * file} along with {@link data}. + * + * @category Input + */ + data?: never; +} + +/** + * If {@link data} is passed, Sass will use it as the contents of the stylesheet + * to compile. + * + * @typeParam sync - This lets the TypeScript checker verify that {@link + * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to + * {@link renderSync}. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link StringOptions} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyStringOptions + extends LegacySharedOptions { + /** + * The contents of the stylesheet to compile. Unless {@link file} is passed as + * well, the stylesheet’s URL is set to `"stdin"`. + * + * By default, this stylesheet is parsed as SCSS. This can be controlled using + * {@link indentedSyntax}. + * + * @example + * + * ```js + * sass.renderSync({ + * data: ` + * h1 { + * font-size: 40px; + * }` + * }); + * ``` + * + * @category Input + */ + data: string; + + /** + * If `file` and {@link data} are both passed, `file` is used as the path of + * the stylesheet for error reporting, but {@link data} is used as the + * contents of the stylesheet. In this case, `file`’s extension is not used to + * determine the syntax of the stylesheet. + * + * @category Input + */ + file?: string; + + /** + * This flag controls whether {@link data} is parsed as the indented syntax or + * not. + * + * @example + * + * ```js + * sass.renderSync({ + * data: ` + * h1 + * font-size: 40px`, + * indentedSyntax: true + * }); + * ``` + * + * @defaultValue `false` + * @category Input + */ + indentedSyntax?: boolean; +} + +/** + * Options for {@link render} and {@link renderSync}. This can either be {@link + * LegacyFileOptions} to load a file from disk, or {@link LegacyStringOptions} + * to compile a string of Sass code. + * + * See {@link LegacySharedOptions} for options that are shared across both file + * and string inputs. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Options} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyOptions = + | LegacyFileOptions + | LegacyStringOptions; diff --git a/node_modules/sass/types/legacy/plugin_this.d.ts b/node_modules/sass/types/legacy/plugin_this.d.ts new file mode 100644 index 0000000..8ccffa7 --- /dev/null +++ b/node_modules/sass/types/legacy/plugin_this.d.ts @@ -0,0 +1,74 @@ +/** + * The value of `this` in the context of a {@link LegacyImporter} or {@link + * LegacyFunction} callback. + * + * @category Legacy + * @deprecated This is only used by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link + * compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyPluginThis { + /** + * A partial representation of the options passed to {@link render} or {@link + * renderSync}. + */ + options: { + /** The same {@link LegacyPluginThis} instance that contains this object. */ + context: LegacyPluginThis; + + /** + * The value passed to {@link LegacyFileOptions.file} or {@link + * LegacyStringOptions.file}. + */ + file?: string; + + /** The value passed to {@link LegacyStringOptions.data}. */ + data?: string; + + /** + * The value passed to {@link LegacySharedOptions.includePaths} separated by + * `";"` on Windows or `":"` on other operating systems. This always + * includes the current working directory as the first entry. + */ + includePaths: string; + + /** Always the number 10. */ + precision: 10; + + /** Always the number 1. */ + style: 1; + + /** 1 if {@link LegacySharedOptions.indentType} was `"tab"`, 0 otherwise. */ + indentType: 1 | 0; + + /** + * The value passed to {@link LegacySharedOptions.indentWidth}, or `2` + * otherwise. + */ + indentWidth: number; + + /** + * The value passed to {@link LegacySharedOptions.linefeed}, or `"\n"` + * otherwise. + */ + linefeed: '\r' | '\r\n' | '\n' | '\n\r'; + + /** A partially-constructed {@link LegacyResult} object. */ + result: { + /** Partial information about the compilation in progress. */ + stats: { + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and + * the time at which Sass compilation began. + */ + start: number; + + /** + * {@link LegacyFileOptions.file} if it was passed, otherwise the string + * `"data"`. + */ + entry: string; + }; + }; + }; +} diff --git a/node_modules/sass/types/legacy/render.d.ts b/node_modules/sass/types/legacy/render.d.ts new file mode 100644 index 0000000..9f78816 --- /dev/null +++ b/node_modules/sass/types/legacy/render.d.ts @@ -0,0 +1,144 @@ +import {LegacyException} from './exception'; +import {LegacyOptions} from './options'; + +/** + * The object returned by {@link render} and {@link renderSync} after a + * successful compilation. + * + * @category Legacy + * @deprecated This is only used by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link + * compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyResult { + /** + * The compiled CSS. This can be converted to a string by calling + * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). + * + * @example + * + * ```js + * const result = sass.renderSync({file: "style.scss"}); + * + * console.log(result.css.toString()); + * ``` + */ + css: Buffer; + + /** + * The source map that maps the compiled CSS to the source files from which it + * was generated. This can be converted to a string by calling + * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). + * + * This is `undefined` unless either + * + * * {@link LegacySharedOptions.sourceMap} is a string; or + * * {@link LegacySharedOptions.sourceMap} is `true` and + * {@link LegacySharedOptions.outFile} is set. + * + * The source map uses absolute [`file:` + * URLs](https://en.wikipedia.org/wiki/File_URI_scheme) to link to the Sass + * source files, except if the source file comes from {@link + * LegacyStringOptions.data} in which case it lists its URL as `"stdin"`. + * + * @example + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "style.css" + * }) + * + * console.log(result.map.toString()); + * ``` + */ + map?: Buffer; + + /** Additional information about the compilation. */ + stats: { + /** + * The absolute path of {@link LegacyFileOptions.file} or {@link + * LegacyStringOptions.file}, or `"data"` if {@link + * LegacyStringOptions.file} wasn't set. + */ + entry: string; + + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the + * time at which Sass compilation began. + */ + start: number; + + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the + * time at which Sass compilation ended. + */ + end: number; + + /** + * The number of milliseconds it took to compile the Sass file. This is + * always equal to `start` minus `end`. + */ + duration: number; + + /** + * An array of the absolute paths of all Sass files loaded during + * compilation. If a stylesheet was loaded from a {@link LegacyImporter} + * that returned the stylesheet’s contents, the raw string of the `@use` or + * `@import` that loaded that stylesheet included in this array. + */ + includedFiles: string[]; + }; +} + +/** + * This function synchronously compiles a Sass file to CSS. If it succeeds, it + * returns the result, and if it fails it throws an error. + * + * **Heads up!** When using the `sass-embedded` npm package, **{@link render} + * is almost always faster than {@link renderSync}**, due to the overhead of + * emulating synchronous messaging with worker threads and concurrent + * compilations being blocked on main thread. + * + * @example + * + * ```js + * const sass = require('sass'); // or require('node-sass'); + * + * const result = sass.renderSync({file: "style.scss"}); + * // ... + * ``` + * + * @category Legacy + * @deprecated Use {@link compile} or {@link compileString} instead. + */ +export function renderSync(options: LegacyOptions<'sync'>): LegacyResult; + +/** + + * This function asynchronously compiles a Sass file to CSS, and calls + * `callback` with a {@link LegacyResult} if compilation succeeds or {@link + * LegacyException} if it fails. + * + * **Heads up!** When using the `sass` npm package, **{@link renderSync} is + * almost twice as fast as {@link render}** by default, due to the overhead of + * making the entire evaluation process asynchronous. + * + * ```js + * const sass = require('sass'); // or require('node-sass'); + * + * sass.render({ + * file: "style.scss" + * }, function(err, result) { + * // ... + * }); + * ``` + * + * @category Legacy + * @deprecated Use {@link compileAsync} or {@link compileStringAsync} instead. + */ +export function render( + options: LegacyOptions<'async'>, + callback: (exception?: LegacyException, result?: LegacyResult) => void +): void; diff --git a/node_modules/sass/types/logger/index.d.ts b/node_modules/sass/types/logger/index.d.ts new file mode 100644 index 0000000..84ee9c2 --- /dev/null +++ b/node_modules/sass/types/logger/index.d.ts @@ -0,0 +1,115 @@ +import {Deprecation} from '../deprecations'; +import {SourceSpan} from './source_span'; + +export {SourceLocation} from './source_location'; +export {SourceSpan} from './source_span'; + +/** + * The options passed to {@link Logger.warn}. + * + * * `deprecation`: Whether this is a deprecation warning. + * + * * `deprecationType`: The type of deprecation. Only set if `deprecation` is + * true. + * + * * `span`: The location in the Sass source code that generated this warning. + * This may be unset if the warning didn't come from Sass source, for + * example if it's from a deprecated JavaScript option. + * + * * `stack`: The Sass stack trace at the point the warning was issued. This may + * be unset if the warning didn't come from Sass source, for example if it's + * from a deprecated JavaScript option. + * + * @category Logger + */ +export type LoggerWarnOptions = ( + | { + deprecation: true; + deprecationType: Deprecation; + } + | {deprecation: false} +) & { + span?: SourceSpan; + stack?: string; +}; + +/** + * An object that can be passed to {@link LegacySharedOptions.logger} to control + * how Sass emits warnings and debug messages. + * + * @example + * + * ```js + * const fs = require('fs'); + * const sass = require('sass'); + * + * let log = ""; + * sass.renderSync({ + * file: 'input.scss', + * logger: { + * warn(message, options) { + * if (options.span) { + * log += `${span.url}:${span.start.line}:${span.start.column}: ` + + * `${message}\n`; + * } else { + * log += `::: ${message}\n`; + * } + * } + * } + * }); + * + * fs.writeFileSync('log.txt', log); + * ``` + * + * @category Logger + */ +export interface Logger { + /** + * This method is called when Sass emits a warning, whether due to a [`@warn` + * rule](https://sass-lang.com/documentation/at-rules/warn) or a warning + * generated by the Sass compiler. + * + * If this is `undefined`, Sass will print warnings to standard error. + * + * `options` may contain the following fields: + * + * @param message - The warning message. + */ + warn?(message: string, options: LoggerWarnOptions): void; + + /** + * This method is called when Sass emits a debug message due to a [`@debug` + * rule](https://sass-lang.com/documentation/at-rules/debug). + * + * If this is `undefined`, Sass will print debug messages to standard error. + * + * @param message - The debug message. + * @param options.span - The location in the Sass source code that generated this + * debug message. + */ + debug?(message: string, options: {span: SourceSpan}): void; +} + +/** + * A namespace for built-in {@link Logger}s. + * + * @category Logger + * @compatibility dart: "1.43.0", node: false + */ +export namespace Logger { + /** + * A {@link Logger} that silently ignores all warnings and debug messages. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.renderSync({ + * file: 'input.scss', + * logger: sass.Logger.silent, + * }); + * ``` + */ + export const silent: Logger; +} diff --git a/node_modules/sass/types/logger/source_location.d.ts b/node_modules/sass/types/logger/source_location.d.ts new file mode 100644 index 0000000..7192714 --- /dev/null +++ b/node_modules/sass/types/logger/source_location.d.ts @@ -0,0 +1,21 @@ +/** + * A specific location within a source file. + * + * This is always associated with a {@link SourceSpan} which indicates *which* + * file it refers to. + * + * @category Logger + */ +export interface SourceLocation { + /** + * The 0-based index of this location within its source file, in terms of + * UTF-16 code units. + */ + offset: number; + + /** The 0-based line number of this location. */ + line: number; + + /** The 0-based column number of this location. */ + column: number; +} diff --git a/node_modules/sass/types/logger/source_span.d.ts b/node_modules/sass/types/logger/source_span.d.ts new file mode 100644 index 0000000..88eb47f --- /dev/null +++ b/node_modules/sass/types/logger/source_span.d.ts @@ -0,0 +1,34 @@ +import {SourceLocation} from './source_location'; + +/** + * A span of text within a source file. + * + * @category Logger + */ +export interface SourceSpan { + /** The beginning of this span, inclusive. */ + start: SourceLocation; + + /** + * The end of this span, exclusive. + * + * If {@link start} and {@link end} refer to the same location, the span has + * zero length and refers to the point immediately after {@link start} and + * before the next character. + */ + end: SourceLocation; + + /** The canonical URL of the file this span refers to. */ + url?: URL; + + /** The text covered by the span. */ + text: string; + + /** + * Text surrounding the span. + * + * If this is set, it must include only whole lines, and it must include at + * least all line(s) which are partially covered by this span. + */ + context?: string; +} diff --git a/node_modules/sass/types/options.d.ts b/node_modules/sass/types/options.d.ts new file mode 100644 index 0000000..124bdb9 --- /dev/null +++ b/node_modules/sass/types/options.d.ts @@ -0,0 +1,455 @@ +import {DeprecationOrId, Version} from './deprecations'; +import {FileImporter, Importer, NodePackageImporter} from './importer'; +import {Logger} from './logger'; +import {Value} from './value'; +import {PromiseOr} from './util/promise_or'; + +/** + * Syntaxes supported by Sass: + * + * - `'scss'` is the [SCSS + * syntax](https://sass-lang.com/documentation/syntax#scss). + * - `'indented'` is the [indented + * syntax](https://sass-lang.com/documentation/syntax#the-indented-syntax) + * - `'css'` is plain CSS, which is parsed like SCSS but forbids the use of any + * special Sass features. + * + * @category Options + */ +export type Syntax = 'scss' | 'indented' | 'css'; + +/** + * Possible output styles for the compiled CSS: + * + * - `"expanded"` (the default for Dart Sass) writes each selector and + * declaration on its own line. + * + * - `"compressed"` removes as many extra characters as possible, and writes + * the entire stylesheet on a single line. + * + * @category Options + */ +export type OutputStyle = 'expanded' | 'compressed'; + +/** + * A callback that implements a custom Sass function. This can be passed to + * {@link Options.functions}. + * + * ```js + * const result = sass.compile('style.scss', { + * functions: { + * "sum($arg1, $arg2)": (args) => { + * const arg1 = args[0].assertNumber('arg1'); + * const value1 = arg1.value; + * const value2 = args[1].assertNumber('arg2') + * .convertValueToMatch(arg1, 'arg2', 'arg1'); + * return new sass.SassNumber(value1 + value2).coerceToMatch(arg1); + * } + * } + * }); + * ``` + * + * @typeParam sync - A `CustomFunction<'sync'>` must return synchronously, but + * in return it can be passed to {@link compile} and {@link compileString} in + * addition to {@link compileAsync} and {@link compileStringAsync}. + * + * A `CustomFunction<'async'>` may either return synchronously or + * asynchronously, but it can only be used with {@link compileAsync} and {@link + * compileStringAsync}. + * + * @param args - An array of arguments passed by the function's caller. If the + * function takes [arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * the last element will be a {@link SassArgumentList}. + * + * @returns The function's result. This may be in the form of a `Promise`, but + * if it is the function may only be passed to {@link compileAsync} and {@link + * compileStringAsync}, not {@link compile} or {@link compileString}. + * + * @throws any - This function may throw an error, which the Sass compiler will + * treat as the function call failing. If the exception object has a `message` + * property, it will be used as the wrapped exception's message; otherwise, the + * exception object's `toString()` will be used. This means it's safe for custom + * functions to throw plain strings. + * + * @category Custom Function + */ +export type CustomFunction = ( + args: Value[] +) => PromiseOr; + +/** + * Options that can be passed to {@link compile}, {@link compileAsync}, {@link + * compileString}, or {@link compileStringAsync}. + * + * @typeParam sync - This lets the TypeScript checker verify that asynchronous + * {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't + * passed to {@link compile} or {@link compileString}. + * + * @category Options + */ +export interface Options { + /** + * If this is `true`, the compiler will exclusively use ASCII characters in + * its error and warning messages. Otherwise, it may use non-ASCII Unicode + * characters as well. + * + * @defaultValue `false` + * @category Messages + */ + alertAscii?: boolean; + + /** + * If this is `true`, the compiler will use ANSI color escape codes in its + * error and warning messages. If it's `false`, it won't use these. If it's + * undefined, the compiler will determine whether or not to use colors + * depending on whether the user is using an interactive terminal. + * + * @category Messages + */ + alertColor?: boolean; + + /** + * If `true`, the compiler may prepend `@charset "UTF-8";` or U+FEFF + * (byte-order marker) if it outputs non-ASCII CSS. + * + * If `false`, the compiler never emits these byte sequences. This is ideal + * when concatenating or embedding in HTML ` + + + + +
+

~{linked-path}

+ {files} +
+ + \ No newline at end of file diff --git a/node_modules/serve-index/public/icons/application_xp.png b/node_modules/serve-index/public/icons/application_xp.png new file mode 100644 index 0000000..d22860a Binary files /dev/null and b/node_modules/serve-index/public/icons/application_xp.png differ diff --git a/node_modules/serve-index/public/icons/application_xp_terminal.png b/node_modules/serve-index/public/icons/application_xp_terminal.png new file mode 100644 index 0000000..c28dd63 Binary files /dev/null and b/node_modules/serve-index/public/icons/application_xp_terminal.png differ diff --git a/node_modules/serve-index/public/icons/box.png b/node_modules/serve-index/public/icons/box.png new file mode 100644 index 0000000..8443c23 Binary files /dev/null and b/node_modules/serve-index/public/icons/box.png differ diff --git a/node_modules/serve-index/public/icons/cd.png b/node_modules/serve-index/public/icons/cd.png new file mode 100644 index 0000000..ef43223 Binary files /dev/null and b/node_modules/serve-index/public/icons/cd.png differ diff --git a/node_modules/serve-index/public/icons/controller.png b/node_modules/serve-index/public/icons/controller.png new file mode 100644 index 0000000..5cf76ed Binary files /dev/null and b/node_modules/serve-index/public/icons/controller.png differ diff --git a/node_modules/serve-index/public/icons/drive.png b/node_modules/serve-index/public/icons/drive.png new file mode 100644 index 0000000..37b7c9b Binary files /dev/null and b/node_modules/serve-index/public/icons/drive.png differ diff --git a/node_modules/serve-index/public/icons/film.png b/node_modules/serve-index/public/icons/film.png new file mode 100644 index 0000000..b0ce7bb Binary files /dev/null and b/node_modules/serve-index/public/icons/film.png differ diff --git a/node_modules/serve-index/public/icons/folder.png b/node_modules/serve-index/public/icons/folder.png new file mode 100644 index 0000000..698f3d3 Binary files /dev/null and b/node_modules/serve-index/public/icons/folder.png differ diff --git a/node_modules/serve-index/public/icons/font.png b/node_modules/serve-index/public/icons/font.png new file mode 100644 index 0000000..b7960db Binary files /dev/null and b/node_modules/serve-index/public/icons/font.png differ diff --git a/node_modules/serve-index/public/icons/image.png b/node_modules/serve-index/public/icons/image.png new file mode 100644 index 0000000..fc3c393 Binary files /dev/null and b/node_modules/serve-index/public/icons/image.png differ diff --git a/node_modules/serve-index/public/icons/map.png b/node_modules/serve-index/public/icons/map.png new file mode 100644 index 0000000..f90ef25 Binary files /dev/null and b/node_modules/serve-index/public/icons/map.png differ diff --git a/node_modules/serve-index/public/icons/page.png b/node_modules/serve-index/public/icons/page.png new file mode 100644 index 0000000..03ddd79 Binary files /dev/null and b/node_modules/serve-index/public/icons/page.png differ diff --git a/node_modules/serve-index/public/icons/page_add.png b/node_modules/serve-index/public/icons/page_add.png new file mode 100644 index 0000000..d5bfa07 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_add.png differ diff --git a/node_modules/serve-index/public/icons/page_attach.png b/node_modules/serve-index/public/icons/page_attach.png new file mode 100644 index 0000000..89ee2da Binary files /dev/null and b/node_modules/serve-index/public/icons/page_attach.png differ diff --git a/node_modules/serve-index/public/icons/page_code.png b/node_modules/serve-index/public/icons/page_code.png new file mode 100644 index 0000000..f7ea904 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_code.png differ diff --git a/node_modules/serve-index/public/icons/page_copy.png b/node_modules/serve-index/public/icons/page_copy.png new file mode 100644 index 0000000..195dc6d Binary files /dev/null and b/node_modules/serve-index/public/icons/page_copy.png differ diff --git a/node_modules/serve-index/public/icons/page_delete.png b/node_modules/serve-index/public/icons/page_delete.png new file mode 100644 index 0000000..3141467 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_delete.png differ diff --git a/node_modules/serve-index/public/icons/page_edit.png b/node_modules/serve-index/public/icons/page_edit.png new file mode 100644 index 0000000..046811e Binary files /dev/null and b/node_modules/serve-index/public/icons/page_edit.png differ diff --git a/node_modules/serve-index/public/icons/page_error.png b/node_modules/serve-index/public/icons/page_error.png new file mode 100644 index 0000000..f07f449 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_error.png differ diff --git a/node_modules/serve-index/public/icons/page_excel.png b/node_modules/serve-index/public/icons/page_excel.png new file mode 100644 index 0000000..eb6158e Binary files /dev/null and b/node_modules/serve-index/public/icons/page_excel.png differ diff --git a/node_modules/serve-index/public/icons/page_find.png b/node_modules/serve-index/public/icons/page_find.png new file mode 100644 index 0000000..2f19388 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_find.png differ diff --git a/node_modules/serve-index/public/icons/page_gear.png b/node_modules/serve-index/public/icons/page_gear.png new file mode 100644 index 0000000..8e83281 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_gear.png differ diff --git a/node_modules/serve-index/public/icons/page_go.png b/node_modules/serve-index/public/icons/page_go.png new file mode 100644 index 0000000..80fe1ed Binary files /dev/null and b/node_modules/serve-index/public/icons/page_go.png differ diff --git a/node_modules/serve-index/public/icons/page_green.png b/node_modules/serve-index/public/icons/page_green.png new file mode 100644 index 0000000..de8e003 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_green.png differ diff --git a/node_modules/serve-index/public/icons/page_key.png b/node_modules/serve-index/public/icons/page_key.png new file mode 100644 index 0000000..d6626cb Binary files /dev/null and b/node_modules/serve-index/public/icons/page_key.png differ diff --git a/node_modules/serve-index/public/icons/page_lightning.png b/node_modules/serve-index/public/icons/page_lightning.png new file mode 100644 index 0000000..7e56870 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_lightning.png differ diff --git a/node_modules/serve-index/public/icons/page_link.png b/node_modules/serve-index/public/icons/page_link.png new file mode 100644 index 0000000..312eab0 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_link.png differ diff --git a/node_modules/serve-index/public/icons/page_paintbrush.png b/node_modules/serve-index/public/icons/page_paintbrush.png new file mode 100644 index 0000000..246a2f0 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_paintbrush.png differ diff --git a/node_modules/serve-index/public/icons/page_paste.png b/node_modules/serve-index/public/icons/page_paste.png new file mode 100644 index 0000000..968f073 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_paste.png differ diff --git a/node_modules/serve-index/public/icons/page_red.png b/node_modules/serve-index/public/icons/page_red.png new file mode 100644 index 0000000..0b18247 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_red.png differ diff --git a/node_modules/serve-index/public/icons/page_refresh.png b/node_modules/serve-index/public/icons/page_refresh.png new file mode 100644 index 0000000..cf347c7 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_refresh.png differ diff --git a/node_modules/serve-index/public/icons/page_save.png b/node_modules/serve-index/public/icons/page_save.png new file mode 100644 index 0000000..caea546 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_save.png differ diff --git a/node_modules/serve-index/public/icons/page_white.png b/node_modules/serve-index/public/icons/page_white.png new file mode 100644 index 0000000..8b8b1ca Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white.png differ diff --git a/node_modules/serve-index/public/icons/page_white_acrobat.png b/node_modules/serve-index/public/icons/page_white_acrobat.png new file mode 100644 index 0000000..8f8095e Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_acrobat.png differ diff --git a/node_modules/serve-index/public/icons/page_white_actionscript.png b/node_modules/serve-index/public/icons/page_white_actionscript.png new file mode 100644 index 0000000..159b240 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_actionscript.png differ diff --git a/node_modules/serve-index/public/icons/page_white_add.png b/node_modules/serve-index/public/icons/page_white_add.png new file mode 100644 index 0000000..aa23dde Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_add.png differ diff --git a/node_modules/serve-index/public/icons/page_white_c.png b/node_modules/serve-index/public/icons/page_white_c.png new file mode 100644 index 0000000..34a05cc Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_c.png differ diff --git a/node_modules/serve-index/public/icons/page_white_camera.png b/node_modules/serve-index/public/icons/page_white_camera.png new file mode 100644 index 0000000..f501a59 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_camera.png differ diff --git a/node_modules/serve-index/public/icons/page_white_cd.png b/node_modules/serve-index/public/icons/page_white_cd.png new file mode 100644 index 0000000..848bdaf Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_cd.png differ diff --git a/node_modules/serve-index/public/icons/page_white_code.png b/node_modules/serve-index/public/icons/page_white_code.png new file mode 100644 index 0000000..0c76bd1 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_code.png differ diff --git a/node_modules/serve-index/public/icons/page_white_code_red.png b/node_modules/serve-index/public/icons/page_white_code_red.png new file mode 100644 index 0000000..87a6914 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_code_red.png differ diff --git a/node_modules/serve-index/public/icons/page_white_coldfusion.png b/node_modules/serve-index/public/icons/page_white_coldfusion.png new file mode 100644 index 0000000..c66011f Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_coldfusion.png differ diff --git a/node_modules/serve-index/public/icons/page_white_compressed.png b/node_modules/serve-index/public/icons/page_white_compressed.png new file mode 100644 index 0000000..2b6b100 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_compressed.png differ diff --git a/node_modules/serve-index/public/icons/page_white_copy.png b/node_modules/serve-index/public/icons/page_white_copy.png new file mode 100644 index 0000000..a9f31a2 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_copy.png differ diff --git a/node_modules/serve-index/public/icons/page_white_cplusplus.png b/node_modules/serve-index/public/icons/page_white_cplusplus.png new file mode 100644 index 0000000..a87cf84 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_cplusplus.png differ diff --git a/node_modules/serve-index/public/icons/page_white_csharp.png b/node_modules/serve-index/public/icons/page_white_csharp.png new file mode 100644 index 0000000..ffb8fc9 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_csharp.png differ diff --git a/node_modules/serve-index/public/icons/page_white_cup.png b/node_modules/serve-index/public/icons/page_white_cup.png new file mode 100644 index 0000000..0a7d6f4 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_cup.png differ diff --git a/node_modules/serve-index/public/icons/page_white_database.png b/node_modules/serve-index/public/icons/page_white_database.png new file mode 100644 index 0000000..bddba1f Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_database.png differ diff --git a/node_modules/serve-index/public/icons/page_white_delete.png b/node_modules/serve-index/public/icons/page_white_delete.png new file mode 100644 index 0000000..af1ecaf Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_delete.png differ diff --git a/node_modules/serve-index/public/icons/page_white_dvd.png b/node_modules/serve-index/public/icons/page_white_dvd.png new file mode 100644 index 0000000..4cc537a Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_dvd.png differ diff --git a/node_modules/serve-index/public/icons/page_white_edit.png b/node_modules/serve-index/public/icons/page_white_edit.png new file mode 100644 index 0000000..b93e776 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_edit.png differ diff --git a/node_modules/serve-index/public/icons/page_white_error.png b/node_modules/serve-index/public/icons/page_white_error.png new file mode 100644 index 0000000..9fc5a0a Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_error.png differ diff --git a/node_modules/serve-index/public/icons/page_white_excel.png b/node_modules/serve-index/public/icons/page_white_excel.png new file mode 100644 index 0000000..b977d7e Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_excel.png differ diff --git a/node_modules/serve-index/public/icons/page_white_find.png b/node_modules/serve-index/public/icons/page_white_find.png new file mode 100644 index 0000000..5818436 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_find.png differ diff --git a/node_modules/serve-index/public/icons/page_white_flash.png b/node_modules/serve-index/public/icons/page_white_flash.png new file mode 100644 index 0000000..5769120 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_flash.png differ diff --git a/node_modules/serve-index/public/icons/page_white_freehand.png b/node_modules/serve-index/public/icons/page_white_freehand.png new file mode 100644 index 0000000..8d719df Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_freehand.png differ diff --git a/node_modules/serve-index/public/icons/page_white_gear.png b/node_modules/serve-index/public/icons/page_white_gear.png new file mode 100644 index 0000000..106f5aa Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_gear.png differ diff --git a/node_modules/serve-index/public/icons/page_white_get.png b/node_modules/serve-index/public/icons/page_white_get.png new file mode 100644 index 0000000..e4a1ecb Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_get.png differ diff --git a/node_modules/serve-index/public/icons/page_white_go.png b/node_modules/serve-index/public/icons/page_white_go.png new file mode 100644 index 0000000..7e62a92 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_go.png differ diff --git a/node_modules/serve-index/public/icons/page_white_h.png b/node_modules/serve-index/public/icons/page_white_h.png new file mode 100644 index 0000000..e902abb Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_h.png differ diff --git a/node_modules/serve-index/public/icons/page_white_horizontal.png b/node_modules/serve-index/public/icons/page_white_horizontal.png new file mode 100644 index 0000000..1d2d0a4 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_horizontal.png differ diff --git a/node_modules/serve-index/public/icons/page_white_key.png b/node_modules/serve-index/public/icons/page_white_key.png new file mode 100644 index 0000000..d616484 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_key.png differ diff --git a/node_modules/serve-index/public/icons/page_white_lightning.png b/node_modules/serve-index/public/icons/page_white_lightning.png new file mode 100644 index 0000000..7215d1e Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_lightning.png differ diff --git a/node_modules/serve-index/public/icons/page_white_link.png b/node_modules/serve-index/public/icons/page_white_link.png new file mode 100644 index 0000000..bf7bd1c Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_link.png differ diff --git a/node_modules/serve-index/public/icons/page_white_magnify.png b/node_modules/serve-index/public/icons/page_white_magnify.png new file mode 100644 index 0000000..f6b74cc Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_magnify.png differ diff --git a/node_modules/serve-index/public/icons/page_white_medal.png b/node_modules/serve-index/public/icons/page_white_medal.png new file mode 100644 index 0000000..d3fffb6 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_medal.png differ diff --git a/node_modules/serve-index/public/icons/page_white_office.png b/node_modules/serve-index/public/icons/page_white_office.png new file mode 100644 index 0000000..a65bcb3 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_office.png differ diff --git a/node_modules/serve-index/public/icons/page_white_paint.png b/node_modules/serve-index/public/icons/page_white_paint.png new file mode 100644 index 0000000..23a37b8 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_paint.png differ diff --git a/node_modules/serve-index/public/icons/page_white_paintbrush.png b/node_modules/serve-index/public/icons/page_white_paintbrush.png new file mode 100644 index 0000000..f907e44 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_paintbrush.png differ diff --git a/node_modules/serve-index/public/icons/page_white_paste.png b/node_modules/serve-index/public/icons/page_white_paste.png new file mode 100644 index 0000000..5b2cbb3 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_paste.png differ diff --git a/node_modules/serve-index/public/icons/page_white_php.png b/node_modules/serve-index/public/icons/page_white_php.png new file mode 100644 index 0000000..7868a25 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_php.png differ diff --git a/node_modules/serve-index/public/icons/page_white_picture.png b/node_modules/serve-index/public/icons/page_white_picture.png new file mode 100644 index 0000000..134b669 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_picture.png differ diff --git a/node_modules/serve-index/public/icons/page_white_powerpoint.png b/node_modules/serve-index/public/icons/page_white_powerpoint.png new file mode 100644 index 0000000..c4eff03 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_powerpoint.png differ diff --git a/node_modules/serve-index/public/icons/page_white_put.png b/node_modules/serve-index/public/icons/page_white_put.png new file mode 100644 index 0000000..884ffd6 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_put.png differ diff --git a/node_modules/serve-index/public/icons/page_white_ruby.png b/node_modules/serve-index/public/icons/page_white_ruby.png new file mode 100644 index 0000000..f59b7c4 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_ruby.png differ diff --git a/node_modules/serve-index/public/icons/page_white_stack.png b/node_modules/serve-index/public/icons/page_white_stack.png new file mode 100644 index 0000000..44084ad Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_stack.png differ diff --git a/node_modules/serve-index/public/icons/page_white_star.png b/node_modules/serve-index/public/icons/page_white_star.png new file mode 100644 index 0000000..3a1441c Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_star.png differ diff --git a/node_modules/serve-index/public/icons/page_white_swoosh.png b/node_modules/serve-index/public/icons/page_white_swoosh.png new file mode 100644 index 0000000..e770829 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_swoosh.png differ diff --git a/node_modules/serve-index/public/icons/page_white_text.png b/node_modules/serve-index/public/icons/page_white_text.png new file mode 100644 index 0000000..813f712 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_text.png differ diff --git a/node_modules/serve-index/public/icons/page_white_text_width.png b/node_modules/serve-index/public/icons/page_white_text_width.png new file mode 100644 index 0000000..d9cf132 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_text_width.png differ diff --git a/node_modules/serve-index/public/icons/page_white_tux.png b/node_modules/serve-index/public/icons/page_white_tux.png new file mode 100644 index 0000000..52699bf Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_tux.png differ diff --git a/node_modules/serve-index/public/icons/page_white_vector.png b/node_modules/serve-index/public/icons/page_white_vector.png new file mode 100644 index 0000000..4a05955 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_vector.png differ diff --git a/node_modules/serve-index/public/icons/page_white_visualstudio.png b/node_modules/serve-index/public/icons/page_white_visualstudio.png new file mode 100644 index 0000000..a0a433d Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_visualstudio.png differ diff --git a/node_modules/serve-index/public/icons/page_white_width.png b/node_modules/serve-index/public/icons/page_white_width.png new file mode 100644 index 0000000..1eb8809 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_width.png differ diff --git a/node_modules/serve-index/public/icons/page_white_word.png b/node_modules/serve-index/public/icons/page_white_word.png new file mode 100644 index 0000000..ae8ecbf Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_word.png differ diff --git a/node_modules/serve-index/public/icons/page_white_world.png b/node_modules/serve-index/public/icons/page_white_world.png new file mode 100644 index 0000000..6ed2490 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_world.png differ diff --git a/node_modules/serve-index/public/icons/page_white_wrench.png b/node_modules/serve-index/public/icons/page_white_wrench.png new file mode 100644 index 0000000..fecadd0 Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_wrench.png differ diff --git a/node_modules/serve-index/public/icons/page_white_zip.png b/node_modules/serve-index/public/icons/page_white_zip.png new file mode 100644 index 0000000..fd4bbcc Binary files /dev/null and b/node_modules/serve-index/public/icons/page_white_zip.png differ diff --git a/node_modules/serve-index/public/icons/page_word.png b/node_modules/serve-index/public/icons/page_word.png new file mode 100644 index 0000000..834cdfa Binary files /dev/null and b/node_modules/serve-index/public/icons/page_word.png differ diff --git a/node_modules/serve-index/public/icons/page_world.png b/node_modules/serve-index/public/icons/page_world.png new file mode 100644 index 0000000..b8895dd Binary files /dev/null and b/node_modules/serve-index/public/icons/page_world.png differ diff --git a/node_modules/serve-index/public/style.css b/node_modules/serve-index/public/style.css new file mode 100644 index 0000000..eb99dc9 --- /dev/null +++ b/node_modules/serve-index/public/style.css @@ -0,0 +1,257 @@ +* { + margin: 0; + padding: 0; + outline: 0; +} + +body { + padding: 80px 100px; + font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; + background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); + background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); + background-repeat: no-repeat; + color: #555; + -webkit-font-smoothing: antialiased; +} +h1, h2, h3 { + font-size: 22px; + color: #343434; +} +h1 em, h2 em { + padding: 0 5px; + font-weight: normal; +} +h1 { + font-size: 60px; +} +h2 { + margin-top: 10px; +} +h3 { + margin: 5px 0 10px 0; + padding-bottom: 5px; + border-bottom: 1px solid #eee; + font-size: 18px; +} +ul li { + list-style: none; +} +ul li:hover { + cursor: pointer; + color: #2e2e2e; +} +ul li .path { + padding-left: 5px; + font-weight: bold; +} +ul li .line { + padding-right: 5px; + font-style: italic; +} +ul li:first-child .path { + padding-left: 0; +} +p { + line-height: 1.5; +} +a { + color: #555; + text-decoration: none; +} +a:hover { + color: #303030; +} +#stacktrace { + margin-top: 15px; +} +.directory h1 { + margin-bottom: 15px; + font-size: 18px; +} +ul#files { + width: 100%; + height: 100%; + overflow: hidden; +} +ul#files li { + float: left; + width: 30%; + line-height: 25px; + margin: 1px; +} +ul#files li a { + display: block; + height: 25px; + border: 1px solid transparent; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + overflow: hidden; + white-space: nowrap; +} +ul#files li a:focus, +ul#files li a:hover { + background: rgba(255,255,255,0.65); + border: 1px solid #ececec; +} +ul#files li a.highlight { + -webkit-transition: background .4s ease-in-out; + background: #ffff4f; + border-color: #E9DC51; +} +#search { + display: block; + position: fixed; + top: 20px; + right: 20px; + width: 90px; + -webkit-transition: width ease 0.2s, opacity ease 0.4s; + -moz-transition: width ease 0.2s, opacity ease 0.4s; + -webkit-border-radius: 32px; + -moz-border-radius: 32px; + -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); + -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); + -webkit-font-smoothing: antialiased; + text-align: left; + font: 13px "Helvetica Neue", Arial, sans-serif; + padding: 4px 10px; + border: none; + background: transparent; + margin-bottom: 0; + outline: none; + opacity: 0.7; + color: #888; +} +#search:focus { + width: 120px; + opacity: 1.0; +} + +/*views*/ +#files span { + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + text-indent: 10px; +} +#files .name { + background-repeat: no-repeat; +} +#files .icon .name { + text-indent: 28px; +} + +/*tiles*/ +.view-tiles .name { + width: 100%; + background-position: 8px 5px; +} +.view-tiles .size, +.view-tiles .date { + display: none; +} + +/*details*/ +ul#files.view-details li { + float: none; + display: block; + width: 90%; +} +ul#files.view-details li.header { + height: 25px; + background: #000; + color: #fff; + font-weight: bold; +} +.view-details .header { + border-radius: 5px; +} +.view-details .name { + width: 60%; + background-position: 8px 5px; +} +.view-details .size { + width: 10%; +} +.view-details .date { + width: 30%; +} +.view-details .size, +.view-details .date { + text-align: right; + direction: rtl; +} + +/*mobile*/ +@media (max-width: 768px) { + body { + font-size: 13px; + line-height: 16px; + padding: 0; + } + #search { + position: static; + width: 100%; + font-size: 2em; + line-height: 1.8em; + text-indent: 10px; + border: 0; + border-radius: 0; + padding: 10px 0; + margin: 0; + } + #search:focus { + width: 100%; + border: 0; + opacity: 1; + } + .directory h1 { + font-size: 2em; + line-height: 1.5em; + color: #fff; + background: #000; + padding: 15px 10px; + margin: 0; + } + ul#files { + border-top: 1px solid #cacaca; + } + ul#files li { + float: none; + width: auto !important; + display: block; + border-bottom: 1px solid #cacaca; + font-size: 2em; + line-height: 1.2em; + text-indent: 0; + margin: 0; + } + ul#files li:nth-child(odd) { + background: #e0e0e0; + } + ul#files li a { + height: auto; + border: 0; + border-radius: 0; + padding: 15px 10px; + } + ul#files li a:focus, + ul#files li a:hover { + border: 0; + } + #files .header, + #files .size, + #files .date { + display: none !important; + } + #files .name { + float: none; + display: inline-block; + width: 100%; + text-indent: 0; + background-position: 0 50%; + } + #files .icon .name { + text-indent: 41px; + } +} diff --git a/node_modules/set-function-length/.eslintrc b/node_modules/set-function-length/.eslintrc new file mode 100644 index 0000000..7cff507 --- /dev/null +++ b/node_modules/set-function-length/.eslintrc @@ -0,0 +1,27 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic" + ], + }], + "no-extra-parens": "off", + }, + + "overrides": [ + { + "files": ["test/**/*.js"], + "rules": { + "id-length": "off", + "max-lines-per-function": "off", + "multiline-comment-style": "off", + "no-empty-function": "off", + }, + }, + ], +} diff --git a/node_modules/set-function-length/.github/FUNDING.yml b/node_modules/set-function-length/.github/FUNDING.yml new file mode 100644 index 0000000..92feb6f --- /dev/null +++ b/node_modules/set-function-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/set-function-name +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/set-function-length/.nycrc b/node_modules/set-function-length/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/set-function-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/set-function-length/CHANGELOG.md b/node_modules/set-function-length/CHANGELOG.md new file mode 100644 index 0000000..bac439d --- /dev/null +++ b/node_modules/set-function-length/CHANGELOG.md @@ -0,0 +1,70 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.2](https://github.com/ljharb/set-function-length/compare/v1.2.1...v1.2.2) - 2024-03-09 + +### Commits + +- [types] use shared config [`027032f`](https://github.com/ljharb/set-function-length/commit/027032fe9cc439644a07248ea6a8d813fcc767cb) +- [actions] remove redundant finisher; use reusable workflow [`1fd4fb1`](https://github.com/ljharb/set-function-length/commit/1fd4fb1c58bd5170f0dcff7e320077c0aa2ffdeb) +- [types] use a handwritten d.ts file instead of emit [`01b9761`](https://github.com/ljharb/set-function-length/commit/01b9761742c95e1118e8c2d153ce2ae43d9731aa) +- [Deps] update `define-data-property`, `get-intrinsic`, `has-property-descriptors` [`bee8eaf`](https://github.com/ljharb/set-function-length/commit/bee8eaf7749f325357ade85cffeaeef679e513d4) +- [Dev Deps] update `call-bind`, `tape` [`5dae579`](https://github.com/ljharb/set-function-length/commit/5dae579fdc3aab91b14ebb58f9c19ee3f509d434) +- [Tests] use `@arethetypeswrong/cli` [`7e22425`](https://github.com/ljharb/set-function-length/commit/7e22425d15957fd3d6da0b6bca4afc0c8d255d2d) + +## [v1.2.1](https://github.com/ljharb/set-function-length/compare/v1.2.0...v1.2.1) - 2024-02-06 + +### Commits + +- [Dev Deps] update `call-bind`, `tape`, `typescript` [`d9a4601`](https://github.com/ljharb/set-function-length/commit/d9a460199c4c1fa37da9ebe055e2c884128f0738) +- [Deps] update `define-data-property`, `get-intrinsic` [`38d39ae`](https://github.com/ljharb/set-function-length/commit/38d39aed13a757ed36211d5b0437b88485090c6b) +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`b4bfe5a`](https://github.com/ljharb/set-function-length/commit/b4bfe5ae0953b906d55b85f867eca5e7f673ebf4) + +## [v1.2.0](https://github.com/ljharb/set-function-length/compare/v1.1.1...v1.2.0) - 2024-01-14 + +### Commits + +- [New] add types [`f6d9088`](https://github.com/ljharb/set-function-length/commit/f6d9088b9283a3112b21c6776e8bef6d1f30558a) +- [Fix] ensure `env` properties are always booleans [`0c42f84`](https://github.com/ljharb/set-function-length/commit/0c42f84979086389b3229e1b4272697fd352275a) +- [Dev Deps] update `aud`, `call-bind`, `npmignore`, `tape` [`2b75f75`](https://github.com/ljharb/set-function-length/commit/2b75f75468093a4bb8ce8ca989b2edd2e80d95d1) +- [Deps] update `get-intrinsic`, `has-property-descriptors` [`19bf0fc`](https://github.com/ljharb/set-function-length/commit/19bf0fc4ffaa5ad425acbfa150516be9f3b6263a) +- [meta] add `sideEffects` flag [`8bb9b78`](https://github.com/ljharb/set-function-length/commit/8bb9b78c11c621123f725c9470222f43466c01d0) + +## [v1.1.1](https://github.com/ljharb/set-function-length/compare/v1.1.0...v1.1.1) - 2023-10-19 + +### Fixed + +- [Fix] move `define-data-property` to runtime deps [`#2`](https://github.com/ljharb/set-function-length/issues/2) + +### Commits + +- [Dev Deps] update `object-inspect`; add missing `call-bind` [`5aecf79`](https://github.com/ljharb/set-function-length/commit/5aecf79e7d6400957a5d9bd9ac20d4528908ca18) + +## [v1.1.0](https://github.com/ljharb/set-function-length/compare/v1.0.1...v1.1.0) - 2023-10-13 + +### Commits + +- [New] add `env` entry point [`475c87a`](https://github.com/ljharb/set-function-length/commit/475c87aa2f59b700aaed589d980624ec596acdcb) +- [Tests] add coverage with `nyc` [`14f0bf8`](https://github.com/ljharb/set-function-length/commit/14f0bf8c145ae60bf14a026420a06bb7be132c36) +- [eslint] fix linting failure [`fb516f9`](https://github.com/ljharb/set-function-length/commit/fb516f93c664057138c53559ef63c8622a093335) +- [Deps] update `define-data-property` [`d727e7c`](https://github.com/ljharb/set-function-length/commit/d727e7c6c9a40d7bf26797694e500ea68741feea) + +## [v1.0.1](https://github.com/ljharb/set-function-length/compare/v1.0.0...v1.0.1) - 2023-10-12 + +### Commits + +- [Refactor] use `get-intrinsic`, since it‘s in the dep graph anyways [`278a954`](https://github.com/ljharb/set-function-length/commit/278a954a06cd849051c569ff7aee56df6798933e) +- [meta] add `exports` [`72acfe5`](https://github.com/ljharb/set-function-length/commit/72acfe5a0310071fb205a72caba5ecbab24336a0) + +## v1.0.0 - 2023-10-12 + +### Commits + +- Initial implementation, tests, readme [`fce14e1`](https://github.com/ljharb/set-function-length/commit/fce14e17586460e4f294405173be72b6ffdf7e5f) +- Initial commit [`ca7ba85`](https://github.com/ljharb/set-function-length/commit/ca7ba857c7c283f9d26e21f14e71cd388f2cb722) +- npm init [`6a7e493`](https://github.com/ljharb/set-function-length/commit/6a7e493927736cebcaf5c1a84e69b8e6b7b744d8) +- Only apps should have lockfiles [`d2bf6c4`](https://github.com/ljharb/set-function-length/commit/d2bf6c43de8a51b02a0aa53e8d62cb50c4a2b0da) diff --git a/node_modules/set-function-length/LICENSE b/node_modules/set-function-length/LICENSE new file mode 100644 index 0000000..0314929 --- /dev/null +++ b/node_modules/set-function-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/set-function-length/README.md b/node_modules/set-function-length/README.md new file mode 100644 index 0000000..15e3ac4 --- /dev/null +++ b/node_modules/set-function-length/README.md @@ -0,0 +1,56 @@ +# set-function-length [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Set a function’s length. + +Arguments: + - `fn`: the function + - `length`: the new length. Must be an integer between 0 and 2**32. + - `loose`: Optional. If true, and the length fails to be set, do not throw. Default false. + +Returns `fn`. + +## Usage + +```javascript +var setFunctionLength = require('set-function-length'); +var assert = require('assert'); + +function zero() {} +function one(_) {} +function two(_, __) {} + +assert.equal(zero.length, 0); +assert.equal(one.length, 1); +assert.equal(two.length, 2); + +assert.equal(setFunctionLength(zero, 10), zero); +assert.equal(setFunctionLength(one, 11), one); +assert.equal(setFunctionLength(two, 12), two); + +assert.equal(zero.length, 10); +assert.equal(one.length, 11); +assert.equal(two.length, 12); +``` + +[package-url]: https://npmjs.org/package/set-function-length +[npm-version-svg]: https://versionbadg.es/ljharb/set-function-length.svg +[deps-svg]: https://david-dm.org/ljharb/set-function-length.svg +[deps-url]: https://david-dm.org/ljharb/set-function-length +[dev-deps-svg]: https://david-dm.org/ljharb/set-function-length/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/set-function-length#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/set-function-length.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/set-function-length.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/set-function-length.svg +[downloads-url]: https://npm-stat.com/charts.html?package=set-function-length +[codecov-image]: https://codecov.io/gh/ljharb/set-function-length/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-length/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-length +[actions-url]: https://github.com/ljharb/set-function-length/actions diff --git a/node_modules/set-function-length/env.d.ts b/node_modules/set-function-length/env.d.ts new file mode 100644 index 0000000..970ea53 --- /dev/null +++ b/node_modules/set-function-length/env.d.ts @@ -0,0 +1,9 @@ +declare const env: { + __proto__: null, + boundFnsHaveConfigurableLengths: boolean; + boundFnsHaveWritableLengths: boolean; + functionsHaveConfigurableLengths: boolean; + functionsHaveWritableLengths: boolean; +}; + +export = env; \ No newline at end of file diff --git a/node_modules/set-function-length/env.js b/node_modules/set-function-length/env.js new file mode 100644 index 0000000..d9b0a29 --- /dev/null +++ b/node_modules/set-function-length/env.js @@ -0,0 +1,25 @@ +'use strict'; + +var gOPD = require('gopd'); +var bind = require('function-bind'); + +var unbound = gOPD && gOPD(function () {}, 'length'); +// @ts-expect-error ts(2555) TS is overly strict with .call +var bound = gOPD && gOPD(bind.call(function () {}), 'length'); + +var functionsHaveConfigurableLengths = !!(unbound && unbound.configurable); + +var functionsHaveWritableLengths = !!(unbound && unbound.writable); + +var boundFnsHaveConfigurableLengths = !!(bound && bound.configurable); + +var boundFnsHaveWritableLengths = !!(bound && bound.writable); + +/** @type {import('./env')} */ +module.exports = { + __proto__: null, + boundFnsHaveConfigurableLengths: boundFnsHaveConfigurableLengths, + boundFnsHaveWritableLengths: boundFnsHaveWritableLengths, + functionsHaveConfigurableLengths: functionsHaveConfigurableLengths, + functionsHaveWritableLengths: functionsHaveWritableLengths +}; diff --git a/node_modules/set-function-length/index.d.ts b/node_modules/set-function-length/index.d.ts new file mode 100644 index 0000000..0451ecd --- /dev/null +++ b/node_modules/set-function-length/index.d.ts @@ -0,0 +1,7 @@ +declare namespace setFunctionLength { + type Func = (...args: unknown[]) => unknown; +} + +declare function setFunctionLength(fn: T, length: number, loose?: boolean): T; + +export = setFunctionLength; \ No newline at end of file diff --git a/node_modules/set-function-length/index.js b/node_modules/set-function-length/index.js new file mode 100644 index 0000000..14ce74d --- /dev/null +++ b/node_modules/set-function-length/index.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var gOPD = require('gopd'); + +var $TypeError = require('es-errors/type'); +var $floor = GetIntrinsic('%Math.floor%'); + +/** @type {import('.')} */ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(/** @type {Parameters[0]} */ (fn), 'length', length, true, true); + } else { + define(/** @type {Parameters[0]} */ (fn), 'length', length); + } + } + return fn; +}; diff --git a/node_modules/set-function-length/package.json b/node_modules/set-function-length/package.json new file mode 100644 index 0000000..f6b8881 --- /dev/null +++ b/node_modules/set-function-length/package.json @@ -0,0 +1,102 @@ +{ + "name": "set-function-length", + "version": "1.2.2", + "description": "Set a function's length property", + "main": "index.js", + "exports": { + ".": "./index.js", + "./env": "./env.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "directories": { + "test": "test" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/set-function-length.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "set", + "function", + "length", + "function.length" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/set-function-length/issues" + }, + "homepage": "https://github.com/ljharb/set-function-length#readme", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.1.1", + "@types/call-bind": "^1.0.5", + "@types/define-properties": "^1.1.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/function-bind": "^1.1.10", + "@types/gopd": "^1.0.3", + "@types/has-property-descriptors": "^1.0.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.7", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } +} diff --git a/node_modules/set-function-length/tsconfig.json b/node_modules/set-function-length/tsconfig.json new file mode 100644 index 0000000..d9a6668 --- /dev/null +++ b/node_modules/set-function-length/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/set-function-name/.eslintrc b/node_modules/set-function-name/.eslintrc new file mode 100644 index 0000000..ceed918 --- /dev/null +++ b/node_modules/set-function-name/.eslintrc @@ -0,0 +1,21 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "no-extra-parens": "off", + }, + + "overrides": [ + { + "files": ["test/**/*.js"], + "rules": { + "id-length": "off", + "multiline-comment-style": "off", + "no-empty-function": "off", + }, + }, + ], +} diff --git a/node_modules/set-function-name/.github/FUNDING.yml b/node_modules/set-function-name/.github/FUNDING.yml new file mode 100644 index 0000000..92feb6f --- /dev/null +++ b/node_modules/set-function-name/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/set-function-name +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/set-function-name/CHANGELOG.md b/node_modules/set-function-name/CHANGELOG.md new file mode 100644 index 0000000..d3719c3 --- /dev/null +++ b/node_modules/set-function-name/CHANGELOG.md @@ -0,0 +1,48 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.2](https://github.com/jfsiii/set-function-name/compare/v2.0.1...v2.0.2) - 2024-02-19 + +### Commits + +- [meta] add types [`ae747cd`](https://github.com/jfsiii/set-function-name/commit/ae747cdcf4a986e6974a375be8ec04dd7565f0bd) +- [Dev Deps] update `aud`, `npmignore`, `object-inspect`, `tape` [`01aafcb`](https://github.com/jfsiii/set-function-name/commit/01aafcb82e4df653fcbd666ce4f256c06f70d94e) +- [Deps] update `define-data-property`, `has-property-descriptors` [`0ef6338`](https://github.com/jfsiii/set-function-name/commit/0ef6338fac84f63c2445855778bfd9271ae048cb) +- [Refactor] use `es-errors` [`0b23e87`](https://github.com/jfsiii/set-function-name/commit/0b23e878a16c959bd8b1aa7152d65818dd90578c) + +## [v2.0.1](https://github.com/jfsiii/set-function-name/compare/v2.0.0...v2.0.1) - 2023-09-13 + +### Commits + +- [Fix] move `functions-have-names` to runtime deps [`db2eda8`](https://github.com/jfsiii/set-function-name/commit/db2eda8da4c8aecfad01739000bbd63d04a8e8cf) + +## [v2.0.0](https://github.com/jfsiii/set-function-name/compare/v1.0.0...v2.0.0) - 2023-09-12 + +### Commits + +- [eslint] add `npm run lint` [`23e1fcd`](https://github.com/jfsiii/set-function-name/commit/23e1fcd85b64b864cb8f7e894da78d540e72923a) +- [actions] add reused GHA [`525127e`](https://github.com/jfsiii/set-function-name/commit/525127e08bdb35b0d44f565492456c7d1d5923fc) +- [meta] add `.gitignore` [`aa3abdf`](https://github.com/jfsiii/set-function-name/commit/aa3abdfa6af18adf70281352905dd69ef8b2c66f) +- [Tests] switch tests to use tape; add posttest [`8ad6d30`](https://github.com/jfsiii/set-function-name/commit/8ad6d30c61f78d2f9beec156ba7f1c4c3741c593) +- [readme] add readme [`732c46c`](https://github.com/jfsiii/set-function-name/commit/732c46c05e0fa6843dbc85b3af1e9c9bf22e7bf9) +- [New] add optional `loose` argument [`f5e4771`](https://github.com/jfsiii/set-function-name/commit/f5e4771266c95567d87f6dc2cff94c986bc7e074) +- [meta] relicense package to MIT; fix repo URLs [`13948f8`](https://github.com/jfsiii/set-function-name/commit/13948f8bb4ec8a25b67332d8de232ad0c0dc4e6d) +- [meta] add `auto-changelog` [`7ab201c`](https://github.com/jfsiii/set-function-name/commit/7ab201c0d83d464664cc4588acad0d0f75926679) +- [Breaking] throw if a non-function is provided [`cf6fc8f`](https://github.com/jfsiii/set-function-name/commit/cf6fc8f3396d58aa8c32a83375cbf57d933d7e79) +- [Breaking] drop UMD, just use CJS [`47abfe8`](https://github.com/jfsiii/set-function-name/commit/47abfe89abfaa72f71e0a77a52a5ff2b7377e11a) +- [Refactor] use `define-data-property` and `has-property-descriptors` [`9921c2b`](https://github.com/jfsiii/set-function-name/commit/9921c2b64c571255084aefaa02660314609e8ea0) +- [meta] use `npmignore` to autogenerate an npmignore file [`c5dbe4f`](https://github.com/jfsiii/set-function-name/commit/c5dbe4f4c44298596338432e2ac9946a10c98edd) +- Only apps should have lockfiles [`98bbfa1`](https://github.com/jfsiii/set-function-name/commit/98bbfa145387f318152a6b792bd69aca3c544813) +- [meta] add `safe-publish-latest` [`8916cd8`](https://github.com/jfsiii/set-function-name/commit/8916cd8f5549dceee31f06d35a76e2f9d4933a8b) +- [meta] add `engines` [`2427c8e`](https://github.com/jfsiii/set-function-name/commit/2427c8e2499f378c9ff3d92c7d544c771ca810df) + +## v1.0.0 - 2017-09-14 + +### Commits + +- Initial commit. Including tests. [`f26a1f2`](https://github.com/jfsiii/set-function-name/commit/f26a1f2c69a70dad5049b1daa08eae5f6acd9a1e) +- add .npmignore to ignore test directory [`9cac96f`](https://github.com/jfsiii/set-function-name/commit/9cac96fd9e98f25883be6e727ac32356522a5d69) diff --git a/node_modules/set-function-name/LICENSE b/node_modules/set-function-name/LICENSE new file mode 100644 index 0000000..0314929 --- /dev/null +++ b/node_modules/set-function-name/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/set-function-name/README.md b/node_modules/set-function-name/README.md new file mode 100644 index 0000000..b1612dd --- /dev/null +++ b/node_modules/set-function-name/README.md @@ -0,0 +1,61 @@ +# set-function-name [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Set a function’s name. + +Arguments: + - `fn`: the function + - `name`: the new name + - `loose`: Optional. If true, and the name fails to be set, do not throw. Default false. + +Returns `fn`. + +## Usage + +```javascript +var setFunctionName = require('set-function-name'); +var assert = require('assert'); + +const obj = { + concise() {}, + arrow: () => {}, + named: function named() {}, + anon: function () {}, +}; +assert.equal(obj.concise.name, 'concise'); +assert.equal(obj.arrow.name, 'arrow'); +assert.equal(obj.named.name, 'named'); +assert.equal(obj.anon.name, 'anon'); + +assert.equal(setFunctionName(obj.concise, 'brief'), obj.concise); +assert.equal(setFunctionName(obj.arrow, 'pointy'), obj.arrow); +assert.equal(setFunctionName(obj.named, ''), obj.named); +assert.equal(setFunctionName(obj.anon, 'anonymous'), obj.anon); + +assert.equal(obj.concise.name, 'brief'); +assert.equal(obj.arrow.name, 'pointy'); +assert.equal(obj.named.name, ''); +assert.equal(obj.anon.name, 'anonymous'); +``` + +[package-url]: https://npmjs.org/package/set-function-name +[npm-version-svg]: https://versionbadg.es/ljharb/set-function-name.svg +[deps-svg]: https://david-dm.org/ljharb/set-function-name.svg +[deps-url]: https://david-dm.org/ljharb/set-function-name +[dev-deps-svg]: https://david-dm.org/ljharb/set-function-name/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/set-function-name#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/set-function-name.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/set-function-name.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/set-function-name.svg +[downloads-url]: https://npm-stat.com/charts.html?package=set-function-name +[codecov-image]: https://codecov.io/gh/ljharb/set-function-name/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-name/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-name +[actions-url]: https://github.com/ljharb/set-function-name/actions diff --git a/node_modules/set-function-name/index.d.ts b/node_modules/set-function-name/index.d.ts new file mode 100644 index 0000000..a3f6114 --- /dev/null +++ b/node_modules/set-function-name/index.d.ts @@ -0,0 +1,5 @@ +type Func = (...args: unknown[]) => unknown; + +declare function setFunctionName(fn: T, name: string, loose?: boolean): T; + +export = setFunctionName; \ No newline at end of file diff --git a/node_modules/set-function-name/index.js b/node_modules/set-function-name/index.js new file mode 100644 index 0000000..8c18238 --- /dev/null +++ b/node_modules/set-function-name/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var define = require('define-data-property'); +var hasDescriptors = require('has-property-descriptors')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +var $TypeError = require('es-errors/type'); + +/** @type {import('.')} */ +module.exports = function setFunctionName(fn, name) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + var loose = arguments.length > 2 && !!arguments[2]; + if (!loose || functionsHaveConfigurableNames) { + if (hasDescriptors) { + define(/** @type {Parameters[0]} */ (fn), 'name', name, true, true); + } else { + define(/** @type {Parameters[0]} */ (fn), 'name', name); + } + } + return fn; +}; diff --git a/node_modules/set-function-name/package.json b/node_modules/set-function-name/package.json new file mode 100644 index 0000000..df47de0 --- /dev/null +++ b/node_modules/set-function-name/package.json @@ -0,0 +1,99 @@ +{ + "name": "set-function-name", + "version": "2.0.2", + "description": "Set a function's name property", + "main": "index.js", + "types": "./index.d.ts", + "directories": { + "test": "test" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/set-function-name.git" + }, + "keywords": [ + "set", + "assign", + "function", + "name", + "function.name" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/set-function-name/issues" + }, + "homepage": "https://github.com/ljharb/set-function-name#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/define-properties": "^1.1.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/function.prototype.name": "^1.1.3", + "@types/functions-have-names": "^1.2.2", + "@types/has-property-descriptors": "^1.0.3", + "@types/make-arrow-function": "^1.2.2", + "@types/make-async-function": "^1.0.2", + "@types/make-async-generator-function": "^1.0.3", + "@types/make-generator-function": "^2.0.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "function.prototype.name": "^1.1.6", + "in-publish": "^2.0.1", + "make-arrow-function": "^1.2.0", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.1", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test", + "!*.d.ts", + "!*.d.ts.map" + ] + } +} diff --git a/node_modules/set-function-name/tsconfig.json b/node_modules/set-function-name/tsconfig.json new file mode 100644 index 0000000..6d5dc00 --- /dev/null +++ b/node_modules/set-function-name/tsconfig.json @@ -0,0 +1,59 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/set-value/LICENSE b/node_modules/set-value/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/set-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/set-value/README.md b/node_modules/set-value/README.md new file mode 100644 index 0000000..e336d74 --- /dev/null +++ b/node_modules/set-value/README.md @@ -0,0 +1,150 @@ +# set-value [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/set-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/set-value) + +> Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save set-value +``` + +## Usage + +```js +var set = require('set-value'); +set(object, prop, value); +``` + +### Params + +* `object` **{object}**: The object to set `value` on +* `prop` **{string}**: The property to set. Dot-notation may be used. +* `value` **{any}**: The value to set on `object[prop]` + +## Examples + +Updates and returns the given object: + +```js +var obj = {}; +set(obj, 'a.b.c', 'd'); +console.log(obj); +//=> { a: { b: { c: 'd' } } } +``` + +### Escaping + +**Escaping with backslashes** + +Prevent set-value from splitting on a dot by prefixing it with backslashes: + +```js +console.log(set({}, 'a\\.b.c', 'd')); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, 'a\\.b\\.c', 'd')); +//=> { 'a.b.c': 'd' } +``` + +**Escaping with double-quotes or single-quotes** + +Wrap double or single quotes around the string, or part of the string, that should not be split by set-value: + +```js +console.log(set({}, '"a.b".c', 'd')); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, "'a.b'.c", "d")); +//=> { 'a.b': { c: 'd' } } + +console.log(set({}, '"this/is/a/.file.path"', 'd')); +//=> { 'this/is/a/file.path': 'd' } +``` + +### Bracket support + +set-value does not split inside brackets or braces: + +```js +console.log(set({}, '[a.b].c', 'd')); +//=> { '[a.b]': { c: 'd' } } + +console.log(set({}, "(a.b).c", "d")); +//=> { '(a.b)': { c: 'd' } } + +console.log(set({}, ".c", "d")); +//=> { '': { c: 'd' } } + +console.log(set({}, "{a..b}.c", "d")); +//=> { '{a..b}': { c: 'd' } } +``` + +## History + +### v2.0.0 + +* Adds support for escaping with double or single quotes. See [escaping](#escaping) for examples. +* Will no longer split inside brackets or braces. See [bracket support](#bracket-support) for examples. + +If there are any regressions please create a [bug report](../../issues/new). Thanks! + +## About + +### Related projects + +* [assign-value](https://www.npmjs.com/package/assign-value): Assign a value or extend a deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/assign-value) | [homepage](https://github.com/jonschlinkert/assign-value "Assign a value or extend a deeply nested property of an object using object path notation.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") +* [merge-value](https://www.npmjs.com/package/merge-value): Similar to assign-value but deeply merges object values or nested values using object path/dot notation. | [homepage](https://github.com/jonschlinkert/merge-value "Similar to assign-value but deeply merges object values or nested values using object path/dot notation.") +* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.") +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [vadimdemedes](https://github.com/vadimdemedes) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._ \ No newline at end of file diff --git a/node_modules/set-value/index.js b/node_modules/set-value/index.js new file mode 100644 index 0000000..0b32e8f --- /dev/null +++ b/node_modules/set-value/index.js @@ -0,0 +1,55 @@ +/*! + * set-value + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var split = require('split-string'); +var extend = require('extend-shallow'); +var isPlainObject = require('is-plain-object'); +var isObject = require('is-extendable'); + +module.exports = function(obj, prop, val) { + if (!isObject(obj)) { + return obj; + } + + if (Array.isArray(prop)) { + prop = [].concat.apply([], prop).join('.'); + } + + if (typeof prop !== 'string') { + return obj; + } + + var keys = split(prop, {sep: '.', brackets: true}).filter(isValidKey); + var len = keys.length; + var idx = -1; + var current = obj; + + while (++idx < len) { + var key = keys[idx]; + if (idx !== len - 1) { + if (!isObject(current[key])) { + current[key] = {}; + } + current = current[key]; + continue; + } + + if (isPlainObject(current[key]) && isPlainObject(val)) { + current[key] = extend({}, current[key], val); + } else { + current[key] = val; + } + } + + return obj; +}; + +function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +} diff --git a/node_modules/set-value/package.json b/node_modules/set-value/package.json new file mode 100644 index 0000000..736db34 --- /dev/null +++ b/node_modules/set-value/package.json @@ -0,0 +1,79 @@ +{ + "name": "set-value", + "description": "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/set-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)", + "Vadim Demedes (https://vadimdemedes.com)" + ], + "repository": "jonschlinkert/set-value", + "bugs": { + "url": "https://github.com/jonschlinkert/set-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.2" + }, + "keywords": [ + "get", + "has", + "hasown", + "key", + "keys", + "nested", + "notation", + "object", + "prop", + "properties", + "property", + "props", + "set", + "value", + "values" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-value", + "get-value", + "has-value", + "merge-value", + "omit-value", + "set-value", + "union-value", + "unset-value" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/setprototypeof/LICENSE b/node_modules/setprototypeof/LICENSE new file mode 100644 index 0000000..61afa2f --- /dev/null +++ b/node_modules/setprototypeof/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Wes Todd + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/setprototypeof/README.md b/node_modules/setprototypeof/README.md new file mode 100644 index 0000000..791eeff --- /dev/null +++ b/node_modules/setprototypeof/README.md @@ -0,0 +1,31 @@ +# Polyfill for `Object.setPrototypeOf` + +[![NPM Version](https://img.shields.io/npm/v/setprototypeof.svg)](https://npmjs.org/package/setprototypeof) +[![NPM Downloads](https://img.shields.io/npm/dm/setprototypeof.svg)](https://npmjs.org/package/setprototypeof) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard) + +A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. + +## Usage: + +``` +$ npm install --save setprototypeof +``` + +```javascript +var setPrototypeOf = require('setprototypeof') + +var obj = {} +setPrototypeOf(obj, { + foo: function () { + return 'bar' + } +}) +obj.foo() // bar +``` + +TypeScript is also supported: + +```typescript +import setPrototypeOf from 'setprototypeof' +``` diff --git a/node_modules/setprototypeof/index.d.ts b/node_modules/setprototypeof/index.d.ts new file mode 100644 index 0000000..f108ecd --- /dev/null +++ b/node_modules/setprototypeof/index.d.ts @@ -0,0 +1,2 @@ +declare function setPrototypeOf(o: any, proto: object | null): any; +export = setPrototypeOf; diff --git a/node_modules/setprototypeof/index.js b/node_modules/setprototypeof/index.js new file mode 100644 index 0000000..c527055 --- /dev/null +++ b/node_modules/setprototypeof/index.js @@ -0,0 +1,17 @@ +'use strict' +/* eslint no-proto: 0 */ +module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties) + +function setProtoOf (obj, proto) { + obj.__proto__ = proto + return obj +} + +function mixinProperties (obj, proto) { + for (var prop in proto) { + if (!Object.prototype.hasOwnProperty.call(obj, prop)) { + obj[prop] = proto[prop] + } + } + return obj +} diff --git a/node_modules/setprototypeof/package.json b/node_modules/setprototypeof/package.json new file mode 100644 index 0000000..f20915b --- /dev/null +++ b/node_modules/setprototypeof/package.json @@ -0,0 +1,38 @@ +{ + "name": "setprototypeof", + "version": "1.2.0", + "description": "A small polyfill for Object.setprototypeof", + "main": "index.js", + "typings": "index.d.ts", + "scripts": { + "test": "standard && mocha", + "testallversions": "npm run node010 && npm run node4 && npm run node6 && npm run node9 && npm run node11", + "testversion": "docker run -it --rm -v $(PWD):/usr/src/app -w /usr/src/app node:${NODE_VER} npm install mocha@${MOCHA_VER:-latest} && npm t", + "node010": "NODE_VER=0.10 MOCHA_VER=3 npm run testversion", + "node4": "NODE_VER=4 npm run testversion", + "node6": "NODE_VER=6 npm run testversion", + "node9": "NODE_VER=9 npm run testversion", + "node11": "NODE_VER=11 npm run testversion", + "prepublishOnly": "npm t", + "postpublish": "git push origin && git push origin --tags" + }, + "repository": { + "type": "git", + "url": "https://github.com/wesleytodd/setprototypeof.git" + }, + "keywords": [ + "polyfill", + "object", + "setprototypeof" + ], + "author": "Wes Todd", + "license": "ISC", + "bugs": { + "url": "https://github.com/wesleytodd/setprototypeof/issues" + }, + "homepage": "https://github.com/wesleytodd/setprototypeof", + "devDependencies": { + "mocha": "^6.1.4", + "standard": "^13.0.2" + } +} diff --git a/node_modules/setprototypeof/test/index.js b/node_modules/setprototypeof/test/index.js new file mode 100644 index 0000000..afeb4dd --- /dev/null +++ b/node_modules/setprototypeof/test/index.js @@ -0,0 +1,24 @@ +'use strict' +/* eslint-env mocha */ +/* eslint no-proto: 0 */ +var assert = require('assert') +var setPrototypeOf = require('..') + +describe('setProtoOf(obj, proto)', function () { + it('should merge objects', function () { + var obj = { a: 1, b: 2 } + var proto = { b: 3, c: 4 } + var mergeObj = setPrototypeOf(obj, proto) + + if (Object.getPrototypeOf) { + assert.strictEqual(Object.getPrototypeOf(obj), proto) + } else if ({ __proto__: [] } instanceof Array) { + assert.strictEqual(obj.__proto__, proto) + } else { + assert.strictEqual(obj.a, 1) + assert.strictEqual(obj.b, 2) + assert.strictEqual(obj.c, 4) + } + assert.strictEqual(mergeObj, obj) + }) +}) diff --git a/node_modules/shebang-command/index.js b/node_modules/shebang-command/index.js new file mode 100644 index 0000000..2de70b0 --- /dev/null +++ b/node_modules/shebang-command/index.js @@ -0,0 +1,19 @@ +'use strict'; +var shebangRegex = require('shebang-regex'); + +module.exports = function (str) { + var match = str.match(shebangRegex); + + if (!match) { + return null; + } + + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; + + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license new file mode 100644 index 0000000..0f8cf79 --- /dev/null +++ b/node_modules/shebang-command/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/shebang-command/package.json b/node_modules/shebang-command/package.json new file mode 100644 index 0000000..19c9ce5 --- /dev/null +++ b/node_modules/shebang-command/package.json @@ -0,0 +1,39 @@ +{ + "name": "shebang-command", + "version": "1.2.0", + "description": "Get the command from a shebang", + "license": "MIT", + "repository": "kevva/shebang-command", + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "cmd", + "command", + "parse", + "shebang" + ], + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md new file mode 100644 index 0000000..16b0be4 --- /dev/null +++ b/node_modules/shebang-command/readme.md @@ -0,0 +1,39 @@ +# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) + +> Get the command from a shebang + + +## Install + +``` +$ npm install --save shebang-command +``` + + +## Usage + +```js +const shebangCommand = require('shebang-command'); + +shebangCommand('#!/usr/bin/env node'); +//=> 'node' + +shebangCommand('#!/bin/bash'); +//=> 'bash' +``` + + +## API + +### shebangCommand(string) + +#### string + +Type: `string` + +String containing a shebang. + + +## License + +MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js new file mode 100644 index 0000000..d052d2e --- /dev/null +++ b/node_modules/shebang-regex/index.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = /^#!.*/; diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/shebang-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/shebang-regex/package.json b/node_modules/shebang-regex/package.json new file mode 100644 index 0000000..d8ec9b6 --- /dev/null +++ b/node_modules/shebang-regex/package.json @@ -0,0 +1,32 @@ +{ + "name": "shebang-regex", + "version": "1.0.0", + "description": "Regular expression for matching a shebang", + "license": "MIT", + "repository": "sindresorhus/shebang-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "re", + "regex", + "regexp", + "shebang", + "match", + "test" + ], + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md new file mode 100644 index 0000000..ef75e51 --- /dev/null +++ b/node_modules/shebang-regex/readme.md @@ -0,0 +1,29 @@ +# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) + +> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) + + +## Install + +``` +$ npm install --save shebang-regex +``` + + +## Usage + +```js +var shebangRegex = require('shebang-regex'); +var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; + +shebangRegex.test(str); +//=> true + +shebangRegex.exec(str)[0]; +//=> '#!/usr/bin/env node' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/shell-quote/.eslintrc b/node_modules/shell-quote/.eslintrc new file mode 100644 index 0000000..9569d51 --- /dev/null +++ b/node_modules/shell-quote/.eslintrc @@ -0,0 +1,30 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": 1, + "func-style": [2, "declaration"], + "max-depth": 0, + "max-lines-per-function": 0, + "max-statements": 0, + "multiline-comment-style": 0, + "no-negated-condition": 1, + "no-param-reassign": 1, + "no-lonely-if": 1, + "no-shadow": 1, + "no-template-curly-in-string": 0, + }, + + "overrides": [ + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, + ], +} diff --git a/node_modules/shell-quote/.github/FUNDING.yml b/node_modules/shell-quote/.github/FUNDING.yml new file mode 100644 index 0000000..0b6b6b4 --- /dev/null +++ b/node_modules/shell-quote/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/shell-quote +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/shell-quote/.nycrc b/node_modules/shell-quote/.nycrc new file mode 100644 index 0000000..55c3d29 --- /dev/null +++ b/node_modules/shell-quote/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "example", + "test" + ] +} diff --git a/node_modules/shell-quote/CHANGELOG.md b/node_modules/shell-quote/CHANGELOG.md new file mode 100644 index 0000000..324c195 --- /dev/null +++ b/node_modules/shell-quote/CHANGELOG.md @@ -0,0 +1,279 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.8.1](https://github.com/ljharb/shell-quote/compare/v1.8.0...v1.8.1) - 2023-04-07 + +### Fixed + +- [Fix] `parse`: preserve whitespace in comments [`#6`](https://github.com/ljharb/shell-quote/issues/6) +- [Fix] properly support the `escape` option [`#5`](https://github.com/ljharb/shell-quote/issues/5) + +### Commits + +- [Refactor] `parse`: hoist `getVar` to module level [`b42ac73`](https://github.com/ljharb/shell-quote/commit/b42ac73e39e566cfc355a4addc4bd2df2652556c) +- [Refactor] hoist some vars to module level [`8f0c5c3`](https://github.com/ljharb/shell-quote/commit/8f0c5c3c9df3a10e32f1972636675af6fffef998) +- [Refactor] `parse`: use `slice` over `substr`, cache some values [`fcb2e1a`](https://github.com/ljharb/shell-quote/commit/fcb2e1acd5312a1a1a4e6c66ec688aab383023b5) +- [Refactor] `parse`: a bit of cleanup [`6780ec5`](https://github.com/ljharb/shell-quote/commit/6780ec5194e36e2a696bfbaaf85169682a333321) +- [Refactor] `parse`: tweak the regex to not match nothing [`227d474`](https://github.com/ljharb/shell-quote/commit/227d4742a006e81ec3fde1eee103731a6f7ea920) +- [Tests] increase coverage [`a66de94`](https://github.com/ljharb/shell-quote/commit/a66de943555e49fbb1b657cbe3c5b2c703ae507d) +- [Refactor] `parse`: avoid shadowing a function arg [`1d58679`](https://github.com/ljharb/shell-quote/commit/1d5867907ecbf553556fe6ad790b6d6658aedba3) + +## [v1.8.0](https://github.com/ljharb/shell-quote/compare/v1.7.4...v1.8.0) - 2023-01-30 + +### Commits + +- [New] extract `parse` and `quote` to their own deep imports [`553fdfc`](https://github.com/ljharb/shell-quote/commit/553fdfc32cc41b4c2f77e061b6957703958ca575) +- [Tests] add `nyc` coverage [`fd7ddcd`](https://github.com/ljharb/shell-quote/commit/fd7ddcdd84bfef064c6d9a06b055a95531b26897) +- [New] Add support for here strings (`<<<`) [`9802fb3`](https://github.com/ljharb/shell-quote/commit/9802fb37c7946e18c672b81122520dc296bde271) +- [New] `parse`: Add syntax support for duplicating input file descriptors [`216b198`](https://github.com/ljharb/shell-quote/commit/216b19894f76b14d164c4c5a68f05a51b06336c4) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`85f8e31`](https://github.com/ljharb/shell-quote/commit/85f8e31dd80e1dde63d58204b653e497a53857e6) +- [Tests] add `evalmd` [`c5549fc`](https://github.com/ljharb/shell-quote/commit/c5549fcd82d70046bdc2b1c34184ae9f9d0191f9) +- [actions] update checkout action [`62e9b49`](https://github.com/ljharb/shell-quote/commit/62e9b4958cfa2f9009b7069076612fe33528c1fb) + +## [v1.7.4](https://github.com/ljharb/shell-quote/compare/1.7.3...v1.7.4) - 2022-10-12 + +### Merged + +- Add node_modules to .gitignore [`#48`](https://github.com/ljharb/shell-quote/pull/48) + +### Commits + +- [eslint] fix indentation and whitespace [`aaa9d1f`](https://github.com/ljharb/shell-quote/commit/aaa9d1f65bf3445e6af1efaa4a8f8c13a21aa593) +- [eslint] additional cleanup [`397cb62`](https://github.com/ljharb/shell-quote/commit/397cb628f3d96e4e47763147c0d6074997a13880) +- [meta] add `auto-changelog` [`497fca5`](https://github.com/ljharb/shell-quote/commit/497fca509af3b7d6daaba459bad1f45ac0af3ff1) +- [actions] add reusable workflows [`4763c36`](https://github.com/ljharb/shell-quote/commit/4763c36274c5881a2d141ce9f2b17b7d1d95e8cd) +- [eslint] add eslint [`6ee1437`](https://github.com/ljharb/shell-quote/commit/6ee1437df1b10a79bdf2aaa04f2bacc9f420dc15) +- [readme] rename, add badges [`7eb5134`](https://github.com/ljharb/shell-quote/commit/7eb513483d931602452ec572ed456714148acd2b) +- [meta] update URLs [`67381b6`](https://github.com/ljharb/shell-quote/commit/67381b61fa95e57819333463f491428747893186) +- [meta] create FUNDING.yml; add `funding` in package.json [`8641572`](https://github.com/ljharb/shell-quote/commit/86415722d875578adf1f95f9e649ba42c805bc32) +- [meta] use `npmignore` to autogenerate an npmignore file [`2e2007a`](https://github.com/ljharb/shell-quote/commit/2e2007a393f90bf079fc556a921120b3508c4fc3) +- Only apps should have lockfiles [`f97411e`](https://github.com/ljharb/shell-quote/commit/f97411ef4d2f183200fc8a28beca9faf9b08a640) +- [Dev Deps] update `tape` [`051f608`](https://github.com/ljharb/shell-quote/commit/051f60857ad5035280208abdc348bf5ba42a6254) +- [meta] add `safe-publish-latest` [`18cadf9`](https://github.com/ljharb/shell-quote/commit/18cadf95357392fcd78ea8619956fd41eed62649) +- [Tests] add `aud` in `posttest` [`dc1cc12`](https://github.com/ljharb/shell-quote/commit/dc1cc12b956ccd93d58aaaad263bee7d50576d27) + + + +## 1.7.3 +* Fix a security issue where the regex for windows drive letters allowed some shell meta-characters +to escape the quoting rules. (CVE-2021-42740) + +## 1.7.2 +* Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. ([144e1c2](https://github.com/ljharb/shell-quote/commit/144e1c20cd57549a414c827fb3032e60b7b8721c)) + +## 1.7.1 +* Fix `$` being removed when not part of an environment variable name. ([@Adman](https://github.com/Admin) in [#32](https://github.com/ljharb/shell-quote/pull/32)) + +## 1.7.0 +* Add support for parsing `>>` and `>&` redirection operators. ([@forivall](https://github.com/forivall) in [#16](https://github.com/ljharb/shell-quote/pull/16)) +* Add support for parsing `<(` process substitution operator. ([@cuonglm](https://github.com/cuonglm) in [#15](https://github.com/ljharb/shell-quote/pull/15)) + +## 1.6.3 +* Fix Windows path quoting problems. ([@dy](https://github.com/dy) in [#34](https://github.com/ljharb/shell-quote/pull/34)) + +## [v1.6.2](https://github.com/ljharb/shell-quote/compare/1.6.1...v1.6.2) - 2019-08-13 + +### Merged + +- Use native JSON and Array methods [`#21`](https://github.com/ljharb/shell-quote/pull/21) + +### Commits + +- fix whitespace [`72fb5a8`](https://github.com/ljharb/shell-quote/commit/72fb5a8ce29b4f67f28302af33c217b58f92e260) +- Disable package-lock.json [`d450577`](https://github.com/ljharb/shell-quote/commit/d4505770b2a4251af2da8e177385c5e0456a83b6) + +## [1.6.1](https://github.com/ljharb/shell-quote/compare/1.6.0...1.6.1) - 2016-06-17 + +### Commits + +- Fix some more escaping for .quote() [`ace52f4`](https://github.com/ljharb/shell-quote/commit/ace52f4c8717b370b301a3db3a4727db26e309ad) +- Fix escaping for greater than and less than [`70e9eb2`](https://github.com/ljharb/shell-quote/commit/70e9eb2a854eb56a3dfa255be12610a722bbe080) + +## [1.6.0](https://github.com/ljharb/shell-quote/compare/1.5.0...1.6.0) - 2016-04-23 + +### Commits + +- add comment parsing feature [`b8b5c31`](https://github.com/ljharb/shell-quote/commit/b8b5c31c16a15aa4ab26c8f23d362a24b9fa57c4) + +## [1.5.0](https://github.com/ljharb/shell-quote/compare/1.4.3...1.5.0) - 2016-03-16 + +### Commits + +- add escape option to .parse [`4d400e7`](https://github.com/ljharb/shell-quote/commit/4d400e773be448c320b6dc9b2eb1323d7a3461ca) + +## [1.4.3](https://github.com/ljharb/shell-quote/compare/1.4.2...1.4.3) - 2015-03-07 + +### Commits + +- Fix quote() with special chars [`811b5a0`](https://github.com/ljharb/shell-quote/commit/811b5a0aff79f347db245edcf88750977c111844) + +## [1.4.2](https://github.com/ljharb/shell-quote/compare/1.4.1...1.4.2) - 2014-07-20 + +### Commits + +- Handle non-strings when quoting [`d435827`](https://github.com/ljharb/shell-quote/commit/d43582741c5599807249c28722487aa86bb16f06) +- falseys ok [`22dbd94`](https://github.com/ljharb/shell-quote/commit/22dbd9492c372038d439d6ec08c6288ca5fa3c10) +- all the falseys test [`c99dca5`](https://github.com/ljharb/shell-quote/commit/c99dca59dca64743877a0411d299ce669f0a2d1d) + +## [1.4.1](https://github.com/ljharb/shell-quote/compare/1.4.0...1.4.1) - 2013-12-24 + +### Commits + +- es5 shims [`00dc6ab`](https://github.com/ljharb/shell-quote/commit/00dc6abfdd2f3ff2908616dbe7b6584bbf1b0e24) +- separate shim file to get the coverage up [`e29a216`](https://github.com/ljharb/shell-quote/commit/e29a2167319913af3f26603bc33938bb9be1d74d) +- use array-{filter,map,reduce} [`97a2fc9`](https://github.com/ljharb/shell-quote/commit/97a2fc9c92917343a33662b3705860e4f2044730) +- add testling badge [`44c98b1`](https://github.com/ljharb/shell-quote/commit/44c98b1e341d348ce9b5b4d78bb4d26345e868ea) +- upgrade tape [`3fc22d3`](https://github.com/ljharb/shell-quote/commit/3fc22d3d38592e6fc3b3308cc73a282d641bad34) + +## [1.4.0](https://github.com/ljharb/shell-quote/compare/1.3.3...1.4.0) - 2013-10-17 + +### Merged + +- Add MIT LICENSE file [`#6`](https://github.com/ljharb/shell-quote/pull/6) + +### Commits + +- Rewrite parser as a character based scanner [`c7ca9a2`](https://github.com/ljharb/shell-quote/commit/c7ca9a200350c02fb86c4222b63f15b54a0a0226) +- Add tests for glob patterns [`3418892`](https://github.com/ljharb/shell-quote/commit/3418892031b126197302eb57cc92a729b740fac6) +- Update algo description [`e1442cf`](https://github.com/ljharb/shell-quote/commit/e1442cfe0521497b59a8204eb1e4d6c4202d42b9) +- Fix test case for backslash in double quotes [`89bc550`](https://github.com/ljharb/shell-quote/commit/89bc5500711643e87fe93dd1bde0e8745c34d733) +- Add failing tests for crazy quoting tricks [`58a5e48`](https://github.com/ljharb/shell-quote/commit/58a5e4800a62fdc3e980feae1e6c6b15c812f0cb) + +## [1.3.3](https://github.com/ljharb/shell-quote/compare/1.3.2...1.3.3) - 2013-06-24 + +### Commits + +- failing set test with an env cb [`9fb2096`](https://github.com/ljharb/shell-quote/commit/9fb20968b407c590745a982d2a562960e952142d) +- remove the broken special case [`f9a0ee5`](https://github.com/ljharb/shell-quote/commit/f9a0ee574f9d5e5d5b382f55da960c23eb7d44c5) + +## [1.3.2](https://github.com/ljharb/shell-quote/compare/1.3.1...1.3.2) - 2013-06-24 + +### Commits + +- tests for setting env vars [`f44b039`](https://github.com/ljharb/shell-quote/commit/f44b03906c60598470676edcabea79c4f7488407) +- fixed the parse test, broke the op tests [`74d6686`](https://github.com/ljharb/shell-quote/commit/74d66863615a60fcb222d2279991cff3a89ff015) +- factored out single and double quote regex [`de9e0a5`](https://github.com/ljharb/shell-quote/commit/de9e0a5081156e5483b5df24878c7414f90ec67e) +- updated set env test, already passes [`7d5636b`](https://github.com/ljharb/shell-quote/commit/7d5636bec5e76ff542712e07643b09c597d20b21) +- ops fixed [`2b4e1b1`](https://github.com/ljharb/shell-quote/commit/2b4e1b1fb63519456c7850d365e1ffe5fa5972b2) +- passing all tests [`44177e3`](https://github.com/ljharb/shell-quote/commit/44177e3dcbd96dfa331483eba0abbfb0291c130f) +- backreferences in negated capture groups don't actually work [`e189d9d`](https://github.com/ljharb/shell-quote/commit/e189d9d5910c6ecc7d564309ca9e110062f9589e) +- another crazy ridiculous passing parse test [`d1beb6b`](https://github.com/ljharb/shell-quote/commit/d1beb6b32ec7ad8752b305834a21c800cae74a95) +- failing test for quoted whitespace and nested quotes [`9a4c11c`](https://github.com/ljharb/shell-quote/commit/9a4c11cba0f61762aaa7887591d78fe7e965cf65) +- failing test for quotes embedded inside barewords [`d997384`](https://github.com/ljharb/shell-quote/commit/d997384018ce107ab8e12aa5b8d8359c2f77128b) + +## [1.3.1](https://github.com/ljharb/shell-quote/compare/1.3.0...1.3.1) - 2013-05-13 + +### Commits + +- pass objects through [`f9c0514`](https://github.com/ljharb/shell-quote/commit/f9c0514abbdf8ba16fafb68736863d14b39015ef) + +## [1.3.0](https://github.com/ljharb/shell-quote/compare/1.2.0...1.3.0) - 2013-05-13 + +### Commits + +- hacky tokenizer is much simpler [`7e91b18`](https://github.com/ljharb/shell-quote/commit/7e91b18d1cf3fffd6a9c5f69d785f200c0c81b66) +- nearly passing with a clunky state env parser, array issues [`d6d6416`](https://github.com/ljharb/shell-quote/commit/d6d64160f2fc8a23018410ffe84ab7f1b0c4fa02) +- test for functional env expansion [`666395f`](https://github.com/ljharb/shell-quote/commit/666395f9f195241c6077f242dc4f2851bed95f8d) +- upgrade travis versions, tape [`f6f8bd6`](https://github.com/ljharb/shell-quote/commit/f6f8bd6026375d44d40c7f2e1fead43d006be211) +- 1.3.0, document env() lookups [`041c5da`](https://github.com/ljharb/shell-quote/commit/041c5da88800b4e15f0ed023049050b11b623a23) +- first half of functional env() works [`7a0cf79`](https://github.com/ljharb/shell-quote/commit/7a0cf79987fbdcc00d8f36c6dc164d22db963d23) +- env() objects even work inside quote strings [`16139f5`](https://github.com/ljharb/shell-quote/commit/16139f52bf7a2beb7e1ca9b61b93a9ea598b0f1a) +- another check just to make sure env() works [`914a1a9`](https://github.com/ljharb/shell-quote/commit/914a1a9ec55cd76bedfed4086c35866733128036) + +## [1.2.0](https://github.com/ljharb/shell-quote/compare/1.1.0...1.2.0) - 2013-05-13 + +### Commits + +- failing test for special shell parameter env vars [`728862a`](https://github.com/ljharb/shell-quote/commit/728862a6ff246754083da5cf22322caf914ae990) +- add the special vars to the replace regex but the chunker breaks on them [`d1ff82a`](https://github.com/ljharb/shell-quote/commit/d1ff82a07c44cb53ab909b61833296f38257eabd) +- fixed the env test, everything is fine [`a45897f`](https://github.com/ljharb/shell-quote/commit/a45897f53ba184a77bc762c63777b95590a83962) + +## [1.1.0](https://github.com/ljharb/shell-quote/compare/1.0.0...1.1.0) - 2013-05-13 + +### Commits + +- quote all ops objects [`ac7be63`](https://github.com/ljharb/shell-quote/commit/ac7be63574e1da48bc6f495aee363d31863222c3) +- test for parsed ops objects in quote() [`59fb71b`](https://github.com/ljharb/shell-quote/commit/59fb71b39c53b83306d015bec62fc93667745f75) +- another test for op object quoting [`5819a31`](https://github.com/ljharb/shell-quote/commit/5819a31a19c34967dcb7bd1719250ed2aa480583) + +## [1.0.0](https://github.com/ljharb/shell-quote/compare/0.1.1...1.0.0) - 2013-05-13 + +### Commits + +- document ops, op example [`a6381e6`](https://github.com/ljharb/shell-quote/commit/a6381e612361148a8433c6ec4891aabc4649cb40) +- some more passing double-char op tests [`fbc6e5c`](https://github.com/ljharb/shell-quote/commit/fbc6e5c40858ef4ea4d69651ac8fdf6c0c780eed) +- failing test for | and & ops [`d817736`](https://github.com/ljharb/shell-quote/commit/d81773643cbc2e25576884d606165dc87e8bbfac) +- labeled regex states [`8c008b2`](https://github.com/ljharb/shell-quote/commit/8c008b223e6174d6bec098251527053e5cc1f30c) +- refactored the chunker regex into a string [`0331c7f`](https://github.com/ljharb/shell-quote/commit/0331c7f63077fda116b3c73540b71880538a4391) +- simple failing double-char op test [`e51fa90`](https://github.com/ljharb/shell-quote/commit/e51fa90f854063a408e8c1645b385c1ed42c72c6) +- failing expanded single-op tests for ; and () [`710bb24`](https://github.com/ljharb/shell-quote/commit/710bb243f23d4a55158688b71cb56b67f66ea99f) +- now passing all the single-char op tests [`e3e9ac1`](https://github.com/ljharb/shell-quote/commit/e3e9ac17ef02300bad7f4faefee5c7a993b3bc97) +- using the control ops directly from the docs [`f535987`](https://github.com/ljharb/shell-quote/commit/f53598732ba606c7bca66fd7d55d809544c452cf) +- first part of op parsing works [`e6f9199`](https://github.com/ljharb/shell-quote/commit/e6f91991fe437eae6b7e4f571843b3d48c746aeb) +- failing redirect tests [`cb94c10`](https://github.com/ljharb/shell-quote/commit/cb94c105a4e32fac2d356b956f53aff999ae88e8) +- another double-char op test just to be sure [`5cf1bf2`](https://github.com/ljharb/shell-quote/commit/5cf1bf29e3324a6cc1e40c01c4529b28ca0b47a5) +- 1.0.0 for ops [`17a40ed`](https://github.com/ljharb/shell-quote/commit/17a40edb3cd7a0f1c44be2be5ddd412c8ca2b7ca) +- adding redirect <> ops to CONTROL makes the tests pass [`48b1eb9`](https://github.com/ljharb/shell-quote/commit/48b1eb97cfa306659de66bd29615051a3644b9ce) +- double-char op test now passing [`3998b0f`](https://github.com/ljharb/shell-quote/commit/3998b0f9ecb32883f8eb3be31110a84d276ac764) +- using the meta chars directly from the docs [`b009ef6`](https://github.com/ljharb/shell-quote/commit/b009ef6d04eb1cc57d66cf3670d24e03fa0fc6bd) +- the spec says tabs are also allowed [`2adb373`](https://github.com/ljharb/shell-quote/commit/2adb37366bdfae198ce61e4658e513d3e0bc98fa) +- op test completely passing [`20a0147`](https://github.com/ljharb/shell-quote/commit/20a01475741d9fba801bbd2b0c1a5f215dc9cec4) + +## [0.1.1](https://github.com/ljharb/shell-quote/compare/0.1.0...0.1.1) - 2013-04-17 + +### Commits + +- Return empty list when parsing an empty (or whitespace-only) string [`1475717`](https://github.com/ljharb/shell-quote/commit/14757177ead209f5ae3c9d4a3020fba9f522725f) + +## [0.1.0](https://github.com/ljharb/shell-quote/compare/0.0.1...0.1.0) - 2013-04-14 + +### Commits + +- externalize the regex declaration [`37d6058`](https://github.com/ljharb/shell-quote/commit/37d60580a4a4656ff836c4a2ecdd7282705ffd27) +- modernize the readme [`24106f5`](https://github.com/ljharb/shell-quote/commit/24106f5c81ab83bddb2bf735cad60e99e1494dcf) +- factor out interpolation [`1b21b01`](https://github.com/ljharb/shell-quote/commit/1b21b018e01392d2c74e53136f8fa0ca838d7643) +- half the env tests are working with basic interpolation [`5891471`](https://github.com/ljharb/shell-quote/commit/589147176be93834bad7fcee83bd255e35c14adc) +- env parse example [`5757c42`](https://github.com/ljharb/shell-quote/commit/5757c4256a4cbaeaabd3d8cd91c7e19109329067) +- failing tests for unimplemented env interpolation [`590534a`](https://github.com/ljharb/shell-quote/commit/590534ae8eced91974a4be8f2b6bc7dcb53e3211) +- denormalize the interpolate logic to make room for special cases [`c669d2e`](https://github.com/ljharb/shell-quote/commit/c669d2e8b84e0eb0dde1798eae7c37a21dc5b7a1) +- cleaner implementation recursing on the double quote case [`adae66f`](https://github.com/ljharb/shell-quote/commit/adae66f47cf11bb7a686c98059436f496d881955) +- one test was wrong, checking for pre escapes [`42b5f83`](https://github.com/ljharb/shell-quote/commit/42b5f8355196d5f2a2c40178576a5d37167e8cb2) +- finally passing all the tests [`efa4084`](https://github.com/ljharb/shell-quote/commit/efa408481db33993fce2a1dd3c15ffac0203fe4c) +- one more test passing with quote recursion [`e9537b9`](https://github.com/ljharb/shell-quote/commit/e9537b943d89535b38c0777c210b5aa9780349b2) +- use tape everywhere [`ed0c1c6`](https://github.com/ljharb/shell-quote/commit/ed0c1c6ae383998874002ae9aa452505c266d630) +- some extra metacharacter tests just to be sure [`a6782ae`](https://github.com/ljharb/shell-quote/commit/a6782aeb931221a459f9cebc371c2311ad680992) +- minor fix to an env test [`601b340`](https://github.com/ljharb/shell-quote/commit/601b3406e7012da97771b0ed538288ddb12d9af8) +- document parse env [`cc0efba`](https://github.com/ljharb/shell-quote/commit/cc0efba0bce75aaab1ead72e81470154a71ec525) +- better parse recursion to capture the containing quotes [`8467961`](https://github.com/ljharb/shell-quote/commit/84679611fd5843777d3d94f157a7b6efe11097ca) +- now just 2 tests failing with a subtle regex reordering [`5448a02`](https://github.com/ljharb/shell-quote/commit/5448a02d356722ec8ef57db2e075e10566e2dcdb) +- pass another test by using "" as the undefined [`46e6cf4`](https://github.com/ljharb/shell-quote/commit/46e6cf4b974e1cec0601e81a0dc2820dc849f775) +- fixed a failing env test [`17d1fda`](https://github.com/ljharb/shell-quote/commit/17d1fdac759e7a94ffc6edc26af27769d30e53bb) +- actually the test was wrong, module works fine [`9d7b727`](https://github.com/ljharb/shell-quote/commit/9d7b727f2911692cffe03e7792b5defad3dd75d2) +- another test to be even more sure [`5afd47b`](https://github.com/ljharb/shell-quote/commit/5afd47ba563d4c1bb7966695e100f63da4b65915) +- failing test for: echo "foo = \"foo\"" [`8dbb280`](https://github.com/ljharb/shell-quote/commit/8dbb2803136a2f7643e7e66b2d6b95f9adfbfd41) + +## [0.0.1](https://github.com/ljharb/shell-quote/compare/0.0.0...0.0.1) - 2012-05-18 + +### Commits + +- fixed unescaped metachars and bump [`5ce339f`](https://github.com/ljharb/shell-quote/commit/5ce339feeaf971a5172fe58faa3ac5f90bdfe8b5) +- failing test for unescaped metachars [`a315125`](https://github.com/ljharb/shell-quote/commit/a315125a0742b01799c89469efd20821540694f6) +- fix for escaped spaces [`669b616`](https://github.com/ljharb/shell-quote/commit/669b61610aad3e6f47e8c043e1635dcc4b5ce375) +- failing test for escaped space [`c6ff3dc`](https://github.com/ljharb/shell-quote/commit/c6ff3dc6811816a667e55a69ec09bffa52f5ee0a) + +## 0.0.0 - 2012-05-18 + +### Commits + +- readme with examples [`6373c0f`](https://github.com/ljharb/shell-quote/commit/6373c0f56de87702a61063ffae354e2bb989de91) +- package.json [`bc27efa`](https://github.com/ljharb/shell-quote/commit/bc27efa033709ede8483bb6ec0f182dcb2b87061) +- passing the parse test [`69c0f85`](https://github.com/ljharb/shell-quote/commit/69c0f8529825d3fdc700e81d32b75378cef47994) +- crazy initial thing [`d6469c9`](https://github.com/ljharb/shell-quote/commit/d6469c95adf0172adc65c4adab04910486368ee7) +- passing quote tests [`e1d6695`](https://github.com/ljharb/shell-quote/commit/e1d669503f0f159068deb45f14ba3a4bf77e90f0) +- failing parse test [`980aa58`](https://github.com/ljharb/shell-quote/commit/980aa585937d049b152b5e7b08c1e068faaaf378) +- using travis [`1c72261`](https://github.com/ljharb/shell-quote/commit/1c72261f45002744fac3fecec3f0395924d66717) +- expand more escape sequences in parse() [`8b2224c`](https://github.com/ljharb/shell-quote/commit/8b2224c465ef70d2320985c57dc0b8ee1c0a3664) diff --git a/node_modules/shell-quote/LICENSE b/node_modules/shell-quote/LICENSE new file mode 100644 index 0000000..3d59c73 --- /dev/null +++ b/node_modules/shell-quote/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 James Halliday (mail@substack.net) + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/shell-quote/README.md b/node_modules/shell-quote/README.md new file mode 100644 index 0000000..6b545c5 --- /dev/null +++ b/node_modules/shell-quote/README.md @@ -0,0 +1,161 @@ +# shell-quote [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Parse and quote shell commands. + +# example + +## quote + +``` js +var quote = require('shell-quote/quote'); +var s = quote([ 'a', 'b c d', '$f', '"g"' ]); +console.log(s); +``` + +output + +``` +a 'b c d' \$f '"g"' +``` + +## parse + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('a "b c" \\$def \'it\\\'s great\''); +console.dir(xs); +``` + +output + +``` +[ 'a', 'b c', '\\$def', 'it\'s great' ] +``` + +## parse with an environment variable + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep --boop="$PWD"', { PWD: '/home/robot' }); +console.dir(xs); +``` + +output + +``` +[ 'beep', '--boop=/home/robot' ] +``` + +## parse with custom escape character + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep ^--boop="$PWD"', { PWD: '/home/robot' }, { escape: '^' }); +console.dir(xs); +``` + +output + +``` +[ 'beep --boop=/home/robot' ] +``` + +## parsing shell operators + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep || boop > /byte'); +console.dir(xs); +``` + +output: + +``` +[ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ] +``` + +## parsing shell comment + +``` js +var parse = require('shell-quote/parse'); +var xs = parse('beep > boop # > kaboom'); +console.dir(xs); +``` + +output: + +``` +[ 'beep', { op: '>' }, 'boop', { comment: '> kaboom' } ] +``` + +# methods + +``` js +var quote = require('shell-quote/quote'); +var parse = require('shell-quote/parse'); +``` + +## quote(args) + +Return a quoted string for the array `args` suitable for using in shell +commands. + +## parse(cmd, env={}) + +Return an array of arguments from the quoted string `cmd`. + +Interpolate embedded bash-style `$VARNAME` and `${VARNAME}` variables with +the `env` object which like bash will replace undefined variables with `""`. + +`env` is usually an object but it can also be a function to perform lookups. +When `env(key)` returns a string, its result will be output just like `env[key]` +would. When `env(key)` returns an object, it will be inserted into the result +array like the operator objects. + +When a bash operator is encountered, the element in the array with be an object +with an `"op"` key set to the operator string. For example: + +``` +'beep || boop > /byte' +``` + +parses as: + +``` +[ 'beep', { op: '||' }, 'boop', { op: '>' }, '/byte' ] +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install shell-quote +``` + +# license + +MIT + +[package-url]: https://npmjs.org/package/shell-quote +[npm-version-svg]: https://versionbadg.es/ljharb/shell-quote.svg +[deps-svg]: https://david-dm.org/ljharb/shell-quote.svg +[deps-url]: https://david-dm.org/ljharb/shell-quote +[dev-deps-svg]: https://david-dm.org/ljharb/shell-quote/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/shell-quote#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/shell-quote.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/shell-quote.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/shell-quote.svg +[downloads-url]: https://npm-stat.com/charts.html?package=shell-quote +[codecov-image]: https://codecov.io/gh/ljharb/shell-quote/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/shell-quote/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/shell-quote +[actions-url]: https://github.com/ljharb/shell-quote/actions diff --git a/node_modules/shell-quote/example/env.js b/node_modules/shell-quote/example/env.js new file mode 100644 index 0000000..1493afc --- /dev/null +++ b/node_modules/shell-quote/example/env.js @@ -0,0 +1,5 @@ +'use strict'; + +var parse = require('../').parse; +var xs = parse('beep --boop="$PWD"', { PWD: '/home/robot' }); +console.dir(xs); diff --git a/node_modules/shell-quote/example/op.js b/node_modules/shell-quote/example/op.js new file mode 100644 index 0000000..82ebf65 --- /dev/null +++ b/node_modules/shell-quote/example/op.js @@ -0,0 +1,5 @@ +'use strict'; + +var parse = require('../').parse; +var xs = parse('beep || boop > /byte'); +console.dir(xs); diff --git a/node_modules/shell-quote/example/parse.js b/node_modules/shell-quote/example/parse.js new file mode 100644 index 0000000..36e6758 --- /dev/null +++ b/node_modules/shell-quote/example/parse.js @@ -0,0 +1,5 @@ +'use strict'; + +var parse = require('../').parse; +var xs = parse('a "b c" \\$def \'it\\\'s great\''); +console.dir(xs); diff --git a/node_modules/shell-quote/example/quote.js b/node_modules/shell-quote/example/quote.js new file mode 100644 index 0000000..91c3d20 --- /dev/null +++ b/node_modules/shell-quote/example/quote.js @@ -0,0 +1,5 @@ +'use strict'; + +var quote = require('../').quote; +var s = quote(['a', 'b c d', '$f', '"g"']); +console.log(s); diff --git a/node_modules/shell-quote/index.js b/node_modules/shell-quote/index.js new file mode 100644 index 0000000..28fb42d --- /dev/null +++ b/node_modules/shell-quote/index.js @@ -0,0 +1,4 @@ +'use strict'; + +exports.quote = require('./quote'); +exports.parse = require('./parse'); diff --git a/node_modules/shell-quote/package.json b/node_modules/shell-quote/package.json new file mode 100644 index 0000000..641127e --- /dev/null +++ b/node_modules/shell-quote/package.json @@ -0,0 +1,66 @@ +{ + "name": "shell-quote", + "description": "quote and parse shell commands", + "version": "1.8.1", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "bugs": "https://github.com/ljharb/shell-quote/issues", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.3" + }, + "homepage": "https://github.com/ljharb/shell-quote", + "keywords": [ + "command", + "parse", + "quote", + "shell" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "http://github.com/ljharb/shell-quote.git" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.7.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/shell-quote/parse.js b/node_modules/shell-quote/parse.js new file mode 100644 index 0000000..71d2eea --- /dev/null +++ b/node_modules/shell-quote/parse.js @@ -0,0 +1,226 @@ +'use strict'; + +// '<(' is process substitution operator and +// can be parsed the same as control operator +var CONTROL = '(?:' + [ + '\\|\\|', + '\\&\\&', + ';;', + '\\|\\&', + '\\<\\(', + '\\<\\<\\<', + '>>', + '>\\&', + '<\\&', + '[&;()|<>]' +].join('|') + ')'; +var controlRE = new RegExp('^' + CONTROL + '$'); +var META = '|&;()<> \\t'; +var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"'; +var DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\''; +var hash = /^#$/; + +var SQ = "'"; +var DQ = '"'; +var DS = '$'; + +var TOKEN = ''; +var mult = 0x100000000; // Math.pow(16, 8); +for (var i = 0; i < 4; i++) { + TOKEN += (mult * Math.random()).toString(16); +} +var startsWithToken = new RegExp('^' + TOKEN); + +function matchAll(s, r) { + var origIndex = r.lastIndex; + + var matches = []; + var matchObj; + + while ((matchObj = r.exec(s))) { + matches.push(matchObj); + if (r.lastIndex === matchObj.index) { + r.lastIndex += 1; + } + } + + r.lastIndex = origIndex; + + return matches; +} + +function getVar(env, pre, key) { + var r = typeof env === 'function' ? env(key) : env[key]; + if (typeof r === 'undefined' && key != '') { + r = ''; + } else if (typeof r === 'undefined') { + r = '$'; + } + + if (typeof r === 'object') { + return pre + TOKEN + JSON.stringify(r) + TOKEN; + } + return pre + r; +} + +function parseInternal(string, env, opts) { + if (!opts) { + opts = {}; + } + var BS = opts.escape || '\\'; + var BAREWORD = '(\\' + BS + '[\'"' + META + ']|[^\\s\'"' + META + '])+'; + + var chunker = new RegExp([ + '(' + CONTROL + ')', // control chars + '(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')+' + ].join('|'), 'g'); + + var matches = matchAll(string, chunker); + + if (matches.length === 0) { + return []; + } + if (!env) { + env = {}; + } + + var commented = false; + + return matches.map(function (match) { + var s = match[0]; + if (!s || commented) { + return void undefined; + } + if (controlRE.test(s)) { + return { op: s }; + } + + // Hand-written scanner/parser for Bash quoting rules: + // + // 1. inside single quotes, all characters are printed literally. + // 2. inside double quotes, all characters are printed literally + // except variables prefixed by '$' and backslashes followed by + // either a double quote or another backslash. + // 3. outside of any quotes, backslashes are treated as escape + // characters and not printed (unless they are themselves escaped) + // 4. quote context can switch mid-token if there is no whitespace + // between the two quote contexts (e.g. all'one'"token" parses as + // "allonetoken") + var quote = false; + var esc = false; + var out = ''; + var isGlob = false; + var i; + + function parseEnvVar() { + i += 1; + var varend; + var varname; + var char = s.charAt(i); + + if (char === '{') { + i += 1; + if (s.charAt(i) === '}') { + throw new Error('Bad substitution: ' + s.slice(i - 2, i + 1)); + } + varend = s.indexOf('}', i); + if (varend < 0) { + throw new Error('Bad substitution: ' + s.slice(i)); + } + varname = s.slice(i, varend); + i = varend; + } else if ((/[*@#?$!_-]/).test(char)) { + varname = char; + i += 1; + } else { + var slicedFromI = s.slice(i); + varend = slicedFromI.match(/[^\w\d_]/); + if (!varend) { + varname = slicedFromI; + i = s.length; + } else { + varname = slicedFromI.slice(0, varend.index); + i += varend.index - 1; + } + } + return getVar(env, '', varname); + } + + for (i = 0; i < s.length; i++) { + var c = s.charAt(i); + isGlob = isGlob || (!quote && (c === '*' || c === '?')); + if (esc) { + out += c; + esc = false; + } else if (quote) { + if (c === quote) { + quote = false; + } else if (quote == SQ) { + out += c; + } else { // Double quote + if (c === BS) { + i += 1; + c = s.charAt(i); + if (c === DQ || c === BS || c === DS) { + out += c; + } else { + out += BS + c; + } + } else if (c === DS) { + out += parseEnvVar(); + } else { + out += c; + } + } + } else if (c === DQ || c === SQ) { + quote = c; + } else if (controlRE.test(c)) { + return { op: s }; + } else if (hash.test(c)) { + commented = true; + var commentObj = { comment: string.slice(match.index + i + 1) }; + if (out.length) { + return [out, commentObj]; + } + return [commentObj]; + } else if (c === BS) { + esc = true; + } else if (c === DS) { + out += parseEnvVar(); + } else { + out += c; + } + } + + if (isGlob) { + return { op: 'glob', pattern: out }; + } + + return out; + }).reduce(function (prev, arg) { // finalize parsed arguments + // TODO: replace this whole reduce with a concat + return typeof arg === 'undefined' ? prev : prev.concat(arg); + }, []); +} + +module.exports = function parse(s, env, opts) { + var mapped = parseInternal(s, env, opts); + if (typeof env !== 'function') { + return mapped; + } + return mapped.reduce(function (acc, s) { + if (typeof s === 'object') { + return acc.concat(s); + } + var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g')); + if (xs.length === 1) { + return acc.concat(xs[0]); + } + return acc.concat(xs.filter(Boolean).map(function (x) { + if (startsWithToken.test(x)) { + return JSON.parse(x.split(TOKEN)[1]); + } + return x; + })); + }, []); +}; diff --git a/node_modules/shell-quote/quote.js b/node_modules/shell-quote/quote.js new file mode 100644 index 0000000..afbccf0 --- /dev/null +++ b/node_modules/shell-quote/quote.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = function quote(xs) { + return xs.map(function (s) { + if (s && typeof s === 'object') { + return s.op.replace(/(.)/g, '\\$1'); + } + if ((/["\s]/).test(s) && !(/'/).test(s)) { + return "'" + s.replace(/(['\\])/g, '\\$1') + "'"; + } + if ((/["'\s]/).test(s)) { + return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"'; + } + return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2'); + }).join(' '); +}; diff --git a/node_modules/shell-quote/security.md b/node_modules/shell-quote/security.md new file mode 100644 index 0000000..dc86413 --- /dev/null +++ b/node_modules/shell-quote/security.md @@ -0,0 +1,11 @@ +# Security Policy + +## Supported Versions + +Only the latest major version is supported at any given time. + +## Reporting a Vulnerability + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/shell-quote/test/comment.js b/node_modules/shell-quote/test/comment.js new file mode 100644 index 0000000..fb15d5c --- /dev/null +++ b/node_modules/shell-quote/test/comment.js @@ -0,0 +1,16 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('comment', function (t) { + t.same(parse('beep#boop'), ['beep', { comment: 'boop' }]); + t.same(parse('beep #boop'), ['beep', { comment: 'boop' }]); + t.same(parse('beep # boop'), ['beep', { comment: ' boop' }]); + t.same(parse('beep # > boop'), ['beep', { comment: ' > boop' }]); + t.same(parse('beep # "> boop"'), ['beep', { comment: ' "> boop"' }]); + t.same(parse('beep "#"'), ['beep', '#']); + t.same(parse('beep #"#"#'), ['beep', { comment: '"#"#' }]); + t.same(parse('beep > boop # > foo'), ['beep', { op: '>' }, 'boop', { comment: ' > foo' }]); + t.end(); +}); diff --git a/node_modules/shell-quote/test/env.js b/node_modules/shell-quote/test/env.js new file mode 100644 index 0000000..4cc0a51 --- /dev/null +++ b/node_modules/shell-quote/test/env.js @@ -0,0 +1,52 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('expand environment variables', function (t) { + t.same(parse('a $XYZ c', { XYZ: 'b' }), ['a', 'b', 'c']); + t.same(parse('a${XYZ}c', { XYZ: 'b' }), ['abc']); + t.same(parse('a${XYZ}c $XYZ', { XYZ: 'b' }), ['abc', 'b']); + t.same(parse('"-$X-$Y-"', { X: 'a', Y: 'b' }), ['-a-b-']); + t.same(parse("'-$X-$Y-'", { X: 'a', Y: 'b' }), ['-$X-$Y-']); + t.same(parse('qrs"$zzz"wxy', { zzz: 'tuv' }), ['qrstuvwxy']); + t.same(parse("qrs'$zzz'wxy", { zzz: 'tuv' }), ['qrs$zzzwxy']); + t.same(parse('qrs${zzz}wxy'), ['qrswxy']); + t.same(parse('qrs$wxy $'), ['qrs', '$']); + t.same(parse('grep "xy$"'), ['grep', 'xy$']); + t.same(parse('ab$x', { x: 'c' }), ['abc']); + t.same(parse('ab\\$x', { x: 'c' }), ['ab$x']); + t.same(parse('ab${x}def', { x: 'c' }), ['abcdef']); + t.same(parse('ab\\${x}def', { x: 'c' }), ['ab${x}def']); + t.same(parse('"ab\\${x}def"', { x: 'c' }), ['ab${x}def']); + + t.end(); +}); + +test('expand environment variables within here-strings', function (t) { + t.same(parse('a <<< $x', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + t.same(parse('a <<< ${x}', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + t.same(parse('a <<< "$x"', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + t.same(parse('a <<< "${x}"', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']); + + t.end(); +}); + +test('environment variables with metacharacters', function (t) { + t.same(parse('a $XYZ c', { XYZ: '"b"' }), ['a', '"b"', 'c']); + t.same(parse('a $XYZ c', { XYZ: '$X', X: 5 }), ['a', '$X', 'c']); + t.same(parse('a"$XYZ"c', { XYZ: "'xyz'" }), ["a'xyz'c"]); + + t.end(); +}); + +test('special shell parameters', function (t) { + var chars = '*@#?-$!0_'.split(''); + t.plan(chars.length); + + chars.forEach(function (c) { + var env = {}; + env[c] = 'xxx'; + t.same(parse('a $' + c + ' c', env), ['a', 'xxx', 'c']); + }); +}); diff --git a/node_modules/shell-quote/test/env_fn.js b/node_modules/shell-quote/test/env_fn.js new file mode 100644 index 0000000..968e912 --- /dev/null +++ b/node_modules/shell-quote/test/env_fn.js @@ -0,0 +1,21 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +function getEnv() { + return 'xxx'; +} + +function getEnvObj() { + return { op: '@@' }; +} + +test('functional env expansion', function (t) { + t.plan(4); + + t.same(parse('a $XYZ c', getEnv), ['a', 'xxx', 'c']); + t.same(parse('a $XYZ c', getEnvObj), ['a', { op: '@@' }, 'c']); + t.same(parse('a${XYZ}c', getEnvObj), ['a', { op: '@@' }, 'c']); + t.same(parse('"a $XYZ c"', getEnvObj), ['a ', { op: '@@' }, ' c']); +}); diff --git a/node_modules/shell-quote/test/op.js b/node_modules/shell-quote/test/op.js new file mode 100644 index 0000000..38d3757 --- /dev/null +++ b/node_modules/shell-quote/test/op.js @@ -0,0 +1,102 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('single operators', function (t) { + t.same(parse('beep | boop'), ['beep', { op: '|' }, 'boop']); + t.same(parse('beep|boop'), ['beep', { op: '|' }, 'boop']); + t.same(parse('beep \\| boop'), ['beep', '|', 'boop']); + t.same(parse('beep "|boop"'), ['beep', '|boop']); + + t.same(parse('echo zing &'), ['echo', 'zing', { op: '&' }]); + t.same(parse('echo zing&'), ['echo', 'zing', { op: '&' }]); + t.same(parse('echo zing\\&'), ['echo', 'zing&']); + t.same(parse('echo "zing\\&"'), ['echo', 'zing\\&']); + + t.same(parse('beep;boop'), ['beep', { op: ';' }, 'boop']); + t.same(parse('(beep;boop)'), [ + { op: '(' }, 'beep', { op: ';' }, 'boop', { op: ')' } + ]); + + t.same(parse('beep>boop'), ['beep', { op: '>' }, 'boop']); + t.same(parse('beep 2>boop'), ['beep', '2', { op: '>' }, 'boop']); + t.same(parse('beep>blip'), + ['beep', { op: ';;' }, 'boop', { op: '|&' }, 'byte', { op: '>>' }, 'blip'] + ); + + t.same(parse('beep 2>&1'), ['beep', '2', { op: '>&' }, '1']); + + t.same( + parse('beep<(boop)'), + ['beep', { op: '<(' }, 'boop', { op: ')' }] + ); + t.same( + parse('beep<<(boop)'), + ['beep', { op: '<' }, { op: '<(' }, 'boop', { op: ')' }] + ); + + t.end(); +}); + +test('duplicating input file descriptors', function (t) { + // duplicating stdout to file descriptor 3 + t.same(parse('beep 3<&1'), ['beep', '3', { op: '<&' }, '1']); + + // duplicating stdout to file descriptor 0, i.e. stdin + t.same(parse('beep <&1'), ['beep', { op: '<&' }, '1']); + + // closes stdin + t.same(parse('beep <&-'), ['beep', { op: '<&' }, '-']); + + t.end(); +}); + +test('here strings', function (t) { + t.same(parse('cat <<< "hello world"'), ['cat', { op: '<<<' }, 'hello world']); + t.same(parse('cat <<< hello'), ['cat', { op: '<<<' }, 'hello']); + t.same(parse('cat<<<;{}']), '\\>\\<\\;\\{\\}'); + t.equal(quote(['a', 1, true, false]), 'a 1 true false'); + t.equal(quote(['a', 1, null, undefined]), 'a 1 null undefined'); + t.equal(quote(['a\\x']), 'a\\\\x'); + t.end(); +}); + +test('quote ops', function (t) { + t.equal(quote(['a', { op: '|' }, 'b']), 'a \\| b'); + t.equal( + quote(['a', { op: '&&' }, 'b', { op: ';' }, 'c']), + 'a \\&\\& b \\; c' + ); + t.end(); +}); + +test('quote windows paths', { skip: 'breaking change, disabled until 2.x' }, function (t) { + var path = 'C:\\projects\\node-shell-quote\\index.js'; + + t.equal(quote([path, 'b', 'c d']), 'C:\\projects\\node-shell-quote\\index.js b \'c d\''); + + t.end(); +}); + +test("chars for windows paths don't break out", function (t) { + var x = '`:\\a\\b'; + t.equal(quote([x]), '\\`\\:\\\\a\\\\b'); + t.end(); +}); diff --git a/node_modules/shell-quote/test/set.js b/node_modules/shell-quote/test/set.js new file mode 100644 index 0000000..9694538 --- /dev/null +++ b/node_modules/shell-quote/test/set.js @@ -0,0 +1,31 @@ +'use strict'; + +var test = require('tape'); +var parse = require('../').parse; + +test('set env vars', function (t) { + t.same( + parse('ABC=444 x y z'), + ['ABC=444', 'x', 'y', 'z'] + ); + t.same( + parse('ABC=3\\ 4\\ 5 x y z'), + ['ABC=3 4 5', 'x', 'y', 'z'] + ); + t.same( + parse('X="7 8 9" printx'), + ['X=7 8 9', 'printx'] + ); + t.same( + parse('X="7 8 9"; printx'), + ['X=7 8 9', { op: ';' }, 'printx'] + ); + t.same( + parse('X="7 8 9"; printx', function () { + t.fail('should not have matched any keys'); + }), + ['X=7 8 9', { op: ';' }, 'printx'] + ); + + t.end(); +}); diff --git a/node_modules/side-channel/.editorconfig b/node_modules/side-channel/.editorconfig new file mode 100644 index 0000000..72e0eba --- /dev/null +++ b/node_modules/side-channel/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +indent_size = 2 +trim_trailing_whitespace = true diff --git a/node_modules/side-channel/.eslintrc b/node_modules/side-channel/.eslintrc new file mode 100644 index 0000000..93978e7 --- /dev/null +++ b/node_modules/side-channel/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-lines-per-function": 0, + "multiline-comment-style": 1, + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/node_modules/side-channel/.github/FUNDING.yml b/node_modules/side-channel/.github/FUNDING.yml new file mode 100644 index 0000000..2a94840 --- /dev/null +++ b/node_modules/side-channel/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/side-channel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel/.nycrc b/node_modules/side-channel/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/side-channel/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/side-channel/CHANGELOG.md b/node_modules/side-channel/CHANGELOG.md new file mode 100644 index 0000000..25369c5 --- /dev/null +++ b/node_modules/side-channel/CHANGELOG.md @@ -0,0 +1,95 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.6](https://github.com/ljharb/side-channel/compare/v1.0.5...v1.0.6) - 2024-02-29 + +### Commits + +- add types [`9beef66`](https://github.com/ljharb/side-channel/commit/9beef6643e6d717ea57bedabf86448123a7dd9e9) +- [meta] simplify `exports` [`4334cf9`](https://github.com/ljharb/side-channel/commit/4334cf9df654151504c383b62a2f9ebdc8d9d5ac) +- [Deps] update `call-bind` [`d6043c4`](https://github.com/ljharb/side-channel/commit/d6043c4d8f4d7be9037dd0f0419c7a2e0e39ec6a) +- [Dev Deps] update `tape` [`6aca376`](https://github.com/ljharb/side-channel/commit/6aca3761868dc8cd5ff7fd9799bf6b95e09a6eb0) + +## [v1.0.5](https://github.com/ljharb/side-channel/compare/v1.0.4...v1.0.5) - 2024-02-06 + +### Commits + +- [actions] reuse common workflows [`3d2e1ff`](https://github.com/ljharb/side-channel/commit/3d2e1ffd16dd6eaaf3e40ff57951f840d2d63c04) +- [meta] use `npmignore` to autogenerate an npmignore file [`04296ea`](https://github.com/ljharb/side-channel/commit/04296ea17d1544b0a5d20fd5bfb31aa4f6513eb9) +- [meta] add `.editorconfig`; add `eclint` [`130f0a6`](https://github.com/ljharb/side-channel/commit/130f0a6adbc04d385c7456a601d38344dce3d6a9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`d480c2f`](https://github.com/ljharb/side-channel/commit/d480c2fbe757489ae9b4275491ffbcc3ac4725e9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`ecbe70e`](https://github.com/ljharb/side-channel/commit/ecbe70e53a418234081a77971fec1fdfae20c841) +- [actions] update rebase action [`75240b9`](https://github.com/ljharb/side-channel/commit/75240b9963b816e8846400d2287cb68f88c7fba7) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `tape` [`ae8d281`](https://github.com/ljharb/side-channel/commit/ae8d281572430099109870fd9430d2ca3f320b8d) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`7125b88`](https://github.com/ljharb/side-channel/commit/7125b885fd0eacad4fee9b073b72d14065ece278) +- [Deps] update `call-bind`, `get-intrinsic`, `object-inspect` [`82577c9`](https://github.com/ljharb/side-channel/commit/82577c9796304519139a570f82a317211b5f3b86) +- [Deps] update `call-bind`, `get-intrinsic`, `object-inspect` [`550aadf`](https://github.com/ljharb/side-channel/commit/550aadf20475a6081fd70304cc54f77259a5c8a8) +- [Tests] increase coverage [`5130877`](https://github.com/ljharb/side-channel/commit/5130877a7b27c862e64e6d1c12a178b28808859d) +- [Deps] update `get-intrinsic`, `object-inspect` [`ba0194c`](https://github.com/ljharb/side-channel/commit/ba0194c505b1a8a0427be14cadd5b8a46d4d01b8) +- [meta] add missing `engines.node` [`985fd24`](https://github.com/ljharb/side-channel/commit/985fd249663cb06617a693a94fe08cad12f5cb70) +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`40227a8`](https://github.com/ljharb/side-channel/commit/40227a87b01709ad2c0eebf87eb4223a800099b9) +- [Deps] update `get-intrinsic` [`a989b40`](https://github.com/ljharb/side-channel/commit/a989b4024958737ae7be9fbffdeff2078f33a0fd) +- [Deps] update `object-inspect` [`aec42d2`](https://github.com/ljharb/side-channel/commit/aec42d2ec541a31aaa02475692c87d489237d9a3) + +## [v1.0.4](https://github.com/ljharb/side-channel/compare/v1.0.3...v1.0.4) - 2020-12-29 + +### Commits + +- [Tests] migrate tests to Github Actions [`10909cb`](https://github.com/ljharb/side-channel/commit/10909cbf8ce9c0bf96f604cf13d7ffd5a22c2d40) +- [Refactor] Use a linked list rather than an array, and move accessed nodes to the beginning [`195613f`](https://github.com/ljharb/side-channel/commit/195613f28b5c1e6072ef0b61b5beebaf2b6a304e) +- [meta] do not publish github action workflow files [`290ec29`](https://github.com/ljharb/side-channel/commit/290ec29cd21a60585145b4a7237ec55228c52c27) +- [Tests] run `nyc` on all tests; use `tape` runner [`ea6d030`](https://github.com/ljharb/side-channel/commit/ea6d030ff3fe6be2eca39e859d644c51ecd88869) +- [actions] add "Allow Edits" workflow [`d464d8f`](https://github.com/ljharb/side-channel/commit/d464d8fe52b5eddf1504a0ed97f0941a90f32c15) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`02daca8`](https://github.com/ljharb/side-channel/commit/02daca87c6809821c97be468d1afa2f5ef447383) +- [Refactor] use `call-bind` and `get-intrinsic` instead of `es-abstract` [`e09d481`](https://github.com/ljharb/side-channel/commit/e09d481528452ebafa5cdeae1af665c35aa2deee) +- [Deps] update `object.assign` [`ee83aa8`](https://github.com/ljharb/side-channel/commit/ee83aa81df313b5e46319a63adb05cf0c179079a) +- [actions] update rebase action to use checkout v2 [`7726b0b`](https://github.com/ljharb/side-channel/commit/7726b0b058b632fccea709f58960871defaaa9d7) + +## [v1.0.3](https://github.com/ljharb/side-channel/compare/v1.0.2...v1.0.3) - 2020-08-23 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`1f10561`](https://github.com/ljharb/side-channel/commit/1f105611ef3acf32dec8032ae5c0baa5e56bb868) +- [Deps] update `es-abstract`, `object-inspect` [`bc20159`](https://github.com/ljharb/side-channel/commit/bc201597949a505e37cef9eaf24c7010831e6f03) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`b9b2b22`](https://github.com/ljharb/side-channel/commit/b9b2b225f9e0ea72a6ec2b89348f0bd690bc9ed1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7055ab4`](https://github.com/ljharb/side-channel/commit/7055ab4de0860606efd2003674a74f1fe6ebc07e) +- [Dev Deps] update `auto-changelog`; add `aud` [`d278c37`](https://github.com/ljharb/side-channel/commit/d278c37d08227be4f84aa769fcd919e73feeba40) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`3bcf982`](https://github.com/ljharb/side-channel/commit/3bcf982faa122745b39c33ce83d32fdf003741c6) +- [Tests] only audit prod deps [`18d01c4`](https://github.com/ljharb/side-channel/commit/18d01c4015b82a3d75044c4d5ba7917b2eac01ec) +- [Deps] update `es-abstract` [`6ab096d`](https://github.com/ljharb/side-channel/commit/6ab096d9de2b482cf5e0717e34e212f5b2b9bc9a) +- [Dev Deps] update `tape` [`9dc174c`](https://github.com/ljharb/side-channel/commit/9dc174cc651dfd300b4b72da936a0a7eda5f9452) +- [Deps] update `es-abstract` [`431d0f0`](https://github.com/ljharb/side-channel/commit/431d0f0ff11fbd2ae6f3115582a356d3a1cfce82) +- [Deps] update `es-abstract` [`49869fd`](https://github.com/ljharb/side-channel/commit/49869fd323bf4453f0ba515c0fb265cf5ab7b932) +- [meta] Add package.json to package's exports [`77d9cdc`](https://github.com/ljharb/side-channel/commit/77d9cdceb2a9e47700074f2ae0c0a202e7dac0d4) + +## [v1.0.2](https://github.com/ljharb/side-channel/compare/v1.0.1...v1.0.2) - 2019-12-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a526df`](https://github.com/ljharb/side-channel/commit/4a526df44e4701566ed001ec78546193f818b082) +- [Deps] update `es-abstract` [`d4f6e62`](https://github.com/ljharb/side-channel/commit/d4f6e629b6fb93a07415db7f30d3c90fd7f264fe) + +## [v1.0.1](https://github.com/ljharb/side-channel/compare/v1.0.0...v1.0.1) - 2019-12-01 + +### Commits + +- [Fix] add missing "exports" [`d212907`](https://github.com/ljharb/side-channel/commit/d2129073abf0701a5343bf28aa2145617604dc2e) + +## v1.0.0 - 2019-12-01 + +### Commits + +- Initial implementation [`dbebd3a`](https://github.com/ljharb/side-channel/commit/dbebd3a4b5ed64242f9a6810efe7c4214cd8cde4) +- Initial tests [`73bdefe`](https://github.com/ljharb/side-channel/commit/73bdefe568c9076cf8c0b8719bc2141aec0e19b8) +- Initial commit [`43c03e1`](https://github.com/ljharb/side-channel/commit/43c03e1c2849ec50a87b7a5cd76238a62b0b8770) +- npm init [`5c090a7`](https://github.com/ljharb/side-channel/commit/5c090a765d66a5527d9889b89aeff78dee91348c) +- [meta] add `auto-changelog` [`a5c4e56`](https://github.com/ljharb/side-channel/commit/a5c4e5675ec02d5eb4d84b4243aeea2a1d38fbec) +- [actions] add automatic rebasing / merge commit blocking [`bab1683`](https://github.com/ljharb/side-channel/commit/bab1683d8f9754b086e94397699fdc645e0d7077) +- [meta] add `funding` field; create FUNDING.yml [`63d7aea`](https://github.com/ljharb/side-channel/commit/63d7aeaf34f5650650ae97ca4b9fae685bd0937c) +- [Tests] add `npm run lint` [`46a5a81`](https://github.com/ljharb/side-channel/commit/46a5a81705cd2664f83df232c01dbbf2ee952885) +- Only apps should have lockfiles [`8b16b03`](https://github.com/ljharb/side-channel/commit/8b16b0305f00895d90c4e2e5773c854cfea0e448) +- [meta] add `safe-publish-latest` [`2f098ef`](https://github.com/ljharb/side-channel/commit/2f098ef092a39399cfe548b19a1fc03c2fd2f490) diff --git a/node_modules/side-channel/LICENSE b/node_modules/side-channel/LICENSE new file mode 100644 index 0000000..3900dd7 --- /dev/null +++ b/node_modules/side-channel/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/side-channel/README.md b/node_modules/side-channel/README.md new file mode 100644 index 0000000..7fa4f06 --- /dev/null +++ b/node_modules/side-channel/README.md @@ -0,0 +1,2 @@ +# side-channel +Store information about any JS value in a side channel. Uses WeakMap if available. diff --git a/node_modules/side-channel/index.d.ts b/node_modules/side-channel/index.d.ts new file mode 100644 index 0000000..7cb112b --- /dev/null +++ b/node_modules/side-channel/index.d.ts @@ -0,0 +1,27 @@ +declare namespace getSideChannel { + type Key = unknown; + type ListNode = { + key: Key; + next: ListNode; + value: T; + }; + type RootNode = { + key: object; + next: null | ListNode; + }; + function listGetNode(list: RootNode, key: ListNode['key']): ListNode | void; + function listGet(objects: RootNode, key: ListNode['key']): T | void; + function listSet(objects: RootNode, key: ListNode['key'], value: T): void; + function listHas(objects: RootNode, key: ListNode['key']): boolean; + + type Channel = { + assert: (key: Key) => void; + has: (key: Key) => boolean; + get: (key: Key) => T; + set: (key: Key, value: T) => void; + } +} + +declare function getSideChannel(): getSideChannel.Channel; + +export = getSideChannel; diff --git a/node_modules/side-channel/index.js b/node_modules/side-channel/index.js new file mode 100644 index 0000000..6b6926e --- /dev/null +++ b/node_modules/side-channel/index.js @@ -0,0 +1,129 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var inspect = require('object-inspect'); + +var $TypeError = require('es-errors/type'); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* +* This function traverses the list returning the node corresponding to the given key. +* +* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly. +*/ +/** @type {import('.').listGetNode} */ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + /** @type {typeof list | NonNullable<(typeof list)['next']>} */ + var prev = list; + /** @type {(typeof list)['next']} */ + var curr; + for (; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + // eslint-disable-next-line no-extra-parens + curr.next = /** @type {NonNullable} */ (list.next); + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +/** @type {import('.').listGet} */ +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +/** @type {import('.').listSet} */ +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = /** @type {import('.').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens + key: key, + next: objects.next, + value: value + }); + } +}; +/** @type {import('.').listHas} */ +var listHas = function (objects, key) { + return !!listGetNode(objects, key); +}; + +/** @type {import('.')} */ +module.exports = function getSideChannel() { + /** @type {WeakMap} */ var $wm; + /** @type {Map} */ var $m; + /** @type {import('.').RootNode} */ var $o; + + /** @type {import('.').Channel} */ + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError('Side channel does not contain ' + inspect(key)); + } + }, + get: function (key) { // eslint-disable-line consistent-return + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listGet($o, key); + } + } + }, + has: function (key) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listHas($o, key); + } + } + return false; + }, + set: function (key, value) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; +}; diff --git a/node_modules/side-channel/package.json b/node_modules/side-channel/package.json new file mode 100644 index 0000000..02cffca --- /dev/null +++ b/node_modules/side-channel/package.json @@ -0,0 +1,84 @@ +{ + "name": "side-channel", + "version": "1.0.6", + "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", + "main": "index.js", + "exports": { + "./package.json": "./package.json", + ".": "./index.js" + }, + "types": "./index.d.ts", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/side-channel.git" + }, + "keywords": [ + "weakmap", + "map", + "side", + "channel", + "metadata" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/side-channel/issues" + }, + "homepage": "https://github.com/ljharb/side-channel#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/get-intrinsic": "^1.2.2", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/side-channel/test/index.js b/node_modules/side-channel/test/index.js new file mode 100644 index 0000000..8da3200 --- /dev/null +++ b/node_modules/side-channel/test/index.js @@ -0,0 +1,83 @@ +'use strict'; + +var test = require('tape'); + +var getSideChannel = require('../'); + +test('export', function (t) { + t.equal(typeof getSideChannel, 'function', 'is a function'); + t.equal(getSideChannel.length, 0, 'takes no arguments'); + + var channel = getSideChannel(); + t.ok(channel, 'is truthy'); + t.equal(typeof channel, 'object', 'is an object'); + + t.end(); +}); + +test('assert', function (t) { + var channel = getSideChannel(); + t['throws']( + function () { channel.assert({}); }, + TypeError, + 'nonexistent value throws' + ); + + var o = {}; + channel.set(o, 'data'); + t.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); + + t.end(); +}); + +test('has', function (t) { + var channel = getSideChannel(); + /** @type {unknown[]} */ var o = []; + + t.equal(channel.has(o), false, 'nonexistent value yields false'); + + channel.set(o, 'foo'); + t.equal(channel.has(o), true, 'existent value yields true'); + + t.equal(channel.has('abc'), false, 'non object value non existent yields false'); + + channel.set('abc', 'foo'); + t.equal(channel.has('abc'), true, 'non object value that exists yields true'); + + t.end(); +}); + +test('get', function (t) { + var channel = getSideChannel(); + var o = {}; + t.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); + + var data = {}; + channel.set(o, data); + t.equal(channel.get(o), data, '"get" yields data set by "set"'); + + t.end(); +}); + +test('set', function (t) { + var channel = getSideChannel(); + var o = function () {}; + t.equal(channel.get(o), undefined, 'value not set'); + + channel.set(o, 42); + t.equal(channel.get(o), 42, 'value was set'); + + channel.set(o, Infinity); + t.equal(channel.get(o), Infinity, 'value was set again'); + + var o2 = {}; + channel.set(o2, 17); + t.equal(channel.get(o), Infinity, 'o is not modified'); + t.equal(channel.get(o2), 17, 'o2 is set'); + + channel.set(o, 14); + t.equal(channel.get(o), 14, 'o is modified'); + t.equal(channel.get(o2), 17, 'o2 is not modified'); + + t.end(); +}); diff --git a/node_modules/side-channel/tsconfig.json b/node_modules/side-channel/tsconfig.json new file mode 100644 index 0000000..fdfa155 --- /dev/null +++ b/node_modules/side-channel/tsconfig.json @@ -0,0 +1,50 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage", + "test/list-exports" + ], +} diff --git a/node_modules/snapdragon-node/LICENSE b/node_modules/snapdragon-node/LICENSE new file mode 100644 index 0000000..9a1c856 --- /dev/null +++ b/node_modules/snapdragon-node/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/snapdragon-node/README.md b/node_modules/snapdragon-node/README.md new file mode 100644 index 0000000..2300a3c --- /dev/null +++ b/node_modules/snapdragon-node/README.md @@ -0,0 +1,453 @@ +# snapdragon-node [![NPM version](https://img.shields.io/npm/v/snapdragon-node.svg?style=flat)](https://www.npmjs.com/package/snapdragon-node) [![NPM monthly downloads](https://img.shields.io/npm/dm/snapdragon-node.svg?style=flat)](https://npmjs.org/package/snapdragon-node) [![NPM total downloads](https://img.shields.io/npm/dt/snapdragon-node.svg?style=flat)](https://npmjs.org/package/snapdragon-node) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon-node.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/snapdragon-node) + +> Snapdragon utility for creating a new AST node in custom code, such as plugins. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon-node +``` + +## Usage + +With [snapdragon](https://github.com/jonschlinkert/snapdragon) v0.9.0 and higher you can use `this.node()` to create a new `Node`, whenever it makes sense. + +```js +var Node = require('snapdragon-node'); +var Snapdragon = require('snapdragon'); +var snapdragon = new Snapdragon(); + +// example usage inside a parser visitor function +snapdragon.parser.set('foo', function() { + // get the current "start" position + var pos = this.position(); + + // returns the match if regex matches the substring + // at the current position on `parser.input` + var match = this.match(/foo/); + if (match) { + // call "pos" on the node, to set the start and end + // positions, and return the node to push it onto the AST + // (snapdragon will push the node onto the correct + // nodes array, based on the stack) + return pos(new Node({type: 'bar', val: match[0]})); + } +}); +``` + +## API + +### [Node](index.js#L22) + +Create a new AST `Node` with the given `val` and `type`. + +**Params** + +* `val` **{String|Object}**: Pass a matched substring, or an object to merge onto the node. +* `type` **{String}**: The node type to use when `val` is a string. +* `returns` **{Object}**: node instance + +**Example** + +```js +var node = new Node('*', 'Star'); +var node = new Node({type: 'star', val: '*'}); +``` + +### [.isNode](index.js#L61) + +Returns true if the given value is a node. + +**Params** + +* `node` **{Object}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(Node.isNode(node)); //=> true +console.log(Node.isNode({})); //=> false +``` + +### [.define](index.js#L80) + +Define a non-enumberable property on the node instance. Useful for adding properties that shouldn't be extended or visible during debugging. + +**Params** + +* `name` **{String}** +* `val` **{any}** +* `returns` **{Object}**: returns the node instance + +**Example** + +```js +var node = new Node(); +node.define('foo', 'something non-enumerable'); +``` + +### [.isEmpty](index.js#L100) + +Returns true if `node.val` is an empty string, or `node.nodes` does not contain any non-empty text nodes. + +**Params** + +* `fn` **{Function}**: (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes. +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'text'}); +node.isEmpty(); //=> true +node.val = 'foo'; +node.isEmpty(); //=> false +``` + +### [.push](index.js#L118) + +Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and set `foo` as `bar.parent`. + +**Params** + +* `node` **{Object}** +* `returns` **{Number}**: Returns the length of `node.nodes` + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.push(bar); +``` + +### [.unshift](index.js#L140) + +Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and set `foo` as `bar.parent`. + +**Params** + +* `node` **{Object}** +* `returns` **{Number}**: Returns the length of `node.nodes` + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.unshift(bar); +``` + +### [.pop](index.js#L167) + +Pop a node from `node.nodes`. + +* `returns` **{Number}**: Returns the popped `node` + +**Example** + +```js +var node = new Node({type: 'foo'}); +node.push(new Node({type: 'a'})); +node.push(new Node({type: 'b'})); +node.push(new Node({type: 'c'})); +node.push(new Node({type: 'd'})); +console.log(node.nodes.length); +//=> 4 +node.pop(); +console.log(node.nodes.length); +//=> 3 +``` + +### [.shift](index.js#L190) + +Shift a node from `node.nodes`. + +* `returns` **{Object}**: Returns the shifted `node` + +**Example** + +```js +var node = new Node({type: 'foo'}); +node.push(new Node({type: 'a'})); +node.push(new Node({type: 'b'})); +node.push(new Node({type: 'c'})); +node.push(new Node({type: 'd'})); +console.log(node.nodes.length); +//=> 4 +node.shift(); +console.log(node.nodes.length); +//=> 3 +``` + +### [.remove](index.js#L205) + +Remove `node` from `node.nodes`. + +**Params** + +* `node` **{Object}** +* `returns` **{Object}**: Returns the removed node. + +**Example** + +```js +node.remove(childNode); +``` + +### [.find](index.js#L231) + +Get the first child node from `node.nodes` that matches the given `type`. If `type` is a number, the child node at that index is returned. + +**Params** + +* `type` **{String}** +* `returns` **{Object}**: Returns a child node or undefined. + +**Example** + +```js +var child = node.find(1); //<= index of the node to get +var child = node.find('foo'); //<= node.type of a child node +var child = node.find(/^(foo|bar)$/); //<= regex to match node.type +var child = node.find(['foo', 'bar']); //<= array of node.type(s) +``` + +### [.isType](index.js#L249) + +Return true if the node is the given `type`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'bar'}); +cosole.log(node.isType('foo')); // false +cosole.log(node.isType(/^(foo|bar)$/)); // true +cosole.log(node.isType(['foo', 'bar'])); // true +``` + +### [.hasType](index.js#L270) + +Return true if the `node.nodes` has the given `type`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +foo.push(bar); + +cosole.log(foo.hasType('qux')); // false +cosole.log(foo.hasType(/^(qux|bar)$/)); // true +cosole.log(foo.hasType(['qux', 'bar'])); // true +``` + +* `returns` **{Array}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(bar.siblings.length) // 2 +console.log(baz.siblings.length) // 2 +``` + +* `returns` **{Number}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.unshift(qux); + +console.log(bar.index) // 1 +console.log(baz.index) // 2 +console.log(qux.index) // 0 +``` + +* `returns` **{Object}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(baz.prev.type) // 'bar' +``` + +* `returns` **{Object}** + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +foo.push(bar); +foo.push(baz); + +console.log(bar.siblings.length) // 2 +console.log(baz.siblings.length) // 2 +``` + +* `returns` **{Object}**: The first node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.first.type) // 'bar' +``` + +* `returns` **{Object}**: The last node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.last.type) // 'qux' +``` + +* `returns` **{Object}**: The last node, or undefiend + +**Example** + +```js +var foo = new Node({type: 'foo'}); +var bar = new Node({type: 'bar'}); +var baz = new Node({type: 'baz'}); +var qux = new Node({type: 'qux'}); +foo.push(bar); +foo.push(baz); +foo.push(qux); + +console.log(foo.last.type) // 'qux' +``` + +## Release history + +Changelog entries are classified using the following labels from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes + +Custom labels used in this changelog: + +* `dependencies`: bumps dependencies +* `housekeeping`: code re-organization, minor edits, or other changes that don't fit in one of the other categories. + +### [2.0.0] - 2017-05-01 + +**Changed** + +* `.unshiftNode` was renamed to [.unshift](#unshift) +* `.pushNode` was renamed to [.push](#push) +* `.getNode` was renamed to [.find](#find) + +**Added** + +* [.isNode](#isNode) +* [.isEmpty](#isEmpty) +* [.pop](#pop) +* [.shift](#shift) +* [.remove](#remove) + +### [0.1.0] + +First release. + +## About + +### Related projects + +* [breakdance](https://www.npmjs.com/package/breakdance): Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy… [more](http://breakdance.io) | [homepage](http://breakdance.io "Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy to use. It's time for your markup to get down.") +* [snapdragon-capture](https://www.npmjs.com/package/snapdragon-capture): Snapdragon plugin that adds a capture method to the parser instance. | [homepage](https://github.com/jonschlinkert/snapdragon-capture "Snapdragon plugin that adds a capture method to the parser instance.") +* [snapdragon-cheerio](https://www.npmjs.com/package/snapdragon-cheerio): Snapdragon plugin for converting a cheerio AST to a snapdragon AST. | [homepage](https://github.com/jonschlinkert/snapdragon-cheerio "Snapdragon plugin for converting a cheerio AST to a snapdragon AST.") +* [snapdragon-util](https://www.npmjs.com/package/snapdragon-util): Utilities for the snapdragon parser/compiler. | [homepage](https://github.com/jonschlinkert/snapdragon-util "Utilities for the snapdragon parser/compiler.") +* [snapdragon](https://www.npmjs.com/package/snapdragon): Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map… [more](https://github.com/jonschlinkert/snapdragon) | [homepage](https://github.com/jonschlinkert/snapdragon "Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map support.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 25, 2017._ \ No newline at end of file diff --git a/node_modules/snapdragon-node/index.js b/node_modules/snapdragon-node/index.js new file mode 100644 index 0000000..0f66ff5 --- /dev/null +++ b/node_modules/snapdragon-node/index.js @@ -0,0 +1,492 @@ +'use strict'; + +var isObject = require('isobject'); +var define = require('define-property'); +var utils = require('snapdragon-util'); +var ownNames; + +/** + * Create a new AST `Node` with the given `val` and `type`. + * + * ```js + * var node = new Node('*', 'Star'); + * var node = new Node({type: 'star', val: '*'}); + * ``` + * @name Node + * @param {String|Object} `val` Pass a matched substring, or an object to merge onto the node. + * @param {String} `type` The node type to use when `val` is a string. + * @return {Object} node instance + * @api public + */ + +function Node(val, type, parent) { + if (typeof type !== 'string') { + parent = type; + type = null; + } + + define(this, 'parent', parent); + define(this, 'isNode', true); + define(this, 'expect', null); + + if (typeof type !== 'string' && isObject(val)) { + lazyKeys(); + var keys = Object.keys(val); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (ownNames.indexOf(key) === -1) { + this[key] = val[key]; + } + } + } else { + this.type = type; + this.val = val; + } +} + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(Node.isNode(node)); //=> true + * console.log(Node.isNode({})); //=> false + * ``` + * @param {Object} `node` + * @returns {Boolean} + * @api public + */ + +Node.isNode = function(node) { + return utils.isNode(node); +}; + +/** + * Define a non-enumberable property on the node instance. + * Useful for adding properties that shouldn't be extended + * or visible during debugging. + * + * ```js + * var node = new Node(); + * node.define('foo', 'something non-enumerable'); + * ``` + * @param {String} `name` + * @param {any} `val` + * @return {Object} returns the node instance + * @api public + */ + +Node.prototype.define = function(name, val) { + define(this, name, val); + return this; +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * node.isEmpty(); //=> true + * node.val = 'foo'; + * node.isEmpty(); //=> false + * ``` + * @param {Function} `fn` (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes. + * @return {Boolean} + * @api public + */ + +Node.prototype.isEmpty = function(fn) { + return utils.isEmpty(this, fn); +}; + +/** + * Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.push = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.push(node); +}; + +/** + * Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and + * set `foo` as `bar.parent`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.unshift(bar); + * ``` + * @param {Object} `node` + * @return {Number} Returns the length of `node.nodes` + * @api public + */ + +Node.prototype.unshift = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + define(node, 'parent', this); + + this.nodes = this.nodes || []; + return this.nodes.unshift(node); +}; + +/** + * Pop a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.pop(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Number} Returns the popped `node` + * @api public + */ + +Node.prototype.pop = function() { + return this.nodes && this.nodes.pop(); +}; + +/** + * Shift a node from `node.nodes`. + * + * ```js + * var node = new Node({type: 'foo'}); + * node.push(new Node({type: 'a'})); + * node.push(new Node({type: 'b'})); + * node.push(new Node({type: 'c'})); + * node.push(new Node({type: 'd'})); + * console.log(node.nodes.length); + * //=> 4 + * node.shift(); + * console.log(node.nodes.length); + * //=> 3 + * ``` + * @return {Object} Returns the shifted `node` + * @api public + */ + +Node.prototype.shift = function() { + return this.nodes && this.nodes.shift(); +}; + +/** + * Remove `node` from `node.nodes`. + * + * ```js + * node.remove(childNode); + * ``` + * @param {Object} `node` + * @return {Object} Returns the removed node. + * @api public + */ + +Node.prototype.remove = function(node) { + assert(Node.isNode(node), 'expected node to be an instance of Node'); + this.nodes = this.nodes || []; + var idx = node.index; + if (idx !== -1) { + node.index = -1; + return this.nodes.splice(idx, 1); + } + return null; +}; + +/** + * Get the first child node from `node.nodes` that matches the given `type`. + * If `type` is a number, the child node at that index is returned. + * + * ```js + * var child = node.find(1); //<= index of the node to get + * var child = node.find('foo'); //<= node.type of a child node + * var child = node.find(/^(foo|bar)$/); //<= regex to match node.type + * var child = node.find(['foo', 'bar']); //<= array of node.type(s) + * ``` + * @param {String} `type` + * @return {Object} Returns a child node or undefined. + * @api public + */ + +Node.prototype.find = function(type) { + return utils.findNode(this.nodes, type); +}; + +/** + * Return true if the node is the given `type`. + * + * ```js + * var node = new Node({type: 'bar'}); + * cosole.log(node.isType('foo')); // false + * cosole.log(node.isType(/^(foo|bar)$/)); // true + * cosole.log(node.isType(['foo', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.isType = function(type) { + return utils.isType(this, type); +}; + +/** + * Return true if the `node.nodes` has the given `type`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * foo.push(bar); + * + * cosole.log(foo.hasType('qux')); // false + * cosole.log(foo.hasType(/^(qux|bar)$/)); // true + * cosole.log(foo.hasType(['qux', 'bar'])); // true + * ``` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +Node.prototype.hasType = function(type) { + return utils.hasType(this, type); +}; + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Array} + * @api public + */ + +Object.defineProperty(Node.prototype, 'siblings', { + set: function() { + throw new Error('node.siblings is a getter and cannot be defined'); + }, + get: function() { + return this.parent ? this.parent.nodes : null; + } +}); + +/** + * Get the node's current index from `node.parent.nodes`. + * This should always be correct, even when the parent adds nodes. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.unshift(qux); + * + * console.log(bar.index) // 1 + * console.log(baz.index) // 2 + * console.log(qux.index) // 0 + * ``` + * @return {Number} + * @api public + */ + +Object.defineProperty(Node.prototype, 'index', { + set: function(index) { + define(this, 'idx', index); + }, + get: function() { + if (!Array.isArray(this.siblings)) { + return -1; + } + var tok = this.idx !== -1 ? this.siblings[this.idx] : null; + if (tok !== this) { + this.idx = this.siblings.indexOf(this); + } + return this.idx; + } +}); + +/** + * Get the previous node from the siblings array or `null`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(baz.prev.type) // 'bar' + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'prev', { + set: function() { + throw new Error('node.prev is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index - 1] || this.parent.prev; + } + return null; + } +}); + +/** + * Get the siblings array, or `null` if it doesn't exist. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * foo.push(bar); + * foo.push(baz); + * + * console.log(bar.siblings.length) // 2 + * console.log(baz.siblings.length) // 2 + * ``` + * @return {Object} + * @api public + */ + +Object.defineProperty(Node.prototype, 'next', { + set: function() { + throw new Error('node.next is a getter and cannot be defined'); + }, + get: function() { + if (Array.isArray(this.siblings)) { + return this.siblings[this.index + 1] || this.parent.next; + } + return null; + } +}); + +/** + * Get the first node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.first.type) // 'bar' + * ``` + * @return {Object} The first node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'first', { + get: function() { + return this.nodes ? this.nodes[0] : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'last', { + get: function() { + return this.nodes ? utils.last(this.nodes) : null; + } +}); + +/** + * Get the last node from `node.nodes`. + * + * ```js + * var foo = new Node({type: 'foo'}); + * var bar = new Node({type: 'bar'}); + * var baz = new Node({type: 'baz'}); + * var qux = new Node({type: 'qux'}); + * foo.push(bar); + * foo.push(baz); + * foo.push(qux); + * + * console.log(foo.last.type) // 'qux' + * ``` + * @return {Object} The last node, or undefiend + * @api public + */ + +Object.defineProperty(Node.prototype, 'scope', { + get: function() { + if (this.isScope !== true) { + return this.parent ? this.parent.scope : this; + } + return this; + } +}); + +/** + * Get own property names from Node prototype, but only the + * first time `Node` is instantiated + */ + +function lazyKeys() { + if (!ownNames) { + ownNames = Object.getOwnPropertyNames(Node.prototype); + } +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} + +/** + * Expose `Node` + */ + +exports = module.exports = Node; diff --git a/node_modules/snapdragon-node/node_modules/define-property/LICENSE b/node_modules/snapdragon-node/node_modules/define-property/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/snapdragon-node/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/snapdragon-node/node_modules/define-property/README.md b/node_modules/snapdragon-node/node_modules/define-property/README.md new file mode 100644 index 0000000..2f1af05 --- /dev/null +++ b/node_modules/snapdragon-node/node_modules/define-property/README.md @@ -0,0 +1,95 @@ +# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save define-property +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add define-property +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ \ No newline at end of file diff --git a/node_modules/snapdragon-node/node_modules/define-property/index.js b/node_modules/snapdragon-node/node_modules/define-property/index.js new file mode 100644 index 0000000..27c19eb --- /dev/null +++ b/node_modules/snapdragon-node/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/snapdragon-node/node_modules/define-property/package.json b/node_modules/snapdragon-node/node_modules/define-property/package.json new file mode 100644 index 0000000..e0ab1ca --- /dev/null +++ b/node_modules/snapdragon-node/node_modules/define-property/package.json @@ -0,0 +1,62 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "extend-shallow", + "merge-deep", + "assign-deep", + "mixin-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/snapdragon-node/package.json b/node_modules/snapdragon-node/package.json new file mode 100644 index 0000000..2ca8023 --- /dev/null +++ b/node_modules/snapdragon-node/package.json @@ -0,0 +1,76 @@ +{ + "name": "snapdragon-node", + "description": "Snapdragon utility for creating a new AST node in custom code, such as plugins.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/snapdragon-node", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/snapdragon-node", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon-node/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "mocha": "^3.4.2", + "snapdragon": "^0.11.0" + }, + "keywords": [ + "ast", + "compile", + "compiler", + "convert", + "node", + "parse", + "parser", + "plugin", + "render", + "snapdragon", + "snapdragonplugin", + "token", + "transform" + ], + "verb": { + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "breakdance", + "snapdragon", + "snapdragon-capture", + "snapdragon-cheerio", + "snapdragon-util" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/snapdragon-util/LICENSE b/node_modules/snapdragon-util/LICENSE new file mode 100644 index 0000000..9a1c856 --- /dev/null +++ b/node_modules/snapdragon-util/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/snapdragon-util/README.md b/node_modules/snapdragon-util/README.md new file mode 100644 index 0000000..b654e02 --- /dev/null +++ b/node_modules/snapdragon-util/README.md @@ -0,0 +1,807 @@ +# snapdragon-util [![NPM version](https://img.shields.io/npm/v/snapdragon-util.svg?style=flat)](https://www.npmjs.com/package/snapdragon-util) [![NPM monthly downloads](https://img.shields.io/npm/dm/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![NPM total downloads](https://img.shields.io/npm/dt/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon-util.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/snapdragon-util) + +> Utilities for the snapdragon parser/compiler. + +
+Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [API](#api) +- [Release history](#release-history) + * [[3.0.0] - 2017-05-01](#300---2017-05-01) + * [[0.1.0]](#010) +- [About](#about) + +
+ +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon-util +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add snapdragon-util +``` + +## Usage + +```js +var util = require('snapdragon-util'); +``` + +## API + +### [.isNode](index.js#L21) + +Returns true if the given value is a node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(utils.isNode(node)); //=> true +console.log(utils.isNode({})); //=> false +``` + +### [.noop](index.js#L37) + +Emit an empty string for the given `node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +// do nothing for beginning-of-string +snapdragon.compiler.set('bos', utils.noop); +``` + +### [.identity](index.js#L53) + +Appdend `node.val` to `compiler.output`, exactly as it was created by the parser. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +snapdragon.compiler.set('text', utils.identity); +``` + +### [.append](index.js#L76) + +Previously named `.emit`, this method appends the given `val` to `compiler.output` for the given node. Useful when you know what value should be appended advance, regardless of the actual value of `node.val`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Function}**: Returns a compiler middleware function. + +**Example** + +```js +snapdragon.compiler + .set('i', function(node) { + this.mapVisit(node); + }) + .set('i.open', utils.append('')) + .set('i.close', utils.append('')) +``` + +### [.toNoop](index.js#L99) + +Used in compiler middleware, this onverts an AST node into an empty `text` node and deletes `node.nodes` if it exists. The advantage of this method is that, as opposed to completely removing the node, indices will not need to be re-calculated in sibling nodes, and nothing is appended to the output. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `nodes` **{Array}**: Optionally pass a new `nodes` value, to replace the existing `node.nodes` array. + +**Example** + +```js +utils.toNoop(node); +// convert `node.nodes` to the given value instead of deleting it +utils.toNoop(node, []); +``` + +### [.visit](index.js#L128) + +Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon automatically calls registered compilers, this allows you to pass a visitor function. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `fn` **{Function}** +* `returns` **{Object}**: returns the node after recursively visiting all child nodes. + +**Example** + +```js +snapdragon.compiler.set('i', function(node) { + utils.visit(node, function(childNode) { + // do stuff with "childNode" + return childNode; + }); +}); +``` + +### [.mapVisit](index.js#L155) + +Map [visit](#visit) the given `fn` over `node.nodes`. This is called by [visit](#visit), use this method if you do not want `fn` to be called on the first node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `options` **{Object}** +* `fn` **{Function}** +* `returns` **{Object}**: returns the node + +**Example** + +```js +snapdragon.compiler.set('i', function(node) { + utils.mapVisit(node, function(childNode) { + // do stuff with "childNode" + return childNode; + }); +}); +``` + +### [.addOpen](index.js#L194) + +Unshift an `*.open` node onto `node.nodes`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the created opening node. + +**Example** + +```js +var Node = require('snapdragon-node'); +snapdragon.parser.set('brace', function(node) { + var match = this.match(/^{/); + if (match) { + var parent = new Node({type: 'brace'}); + utils.addOpen(parent, Node); + console.log(parent.nodes[0]): + // { type: 'brace.open', val: '' }; + + // push the parent "brace" node onto the stack + this.push(parent); + + // return the parent node, so it's also added to the AST + return brace; + } +}); +``` + +### [.addClose](index.js#L244) + +Push a `*.close` node onto `node.nodes`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the created closing node. + +**Example** + +```js +var Node = require('snapdragon-node'); +snapdragon.parser.set('brace', function(node) { + var match = this.match(/^}/); + if (match) { + var parent = this.parent(); + if (parent.type !== 'brace') { + throw new Error('missing opening: ' + '}'); + } + + utils.addClose(parent, Node); + console.log(parent.nodes[parent.nodes.length - 1]): + // { type: 'brace.close', val: '' }; + + // no need to return a node, since the parent + // was already added to the AST + return; + } +}); +``` + +### [.wrapNodes](index.js#L274) + +Wraps the given `node` with `*.open` and `*.close` nodes. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `Node` **{Function}**: (required) Node constructor function from [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node). +* `filter` **{Function}**: Optionaly specify a filter function to exclude the node. +* `returns` **{Object}**: Returns the node + +### [.pushNode](index.js#L299) + +Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Object}**: Returns the child node + +**Example** + +```js +var parent = new Node({type: 'foo'}); +var node = new Node({type: 'bar'}); +utils.pushNode(parent, node); +console.log(parent.nodes[0].type) // 'bar' +console.log(node.parent.type) // 'foo' +``` + +### [.unshiftNode](index.js#L325) + +Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{undefined}** + +**Example** + +```js +var parent = new Node({type: 'foo'}); +var node = new Node({type: 'bar'}); +utils.unshiftNode(parent, node); +console.log(parent.nodes[0].type) // 'bar' +console.log(node.parent.type) // 'foo' +``` + +### [.popNode](index.js#L354) + +Pop the last `node` off of `parent.nodes`. The advantage of using this method is that it checks for `node.nodes` and works with any version of `snapdragon-node`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Number|Undefined}**: Returns the length of `node.nodes` or undefined. + +**Example** + +```js +var parent = new Node({type: 'foo'}); +utils.pushNode(parent, new Node({type: 'foo'})); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.popNode(parent); +console.log(parent.nodes.length); //=> 2 +``` + +### [.shiftNode](index.js#L382) + +Shift the first `node` off of `parent.nodes`. The advantage of using this method is that it checks for `node.nodes` and works with any version of `snapdragon-node`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Number|Undefined}**: Returns the length of `node.nodes` or undefined. + +**Example** + +```js +var parent = new Node({type: 'foo'}); +utils.pushNode(parent, new Node({type: 'foo'})); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.shiftNode(parent); +console.log(parent.nodes.length); //=> 2 +``` + +### [.removeNode](index.js#L409) + +Remove the specified `node` from `parent.nodes`. + +**Params** + +* `parent` **{Object}** +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Object|undefined}**: Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`. + +**Example** + +```js +var parent = new Node({type: 'abc'}); +var foo = new Node({type: 'foo'}); +utils.pushNode(parent, foo); +utils.pushNode(parent, new Node({type: 'bar'})); +utils.pushNode(parent, new Node({type: 'baz'})); +console.log(parent.nodes.length); //=> 3 +utils.removeNode(parent, foo); +console.log(parent.nodes.length); //=> 2 +``` + +### [.isType](index.js#L443) + +Returns true if `node.type` matches the given `type`. Throws a `TypeError` if `node` is not an instance of `Node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({type: 'foo'}); +console.log(utils.isType(node, 'foo')); // false +console.log(utils.isType(node, 'bar')); // true +``` + +### [.hasType](index.js#L486) + +Returns true if the given `node` has the given `type` in `node.nodes`. Throws a `TypeError` if `node` is not an instance of `Node`. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'bar'}), + new Node({type: 'baz'}) + ] +}); +console.log(utils.hasType(node, 'xyz')); // false +console.log(utils.hasType(node, 'baz')); // true +``` + +### [.firstOfType](index.js#L519) + +Returns the first node from `node.nodes` of the given `type` + +**Params** + +* `nodes` **{Array}** +* `type` **{String}** +* `returns` **{Object|undefined}**: Returns the first matching node or undefined. + +**Example** + +```js +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'text', val: 'abc'}), + new Node({type: 'text', val: 'xyz'}) + ] +}); + +var textNode = utils.firstOfType(node.nodes, 'text'); +console.log(textNode.val); +//=> 'abc' +``` + +### [.findNode](index.js#L556) + +Returns the node at the specified index, or the first node of the given `type` from `node.nodes`. + +**Params** + +* `nodes` **{Array}** +* `type` **{String|Number}**: Node type or index. +* `returns` **{Object}**: Returns a node or undefined. + +**Example** + +```js +var node = new Node({ + type: 'foo', + nodes: [ + new Node({type: 'text', val: 'abc'}), + new Node({type: 'text', val: 'xyz'}) + ] +}); + +var nodeOne = utils.findNode(node.nodes, 'text'); +console.log(nodeOne.val); +//=> 'abc' + +var nodeTwo = utils.findNode(node.nodes, 1); +console.log(nodeTwo.val); +//=> 'xyz' +``` + +### [.isOpen](index.js#L584) + +Returns true if the given node is an "*.open" node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); + +console.log(utils.isOpen(brace)); // false +console.log(utils.isOpen(open)); // true +console.log(utils.isOpen(close)); // false +``` + +### [.isClose](index.js#L607) + +Returns true if the given node is a "*.close" node. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); + +console.log(utils.isClose(brace)); // false +console.log(utils.isClose(open)); // false +console.log(utils.isClose(close)); // true +``` + +### [.hasOpen](index.js#L633) + +Returns true if `node.nodes` **has** an `.open` node + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var open = new Node({type: 'brace.open'}); +console.log(utils.hasOpen(brace)); // false + +brace.pushNode(open); +console.log(utils.hasOpen(brace)); // true +``` + +### [.hasClose](index.js#L663) + +Returns true if `node.nodes` **has** a `.close` node + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var close = new Node({type: 'brace.close'}); +console.log(utils.hasClose(brace)); // false + +brace.pushNode(close); +console.log(utils.hasClose(brace)); // true +``` + +### [.hasOpenAndClose](index.js#L697) + +Returns true if `node.nodes` has both `.open` and `.close` nodes + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Boolean}** + +**Example** + +```js +var Node = require('snapdragon-node'); +var brace = new Node({ + type: 'brace', + nodes: [] +}); + +var open = new Node({type: 'brace.open'}); +var close = new Node({type: 'brace.close'}); +console.log(utils.hasOpen(brace)); // false +console.log(utils.hasClose(brace)); // false + +brace.pushNode(open); +brace.pushNode(close); +console.log(utils.hasOpen(brace)); // true +console.log(utils.hasClose(brace)); // true +``` + +### [.addType](index.js#L719) + +Push the given `node` onto the `state.inside` array for the given type. This array is used as a specialized "stack" for only the given `node.type`. + +**Params** + +* `state` **{Object}**: The `compiler.state` object or custom state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Array}**: Returns the `state.inside` stack for the given type. + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +utils.addType(state, node); +console.log(state.inside); +//=> { brace: [{type: 'brace'}] } +``` + +### [.removeType](index.js#L759) + +Remove the given `node` from the `state.inside` array for the given type. This array is used as a specialized "stack" for only the given `node.type`. + +**Params** + +* `state` **{Object}**: The `compiler.state` object or custom state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `returns` **{Array}**: Returns the `state.inside` stack for the given type. + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +utils.addType(state, node); +console.log(state.inside); +//=> { brace: [{type: 'brace'}] } +utils.removeType(state, node); +//=> { brace: [] } +``` + +### [.isEmpty](index.js#L788) + +Returns true if `node.val` is an empty string, or `node.nodes` does not contain any non-empty text nodes. + +**Params** + +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `fn` **{Function}** +* `returns` **{Boolean}** + +**Example** + +```js +var node = new Node({type: 'text'}); +utils.isEmpty(node); //=> true +node.val = 'foo'; +utils.isEmpty(node); //=> false +``` + +### [.isInsideType](index.js#L833) + +Returns true if the `state.inside` stack for the given type exists and has one or more nodes on it. + +**Params** + +* `state` **{Object}** +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +console.log(utils.isInsideType(state, 'brace')); //=> false +utils.addType(state, node); +console.log(utils.isInsideType(state, 'brace')); //=> true +utils.removeType(state, node); +console.log(utils.isInsideType(state, 'brace')); //=> false +``` + +### [.isInside](index.js#L867) + +Returns true if `node` is either a child or grand-child of the given `type`, or `state.inside[type]` is a non-empty array. + +**Params** + +* `state` **{Object}**: Either the `compiler.state` object, if it exists, or a user-supplied state object. +* `node` **{Object}**: Instance of [snapdragon-node](https://github.com/jonschlinkert/snapdragon-node) +* `type` **{String}**: The `node.type` to check for. +* `returns` **{Boolean}** + +**Example** + +```js +var state = { inside: {}}; +var node = new Node({type: 'brace'}); +var open = new Node({type: 'brace.open'}); +console.log(utils.isInside(state, open, 'brace')); //=> false +utils.pushNode(node, open); +console.log(utils.isInside(state, open, 'brace')); //=> true +``` + +### [.last](index.js#L915) + +Get the last `n` element from the given `array`. Used for getting +a node from `node.nodes.` + +**Params** + +* `array` **{Array}** +* `n` **{Number}** +* `returns` **{undefined}** + +### [.arrayify](index.js#L935) + +Cast the given `val` to an array. + +**Params** + +* `val` **{any}** +* `returns` **{Array}** + +**Example** + +```js +console.log(utils.arraify('')); +//=> [] +console.log(utils.arraify('foo')); +//=> ['foo'] +console.log(utils.arraify(['foo'])); +//=> ['foo'] +``` + +### [.stringify](index.js#L948) + +Convert the given `val` to a string by joining with `,`. Useful +for creating a cheerio/CSS/DOM-style selector from a list of strings. + +**Params** + +* `val` **{any}** +* `returns` **{Array}** + +### [.trim](index.js#L961) + +Ensure that the given value is a string and call `.trim()` on it, +or return an empty string. + +**Params** + +* `str` **{String}** +* `returns` **{String}** + +## Release history + +Changelog entries are classified using the following labels from [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog): + +* `added`: for new features +* `changed`: for changes in existing functionality +* `deprecated`: for once-stable features removed in upcoming releases +* `removed`: for deprecated features removed in this release +* `fixed`: for any bug fixes + +Custom labels used in this changelog: + +* `dependencies`: bumps dependencies +* `housekeeping`: code re-organization, minor edits, or other changes that don't fit in one of the other categories. + +### [3.0.0] - 2017-05-01 + +**Changed** + +* `.emit` was renamed to [.append](#append) +* `.addNode` was renamed to [.pushNode](#pushNode) +* `.getNode` was renamed to [.findNode](#findNode) +* `.isEmptyNodes` was renamed to [.isEmpty](#isEmpty): also now works with `node.nodes` and/or `node.val` + +**Added** + +* [.identity](#identity) +* [.removeNode](#removeNode) +* [.shiftNode](#shiftNode) +* [.popNode](#popNode) + +### [0.1.0] + +First release. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 01, 2017._ \ No newline at end of file diff --git a/node_modules/snapdragon-util/index.js b/node_modules/snapdragon-util/index.js new file mode 100644 index 0000000..68a030e --- /dev/null +++ b/node_modules/snapdragon-util/index.js @@ -0,0 +1,1019 @@ +'use strict'; + +var typeOf = require('kind-of'); +var utils = module.exports; + +/** + * Returns true if the given value is a node. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isNode(node)); //=> true + * console.log(utils.isNode({})); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Boolean} + * @api public + */ + +utils.isNode = function(node) { + return typeOf(node) === 'object' && node.isNode === true; +}; + +/** + * Emit an empty string for the given `node`. + * + * ```js + * // do nothing for beginning-of-string + * snapdragon.compiler.set('bos', utils.noop); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.noop = function(node) { + append(this, '', node); +}; + +/** + * Appdend `node.val` to `compiler.output`, exactly as it was created + * by the parser. + * + * ```js + * snapdragon.compiler.set('text', utils.identity); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {undefined} + * @api public + */ + +utils.identity = function(node) { + append(this, node.val, node); +}; + +/** + * Previously named `.emit`, this method appends the given `val` + * to `compiler.output` for the given node. Useful when you know + * what value should be appended advance, regardless of the actual + * value of `node.val`. + * + * ```js + * snapdragon.compiler + * .set('i', function(node) { + * this.mapVisit(node); + * }) + * .set('i.open', utils.append('')) + * .set('i.close', utils.append('')) + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @returns {Function} Returns a compiler middleware function. + * @api public + */ + +utils.append = function(val) { + return function(node) { + append(this, val, node); + }; +}; + +/** + * Used in compiler middleware, this onverts an AST node into + * an empty `text` node and deletes `node.nodes` if it exists. + * The advantage of this method is that, as opposed to completely + * removing the node, indices will not need to be re-calculated + * in sibling nodes, and nothing is appended to the output. + * + * ```js + * utils.toNoop(node); + * // convert `node.nodes` to the given value instead of deleting it + * utils.toNoop(node, []); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Array} `nodes` Optionally pass a new `nodes` value, to replace the existing `node.nodes` array. + * @api public + */ + +utils.toNoop = function(node, nodes) { + if (nodes) { + node.nodes = nodes; + } else { + delete node.nodes; + node.type = 'text'; + node.val = ''; + } +}; + +/** + * Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon + * automatically calls registered compilers, this allows you to pass a visitor + * function. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.visit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Object} returns the node after recursively visiting all child nodes. + * @api public + */ + +utils.visit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(fn), 'expected a visitor function'); + fn(node); + return node.nodes ? utils.mapVisit(node, fn) : node; +}; + +/** + * Map [visit](#visit) the given `fn` over `node.nodes`. This is called by + * [visit](#visit), use this method if you do not want `fn` to be called on + * the first node. + * + * ```js + * snapdragon.compiler.set('i', function(node) { + * utils.mapVisit(node, function(childNode) { + * // do stuff with "childNode" + * return childNode; + * }); + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Object} `options` + * @param {Function} `fn` + * @return {Object} returns the node + * @api public + */ + +utils.mapVisit = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isArray(node.nodes), 'expected node.nodes to be an array'); + assert(isFunction(fn), 'expected a visitor function'); + + for (var i = 0; i < node.nodes.length; i++) { + utils.visit(node.nodes[i], fn); + } + return node; +}; + +/** + * Unshift an `*.open` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^{/); + * if (match) { + * var parent = new Node({type: 'brace'}); + * utils.addOpen(parent, Node); + * console.log(parent.nodes[0]): + * // { type: 'brace.open', val: '' }; + * + * // push the parent "brace" node onto the stack + * this.push(parent); + * + * // return the parent node, so it's also added to the AST + * return brace; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created opening node. + * @api public + */ + +utils.addOpen = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var open = new Node({ type: node.type + '.open', val: val}); + var unshift = node.unshift || node.unshiftNode; + if (typeof unshift === 'function') { + unshift.call(node, open); + } else { + utils.unshiftNode(node, open); + } + return open; +}; + +/** + * Push a `*.close` node onto `node.nodes`. + * + * ```js + * var Node = require('snapdragon-node'); + * snapdragon.parser.set('brace', function(node) { + * var match = this.match(/^}/); + * if (match) { + * var parent = this.parent(); + * if (parent.type !== 'brace') { + * throw new Error('missing opening: ' + '}'); + * } + * + * utils.addClose(parent, Node); + * console.log(parent.nodes[parent.nodes.length - 1]): + * // { type: 'brace.close', val: '' }; + * + * // no need to return a node, since the parent + * // was already added to the AST + * return; + * } + * }); + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the created closing node. + * @api public + */ + +utils.addClose = function(node, Node, val, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + if (typeof val === 'function') { + filter = val; + val = ''; + } + + if (typeof filter === 'function' && !filter(node)) return; + var close = new Node({ type: node.type + '.close', val: val}); + var push = node.push || node.pushNode; + if (typeof push === 'function') { + push.call(node, close); + } else { + utils.pushNode(node, close); + } + return close; +}; + +/** + * Wraps the given `node` with `*.open` and `*.close` nodes. + * + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][]. + * @param {Function} `filter` Optionaly specify a filter function to exclude the node. + * @return {Object} Returns the node + * @api public + */ + +utils.wrapNodes = function(node, Node, filter) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isFunction(Node), 'expected Node to be a constructor function'); + + utils.addOpen(node, Node, filter); + utils.addClose(node, Node, filter); + return node; +}; + +/** + * Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.pushNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object} Returns the child node + * @api public + */ + +utils.pushNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.push(node); + return node; +}; + +/** + * Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. + * + * ```js + * var parent = new Node({type: 'foo'}); + * var node = new Node({type: 'bar'}); + * utils.unshiftNode(parent, node); + * console.log(parent.nodes[0].type) // 'bar' + * console.log(node.parent.type) // 'foo' + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {undefined} + * @api public + */ + +utils.unshiftNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + node.define('parent', parent); + parent.nodes = parent.nodes || []; + parent.nodes.unshift(node); +}; + +/** + * Pop the last `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.popNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.popNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.pop === 'function') { + return node.pop(); + } + return node.nodes && node.nodes.pop(); +}; + +/** + * Shift the first `node` off of `parent.nodes`. The advantage of + * using this method is that it checks for `node.nodes` and works + * with any version of `snapdragon-node`. + * + * ```js + * var parent = new Node({type: 'foo'}); + * utils.pushNode(parent, new Node({type: 'foo'})); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.shiftNode(parent); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Number|Undefined} Returns the length of `node.nodes` or undefined. + * @api public + */ + +utils.shiftNode = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (typeof node.shift === 'function') { + return node.shift(); + } + return node.nodes && node.nodes.shift(); +}; + +/** + * Remove the specified `node` from `parent.nodes`. + * + * ```js + * var parent = new Node({type: 'abc'}); + * var foo = new Node({type: 'foo'}); + * utils.pushNode(parent, foo); + * utils.pushNode(parent, new Node({type: 'bar'})); + * utils.pushNode(parent, new Node({type: 'baz'})); + * console.log(parent.nodes.length); //=> 3 + * utils.removeNode(parent, foo); + * console.log(parent.nodes.length); //=> 2 + * ``` + * @param {Object} `parent` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Object|undefined} Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`. + * @api public + */ + +utils.removeNode = function(parent, node) { + assert(utils.isNode(parent), 'expected parent.node to be an instance of Node'); + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!parent.nodes) { + return null; + } + + if (typeof parent.remove === 'function') { + return parent.remove(node); + } + + var idx = parent.nodes.indexOf(node); + if (idx !== -1) { + return parent.nodes.splice(idx, 1); + } +}; + +/** + * Returns true if `node.type` matches the given `type`. Throws a + * `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({type: 'foo'}); + * console.log(utils.isType(node, 'foo')); // false + * console.log(utils.isType(node, 'bar')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + switch (typeOf(type)) { + case 'array': + var types = type.slice(); + for (var i = 0; i < types.length; i++) { + if (utils.isType(node, types[i])) { + return true; + } + } + return false; + case 'string': + return node.type === type; + case 'regexp': + return type.test(node.type); + default: { + throw new TypeError('expected "type" to be an array, string or regexp'); + } + } +}; + +/** + * Returns true if the given `node` has the given `type` in `node.nodes`. + * Throws a `TypeError` if `node` is not an instance of `Node`. + * + * ```js + * var Node = require('snapdragon-node'); + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'bar'}), + * new Node({type: 'baz'}) + * ] + * }); + * console.log(utils.hasType(node, 'xyz')); // false + * console.log(utils.hasType(node, 'baz')); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.hasType = function(node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + if (!Array.isArray(node.nodes)) return false; + for (var i = 0; i < node.nodes.length; i++) { + if (utils.isType(node.nodes[i], type)) { + return true; + } + } + return false; +}; + +/** + * Returns the first node from `node.nodes` of the given `type` + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var textNode = utils.firstOfType(node.nodes, 'text'); + * console.log(textNode.val); + * //=> 'abc' + * ``` + * @param {Array} `nodes` + * @param {String} `type` + * @return {Object|undefined} Returns the first matching node or undefined. + * @api public + */ + +utils.firstOfType = function(nodes, type) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + if (utils.isType(node, type)) { + return node; + } + } +}; + +/** + * Returns the node at the specified index, or the first node of the + * given `type` from `node.nodes`. + * + * ```js + * var node = new Node({ + * type: 'foo', + * nodes: [ + * new Node({type: 'text', val: 'abc'}), + * new Node({type: 'text', val: 'xyz'}) + * ] + * }); + * + * var nodeOne = utils.findNode(node.nodes, 'text'); + * console.log(nodeOne.val); + * //=> 'abc' + * + * var nodeTwo = utils.findNode(node.nodes, 1); + * console.log(nodeTwo.val); + * //=> 'xyz' + * ``` + * + * @param {Array} `nodes` + * @param {String|Number} `type` Node type or index. + * @return {Object} Returns a node or undefined. + * @api public + */ + +utils.findNode = function(nodes, type) { + if (!Array.isArray(nodes)) { + return null; + } + if (typeof type === 'number') { + return nodes[type]; + } + return utils.firstOfType(nodes, type); +}; + +/** + * Returns true if the given node is an "*.open" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isOpen(brace)); // false + * console.log(utils.isOpen(open)); // true + * console.log(utils.isOpen(close)); // false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-5) === '.open'; +}; + +/** + * Returns true if the given node is a "*.close" node. + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * + * console.log(utils.isClose(brace)); // false + * console.log(utils.isClose(open)); // false + * console.log(utils.isClose(close)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.isClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + return node.type.slice(-6) === '.close'; +}; + +/** + * Returns true if `node.nodes` **has** an `.open` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * console.log(utils.hasOpen(brace)); // false + * + * brace.pushNode(open); + * console.log(utils.hasOpen(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpen = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var first = node.first || node.nodes ? node.nodes[0] : null; + if (utils.isNode(first)) { + return first.type === node.type + '.open'; + } + return false; +}; + +/** + * Returns true if `node.nodes` **has** a `.close` node + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(close); + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasClose = function(node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + var last = node.last || node.nodes ? node.nodes[node.nodes.length - 1] : null; + if (utils.isNode(last)) { + return last.type === node.type + '.close'; + } + return false; +}; + +/** + * Returns true if `node.nodes` has both `.open` and `.close` nodes + * + * ```js + * var Node = require('snapdragon-node'); + * var brace = new Node({ + * type: 'brace', + * nodes: [] + * }); + * + * var open = new Node({type: 'brace.open'}); + * var close = new Node({type: 'brace.close'}); + * console.log(utils.hasOpen(brace)); // false + * console.log(utils.hasClose(brace)); // false + * + * brace.pushNode(open); + * brace.pushNode(close); + * console.log(utils.hasOpen(brace)); // true + * console.log(utils.hasClose(brace)); // true + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Boolean} + * @api public + */ + +utils.hasOpenAndClose = function(node) { + return utils.hasOpen(node) && utils.hasClose(node); +}; + +/** + * Push the given `node` onto the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.addType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.open$/, ''); + + if (!state.hasOwnProperty('inside')) { + state.inside = {}; + } + if (!state.inside.hasOwnProperty(type)) { + state.inside[type] = []; + } + + var arr = state.inside[type]; + arr.push(node); + return arr; +}; + +/** + * Remove the given `node` from the `state.inside` array for the + * given type. This array is used as a specialized "stack" for + * only the given `node.type`. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * utils.addType(state, node); + * console.log(state.inside); + * //=> { brace: [{type: 'brace'}] } + * utils.removeType(state, node); + * //=> { brace: [] } + * ``` + * @param {Object} `state` The `compiler.state` object or custom state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @return {Array} Returns the `state.inside` stack for the given type. + * @api public + */ + +utils.removeType = function(state, node) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + var type = node.parent + ? node.parent.type + : node.type.replace(/\.close$/, ''); + + if (state.inside.hasOwnProperty(type)) { + return state.inside[type].pop(); + } +}; + +/** + * Returns true if `node.val` is an empty string, or `node.nodes` does + * not contain any non-empty text nodes. + * + * ```js + * var node = new Node({type: 'text'}); + * utils.isEmpty(node); //=> true + * node.val = 'foo'; + * utils.isEmpty(node); //=> false + * ``` + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {Function} `fn` + * @return {Boolean} + * @api public + */ + +utils.isEmpty = function(node, fn) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + + if (!Array.isArray(node.nodes)) { + if (node.type !== 'text') { + return true; + } + if (typeof fn === 'function') { + return fn(node, node.parent); + } + return !utils.trim(node.val); + } + + for (var i = 0; i < node.nodes.length; i++) { + var child = node.nodes[i]; + if (utils.isOpen(child) || utils.isClose(child)) { + continue; + } + if (!utils.isEmpty(child, fn)) { + return false; + } + } + + return true; +}; + +/** + * Returns true if the `state.inside` stack for the given type exists + * and has one or more nodes on it. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * utils.addType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> true + * utils.removeType(state, node); + * console.log(utils.isInsideType(state, 'brace')); //=> false + * ``` + * @param {Object} `state` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + +utils.isInsideType = function(state, type) { + assert(isObject(state), 'expected state to be an object'); + assert(isString(type), 'expected type to be a string'); + + if (!state.hasOwnProperty('inside')) { + return false; + } + + if (!state.inside.hasOwnProperty(type)) { + return false; + } + + return state.inside[type].length > 0; +}; + +/** + * Returns true if `node` is either a child or grand-child of the given `type`, + * or `state.inside[type]` is a non-empty array. + * + * ```js + * var state = { inside: {}}; + * var node = new Node({type: 'brace'}); + * var open = new Node({type: 'brace.open'}); + * console.log(utils.isInside(state, open, 'brace')); //=> false + * utils.pushNode(node, open); + * console.log(utils.isInside(state, open, 'brace')); //=> true + * ``` + * @param {Object} `state` Either the `compiler.state` object, if it exists, or a user-supplied state object. + * @param {Object} `node` Instance of [snapdragon-node][] + * @param {String} `type` The `node.type` to check for. + * @return {Boolean} + * @api public + */ + +utils.isInside = function(state, node, type) { + assert(utils.isNode(node), 'expected node to be an instance of Node'); + assert(isObject(state), 'expected state to be an object'); + + if (Array.isArray(type)) { + for (var i = 0; i < type.length; i++) { + if (utils.isInside(state, node, type[i])) { + return true; + } + } + return false; + } + + var parent = node.parent; + if (typeof type === 'string') { + return (parent && parent.type === type) || utils.isInsideType(state, type); + } + + if (typeOf(type) === 'regexp') { + if (parent && parent.type && type.test(parent.type)) { + return true; + } + + var keys = Object.keys(state.inside); + var len = keys.length; + var idx = -1; + while (++idx < len) { + var key = keys[idx]; + var val = state.inside[key]; + + if (Array.isArray(val) && val.length !== 0 && type.test(key)) { + return true; + } + } + } + return false; +}; + +/** + * Get the last `n` element from the given `array`. Used for getting + * a node from `node.nodes.` + * + * @param {Array} `array` + * @param {Number} `n` + * @return {undefined} + * @api public + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +/** + * Cast the given `val` to an array. + * + * ```js + * console.log(utils.arrayify('')); + * //=> [] + * console.log(utils.arrayify('foo')); + * //=> ['foo'] + * console.log(utils.arrayify(['foo'])); + * //=> ['foo'] + * ``` + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.arrayify = function(val) { + if (typeof val === 'string' && val !== '') { + return [val]; + } + if (!Array.isArray(val)) { + return []; + } + return val; +}; + +/** + * Convert the given `val` to a string by joining with `,`. Useful + * for creating a cheerio/CSS/DOM-style selector from a list of strings. + * + * @param {any} `val` + * @return {Array} + * @api public + */ + +utils.stringify = function(val) { + return utils.arrayify(val).join(','); +}; + +/** + * Ensure that the given value is a string and call `.trim()` on it, + * or return an empty string. + * + * @param {String} `str` + * @return {String} + * @api public + */ + +utils.trim = function(str) { + return typeof str === 'string' ? str.trim() : ''; +}; + +/** + * Return true if val is an object + */ + +function isObject(val) { + return typeOf(val) === 'object'; +} + +/** + * Return true if val is a string + */ + +function isString(val) { + return typeof val === 'string'; +} + +/** + * Return true if val is a function + */ + +function isFunction(val) { + return typeof val === 'function'; +} + +/** + * Return true if val is an array + */ + +function isArray(val) { + return Array.isArray(val); +} + +/** + * Shim to ensure the `.append` methods work with any version of snapdragon + */ + +function append(compiler, val, node) { + if (typeof compiler.append !== 'function') { + return compiler.emit(val, node); + } + return compiler.append(val, node); +} + +/** + * Simplified assertion. Throws an error is `val` is falsey. + */ + +function assert(val, message) { + if (!val) throw new Error(message); +} diff --git a/node_modules/snapdragon-util/package.json b/node_modules/snapdragon-util/package.json new file mode 100644 index 0000000..434c4f5 --- /dev/null +++ b/node_modules/snapdragon-util/package.json @@ -0,0 +1,65 @@ +{ + "name": "snapdragon-util", + "description": "Utilities for the snapdragon parser/compiler.", + "version": "3.0.1", + "homepage": "https://github.com/jonschlinkert/snapdragon-util", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/snapdragon-util", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon-util/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.2.0" + }, + "devDependencies": { + "define-property": "^1.0.0", + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.12", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.0", + "isobject": "^3.0.0", + "mocha": "^3.3.0", + "snapdragon": "^0.11.0", + "snapdragon-node": "^1.0.6" + }, + "keywords": [ + "capture", + "compile", + "compiler", + "convert", + "match", + "parse", + "parser", + "plugin", + "render", + "snapdragon", + "snapdragonplugin", + "transform", + "util" + ], + "verb": { + "toc": "collapsible", + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/snapdragon/LICENSE b/node_modules/snapdragon/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/snapdragon/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/snapdragon/README.md b/node_modules/snapdragon/README.md new file mode 100644 index 0000000..4006e10 --- /dev/null +++ b/node_modules/snapdragon/README.md @@ -0,0 +1,321 @@ +# snapdragon [![NPM version](https://img.shields.io/npm/v/snapdragon.svg?style=flat)](https://www.npmjs.com/package/snapdragon) [![NPM downloads](https://img.shields.io/npm/dm/snapdragon.svg?style=flat)](https://npmjs.org/package/snapdragon) [![Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon.svg?style=flat)](https://travis-ci.org/jonschlinkert/snapdragon) + +> Fast, pluggable and easy-to-use parser-renderer factory. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save snapdragon +``` + +Created by [jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb). + +**Features** + +* Bootstrap your own parser, get sourcemap support for free +* All parsing and compiling is handled by simple, reusable middleware functions +* Inspired by the parsers in [pug](http://jade-lang.com) and [css](https://github.com/reworkcss/css). + +## History + +### v0.5.0 + +**Breaking changes** + +Substantial breaking changes were made in v0.5.0! Most of these changes are part of a larger refactor that will be finished in 0.6.0, including the introduction of a `Lexer` class. + +* Renderer was renamed to `Compiler` +* the `.render` method was renamed to `.compile` +* Many other smaller changes. A more detailed overview will be provided in 0.6.0. If you don't have to time review code, I recommend you wait for the 0.6.0 release. + +## Usage examples + +```js +var Snapdragon = require('snapdragon'); +var snapdragon = new Snapdragon(); +``` + +**Parse** + +```js +var ast = snapdragon.parser('some string', options) + // parser middleware that can be called by other middleware + .set('foo', function () {}) + // parser middleware, runs immediately in the order defined + .use(bar()) + .use(baz()) +``` + +**Render** + +```js +// pass the `ast` from the parse method +var res = snapdragon.compiler(ast) + // compiler middleware, called when the name of the middleware + // matches the `node.type` (defined in a parser middleware) + .set('bar', function () {}) + .set('baz', function () {}) + .compile() +``` + +See the [examples](./examples/). + +## Getting started + +**Parsers** + +Parsers are middleware functions used for parsing a string into an ast node. + +```js +var ast = snapdragon.parser(str, options) + .use(function() { + var pos = this.position(); + var m = this.match(/^\./); + if (!m) return; + return pos({ + // `type` specifies the compiler to use + type: 'dot', + val: m[0] + }); + }) +``` + +**AST node** + +When the parser finds a match, `pos()` is called, pushing a token for that node onto the ast that looks something like: + +```js +{ type: 'dot', + val: '.', + position: + { start: { lineno: 1, column: 1 }, + end: { lineno: 1, column: 2 } }} +``` + +**Renderers** + +Renderers are _named_ middleware functions that visit over an array of ast nodes to compile a string. + +```js +var res = snapdragon.compiler(ast) + .set('dot', function (node) { + console.log(node.val) + //=> '.' + return this.emit(node.val); + }) +``` + +**Source maps** + +If you want source map support, make sure to emit the position as well. + +```js +var res = snapdragon.compiler(ast) + .set('dot', function (node) { + return this.emit(node.val, node.position); + }) +``` + +## Docs + +### Parser middleware + +A parser middleware is a function that returns an abject called a `token`. This token is pushed onto the AST as a node. + +**Example token** + +```js +{ type: 'dot', + val: '.', + position: + { start: { lineno: 1, column: 1 }, + end: { lineno: 1, column: 2 } }} +``` + +**Example parser middleware** + +Match a single `.` in a string: + +1. Get the starting position by calling `this.position()` +2. pass a regex for matching a single dot to the `.match` method +3. if **no match** is found, return `undefined` +4. if a **match** is found, `pos()` is called, which returns a token with: + - `type`: the name of the [compiler] to use + - `val`: The actual value captured by the regex. In this case, a `.`. Note that you can capture and return whatever will be needed by the corresponding [compiler]. + - The ending position: automatically calculated by adding the length of the first capture group to the starting position. + +## Renderer middleware + +Renderers are run when the name of the compiler middleware matches the `type` defined on an ast `node` (which is defined in a parser). + +**Example** + +Exercise: Parse a dot, then compile it as an escaped dot. + +```js +var ast = snapdragon.parser('.') + .use(function () { + var pos = this.position(); + var m = this.match(/^\./); + if (!m) return; + return pos({ + // define the `type` of compiler to use + type: 'dot', + val: m[0] + }) + }) + +var result = snapdragon.compiler(ast) + .set('dot', function (node) { + return this.emit('\\' + node.val); + }) + .compile() + +console.log(result.output); +//=> '\.' +``` + +## API + +### [Parser](lib/parser.js#L19) + +Create a new `Parser` with the given `input` and `options`. + +**Params** + +* `input` **{String}** +* `options` **{Object}** + +### [.define](lib/parser.js#L103) + +Define a non-enumberable property on the `Parser` instance. + +**Example** + +```js +parser.define('foo', 'bar'); +``` + +**Params** + +* `key` **{String}**: propery name +* `val` **{any}**: property value +* `returns` **{Object}**: Returns the Parser instance for chaining. + +Set parser `name` with the given `fn` + +**Params** + +* `name` **{String}** +* `fn` **{Function}** + +Get parser `name` + +**Params** + +* `name` **{String}** + +Push a `token` onto the `type` stack. + +**Params** + +* `type` **{String}** +* `returns` **{Object}** `token` + +Pop a token off of the `type` stack + +**Params** + +* `type` **{String}** +* `returns` **{Object}**: Returns a token + +Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`. + +**Params** + +* `type` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +parser.isType(node, 'brace'); +``` + +**Params** + +* `node` **{Object}** +* `type` **{String}** +* `returns` **{Boolean}** + +### [.define](lib/compiler.js#L71) + +Define a non-enumberable property on the `Compiler` instance. + +**Example** + +```js +compiler.define('foo', 'bar'); +``` + +**Params** + +* `key` **{String}**: propery name +* `val` **{any}**: property value +* `returns` **{Object}**: Returns the Compiler instance for chaining. + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 106 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [doowb](https://github.com/doowb) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/snapdragon/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 10, 2016._ \ No newline at end of file diff --git a/node_modules/snapdragon/index.js b/node_modules/snapdragon/index.js new file mode 100644 index 0000000..235b464 --- /dev/null +++ b/node_modules/snapdragon/index.js @@ -0,0 +1,174 @@ +'use strict'; + +var Base = require('base'); +var define = require('define-property'); +var Compiler = require('./lib/compiler'); +var Parser = require('./lib/parser'); +var utils = require('./lib/utils'); +var regexCache = {}; +var cache = {}; + +/** + * Create a new instance of `Snapdragon` with the given `options`. + * + * ```js + * var snapdragon = new Snapdragon(); + * ``` + * + * @param {Object} `options` + * @api public + */ + +function Snapdragon(options) { + Base.call(this, null, options); + this.options = utils.extend({source: 'string'}, this.options); + this.compiler = new Compiler(this.options); + this.parser = new Parser(this.options); + + Object.defineProperty(this, 'compilers', { + get: function() { + return this.compiler.compilers; + } + }); + + Object.defineProperty(this, 'parsers', { + get: function() { + return this.parser.parsers; + } + }); + + Object.defineProperty(this, 'regex', { + get: function() { + return this.parser.regex; + } + }); +} + +/** + * Inherit Base + */ + +Base.extend(Snapdragon); + +/** + * Add a parser to `snapdragon.parsers` for capturing the given `type` using + * the specified regex or parser function. A function is useful if you need + * to customize how the token is created and/or have access to the parser + * instance to check options, etc. + * + * ```js + * snapdragon + * .capture('slash', /^\//) + * .capture('dot', function() { + * var pos = this.position(); + * var m = this.match(/^\./); + * if (!m) return; + * return pos({ + * type: 'dot', + * val: m[0] + * }); + * }); + * ``` + * @param {String} `type` + * @param {RegExp|Function} `regex` + * @return {Object} Returns the parser instance for chaining + * @api public + */ + +Snapdragon.prototype.capture = function() { + return this.parser.capture.apply(this.parser, arguments); +}; + +/** + * Register a plugin `fn`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * snapdragon.use(function() { + * console.log(this); //<= snapdragon instance + * console.log(this.parser); //<= parser instance + * console.log(this.compiler); //<= compiler instance + * }); + * ``` + * @param {Object} `fn` + * @api public + */ + +Snapdragon.prototype.use = function(fn) { + fn.call(this, this); + return this; +}; + +/** + * Parse the given `str`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register parsers + * snapdragon.parser.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * console.log(ast); + * ``` + * @param {String} `str` + * @param {Object} `options` Set `options.sourcemap` to true to enable source maps. + * @return {Object} Returns an AST. + * @api public + */ + +Snapdragon.prototype.parse = function(str, options) { + this.options = utils.extend({}, this.options, options); + var parsed = this.parser.parse(str, this.options); + + // add non-enumerable parser reference + define(parsed, 'parser', this.parser); + return parsed; +}; + +/** + * Compile the given `AST`. + * + * ```js + * var snapdragon = new Snapdgragon([options]); + * // register plugins + * snapdragon.use(function() {}); + * // register parser plugins + * snapdragon.parser.use(function() {}); + * // register compiler plugins + * snapdragon.compiler.use(function() {}); + * + * // parse + * var ast = snapdragon.parse('foo/bar'); + * + * // compile + * var res = snapdragon.compile(ast); + * console.log(res.output); + * ``` + * @param {Object} `ast` + * @param {Object} `options` + * @return {Object} Returns an object with an `output` property with the rendered string. + * @api public + */ + +Snapdragon.prototype.compile = function(ast, options) { + this.options = utils.extend({}, this.options, options); + var compiled = this.compiler.compile(ast, this.options); + + // add non-enumerable compiler reference + define(compiled, 'compiler', this.compiler); + return compiled; +}; + +/** + * Expose `Snapdragon` + */ + +module.exports = Snapdragon; + +/** + * Expose `Parser` and `Compiler` + */ + +module.exports.Compiler = Compiler; +module.exports.Parser = Parser; diff --git a/node_modules/snapdragon/lib/compiler.js b/node_modules/snapdragon/lib/compiler.js new file mode 100644 index 0000000..0ce9d21 --- /dev/null +++ b/node_modules/snapdragon/lib/compiler.js @@ -0,0 +1,177 @@ +'use strict'; + +var use = require('use'); +var define = require('define-property'); +var debug = require('debug')('snapdragon:compiler'); +var utils = require('./utils'); + +/** + * Create a new `Compiler` with the given `options`. + * @param {Object} `options` + */ + +function Compiler(options, state) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.state = state || {}; + this.compilers = {}; + this.output = ''; + this.set('eos', function(node) { + return this.emit(node.val, node); + }); + this.set('noop', function(node) { + return this.emit(node.val, node); + }); + this.set('bos', function(node) { + return this.emit(node.val, node); + }); + use(this); +} + +/** + * Prototype methods + */ + +Compiler.prototype = { + + /** + * Throw an error message with details including the cursor position. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0}}; + var message = this.options.source + ' column:' + pos.start.column + ': ' + msg; + + var err = new Error(message); + err.reason = msg; + err.column = pos.start.column; + err.source = this.pattern; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Compiler` instance. + * + * ```js + * compiler.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Compiler instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Emit `node.val` + */ + + emit: function(str, node) { + this.output += str; + return str; + }, + + /** + * Add a compiler `fn` with the given `name` + */ + + set: function(name, fn) { + this.compilers[name] = fn; + return this; + }, + + /** + * Get compiler `name`. + */ + + get: function(name) { + return this.compilers[name]; + }, + + /** + * Get the previous AST node. + */ + + prev: function(n) { + return this.ast.nodes[this.idx - (n || 1)] || { type: 'bos', val: '' }; + }, + + /** + * Get the next AST node. + */ + + next: function(n) { + return this.ast.nodes[this.idx + (n || 1)] || { type: 'eos', val: '' }; + }, + + /** + * Visit `node`. + */ + + visit: function(node, nodes, i) { + var fn = this.compilers[node.type]; + this.idx = i; + + if (typeof fn !== 'function') { + throw this.error('compiler "' + node.type + '" is not registered', node); + } + return fn.call(this, node, nodes, i); + }, + + /** + * Map visit over array of `nodes`. + */ + + mapVisit: function(nodes) { + if (!Array.isArray(nodes)) { + throw new TypeError('expected an array'); + } + var len = nodes.length; + var idx = -1; + while (++idx < len) { + this.visit(nodes[idx], nodes, idx); + } + return this; + }, + + /** + * Compile `ast`. + */ + + compile: function(ast, options) { + var opts = utils.extend({}, this.options, options); + this.ast = ast; + this.parsingErrors = this.ast.errors; + this.output = ''; + + // source map support + if (opts.sourcemap) { + var sourcemaps = require('./source-maps'); + sourcemaps(this); + this.mapVisit(this.ast.nodes); + this.applySourceMaps(); + this.map = opts.sourcemap === 'generator' ? this.map : this.map.toJSON(); + return this; + } + + this.mapVisit(this.ast.nodes); + return this; + } +}; + +/** + * Expose `Compiler` + */ + +module.exports = Compiler; diff --git a/node_modules/snapdragon/lib/parser.js b/node_modules/snapdragon/lib/parser.js new file mode 100644 index 0000000..a5a9b31 --- /dev/null +++ b/node_modules/snapdragon/lib/parser.js @@ -0,0 +1,533 @@ +'use strict'; + +var use = require('use'); +var util = require('util'); +var Cache = require('map-cache'); +var define = require('define-property'); +var debug = require('debug')('snapdragon:parser'); +var Position = require('./position'); +var utils = require('./utils'); + +/** + * Create a new `Parser` with the given `input` and `options`. + * @param {String} `input` + * @param {Object} `options` + * @api public + */ + +function Parser(options) { + debug('initializing', __filename); + this.options = utils.extend({source: 'string'}, options); + this.init(this.options); + use(this); +} + +/** + * Prototype methods + */ + +Parser.prototype = { + constructor: Parser, + + init: function(options) { + this.orig = ''; + this.input = ''; + this.parsed = ''; + + this.column = 1; + this.line = 1; + + this.regex = new Cache(); + this.errors = this.errors || []; + this.parsers = this.parsers || {}; + this.types = this.types || []; + this.sets = this.sets || {}; + this.fns = this.fns || []; + this.currentType = 'root'; + + var pos = this.position(); + this.bos = pos({type: 'bos', val: ''}); + + this.ast = { + type: 'root', + errors: this.errors, + nodes: [this.bos] + }; + + define(this.bos, 'parent', this.ast); + this.nodes = [this.ast]; + + this.count = 0; + this.setCount = 0; + this.stack = []; + }, + + /** + * Throw a formatted error with the cursor column and `msg`. + * @param {String} `msg` Message to use in the Error. + */ + + error: function(msg, node) { + var pos = node.position || {start: {column: 0, line: 0}}; + var line = pos.start.line; + var column = pos.start.column; + var source = this.options.source; + + var message = source + ' : ' + msg; + var err = new Error(message); + err.source = source; + err.reason = msg; + err.pos = pos; + + if (this.options.silent) { + this.errors.push(err); + } else { + throw err; + } + }, + + /** + * Define a non-enumberable property on the `Parser` instance. + * + * ```js + * parser.define('foo', 'bar'); + * ``` + * @name .define + * @param {String} `key` propery name + * @param {any} `val` property value + * @return {Object} Returns the Parser instance for chaining. + * @api public + */ + + define: function(key, val) { + define(this, key, val); + return this; + }, + + /** + * Mark position and patch `node.position`. + */ + + position: function() { + var start = { line: this.line, column: this.column }; + var self = this; + + return function(node) { + define(node, 'position', new Position(start, self)); + return node; + }; + }, + + /** + * Set parser `name` with the given `fn` + * @param {String} `name` + * @param {Function} `fn` + * @api public + */ + + set: function(type, fn) { + if (this.types.indexOf(type) === -1) { + this.types.push(type); + } + this.parsers[type] = fn.bind(this); + return this; + }, + + /** + * Get parser `name` + * @param {String} `name` + * @api public + */ + + get: function(name) { + return this.parsers[name]; + }, + + /** + * Push a `token` onto the `type` stack. + * + * @param {String} `type` + * @return {Object} `token` + * @api public + */ + + push: function(type, token) { + this.sets[type] = this.sets[type] || []; + this.count++; + this.stack.push(token); + return this.sets[type].push(token); + }, + + /** + * Pop a token off of the `type` stack + * @param {String} `type` + * @returns {Object} Returns a token + * @api public + */ + + pop: function(type) { + this.sets[type] = this.sets[type] || []; + this.count--; + this.stack.pop(); + return this.sets[type].pop(); + }, + + /** + * Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`. + * + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isInside: function(type) { + this.sets[type] = this.sets[type] || []; + return this.sets[type].length > 0; + }, + + /** + * Return true if `node` is the given `type`. + * + * ```js + * parser.isType(node, 'brace'); + * ``` + * @param {Object} `node` + * @param {String} `type` + * @return {Boolean} + * @api public + */ + + isType: function(node, type) { + return node && node.type === type; + }, + + /** + * Get the previous AST node + * @return {Object} + */ + + prev: function(n) { + return this.stack.length > 0 + ? utils.last(this.stack, n) + : utils.last(this.nodes, n); + }, + + /** + * Update line and column based on `str`. + */ + + consume: function(len) { + this.input = this.input.substr(len); + }, + + /** + * Update column based on `str`. + */ + + updatePosition: function(str, len) { + var lines = str.match(/\n/g); + if (lines) this.line += lines.length; + var i = str.lastIndexOf('\n'); + this.column = ~i ? len - i : this.column + len; + this.parsed += str; + this.consume(len); + }, + + /** + * Match `regex`, return captures, and update the cursor position by `match[0]` length. + * @param {RegExp} `regex` + * @return {Object} + */ + + match: function(regex) { + var m = regex.exec(this.input); + if (m) { + this.updatePosition(m[0], m[0].length); + return m; + } + }, + + /** + * Capture `type` with the given regex. + * @param {String} `type` + * @param {RegExp} `regex` + * @return {Function} + */ + + capture: function(type, regex) { + if (typeof regex === 'function') { + return this.set.apply(this, arguments); + } + + this.regex.set(type, regex); + this.set(type, function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(regex); + if (!m || !m[0]) return; + + var prev = this.prev(); + var node = pos({ + type: type, + val: m[0], + parsed: parsed, + rest: this.input + }); + + if (m[1]) { + node.inner = m[1]; + } + + define(node, 'inside', this.stack.length > 0); + define(node, 'parent', prev); + prev.nodes.push(node); + }.bind(this)); + return this; + }, + + /** + * Create a parser with open and close for parens, + * brackets or braces + */ + + capturePair: function(type, openRegex, closeRegex, fn) { + this.sets[type] = this.sets[type] || []; + + /** + * Open + */ + + this.set(type + '.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(openRegex); + if (!m || !m[0]) return; + + var val = m[0]; + this.setCount++; + this.specialChars = true; + var open = pos({ + type: type + '.open', + val: val, + rest: this.input + }); + + if (typeof m[1] !== 'undefined') { + open.inner = m[1]; + } + + var prev = this.prev(); + var node = pos({ + type: type, + nodes: [open] + }); + + define(node, 'rest', this.input); + define(node, 'parsed', parsed); + define(node, 'prefix', m[1]); + define(node, 'parent', prev); + define(open, 'parent', node); + + if (typeof fn === 'function') { + fn.call(this, open, node); + } + + this.push(type, node); + prev.nodes.push(node); + }); + + /** + * Close + */ + + this.set(type + '.close', function() { + var pos = this.position(); + var m = this.match(closeRegex); + if (!m || !m[0]) return; + + var parent = this.pop(type); + var node = pos({ + type: type + '.close', + rest: this.input, + suffix: m[1], + val: m[0] + }); + + if (!this.isType(parent, type)) { + if (this.options.strict) { + throw new Error('missing opening "' + type + '"'); + } + + this.setCount--; + node.escaped = true; + return node; + } + + if (node.suffix === '\\') { + parent.escaped = true; + node.escaped = true; + } + + parent.nodes.push(node); + define(node, 'parent', parent); + }); + + return this; + }, + + /** + * Capture end-of-string + */ + + eos: function() { + var pos = this.position(); + if (this.input) return; + var prev = this.prev(); + + while (prev.type !== 'root' && !prev.visited) { + if (this.options.strict === true) { + throw new SyntaxError('invalid syntax:' + util.inspect(prev, null, 2)); + } + + if (!hasDelims(prev)) { + prev.parent.escaped = true; + prev.escaped = true; + } + + visit(prev, function(node) { + if (!hasDelims(node.parent)) { + node.parent.escaped = true; + node.escaped = true; + } + }); + + prev = prev.parent; + } + + var tok = pos({ + type: 'eos', + val: this.append || '' + }); + + define(tok, 'parent', this.ast); + return tok; + }, + + /** + * Run parsers to advance the cursor position + */ + + next: function() { + var parsed = this.parsed; + var len = this.types.length; + var idx = -1; + var tok; + + while (++idx < len) { + if ((tok = this.parsers[this.types[idx]].call(this))) { + define(tok, 'rest', this.input); + define(tok, 'parsed', parsed); + this.last = tok; + return tok; + } + } + }, + + /** + * Parse the given string. + * @return {Array} + */ + + parse: function(input) { + if (typeof input !== 'string') { + throw new TypeError('expected a string'); + } + + this.init(this.options); + this.orig = input; + this.input = input; + var self = this; + + function parse() { + // check input before calling `.next()` + input = self.input; + + // get the next AST ndoe + var node = self.next(); + if (node) { + var prev = self.prev(); + if (prev) { + define(node, 'parent', prev); + if (prev.nodes) { + prev.nodes.push(node); + } + } + + if (self.sets.hasOwnProperty(prev.type)) { + self.currentType = prev.type; + } + } + + // if we got here but input is not changed, throw an error + if (self.input && input === self.input) { + throw new Error('no parsers registered for: "' + self.input.slice(0, 5) + '"'); + } + } + + while (this.input) parse(); + if (this.stack.length && this.options.strict) { + var node = this.stack.pop(); + throw this.error('missing opening ' + node.type + ': "' + this.orig + '"'); + } + + var eos = this.eos(); + var tok = this.prev(); + if (tok.type !== 'eos') { + this.ast.nodes.push(eos); + } + + return this.ast; + } +}; + +/** + * Visit `node` with the given `fn` + */ + +function visit(node, fn) { + if (!node.visited) { + define(node, 'visited', true); + return node.nodes ? mapVisit(node.nodes, fn) : fn(node); + } + return node; +} + +/** + * Map visit over array of `nodes`. + */ + +function mapVisit(nodes, fn) { + var len = nodes.length; + var idx = -1; + while (++idx < len) { + visit(nodes[idx], fn); + } +} + +function hasOpen(node) { + return node.nodes && node.nodes[0].type === (node.type + '.open'); +} + +function hasClose(node) { + return node.nodes && utils.last(node.nodes).type === (node.type + '.close'); +} + +function hasDelims(node) { + return hasOpen(node) && hasClose(node); +} + +/** + * Expose `Parser` + */ + +module.exports = Parser; diff --git a/node_modules/snapdragon/lib/position.js b/node_modules/snapdragon/lib/position.js new file mode 100644 index 0000000..c859696 --- /dev/null +++ b/node_modules/snapdragon/lib/position.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-property'); + +/** + * Store position for a node + */ + +module.exports = function Position(start, parser) { + this.start = start; + this.end = { line: parser.line, column: parser.column }; + define(this, 'content', parser.orig); + define(this, 'source', parser.options.source); +}; diff --git a/node_modules/snapdragon/lib/source-maps.js b/node_modules/snapdragon/lib/source-maps.js new file mode 100644 index 0000000..d8e638b --- /dev/null +++ b/node_modules/snapdragon/lib/source-maps.js @@ -0,0 +1,145 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var define = require('define-property'); +var utils = require('./utils'); + +/** + * Expose `mixin()`. + * This code is based on `source-maps-support.js` in reworkcss/css + * https://github.com/reworkcss/css/blob/master/lib/stringify/source-map-support.js + * Copyright (c) 2012 TJ Holowaychuk + */ + +module.exports = mixin; + +/** + * Mixin source map support into `compiler`. + * + * @param {Object} `compiler` + * @api public + */ + +function mixin(compiler) { + define(compiler, '_comment', compiler.comment); + compiler.map = new utils.SourceMap.SourceMapGenerator(); + compiler.position = { line: 1, column: 1 }; + compiler.content = {}; + compiler.files = {}; + + for (var key in exports) { + define(compiler, key, exports[key]); + } +} + +/** + * Update position. + * + * @param {String} str + */ + +exports.updatePosition = function(str) { + var lines = str.match(/\n/g); + if (lines) this.position.line += lines.length; + var i = str.lastIndexOf('\n'); + this.position.column = ~i ? str.length - i : this.position.column + str.length; +}; + +/** + * Emit `str` with `position`. + * + * @param {String} str + * @param {Object} [pos] + * @return {String} + */ + +exports.emit = function(str, node) { + var position = node.position || {}; + var source = position.source; + if (source) { + if (position.filepath) { + source = utils.unixify(position.filepath); + } + + this.map.addMapping({ + source: source, + generated: { + line: this.position.line, + column: Math.max(this.position.column - 1, 0) + }, + original: { + line: position.start.line, + column: position.start.column - 1 + } + }); + + if (position.content) { + this.addContent(source, position); + } + if (position.filepath) { + this.addFile(source, position); + } + + this.updatePosition(str); + this.output += str; + } + return str; +}; + +/** + * Adds a file to the source map output if it has not already been added + * @param {String} `file` + * @param {Object} `pos` + */ + +exports.addFile = function(file, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.files, file)) return; + this.files[file] = position.content; +}; + +/** + * Adds a content source to the source map output if it has not already been added + * @param {String} `source` + * @param {Object} `position` + */ + +exports.addContent = function(source, position) { + if (typeof position.content !== 'string') return; + if (Object.prototype.hasOwnProperty.call(this.content, source)) return; + this.map.setSourceContent(source, position.content); +}; + +/** + * Applies any original source maps to the output and embeds the source file + * contents in the source map. + */ + +exports.applySourceMaps = function() { + Object.keys(this.files).forEach(function(file) { + var content = this.files[file]; + this.map.setSourceContent(file, content); + + if (this.options.inputSourcemaps === true) { + var originalMap = utils.sourceMapResolve.resolveSync(content, file, fs.readFileSync); + if (originalMap) { + var map = new utils.SourceMap.SourceMapConsumer(originalMap.map); + var relativeTo = originalMap.sourcesRelativeTo; + this.map.applySourceMap(map, file, utils.unixify(path.dirname(relativeTo))); + } + } + }, this); +}; + +/** + * Process comments, drops sourceMap comments. + * @param {Object} node + */ + +exports.comment = function(node) { + if (/^# sourceMappingURL=/.test(node.comment)) { + return this.emit('', node.position); + } + return this._comment(node); +}; diff --git a/node_modules/snapdragon/lib/utils.js b/node_modules/snapdragon/lib/utils.js new file mode 100644 index 0000000..33f07e1 --- /dev/null +++ b/node_modules/snapdragon/lib/utils.js @@ -0,0 +1,48 @@ +'use strict'; + +/** + * Module dependencies + */ + +exports.extend = require('extend-shallow'); +exports.SourceMap = require('source-map'); +exports.sourceMapResolve = require('source-map-resolve'); + +/** + * Convert backslash in the given string to forward slashes + */ + +exports.unixify = function(fp) { + return fp.split(/\\+/).join('/'); +}; + +/** + * Return true if `val` is a non-empty string + * + * @param {String} `str` + * @return {Boolean} + */ + +exports.isString = function(str) { + return str && typeof str === 'string'; +}; + +/** + * Cast `val` to an array + * @return {Array} + */ + +exports.arrayify = function(val) { + if (typeof val === 'string') return [val]; + return val ? (Array.isArray(val) ? val : [val]) : []; +}; + +/** + * Get the last `n` element from the given `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; diff --git a/node_modules/snapdragon/node_modules/define-property/LICENSE b/node_modules/snapdragon/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/snapdragon/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/snapdragon/node_modules/define-property/README.md b/node_modules/snapdragon/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/node_modules/snapdragon/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/node_modules/snapdragon/node_modules/define-property/index.js b/node_modules/snapdragon/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/node_modules/snapdragon/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/snapdragon/node_modules/define-property/package.json b/node_modules/snapdragon/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/node_modules/snapdragon/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig b/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc b/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000..24e5090 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes b/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000..660957e --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..37535da --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/snapdragon/node_modules/is-descriptor/.nycrc b/node_modules/snapdragon/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md b/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000..4963353 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/snapdragon/node_modules/is-descriptor/LICENSE b/node_modules/snapdragon/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/snapdragon/node_modules/is-descriptor/README.md b/node_modules/snapdragon/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..fd9ddcf --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/snapdragon/node_modules/is-descriptor/index.js b/node_modules/snapdragon/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9dd24d --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/node_modules/snapdragon/node_modules/is-descriptor/package.json b/node_modules/snapdragon/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..6d6ca8b --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/snapdragon/node_modules/is-descriptor/test/index.js b/node_modules/snapdragon/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000..0b74a35 --- /dev/null +++ b/node_modules/snapdragon/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/snapdragon/package.json b/node_modules/snapdragon/package.json new file mode 100644 index 0000000..e4c4e73 --- /dev/null +++ b/node_modules/snapdragon/package.json @@ -0,0 +1,79 @@ +{ + "name": "snapdragon", + "description": "Fast, pluggable and easy-to-use parser-renderer factory.", + "version": "0.8.2", + "homepage": "https://github.com/jonschlinkert/snapdragon", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Edward Betts (http://edwardbetts.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/snapdragon", + "bugs": { + "url": "https://github.com/jonschlinkert/snapdragon/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.10", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.1", + "gulp-unused": "^0.2.0", + "mocha": "^3.0.2" + }, + "keywords": [ + "lexer", + "snapdragon" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "description": "These libraries use snapdragon:", + "list": [ + "braces", + "expand-brackets", + "extglob", + "micromatch" + ] + }, + "reflinks": [ + "css", + "pug", + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/source-map-js/LICENSE b/node_modules/source-map-js/LICENSE new file mode 100644 index 0000000..ed1b7cf --- /dev/null +++ b/node_modules/source-map-js/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/source-map-js/README.md b/node_modules/source-map-js/README.md new file mode 100644 index 0000000..614962d --- /dev/null +++ b/node_modules/source-map-js/README.md @@ -0,0 +1,765 @@ +# Source Map JS + +[![NPM](https://nodei.co/npm/source-map-js.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map-js) + +Difference between original [source-map](https://github.com/mozilla/source-map): + +> TL,DR: it's fork of original source-map@0.6, but with perfomance optimizations. + +This journey starts from [source-map@0.7.0](https://github.com/mozilla/source-map/blob/master/CHANGELOG.md#070). Some part of it was rewritten to Rust and WASM and API became async. + +It's still a major block for many libraries like PostCSS or Sass for example because they need to migrate the whole API to the async way. This is the reason why 0.6.1 has 2x more downloads than 0.7.3 while it's faster several times. + +![Downloads count](media/downloads.png) + +More important that WASM version has some optimizations in JS code too. This is why [community asked to create branch for 0.6 version](https://github.com/mozilla/source-map/issues/324) and port these optimizations but, sadly, the answer was «no». A bit later I discovered [the issue](https://github.com/mozilla/source-map/issues/370) created by [Ben Rothman (@benthemonkey)](https://github.com/benthemonkey) with no response at all. + +[Roman Dvornov (@lahmatiy)](https://github.com/lahmatiy) wrote a [serveral posts](https://t.me/gorshochekvarit/76) (russian, only, sorry) about source-map library in his own Telegram channel. He mentioned the article [«Maybe you don't need Rust and WASM to speed up your JS»](https://mrale.ph/blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html) written by [Vyacheslav Egorov (@mraleph)](https://github.com/mraleph). This article contains optimizations and hacks that lead to almost the same performance compare to WASM implementation. + +I decided to fork the original source-map and port these optimizations from the article and several others PR from the original source-map. + +--------- + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map-js + + + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). + +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. The line number is 1-based. + +* `column`: The column number in the original source, or null if this + information is not available. The column number is 0-based. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: The column number in the original source. The column + number is 0-based. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: Optional. The column number in the original source. The + column number is 0-based. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +* `ignoreInvalidMapping`: Optional. When `true`, instead of throwing error on + invalid mapping, it will be ignored. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer, sourceMapGeneratorOptions) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +* `sourceMapGeneratorOptions` options that will be passed to the SourceMapGenerator constructor which used under the hood. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer, { + ignoreInvalidMapping: true, +}); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. The line number is 1-based. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. The column number + is 0-based. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/source-map-js/lib/array-set.js b/node_modules/source-map-js/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/node_modules/source-map-js/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/source-map-js/lib/base64-vlq.js b/node_modules/source-map-js/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/source-map-js/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/source-map-js/lib/base64.js b/node_modules/source-map-js/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/source-map-js/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/source-map-js/lib/binary-search.js b/node_modules/source-map-js/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/source-map-js/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/source-map-js/lib/mapping-list.js b/node_modules/source-map-js/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/source-map-js/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/source-map-js/lib/quick-sort.js b/node_modules/source-map-js/lib/quick-sort.js new file mode 100644 index 0000000..23f9eda --- /dev/null +++ b/node_modules/source-map-js/lib/quick-sort.js @@ -0,0 +1,132 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +function SortTemplate(comparator) { + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + + return doQuickSort; +} + +function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + +let sortCache = new WeakMap(); +exports.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); +}; diff --git a/node_modules/source-map-js/lib/source-map-consumer.d.ts b/node_modules/source-map-js/lib/source-map-consumer.d.ts new file mode 100644 index 0000000..744bda7 --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-consumer.d.ts @@ -0,0 +1 @@ +export { SourceMapConsumer } from '..'; diff --git a/node_modules/source-map-js/lib/source-map-consumer.js b/node_modules/source-map-js/lib/source-map-consumer.js new file mode 100644 index 0000000..ee66114 --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-consumer.js @@ -0,0 +1,1188 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + } + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + +const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; +function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } +} +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map-js/lib/source-map-generator.d.ts b/node_modules/source-map-js/lib/source-map-generator.d.ts new file mode 100644 index 0000000..f59d70a --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-generator.d.ts @@ -0,0 +1 @@ +export { SourceMapGenerator } from '..'; diff --git a/node_modules/source-map-js/lib/source-map-generator.js b/node_modules/source-map-js/lib/source-map-generator.js new file mode 100644 index 0000000..bab04ff --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-generator.js @@ -0,0 +1,444 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = '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.' + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + 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) { + // Cases 2 and 3. + return; + } + else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message) + } + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map-js/lib/source-node.d.ts b/node_modules/source-map-js/lib/source-node.d.ts new file mode 100644 index 0000000..4df6a1a --- /dev/null +++ b/node_modules/source-map-js/lib/source-node.d.ts @@ -0,0 +1 @@ +export { SourceNode } from '..'; diff --git a/node_modules/source-map-js/lib/source-node.js b/node_modules/source-map-js/lib/source-node.js new file mode 100644 index 0000000..8bcdbe3 --- /dev/null +++ b/node_modules/source-map-js/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/source-map-js/lib/util.js b/node_modules/source-map-js/lib/util.js new file mode 100644 index 0000000..430e2d0 --- /dev/null +++ b/node_modules/source-map-js/lib/util.js @@ -0,0 +1,594 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +var MAX_CACHED_INPUTS = 32; + +/** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ +function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; +} + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +}); +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; diff --git a/node_modules/source-map-js/package.json b/node_modules/source-map-js/package.json new file mode 100644 index 0000000..f58dbeb --- /dev/null +++ b/node_modules/source-map-js/package.json @@ -0,0 +1,71 @@ +{ + "name": "source-map-js", + "description": "Generates and consumes source maps", + "version": "1.2.1", + "homepage": "https://github.com/7rulnik/source-map-js", + "author": "Valentin 7rulnik Semirulnik ", + "contributors": [ + "Nick Fitzgerald ", + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": "7rulnik/source-map-js", + "main": "./source-map.js", + "files": [ + "source-map.js", + "source-map.d.ts", + "lib/" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "clean-publish": "^3.1.0", + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "clean-publish": { + "cleanDocs": true + }, + "typings": "source-map.d.ts" +} diff --git a/node_modules/source-map-js/source-map.d.ts b/node_modules/source-map-js/source-map.d.ts new file mode 100644 index 0000000..ec8892f --- /dev/null +++ b/node_modules/source-map-js/source-map.d.ts @@ -0,0 +1,104 @@ +export interface StartOfSourceMap { + file?: string; + sourceRoot?: string; +} + +export interface RawSourceMap extends StartOfSourceMap { + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; +} + +export interface Position { + line: number; + column: number; +} + +export interface LineRange extends Position { + lastColumn: number; +} + +export interface FindPosition extends Position { + // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND + bias?: number; +} + +export interface SourceFindPosition extends FindPosition { + source: string; +} + +export interface MappedPosition extends Position { + source: string; + name?: string; +} + +export interface MappingItem { + source: string | null; + generatedLine: number; + generatedColumn: number; + originalLine: number | null; + originalColumn: number | null; + name: string | null; +} + +export class SourceMapConsumer { + static GENERATED_ORDER: number; + static ORIGINAL_ORDER: number; + + static GREATEST_LOWER_BOUND: number; + static LEAST_UPPER_BOUND: number; + + constructor(rawSourceMap: RawSourceMap); + readonly file: string | undefined | null; + readonly sourceRoot: string | undefined | null; + readonly sourcesContent: readonly string[] | null | undefined; + readonly sources: readonly string[] + + computeColumnSpans(): void; + originalPositionFor(generatedPosition: FindPosition): MappedPosition; + generatedPositionFor(originalPosition: SourceFindPosition): LineRange; + allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; + hasContentsOfAllSources(): boolean; + sourceContentFor(source: string, returnNullOnMissing?: boolean): string | null; + eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; +} + +export interface Mapping { + generated: Position; + original?: Position | null; + source?: string | null; + name?: string | null; +} + +export class SourceMapGenerator { + constructor(startOfSourceMap?: StartOfSourceMap); + static fromSourceMap(sourceMapConsumer: SourceMapConsumer, startOfSourceMap?: StartOfSourceMap): SourceMapGenerator; + addMapping(mapping: Mapping): void; + setSourceContent(sourceFile: string, sourceContent: string | null | undefined): void; + applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; + toString(): string; + toJSON(): RawSourceMap; +} + +export interface CodeWithSourceMap { + code: string; + map: SourceMapGenerator; +} + +export class SourceNode { + constructor(); + constructor(line: number, column: number, source: string); + constructor(line: number, column: number, source: string, chunk?: string, name?: string); + static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; + add(chunk: string): void; + prepend(chunk: string): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + walk(fn: (chunk: string, mapping: MappedPosition) => void): void; + walkSourceContents(fn: (file: string, content: string) => void): void; + join(sep: string): SourceNode; + replaceRight(pattern: string, replacement: string): SourceNode; + toString(): string; + toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; +} diff --git a/node_modules/source-map-js/source-map.js b/node_modules/source-map-js/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/source-map-js/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/source-map-resolve/LICENSE b/node_modules/source-map-resolve/LICENSE new file mode 100644 index 0000000..2ae9757 --- /dev/null +++ b/node_modules/source-map-resolve/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019 Simon Lydell +Copyright (c) 2019 ZHAO Jinxiang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/source-map-resolve/changelog.md b/node_modules/source-map-resolve/changelog.md new file mode 100644 index 0000000..7b3f94b --- /dev/null +++ b/node_modules/source-map-resolve/changelog.md @@ -0,0 +1,108 @@ +### Version 0.5.3 (2019-12-28) ### + +- Fixed: base64 encoded source maps now correctly decodes as utf-8. Previously, + non-ASCII characters could end up garbled. Thanks to ZHAO Jinxiang + (@xiaoxiangmoe)! (Note: This fix does not work in old evironments not + supporting both `TextDecoder` and `Uint8Array`.) +- Improved: Reduced size of the npm package. + +### Version 0.5.2 (2018-05-10) ### + +- Improved: Updated the version range of `atob` to disallow depending on `2.0.3` + which as a [security + vulnerability](https://snyk.io/test/npm/atob/2.0.3?severity=high&severity=medium&severity=low). + +### Version 0.5.1 (2017-10-21) ### + +- Fixed: URLs are now decoded before being passed to `read` in Node.js. This + allows reading files with spaces, for example. +- Fixed: Missing or empty `sources` fields (such as `sources: []`) in source + maps are now handled. Previously, such source maps would cause crashes or + callbacks never bing called. Now, an empty result is produced: + + ```js + sourcesResolved: [], + sourcesContent: [] + ``` + +### Version 0.5.0 (2016-02-28) ### + +- Improved: Errors now have a `sourceMapData` property that contain as much as + possible of the intended result of the function up until the error occurred. +- Changed: `resolveSources` and `resolve`, as well as their `*Sync` + alternatives, no longer fail when one single source fails to be fetched. + Instead, the `sourcesContent` array in the result object will contain error + objects for all failed sources, and strings otherwise. (Backwards-incompatible + change.) + +### Version 0.4.0 (2015-08-29) ### + +- Removed: The `ignoreSourceRoot` option of `resolveSources`. It has been + replaced with `sourceRoot: false`. (Backwards-incompatible change.) +- Added: The `sourceRoot` option of `resolveSources`. It not only allows to + ignore the source root, it also lets you replace it. +- Added: The `parseMapToJSON` method. +- Added: The `resolve` method now accepts `null, mapUrl, ...` as arguments, in + addition to the existing signature, which will read `mapUrl` instead of + looking for a sourceMappingURL in the code. + +### Version 0.3.1 (2014-08-16) ### + +- Improved: Updated the source-map-url dependency to 0.3.0. + + +### Version 0.3.0 (2014-07-02) ### + +- Removed: Argument checking. It’s not worth it. (Possibly + backwards-incompatible change.) +- Added: The `sourceRoot` property of source maps may now be ignored, which can + be useful when resolving sources outside of the browser. +- Added: It is now possible to resolve only the URLs of sources, without + reading them. + + +### Version 0.2.0 (2014-06-22) ### + +- Changed: The result of `resolveSources` is now an object, not an array. The + old result array is available in the `sourcesContent` property. + (Backwards-incompatible change.) +- Changed: `sources` has been renamed to `sourcesContent` in the result object + of `resolve`. (Backwards-incompatible change.) +- Added: `resolveSources` now also returns all sources fully resolved, in the + `sourcesResolved` property. +- Added: The result object of `resolve` now contains the `sourcesResolved` + property from `resolveSources`. + + +### Version 0.1.4 (2014-06-16) ### + +- Fixed: `sourcesContent` was mis-typed as `sourceContents`, which meant that + the `sourcesContent` property of source maps never was used when resolving + sources. + + +### Version 0.1.3 (2014-05-06) ### + +- Only documentation and meta-data changes. + + +### Version 0.1.2 (2014-03-23) ### + +- Improved: Source maps starting with `)]}'` are now parsed correctly. The spec + allows source maps to start with that character sequence to prevent XSSI + attacks. + + +### Version 0.1.1 (2014-03-06) ### + +- Improved: Make sourceRoot resolving more sensible. + + A source root such as `/scripts/subdir` is now treated as `/scripts/subdir/` + — that is, as a directory called “subdir”, not a file called “subdir”. + Pointing to a file as source root does not makes sense. + + + +### Version 0.1.0 (2014-03-03) ### + +- Initial release. diff --git a/node_modules/source-map-resolve/lib/decode-uri-component.js b/node_modules/source-map-resolve/lib/decode-uri-component.js new file mode 100644 index 0000000..0739c20 --- /dev/null +++ b/node_modules/source-map-resolve/lib/decode-uri-component.js @@ -0,0 +1,8 @@ +var decodeUriComponent = require("decode-uri-component") + +function customDecodeUriComponent(string) { + // `decodeUriComponent` turns `+` into ` `, but that's not wanted. + return decodeUriComponent(string.replace(/\+/g, "%2B")) +} + +module.exports = customDecodeUriComponent diff --git a/node_modules/source-map-resolve/lib/resolve-url.js b/node_modules/source-map-resolve/lib/resolve-url.js new file mode 100644 index 0000000..e3a86c4 --- /dev/null +++ b/node_modules/source-map-resolve/lib/resolve-url.js @@ -0,0 +1,9 @@ +var url = require("url") + +function resolveUrl(/* ...urls */) { + return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) { + return url.resolve(resolved, nextUrl) + }) +} + +module.exports = resolveUrl diff --git a/node_modules/source-map-resolve/lib/source-map-resolve-node.js b/node_modules/source-map-resolve/lib/source-map-resolve-node.js new file mode 100644 index 0000000..31ec3b2 --- /dev/null +++ b/node_modules/source-map-resolve/lib/source-map-resolve-node.js @@ -0,0 +1,342 @@ +var sourceMappingURL = require("source-map-url") + +var resolveUrl = require("./resolve-url") +var decodeUriComponent = require("./decode-uri-component") +var urix = require("urix") +var atob = require("atob") + + + +function callbackAsync(callback, error, result) { + setImmediate(function() { callback(error, result) }) +} + +function parseMapToJSON(string, data) { + try { + return JSON.parse(string.replace(/^\)\]\}'/, "")) + } catch (error) { + error.sourceMapData = data + throw error + } +} + +function readSync(read, url, data) { + var readUrl = decodeUriComponent(url) + try { + return String(read(readUrl)) + } catch (error) { + error.sourceMapData = data + throw error + } +} + + + +function resolveSourceMap(code, codeUrl, read, callback) { + var mapData + try { + mapData = resolveSourceMapHelper(code, codeUrl) + } catch (error) { + return callbackAsync(callback, error) + } + if (!mapData || mapData.map) { + return callbackAsync(callback, null, mapData) + } + var readUrl = decodeUriComponent(mapData.url) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = mapData + return callback(error) + } + mapData.map = String(result) + try { + mapData.map = parseMapToJSON(mapData.map, mapData) + } catch (error) { + return callback(error) + } + callback(null, mapData) + }) +} + +function resolveSourceMapSync(code, codeUrl, read) { + var mapData = resolveSourceMapHelper(code, codeUrl) + if (!mapData || mapData.map) { + return mapData + } + mapData.map = readSync(read, mapData.url, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + return mapData +} + +var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/ + +/** + * The media type for JSON text is application/json. + * + * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations } + * + * `text/json` is non-standard media type + */ +var jsonMimeTypeRegex = /^(?:application|text)\/json$/ + +/** + * JSON text exchanged between systems that are not part of a closed ecosystem + * MUST be encoded using UTF-8. + * + * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding} + */ +var jsonCharacterEncoding = "utf-8" + +function base64ToBuf(b64) { + var binStr = atob(b64) + var len = binStr.length + var arr = new Uint8Array(len) + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i) + } + return arr +} + +function decodeBase64String(b64) { + if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { + return atob(b64) + } + var buf = base64ToBuf(b64); + // Note: `decoder.decode` method will throw a `DOMException` with the + // `"EncodingError"` value when an coding error is found. + var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true}) + return decoder.decode(buf); +} + +function resolveSourceMapHelper(code, codeUrl) { + codeUrl = urix(codeUrl) + + var url = sourceMappingURL.getFrom(code) + if (!url) { + return null + } + + var dataUri = url.match(dataUriRegex) + if (dataUri) { + var mimeType = dataUri[1] || "text/plain" + var lastParameter = dataUri[2] || "" + var encoded = dataUri[3] || "" + var data = { + sourceMappingURL: url, + url: null, + sourcesRelativeTo: codeUrl, + map: encoded + } + if (!jsonMimeTypeRegex.test(mimeType)) { + var error = new Error("Unuseful data uri mime type: " + mimeType) + error.sourceMapData = data + throw error + } + try { + data.map = parseMapToJSON( + lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), + data + ) + } catch (error) { + error.sourceMapData = data + throw error + } + return data + } + + var mapUrl = resolveUrl(codeUrl, url) + return { + sourceMappingURL: url, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } +} + + + +function resolveSources(map, mapUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + var pending = map.sources ? map.sources.length : 0 + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (pending === 0) { + callbackAsync(callback, null, result) + return + } + + var done = function() { + pending-- + if (pending === 0) { + callback(null, result) + } + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + callbackAsync(done, null) + } else { + var readUrl = decodeUriComponent(fullUrl) + read(readUrl, function(error, source) { + result.sourcesContent[index] = error ? error : String(source) + done() + }) + } + }) +} + +function resolveSourcesSync(map, mapUrl, read, options) { + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (!map.sources || map.sources.length === 0) { + return result + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (read !== null) { + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + } else { + var readUrl = decodeUriComponent(fullUrl) + try { + result.sourcesContent[index] = String(read(readUrl)) + } catch (error) { + result.sourcesContent[index] = error + } + } + } + }) + + return result +} + +var endingSlash = /\/?$/ + +function resolveSourcesHelper(map, mapUrl, options, fn) { + options = options || {} + mapUrl = urix(mapUrl) + var fullUrl + var sourceContent + var sourceRoot + for (var index = 0, len = map.sources.length; index < len; index++) { + sourceRoot = null + if (typeof options.sourceRoot === "string") { + sourceRoot = options.sourceRoot + } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) { + sourceRoot = map.sourceRoot + } + // If the sourceRoot is the empty string, it is equivalent to not setting + // the property at all. + if (sourceRoot === null || sourceRoot === '') { + fullUrl = resolveUrl(mapUrl, map.sources[index]) + } else { + // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes + // `/scripts/subdir/`, not `/scripts/`. Pointing to a file as source root + // does not make sense. + fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index]) + } + sourceContent = (map.sourcesContent || [])[index] + fn(fullUrl, sourceContent, index) + } +} + + + +function resolve(code, codeUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + if (code === null) { + var mapUrl = codeUrl + var data = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + var readUrl = decodeUriComponent(mapUrl) + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = data + return callback(error) + } + data.map = String(result) + try { + data.map = parseMapToJSON(data.map, data) + } catch (error) { + return callback(error) + } + _resolveSources(data) + }) + } else { + resolveSourceMap(code, codeUrl, read, function(error, mapData) { + if (error) { + return callback(error) + } + if (!mapData) { + return callback(null, null) + } + _resolveSources(mapData) + }) + } + + function _resolveSources(mapData) { + resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) { + if (error) { + return callback(error) + } + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + callback(null, mapData) + }) + } +} + +function resolveSync(code, codeUrl, read, options) { + var mapData + if (code === null) { + var mapUrl = codeUrl + mapData = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + mapData.map = readSync(read, mapUrl, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + } else { + mapData = resolveSourceMapSync(code, codeUrl, read) + if (!mapData) { + return null + } + } + var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options) + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + return mapData +} + + + +module.exports = { + resolveSourceMap: resolveSourceMap, + resolveSourceMapSync: resolveSourceMapSync, + resolveSources: resolveSources, + resolveSourcesSync: resolveSourcesSync, + resolve: resolve, + resolveSync: resolveSync, + parseMapToJSON: parseMapToJSON +} diff --git a/node_modules/source-map-resolve/package.json b/node_modules/source-map-resolve/package.json new file mode 100644 index 0000000..78b6398 --- /dev/null +++ b/node_modules/source-map-resolve/package.json @@ -0,0 +1,47 @@ +{ + "name": "source-map-resolve", + "version": "0.5.3", + "author": "Simon Lydell", + "license": "MIT", + "description": "Resolve the source map and/or sources for a generated file.", + "keywords": [ + "source map", + "sourcemap", + "source", + "map", + "sourceMappingURL", + "resolve", + "resolver", + "locate", + "locator", + "find", + "finder" + ], + "repository": "lydell/source-map-resolve", + "main": "lib/source-map-resolve-node.js", + "browser": "source-map-resolve.js", + "files": [ + "lib", + "source-map-resolve.js" + ], + "scripts": { + "lint": "jshint lib/ test/", + "unit": "node test/source-map-resolve.js && node test/windows.js", + "test": "npm run lint && npm run unit", + "build": "node generate-source-map-resolve.js" + }, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + }, + "devDependencies": { + "Base64": "1.1.0", + "jshint": "2.10.3", + "setimmediate": "1.0.5", + "simple-asyncify": "1.0.0", + "tape": "4.12.1" + } +} \ No newline at end of file diff --git a/node_modules/source-map-resolve/readme.md b/node_modules/source-map-resolve/readme.md new file mode 100644 index 0000000..5796ba1 --- /dev/null +++ b/node_modules/source-map-resolve/readme.md @@ -0,0 +1,231 @@ +Overview [![Build Status](https://travis-ci.org/lydell/source-map-resolve.svg?branch=master)](https://travis-ci.org/lydell/source-map-resolve) +======== + +Resolve the source map and/or sources for a generated file. + +```js +var sourceMapResolve = require("source-map-resolve") +var sourceMap = require("source-map") + +var code = [ + "!function(){...}();", + "/*# sourceMappingURL=foo.js.map */" +].join("\n") + +sourceMapResolve.resolveSourceMap(code, "/js/foo.js", fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // map: {file: "foo.js", mappings: "...", sources: ["/coffee/foo.coffee"], names: []}, + // url: "/js/foo.js.map", + // sourcesRelativeTo: "/js/foo.js.map", + // sourceMappingURL: "foo.js.map" + // } + + sourceMapResolve.resolveSources(result.map, result.sourcesRelativeTo, fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // sourcesResolved: ["/coffee/foo.coffee"], + // sourcesContent: [""] + // } + }) +}) + +sourceMapResolve.resolve(code, "/js/foo.js", fs.readFile, function(error, result) { + if (error) { + return notifyFailure(error) + } + result + // { + // map: {file: "foo.js", mappings: "...", sources: ["/coffee/foo.coffee"], names: []}, + // url: "/js/foo.js.map", + // sourcesRelativeTo: "/js/foo.js.map", + // sourceMappingURL: "foo.js.map", + // sourcesResolved: ["/coffee/foo.coffee"], + // sourcesContent: [""] + // } + result.map.sourcesContent = result.sourcesContent + var map = new sourceMap.sourceMapConsumer(result.map) + map.sourceContentFor("/coffee/foo.coffee") + // "" +}) +``` + + +Installation +============ + +- `npm install source-map-resolve` +- `bower install source-map-resolve` +- `component install lydell/source-map-resolve` + +Works with CommonJS, AMD and browser globals, through UMD. + +Note: This module requires `setImmediate` and `atob`. +Use polyfills if needed, such as: + +- +- + + +Usage +===== + +### `sourceMapResolve.resolveSourceMap(code, codeUrl, read, callback)` ### + +- `code` is a string of code that may or may not contain a sourceMappingURL + comment. Such a comment is used to resolve the source map. +- `codeUrl` is the url to the file containing `code`. If the sourceMappingURL + is relative, it is resolved against `codeUrl`. +- `read(url, callback)` is a function that reads `url` and responds using + `callback(error, content)`. In Node.js you might want to use `fs.readFile`, + while in the browser you might want to use an asynchronus `XMLHttpRequest`. +- `callback(error, result)` is a function that is invoked with either an error + or `null` and the result. + +The result is an object with the following properties: + +- `map`: The source map for `code`, as an object (not a string). +- `url`: The url to the source map. If the source map came from a data uri, + this property is `null`, since then there is no url to it. +- `sourcesRelativeTo`: The url that the sources of the source map are relative + to. Since the sources are relative to the source map, and the url to the + source map is provided as the `url` property, this property might seem + superfluos. However, remember that the `url` property can be `null` if the + source map came from a data uri. If so, the sources are relative to the file + containing the data uri—`codeUrl`. This property will be identical to the + `url` property or `codeUrl`, whichever is appropriate. This way you can + conveniently resolve the sources without having to think about where the + source map came from. +- `sourceMappingURL`: The url of the sourceMappingURL comment in `code`. + +If `code` contains no sourceMappingURL, the result is `null`. + +### `sourceMapResolve.resolveSources(map, mapUrl, read, [options], callback)` ### + +- `map` is a source map, as an object (not a string). +- `mapUrl` is the url to the file containing `map`. Relative sources in the + source map, if any, are resolved against `mapUrl`. +- `read(url, callback)` is a function that reads `url` and responds using + `callback(error, content)`. In Node.js you might want to use `fs.readFile`, + while in the browser you might want to use an asynchronus `XMLHttpRequest`. +- `options` is an optional object with any of the following properties: + - `sourceRoot`: Override the `sourceRoot` property of the source map, which + might only be relevant when resolving sources in the browser. This lets you + bypass it when using the module outside of a browser, if needed. Pass a + string to replace the `sourceRoot` property with, or `false` to ignore it. + Defaults to `undefined`. +- `callback(error, result)` is a function that is invoked with either an error + or `null` and the result. + +The result is an object with the following properties: + +- `sourcesResolved`: The same as `map.sources`, except all the sources are + fully resolved. +- `sourcesContent`: An array with the contents of all sources in `map.sources`, + in the same order as `map.sources`. If getting the contents of a source fails, + an error object is put into the array instead. + +### `sourceMapResolve.resolve(code, codeUrl, read, [options], callback)` ### + +The arguments are identical to `sourceMapResolve.resolveSourceMap`, except that +you may also provide the same `options` as in `sourceMapResolve.resolveSources`. + +This is a convenience method that first resolves the source map and then its +sources. You could also do this by first calling +`sourceMapResolve.resolveSourceMap` and then `sourceMapResolve.resolveSources`. + +The result is identical to `sourceMapResolve.resolveSourceMap`, with the +properties from `sourceMapResolve.resolveSources` merged into it. + +There is one extra feature available, though. If `code` is `null`, `codeUrl` is +treated as a url to the source map instead of to `code`, and will be read. This +is handy if you _sometimes_ get the source map url from the `SourceMap: ` +header (see the [Notes] section). In this case, the `sourceMappingURL` property +of the result is `null`. + + +[Notes]: #notes + +### `sourceMapResolve.*Sync()` ### + +There are also sync versions of the three previous functions. They are identical +to the async versions, except: + +- They expect a sync reading function. In Node.js you might want to use + `fs.readFileSync`, while in the browser you might want to use a synchronus + `XMLHttpRequest`. +- They throw errors and return the result instead of using a callback. + +`sourceMapResolve.resolveSourcesSync` also accepts `null` as the `read` +parameter. The result is the same as when passing a function as the `read +parameter`, except that the `sourcesContent` property of the result will be an +empty array. In other words, the sources aren’t read. You only get the +`sourcesResolved` property. (This only supported in the synchronus version, since +there is no point doing it asynchronusly.) + +### `sourceMapResolve.parseMapToJSON(string, [data])` ### + +The spec says that if a source map (as a string) starts with `)]}'`, it should +be stripped off. This is to prevent XSSI attacks. This function does that and +returns the result of `JSON.parse`ing what’s left. + +If this function throws `error`, `error.sourceMapData === data`. + +### Errors + +All errors passed to callbacks or thrown by this module have a `sourceMapData` +property that contain as much as possible of the intended result of the function +up until the error occurred. + +Note that while the `map` property of result objects always is an object, +`error.sourceMapData.map` will be a string if parsing that string fails. + + +Note +==== + +This module resolves the source map for a given generated file by looking for a +sourceMappingURL comment. The spec defines yet a way to provide the URL to the +source map: By sending the `SourceMap: ` header along with the generated +file. Since this module doesn’t retrive the generated code for you (instead +_you_ give the generated code to the module), it’s up to you to look for such a +header when you retrieve the file (should the need arise). + + +Development +=========== + +Tests +----- + +First off, run `npm install` to install testing modules and browser polyfills. + +`npm test` lints the code and runs the test suite in Node.js. + +x-package.json5 +--------------- + +package.json, component.json and bower.json are all generated from +x-package.json5 by using [`xpkg`]. Only edit x-package.json5, and remember to +run `xpkg` before commiting! + +[`xpkg`]: https://github.com/kof/node-xpkg + +Generating the browser version +------------------------------ + +source-map-resolve.js is generated from source-map-resolve-node.js and +source-map-resolve-template.js. Only edit the two latter files, _not_ +source-map-resolve.js! To generate it, run `npm run build`. + + +License +======= + +[MIT](LICENSE). diff --git a/node_modules/source-map-resolve/source-map-resolve.js b/node_modules/source-map-resolve/source-map-resolve.js new file mode 100644 index 0000000..282b126 --- /dev/null +++ b/node_modules/source-map-resolve/source-map-resolve.js @@ -0,0 +1,348 @@ +// Note: source-map-resolve.js is generated from source-map-resolve-node.js and +// source-map-resolve-template.js. Only edit the two latter files, _not_ +// source-map-resolve.js! + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(["source-map-url", "resolve-url"], factory) + } else if (typeof exports === "object") { + var sourceMappingURL = require("source-map-url") + var resolveUrl = require("resolve-url") + module.exports = factory(sourceMappingURL, resolveUrl) + } else { + root.sourceMapResolve = factory(root.sourceMappingURL, root.resolveUrl) + } +}(this, function(sourceMappingURL, resolveUrl) { + + function callbackAsync(callback, error, result) { + setImmediate(function() { callback(error, result) }) + } + + function parseMapToJSON(string, data) { + try { + return JSON.parse(string.replace(/^\)\]\}'/, "")) + } catch (error) { + error.sourceMapData = data + throw error + } + } + + function readSync(read, url, data) { + var readUrl = url + try { + return String(read(readUrl)) + } catch (error) { + error.sourceMapData = data + throw error + } + } + + + + function resolveSourceMap(code, codeUrl, read, callback) { + var mapData + try { + mapData = resolveSourceMapHelper(code, codeUrl) + } catch (error) { + return callbackAsync(callback, error) + } + if (!mapData || mapData.map) { + return callbackAsync(callback, null, mapData) + } + var readUrl = mapData.url + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = mapData + return callback(error) + } + mapData.map = String(result) + try { + mapData.map = parseMapToJSON(mapData.map, mapData) + } catch (error) { + return callback(error) + } + callback(null, mapData) + }) + } + + function resolveSourceMapSync(code, codeUrl, read) { + var mapData = resolveSourceMapHelper(code, codeUrl) + if (!mapData || mapData.map) { + return mapData + } + mapData.map = readSync(read, mapData.url, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + return mapData + } + + var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/ + + /** + * The media type for JSON text is application/json. + * + * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations } + * + * `text/json` is non-standard media type + */ + var jsonMimeTypeRegex = /^(?:application|text)\/json$/ + + /** + * JSON text exchanged between systems that are not part of a closed ecosystem + * MUST be encoded using UTF-8. + * + * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding} + */ + var jsonCharacterEncoding = "utf-8" + + function base64ToBuf(b64) { + var binStr = atob(b64) + var len = binStr.length + var arr = new Uint8Array(len) + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i) + } + return arr + } + + function decodeBase64String(b64) { + if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") { + return atob(b64) + } + var buf = base64ToBuf(b64); + // Note: `decoder.decode` method will throw a `DOMException` with the + // `"EncodingError"` value when an coding error is found. + var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true}) + return decoder.decode(buf); + } + + function resolveSourceMapHelper(code, codeUrl) { + var url = sourceMappingURL.getFrom(code) + if (!url) { + return null + } + + var dataUri = url.match(dataUriRegex) + if (dataUri) { + var mimeType = dataUri[1] || "text/plain" + var lastParameter = dataUri[2] || "" + var encoded = dataUri[3] || "" + var data = { + sourceMappingURL: url, + url: null, + sourcesRelativeTo: codeUrl, + map: encoded + } + if (!jsonMimeTypeRegex.test(mimeType)) { + var error = new Error("Unuseful data uri mime type: " + mimeType) + error.sourceMapData = data + throw error + } + try { + data.map = parseMapToJSON( + lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded), + data + ) + } catch (error) { + error.sourceMapData = data + throw error + } + return data + } + + var mapUrl = resolveUrl(codeUrl, url) + return { + sourceMappingURL: url, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + } + + + + function resolveSources(map, mapUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + var pending = map.sources ? map.sources.length : 0 + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (pending === 0) { + callbackAsync(callback, null, result) + return + } + + var done = function() { + pending-- + if (pending === 0) { + callback(null, result) + } + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + callbackAsync(done, null) + } else { + var readUrl = fullUrl + read(readUrl, function(error, source) { + result.sourcesContent[index] = error ? error : String(source) + done() + }) + } + }) + } + + function resolveSourcesSync(map, mapUrl, read, options) { + var result = { + sourcesResolved: [], + sourcesContent: [] + } + + if (!map.sources || map.sources.length === 0) { + return result + } + + resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) { + result.sourcesResolved[index] = fullUrl + if (read !== null) { + if (typeof sourceContent === "string") { + result.sourcesContent[index] = sourceContent + } else { + var readUrl = fullUrl + try { + result.sourcesContent[index] = String(read(readUrl)) + } catch (error) { + result.sourcesContent[index] = error + } + } + } + }) + + return result + } + + var endingSlash = /\/?$/ + + function resolveSourcesHelper(map, mapUrl, options, fn) { + options = options || {} + var fullUrl + var sourceContent + var sourceRoot + for (var index = 0, len = map.sources.length; index < len; index++) { + sourceRoot = null + if (typeof options.sourceRoot === "string") { + sourceRoot = options.sourceRoot + } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) { + sourceRoot = map.sourceRoot + } + // If the sourceRoot is the empty string, it is equivalent to not setting + // the property at all. + if (sourceRoot === null || sourceRoot === '') { + fullUrl = resolveUrl(mapUrl, map.sources[index]) + } else { + // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes + // `/scripts/subdir/`, not `/scripts/`. Pointing to a file as source root + // does not make sense. + fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index]) + } + sourceContent = (map.sourcesContent || [])[index] + fn(fullUrl, sourceContent, index) + } + } + + + + function resolve(code, codeUrl, read, options, callback) { + if (typeof options === "function") { + callback = options + options = {} + } + if (code === null) { + var mapUrl = codeUrl + var data = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + var readUrl = mapUrl + read(readUrl, function(error, result) { + if (error) { + error.sourceMapData = data + return callback(error) + } + data.map = String(result) + try { + data.map = parseMapToJSON(data.map, data) + } catch (error) { + return callback(error) + } + _resolveSources(data) + }) + } else { + resolveSourceMap(code, codeUrl, read, function(error, mapData) { + if (error) { + return callback(error) + } + if (!mapData) { + return callback(null, null) + } + _resolveSources(mapData) + }) + } + + function _resolveSources(mapData) { + resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) { + if (error) { + return callback(error) + } + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + callback(null, mapData) + }) + } + } + + function resolveSync(code, codeUrl, read, options) { + var mapData + if (code === null) { + var mapUrl = codeUrl + mapData = { + sourceMappingURL: null, + url: mapUrl, + sourcesRelativeTo: mapUrl, + map: null + } + mapData.map = readSync(read, mapUrl, mapData) + mapData.map = parseMapToJSON(mapData.map, mapData) + } else { + mapData = resolveSourceMapSync(code, codeUrl, read) + if (!mapData) { + return null + } + } + var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options) + mapData.sourcesResolved = result.sourcesResolved + mapData.sourcesContent = result.sourcesContent + return mapData + } + + + + return { + resolveSourceMap: resolveSourceMap, + resolveSourceMapSync: resolveSourceMapSync, + resolveSources: resolveSources, + resolveSourcesSync: resolveSourcesSync, + resolve: resolve, + resolveSync: resolveSync, + parseMapToJSON: parseMapToJSON + } + +})); diff --git a/node_modules/source-map-url/LICENSE b/node_modules/source-map-url/LICENSE new file mode 100644 index 0000000..10052a9 --- /dev/null +++ b/node_modules/source-map-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/source-map-url/changelog.md b/node_modules/source-map-url/changelog.md new file mode 100644 index 0000000..61f1c7b --- /dev/null +++ b/node_modules/source-map-url/changelog.md @@ -0,0 +1,57 @@ +### Version 0.4.1 (2021-02-01) ### + +- Improved: The package is now about 50% smaller, by excluding unnecessary + files. Thanks to Piotr Kuczynski (@pkuczynski)! + +### Version 0.4.0 (2015-11-12) ### + +- Changed: sourceMappingURL comments used to be matched only when placed at + the end of the script. However, since several commonly used JavaScript + libraries do not follow this convention and all popular web browsers accept + non-trailing comments, this has been revised. + + So now non-trailing SourceMappingURL comments are matched as well. + + +### Version 0.3.0 (2014-08-16) ### + +- Changed: sourceMappingURL comments used to be matched only if they appeared + on their own line. However, the spec only says: + + > The generated code may include a line at the end of the source, with the following form: + > + > //# sourceMappingURL= + + So now they are matched also when they appear on the same line as code. + +- Removed: The `.set()` method. I couldn’t decide how it should work + considering the above change. Moreover, it was unnecessarily complex (and + would have gotten worse) for very little gain. It is much easier to run + `.remove()` if needed, and then simply `code += "\n//# sourceMappingURL=" + + url` (using the appropriate comment syntax and newline). KISS. + +- Changed: The `.insertBefore()` method now always inserts the string exactly + before the sourceMappingURL comment; not before the newline before the + comment (if any). Moreover, it does not ensure that the comment will be on a + new line anymore. This is up to the caller. KISS. + +- Changed: The `.remove()` method no longer removes the newline before the + sourceMappingURL (if any). + +- Changed: Renamed `.get()` to `.getFrom()`. +- Changed: Renamed `.remove()` to `.removeFrom()`. + +- Added: The `.existsIn()` method. + + +### Version 0.2.0 (2014-02-23) ### + +- Changed: A space is no longer inserted before the closing comment syntax. If + such a space is desired, it needs to be put in the closing comment syntax + itself (such as `["/*", " */"]` instead of `["/*", "*/"]`). (Backwards + incompatible change.) + + +### Version 0.1.0 (2014-02-22) ### + +- Initial release. diff --git a/node_modules/source-map-url/package.json b/node_modules/source-map-url/package.json new file mode 100644 index 0000000..6fd96d3 --- /dev/null +++ b/node_modules/source-map-url/package.json @@ -0,0 +1,39 @@ +{ + "name": "source-map-url", + "version": "0.4.1", + "author": "Simon Lydell", + "license": "MIT", + "description": "Tools for working with sourceMappingURL comments.", + "keywords": [ + "source map", + "sourceMappingURL", + "comment", + "annotation" + ], + "main": "source-map-url.js", + "repository": "lydell/source-map-url", + "scripts": { + "lint": "jshint source-map-url.js test/ ", + "unit": "mocha", + "test": "npm run lint && npm run unit" + }, + "devDependencies": { + "mocha": "~1.17.1", + "expect.js": "~0.3.1", + "jshint": "~2.4.3" + }, + "testling": { + "harness": "mocha", + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "chrome/latest", + "firefox/latest", + "opera/12", + "opera/latest", + "safari/5", + "iphone/6", + "android-browser/4" + ] + } +} diff --git a/node_modules/source-map-url/readme.md b/node_modules/source-map-url/readme.md new file mode 100644 index 0000000..216de5e --- /dev/null +++ b/node_modules/source-map-url/readme.md @@ -0,0 +1,97 @@ +Overview [![Build Status](https://travis-ci.org/lydell/source-map-url.png?branch=master)](https://travis-ci.org/lydell/source-map-url) +======== + +[![browser support](https://ci.testling.com/lydell/source-map-url.png)](https://ci.testling.com/lydell/source-map-url) + +Tools for working with sourceMappingURL comments. + +```js +var sourceMappingURL = require("source-map-url") + +var code = [ + "!function(){...}();", + "/*# sourceMappingURL=foo.js.map */" +].join("\n") + +sourceMappingURL.existsIn(code) +// true + +sourceMappingURL.getFrom(code) +// foo.js.map + +code = sourceMappingURL.insertBefore(code, "// License: MIT\n") +// !function(){...}(); +// // License: MIT +// /*# sourceMappingURL=foo.js.map */ + +code = sourceMappingURL.removeFrom(code) +// !function(){...}(); +// // License: MIT + +sourceMappingURL.existsIn(code) +// false + +sourceMappingURL.getFrom(code) +// null + +code += "//# sourceMappingURL=/other/file.js.map" +// !function(){...}(); +// // License: MIT +// //# sourceMappingURL=/other/file.js.map +``` + + +Installation +============ + +- `npm install source-map-url` +- `bower install source-map-url` +- `component install lydell/source-map-url` + +Works with CommonJS, AMD and browser globals, through UMD. + + +Usage +===== + +### `sourceMappingURL.getFrom(code)` ### + +Returns the url of the sourceMappingURL comment in `code`. Returns `null` if +there is no such comment. + +### `sourceMappingURL.existsIn(code)` ### + +Returns `true` if there is a sourceMappingURL comment in `code`, or `false` +otherwise. + +### `sourceMappingURL.removeFrom(code)` ### + +Removes the sourceMappingURL comment in `code`. Does nothing if there is no +such comment. Returns the updated `code`. + +### `sourceMappingURL.insertBefore(code, string)` ### + +Inserts `string` before the sourceMappingURL comment in `code`. Appends +`string` to `code` if there is no such comment. + +Lets you append something to a file without worrying about burying the +sourceMappingURL comment (by keeping it at the end of the file). + +### `sourceMappingURL.regex` ### + +The regex that is used to match sourceMappingURL comments. It matches both `//` +and `/**/` comments, thus supporting both JavaScript and CSS. + + +Tests +===== + +Start by running `npm test`, which lints the code and runs the test suite in Node.js. + +To run the tests in a browser, run `testling` (`npm install -g testling`) or `testling -u`. + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/node_modules/source-map-url/source-map-url.js b/node_modules/source-map-url/source-map-url.js new file mode 100644 index 0000000..1724cb7 --- /dev/null +++ b/node_modules/source-map-url/source-map-url.js @@ -0,0 +1,57 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +void (function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory) + } else if (typeof exports === "object") { + module.exports = factory() + } else { + root.sourceMappingURL = factory() + } +}(this, function() { + + var innerRegex = /[#@] sourceMappingURL=([^\s'"]*)/ + + var regex = RegExp( + "(?:" + + "/\\*" + + "(?:\\s*\r?\n(?://)?)?" + + "(?:" + innerRegex.source + ")" + + "\\s*" + + "\\*/" + + "|" + + "//(?:" + innerRegex.source + ")" + + ")" + + "\\s*" + ) + + return { + + regex: regex, + _innerRegex: innerRegex, + + getFrom: function(code) { + var match = code.match(regex) + return (match ? match[1] || match[2] || "" : null) + }, + + existsIn: function(code) { + return regex.test(code) + }, + + removeFrom: function(code) { + return code.replace(regex, "") + }, + + insertBefore: function(code, string) { + var match = code.match(regex) + if (match) { + return code.slice(0, match.index) + string + code.slice(match.index) + } else { + return code + string + } + } + } + +})); diff --git a/node_modules/source-map/CHANGELOG.md b/node_modules/source-map/CHANGELOG.md new file mode 100644 index 0000000..3a8c066 --- /dev/null +++ b/node_modules/source-map/CHANGELOG.md @@ -0,0 +1,301 @@ +# Change Log + +## 0.5.6 + +* Fix for regression when people were using numbers as names in source maps. See + #236. + +## 0.5.5 + +* Fix "regression" of unsupported, implementation behavior that half the world + happens to have come to depend on. See #235. + +* Fix regression involving function hoisting in SpiderMonkey. See #233. + +## 0.5.4 + +* Large performance improvements to source-map serialization. See #228 and #229. + +## 0.5.3 + +* Do not include unnecessary distribution files. See + commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. + +## 0.5.2 + +* Include browser distributions of the library in package.json's `files`. See + issue #212. + +## 0.5.1 + +* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See + ff05274becc9e6e1295ed60f3ea090d31d843379. + +## 0.5.0 + +* Node 0.8 is no longer supported. + +* Use webpack instead of dryice for bundling. + +* Big speedups serializing source maps. See pull request #203. + +* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that + explicitly start with the source root. See issue #199. + +## 0.4.4 + +* Fix an issue where using a `SourceMapGenerator` after having created a + `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See + issue #191. + +* Fix an issue with where `SourceMapGenerator` would mistakenly consider + different mappings as duplicates of each other and avoid generating them. See + issue #192. + +## 0.4.3 + +* A very large number of performance improvements, particularly when parsing + source maps. Collectively about 75% of time shaved off of the source map + parsing benchmark! + +* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy + searching in the presence of a column option. See issue #177. + +* Fix a bug with joining a source and its source root when the source is above + the root. See issue #182. + +* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to + determine when all sources' contents are inlined into the source map. See + issue #190. + +## 0.4.2 + +* Add an `.npmignore` file so that the benchmarks aren't pulled down by + dependent projects. Issue #169. + +* Add an optional `column` argument to + `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines + with no mappings. Issues #172 and #173. + +## 0.4.1 + +* Fix accidentally defining a global variable. #170. + +## 0.4.0 + +* The default direction for fuzzy searching was changed back to its original + direction. See #164. + +* There is now a `bias` option you can supply to `SourceMapConsumer` to control + the fuzzy searching direction. See #167. + +* About an 8% speed up in parsing source maps. See #159. + +* Added a benchmark for parsing and generating source maps. + +## 0.3.0 + +* Change the default direction that searching for positions fuzzes when there is + not an exact match. See #154. + +* Support for environments using json2.js for JSON serialization. See #156. + +## 0.2.0 + +* Support for consuming "indexed" source maps which do not have any remote + sections. See pull request #127. This introduces a minor backwards + incompatibility if you are monkey patching `SourceMapConsumer.prototype` + methods. + +## 0.1.43 + +* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue + #148 for some discussion and issues #150, #151, and #152 for implementations. + +## 0.1.42 + +* Fix an issue where `SourceNode`s from different versions of the source-map + library couldn't be used in conjunction with each other. See issue #142. + +## 0.1.41 + +* Fix a bug with getting the source content of relative sources with a "./" + prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). + +* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the + column span of each mapping. + +* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find + all generated positions associated with a given original source and line. + +## 0.1.40 + +* Performance improvements for parsing source maps in SourceMapConsumer. + +## 0.1.39 + +* Fix a bug where setting a source's contents to null before any source content + had been set before threw a TypeError. See issue #131. + +## 0.1.38 + +* Fix a bug where finding relative paths from an empty path were creating + absolute paths. See issue #129. + +## 0.1.37 + +* Fix a bug where if the source root was an empty string, relative source paths + would turn into absolute source paths. Issue #124. + +## 0.1.36 + +* Allow the `names` mapping property to be an empty string. Issue #121. + +## 0.1.35 + +* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` + to specify a path that relative sources in the second parameter should be + relative to. Issue #105. + +* If no file property is given to a `SourceMapGenerator`, then the resulting + source map will no longer have a `null` file property. The property will + simply not exist. Issue #104. + +* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. + Issue #116. + +## 0.1.34 + +* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. + +* Fix bug involving source contents and the + `SourceMapGenerator.prototype.applySourceMap`. Issue #100. + +## 0.1.33 + +* Fix some edge cases surrounding path joining and URL resolution. + +* Add a third parameter for relative path to + `SourceMapGenerator.prototype.applySourceMap`. + +* Fix issues with mappings and EOLs. + +## 0.1.32 + +* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns + (issue 92). + +* Fixed test runner to actually report number of failed tests as its process + exit code. + +* Fixed a typo when reporting bad mappings (issue 87). + +## 0.1.31 + +* Delay parsing the mappings in SourceMapConsumer until queried for a source + location. + +* Support Sass source maps (which at the time of writing deviate from the spec + in small ways) in SourceMapConsumer. + +## 0.1.30 + +* Do not join source root with a source, when the source is a data URI. + +* Extend the test runner to allow running single specific test files at a time. + +* Performance improvements in `SourceNode.prototype.walk` and + `SourceMapConsumer.prototype.eachMapping`. + +* Source map browser builds will now work inside Workers. + +* Better error messages when attempting to add an invalid mapping to a + `SourceMapGenerator`. + +## 0.1.29 + +* Allow duplicate entries in the `names` and `sources` arrays of source maps + (usually from TypeScript) we are parsing. Fixes github issue 72. + +## 0.1.28 + +* Skip duplicate mappings when creating source maps from SourceNode; github + issue 75. + +## 0.1.27 + +* Don't throw an error when the `file` property is missing in SourceMapConsumer, + we don't use it anyway. + +## 0.1.26 + +* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. + +## 0.1.25 + +* Make compatible with browserify + +## 0.1.24 + +* Fix issue with absolute paths and `file://` URIs. See + https://bugzilla.mozilla.org/show_bug.cgi?id=885597 + +## 0.1.23 + +* Fix issue with absolute paths and sourcesContent, github issue 64. + +## 0.1.22 + +* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. + +## 0.1.21 + +* Fixed handling of sources that start with a slash so that they are relative to + the source root's host. + +## 0.1.20 + +* Fixed github issue #43: absolute URLs aren't joined with the source root + anymore. + +## 0.1.19 + +* Using Travis CI to run tests. + +## 0.1.18 + +* Fixed a bug in the handling of sourceRoot. + +## 0.1.17 + +* Added SourceNode.fromStringWithSourceMap. + +## 0.1.16 + +* Added missing documentation. + +* Fixed the generating of empty mappings in SourceNode. + +## 0.1.15 + +* Added SourceMapGenerator.applySourceMap. + +## 0.1.14 + +* The sourceRoot is now handled consistently. + +## 0.1.13 + +* Added SourceMapGenerator.fromSourceMap. + +## 0.1.12 + +* SourceNode now generates empty mappings too. + +## 0.1.11 + +* Added name support to SourceNode. + +## 0.1.10 + +* Added sourcesContent support to the customer and generator. diff --git a/node_modules/source-map/LICENSE b/node_modules/source-map/LICENSE new file mode 100644 index 0000000..ed1b7cf --- /dev/null +++ b/node_modules/source-map/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/source-map/README.md b/node_modules/source-map/README.md new file mode 100644 index 0000000..3281339 --- /dev/null +++ b/node_modules/source-map/README.md @@ -0,0 +1,729 @@ +# Source Map + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map + +## Use on the Web + + + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. + +* `column`: The column number in the generated source. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: Optional. The column number in the original source. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/source-map/dist/source-map.debug.js b/node_modules/source-map/dist/source-map.debug.js new file mode 100644 index 0000000..b5ab638 --- /dev/null +++ b/node_modules/source-map/dist/source-map.debug.js @@ -0,0 +1,3091 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // 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] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = 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; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + 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.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + 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) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMkNBQTBDLFNBQVM7QUFDbkQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDL1pBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDREQUEyRDtBQUMzRCxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHOztBQUVIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBO0FBQ0E7Ozs7Ozs7QUMzSUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsb0JBQW1CO0FBQ25CLHFCQUFvQjs7QUFFcEIsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsaUJBQWdCO0FBQ2hCLGtCQUFpQjs7QUFFakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNsRUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsK0NBQThDLFFBQVE7QUFDdEQ7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLDRCQUEyQixRQUFRO0FBQ25DO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNoYUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXNDLFNBQVM7QUFDL0M7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3hIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQzlFQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxvQkFBbUI7QUFDbkI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVzs7QUFFWDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTJCLE1BQU07QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVEQUFzRCxZQUFZO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0NBQW1DO0FBQ25DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBeUIsY0FBYztBQUN2QztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esd0JBQXVCLHdDQUF3QztBQUMvRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZ0RBQStDLG1CQUFtQixFQUFFO0FBQ3BFOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFpQixvQkFBb0I7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE2QixNQUFNO0FBQ25DO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBLElBQUc7QUFDSDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUMsc0JBQXFCLCtDQUErQztBQUNwRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsUUFBTztBQUNQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7QUFDQTtBQUNBLHNCQUFxQiw0QkFBNEI7QUFDakQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDempDQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7Ozs7OztBQzlHQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFlBQVcsTUFBTTtBQUNqQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQixPQUFPO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQ0FBaUMsUUFBUTtBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4Q0FBNkMsU0FBUztBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBLHVDQUFzQztBQUN0QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZSxXQUFXO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnREFBK0MsU0FBUztBQUN4RDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDBDQUF5QyxTQUFTO0FBQ2xEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0E7QUFDQTtBQUNBLFlBQVc7QUFDWDtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSw2Q0FBNEMsY0FBYztBQUMxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBLGNBQWE7QUFDYjtBQUNBLFlBQVc7QUFDWDtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBLElBQUc7O0FBRUgsV0FBVTtBQUNWOztBQUVBIiwiZmlsZSI6InNvdXJjZS1tYXAuZGVidWcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gd2VicGFja1VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24ocm9vdCwgZmFjdG9yeSkge1xuXHRpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcpXG5cdFx0bW9kdWxlLmV4cG9ydHMgPSBmYWN0b3J5KCk7XG5cdGVsc2UgaWYodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKVxuXHRcdGRlZmluZShbXSwgZmFjdG9yeSk7XG5cdGVsc2UgaWYodHlwZW9mIGV4cG9ydHMgPT09ICdvYmplY3QnKVxuXHRcdGV4cG9ydHNbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG5cdGVsc2Vcblx0XHRyb290W1wic291cmNlTWFwXCJdID0gZmFjdG9yeSgpO1xufSkodGhpcywgZnVuY3Rpb24oKSB7XG5yZXR1cm4gXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svdW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbiIsIiBcdC8vIFRoZSBtb2R1bGUgY2FjaGVcbiBcdHZhciBpbnN0YWxsZWRNb2R1bGVzID0ge307XG5cbiBcdC8vIFRoZSByZXF1aXJlIGZ1bmN0aW9uXG4gXHRmdW5jdGlvbiBfX3dlYnBhY2tfcmVxdWlyZV9fKG1vZHVsZUlkKSB7XG5cbiBcdFx0Ly8gQ2hlY2sgaWYgbW9kdWxlIGlzIGluIGNhY2hlXG4gXHRcdGlmKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdKVxuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuXG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRleHBvcnRzOiB7fSxcbiBcdFx0XHRpZDogbW9kdWxlSWQsXG4gXHRcdFx0bG9hZGVkOiBmYWxzZVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sb2FkZWQgPSB0cnVlO1xuXG4gXHRcdC8vIFJldHVybiB0aGUgZXhwb3J0cyBvZiB0aGUgbW9kdWxlXG4gXHRcdHJldHVybiBtb2R1bGUuZXhwb3J0cztcbiBcdH1cblxuXG4gXHQvLyBleHBvc2UgdGhlIG1vZHVsZXMgb2JqZWN0IChfX3dlYnBhY2tfbW9kdWxlc19fKVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5tID0gbW9kdWxlcztcblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGUgY2FjaGVcbiBcdF9fd2VicGFja19yZXF1aXJlX18uYyA9IGluc3RhbGxlZE1vZHVsZXM7XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIlwiO1xuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svYm9vdHN0cmFwIGU0NzM4ZmM3MmE3YjIzMDM5ODg5IiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NvdXJjZS1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgYmFzZTY0VkxRID0gcmVxdWlyZSgnLi9iYXNlNjQtdmxxJyk7XG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBNYXBwaW5nTGlzdCA9IHJlcXVpcmUoJy4vbWFwcGluZy1saXN0JykuTWFwcGluZ0xpc3Q7XG5cbi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhlIFNvdXJjZU1hcEdlbmVyYXRvciByZXByZXNlbnRzIGEgc291cmNlIG1hcCB3aGljaCBpc1xuICogYmVpbmcgYnVpbHQgaW5jcmVtZW50YWxseS4gWW91IG1heSBwYXNzIGFuIG9iamVjdCB3aXRoIHRoZSBmb2xsb3dpbmdcbiAqIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGZpbGU6IFRoZSBmaWxlbmFtZSBvZiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBzb3VyY2VSb290OiBBIHJvb3QgZm9yIGFsbCByZWxhdGl2ZSBVUkxzIGluIHRoaXMgc291cmNlIG1hcC5cbiAqL1xuZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKSB7XG4gIGlmICghYUFyZ3MpIHtcbiAgICBhQXJncyA9IHt9O1xuICB9XG4gIHRoaXMuX2ZpbGUgPSB1dGlsLmdldEFyZyhhQXJncywgJ2ZpbGUnLCBudWxsKTtcbiAgdGhpcy5fc291cmNlUm9vdCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB0aGlzLl9za2lwVmFsaWRhdGlvbiA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc2tpcFZhbGlkYXRpb24nLCBmYWxzZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbmFtZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbWFwcGluZ3MgPSBuZXcgTWFwcGluZ0xpc3QoKTtcbiAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gbnVsbDtcbn1cblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBTb3VyY2VNYXBHZW5lcmF0b3IgYmFzZWQgb24gYSBTb3VyY2VNYXBDb25zdW1lclxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcC5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLmZyb21Tb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIpIHtcbiAgICB2YXIgc291cmNlUm9vdCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VSb290O1xuICAgIHZhciBnZW5lcmF0b3IgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKHtcbiAgICAgIGZpbGU6IGFTb3VyY2VNYXBDb25zdW1lci5maWxlLFxuICAgICAgc291cmNlUm9vdDogc291cmNlUm9vdFxuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5lYWNoTWFwcGluZyhmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIG5ld01hcHBpbmcgPSB7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbmV3TWFwcGluZy5zb3VyY2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3TWFwcGluZy5vcmlnaW5hbCA9IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgfSk7XG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgZ2VuZXJhdG9yLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGdlbmVyYXRvcjtcbiAgfTtcblxuLyoqXG4gKiBBZGQgYSBzaW5nbGUgbWFwcGluZyBmcm9tIG9yaWdpbmFsIHNvdXJjZSBsaW5lIGFuZCBjb2x1bW4gdG8gdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIGZvciB0aGlzIHNvdXJjZSBtYXAgYmVpbmcgY3JlYXRlZC4gVGhlIG1hcHBpbmdcbiAqIG9iamVjdCBzaG91bGQgaGF2ZSB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGdlbmVyYXRlZDogQW4gb2JqZWN0IHdpdGggdGhlIGdlbmVyYXRlZCBsaW5lIGFuZCBjb2x1bW4gcG9zaXRpb25zLlxuICogICAtIG9yaWdpbmFsOiBBbiBvYmplY3Qgd2l0aCB0aGUgb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBzb3VyY2U6IFRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZSAocmVsYXRpdmUgdG8gdGhlIHNvdXJjZVJvb3QpLlxuICogICAtIG5hbWU6IEFuIG9wdGlvbmFsIG9yaWdpbmFsIHRva2VuIG5hbWUgZm9yIHRoaXMgbWFwcGluZy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hZGRNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2FkZE1hcHBpbmcoYUFyZ3MpIHtcbiAgICB2YXIgZ2VuZXJhdGVkID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdnZW5lcmF0ZWQnKTtcbiAgICB2YXIgb3JpZ2luYWwgPSB1dGlsLmdldEFyZyhhQXJncywgJ29yaWdpbmFsJywgbnVsbCk7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJywgbnVsbCk7XG4gICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhhQXJncywgJ25hbWUnLCBudWxsKTtcblxuICAgIGlmICghdGhpcy5fc2tpcFZhbGlkYXRpb24pIHtcbiAgICAgIHRoaXMuX3ZhbGlkYXRlTWFwcGluZyhnZW5lcmF0ZWQsIG9yaWdpbmFsLCBzb3VyY2UsIG5hbWUpO1xuICAgIH1cblxuICAgIGlmIChzb3VyY2UgIT0gbnVsbCkge1xuICAgICAgc291cmNlID0gU3RyaW5nKHNvdXJjZSk7XG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobmFtZSAhPSBudWxsKSB7XG4gICAgICBuYW1lID0gU3RyaW5nKG5hbWUpO1xuICAgICAgaWYgKCF0aGlzLl9uYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgdGhpcy5fbmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuX21hcHBpbmdzLmFkZCh7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogZ2VuZXJhdGVkLmNvbHVtbixcbiAgICAgIG9yaWdpbmFsTGluZTogb3JpZ2luYWwgIT0gbnVsbCAmJiBvcmlnaW5hbC5saW5lLFxuICAgICAgb3JpZ2luYWxDb2x1bW46IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwuY29sdW1uLFxuICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3NldFNvdXJjZUNvbnRlbnQoYVNvdXJjZUZpbGUsIGFTb3VyY2VDb250ZW50KSB7XG4gICAgdmFyIHNvdXJjZSA9IGFTb3VyY2VGaWxlO1xuICAgIGlmICh0aGlzLl9zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5fc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG5cbiAgICBpZiAoYVNvdXJjZUNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgLy8gQWRkIHRoZSBzb3VyY2UgY29udGVudCB0byB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBDcmVhdGUgYSBuZXcgX3NvdXJjZXNDb250ZW50cyBtYXAgaWYgdGhlIHByb3BlcnR5IGlzIG51bGwuXG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgfVxuICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoc291cmNlKV0gPSBhU291cmNlQ29udGVudDtcbiAgICB9IGVsc2UgaWYgKHRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgLy8gUmVtb3ZlIHRoZSBzb3VyY2UgZmlsZSBmcm9tIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcC5cbiAgICAgIC8vIElmIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcCBpcyBlbXB0eSwgc2V0IHRoZSBwcm9wZXJ0eSB0byBudWxsLlxuICAgICAgZGVsZXRlIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldO1xuICAgICAgaWYgKE9iamVjdC5rZXlzKHRoaXMuX3NvdXJjZXNDb250ZW50cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFwcGxpZXMgdGhlIG1hcHBpbmdzIG9mIGEgc3ViLXNvdXJjZS1tYXAgZm9yIGEgc3BlY2lmaWMgc291cmNlIGZpbGUgdG8gdGhlXG4gKiBzb3VyY2UgbWFwIGJlaW5nIGdlbmVyYXRlZC4gRWFjaCBtYXBwaW5nIHRvIHRoZSBzdXBwbGllZCBzb3VyY2UgZmlsZSBpc1xuICogcmV3cml0dGVuIHVzaW5nIHRoZSBzdXBwbGllZCBzb3VyY2UgbWFwLiBOb3RlOiBUaGUgcmVzb2x1dGlvbiBmb3IgdGhlXG4gKiByZXN1bHRpbmcgbWFwcGluZ3MgaXMgdGhlIG1pbmltaXVtIG9mIHRoaXMgbWFwIGFuZCB0aGUgc3VwcGxpZWQgbWFwLlxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZC5cbiAqIEBwYXJhbSBhU291cmNlRmlsZSBPcHRpb25hbC4gVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZS5cbiAqICAgICAgICBJZiBvbWl0dGVkLCBTb3VyY2VNYXBDb25zdW1lcidzIGZpbGUgcHJvcGVydHkgd2lsbCBiZSB1c2VkLlxuICogQHBhcmFtIGFTb3VyY2VNYXBQYXRoIE9wdGlvbmFsLiBUaGUgZGlybmFtZSBvZiB0aGUgcGF0aCB0byB0aGUgc291cmNlIG1hcFxuICogICAgICAgIHRvIGJlIGFwcGxpZWQuIElmIHJlbGF0aXZlLCBpdCBpcyByZWxhdGl2ZSB0byB0aGUgU291cmNlTWFwQ29uc3VtZXIuXG4gKiAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaXMgbmVlZGVkIHdoZW4gdGhlIHR3byBzb3VyY2UgbWFwcyBhcmVuJ3QgaW4gdGhlIHNhbWVcbiAqICAgICAgICBkaXJlY3RvcnksIGFuZCB0aGUgc291cmNlIG1hcCB0byBiZSBhcHBsaWVkIGNvbnRhaW5zIHJlbGF0aXZlIHNvdXJjZVxuICogICAgICAgIHBhdGhzLiBJZiBzbywgdGhvc2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIG5lZWQgdG8gYmUgcmV3cml0dGVuXG4gKiAgICAgICAgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcEdlbmVyYXRvci5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hcHBseVNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hcHBseVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIsIGFTb3VyY2VGaWxlLCBhU291cmNlTWFwUGF0aCkge1xuICAgIHZhciBzb3VyY2VGaWxlID0gYVNvdXJjZUZpbGU7XG4gICAgLy8gSWYgYVNvdXJjZUZpbGUgaXMgb21pdHRlZCwgd2Ugd2lsbCB1c2UgdGhlIGZpbGUgcHJvcGVydHkgb2YgdGhlIFNvdXJjZU1hcFxuICAgIGlmIChhU291cmNlRmlsZSA9PSBudWxsKSB7XG4gICAgICBpZiAoYVNvdXJjZU1hcENvbnN1bWVyLmZpbGUgPT0gbnVsbCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgJ1NvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgcmVxdWlyZXMgZWl0aGVyIGFuIGV4cGxpY2l0IHNvdXJjZSBmaWxlLCAnICtcbiAgICAgICAgICAnb3IgdGhlIHNvdXJjZSBtYXBcXCdzIFwiZmlsZVwiIHByb3BlcnR5LiBCb3RoIHdlcmUgb21pdHRlZC4nXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBzb3VyY2VGaWxlID0gYVNvdXJjZU1hcENvbnN1bWVyLmZpbGU7XG4gICAgfVxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5fc291cmNlUm9vdDtcbiAgICAvLyBNYWtlIFwic291cmNlRmlsZVwiIHJlbGF0aXZlIGlmIGFuIGFic29sdXRlIFVybCBpcyBwYXNzZWQuXG4gICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgfVxuICAgIC8vIEFwcGx5aW5nIHRoZSBTb3VyY2VNYXAgY2FuIGFkZCBhbmQgcmVtb3ZlIGl0ZW1zIGZyb20gdGhlIHNvdXJjZXMgYW5kXG4gICAgLy8gdGhlIG5hbWVzIGFycmF5LlxuICAgIHZhciBuZXdTb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gICAgdmFyIG5ld05hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgICAvLyBGaW5kIG1hcHBpbmdzIGZvciB0aGUgXCJzb3VyY2VGaWxlXCJcbiAgICB0aGlzLl9tYXBwaW5ncy51bnNvcnRlZEZvckVhY2goZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSA9PT0gc291cmNlRmlsZSAmJiBtYXBwaW5nLm9yaWdpbmFsTGluZSAhPSBudWxsKSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICB2YXIgb3JpZ2luYWwgPSBhU291cmNlTWFwQ29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAob3JpZ2luYWwuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IG9yaWdpbmFsLnNvdXJjZTtcbiAgICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICBpZiAob3JpZ2luYWwubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICBpZiAoc291cmNlICE9IG51bGwgJiYgIW5ld1NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgbmV3U291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICBpZiAobmFtZSAhPSBudWxsICYmICFuZXdOYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuXG4gICAgfSwgdGhpcyk7XG4gICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgdGhpcy5fbmFtZXMgPSBuZXdOYW1lcztcblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnRzIG9mIGFwcGxpZWQgbWFwLlxuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhU291cmNlTWFwUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgIH1cbiAgICB9LCB0aGlzKTtcbiAgfTtcblxuLyoqXG4gKiBBIG1hcHBpbmcgY2FuIGhhdmUgb25lIG9mIHRoZSB0aHJlZSBsZXZlbHMgb2YgZGF0YTpcbiAqXG4gKiAgIDEuIEp1c3QgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi5cbiAqICAgMi4gVGhlIEdlbmVyYXRlZCBwb3NpdGlvbiwgb3JpZ2luYWwgcG9zaXRpb24sIGFuZCBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIDMuIEdlbmVyYXRlZCBhbmQgb3JpZ2luYWwgcG9zaXRpb24sIG9yaWdpbmFsIHNvdXJjZSwgYXMgd2VsbCBhcyBhIG5hbWVcbiAqICAgICAgdG9rZW4uXG4gKlxuICogVG8gbWFpbnRhaW4gY29uc2lzdGVuY3ksIHdlIHZhbGlkYXRlIHRoYXQgYW55IG5ldyBtYXBwaW5nIGJlaW5nIGFkZGVkIGZhbGxzXG4gKiBpbiB0byBvbmUgb2YgdGhlc2UgY2F0ZWdvcmllcy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmFsaWRhdGVNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3ZhbGlkYXRlTWFwcGluZyhhR2VuZXJhdGVkLCBhT3JpZ2luYWwsIGFTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYU5hbWUpIHtcbiAgICAvLyBXaGVuIGFPcmlnaW5hbCBpcyB0cnV0aHkgYnV0IGhhcyBlbXB0eSB2YWx1ZXMgZm9yIC5saW5lIGFuZCAuY29sdW1uLFxuICAgIC8vIGl0IGlzIG1vc3QgbGlrZWx5IGEgcHJvZ3JhbW1lciBlcnJvci4gSW4gdGhpcyBjYXNlIHdlIHRocm93IGEgdmVyeVxuICAgIC8vIHNwZWNpZmljIGVycm9yIG1lc3NhZ2UgdG8gdHJ5IHRvIGd1aWRlIHRoZW0gdGhlIHJpZ2h0IHdheS5cbiAgICAvLyBGb3IgZXhhbXBsZTogaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXIvcG9seW1lci1idW5kbGVyL3B1bGwvNTE5XG4gICAgaWYgKGFPcmlnaW5hbCAmJiB0eXBlb2YgYU9yaWdpbmFsLmxpbmUgIT09ICdudW1iZXInICYmIHR5cGVvZiBhT3JpZ2luYWwuY29sdW1uICE9PSAnbnVtYmVyJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAnb3JpZ2luYWwubGluZSBhbmQgb3JpZ2luYWwuY29sdW1uIGFyZSBub3QgbnVtYmVycyAtLSB5b3UgcHJvYmFibHkgbWVhbnQgdG8gb21pdCAnICtcbiAgICAgICAgICAgICd0aGUgb3JpZ2luYWwgbWFwcGluZyBlbnRpcmVseSBhbmQgb25seSBtYXAgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi4gSWYgc28sIHBhc3MgJyArXG4gICAgICAgICAgICAnbnVsbCBmb3IgdGhlIG9yaWdpbmFsIG1hcHBpbmcgaW5zdGVhZCBvZiBhbiBvYmplY3Qgd2l0aCBlbXB0eSBvciBudWxsIHZhbHVlcy4nXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3NvdXJjZS1tYXAtZ2VuZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKlxuICogQmFzZWQgb24gdGhlIEJhc2UgNjQgVkxRIGltcGxlbWVudGF0aW9uIGluIENsb3N1cmUgQ29tcGlsZXI6XG4gKiBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2Nsb3N1cmUtY29tcGlsZXIvc291cmNlL2Jyb3dzZS90cnVuay9zcmMvY29tL2dvb2dsZS9kZWJ1Z2dpbmcvc291cmNlbWFwL0Jhc2U2NFZMUS5qYXZhXG4gKlxuICogQ29weXJpZ2h0IDIwMTEgVGhlIENsb3N1cmUgQ29tcGlsZXIgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dFxuICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zIGFyZVxuICogbWV0OlxuICpcbiAqICAqIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0XG4gKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlXG4gKiAgICBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZ1xuICogICAgZGlzY2xhaW1lciBpbiB0aGUgZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkXG4gKiAgICB3aXRoIHRoZSBkaXN0cmlidXRpb24uXG4gKiAgKiBOZWl0aGVyIHRoZSBuYW1lIG9mIEdvb2dsZSBJbmMuIG5vciB0aGUgbmFtZXMgb2YgaXRzXG4gKiAgICBjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWRcbiAqICAgIGZyb20gdGhpcyBzb2Z0d2FyZSB3aXRob3V0IHNwZWNpZmljIHByaW9yIHdyaXR0ZW4gcGVybWlzc2lvbi5cbiAqXG4gKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBDT1BZUklHSFQgSE9MREVSUyBBTkQgQ09OVFJJQlVUT1JTXG4gKiBcIkFTIElTXCIgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUyBGT1JcbiAqIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFSRSBESVNDTEFJTUVELiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQ09QWVJJR0hUXG4gKiBPV05FUiBPUiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCxcbiAqIFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1RcbiAqIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLFxuICogREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZXG4gKiBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0VcbiAqIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKi9cblxudmFyIGJhc2U2NCA9IHJlcXVpcmUoJy4vYmFzZTY0Jyk7XG5cbi8vIEEgc2luZ2xlIGJhc2UgNjQgZGlnaXQgY2FuIGNvbnRhaW4gNiBiaXRzIG9mIGRhdGEuIEZvciB0aGUgYmFzZSA2NCB2YXJpYWJsZVxuLy8gbGVuZ3RoIHF1YW50aXRpZXMgd2UgdXNlIGluIHRoZSBzb3VyY2UgbWFwIHNwZWMsIHRoZSBmaXJzdCBiaXQgaXMgdGhlIHNpZ24sXG4vLyB0aGUgbmV4dCBmb3VyIGJpdHMgYXJlIHRoZSBhY3R1YWwgdmFsdWUsIGFuZCB0aGUgNnRoIGJpdCBpcyB0aGVcbi8vIGNvbnRpbnVhdGlvbiBiaXQuIFRoZSBjb250aW51YXRpb24gYml0IHRlbGxzIHVzIHdoZXRoZXIgdGhlcmUgYXJlIG1vcmVcbi8vIGRpZ2l0cyBpbiB0aGlzIHZhbHVlIGZvbGxvd2luZyB0aGlzIGRpZ2l0LlxuLy9cbi8vICAgQ29udGludWF0aW9uXG4vLyAgIHwgICAgU2lnblxuLy8gICB8ICAgIHxcbi8vICAgViAgICBWXG4vLyAgIDEwMTAxMVxuXG52YXIgVkxRX0JBU0VfU0hJRlQgPSA1O1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9CQVNFID0gMSA8PCBWTFFfQkFTRV9TSElGVDtcblxuLy8gYmluYXJ5OiAwMTExMTFcbnZhciBWTFFfQkFTRV9NQVNLID0gVkxRX0JBU0UgLSAxO1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9DT05USU5VQVRJT05fQklUID0gVkxRX0JBU0U7XG5cbi8qKlxuICogQ29udmVydHMgZnJvbSBhIHR3by1jb21wbGVtZW50IHZhbHVlIHRvIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMSBiZWNvbWVzIDIgKDEwIGJpbmFyeSksIC0xIGJlY29tZXMgMyAoMTEgYmluYXJ5KVxuICogICAyIGJlY29tZXMgNCAoMTAwIGJpbmFyeSksIC0yIGJlY29tZXMgNSAoMTAxIGJpbmFyeSlcbiAqL1xuZnVuY3Rpb24gdG9WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHJldHVybiBhVmFsdWUgPCAwXG4gICAgPyAoKC1hVmFsdWUpIDw8IDEpICsgMVxuICAgIDogKGFWYWx1ZSA8PCAxKSArIDA7XG59XG5cbi8qKlxuICogQ29udmVydHMgdG8gYSB0d28tY29tcGxlbWVudCB2YWx1ZSBmcm9tIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMiAoMTAgYmluYXJ5KSBiZWNvbWVzIDEsIDMgKDExIGJpbmFyeSkgYmVjb21lcyAtMVxuICogICA0ICgxMDAgYmluYXJ5KSBiZWNvbWVzIDIsIDUgKDEwMSBiaW5hcnkpIGJlY29tZXMgLTJcbiAqL1xuZnVuY3Rpb24gZnJvbVZMUVNpZ25lZChhVmFsdWUpIHtcbiAgdmFyIGlzTmVnYXRpdmUgPSAoYVZhbHVlICYgMSkgPT09IDE7XG4gIHZhciBzaGlmdGVkID0gYVZhbHVlID4+IDE7XG4gIHJldHVybiBpc05lZ2F0aXZlXG4gICAgPyAtc2hpZnRlZFxuICAgIDogc2hpZnRlZDtcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBiYXNlIDY0IFZMUSBlbmNvZGVkIHZhbHVlLlxuICovXG5leHBvcnRzLmVuY29kZSA9IGZ1bmN0aW9uIGJhc2U2NFZMUV9lbmNvZGUoYVZhbHVlKSB7XG4gIHZhciBlbmNvZGVkID0gXCJcIjtcbiAgdmFyIGRpZ2l0O1xuXG4gIHZhciB2bHEgPSB0b1ZMUVNpZ25lZChhVmFsdWUpO1xuXG4gIGRvIHtcbiAgICBkaWdpdCA9IHZscSAmIFZMUV9CQVNFX01BU0s7XG4gICAgdmxxID4+Pj0gVkxRX0JBU0VfU0hJRlQ7XG4gICAgaWYgKHZscSA+IDApIHtcbiAgICAgIC8vIFRoZXJlIGFyZSBzdGlsbCBtb3JlIGRpZ2l0cyBpbiB0aGlzIHZhbHVlLCBzbyB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGVcbiAgICAgIC8vIGNvbnRpbnVhdGlvbiBiaXQgaXMgbWFya2VkLlxuICAgICAgZGlnaXQgfD0gVkxRX0NPTlRJTlVBVElPTl9CSVQ7XG4gICAgfVxuICAgIGVuY29kZWQgKz0gYmFzZTY0LmVuY29kZShkaWdpdCk7XG4gIH0gd2hpbGUgKHZscSA+IDApO1xuXG4gIHJldHVybiBlbmNvZGVkO1xufTtcblxuLyoqXG4gKiBEZWNvZGVzIHRoZSBuZXh0IGJhc2UgNjQgVkxRIHZhbHVlIGZyb20gdGhlIGdpdmVuIHN0cmluZyBhbmQgcmV0dXJucyB0aGVcbiAqIHZhbHVlIGFuZCB0aGUgcmVzdCBvZiB0aGUgc3RyaW5nIHZpYSB0aGUgb3V0IHBhcmFtZXRlci5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZGVjb2RlKGFTdHIsIGFJbmRleCwgYU91dFBhcmFtKSB7XG4gIHZhciBzdHJMZW4gPSBhU3RyLmxlbmd0aDtcbiAgdmFyIHJlc3VsdCA9IDA7XG4gIHZhciBzaGlmdCA9IDA7XG4gIHZhciBjb250aW51YXRpb24sIGRpZ2l0O1xuXG4gIGRvIHtcbiAgICBpZiAoYUluZGV4ID49IHN0ckxlbikge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgbW9yZSBkaWdpdHMgaW4gYmFzZSA2NCBWTFEgdmFsdWUuXCIpO1xuICAgIH1cblxuICAgIGRpZ2l0ID0gYmFzZTY0LmRlY29kZShhU3RyLmNoYXJDb2RlQXQoYUluZGV4KyspKTtcbiAgICBpZiAoZGlnaXQgPT09IC0xKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIGJhc2U2NCBkaWdpdDogXCIgKyBhU3RyLmNoYXJBdChhSW5kZXggLSAxKSk7XG4gICAgfVxuXG4gICAgY29udGludWF0aW9uID0gISEoZGlnaXQgJiBWTFFfQ09OVElOVUFUSU9OX0JJVCk7XG4gICAgZGlnaXQgJj0gVkxRX0JBU0VfTUFTSztcbiAgICByZXN1bHQgPSByZXN1bHQgKyAoZGlnaXQgPDwgc2hpZnQpO1xuICAgIHNoaWZ0ICs9IFZMUV9CQVNFX1NISUZUO1xuICB9IHdoaWxlIChjb250aW51YXRpb24pO1xuXG4gIGFPdXRQYXJhbS52YWx1ZSA9IGZyb21WTFFTaWduZWQocmVzdWx0KTtcbiAgYU91dFBhcmFtLnJlc3QgPSBhSW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LXZscS5qc1xuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBpbnRUb0NoYXJNYXAgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycuc3BsaXQoJycpO1xuXG4vKipcbiAqIEVuY29kZSBhbiBpbnRlZ2VyIGluIHRoZSByYW5nZSBvZiAwIHRvIDYzIHRvIGEgc2luZ2xlIGJhc2UgNjQgZGlnaXQuXG4gKi9cbmV4cG9ydHMuZW5jb2RlID0gZnVuY3Rpb24gKG51bWJlcikge1xuICBpZiAoMCA8PSBudW1iZXIgJiYgbnVtYmVyIDwgaW50VG9DaGFyTWFwLmxlbmd0aCkge1xuICAgIHJldHVybiBpbnRUb0NoYXJNYXBbbnVtYmVyXTtcbiAgfVxuICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiTXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDYzOiBcIiArIG51bWJlcik7XG59O1xuXG4vKipcbiAqIERlY29kZSBhIHNpbmdsZSBiYXNlIDY0IGNoYXJhY3RlciBjb2RlIGRpZ2l0IHRvIGFuIGludGVnZXIuIFJldHVybnMgLTEgb25cbiAqIGZhaWx1cmUuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gKGNoYXJDb2RlKSB7XG4gIHZhciBiaWdBID0gNjU7ICAgICAvLyAnQSdcbiAgdmFyIGJpZ1ogPSA5MDsgICAgIC8vICdaJ1xuXG4gIHZhciBsaXR0bGVBID0gOTc7ICAvLyAnYSdcbiAgdmFyIGxpdHRsZVogPSAxMjI7IC8vICd6J1xuXG4gIHZhciB6ZXJvID0gNDg7ICAgICAvLyAnMCdcbiAgdmFyIG5pbmUgPSA1NzsgICAgIC8vICc5J1xuXG4gIHZhciBwbHVzID0gNDM7ICAgICAvLyAnKydcbiAgdmFyIHNsYXNoID0gNDc7ICAgIC8vICcvJ1xuXG4gIHZhciBsaXR0bGVPZmZzZXQgPSAyNjtcbiAgdmFyIG51bWJlck9mZnNldCA9IDUyO1xuXG4gIC8vIDAgLSAyNTogQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpcbiAgaWYgKGJpZ0EgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gYmlnWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBiaWdBKTtcbiAgfVxuXG4gIC8vIDI2IC0gNTE6IGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6XG4gIGlmIChsaXR0bGVBIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IGxpdHRsZVopIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gbGl0dGxlQSArIGxpdHRsZU9mZnNldCk7XG4gIH1cblxuICAvLyA1MiAtIDYxOiAwMTIzNDU2Nzg5XG4gIGlmICh6ZXJvIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IG5pbmUpIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gemVybyArIG51bWJlck9mZnNldCk7XG4gIH1cblxuICAvLyA2MjogK1xuICBpZiAoY2hhckNvZGUgPT0gcGx1cykge1xuICAgIHJldHVybiA2MjtcbiAgfVxuXG4gIC8vIDYzOiAvXG4gIGlmIChjaGFyQ29kZSA9PSBzbGFzaCkge1xuICAgIHJldHVybiA2MztcbiAgfVxuXG4gIC8vIEludmFsaWQgYmFzZTY0IGRpZ2l0LlxuICByZXR1cm4gLTE7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZWN1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3V0aWwuanNcbi8vIG1vZHVsZSBpZCA9IDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGhhcyA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG52YXIgaGFzTmF0aXZlTWFwID0gdHlwZW9mIE1hcCAhPT0gXCJ1bmRlZmluZWRcIjtcblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHdoaWNoIGlzIGEgY29tYmluYXRpb24gb2YgYW4gYXJyYXkgYW5kIGEgc2V0LiBBZGRpbmcgYSBuZXdcbiAqIG1lbWJlciBpcyBPKDEpLCB0ZXN0aW5nIGZvciBtZW1iZXJzaGlwIGlzIE8oMSksIGFuZCBmaW5kaW5nIHRoZSBpbmRleCBvZiBhblxuICogZWxlbWVudCBpcyBPKDEpLiBSZW1vdmluZyBlbGVtZW50cyBmcm9tIHRoZSBzZXQgaXMgbm90IHN1cHBvcnRlZC4gT25seVxuICogc3RyaW5ncyBhcmUgc3VwcG9ydGVkIGZvciBtZW1iZXJzaGlwLlxuICovXG5mdW5jdGlvbiBBcnJheVNldCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc2V0ID0gaGFzTmF0aXZlTWFwID8gbmV3IE1hcCgpIDogT2JqZWN0LmNyZWF0ZShudWxsKTtcbn1cblxuLyoqXG4gKiBTdGF0aWMgbWV0aG9kIGZvciBjcmVhdGluZyBBcnJheVNldCBpbnN0YW5jZXMgZnJvbSBhbiBleGlzdGluZyBhcnJheS5cbiAqL1xuQXJyYXlTZXQuZnJvbUFycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfZnJvbUFycmF5KGFBcnJheSwgYUFsbG93RHVwbGljYXRlcykge1xuICB2YXIgc2V0ID0gbmV3IEFycmF5U2V0KCk7XG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBhQXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzZXQuYWRkKGFBcnJheVtpXSwgYUFsbG93RHVwbGljYXRlcyk7XG4gIH1cbiAgcmV0dXJuIHNldDtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhvdyBtYW55IHVuaXF1ZSBpdGVtcyBhcmUgaW4gdGhpcyBBcnJheVNldC4gSWYgZHVwbGljYXRlcyBoYXZlIGJlZW5cbiAqIGFkZGVkLCB0aGFuIHRob3NlIGRvIG5vdCBjb3VudCB0b3dhcmRzIHRoZSBzaXplLlxuICpcbiAqIEByZXR1cm5zIE51bWJlclxuICovXG5BcnJheVNldC5wcm90b3R5cGUuc2l6ZSA9IGZ1bmN0aW9uIEFycmF5U2V0X3NpemUoKSB7XG4gIHJldHVybiBoYXNOYXRpdmVNYXAgPyB0aGlzLl9zZXQuc2l6ZSA6IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gaGFzTmF0aXZlTWFwID8gYVN0ciA6IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHZhciBpc0R1cGxpY2F0ZSA9IGhhc05hdGl2ZU1hcCA/IHRoaXMuaGFzKGFTdHIpIDogaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgaWYgKGhhc05hdGl2ZU1hcCkge1xuICAgICAgdGhpcy5fc2V0LnNldChhU3RyLCBpZHgpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9zZXRbc1N0cl0gPSBpZHg7XG4gICAgfVxuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NldC5oYXMoYVN0cik7XG4gIH0gZWxzZSB7XG4gICAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICAgIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xuICB9XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGluZGV4IG9mIHRoZSBnaXZlbiBzdHJpbmcgaW4gdGhlIGFycmF5P1xuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5BcnJheVNldC5wcm90b3R5cGUuaW5kZXhPZiA9IGZ1bmN0aW9uIEFycmF5U2V0X2luZGV4T2YoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgdmFyIGlkeCA9IHRoaXMuX3NldC5nZXQoYVN0cik7XG4gICAgaWYgKGlkeCA+PSAwKSB7XG4gICAgICAgIHJldHVybiBpZHg7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgICAgcmV0dXJuIHRoaXMuX3NldFtzU3RyXTtcbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFTdHIgKyAnXCIgaXMgbm90IGluIHRoZSBzZXQuJyk7XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGVsZW1lbnQgYXQgdGhlIGdpdmVuIGluZGV4P1xuICpcbiAqIEBwYXJhbSBOdW1iZXIgYUlkeFxuICovXG5BcnJheVNldC5wcm90b3R5cGUuYXQgPSBmdW5jdGlvbiBBcnJheVNldF9hdChhSWR4KSB7XG4gIGlmIChhSWR4ID49IDAgJiYgYUlkeCA8IHRoaXMuX2FycmF5Lmxlbmd0aCkge1xuICAgIHJldHVybiB0aGlzLl9hcnJheVthSWR4XTtcbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoJ05vIGVsZW1lbnQgaW5kZXhlZCBieSAnICsgYUlkeCk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGFycmF5IHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc2V0ICh3aGljaCBoYXMgdGhlIHByb3BlciBpbmRpY2VzXG4gKiBpbmRpY2F0ZWQgYnkgaW5kZXhPZikuIE5vdGUgdGhhdCB0aGlzIGlzIGEgY29weSBvZiB0aGUgaW50ZXJuYWwgYXJyYXkgdXNlZFxuICogZm9yIHN0b3JpbmcgdGhlIG1lbWJlcnMgc28gdGhhdCBubyBvbmUgY2FuIG1lc3Mgd2l0aCBpbnRlcm5hbCBzdGF0ZS5cbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF90b0FycmF5KCkge1xuICByZXR1cm4gdGhpcy5fYXJyYXkuc2xpY2UoKTtcbn07XG5cbmV4cG9ydHMuQXJyYXlTZXQgPSBBcnJheVNldDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL2FycmF5LXNldC5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTQgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIHdoZXRoZXIgbWFwcGluZ0IgaXMgYWZ0ZXIgbWFwcGluZ0Egd2l0aCByZXNwZWN0IHRvIGdlbmVyYXRlZFxuICogcG9zaXRpb24uXG4gKi9cbmZ1bmN0aW9uIGdlbmVyYXRlZFBvc2l0aW9uQWZ0ZXIobWFwcGluZ0EsIG1hcHBpbmdCKSB7XG4gIC8vIE9wdGltaXplZCBmb3IgbW9zdCBjb21tb24gY2FzZVxuICB2YXIgbGluZUEgPSBtYXBwaW5nQS5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgbGluZUIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgY29sdW1uQSA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbjtcbiAgdmFyIGNvbHVtbkIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIHJldHVybiBsaW5lQiA+IGxpbmVBIHx8IGxpbmVCID09IGxpbmVBICYmIGNvbHVtbkIgPj0gY29sdW1uQSB8fFxuICAgICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nQSwgbWFwcGluZ0IpIDw9IDA7XG59XG5cbi8qKlxuICogQSBkYXRhIHN0cnVjdHVyZSB0byBwcm92aWRlIGEgc29ydGVkIHZpZXcgb2YgYWNjdW11bGF0ZWQgbWFwcGluZ3MgaW4gYVxuICogcGVyZm9ybWFuY2UgY29uc2Npb3VzIG1hbm5lci4gSXQgdHJhZGVzIGEgbmVnbGliYWJsZSBvdmVyaGVhZCBpbiBnZW5lcmFsXG4gKiBjYXNlIGZvciBhIGxhcmdlIHNwZWVkdXAgaW4gY2FzZSBvZiBtYXBwaW5ncyBiZWluZyBhZGRlZCBpbiBvcmRlci5cbiAqL1xuZnVuY3Rpb24gTWFwcGluZ0xpc3QoKSB7XG4gIHRoaXMuX2FycmF5ID0gW107XG4gIHRoaXMuX3NvcnRlZCA9IHRydWU7XG4gIC8vIFNlcnZlcyBhcyBpbmZpbXVtXG4gIHRoaXMuX2xhc3QgPSB7Z2VuZXJhdGVkTGluZTogLTEsIGdlbmVyYXRlZENvbHVtbjogMH07XG59XG5cbi8qKlxuICogSXRlcmF0ZSB0aHJvdWdoIGludGVybmFsIGl0ZW1zLiBUaGlzIG1ldGhvZCB0YWtlcyB0aGUgc2FtZSBhcmd1bWVudHMgdGhhdFxuICogYEFycmF5LnByb3RvdHlwZS5mb3JFYWNoYCB0YWtlcy5cbiAqXG4gKiBOT1RFOiBUaGUgb3JkZXIgb2YgdGhlIG1hcHBpbmdzIGlzIE5PVCBndWFyYW50ZWVkLlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudW5zb3J0ZWRGb3JFYWNoID1cbiAgZnVuY3Rpb24gTWFwcGluZ0xpc3RfZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKSB7XG4gICAgdGhpcy5fYXJyYXkuZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKTtcbiAgfTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHNvdXJjZSBtYXBwaW5nLlxuICpcbiAqIEBwYXJhbSBPYmplY3QgYU1hcHBpbmdcbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X2FkZChhTWFwcGluZykge1xuICBpZiAoZ2VuZXJhdGVkUG9zaXRpb25BZnRlcih0aGlzLl9sYXN0LCBhTWFwcGluZykpIHtcbiAgICB0aGlzLl9sYXN0ID0gYU1hcHBpbmc7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fc29ydGVkID0gZmFsc2U7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH1cbn07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgZmxhdCwgc29ydGVkIGFycmF5IG9mIG1hcHBpbmdzLiBUaGUgbWFwcGluZ3MgYXJlIHNvcnRlZCBieVxuICogZ2VuZXJhdGVkIHBvc2l0aW9uLlxuICpcbiAqIFdBUk5JTkc6IFRoaXMgbWV0aG9kIHJldHVybnMgaW50ZXJuYWwgZGF0YSB3aXRob3V0IGNvcHlpbmcsIGZvclxuICogcGVyZm9ybWFuY2UuIFRoZSByZXR1cm4gdmFsdWUgbXVzdCBOT1QgYmUgbXV0YXRlZCwgYW5kIHNob3VsZCBiZSB0cmVhdGVkIGFzXG4gKiBhbiBpbW11dGFibGUgYm9ycm93LiBJZiB5b3Ugd2FudCB0byB0YWtlIG93bmVyc2hpcCwgeW91IG11c3QgbWFrZSB5b3VyIG93blxuICogY29weS5cbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBNYXBwaW5nTGlzdF90b0FycmF5KCkge1xuICBpZiAoIXRoaXMuX3NvcnRlZCkge1xuICAgIHRoaXMuX2FycmF5LnNvcnQodXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZCk7XG4gICAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgfVxuICByZXR1cm4gdGhpcy5fYXJyYXk7XG59O1xuXG5leHBvcnRzLk1hcHBpbmdMaXN0ID0gTWFwcGluZ0xpc3Q7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2xpYi9tYXBwaW5nLWxpc3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qc1xuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbmV4cG9ydHMuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCA9IDI7XG5cbi8qKlxuICogUmVjdXJzaXZlIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2guXG4gKlxuICogQHBhcmFtIGFMb3cgSW5kaWNlcyBoZXJlIGFuZCBsb3dlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFIaWdoIEluZGljZXMgaGVyZSBhbmQgaGlnaGVyIGRvIG5vdCBjb250YWluIHRoZSBuZWVkbGUuXG4gKiBAcGFyYW0gYU5lZWRsZSBUaGUgZWxlbWVudCBiZWluZyBzZWFyY2hlZCBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBub24tZW1wdHkgYXJyYXkgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgRnVuY3Rpb24gd2hpY2ggdGFrZXMgdHdvIGVsZW1lbnRzIGFuZCByZXR1cm5zIC0xLCAwLCBvciAxLlxuICogQHBhcmFtIGFCaWFzIEVpdGhlciAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJyBvclxuICogICAgICdiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICovXG5mdW5jdGlvbiByZWN1cnNpdmVTZWFyY2goYUxvdywgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIC8vIFRoaXMgZnVuY3Rpb24gdGVybWluYXRlcyB3aGVuIG9uZSBvZiB0aGUgZm9sbG93aW5nIGlzIHRydWU6XG4gIC8vXG4gIC8vICAgMS4gV2UgZmluZCB0aGUgZXhhY3QgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gIC8vXG4gIC8vICAgMi4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBidXQgd2UgY2FuIHJldHVybiB0aGUgaW5kZXggb2ZcbiAgLy8gICAgICB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQuXG4gIC8vXG4gIC8vICAgMy4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBhbmQgdGhlcmUgaXMgbm8gbmV4dC1jbG9zZXN0XG4gIC8vICAgICAgZWxlbWVudCB0aGFuIHRoZSBvbmUgd2UgYXJlIHNlYXJjaGluZyBmb3IsIHNvIHdlIHJldHVybiAtMS5cbiAgdmFyIG1pZCA9IE1hdGguZmxvb3IoKGFIaWdoIC0gYUxvdykgLyAyKSArIGFMb3c7XG4gIHZhciBjbXAgPSBhQ29tcGFyZShhTmVlZGxlLCBhSGF5c3RhY2tbbWlkXSwgdHJ1ZSk7XG4gIGlmIChjbXAgPT09IDApIHtcbiAgICAvLyBGb3VuZCB0aGUgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gICAgcmV0dXJuIG1pZDtcbiAgfVxuICBlbHNlIGlmIChjbXAgPiAwKSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBncmVhdGVyIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKGFIaWdoIC0gbWlkID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIHVwcGVyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKG1pZCwgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKTtcbiAgICB9XG5cbiAgICAvLyBUaGUgZXhhY3QgbmVlZGxlIGVsZW1lbnQgd2FzIG5vdCBmb3VuZCBpbiB0aGlzIGhheXN0YWNrLiBEZXRlcm1pbmUgaWZcbiAgICAvLyB3ZSBhcmUgaW4gdGVybWluYXRpb24gY2FzZSAoMykgb3IgKDIpIGFuZCByZXR1cm4gdGhlIGFwcHJvcHJpYXRlIHRoaW5nLlxuICAgIGlmIChhQmlhcyA9PSBleHBvcnRzLkxFQVNUX1VQUEVSX0JPVU5EKSB7XG4gICAgICByZXR1cm4gYUhpZ2ggPCBhSGF5c3RhY2subGVuZ3RoID8gYUhpZ2ggOiAtMTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9XG4gIH1cbiAgZWxzZSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBsZXNzIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKG1pZCAtIGFMb3cgPiAxKSB7XG4gICAgICAvLyBUaGUgZWxlbWVudCBpcyBpbiB0aGUgbG93ZXIgaGFsZi5cbiAgICAgIHJldHVybiByZWN1cnNpdmVTZWFyY2goYUxvdywgbWlkLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFMb3cgPCAwID8gLTEgOiBhTG93O1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRoaXMgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYmluYXJ5IHNlYXJjaCB3aGljaCB3aWxsIGFsd2F5cyB0cnkgYW5kIHJldHVyblxuICogdGhlIGluZGV4IG9mIHRoZSBjbG9zZXN0IGVsZW1lbnQgaWYgdGhlcmUgaXMgbm8gZXhhY3QgaGl0LiBUaGlzIGlzIGJlY2F1c2VcbiAqIG1hcHBpbmdzIGJldHdlZW4gb3JpZ2luYWwgYW5kIGdlbmVyYXRlZCBsaW5lL2NvbCBwYWlycyBhcmUgc2luZ2xlIHBvaW50cyxcbiAqIGFuZCB0aGVyZSBpcyBhbiBpbXBsaWNpdCByZWdpb24gYmV0d2VlbiBlYWNoIG9mIHRoZW0sIHNvIGEgbWlzcyBqdXN0IG1lYW5zXG4gKiB0aGF0IHlvdSBhcmVuJ3Qgb24gdGhlIHZlcnkgc3RhcnQgb2YgYSByZWdpb24uXG4gKlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgeW91IGFyZSBsb29raW5nIGZvci5cbiAqIEBwYXJhbSBhSGF5c3RhY2sgVGhlIGFycmF5IHRoYXQgaXMgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgQSBmdW5jdGlvbiB3aGljaCB0YWtlcyB0aGUgbmVlZGxlIGFuZCBhbiBlbGVtZW50IGluIHRoZVxuICogICAgIGFycmF5IGFuZCByZXR1cm5zIC0xLCAwLCBvciAxIGRlcGVuZGluZyBvbiB3aGV0aGVyIHRoZSBuZWVkbGUgaXMgbGVzc1xuICogICAgIHRoYW4sIGVxdWFsIHRvLCBvciBncmVhdGVyIHRoYW4gdGhlIGVsZW1lbnQsIHJlc3BlY3RpdmVseS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJy5cbiAqL1xuZXhwb3J0cy5zZWFyY2ggPSBmdW5jdGlvbiBzZWFyY2goYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpIHtcbiAgaWYgKGFIYXlzdGFjay5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICB2YXIgaW5kZXggPSByZWN1cnNpdmVTZWFyY2goLTEsIGFIYXlzdGFjay5sZW5ndGgsIGFOZWVkbGUsIGFIYXlzdGFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFDb21wYXJlLCBhQmlhcyB8fCBleHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EKTtcbiAgaWYgKGluZGV4IDwgMCkge1xuICAgIHJldHVybiAtMTtcbiAgfVxuXG4gIC8vIFdlIGhhdmUgZm91bmQgZWl0aGVyIHRoZSBleGFjdCBlbGVtZW50LCBvciB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQgdGhhblxuICAvLyB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLiBIb3dldmVyLCB0aGVyZSBtYXkgYmUgbW9yZSB0aGFuIG9uZSBzdWNoXG4gIC8vIGVsZW1lbnQuIE1ha2Ugc3VyZSB3ZSBhbHdheXMgcmV0dXJuIHRoZSBzbWFsbGVzdCBvZiB0aGVzZS5cbiAgd2hpbGUgKGluZGV4IC0gMSA+PSAwKSB7XG4gICAgaWYgKGFDb21wYXJlKGFIYXlzdGFja1tpbmRleF0sIGFIYXlzdGFja1tpbmRleCAtIDFdLCB0cnVlKSAhPT0gMCkge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICAgIC0taW5kZXg7XG4gIH1cblxuICByZXR1cm4gaW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbi8vIEl0IHR1cm5zIG91dCB0aGF0IHNvbWUgKG1vc3Q/KSBKYXZhU2NyaXB0IGVuZ2luZXMgZG9uJ3Qgc2VsZi1ob3N0XG4vLyBgQXJyYXkucHJvdG90eXBlLnNvcnRgLiBUaGlzIG1ha2VzIHNlbnNlIGJlY2F1c2UgQysrIHdpbGwgbGlrZWx5IHJlbWFpblxuLy8gZmFzdGVyIHRoYW4gSlMgd2hlbiBkb2luZyByYXcgQ1BVLWludGVuc2l2ZSBzb3J0aW5nLiBIb3dldmVyLCB3aGVuIHVzaW5nIGFcbi8vIGN1c3RvbSBjb21wYXJhdG9yIGZ1bmN0aW9uLCBjYWxsaW5nIGJhY2sgYW5kIGZvcnRoIGJldHdlZW4gdGhlIFZNJ3MgQysrIGFuZFxuLy8gSklUJ2QgSlMgaXMgcmF0aGVyIHNsb3cgKmFuZCogbG9zZXMgSklUIHR5cGUgaW5mb3JtYXRpb24sIHJlc3VsdGluZyBpblxuLy8gd29yc2UgZ2VuZXJhdGVkIGNvZGUgZm9yIHRoZSBjb21wYXJhdG9yIGZ1bmN0aW9uIHRoYW4gd291bGQgYmUgb3B0aW1hbC4gSW5cbi8vIGZhY3QsIHdoZW4gc29ydGluZyB3aXRoIGEgY29tcGFyYXRvciwgdGhlc2UgY29zdHMgb3V0d2VpZ2ggdGhlIGJlbmVmaXRzIG9mXG4vLyBzb3J0aW5nIGluIEMrKy4gQnkgdXNpbmcgb3VyIG93biBKUy1pbXBsZW1lbnRlZCBRdWljayBTb3J0IChiZWxvdyksIHdlIGdldFxuLy8gYSB+MzUwMG1zIG1lYW4gc3BlZWQtdXAgaW4gYGJlbmNoL2JlbmNoLmh0bWxgLlxuXG4vKipcbiAqIFN3YXAgdGhlIGVsZW1lbnRzIGluZGV4ZWQgYnkgYHhgIGFuZCBgeWAgaW4gdGhlIGFycmF5IGBhcnlgLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIFRoZSBhcnJheS5cbiAqIEBwYXJhbSB7TnVtYmVyfSB4XG4gKiAgICAgICAgVGhlIGluZGV4IG9mIHRoZSBmaXJzdCBpdGVtLlxuICogQHBhcmFtIHtOdW1iZXJ9IHlcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIHNlY29uZCBpdGVtLlxuICovXG5mdW5jdGlvbiBzd2FwKGFyeSwgeCwgeSkge1xuICB2YXIgdGVtcCA9IGFyeVt4XTtcbiAgYXJ5W3hdID0gYXJ5W3ldO1xuICBhcnlbeV0gPSB0ZW1wO1xufVxuXG4vKipcbiAqIFJldHVybnMgYSByYW5kb20gaW50ZWdlciB3aXRoaW4gdGhlIHJhbmdlIGBsb3cgLi4gaGlnaGAgaW5jbHVzaXZlLlxuICpcbiAqIEBwYXJhbSB7TnVtYmVyfSBsb3dcbiAqICAgICAgICBUaGUgbG93ZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICogQHBhcmFtIHtOdW1iZXJ9IGhpZ2hcbiAqICAgICAgICBUaGUgdXBwZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICovXG5mdW5jdGlvbiByYW5kb21JbnRJblJhbmdlKGxvdywgaGlnaCkge1xuICByZXR1cm4gTWF0aC5yb3VuZChsb3cgKyAoTWF0aC5yYW5kb20oKSAqIChoaWdoIC0gbG93KSkpO1xufVxuXG4vKipcbiAqIFRoZSBRdWljayBTb3J0IGFsZ29yaXRobS5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnlcbiAqICAgICAgICBBbiBhcnJheSB0byBzb3J0LlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY29tcGFyYXRvclxuICogICAgICAgIEZ1bmN0aW9uIHRvIHVzZSB0byBjb21wYXJlIHR3byBpdGVtcy5cbiAqIEBwYXJhbSB7TnVtYmVyfSBwXG4gKiAgICAgICAgU3RhcnQgaW5kZXggb2YgdGhlIGFycmF5XG4gKiBAcGFyYW0ge051bWJlcn0gclxuICogICAgICAgIEVuZCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqL1xuZnVuY3Rpb24gZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCByKSB7XG4gIC8vIElmIG91ciBsb3dlciBib3VuZCBpcyBsZXNzIHRoYW4gb3VyIHVwcGVyIGJvdW5kLCB3ZSAoMSkgcGFydGl0aW9uIHRoZVxuICAvLyBhcnJheSBpbnRvIHR3byBwaWVjZXMgYW5kICgyKSByZWN1cnNlIG9uIGVhY2ggaGFsZi4gSWYgaXQgaXMgbm90LCB0aGlzIGlzXG4gIC8vIHRoZSBlbXB0eSBhcnJheSBhbmQgb3VyIGJhc2UgY2FzZS5cblxuICBpZiAocCA8IHIpIHtcbiAgICAvLyAoMSkgUGFydGl0aW9uaW5nLlxuICAgIC8vXG4gICAgLy8gVGhlIHBhcnRpdGlvbmluZyBjaG9vc2VzIGEgcGl2b3QgYmV0d2VlbiBgcGAgYW5kIGByYCBhbmQgbW92ZXMgYWxsXG4gICAgLy8gZWxlbWVudHMgdGhhdCBhcmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdCB0byB0aGUgYmVmb3JlIGl0LCBhbmRcbiAgICAvLyBhbGwgdGhlIGVsZW1lbnRzIHRoYXQgYXJlIGdyZWF0ZXIgdGhhbiBpdCBhZnRlciBpdC4gVGhlIGVmZmVjdCBpcyB0aGF0XG4gICAgLy8gb25jZSBwYXJ0aXRpb24gaXMgZG9uZSwgdGhlIHBpdm90IGlzIGluIHRoZSBleGFjdCBwbGFjZSBpdCB3aWxsIGJlIHdoZW5cbiAgICAvLyB0aGUgYXJyYXkgaXMgcHV0IGluIHNvcnRlZCBvcmRlciwgYW5kIGl0IHdpbGwgbm90IG5lZWQgdG8gYmUgbW92ZWRcbiAgICAvLyBhZ2Fpbi4gVGhpcyBydW5zIGluIE8obikgdGltZS5cblxuICAgIC8vIEFsd2F5cyBjaG9vc2UgYSByYW5kb20gcGl2b3Qgc28gdGhhdCBhbiBpbnB1dCBhcnJheSB3aGljaCBpcyByZXZlcnNlXG4gICAgLy8gc29ydGVkIGRvZXMgbm90IGNhdXNlIE8obl4yKSBydW5uaW5nIHRpbWUuXG4gICAgdmFyIHBpdm90SW5kZXggPSByYW5kb21JbnRJblJhbmdlKHAsIHIpO1xuICAgIHZhciBpID0gcCAtIDE7XG5cbiAgICBzd2FwKGFyeSwgcGl2b3RJbmRleCwgcik7XG4gICAgdmFyIHBpdm90ID0gYXJ5W3JdO1xuXG4gICAgLy8gSW1tZWRpYXRlbHkgYWZ0ZXIgYGpgIGlzIGluY3JlbWVudGVkIGluIHRoaXMgbG9vcCwgdGhlIGZvbGxvd2luZyBob2xkXG4gICAgLy8gdHJ1ZTpcbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbcCAuLiBpXWAgaXMgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdC5cbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbaSsxIC4uIGotMV1gIGlzIGdyZWF0ZXIgdGhhbiB0aGUgcGl2b3QuXG4gICAgZm9yICh2YXIgaiA9IHA7IGogPCByOyBqKyspIHtcbiAgICAgIGlmIChjb21wYXJhdG9yKGFyeVtqXSwgcGl2b3QpIDw9IDApIHtcbiAgICAgICAgaSArPSAxO1xuICAgICAgICBzd2FwKGFyeSwgaSwgaik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dhcChhcnksIGkgKyAxLCBqKTtcbiAgICB2YXIgcSA9IGkgKyAxO1xuXG4gICAgLy8gKDIpIFJlY3Vyc2Ugb24gZWFjaCBoYWxmLlxuXG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCBxIC0gMSk7XG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBxICsgMSwgcik7XG4gIH1cbn1cblxuLyoqXG4gKiBTb3J0IHRoZSBnaXZlbiBhcnJheSBpbi1wbGFjZSB3aXRoIHRoZSBnaXZlbiBjb21wYXJhdG9yIGZ1bmN0aW9uLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICovXG5leHBvcnRzLnF1aWNrU29ydCA9IGZ1bmN0aW9uIChhcnksIGNvbXBhcmF0b3IpIHtcbiAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCAwLCBhcnkubGVuZ3RoIC0gMSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvcXVpY2stc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgYWNjZXNzZWQgYnkgY2FsbGluZyBgc2hpZnROZXh0TGluZWAuXG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzID0gYUdlbmVyYXRlZENvZGUuc3BsaXQoUkVHRVhfTkVXTElORSk7XG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzSW5kZXggPSAwO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gZ2V0TmV4dExpbmUoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gZ2V0TmV4dExpbmUoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG5cbiAgICAgIGZ1bmN0aW9uIGdldE5leHRMaW5lKCkge1xuICAgICAgICByZXR1cm4gcmVtYWluaW5nTGluZXNJbmRleCA8IHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA/XG4gICAgICAgICAgICByZW1haW5pbmdMaW5lc1tyZW1haW5pbmdMaW5lc0luZGV4KytdIDogdW5kZWZpbmVkO1xuICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBXZSBuZWVkIHRvIHJlbWVtYmVyIHRoZSBwb3NpdGlvbiBvZiBcInJlbWFpbmluZ0xpbmVzXCJcbiAgICB2YXIgbGFzdEdlbmVyYXRlZExpbmUgPSAxLCBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcblxuICAgIC8vIFRoZSBnZW5lcmF0ZSBTb3VyY2VOb2RlcyB3ZSBuZWVkIGEgY29kZSByYW5nZS5cbiAgICAvLyBUbyBleHRyYWN0IGl0IGN1cnJlbnQgYW5kIGxhc3QgbWFwcGluZyBpcyB1c2VkLlxuICAgIC8vIEhlcmUgd2Ugc3RvcmUgdGhlIGxhc3QgbWFwcGluZy5cbiAgICB2YXIgbGFzdE1hcHBpbmcgPSBudWxsO1xuXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcgIT09IG51bGwpIHtcbiAgICAgICAgLy8gV2UgYWRkIHRoZSBjb2RlIGZyb20gXCJsYXN0TWFwcGluZ1wiIHRvIFwibWFwcGluZ1wiOlxuICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGVyZSBpcyBhIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgIGlmIChsYXN0R2VuZXJhdGVkTGluZSA8IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgIC8vIEFzc29jaWF0ZSBmaXJzdCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgICAgICAgLy8gVGhlIHJlbWFpbmluZyBjb2RlIGlzIGFkZGVkIHdpdGhvdXQgbWFwcGluZ1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSBjb2RlIGJldHdlZW4gXCJsYXN0R2VuZXJhdGVkQ29sdW1uXCIgYW5kXG4gICAgICAgICAgLy8gXCJtYXBwaW5nLmdlbmVyYXRlZENvbHVtblwiIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF07XG4gICAgICAgICAgdmFyIGNvZGUgPSBuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdID0gbmV4dExpbmUuc3Vic3RyKG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBjb2RlKTtcbiAgICAgICAgICAvLyBObyBtb3JlIHJlbWFpbmluZyBjb2RlLCBjb250aW51ZVxuICAgICAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIFdlIGFkZCB0aGUgZ2VuZXJhdGVkIGNvZGUgdW50aWwgdGhlIGZpcnN0IG1hcHBpbmdcbiAgICAgIC8vIHRvIHRoZSBTb3VyY2VOb2RlIHdpdGhvdXQgYW55IG1hcHBpbmcuXG4gICAgICAvLyBFYWNoIGxpbmUgaXMgYWRkZWQgYXMgc2VwYXJhdGUgc3RyaW5nLlxuICAgICAgd2hpbGUgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIG5vZGUuYWRkKHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICB9XG4gICAgICBpZiAobGFzdEdlbmVyYXRlZENvbHVtbiA8IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uKSB7XG4gICAgICAgIHZhciBuZXh0TGluZSA9IHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdO1xuICAgICAgICBub2RlLmFkZChuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pKTtcbiAgICAgICAgcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICB9XG4gICAgICBsYXN0TWFwcGluZyA9IG1hcHBpbmc7XG4gICAgfSwgdGhpcyk7XG4gICAgLy8gV2UgaGF2ZSBwcm9jZXNzZWQgYWxsIG1hcHBpbmdzLlxuICAgIGlmIChyZW1haW5pbmdMaW5lc0luZGV4IDwgcmVtYWluaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcpIHtcbiAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSByZW1haW5pbmcgY29kZSBpbiB0aGUgY3VycmVudCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgIH1cbiAgICAgIC8vIGFuZCBhZGQgdGhlIHJlbWFpbmluZyBsaW5lcyB3aXRob3V0IGFueSBtYXBwaW5nXG4gICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5zcGxpY2UocmVtYWluaW5nTGluZXNJbmRleCkuam9pbihcIlwiKSk7XG4gICAgfVxuXG4gICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhpcyBzb3VyY2Ugbm9kZS5cbiAqXG4gKiBAcGFyYW0gYUNodW5rIEEgc3RyaW5nIHNuaXBwZXQgb2YgZ2VuZXJhdGVkIEpTIGNvZGUsIGFub3RoZXIgaW5zdGFuY2Ugb2ZcbiAqICAgICAgICBTb3VyY2VOb2RlLCBvciBhbiBhcnJheSB3aGVyZSBlYWNoIG1lbWJlciBpcyBvbmUgb2YgdGhvc2UgdGhpbmdzLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5wcmVwZW5kID0gZnVuY3Rpb24gU291cmNlTm9kZV9wcmVwZW5kKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgZm9yICh2YXIgaSA9IGFDaHVuay5sZW5ndGgtMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHRoaXMucHJlcGVuZChhQ2h1bmtbaV0pO1xuICAgIH1cbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgdGhpcy5jaGlsZHJlbi51bnNoaWZ0KGFDaHVuayk7XG4gIH1cbiAgZWxzZSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgIFwiRXhwZWN0ZWQgYSBTb3VyY2VOb2RlLCBzdHJpbmcsIG9yIGFuIGFycmF5IG9mIFNvdXJjZU5vZGVzIGFuZCBzdHJpbmdzLiBHb3QgXCIgKyBhQ2h1bmtcbiAgICApO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBXYWxrIG92ZXIgdGhlIHRyZWUgb2YgSlMgc25pcHBldHMgaW4gdGhpcyBub2RlIGFuZCBpdHMgY2hpbGRyZW4uIFRoZVxuICogd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgb25jZSBmb3IgZWFjaCBzbmlwcGV0IG9mIEpTIGFuZCBpcyBwYXNzZWQgdGhhdFxuICogc25pcHBldCBhbmQgdGhlIGl0cyBvcmlnaW5hbCBhc3NvY2lhdGVkIHNvdXJjZSdzIGxpbmUvY29sdW1uIGxvY2F0aW9uLlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2FsayA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2FsayhhRm4pIHtcbiAgdmFyIGNodW5rO1xuICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIGNodW5rID0gdGhpcy5jaGlsZHJlbltpXTtcbiAgICBpZiAoY2h1bmtbaXNTb3VyY2VOb2RlXSkge1xuICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgYUZuKGNodW5rLCB7IHNvdXJjZTogdGhpcy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICBsaW5lOiB0aGlzLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuLyoqXG4gKiBMaWtlIGBTdHJpbmcucHJvdG90eXBlLmpvaW5gIGV4Y2VwdCBmb3IgU291cmNlTm9kZXMuIEluc2VydHMgYGFTdHJgIGJldHdlZW5cbiAqIGVhY2ggb2YgYHRoaXMuY2hpbGRyZW5gLlxuICpcbiAqIEBwYXJhbSBhU2VwIFRoZSBzZXBhcmF0b3IuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICB2YXIgbmV3Q2hpbGRyZW47XG4gIHZhciBpO1xuICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gIGlmIChsZW4gPiAwKSB7XG4gICAgbmV3Q2hpbGRyZW4gPSBbXTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuLTE7IGkrKykge1xuICAgICAgbmV3Q2hpbGRyZW4ucHVzaCh0aGlzLmNoaWxkcmVuW2ldKTtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2goYVNlcCk7XG4gICAgfVxuICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgdGhpcy5jaGlsZHJlbiA9IG5ld0NoaWxkcmVuO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBDYWxsIFN0cmluZy5wcm90b3R5cGUucmVwbGFjZSBvbiB0aGUgdmVyeSByaWdodC1tb3N0IHNvdXJjZSBzbmlwcGV0LiBVc2VmdWxcbiAqIGZvciB0cmltbWluZyB3aGl0ZXNwYWNlIGZyb20gdGhlIGVuZCBvZiBhIHNvdXJjZSBub2RlLCBldGMuXG4gKlxuICogQHBhcmFtIGFQYXR0ZXJuIFRoZSBwYXR0ZXJuIHRvIHJlcGxhY2UuXG4gKiBAcGFyYW0gYVJlcGxhY2VtZW50IFRoZSB0aGluZyB0byByZXBsYWNlIHRoZSBwYXR0ZXJuIHdpdGguXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnJlcGxhY2VSaWdodCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcmVwbGFjZVJpZ2h0KGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpIHtcbiAgdmFyIGxhc3RDaGlsZCA9IHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXTtcbiAgaWYgKGxhc3RDaGlsZFtpc1NvdXJjZU5vZGVdKSB7XG4gICAgbGFzdENoaWxkLnJlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIGlmICh0eXBlb2YgbGFzdENoaWxkID09PSAnc3RyaW5nJykge1xuICAgIHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXSA9IGxhc3RDaGlsZC5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpO1xuICB9XG4gIGVsc2Uge1xuICAgIHRoaXMuY2hpbGRyZW4ucHVzaCgnJy5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS4gVGhpcyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3JcbiAqIGluIHRoZSBzb3VyY2VzQ29udGVudCBmaWVsZC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZVxuICogQHBhcmFtIGFTb3VyY2VDb250ZW50IFRoZSBjb250ZW50IG9mIHRoZSBzb3VyY2UgZmlsZVxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHRoaXMuc291cmNlQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhhU291cmNlRmlsZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gIH07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIFNvdXJjZU5vZGVzLiBUaGUgd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgZm9yIGVhY2hcbiAqIHNvdXJjZSBmaWxlIGNvbnRlbnQgYW5kIGlzIHBhc3NlZCB0aGUgZmlsZW5hbWUgYW5kIHNvdXJjZSBjb250ZW50LlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2Fsa1NvdXJjZUNvbnRlbnRzID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV93YWxrU291cmNlQ29udGVudHMoYUZuKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgIGlmICh0aGlzLmNoaWxkcmVuW2ldW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgdGhpcy5jaGlsZHJlbltpXS53YWxrU291cmNlQ29udGVudHMoYUZuKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgc291cmNlcyA9IE9iamVjdC5rZXlzKHRoaXMuc291cmNlQ29udGVudHMpO1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBhRm4odXRpbC5mcm9tU2V0U3RyaW5nKHNvdXJjZXNbaV0pLCB0aGlzLnNvdXJjZUNvbnRlbnRzW3NvdXJjZXNbaV1dKTtcbiAgICB9XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZS4gV2Fsa3Mgb3ZlciB0aGUgdHJlZVxuICogYW5kIGNvbmNhdGVuYXRlcyBhbGwgdGhlIHZhcmlvdXMgc25pcHBldHMgdG9nZXRoZXIgdG8gb25lIHN0cmluZy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3RvU3RyaW5nKCkge1xuICB2YXIgc3RyID0gXCJcIjtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaykge1xuICAgIHN0ciArPSBjaHVuaztcbiAgfSk7XG4gIHJldHVybiBzdHI7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNvdXJjZSBub2RlIGFsb25nIHdpdGggYSBzb3VyY2VcbiAqIG1hcC5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmdXaXRoU291cmNlTWFwID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZ1dpdGhTb3VyY2VNYXAoYUFyZ3MpIHtcbiAgdmFyIGdlbmVyYXRlZCA9IHtcbiAgICBjb2RlOiBcIlwiLFxuICAgIGxpbmU6IDEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHZhciBtYXAgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKTtcbiAgdmFyIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgdmFyIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxMaW5lID0gbnVsbDtcbiAgdmFyIGxhc3RPcmlnaW5hbENvbHVtbiA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxOYW1lID0gbnVsbDtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaywgb3JpZ2luYWwpIHtcbiAgICBnZW5lcmF0ZWQuY29kZSArPSBjaHVuaztcbiAgICBpZiAob3JpZ2luYWwuc291cmNlICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmxpbmUgIT09IG51bGxcbiAgICAgICAgJiYgb3JpZ2luYWwuY29sdW1uICE9PSBudWxsKSB7XG4gICAgICBpZihsYXN0T3JpZ2luYWxTb3VyY2UgIT09IG9yaWdpbmFsLnNvdXJjZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsTGluZSAhPT0gb3JpZ2luYWwubGluZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsQ29sdW1uICE9PSBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbE5hbWUgIT09IG9yaWdpbmFsLm5hbWUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgIGxhc3RPcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgIGxhc3RPcmlnaW5hbE5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICBtYXAuYWRkTWFwcGluZyh7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.js b/node_modules/source-map/dist/source-map.js new file mode 100644 index 0000000..4e630e2 --- /dev/null +++ b/node_modules/source-map/dist/source-map.js @@ -0,0 +1,3090 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // 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] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = 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; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + 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.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + 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) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.min.js b/node_modules/source-map/dist/source-map.min.js new file mode 100644 index 0000000..f2a46bd --- /dev/null +++ b/node_modules/source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)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.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\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\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t 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\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\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\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\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\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t 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\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.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\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\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\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction 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\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\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\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\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 // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\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\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\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\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\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\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.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.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\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 ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\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\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\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\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\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(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\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\t\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\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\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\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t 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\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\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\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\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\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\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 // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\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\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\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\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t 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\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\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\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\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 }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\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\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\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\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\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\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(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\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\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\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\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\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.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 }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.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 }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { 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\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t 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\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.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\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.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(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\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || 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\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\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\t // Mappings end at eol\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\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\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\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/source-map/lib/array-set.js b/node_modules/source-map/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/node_modules/source-map/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/source-map/lib/base64-vlq.js b/node_modules/source-map/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/source-map/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/source-map/lib/base64.js b/node_modules/source-map/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/source-map/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/source-map/lib/binary-search.js b/node_modules/source-map/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/source-map/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/source-map/lib/mapping-list.js b/node_modules/source-map/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/source-map/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/source-map/lib/quick-sort.js b/node_modules/source-map/lib/quick-sort.js new file mode 100644 index 0000000..6a7caad --- /dev/null +++ b/node_modules/source-map/lib/quick-sort.js @@ -0,0 +1,114 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; diff --git a/node_modules/source-map/lib/source-map-consumer.js b/node_modules/source-map/lib/source-map-consumer.js new file mode 100644 index 0000000..6abcc28 --- /dev/null +++ b/node_modules/source-map/lib/source-map-consumer.js @@ -0,0 +1,1082 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map/lib/source-map-generator.js b/node_modules/source-map/lib/source-map-generator.js new file mode 100644 index 0000000..aff1e7f --- /dev/null +++ b/node_modules/source-map/lib/source-map-generator.js @@ -0,0 +1,416 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + 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.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + 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) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map/lib/source-node.js b/node_modules/source-map/lib/source-node.js new file mode 100644 index 0000000..d196a53 --- /dev/null +++ b/node_modules/source-map/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/source-map/lib/util.js b/node_modules/source-map/lib/util.js new file mode 100644 index 0000000..44e0e45 --- /dev/null +++ b/node_modules/source-map/lib/util.js @@ -0,0 +1,417 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +} +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/source-map/package.json b/node_modules/source-map/package.json new file mode 100644 index 0000000..048e3ae --- /dev/null +++ b/node_modules/source-map/package.json @@ -0,0 +1,72 @@ +{ + "name": "source-map", + "description": "Generates and consumes source maps", + "version": "0.5.7", + "homepage": "https://github.com/mozilla/source-map", + "author": "Nick Fitzgerald ", + "contributors": [ + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": { + "type": "git", + "url": "http://github.com/mozilla/source-map.git" + }, + "main": "./source-map.js", + "files": [ + "source-map.js", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "typings": "source-map" +} diff --git a/node_modules/source-map/source-map.js b/node_modules/source-map/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/spdx-correct/LICENSE b/node_modules/spdx-correct/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/spdx-correct/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/spdx-correct/README.md b/node_modules/spdx-correct/README.md new file mode 100644 index 0000000..af563d8 --- /dev/null +++ b/node_modules/spdx-correct/README.md @@ -0,0 +1,22 @@ +## Usage + +```javascript +var correct = require('spdx-correct') +var assert = require('assert') + +assert.strictEqual(correct('mit'), 'MIT') + +assert.strictEqual(correct('Apache 2'), 'Apache-2.0') + +assert(correct('No idea what license') === null) + +// disable upgrade option +assert(correct('GPL-3.0'), 'GPL-3.0-or-later') +assert(correct('GPL-3.0', { upgrade: false }), 'GPL-3.0') +``` + +## Contributors + +spdx-correct has benefited from the work of several contributors. +See [the GitHub repository](https://github.com/jslicense/spdx-correct.js/graphs/contributors) +for more information. diff --git a/node_modules/spdx-correct/index.js b/node_modules/spdx-correct/index.js new file mode 100644 index 0000000..4d9037e --- /dev/null +++ b/node_modules/spdx-correct/index.js @@ -0,0 +1,386 @@ +/* +Copyright spdx-correct.js contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +var parse = require('spdx-expression-parse') +var spdxLicenseIds = require('spdx-license-ids') + +function valid (string) { + try { + parse(string) + return true + } catch (error) { + return false + } +} + +// Sorting function that orders the given array of transpositions such +// that a transposition with the longer pattern comes before a transposition +// with a shorter pattern. This is to prevent e.g. the transposition +// ["General Public License", "GPL"] from matching to "Lesser General Public License" +// before a longer and more accurate transposition ["Lesser General Public License", "LGPL"] +// has a chance to be recognized. +function sortTranspositions(a, b) { + var length = b[0].length - a[0].length + if (length !== 0) return length + return a[0].toUpperCase().localeCompare(b[0].toUpperCase()) +} + +// Common transpositions of license identifier acronyms +var transpositions = [ + ['APGL', 'AGPL'], + ['Gpl', 'GPL'], + ['GLP', 'GPL'], + ['APL', 'Apache'], + ['ISD', 'ISC'], + ['GLP', 'GPL'], + ['IST', 'ISC'], + ['Claude', 'Clause'], + [' or later', '+'], + [' International', ''], + ['GNU', 'GPL'], + ['GUN', 'GPL'], + ['+', ''], + ['GNU GPL', 'GPL'], + ['GNU LGPL', 'LGPL'], + ['GNU/GPL', 'GPL'], + ['GNU GLP', 'GPL'], + ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL'], + ['GNU Lesser General Public License', 'LGPL'], + ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], + ['GNU Lesser General Public License', 'LGPL-2.1'], + ['LESSER GENERAL PUBLIC LICENSE', 'LGPL'], + ['Lesser General Public License', 'LGPL'], + ['LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], + ['Lesser General Public License', 'LGPL-2.1'], + ['GNU General Public License', 'GPL'], + ['Gnu public license', 'GPL'], + ['GNU Public License', 'GPL'], + ['GNU GENERAL PUBLIC LICENSE', 'GPL'], + ['MTI', 'MIT'], + ['Mozilla Public License', 'MPL'], + ['Universal Permissive License', 'UPL'], + ['WTH', 'WTF'], + ['WTFGPL', 'WTFPL'], + ['-License', ''] +].sort(sortTranspositions) + +var TRANSPOSED = 0 +var CORRECT = 1 + +// Simple corrections to nearly valid identifiers. +var transforms = [ + // e.g. 'mit' + function (argument) { + return argument.toUpperCase() + }, + // e.g. 'MIT ' + function (argument) { + return argument.trim() + }, + // e.g. 'M.I.T.' + function (argument) { + return argument.replace(/\./g, '') + }, + // e.g. 'Apache- 2.0' + function (argument) { + return argument.replace(/\s+/g, '') + }, + // e.g. 'CC BY 4.0'' + function (argument) { + return argument.replace(/\s+/g, '-') + }, + // e.g. 'LGPLv2.1' + function (argument) { + return argument.replace('v', '-') + }, + // e.g. 'Apache 2.0' + function (argument) { + return argument.replace(/,?\s*(\d)/, '-$1') + }, + // e.g. 'GPL 2' + function (argument) { + return argument.replace(/,?\s*(\d)/, '-$1.0') + }, + // e.g. 'Apache Version 2.0' + function (argument) { + return argument + .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2') + }, + // e.g. 'Apache Version 2' + function (argument) { + return argument + .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0') + }, + // e.g. 'ZLIB' + function (argument) { + return argument[0].toUpperCase() + argument.slice(1) + }, + // e.g. 'MPL/2.0' + function (argument) { + return argument.replace('/', '-') + }, + // e.g. 'Apache 2' + function (argument) { + return argument + .replace(/\s*V\s*(\d)/, '-$1') + .replace(/(\d)$/, '$1.0') + }, + // e.g. 'GPL-2.0', 'GPL-3.0' + function (argument) { + if (argument.indexOf('3.0') !== -1) { + return argument + '-or-later' + } else { + return argument + '-only' + } + }, + // e.g. 'GPL-2.0-' + function (argument) { + return argument + 'only' + }, + // e.g. 'GPL2' + function (argument) { + return argument.replace(/(\d)$/, '-$1.0') + }, + // e.g. 'BSD 3' + function (argument) { + return argument.replace(/(-| )?(\d)$/, '-$2-Clause') + }, + // e.g. 'BSD clause 3' + function (argument) { + return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause') + }, + // e.g. 'New BSD license' + function (argument) { + return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, 'BSD-3-Clause') + }, + // e.g. 'Simplified BSD license' + function (argument) { + return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, 'BSD-2-Clause') + }, + // e.g. 'Free BSD license' + function (argument) { + return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, 'BSD-2-Clause-$1BSD') + }, + // e.g. 'Clear BSD license' + function (argument) { + return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, 'BSD-3-Clause-Clear') + }, + // e.g. 'Old BSD License' + function (argument) { + return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, 'BSD-4-Clause') + }, + // e.g. 'BY-NC-4.0' + function (argument) { + return 'CC-' + argument + }, + // e.g. 'BY-NC' + function (argument) { + return 'CC-' + argument + '-4.0' + }, + // e.g. 'Attribution-NonCommercial' + function (argument) { + return argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + }, + // e.g. 'Attribution-NonCommercial' + function (argument) { + return 'CC-' + + argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + + '-4.0' + } +] + +var licensesWithVersions = spdxLicenseIds + .map(function (id) { + var match = /^(.*)-\d+\.\d+$/.exec(id) + return match + ? [match[0], match[1]] + : [id, null] + }) + .reduce(function (objectMap, item) { + var key = item[1] + objectMap[key] = objectMap[key] || [] + objectMap[key].push(item[0]) + return objectMap + }, {}) + +var licensesWithOneVersion = Object.keys(licensesWithVersions) + .map(function makeEntries (key) { + return [key, licensesWithVersions[key]] + }) + .filter(function identifySoleVersions (item) { + return ( + // Licenses has just one valid version suffix. + item[1].length === 1 && + item[0] !== null && + // APL will be considered Apache, rather than APL-1.0 + item[0] !== 'APL' + ) + }) + .map(function createLastResorts (item) { + return [item[0], item[1][0]] + }) + +licensesWithVersions = undefined + +// If all else fails, guess that strings containing certain substrings +// meant to identify certain licenses. +var lastResorts = [ + ['UNLI', 'Unlicense'], + ['WTF', 'WTFPL'], + ['2 CLAUSE', 'BSD-2-Clause'], + ['2-CLAUSE', 'BSD-2-Clause'], + ['3 CLAUSE', 'BSD-3-Clause'], + ['3-CLAUSE', 'BSD-3-Clause'], + ['AFFERO', 'AGPL-3.0-or-later'], + ['AGPL', 'AGPL-3.0-or-later'], + ['APACHE', 'Apache-2.0'], + ['ARTISTIC', 'Artistic-2.0'], + ['Affero', 'AGPL-3.0-or-later'], + ['BEER', 'Beerware'], + ['BOOST', 'BSL-1.0'], + ['BSD', 'BSD-2-Clause'], + ['CDDL', 'CDDL-1.1'], + ['ECLIPSE', 'EPL-1.0'], + ['FUCK', 'WTFPL'], + ['GNU', 'GPL-3.0-or-later'], + ['LGPL', 'LGPL-3.0-or-later'], + ['GPLV1', 'GPL-1.0-only'], + ['GPL-1', 'GPL-1.0-only'], + ['GPLV2', 'GPL-2.0-only'], + ['GPL-2', 'GPL-2.0-only'], + ['GPL', 'GPL-3.0-or-later'], + ['MIT +NO-FALSE-ATTRIBS', 'MITNFA'], + ['MIT', 'MIT'], + ['MPL', 'MPL-2.0'], + ['X11', 'X11'], + ['ZLIB', 'Zlib'] +].concat(licensesWithOneVersion).sort(sortTranspositions) + +var SUBSTRING = 0 +var IDENTIFIER = 1 + +var validTransformation = function (identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier).trim() + if (transformed !== identifier && valid(transformed)) { + return transformed + } + } + return null +} + +var validLastResort = function (identifier) { + var upperCased = identifier.toUpperCase() + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i] + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER] + } + } + return null +} + +var anyCorrection = function (identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i] + var transposed = transposition[TRANSPOSED] + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace( + transposed, + transposition[CORRECT] + ) + var checked = check(corrected) + if (checked !== null) { + return checked + } + } + } + return null +} + +module.exports = function (identifier, options) { + options = options || {} + var upgrade = options.upgrade === undefined ? true : !!options.upgrade + function postprocess (value) { + return upgrade ? upgradeGPLs(value) : value + } + var validArugment = ( + typeof identifier === 'string' && + identifier.trim().length !== 0 + ) + if (!validArugment) { + throw Error('Invalid argument. Expected non-empty string.') + } + identifier = identifier.trim() + if (valid(identifier)) { + return postprocess(identifier) + } + var noPlus = identifier.replace(/\+$/, '').trim() + if (valid(noPlus)) { + return postprocess(noPlus) + } + var transformed = validTransformation(identifier) + if (transformed !== null) { + return postprocess(transformed) + } + transformed = anyCorrection(identifier, function (argument) { + if (valid(argument)) { + return argument + } + return validTransformation(argument) + }) + if (transformed !== null) { + return postprocess(transformed) + } + transformed = validLastResort(identifier) + if (transformed !== null) { + return postprocess(transformed) + } + transformed = anyCorrection(identifier, validLastResort) + if (transformed !== null) { + return postprocess(transformed) + } + return null +} + +function upgradeGPLs (value) { + if ([ + 'GPL-1.0', 'LGPL-1.0', 'AGPL-1.0', + 'GPL-2.0', 'LGPL-2.0', 'AGPL-2.0', + 'LGPL-2.1' + ].indexOf(value) !== -1) { + return value + '-only' + } else if ([ + 'GPL-1.0+', 'GPL-2.0+', 'GPL-3.0+', + 'LGPL-2.0+', 'LGPL-2.1+', 'LGPL-3.0+', + 'AGPL-1.0+', 'AGPL-3.0+' + ].indexOf(value) !== -1) { + return value.replace(/\+$/, '-or-later') + } else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) { + return value + '-or-later' + } else { + return value + } +} diff --git a/node_modules/spdx-correct/package.json b/node_modules/spdx-correct/package.json new file mode 100644 index 0000000..d776156 --- /dev/null +++ b/node_modules/spdx-correct/package.json @@ -0,0 +1,32 @@ +{ + "name": "spdx-correct", + "description": "correct invalid SPDX expressions", + "version": "3.2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + }, + "devDependencies": { + "defence-cli": "^3.0.1", + "replace-require-self": "^1.0.0", + "standard": "^14.3.4", + "standard-markdown": "^6.0.0", + "tape": "^5.0.1" + }, + "files": [ + "index.js" + ], + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata" + ], + "license": "Apache-2.0", + "repository": "jslicense/spdx-correct.js", + "scripts": { + "lint": "standard && standard-markdown README.md", + "test": "defence README.md | replace-require-self | node && node test.js" + } +} diff --git a/node_modules/spdx-exceptions/README.md b/node_modules/spdx-exceptions/README.md new file mode 100644 index 0000000..6c927ec --- /dev/null +++ b/node_modules/spdx-exceptions/README.md @@ -0,0 +1,36 @@ +The package exports an array of strings. Each string is an identifier +for a license exception under the [Software Package Data Exchange +(SPDX)][SPDX] software license metadata standard. + +[SPDX]: https://spdx.org + +## Copyright and Licensing + +### SPDX + +"SPDX" is a federally registered United States trademark of The Linux +Foundation Corporation. + +From version 2.0 of the [SPDX] specification: + +> Copyright © 2010-2015 Linux Foundation and its Contributors. Licensed +> under the Creative Commons Attribution License 3.0 Unported. All other +> rights are expressly reserved. + +The Linux Foundation and the SPDX working groups are good people. Only +they decide what "SPDX" means, as a standard and otherwise. I respect +their work and their rights. You should, too. + +### This Package + +> I created this package by copying exception identifiers out of the +> SPDX specification. That work was mechanical, routine, and required no +> creativity whatsoever. - Kyle Mitchell, package author + +United States users concerned about intellectual property may wish to +discuss the following Supreme Court decisions with their attorneys: + +- _Baker v. Selden_, 101 U.S. 99 (1879) + +- _Feist Publications, Inc., v. Rural Telephone Service Co._, + 499 U.S. 340 (1991) diff --git a/node_modules/spdx-exceptions/deprecated.json b/node_modules/spdx-exceptions/deprecated.json new file mode 100644 index 0000000..cba7e2b --- /dev/null +++ b/node_modules/spdx-exceptions/deprecated.json @@ -0,0 +1,3 @@ +[ + "Nokia-Qt-exception-1.1" +] diff --git a/node_modules/spdx-exceptions/index.json b/node_modules/spdx-exceptions/index.json new file mode 100644 index 0000000..d9549d3 --- /dev/null +++ b/node_modules/spdx-exceptions/index.json @@ -0,0 +1,68 @@ +[ + "389-exception", + "Asterisk-exception", + "Autoconf-exception-2.0", + "Autoconf-exception-3.0", + "Autoconf-exception-generic", + "Autoconf-exception-generic-3.0", + "Autoconf-exception-macro", + "Bison-exception-1.24", + "Bison-exception-2.2", + "Bootloader-exception", + "Classpath-exception-2.0", + "CLISP-exception-2.0", + "cryptsetup-OpenSSL-exception", + "DigiRule-FOSS-exception", + "eCos-exception-2.0", + "Fawkes-Runtime-exception", + "FLTK-exception", + "fmt-exception", + "Font-exception-2.0", + "freertos-exception-2.0", + "GCC-exception-2.0", + "GCC-exception-2.0-note", + "GCC-exception-3.1", + "Gmsh-exception", + "GNAT-exception", + "GNOME-examples-exception", + "GNU-compiler-exception", + "gnu-javamail-exception", + "GPL-3.0-interface-exception", + "GPL-3.0-linking-exception", + "GPL-3.0-linking-source-exception", + "GPL-CC-1.0", + "GStreamer-exception-2005", + "GStreamer-exception-2008", + "i2p-gpl-java-exception", + "KiCad-libraries-exception", + "LGPL-3.0-linking-exception", + "libpri-OpenH323-exception", + "Libtool-exception", + "Linux-syscall-note", + "LLGPL", + "LLVM-exception", + "LZMA-exception", + "mif-exception", + "OCaml-LGPL-linking-exception", + "OCCT-exception-1.0", + "OpenJDK-assembly-exception-1.0", + "openvpn-openssl-exception", + "PS-or-PDF-font-exception-20170817", + "QPL-1.0-INRIA-2004-exception", + "Qt-GPL-exception-1.0", + "Qt-LGPL-exception-1.1", + "Qwt-exception-1.0", + "SANE-exception", + "SHL-2.0", + "SHL-2.1", + "stunnel-exception", + "SWI-exception", + "Swift-exception", + "Texinfo-exception", + "u-boot-exception-2.0", + "UBDL-exception", + "Universal-FOSS-exception-1.0", + "vsftpd-openssl-exception", + "WxWindows-exception-3.1", + "x11vnc-openssl-exception" +] diff --git a/node_modules/spdx-exceptions/package.json b/node_modules/spdx-exceptions/package.json new file mode 100644 index 0000000..2f9a950 --- /dev/null +++ b/node_modules/spdx-exceptions/package.json @@ -0,0 +1,19 @@ +{ + "name": "spdx-exceptions", + "description": "list of SPDX standard license exceptions", + "version": "2.5.0", + "author": "The Linux Foundation", + "contributors": [ + "Kyle E. Mitchell (https://kemitchell.com/)" + ], + "license": "CC-BY-3.0", + "repository": "kemitchell/spdx-exceptions.json", + "files": [ + "index.json", + "deprecated.json" + ], + "scripts": { + "build": "node build.js", + "latest": "node latest.js" + } +} diff --git a/node_modules/spdx-expression-parse/AUTHORS b/node_modules/spdx-expression-parse/AUTHORS new file mode 100644 index 0000000..257a76b --- /dev/null +++ b/node_modules/spdx-expression-parse/AUTHORS @@ -0,0 +1,4 @@ +C. Scott Ananian (http://cscott.net) +Kyle E. Mitchell (https://kemitchell.com) +Shinnosuke Watanabe +Antoine Motet diff --git a/node_modules/spdx-expression-parse/LICENSE b/node_modules/spdx-expression-parse/LICENSE new file mode 100644 index 0000000..831618e --- /dev/null +++ b/node_modules/spdx-expression-parse/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/spdx-expression-parse/README.md b/node_modules/spdx-expression-parse/README.md new file mode 100644 index 0000000..9406462 --- /dev/null +++ b/node_modules/spdx-expression-parse/README.md @@ -0,0 +1,91 @@ +This package parses [SPDX license expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60) strings describing license terms, like [package.json license strings](https://docs.npmjs.com/files/package.json#license), into consistently structured ECMAScript objects. The npm command-line interface depends on this package, as do many automatic license-audit tools. + +In a nutshell: + +```javascript +var parse = require('spdx-expression-parse') +var assert = require('assert') + +assert.deepEqual( + // Licensed under the terms of the Two-Clause BSD License. + parse('BSD-2-Clause'), + {license: 'BSD-2-Clause'} +) + +assert.throws(function () { + // An invalid SPDX license expression. + // Should be `Apache-2.0`. + parse('Apache 2') +}) + +assert.deepEqual( + // Dual licensed under either: + // - LGPL 2.1 + // - a combination of Three-Clause BSD and MIT + parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'), + { + left: {license: 'LGPL-2.1'}, + conjunction: 'or', + right: { + left: {license: 'BSD-3-Clause'}, + conjunction: 'and', + right: {license: 'MIT'} + } + } +) +``` + +The syntax comes from the [Software Package Data eXchange (SPDX)](https://spdx.org/), a standard from the [Linux Foundation](https://www.linuxfoundation.org) for shareable data about software package license terms. SPDX aims to make sharing and auditing license data easy, especially for users of open-source software. + +The bulk of the SPDX standard describes syntax and semantics of XML metadata files. This package implements two lightweight, plain-text components of that larger standard: + +1. The [license list](https://spdx.org/licenses), a mapping from specific string identifiers, like `Apache-2.0`, to standard form license texts and bolt-on license exceptions. The [spdx-license-ids](https://www.npmjs.com/package/spdx-license-ids) and [spdx-exceptions](https://www.npmjs.com/package/spdx-exceptions) packages implement the license list. `spdx-expression-parse` depends on and `require()`s them. + + Any license identifier from the license list is a valid license expression: + + ```javascript + var identifiers = [] + .concat(require('spdx-license-ids')) + .concat(require('spdx-license-ids/deprecated')) + + identifiers.forEach(function (id) { + assert.deepEqual(parse(id), {license: id}) + }) + ``` + + So is any license identifier `WITH` a standardized license exception: + + ```javascript + identifiers.forEach(function (id) { + require('spdx-exceptions').forEach(function (e) { + assert.deepEqual( + parse(id + ' WITH ' + e), + {license: id, exception: e} + ) + }) + }) + ``` + +2. The license expression language, for describing simple and complex license terms, like `MIT` for MIT-licensed and `(GPL-2.0 OR Apache-2.0)` for dual-licensing under GPL 2.0 and Apache 2.0. `spdx-expression-parse` itself implements license expression language, exporting a parser. + + ```javascript + assert.deepEqual( + // Licensed under a combination of: + // - the MIT License AND + // - a combination of: + // - LGPL 2.1 (or a later version) AND + // - Three-Clause BSD + parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'), + { + left: {license: 'MIT'}, + conjunction: 'and', + right: { + left: {license: 'LGPL-2.1', plus: true}, + conjunction: 'and', + right: {license: 'BSD-3-Clause'} + } + } + ) + ``` + +The Linux Foundation and its contributors license the SPDX standard under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0")](http://spdx.org/licenses/CC-BY-3.0). "SPDX" is a United States federally registered trademark of the Linux Foundation. The authors of this package license their work under the terms of the MIT License. diff --git a/node_modules/spdx-expression-parse/index.js b/node_modules/spdx-expression-parse/index.js new file mode 100644 index 0000000..52fab56 --- /dev/null +++ b/node_modules/spdx-expression-parse/index.js @@ -0,0 +1,8 @@ +'use strict' + +var scan = require('./scan') +var parse = require('./parse') + +module.exports = function (source) { + return parse(scan(source)) +} diff --git a/node_modules/spdx-expression-parse/package.json b/node_modules/spdx-expression-parse/package.json new file mode 100644 index 0000000..c9edc9f --- /dev/null +++ b/node_modules/spdx-expression-parse/package.json @@ -0,0 +1,39 @@ +{ + "name": "spdx-expression-parse", + "description": "parse SPDX license expressions", + "version": "3.0.1", + "author": "Kyle E. Mitchell (https://kemitchell.com)", + "files": [ + "AUTHORS", + "index.js", + "parse.js", + "scan.js" + ], + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + }, + "devDependencies": { + "defence-cli": "^3.0.1", + "replace-require-self": "^1.0.0", + "standard": "^14.1.0" + }, + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata", + "package", + "package.json", + "standards" + ], + "license": "MIT", + "repository": "jslicense/spdx-expression-parse.js", + "scripts": { + "lint": "standard", + "test:readme": "defence -i javascript README.md | replace-require-self | node", + "test:suite": "node test.js", + "test": "npm run test:suite && npm run test:readme" + } +} diff --git a/node_modules/spdx-expression-parse/parse.js b/node_modules/spdx-expression-parse/parse.js new file mode 100644 index 0000000..5a00b45 --- /dev/null +++ b/node_modules/spdx-expression-parse/parse.js @@ -0,0 +1,138 @@ +'use strict' + +// The ABNF grammar in the spec is totally ambiguous. +// +// This parser follows the operator precedence defined in the +// `Order of Precedence and Parentheses` section. + +module.exports = function (tokens) { + var index = 0 + + function hasMore () { + return index < tokens.length + } + + function token () { + return hasMore() ? tokens[index] : null + } + + function next () { + if (!hasMore()) { + throw new Error() + } + index++ + } + + function parseOperator (operator) { + var t = token() + if (t && t.type === 'OPERATOR' && operator === t.string) { + next() + return t.string + } + } + + function parseWith () { + if (parseOperator('WITH')) { + var t = token() + if (t && t.type === 'EXCEPTION') { + next() + return t.string + } + throw new Error('Expected exception after `WITH`') + } + } + + function parseLicenseRef () { + // TODO: Actually, everything is concatenated into one string + // for backward-compatibility but it could be better to return + // a nice structure. + var begin = index + var string = '' + var t = token() + if (t.type === 'DOCUMENTREF') { + next() + string += 'DocumentRef-' + t.string + ':' + if (!parseOperator(':')) { + throw new Error('Expected `:` after `DocumentRef-...`') + } + } + t = token() + if (t.type === 'LICENSEREF') { + next() + string += 'LicenseRef-' + t.string + return { license: string } + } + index = begin + } + + function parseLicense () { + var t = token() + if (t && t.type === 'LICENSE') { + next() + var node = { license: t.string } + if (parseOperator('+')) { + node.plus = true + } + var exception = parseWith() + if (exception) { + node.exception = exception + } + return node + } + } + + function parseParenthesizedExpression () { + var left = parseOperator('(') + if (!left) { + return + } + + var expr = parseExpression() + + if (!parseOperator(')')) { + throw new Error('Expected `)`') + } + + return expr + } + + function parseAtom () { + return ( + parseParenthesizedExpression() || + parseLicenseRef() || + parseLicense() + ) + } + + function makeBinaryOpParser (operator, nextParser) { + return function parseBinaryOp () { + var left = nextParser() + if (!left) { + return + } + + if (!parseOperator(operator)) { + return left + } + + var right = parseBinaryOp() + if (!right) { + throw new Error('Expected expression') + } + return { + left: left, + conjunction: operator.toLowerCase(), + right: right + } + } + } + + var parseAnd = makeBinaryOpParser('AND', parseAtom) + var parseExpression = makeBinaryOpParser('OR', parseAnd) + + var node = parseExpression() + if (!node || hasMore()) { + throw new Error('Syntax error') + } + return node +} diff --git a/node_modules/spdx-expression-parse/scan.js b/node_modules/spdx-expression-parse/scan.js new file mode 100644 index 0000000..b74fce2 --- /dev/null +++ b/node_modules/spdx-expression-parse/scan.js @@ -0,0 +1,131 @@ +'use strict' + +var licenses = [] + .concat(require('spdx-license-ids')) + .concat(require('spdx-license-ids/deprecated')) +var exceptions = require('spdx-exceptions') + +module.exports = function (source) { + var index = 0 + + function hasMore () { + return index < source.length + } + + // `value` can be a regexp or a string. + // If it is recognized, the matching source string is returned and + // the index is incremented. Otherwise `undefined` is returned. + function read (value) { + if (value instanceof RegExp) { + var chars = source.slice(index) + var match = chars.match(value) + if (match) { + index += match[0].length + return match[0] + } + } else { + if (source.indexOf(value, index) === index) { + index += value.length + return value + } + } + } + + function skipWhitespace () { + read(/[ ]*/) + } + + function operator () { + var string + var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+'] + for (var i = 0; i < possibilities.length; i++) { + string = read(possibilities[i]) + if (string) { + break + } + } + + if (string === '+' && index > 1 && source[index - 2] === ' ') { + throw new Error('Space before `+`') + } + + return string && { + type: 'OPERATOR', + string: string + } + } + + function idstring () { + return read(/[A-Za-z0-9-.]+/) + } + + function expectIdstring () { + var string = idstring() + if (!string) { + throw new Error('Expected idstring at offset ' + index) + } + return string + } + + function documentRef () { + if (read('DocumentRef-')) { + var string = expectIdstring() + return { type: 'DOCUMENTREF', string: string } + } + } + + function licenseRef () { + if (read('LicenseRef-')) { + var string = expectIdstring() + return { type: 'LICENSEREF', string: string } + } + } + + function identifier () { + var begin = index + var string = idstring() + + if (licenses.indexOf(string) !== -1) { + return { + type: 'LICENSE', + string: string + } + } else if (exceptions.indexOf(string) !== -1) { + return { + type: 'EXCEPTION', + string: string + } + } + + index = begin + } + + // Tries to read the next token. Returns `undefined` if no token is + // recognized. + function parseToken () { + // Ordering matters + return ( + operator() || + documentRef() || + licenseRef() || + identifier() + ) + } + + var tokens = [] + while (hasMore()) { + skipWhitespace() + if (!hasMore()) { + break + } + + var token = parseToken() + if (!token) { + throw new Error('Unexpected `' + source[index] + + '` at offset ' + index) + } + + tokens.push(token) + } + return tokens +} diff --git a/node_modules/spdx-license-ids/README.md b/node_modules/spdx-license-ids/README.md new file mode 100644 index 0000000..500e32d --- /dev/null +++ b/node_modules/spdx-license-ids/README.md @@ -0,0 +1,52 @@ +# spdx-license-ids + +[![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.com/package/spdx-license-ids) +[![Github Actions](https://action-badges.now.sh/jslicense/spdx-license-ids)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/jslicense/spdx-license-ids) + +A list of [SPDX license](https://spdx.org/licenses/) identifiers + +## Installation + +[Download JSON directly](https://raw.githubusercontent.com/jslicense/spdx-license-ids/main/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/): + +``` +npm install spdx-license-ids +``` + +## [Node.js](https://nodejs.org/) API + +### require('spdx-license-ids') + +Type: `string[]` + +All license IDs except for the currently deprecated ones. + +```javascript +const ids = require('spdx-license-ids'); +//=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...] + +ids.includes('BSD-3-Clause'); //=> true +ids.includes('CC-BY-1.0'); //=> true + +ids.includes('GPL-3.0'); //=> false +``` + +### require('spdx-license-ids/deprecated') + +Type: `string[]` + +Deprecated license IDs. + +```javascript +const deprecatedIds = require('spdx-license-ids/deprecated'); +//=> ['AGPL-1.0', 'AGPL-3.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', 'GPL-2.0', ...] + +deprecatedIds.includes('BSD-3-Clause'); //=> false +deprecatedIds.includes('CC-BY-1.0'); //=> false + +deprecatedIds.includes('GPL-3.0'); //=> true +``` + +## License + +[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed) diff --git a/node_modules/spdx-license-ids/deprecated.json b/node_modules/spdx-license-ids/deprecated.json new file mode 100644 index 0000000..4f70a14 --- /dev/null +++ b/node_modules/spdx-license-ids/deprecated.json @@ -0,0 +1,28 @@ +[ + "AGPL-1.0", + "AGPL-3.0", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0", + "GPL-2.0-with-GCC-exception", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-3.0", + "GPL-3.0-with-GCC-exception", + "GPL-3.0-with-autoconf-exception", + "LGPL-2.0", + "LGPL-2.1", + "LGPL-3.0", + "Net-SNMP", + "Nunit", + "StandardML-NJ", + "bzip2-1.0.5", + "eCos-2.0", + "wxWindows" +] diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json new file mode 100644 index 0000000..f43d501 --- /dev/null +++ b/node_modules/spdx-license-ids/index.json @@ -0,0 +1,636 @@ +[ + "0BSD", + "3D-Slicer-1.0", + "AAL", + "ADSL", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AGPL-1.0-only", + "AGPL-1.0-or-later", + "AGPL-3.0-only", + "AGPL-3.0-or-later", + "AMD-newlib", + "AMDPLPA", + "AML", + "AML-glslang", + "AMPAS", + "ANTLR-PD", + "ANTLR-PD-fallback", + "APAFML", + "APL-1.0", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "ASWF-Digital-Assets-1.0", + "ASWF-Digital-Assets-1.1", + "Abstyles", + "AdaCore-doc", + "Adobe-2006", + "Adobe-Display-PostScript", + "Adobe-Glyph", + "Adobe-Utopia", + "Afmparse", + "Aladdin", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "App-s2p", + "Arphic-1999", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "BSD-1-Clause", + "BSD-2-Clause", + "BSD-2-Clause-Darwin", + "BSD-2-Clause-Patent", + "BSD-2-Clause-Views", + "BSD-2-Clause-first-lines", + "BSD-3-Clause", + "BSD-3-Clause-Attribution", + "BSD-3-Clause-Clear", + "BSD-3-Clause-HP", + "BSD-3-Clause-LBNL", + "BSD-3-Clause-Modification", + "BSD-3-Clause-No-Military-License", + "BSD-3-Clause-No-Nuclear-License", + "BSD-3-Clause-No-Nuclear-License-2014", + "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause-Open-MPI", + "BSD-3-Clause-Sun", + "BSD-3-Clause-acpica", + "BSD-3-Clause-flex", + "BSD-4-Clause", + "BSD-4-Clause-Shortened", + "BSD-4-Clause-UC", + "BSD-4.3RENO", + "BSD-4.3TAHOE", + "BSD-Advertising-Acknowledgement", + "BSD-Attribution-HPND-disclaimer", + "BSD-Inferno-Nettverk", + "BSD-Protection", + "BSD-Source-Code", + "BSD-Source-beginning-file", + "BSD-Systemics", + "BSD-Systemics-W3Works", + "BSL-1.0", + "BUSL-1.1", + "Baekmuk", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "Bitstream-Charter", + "Bitstream-Vera", + "BlueOak-1.0.0", + "Boehm-GC", + "Borceux", + "Brian-Gladman-2-Clause", + "Brian-Gladman-3-Clause", + "C-UDA-1.0", + "CAL-1.0", + "CAL-1.0-Combined-Work-Exception", + "CATOSL-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-2.5-AU", + "CC-BY-3.0", + "CC-BY-3.0-AT", + "CC-BY-3.0-AU", + "CC-BY-3.0-DE", + "CC-BY-3.0-IGO", + "CC-BY-3.0-NL", + "CC-BY-3.0-US", + "CC-BY-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-3.0-DE", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-3.0-DE", + "CC-BY-NC-ND-3.0-IGO", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.0-DE", + "CC-BY-NC-SA-2.0-FR", + "CC-BY-NC-SA-2.0-UK", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-3.0-DE", + "CC-BY-NC-SA-3.0-IGO", + "CC-BY-NC-SA-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-3.0-DE", + "CC-BY-ND-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.0-UK", + "CC-BY-SA-2.1-JP", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-3.0-AT", + "CC-BY-SA-3.0-DE", + "CC-BY-SA-3.0-IGO", + "CC-BY-SA-4.0", + "CC-PDDC", + "CC0-1.0", + "CDDL-1.0", + "CDDL-1.1", + "CDL-1.0", + "CDLA-Permissive-1.0", + "CDLA-Permissive-2.0", + "CDLA-Sharing-1.0", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "CERN-OHL-1.1", + "CERN-OHL-1.2", + "CERN-OHL-P-2.0", + "CERN-OHL-S-2.0", + "CERN-OHL-W-2.0", + "CFITSIO", + "CMU-Mach", + "CMU-Mach-nodoc", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "COIL-1.0", + "CPAL-1.0", + "CPL-1.0", + "CPOL-1.02", + "CUA-OPL-1.0", + "Caldera", + "Caldera-no-preamble", + "Catharon", + "ClArtistic", + "Clips", + "Community-Spec-1.0", + "Condor-1.1", + "Cornell-Lossless-JPEG", + "Cronyx", + "Crossword", + "CrystalStacker", + "Cube", + "D-FSL-1.0", + "DEC-3-Clause", + "DL-DE-BY-2.0", + "DL-DE-ZERO-2.0", + "DOC", + "DRL-1.0", + "DRL-1.1", + "DSDP", + "DocBook-Schema", + "DocBook-XML", + "Dotseqn", + "ECL-1.0", + "ECL-2.0", + "EFL-1.0", + "EFL-2.0", + "EPICS", + "EPL-1.0", + "EPL-2.0", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "EUPL-1.2", + "Elastic-2.0", + "Entessa", + "ErlPL-1.1", + "Eurosym", + "FBM", + "FDK-AAC", + "FSFAP", + "FSFAP-no-warranty-disclaimer", + "FSFUL", + "FSFULLR", + "FSFULLRWD", + "FTL", + "Fair", + "Ferguson-Twofish", + "Frameworx-1.0", + "FreeBSD-DOC", + "FreeImage", + "Furuseth", + "GCR-docs", + "GD", + "GFDL-1.1-invariants-only", + "GFDL-1.1-invariants-or-later", + "GFDL-1.1-no-invariants-only", + "GFDL-1.1-no-invariants-or-later", + "GFDL-1.1-only", + "GFDL-1.1-or-later", + "GFDL-1.2-invariants-only", + "GFDL-1.2-invariants-or-later", + "GFDL-1.2-no-invariants-only", + "GFDL-1.2-no-invariants-or-later", + "GFDL-1.2-only", + "GFDL-1.2-or-later", + "GFDL-1.3-invariants-only", + "GFDL-1.3-invariants-or-later", + "GFDL-1.3-no-invariants-only", + "GFDL-1.3-no-invariants-or-later", + "GFDL-1.3-only", + "GFDL-1.3-or-later", + "GL2PS", + "GLWTPL", + "GPL-1.0-only", + "GPL-1.0-or-later", + "GPL-2.0-only", + "GPL-2.0-or-later", + "GPL-3.0-only", + "GPL-3.0-or-later", + "Giftware", + "Glide", + "Glulxe", + "Graphics-Gems", + "Gutmann", + "HIDAPI", + "HP-1986", + "HP-1989", + "HPND", + "HPND-DEC", + "HPND-Fenneberg-Livingston", + "HPND-INRIA-IMAG", + "HPND-Intel", + "HPND-Kevlin-Henney", + "HPND-MIT-disclaimer", + "HPND-Markus-Kuhn", + "HPND-Netrek", + "HPND-Pbmplus", + "HPND-UC", + "HPND-UC-export-US", + "HPND-doc", + "HPND-doc-sell", + "HPND-export-US", + "HPND-export-US-acknowledgement", + "HPND-export-US-modify", + "HPND-export2-US", + "HPND-merchantability-variant", + "HPND-sell-MIT-disclaimer-xserver", + "HPND-sell-regexpr", + "HPND-sell-variant", + "HPND-sell-variant-MIT-disclaimer", + "HPND-sell-variant-MIT-disclaimer-rev", + "HTMLTIDY", + "HaskellReport", + "Hippocratic-2.1", + "IBM-pibs", + "ICU", + "IEC-Code-Components-EULA", + "IJG", + "IJG-short", + "IPA", + "IPL-1.0", + "ISC", + "ISC-Veillard", + "ImageMagick", + "Imlib2", + "Info-ZIP", + "Inner-Net-2.0", + "Intel", + "Intel-ACPI", + "Interbase-1.0", + "JPL-image", + "JPNIC", + "JSON", + "Jam", + "JasPer-2.0", + "Kastrup", + "Kazlib", + "Knuth-CTAN", + "LAL-1.2", + "LAL-1.3", + "LGPL-2.0-only", + "LGPL-2.0-or-later", + "LGPL-2.1-only", + "LGPL-2.1-or-later", + "LGPL-3.0-only", + "LGPL-3.0-or-later", + "LGPLLR", + "LOOP", + "LPD-document", + "LPL-1.0", + "LPL-1.02", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "LZMA-SDK-9.11-to-9.20", + "LZMA-SDK-9.22", + "Latex2e", + "Latex2e-translated-notice", + "Leptonica", + "LiLiQ-P-1.1", + "LiLiQ-R-1.1", + "LiLiQ-Rplus-1.1", + "Libpng", + "Linux-OpenIB", + "Linux-man-pages-1-para", + "Linux-man-pages-copyleft", + "Linux-man-pages-copyleft-2-para", + "Linux-man-pages-copyleft-var", + "Lucida-Bitmap-Fonts", + "MIT", + "MIT-0", + "MIT-CMU", + "MIT-Festival", + "MIT-Khronos-old", + "MIT-Modern-Variant", + "MIT-Wu", + "MIT-advertising", + "MIT-enna", + "MIT-feh", + "MIT-open-group", + "MIT-testregex", + "MITNFA", + "MMIXware", + "MPEG-SSG", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "MS-LPL", + "MS-PL", + "MS-RL", + "MTLL", + "Mackerras-3-Clause", + "Mackerras-3-Clause-acknowledgment", + "MakeIndex", + "Martin-Birgmeier", + "McPhee-slideshow", + "Minpack", + "MirOS", + "Motosoto", + "MulanPSL-1.0", + "MulanPSL-2.0", + "Multics", + "Mup", + "NAIST-2003", + "NASA-1.3", + "NBPL-1.0", + "NCBI-PD", + "NCGL-UK-2.0", + "NCL", + "NCSA", + "NGPL", + "NICTA-1.0", + "NIST-PD", + "NIST-PD-fallback", + "NIST-Software", + "NLOD-1.0", + "NLOD-2.0", + "NLPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "NPOSL-3.0", + "NRL", + "NTP", + "NTP-0", + "Naumen", + "NetCDF", + "Newsletr", + "Nokia", + "Noweb", + "O-UDA-1.0", + "OAR", + "OCCT-PL", + "OCLC-2.0", + "ODC-By-1.0", + "ODbL-1.0", + "OFFIS", + "OFL-1.0", + "OFL-1.0-RFN", + "OFL-1.0-no-RFN", + "OFL-1.1", + "OFL-1.1-RFN", + "OFL-1.1-no-RFN", + "OGC-1.0", + "OGDL-Taiwan-1.0", + "OGL-Canada-2.0", + "OGL-UK-1.0", + "OGL-UK-2.0", + "OGL-UK-3.0", + "OGTSL", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.2.2", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OLFL-1.3", + "OML", + "OPL-1.0", + "OPL-UK-3.0", + "OPUBL-1.0", + "OSET-PL-2.1", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenPBS-2.3", + "OpenSSL", + "OpenSSL-standalone", + "OpenVision", + "PADL", + "PDDL-1.0", + "PHP-3.0", + "PHP-3.01", + "PPL", + "PSF-2.0", + "Parity-6.0.0", + "Parity-7.0.0", + "Pixar", + "Plexus", + "PolyForm-Noncommercial-1.0.0", + "PolyForm-Small-Business-1.0.0", + "PostgreSQL", + "Python-2.0", + "Python-2.0.1", + "QPL-1.0", + "QPL-1.0-INRIA-2004", + "Qhull", + "RHeCos-1.1", + "RPL-1.1", + "RPL-1.5", + "RPSL-1.0", + "RSA-MD", + "RSCPL", + "Rdisc", + "Ruby", + "Ruby-pty", + "SAX-PD", + "SAX-PD-2.0", + "SCEA", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "SGI-OpenGL", + "SGP4", + "SHL-0.5", + "SHL-0.51", + "SISSL", + "SISSL-1.2", + "SL", + "SMLNJ", + "SMPPL", + "SNIA", + "SPL-1.0", + "SSH-OpenSSH", + "SSH-short", + "SSLeay-standalone", + "SSPL-1.0", + "SWL", + "Saxpath", + "SchemeReport", + "Sendmail", + "Sendmail-8.23", + "SimPL-2.0", + "Sleepycat", + "Soundex", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SugarCRM-1.1.3", + "Sun-PPP", + "Sun-PPP-2000", + "SunPro", + "Symlinks", + "TAPR-OHL-1.0", + "TCL", + "TCP-wrappers", + "TGPPL-1.0", + "TMate", + "TORQUE-1.1", + "TOSL", + "TPDL", + "TPL-1.0", + "TTWL", + "TTYP0", + "TU-Berlin-1.0", + "TU-Berlin-2.0", + "TermReadKey", + "UCAR", + "UCL-1.0", + "UMich-Merit", + "UPL-1.0", + "URT-RLE", + "Ubuntu-font-1.0", + "Unicode-3.0", + "Unicode-DFS-2015", + "Unicode-DFS-2016", + "Unicode-TOU", + "UnixCrypt", + "Unlicense", + "VOSTROM", + "VSL-1.0", + "Vim", + "W3C", + "W3C-19980720", + "W3C-20150513", + "WTFPL", + "Watcom-1.0", + "Widget-Workshop", + "Wsuipa", + "X11", + "X11-distribute-modifications-variant", + "X11-swapped", + "XFree86-1.1", + "XSkat", + "Xdebug-1.03", + "Xerox", + "Xfig", + "Xnet", + "YPL-1.0", + "YPL-1.1", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "Zed", + "Zeeff", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "any-OSI", + "bcrypt-Solar-Designer", + "blessing", + "bzip2-1.0.6", + "check-cvs", + "checkmk", + "copyleft-next-0.3.0", + "copyleft-next-0.3.1", + "curl", + "cve-tou", + "diffmark", + "dtoa", + "dvipdfm", + "eGenix", + "etalab-2.0", + "fwlw", + "gSOAP-1.3b", + "gnuplot", + "gtkbook", + "hdparm", + "iMatix", + "libpng-2.0", + "libselinux-1.0", + "libtiff", + "libutil-David-Nugent", + "lsof", + "magaz", + "mailprio", + "metamail", + "mpi-permissive", + "mpich2", + "mplus", + "pkgconf", + "pnmstitch", + "psfrag", + "psutils", + "python-ldap", + "radvd", + "snprintf", + "softSurfer", + "ssh-keyscan", + "swrule", + "threeparttable", + "ulem", + "w3m", + "xinetd", + "xkeyboard-config-Zinoviev", + "xlock", + "xpp", + "xzoom", + "zlib-acknowledgement" +] diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json new file mode 100644 index 0000000..7ab34aa --- /dev/null +++ b/node_modules/spdx-license-ids/package.json @@ -0,0 +1,39 @@ +{ + "name": "spdx-license-ids", + "version": "3.0.20", + "description": "A list of SPDX license identifiers", + "repository": "jslicense/spdx-license-ids", + "author": "Shinnosuke Watanabe (https://github.com/shinnn)", + "license": "CC0-1.0", + "scripts": { + "build": "node build.js", + "pretest": "eslint .", + "latest": "node latest.js", + "test": "node test.js" + }, + "files": [ + "deprecated.json", + "index.json" + ], + "keywords": [ + "spdx", + "license", + "licenses", + "id", + "identifier", + "identifiers", + "json", + "array", + "oss" + ], + "devDependencies": { + "@shinnn/eslint-config": "^7.0.0", + "eslint": "^8.49.0", + "eslint-formatter-codeframe": "^7.32.1", + "rmfr": "^2.0.0", + "tape": "^5.6.6" + }, + "eslintConfig": { + "extends": "@shinnn" + } +} diff --git a/node_modules/split-string/LICENSE b/node_modules/split-string/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/split-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/split-string/README.md b/node_modules/split-string/README.md new file mode 100644 index 0000000..d622e44 --- /dev/null +++ b/node_modules/split-string/README.md @@ -0,0 +1,321 @@ +# split-string [![NPM version](https://img.shields.io/npm/v/split-string.svg?style=flat)](https://www.npmjs.com/package/split-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![NPM total downloads](https://img.shields.io/npm/dt/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/split-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/split-string) + +> Split a string on a character except when the character is escaped. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save split-string +``` + + + +
+Why use this? + +
+ +Although it's easy to split on a string: + +```js +console.log('a.b.c'.split('.')); +//=> ['a', 'b', 'c'] +``` + +It's more challenging to split a string whilst respecting escaped or quoted characters. + +**Bad** + +```js +console.log('a\\.b.c'.split('.')); +//=> ['a\\', 'b', 'c'] + +console.log('"a.b.c".d'.split('.')); +//=> ['"a', 'b', 'c"', 'd'] +``` + +**Good** + +```js +var split = require('split-string'); +console.log(split('a\\.b.c')); +//=> ['a.b', 'c'] + +console.log(split('"a.b.c".d')); +//=> ['a.b.c', 'd'] +``` + +See the [options](#options) to learn how to choose the separator or retain quotes or escaping. + +
+ +
+ +## Usage + +```js +var split = require('split-string'); + +split('a.b.c'); +//=> ['a', 'b', 'c'] + +// respects escaped characters +split('a.b.c\\.d'); +//=> ['a', 'b', 'c.d'] + +// respects double-quoted strings +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] +``` + +**Brackets** + +Also respects brackets [unless disabled](#optionsbrackets): + +```js +split('a (b c d) e', ' '); +//=> ['a', '(b c d)', 'e'] +``` + +## Options + +### options.brackets + +**Type**: `object|boolean` + +**Default**: `undefined` + +**Description** + +If enabled, split-string will not split inside brackets. The following brackets types are supported when `options.brackets` is `true`, + +```js +{ + '<': '>', + '(': ')', + '[': ']', + '{': '}' +} +``` + +Or, if object of brackets must be passed, each property on the object must be a bracket type, where the property key is the opening delimiter and property value is the closing delimiter. + +**Examples** + +```js +// no bracket support by default +split('a.{b.c}'); +//=> [ 'a', '{b', 'c}' ] + +// support all basic bracket types: "<>{}[]()" +split('a.{b.c}', {brackets: true}); +//=> [ 'a', '{b.c}' ] + +// also supports nested brackets +split('a.{b.{c.d}.e}.f', {brackets: true}); +//=> [ 'a', '{b.{c.d}.e}', 'f' ] + +// support only the specified brackets +split('[a.b].(c.d)', {brackets: {'[': ']'}}); +//=> [ '[a.b]', '(c', 'd)' ] +``` + +### options.sep + +**Type**: `string` + +**Default**: `.` + +The separator/character to split on. + +**Example** + +```js +split('a.b,c', {sep: ','}); +//=> ['a.b', 'c'] + +// you can also pass the separator as string as the last argument +split('a.b,c', ','); +//=> ['a.b', 'c'] +``` + +### options.keepEscaping + +**Type**: `boolean` + +**Default**: `undefined` + +Keep backslashes in the result. + +**Example** + +```js +split('a.b\\.c'); +//=> ['a', 'b.c'] + +split('a.b.\\c', {keepEscaping: true}); +//=> ['a', 'b\.c'] +``` + +### options.keepQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep single- or double-quotes in the result. + +**Example** + +```js +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] + +split('a."b.c.d".e', {keepQuotes: true}); +//=> ['a', '"b.c.d"', 'e'] + +split('a.\'b.c.d\'.e', {keepQuotes: true}); +//=> ['a', '\'b.c.d\'', 'e'] +``` + +### options.keepDoubleQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep double-quotes in the result. + +**Example** + +```js +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] + +split('a."b.c.d".e', {keepDoubleQuotes: true}); +//=> ['a', '"b.c.d"', 'e'] +``` + +### options.keepSingleQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep single-quotes in the result. + +**Example** + +```js +split('a.\'b.c.d\'.e'); +//=> ['a', 'b.c.d', 'e'] + +split('a.\'b.c.d\'.e', {keepSingleQuotes: true}); +//=> ['a', '\'b.c.d\'', 'e'] +``` + +## Customizer + +**Type**: `function` + +**Default**: `undefined` + +Pass a function as the last argument to customize how tokens are added to the array. + +**Example** + +```js +var arr = split('a.b', function(tok) { + if (tok.arr[tok.arr.length - 1] === 'a') { + tok.split = false; + } +}); +console.log(arr); +//=> ['a.b'] +``` + +**Properties** + +The `tok` object has the following properties: + +* `tok.val` (string) The current value about to be pushed onto the result array +* `tok.idx` (number) the current index in the string +* `tok.str` (string) the entire string +* `tok.arr` (array) the result array + +## Release history + +### v3.0.0 - 2017-06-17 + +**Added** + +* adds support for brackets + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [deromanize](https://www.npmjs.com/package/deromanize): Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/deromanize "Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc)") +* [randomatic](https://www.npmjs.com/package/randomatic): Generate randomized strings of a specified length using simple character sequences. The original generate-password. | [homepage](https://github.com/jonschlinkert/randomatic "Generate randomized strings of a specified length using simple character sequences. The original generate-password.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") +* [romanize](https://www.npmjs.com/package/romanize): Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/romanize "Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 28 | [jonschlinkert](https://github.com/jonschlinkert) | +| 9 | [doowb](https://github.com/doowb) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/split-string/index.js b/node_modules/split-string/index.js new file mode 100644 index 0000000..7bc0ea9 --- /dev/null +++ b/node_modules/split-string/index.js @@ -0,0 +1,171 @@ +/*! + * split-string + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var extend = require('extend-shallow'); + +module.exports = function(str, options, fn) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (typeof options === 'function') { + fn = options; + options = null; + } + + // allow separator to be defined as a string + if (typeof options === 'string') { + options = { sep: options }; + } + + var opts = extend({sep: '.'}, options); + var quotes = opts.quotes || ['"', "'", '`']; + var brackets; + + if (opts.brackets === true) { + brackets = { + '<': '>', + '(': ')', + '[': ']', + '{': '}' + }; + } else if (opts.brackets) { + brackets = opts.brackets; + } + + var tokens = []; + var stack = []; + var arr = ['']; + var sep = opts.sep; + var len = str.length; + var idx = -1; + var closeIdx; + + function expected() { + if (brackets && stack.length) { + return brackets[stack[stack.length - 1]]; + } + } + + while (++idx < len) { + var ch = str[idx]; + var next = str[idx + 1]; + var tok = { val: ch, idx: idx, arr: arr, str: str }; + tokens.push(tok); + + if (ch === '\\') { + tok.val = keepEscaping(opts, str, idx) === true ? (ch + next) : next; + tok.escaped = true; + if (typeof fn === 'function') { + fn(tok); + } + arr[arr.length - 1] += tok.val; + idx++; + continue; + } + + if (brackets && brackets[ch]) { + stack.push(ch); + var e = expected(); + var i = idx + 1; + + if (str.indexOf(e, i + 1) !== -1) { + while (stack.length && i < len) { + var s = str[++i]; + if (s === '\\') { + s++; + continue; + } + + if (quotes.indexOf(s) !== -1) { + i = getClosingQuote(str, s, i + 1); + continue; + } + + e = expected(); + if (stack.length && str.indexOf(e, i + 1) === -1) { + break; + } + + if (brackets[s]) { + stack.push(s); + continue; + } + + if (e === s) { + stack.pop(); + } + } + } + + closeIdx = i; + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + ch = str.slice(idx, closeIdx + 1); + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (quotes.indexOf(ch) !== -1) { + closeIdx = getClosingQuote(str, ch, idx + 1); + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + if (keepQuotes(ch, opts) === true) { + ch = str.slice(idx, closeIdx + 1); + } else { + ch = str.slice(idx + 1, closeIdx); + } + + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (typeof fn === 'function') { + fn(tok, tokens); + ch = tok.val; + idx = tok.idx; + } + + if (tok.val === sep && tok.split !== false) { + arr.push(''); + continue; + } + + arr[arr.length - 1] += tok.val; + } + + return arr; +}; + +function getClosingQuote(str, ch, i, brackets) { + var idx = str.indexOf(ch, i); + if (str.charAt(idx - 1) === '\\') { + return getClosingQuote(str, ch, idx + 1); + } + return idx; +} + +function keepQuotes(ch, opts) { + if (opts.keepDoubleQuotes === true && ch === '"') return true; + if (opts.keepSingleQuotes === true && ch === "'") return true; + return opts.keepQuotes; +} + +function keepEscaping(opts, str, idx) { + if (typeof opts.keepEscaping === 'function') { + return opts.keepEscaping(str, idx); + } + return opts.keepEscaping === true || str[idx + 1] === '\\'; +} diff --git a/node_modules/split-string/node_modules/extend-shallow/LICENSE b/node_modules/split-string/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/split-string/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/split-string/node_modules/extend-shallow/README.md b/node_modules/split-string/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/split-string/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/split-string/node_modules/extend-shallow/index.js b/node_modules/split-string/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/split-string/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/split-string/node_modules/extend-shallow/package.json b/node_modules/split-string/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/split-string/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/split-string/node_modules/is-extendable/LICENSE b/node_modules/split-string/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/split-string/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/split-string/node_modules/is-extendable/README.md b/node_modules/split-string/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/split-string/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/split-string/node_modules/is-extendable/index.d.ts b/node_modules/split-string/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/split-string/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/split-string/node_modules/is-extendable/index.js b/node_modules/split-string/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/split-string/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/split-string/node_modules/is-extendable/package.json b/node_modules/split-string/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/split-string/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/split-string/package.json b/node_modules/split-string/package.json new file mode 100644 index 0000000..8f490a2 --- /dev/null +++ b/node_modules/split-string/package.json @@ -0,0 +1,65 @@ +{ + "name": "split-string", + "description": "Split a string on a character except when the character is escaped.", + "version": "3.1.0", + "homepage": "https://github.com/jonschlinkert/split-string", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/split-string", + "bugs": { + "url": "https://github.com/jonschlinkert/split-string/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "character", + "escape", + "split", + "string" + ], + "verb": { + "toc": false, + "layout": "default", + "titles": [ + ".", + "install", + "Why use this?" + ], + "related": { + "list": [ + "deromanize", + "randomatic", + "repeat-string", + "romanize" + ] + }, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/split/.npmignore b/node_modules/split/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/split/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/split/.travis.yml b/node_modules/split/.travis.yml new file mode 100644 index 0000000..dad2273 --- /dev/null +++ b/node_modules/split/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" diff --git a/node_modules/split/LICENCE b/node_modules/split/LICENCE new file mode 100644 index 0000000..171dd97 --- /dev/null +++ b/node_modules/split/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/split/examples/pretty.js b/node_modules/split/examples/pretty.js new file mode 100644 index 0000000..2e89131 --- /dev/null +++ b/node_modules/split/examples/pretty.js @@ -0,0 +1,26 @@ + +var inspect = require('util').inspect +var es = require('event-stream') //load event-stream +var split = require('../') + +if(!module.parent) { + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/node_modules/split/index.js b/node_modules/split/index.js new file mode 100644 index 0000000..d856433 --- /dev/null +++ b/node_modules/split/index.js @@ -0,0 +1,63 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var through = require('through') +var Decoder = require('string_decoder').StringDecoder + +module.exports = split + +//TODO pass in a function to map across the lines. + +function split (matcher, mapper, options) { + var decoder = new Decoder() + var soFar = '' + var maxLength = options && options.maxLength; + if('function' === typeof matcher) + mapper = matcher, matcher = null + if (!matcher) + matcher = /\r?\n/ + + function emit(stream, piece) { + if(mapper) { + try { + piece = mapper(piece) + } + catch (err) { + return stream.emit('error', err) + } + if('undefined' !== typeof piece) + stream.queue(piece) + } + else + stream.queue(piece) + } + + function next (stream, buffer) { + var pieces = ((soFar != null ? soFar : '') + buffer).split(matcher) + soFar = pieces.pop() + + if (maxLength && soFar.length > maxLength) + stream.emit('error', new Error('maximum buffer reached')) + + for (var i = 0; i < pieces.length; i++) { + var piece = pieces[i] + emit(stream, piece) + } + } + + return through(function (b) { + next(this, decoder.write(b)) + }, + function () { + if(decoder.end) + next(this, decoder.end()) + if(soFar != null) + emit(this, soFar) + this.queue(null) + }) +} + diff --git a/node_modules/split/package.json b/node_modules/split/package.json new file mode 100644 index 0000000..00b35ca --- /dev/null +++ b/node_modules/split/package.json @@ -0,0 +1,30 @@ +{ + "name": "split", + "version": "0.3.3", + "license": "MIT", + "description": "split a Text Stream into a Line Stream", + "homepage": "http://github.com/dominictarr/split", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/split.git" + }, + "dependencies": { + "through": "2" + }, + "devDependencies": { + "asynct": "*", + "event-stream": "~3.0.2", + "it-is": "1", + "stream-spec": "~0.2", + "ubelt": "~2.9", + "string-to-stream": "~1.0.0" + }, + "scripts": { + "test": "asynct test/" + }, + "author": "Dominic Tarr (http://bit.ly/dominictarr)", + "optionalDependencies": {}, + "engines": { + "node": "*" + } +} diff --git a/node_modules/split/readme.markdown b/node_modules/split/readme.markdown new file mode 100644 index 0000000..13854ae --- /dev/null +++ b/node_modules/split/readme.markdown @@ -0,0 +1,66 @@ +# Split (matcher) + +[![build status](https://secure.travis-ci.org/dominictarr/split.png)](http://travis-ci.org/dominictarr/split) + +Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` + +Example, read every line in a file ... + +``` js + fs.createReadStream(file) + .pipe(split()) + .on('data', function (line) { + //each chunk now is a seperate line! + }) + +``` + +`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/' instead of ',', and the optional `limit` paremeter is ignored. +[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) + +`split` takes an optional options object on it's third argument. + +``` js + split(matcher, mapper, options) +``` + +Valid options: + +* maxLength - The maximum buffer length without seeing a newline or `matcher`, + if a single line exceeds this, the split stream will emit an error. + +``` js + split(JSON.parse, null, { maxLength: 2}) +``` + +## keep matched splitter + +As with `Array#split`, if you split by a regular expression with a matching group, +the matches will be retained in the collection. + +``` +stdin +.pipe(split(/(\r?\n)/)) +... //lines + separators. +``` + + +# NDJ - Newline Delimited Json + +`split` accepts a function which transforms each line. + +``` js +fs.createReadStream(file) + .pipe(split(JSON.parse)) + .on('data', function (obj) { + //each chunk now is a a js object + }) + .on('error', function (err) { + //syntax errors will land here + //note, this ends the stream. + }) +``` + +# License + +MIT diff --git a/node_modules/split/test/options.asynct.js b/node_modules/split/test/options.asynct.js new file mode 100644 index 0000000..6d34d87 --- /dev/null +++ b/node_modules/split/test/options.asynct.js @@ -0,0 +1,23 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['maximum buffer limit'] = function (test) { + var s = split(JSON.parse, null, { + maxLength: 2 + }) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + s.write('{ "') + it(caughtError).equal(true) + + s.end() + test.done() +} diff --git a/node_modules/split/test/partitioned_unicode.js b/node_modules/split/test/partitioned_unicode.js new file mode 100644 index 0000000..aff3d5d --- /dev/null +++ b/node_modules/split/test/partitioned_unicode.js @@ -0,0 +1,34 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['split data with partitioned unicode character'] = function (test) { + var s = split(/,/g) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + var x = 'テスト試験今日とても,よい天気で' + unicodeData = new Buffer(x); + + // partition of 日 + piece1 = unicodeData.slice(0, 20); + piece2 = unicodeData.slice(20, unicodeData.length); + + s.write(piece1); + s.write(piece2); + + s.end() + + it(caughtError).equal(false) + + it(rows).deepEqual(['テスト試験今日とても', 'よい天気で']); + + it(rows).deepEqual(x.split(',')) + + test.done() +} diff --git a/node_modules/split/test/split.asynct.js b/node_modules/split/test/split.asynct.js new file mode 100644 index 0000000..e5df026 --- /dev/null +++ b/node_modules/split/test/split.asynct.js @@ -0,0 +1,137 @@ +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('ubelt') + , split = require('..') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + , Readable = require('stream').Readable + , spec = require('stream-spec') + , through = require('through') + , stringStream = require('string-to-stream') + +exports ['split() works like String#split'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split() + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() takes mapper function'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split(function (line) { return line.toUpperCase() }) + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).equal(v.trim().toUpperCase()) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() works with empty string chunks'] = function (test) { + var str = ' foo' + , expected = str.split(/[\s]*/).reduce(splitBy(/[\s]*/), []) + , cs1 = split(/[\s]*/) + , cs2 = split(/[\s]*/) + , actual = [] + , ended = false + , x = spec(cs1).through() + , y = spec(cs2).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + y.validate() + }) + } + a.writable = true + + cs1.pipe(cs2) + cs2.pipe(a) + + cs1.write(str) + cs1.end() + +} + +function splitBy (delimeter) { + return function (arr, piece) { + return arr.concat(piece.split(delimeter)) + } +} \ No newline at end of file diff --git a/node_modules/split/test/try_catch.asynct.js b/node_modules/split/test/try_catch.asynct.js new file mode 100644 index 0000000..39e49f7 --- /dev/null +++ b/node_modules/split/test/try_catch.asynct.js @@ -0,0 +1,51 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['emit mapper exceptions as error events'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}\n') + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + test.done() +} + +exports ['mapper error events on trailing chunks'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + test.done() +} diff --git a/node_modules/static-extend/LICENSE b/node_modules/static-extend/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/node_modules/static-extend/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/static-extend/index.js b/node_modules/static-extend/index.js new file mode 100644 index 0000000..f4124b2 --- /dev/null +++ b/node_modules/static-extend/index.js @@ -0,0 +1,90 @@ +/*! + * static-extend + * + * Copyright (c) 2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var copy = require('object-copy'); +var define = require('define-property'); +var util = require('util'); + +/** + * Returns a function for extending the static properties, + * prototype properties, and descriptors from the `Parent` + * constructor onto `Child` constructors. + * + * ```js + * var extend = require('static-extend'); + * Parent.extend = extend(Parent); + * + * // optionally pass a custom merge function as the second arg + * Parent.extend = extend(Parent, function(Child) { + * Child.prototype.mixin = function(key, val) { + * Child.prototype[key] = val; + * }; + * }); + * + * // extend "child" constructors + * Parent.extend(Child); + * + * // optionally define prototype methods as the second arg + * Parent.extend(Child, { + * foo: function() {}, + * bar: function() {} + * }); + * ``` + * @param {Function} `Parent` Parent ctor + * @param {Function} `extendFn` Optional extend function for handling any necessary custom merging. Useful when updating methods that require a specific prototype. + * @param {Function} `Child` Child ctor + * @param {Object} `proto` Optionally pass additional prototype properties to inherit. + * @return {Object} + * @api public + */ + +function extend(Parent, extendFn) { + if (typeof Parent !== 'function') { + throw new TypeError('expected Parent to be a function.'); + } + + return function(Ctor, proto) { + if (typeof Ctor !== 'function') { + throw new TypeError('expected Ctor to be a function.'); + } + + util.inherits(Ctor, Parent); + copy(Ctor, Parent); + + // proto can be null or a plain object + if (typeof proto === 'object') { + var obj = Object.create(proto); + + for (var k in obj) { + Ctor.prototype[k] = obj[k]; + } + } + + // keep a reference to the parent prototype + define(Ctor.prototype, '_parent_', { + configurable: true, + set: function() {}, + get: function() { + return Parent.prototype; + } + }); + + if (typeof extendFn === 'function') { + extendFn(Ctor, Parent); + } + + Ctor.extend = extend(Ctor, extendFn); + }; +}; + +/** + * Expose `extend` + */ + +module.exports = extend; diff --git a/node_modules/static-extend/node_modules/define-property/LICENSE b/node_modules/static-extend/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/static-extend/node_modules/define-property/README.md b/node_modules/static-extend/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/node_modules/static-extend/node_modules/define-property/index.js b/node_modules/static-extend/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/static-extend/node_modules/define-property/package.json b/node_modules/static-extend/node_modules/define-property/package.json new file mode 100644 index 0000000..43561bf --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/package.json @@ -0,0 +1,51 @@ +{ + "name": "define-property", + "description": "Define a non-enumerable property on an object.", + "version": "0.2.5", + "homepage": "https://github.com/jonschlinkert/define-property", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/define-property", + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "dependencies": { + "is-descriptor": "^0.1.0" + } +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/.editorconfig b/node_modules/static-extend/node_modules/is-descriptor/.editorconfig new file mode 100644 index 0000000..449f0da --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{**/{actual,fixtures,expected,templates}/**,*.md}] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/node_modules/static-extend/node_modules/is-descriptor/.eslintrc b/node_modules/static-extend/node_modules/is-descriptor/.eslintrc new file mode 100644 index 0000000..24e5090 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.eslintrc @@ -0,0 +1,16 @@ +{ + "extends": "@ljharb", + + "rules": { + "func-style": "warn", + }, + + "overrides": [ + { + "files": "test/**/*.js", + "rules": { + "max-lines-per-function": "off", + }, + }, + ], +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/.gitattributes b/node_modules/static-extend/node_modules/is-descriptor/.gitattributes new file mode 100644 index 0000000..660957e --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.gitattributes @@ -0,0 +1,10 @@ +# Enforce Unix newlines +* text eol=lf + +# binaries +*.ai binary +*.psd binary +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary diff --git a/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml b/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml new file mode 100644 index 0000000..37535da --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-descriptor +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/static-extend/node_modules/is-descriptor/.nycrc b/node_modules/static-extend/node_modules/is-descriptor/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md b/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md new file mode 100644 index 0000000..4963353 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/CHANGELOG.md @@ -0,0 +1,144 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.0](https://github.com/inspect-js/is-descriptor/compare/v3.0.0...v3.1.0) - 2023-05-01 + +### Commits + +- [eslint] cleanup [`1f4e8cd`](https://github.com/inspect-js/is-descriptor/commit/1f4e8cdb49b4b15666a782f3f05e6f4f0146b9ab) +- [Tests] travis -> Github Actions; add `safe-publish-latest`, `npmignore`, `auto-changelog`, `evalmd`, `aud` [`5993285`](https://github.com/inspect-js/is-descriptor/commit/5993285a122ef7bf5b91cba3b486f96a1f94f552) +- [readme] clean up docs, URLs, package.json, etc [`8807164`](https://github.com/inspect-js/is-descriptor/commit/88071644c15d543c7830e6ac00a5ed8531c82750) +- [Docs] remove verb [`0bc26a3`](https://github.com/inspect-js/is-descriptor/commit/0bc26a306f02241e6c5c506e95c53ca828031c05) +- [Tests] convert from mocha to tape [`1604d7f`](https://github.com/inspect-js/is-descriptor/commit/1604d7feebd776b0fb67163e3013cc6d5ab9fd6b) +- [New] increase support from node 6 down to node 0.4 [`7893404`](https://github.com/inspect-js/is-descriptor/commit/789340412f4028d46a3121466a25497716b94402) +- [Tests] add coverage [`1dcc45e`](https://github.com/inspect-js/is-descriptor/commit/1dcc45ed57aebc83ba0588c232663f4164a7d0a8) +- [Fix] when an object/key pair is provided, check arguments.length instead of key truthiness [`d1edefe`](https://github.com/inspect-js/is-descriptor/commit/d1edefef56c7eeaab385b1704417b314f197034d) +- [meta] switch from `files` field to npmignore; add `exports` [`c64d3d3`](https://github.com/inspect-js/is-descriptor/commit/c64d3d356d459f2e73198841f93fb902895875b4) + +## [v3.0.0](https://github.com/inspect-js/is-descriptor/compare/v2.0.0...v3.0.0) - 2018-12-13 + +### Commits + +- refactor [`7f7e2c8`](https://github.com/inspect-js/is-descriptor/commit/7f7e2c865674526424f5cd1fb98f0ed7811a67f9) + +## [v2.0.0](https://github.com/inspect-js/is-descriptor/compare/v1.0.3...v2.0.0) - 2017-12-28 + +### Commits + +- run verb to generate readme [`7d97594`](https://github.com/inspect-js/is-descriptor/commit/7d97594666afaa825e0421883507cfec04ceef1d) +- upgrade is-accessor-descriptor [`2e2cb1e`](https://github.com/inspect-js/is-descriptor/commit/2e2cb1e723d2ca1d6b8580d384702700e26dda81) +- run update [`c04832a`](https://github.com/inspect-js/is-descriptor/commit/c04832a3a2bf48bef2ea0f5844652da7d6209242) + +## [v1.0.3](https://github.com/inspect-js/is-descriptor/compare/v1.0.2...v1.0.3) - 2023-10-26 + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v1.0.2](https://github.com/inspect-js/is-descriptor/compare/v1.0.1...v1.0.2) - 2017-12-28 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +## [v1.0.1](https://github.com/inspect-js/is-descriptor/compare/v1.0.0...v1.0.1) - 2017-07-22 + +### Commits + +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) + +## [v1.0.0](https://github.com/inspect-js/is-descriptor/compare/v0.1.7...v1.0.0) - 2017-02-25 + +## [v0.1.7](https://github.com/inspect-js/is-descriptor/compare/v0.1.6...v0.1.7) - 2023-10-26 + +### Merged + +- Update dependencies [`#5`](https://github.com/inspect-js/is-descriptor/pull/5) + +### Commits + +- [eslint] actually use eslint [`8bcf028`](https://github.com/inspect-js/is-descriptor/commit/8bcf0288c53c80297e6109f7632dab9b7b7fb5c5) +- [meta] update package.json, gitignore from main [`544cdfe`](https://github.com/inspect-js/is-descriptor/commit/544cdfe60f5a4db8aa1b02de93b326271fa82ec1) +- [readme] update readme from main [`1130f79`](https://github.com/inspect-js/is-descriptor/commit/1130f79112bd1d36ca5b0806a4ad14ae9427e0e9) +- [Tests] switch to tape [`3f8f094`](https://github.com/inspect-js/is-descriptor/commit/3f8f0947049e4f2d631f88f0374e2b4a4e058577) +- [Docs] remove verb [`92ee1bf`](https://github.com/inspect-js/is-descriptor/commit/92ee1bfcc56ba2cd30503c87af8e8cd795fdca51) +- [Tests] migrate from travis to github actions [`8da3a3c`](https://github.com/inspect-js/is-descriptor/commit/8da3a3c38d50b4e9e18865efd25c6d35f98852b6) +- run update, lint [`754cc73`](https://github.com/inspect-js/is-descriptor/commit/754cc7382bd439f8e8b91775479c59c7c996cd47) +- [Fix] a descriptor with `set` and not `get` is still an accessor descriptor [`269fb53`](https://github.com/inspect-js/is-descriptor/commit/269fb5374659a8c07aac88993b13d94197e9cbed) +- [patch] switch from `files` to `exports` [`41b2d61`](https://github.com/inspect-js/is-descriptor/commit/41b2d6152438119120b8d24ff98ebfb79cb19007) +- [Fix] allow any non-primitive; arrays and functions are objects too [`9fd1ac8`](https://github.com/inspect-js/is-descriptor/commit/9fd1ac80cd42600510dc76de74da9a3834c4358d) +- update deps [`2b58af6`](https://github.com/inspect-js/is-descriptor/commit/2b58af6426d0700607419b096766829aff27f642) +- [Deps] update `is-accessor-descriptor`, `is-data-descriptor` [`f4dbc73`](https://github.com/inspect-js/is-descriptor/commit/f4dbc7327e9df005d3d6130af2ea612426a45081) +- v0.x line: v1 and v0 are the same, so, branch v0 from 1.x [`91be723`](https://github.com/inspect-js/is-descriptor/commit/91be72399c3066950d2414a6d2f091e1074625cd) +- [Tests] make a test dir [`9eaa17c`](https://github.com/inspect-js/is-descriptor/commit/9eaa17c3cbcd545d9409ab8d83dcd8bd0c42e739) + +## [v0.1.6](https://github.com/inspect-js/is-descriptor/compare/v0.1.5...v0.1.6) - 2017-07-22 + +## [v0.1.5](https://github.com/inspect-js/is-descriptor/compare/v0.1.4...v0.1.5) - 2017-02-25 + +### Merged + +- Bump `lazy-cache`. [`#4`](https://github.com/inspect-js/is-descriptor/pull/4) + +### Commits + +- update docs, fix typos [`bc3cf69`](https://github.com/inspect-js/is-descriptor/commit/bc3cf6915686d4a964997ae7585bf65005bbf955) +- run update [`1956814`](https://github.com/inspect-js/is-descriptor/commit/1956814c67c2033caeaed469ad09e6392dd0799e) + +## [v0.1.4](https://github.com/inspect-js/is-descriptor/compare/v0.1.3...v0.1.4) - 2015-12-28 + +### Commits + +- allow a key to be passed [`202062b`](https://github.com/inspect-js/is-descriptor/commit/202062b56735525e7def35c8453505778ce9de03) +- update docs [`890fe80`](https://github.com/inspect-js/is-descriptor/commit/890fe80100aa21cac1bee55d6fb4045ffb661ff7) + +## [v0.1.3](https://github.com/inspect-js/is-descriptor/compare/v0.1.2...v0.1.3) - 2015-12-20 + +### Commits + +- lint [`fa81701`](https://github.com/inspect-js/is-descriptor/commit/fa817018aabb6f18e7f09e452b80386775773d42) +- add gulp-format-md to verb config, build readme [`8e6c159`](https://github.com/inspect-js/is-descriptor/commit/8e6c159cfa23b357dbac8f977c3a9421172aafeb) +- update deps [`b7b8321`](https://github.com/inspect-js/is-descriptor/commit/b7b8321e194f4f25c5aa4ff382a0a8ffb6482cc1) + +## [v0.1.2](https://github.com/inspect-js/is-descriptor/compare/v0.1.1...v0.1.2) - 2015-10-04 + +### Commits + +- files prop [`3aaf1ce`](https://github.com/inspect-js/is-descriptor/commit/3aaf1ce8483bdee217e2f18b293937a09634a33b) + +## [v0.1.1](https://github.com/inspect-js/is-descriptor/compare/v0.1.0...v0.1.1) - 2015-10-04 + +### Merged + +- Update .verb.md [`#1`](https://github.com/inspect-js/is-descriptor/pull/1) + +### Commits + +- adds lazy-caching [`0219f1a`](https://github.com/inspect-js/is-descriptor/commit/0219f1aa95b9ce7c08e0a1e00fe506a572c6ac46) +- 0.1.1 readme [`924a5a7`](https://github.com/inspect-js/is-descriptor/commit/924a5a7a5d648d901b24b7287d9a5d232865f603) +- fix readme [`dd9c431`](https://github.com/inspect-js/is-descriptor/commit/dd9c4315dd61be73f42d07bc71ddb97414dfdbcf) + +## v0.1.0 - 2015-08-31 + +### Commits + +- first commit [`b5d8c39`](https://github.com/inspect-js/is-descriptor/commit/b5d8c39843c98588b67069325a4e6455beb8aef3) +- 0.1.0 readme [`aaffb92`](https://github.com/inspect-js/is-descriptor/commit/aaffb924062d7c588417d9a2184ff1129f8d294a) +- 0.1.0 docs [`eb0da6c`](https://github.com/inspect-js/is-descriptor/commit/eb0da6c548e59ff76f6a80a95ea0a750dab40591) +- use libs [`86ad32f`](https://github.com/inspect-js/is-descriptor/commit/86ad32fe5a07d2705b14bb3e237584c05d60d519) +- lint [`94fbcc9`](https://github.com/inspect-js/is-descriptor/commit/94fbcc9c2a3da1e9b888bad86b9576259d1d7940) diff --git a/node_modules/static-extend/node_modules/is-descriptor/LICENSE b/node_modules/static-extend/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/static-extend/node_modules/is-descriptor/README.md b/node_modules/static-extend/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..fd9ddcf --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/README.md @@ -0,0 +1,134 @@ +# is-descriptor [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Usage + +```js +const isDescriptor = require('is-descriptor'); +const assert = require('assert'); + +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +const obj = { foo: 'abc' }; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +assert.equal(isDescriptor(obj, 'foo'), true); +assert.equal(isDescriptor(obj, 'bar'), true); +``` + +## Examples + +### value type + +`false` when not an object + +```js +assert.equal(isDescriptor('a'), false); +assert.equal(isDescriptor(null), false); +assert.equal(isDescriptor([]), false); +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ value: 'foo' }), true); +assert.equal(isDescriptor({ value() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'baz' }), false); +assert.equal(isDescriptor({ value: 'foo', get() {} }), false); +assert.equal(isDescriptor({ get() {}, value() {} }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ value: 'foo', enumerable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', configurable: 'foo' }), false); +assert.equal(isDescriptor({ value: 'foo', writable: 'foo' }), false); +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +assert.equal(isDescriptor({ get() {}, set() {} }), true); +assert.equal(isDescriptor({ get() {} }), true); +assert.equal(isDescriptor({ set() {} }), true); +``` + +`false` when the object has invalid properties + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'baz' }), false); +assert.equal(isDescriptor({ get() {}, writable: true }), false); +assert.equal(isDescriptor({ get() {}, value: true }), false); +``` + +`false` when an accessor is not a function + +```js +assert.equal(isDescriptor({ get() {}, set: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set() {} }), false); +assert.equal(isDescriptor({ get: 'foo', bar: 'baz' }), false); +assert.equal(isDescriptor({ get: 'foo', set: 'baz' }), false); +``` + +`false` when a value is not the correct type + +```js +assert.equal(isDescriptor({ get() {}, set() {}, enumerable: 'foo' }), false); +assert.equal(isDescriptor({ set() {}, configurable: 'foo' }), false); +assert.equal(isDescriptor({ get() {}, configurable: 'foo' }), false); +``` + +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. +* [is-object](https://www.npmjs.com/package/is-object): Returns true if the value is an object and not an array or null. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-descriptor +[npm-version-svg]: https://versionbadg.es/inspect-js/is-descriptor.svg +[deps-svg]: https://david-dm.org/inspect-js/is-descriptor.svg +[deps-url]: https://david-dm.org/inspect-js/is-descriptor +[dev-deps-svg]: https://david-dm.org/inspect-js/is-descriptor/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-descriptor#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-descriptor.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-descriptor.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-descriptor.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-descriptor +[codecov-image]: https://codecov.io/gh/inspect-js/is-descriptor/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-descriptor/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-descriptor +[actions-url]: https://github.com/inspect-js/is-descriptor/actions diff --git a/node_modules/static-extend/node_modules/is-descriptor/index.js b/node_modules/static-extend/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9dd24d --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + return false; + } + + if ('get' in obj || 'set' in obj) { + return isAccessor(obj, key); + } + + return isData(obj, key); +}; diff --git a/node_modules/static-extend/node_modules/is-descriptor/package.json b/node_modules/static-extend/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..6d6ca8b --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/package.json @@ -0,0 +1,88 @@ +{ + "name": "is-descriptor", + "version": "0.1.7", + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-descriptor.git" + }, + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-descriptor/issues" + }, + "homepage": "https://github.com/inspect-js/is-descriptor", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/test/index.js b/node_modules/static-extend/node_modules/is-descriptor/test/index.js new file mode 100644 index 0000000..0b74a35 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/test/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var test = require('tape'); +var isDescriptor = require('../'); +var noop = function () {}; + +test('isDescriptor', function (t) { + t.test('is false when not an object:', function (st) { + st.notOk(isDescriptor('a')); + st.notOk(isDescriptor(null)); + st.notOk(isDescriptor([])); + + st.end(); + }); + + t.test('returns true if the property exists', function (st) { + var obj = { foo: null }; + + Object.defineProperty(obj, 'bar', { + value: 'xyz' + }); + + Object.defineProperty(obj, 'baz', { + get: function () { + return 'aaa'; + } + }); + + st.ok(isDescriptor(obj, 'foo')); + st.ok(isDescriptor(obj, 'bar')); + st.ok(isDescriptor(obj, 'baz')); + + st.end(); + }); + + t.test('data descriptor:', function (st) { + st.test('is false when the object has invalid properties:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', get: noop })); + s2t.notOk(isDescriptor({ get: noop, value: noop })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + s2t.ok(isDescriptor({ value: 'foo', bar: 'baz' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ value: 'foo' })); + s2t.ok(isDescriptor({ value: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ value: 'foo', enumerable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', configurable: 'foo' })); + s2t.notOk(isDescriptor({ value: 'foo', writable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); + + t.test('accessor descriptor:', function (st) { + st.test('should be false when the object has invalid properties:', function (s2t) { + s2t.ok(!isDescriptor({ get: noop, writable: true })); + s2t.ok(!isDescriptor({ get: noop, value: true })); + + s2t.end(); + }); + + st.test('is not false when the object has unrecognize properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop, bar: 'baz' })); + + s2t.end(); + }); + + st.test('is false when an accessor is not a function:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: noop })); + s2t.notOk(isDescriptor({ get: 'foo', bar: 'baz' })); + s2t.notOk(isDescriptor({ get: 'foo', set: 'baz' })); + + s2t.end(); + }); + + st.test('is false when "get" or "set" is not a function', function (s2t) { + s2t.notOk(isDescriptor({ set: 'foo' })); + s2t.notOk(isDescriptor({ get: 'foo' })); + + s2t.end(); + }); + + st.test('is true when the object has valid properties:', function (s2t) { + s2t.ok(isDescriptor({ get: noop, set: noop })); + s2t.ok(isDescriptor({ get: noop })); + + s2t.end(); + }); + + st.test('is false when a value is not the correct type:', function (s2t) { + s2t.notOk(isDescriptor({ get: noop, set: noop, enumerable: 'foo' })); + s2t.notOk(isDescriptor({ set: noop, configurable: 'foo' })); + s2t.notOk(isDescriptor({ get: noop, configurable: 'foo' })); + + s2t.end(); + }); + + st.end(); + }); +}); diff --git a/node_modules/static-extend/package.json b/node_modules/static-extend/package.json new file mode 100644 index 0000000..a63ab95 --- /dev/null +++ b/node_modules/static-extend/package.json @@ -0,0 +1,63 @@ +{ + "name": "static-extend", + "description": "Adds a static `extend` method to a class, to simplify inheritance. Extends the static properties, prototype properties, and descriptors from a `Parent` constructor onto `Child` constructors.", + "version": "0.1.2", + "homepage": "https://github.com/jonschlinkert/static-extend", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/static-extend", + "bugs": { + "url": "https://github.com/jonschlinkert/static-extend/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3" + }, + "keywords": [ + "class", + "ctor", + "descriptor", + "extend", + "extends", + "inherit", + "inheritance", + "merge", + "method", + "prop", + "properties", + "property", + "prototype" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-readme-generator" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/statuses/HISTORY.md b/node_modules/statuses/HISTORY.md new file mode 100644 index 0000000..a1977b2 --- /dev/null +++ b/node_modules/statuses/HISTORY.md @@ -0,0 +1,65 @@ +1.5.0 / 2018-03-27 +================== + + * Add `103 Early Hints` + +1.4.0 / 2017-10-20 +================== + + * Add `STATUS_CODES` export + +1.3.1 / 2016-11-11 +================== + + * Fix return type in JSDoc + +1.3.0 / 2016-05-17 +================== + + * Add `421 Misdirected Request` + * perf: enable strict mode + +1.2.1 / 2015-02-01 +================== + + * Fix message for status 451 + - `451 Unavailable For Legal Reasons` + +1.2.0 / 2014-09-28 +================== + + * Add `208 Already Repored` + * Add `226 IM Used` + * Add `306 (Unused)` + * Add `415 Unable For Legal Reasons` + * Add `508 Loop Detected` + +1.1.1 / 2014-09-24 +================== + + * Add missing 308 to `codes.json` + +1.1.0 / 2014-09-21 +================== + + * Add `codes.json` for universal support + +1.0.4 / 2014-08-20 +================== + + * Package cleanup + +1.0.3 / 2014-06-08 +================== + + * Add 308 to `.redirect` category + +1.0.2 / 2014-03-13 +================== + + * Add `.retry` category + +1.0.1 / 2014-03-12 +================== + + * Initial release diff --git a/node_modules/statuses/LICENSE b/node_modules/statuses/LICENSE new file mode 100644 index 0000000..28a3161 --- /dev/null +++ b/node_modules/statuses/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/statuses/README.md b/node_modules/statuses/README.md new file mode 100644 index 0000000..0fe5720 --- /dev/null +++ b/node_modules/statuses/README.md @@ -0,0 +1,127 @@ +# Statuses + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP status utility for node. + +This module provides a list of status codes and messages sourced from +a few different projects: + + * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) + * The [Node.js project](https://nodejs.org/) + * The [NGINX project](https://www.nginx.com/) + * The [Apache HTTP Server project](https://httpd.apache.org/) + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install statuses +``` + +## API + + + +```js +var status = require('statuses') +``` + +### var code = status(Integer || String) + +If `Integer` or `String` is a valid HTTP code or status message, then the +appropriate `code` will be returned. Otherwise, an error will be thrown. + + + +```js +status(403) // => 403 +status('403') // => 403 +status('forbidden') // => 403 +status('Forbidden') // => 403 +status(306) // throws, as it's not supported by node.js +``` + +### status.STATUS_CODES + +Returns an object which maps status codes to status messages, in +the same format as the +[Node.js http module](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). + +### status.codes + +Returns an array of all the status codes as `Integer`s. + +### var msg = status[code] + +Map of `code` to `status message`. `undefined` for invalid `code`s. + + + +```js +status[404] // => 'Not Found' +``` + +### var code = status[msg] + +Map of `status message` to `code`. `msg` can either be title-cased or +lower-cased. `undefined` for invalid `status message`s. + + + +```js +status['not found'] // => 404 +status['Not Found'] // => 404 +``` + +### status.redirect[code] + +Returns `true` if a status code is a valid redirect status. + + + +```js +status.redirect[200] // => undefined +status.redirect[301] // => true +``` + +### status.empty[code] + +Returns `true` if a status code expects an empty body. + + + +```js +status.empty[200] // => undefined +status.empty[204] // => true +status.empty[304] // => true +``` + +### status.retry[code] + +Returns `true` if you should retry the rest. + + + +```js +status.retry[501] // => undefined +status.retry[503] // => true +``` + +[npm-image]: https://img.shields.io/npm/v/statuses.svg +[npm-url]: https://npmjs.org/package/statuses +[node-version-image]: https://img.shields.io/node/v/statuses.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg +[travis-url]: https://travis-ci.org/jshttp/statuses +[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg +[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master +[downloads-image]: https://img.shields.io/npm/dm/statuses.svg +[downloads-url]: https://npmjs.org/package/statuses diff --git a/node_modules/statuses/codes.json b/node_modules/statuses/codes.json new file mode 100644 index 0000000..a09283a --- /dev/null +++ b/node_modules/statuses/codes.json @@ -0,0 +1,66 @@ +{ + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "103": "Early Hints", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "306": "(Unused)", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} diff --git a/node_modules/statuses/index.js b/node_modules/statuses/index.js new file mode 100644 index 0000000..4df469a --- /dev/null +++ b/node_modules/statuses/index.js @@ -0,0 +1,113 @@ +/*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var codes = require('./codes.json') + +/** + * Module exports. + * @public + */ + +module.exports = status + +// status code to message map +status.STATUS_CODES = codes + +// array of status codes +status.codes = populateStatusesMap(status, codes) + +// status codes for redirects +status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true +} + +// status codes for empty bodies +status.empty = { + 204: true, + 205: true, + 304: true +} + +// status codes for when you should retry the request +status.retry = { + 502: true, + 503: true, + 504: true +} + +/** + * Populate the statuses map for given codes. + * @private + */ + +function populateStatusesMap (statuses, codes) { + var arr = [] + + Object.keys(codes).forEach(function forEachCode (code) { + var message = codes[code] + var status = Number(code) + + // Populate properties + statuses[status] = message + statuses[message] = status + statuses[message.toLowerCase()] = status + + // Add to array + arr.push(status) + }) + + return arr +} + +/** + * Get the status code. + * + * Given a number, this will throw if it is not a known status + * code, otherwise the code will be returned. Given a string, + * the string will be parsed for a number and return the code + * if valid, otherwise will lookup the code assuming this is + * the status message. + * + * @param {string|number} code + * @returns {number} + * @public + */ + +function status (code) { + if (typeof code === 'number') { + if (!status[code]) throw new Error('invalid status code: ' + code) + return code + } + + if (typeof code !== 'string') { + throw new TypeError('code must be a number or string') + } + + // '403' + var n = parseInt(code, 10) + if (!isNaN(n)) { + if (!status[n]) throw new Error('invalid status code: ' + n) + return n + } + + n = status[code.toLowerCase()] + if (!n) throw new Error('invalid status message: "' + code + '"') + return n +} diff --git a/node_modules/statuses/package.json b/node_modules/statuses/package.json new file mode 100644 index 0000000..7595e2b --- /dev/null +++ b/node_modules/statuses/package.json @@ -0,0 +1,48 @@ +{ + "name": "statuses", + "description": "HTTP status utility", + "version": "1.5.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "repository": "jshttp/statuses", + "license": "MIT", + "keywords": [ + "http", + "status", + "code" + ], + "files": [ + "HISTORY.md", + "index.js", + "codes.json", + "LICENSE" + ], + "devDependencies": { + "csv-parse": "1.2.4", + "eslint": "4.19.1", + "eslint-config-standard": "11.0.0", + "eslint-plugin-import": "2.9.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "6.0.1", + "eslint-plugin-promise": "3.7.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5", + "raw-body": "2.3.2", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build.js", + "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "update": "npm run fetch && npm run build" + } +} diff --git a/node_modules/stream-combiner/.npmignore b/node_modules/stream-combiner/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/stream-combiner/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/stream-combiner/.travis.yml b/node_modules/stream-combiner/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/node_modules/stream-combiner/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/node_modules/stream-combiner/LICENSE b/node_modules/stream-combiner/LICENSE new file mode 100644 index 0000000..6d03581 --- /dev/null +++ b/node_modules/stream-combiner/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 'Dominic Tarr' + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/stream-combiner/README.md b/node_modules/stream-combiner/README.md new file mode 100644 index 0000000..565e0e2 --- /dev/null +++ b/node_modules/stream-combiner/README.md @@ -0,0 +1,29 @@ +# stream-combiner + + + +## Combine (stream1,...,streamN) + +Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream +and reads from the last stream. + +Listening for 'error' will recieve errors from all streams inside the pipe. + +``` js + var Combine = require('stream-combiner') + var es = require('event-stream') + + Combine( //connect streams together with `pipe` + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + callback(null + , inspect(JSON.parse(data))) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) +``` + +## License + +MIT diff --git a/node_modules/stream-combiner/index.js b/node_modules/stream-combiner/index.js new file mode 100644 index 0000000..99cf5b6 --- /dev/null +++ b/node_modules/stream-combiner/index.js @@ -0,0 +1,39 @@ +var duplexer = require('duplexer') + +module.exports = function () { + + var streams = [].slice.call(arguments) + , first = streams[0] + , last = streams[streams.length - 1] + , thepipe = duplexer(first, last) + + if(streams.length == 1) + return streams[0] + else if (!streams.length) + throw new Error('connect called with empty args') + + //pipe all the streams together + + function recurse (streams) { + if(streams.length < 2) + return + streams[0].pipe(streams[1]) + recurse(streams.slice(1)) + } + + recurse(streams) + + function onerror () { + var args = [].slice.call(arguments) + args.unshift('error') + thepipe.emit.apply(thepipe, args) + } + + //es.duplex already reemits the error from the first and last stream. + //add a listener for the inner streams in the pipeline. + for(var i = 1; i < streams.length - 1; i ++) + streams[i].on('error', onerror) + + return thepipe +} + diff --git a/node_modules/stream-combiner/package.json b/node_modules/stream-combiner/package.json new file mode 100644 index 0000000..c0e9845 --- /dev/null +++ b/node_modules/stream-combiner/package.json @@ -0,0 +1,21 @@ +{ + "name": "stream-combiner", + "version": "0.0.4", + "homepage": "https://github.com/dominictarr/stream-combiner", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/stream-combiner.git" + }, + "dependencies": { + "duplexer": "~0.1.1" + }, + "devDependencies": { + "tape": "~2.3.0", + "event-stream": "~3.0.7" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "author": "'Dominic Tarr' (http://dominictarr.com)", + "license": "MIT" +} diff --git a/node_modules/stream-combiner/test/index.js b/node_modules/stream-combiner/test/index.js new file mode 100644 index 0000000..d17ddad --- /dev/null +++ b/node_modules/stream-combiner/test/index.js @@ -0,0 +1,52 @@ +var es = require('event-stream') +var combine = require('..') +var test = require('tape') + +test('do not duplicate errors', function (test) { + + var errors = 0; + var pipe = combine( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }) + ) + + pipe.on('error', function(err) { + errors++ + test.ok(errors, 'expected error count') + process.nextTick(function () { + return test.end(); + }) + }) + + return pipe.write('meh'); +}) + +test('3 pipe do not duplicate errors', function (test) { + + var errors = 0; + var pipe = combine( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }), + es.through() + ) + + pipe.on('error', function(err) { + errors++ + test.ok(errors, 'expected error count') + process.nextTick(function () { + return test.end(); + }) + }) + + return pipe.write('meh'); + +}) + diff --git a/node_modules/string.prototype.padend/.editorconfig b/node_modules/string.prototype.padend/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/string.prototype.padend/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.padend/.eslintrc b/node_modules/string.prototype.padend/.eslintrc new file mode 100644 index 0000000..748d957 --- /dev/null +++ b/node_modules/string.prototype.padend/.eslintrc @@ -0,0 +1,20 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "new-cap": [2, { "capIsNewExceptions": ["ToLength", "ToString", "RequireObjectCoercible"] }], + "no-magic-numbers": [0] + }, + + "overrides": [ + { + "files": "test/**/*", + "rules": { + "no-invalid-this": 1, + }, + }, + ], +} diff --git a/node_modules/string.prototype.padend/.nycrc b/node_modules/string.prototype.padend/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/string.prototype.padend/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.padend/CHANGELOG.md b/node_modules/string.prototype.padend/CHANGELOG.md new file mode 100644 index 0000000..99c10d9 --- /dev/null +++ b/node_modules/string.prototype.padend/CHANGELOG.md @@ -0,0 +1,98 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.6](https://github.com/es-shims/String.prototype.padEnd/compare/v3.1.5...v3.1.6) - 2024-03-21 + +### Commits + +- [actions] use reusable workflows [`54902fb`](https://github.com/es-shims/String.prototype.padEnd/commit/54902fba3db6885780d0467c50026c4fb3bb0294) +- [Deps] update `call-bind`, `define-properties`, `es-abstract` [`b545f14`](https://github.com/es-shims/String.prototype.padEnd/commit/b545f14b4d363302dfdc75f1c1886ac07f61855d) +- [Refactor] use `es-object-atoms` where possible [`eb54e52`](https://github.com/es-shims/String.prototype.padEnd/commit/eb54e523dfbbd34c89c35905563c49067353f6bd) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`b1398f3`](https://github.com/es-shims/String.prototype.padEnd/commit/b1398f30cad11a230b58c6ac1a93b994fb96121b) +- [Tests] use `call-bind` instead of `function-bind` [`3bae558`](https://github.com/es-shims/String.prototype.padEnd/commit/3bae558871aa3b34a6dc7a40963b7d07a6976825) + +## [v3.1.5](https://github.com/es-shims/String.prototype.padEnd/compare/v3.1.4...v3.1.5) - 2023-09-04 + +### Commits + +- [Deps] update `define-properties`, `es-abstract` [`b5aa85c`](https://github.com/es-shims/String.prototype.padEnd/commit/b5aa85c9c212d293b6881d6d227af9f23a1ed6c1) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`bdce52b`](https://github.com/es-shims/String.prototype.padEnd/commit/bdce52b243fa2978cc01e61b9c93e85a4d659230) + +## [v3.1.4](https://github.com/es-shims/String.prototype.padEnd/compare/v3.1.3...v3.1.4) - 2022-11-07 + +### Commits + +- [actions] reuse common workflows [`1599a3a`](https://github.com/es-shims/String.prototype.padEnd/commit/1599a3af34b28f23014c96f4d30c2ce95931b151) +- [meta] use `npmignore` to autogenerate an npmignore file [`626d38c`](https://github.com/es-shims/String.prototype.padEnd/commit/626d38ce72992fe2d3f08f31fae71b6a2a1fb020) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`9aa073a`](https://github.com/es-shims/String.prototype.padEnd/commit/9aa073a07f12e026789146dac55be7efa1bba1c4) +- [meta] add `auto-changelog` [`e48bc74`](https://github.com/es-shims/String.prototype.padEnd/commit/e48bc7404f1db9c572b7a4bcf571ce2e923b01b8) +- [Deps] update `define-properties`, `es-abstract` [`7113258`](https://github.com/es-shims/String.prototype.padEnd/commit/7113258f12294af629dd3968a5ea509dd881ba2e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `tape` [`800dfc3`](https://github.com/es-shims/String.prototype.padEnd/commit/800dfc3bb40b4be12e0c221b9e606bad8f1d4006) +- [actions] update rebase action to use reusable workflow [`a3f9ddb`](https://github.com/es-shims/String.prototype.padEnd/commit/a3f9ddb4b25b55a7950ba3bc6a718bfab6eb7160) +- [actions] update codecov uploader [`6d2290f`](https://github.com/es-shims/String.prototype.padEnd/commit/6d2290fd32c506d6b49c37d7f110600ee4b8ef1b) + + + +3.1.3 / 2021-10-04 +================= + * [Robustness] remove runtime `.push` call + * [readme] add github actions/codecov badges + * [Deps] update `es-abstract` + * [meta] use `prepublishOnly` script for npm 7+ + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `tape` + * [actions] update workflows + * [actions] use `node/install` instead of `node/run`; use `codecov` action + +3.1.2 / 2021-02-20 +================= + * [meta] do not publish github action workflow files + * [Deps] update `call-bind`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape` + * [actions] update workflows + * [Tests] increase coverage + +3.1.1 / 2020-11-21 +================= + * [Deps] update `es-abstract`; use `call-bind` where applicable + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `tape`; add `aud`, `safe-publish-latest + * [meta] gitignore nyc output + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + * [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner + +3.1.0 / 2019-12-14 +================= + * [New] add `auto` entry point + * [Refactor] use split-up `es-abstract` (77% bundle size decrease) + * [readme] remove testling + * [readme] Stage 4 + * [Deps] update `define-properties`, `es-abstract`, `function-bind` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape`, `@es-shims/api`; use `functions-have-names` + * [meta] add `funding` field + * [meta] Only apps should have lockfiles + * [Tests] use shared travis-ci configs + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + * [actions] add automatic rebasing / merge commit blocking + +3.0.0 / 2015-11-17 +================= + * Renamed to `padStart`/`padEnd` per November 2015 TC39 meeting. + +2.0.0 / 2015-09-25 +================= + * Implement the [es-shim API](es-shims/api). + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Deps] update `es-abstract` + * [Dev Deps] Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config`, `nsp` + * [Refactor] Remove redundant `max` operation, per https://github.com/ljharb/proposal-string-pad-left-right/pull/2 + +1.0.0 / 2015-07-30 +================= + * v1.0.0 diff --git a/node_modules/string.prototype.padend/LICENSE b/node_modules/string.prototype.padend/LICENSE new file mode 100644 index 0000000..4193abd --- /dev/null +++ b/node_modules/string.prototype.padend/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 EcmaScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/string.prototype.padend/README.md b/node_modules/string.prototype.padend/README.md new file mode 100644 index 0000000..3d7bbc6 --- /dev/null +++ b/node_modules/string.prototype.padend/README.md @@ -0,0 +1,46 @@ +# String.prototype.padEnd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES2017 spec-compliant `String.prototype.padEnd` shim. Invoke its "shim" method to shim `String.prototype.padEnd` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://github.com/tc39/ecma262/pull/581). + +Most common usage: +```js +var padEnd = require('string.prototype.padend'); + +assert(padEnd('foo', 5, 'bar') === 'fooba'); + +padEnd.shim(); + +assert(padEnd('foo', 2) === 'foo'.padEnd(2)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.padend +[npm-version-svg]: http://versionbadg.es/es-shims/String.prototype.padEnd.svg +[travis-svg]: https://travis-ci.org/es-shims/String.prototype.padEnd.svg +[travis-url]: https://travis-ci.org/es-shims/String.prototype.padEnd +[deps-svg]: https://david-dm.org/es-shims/String.prototype.padEnd.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.padEnd +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.padEnd/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.padEnd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/string.prototype.padend.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/string.prototype.padend.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/string.prototype.padend.svg +[downloads-url]: http://npm-stat.com/charts.html?package=string.prototype.padend +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.padEnd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.padEnd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.padEnd +[actions-url]: https://github.com/es-shims/String.prototype.padEnd/actions diff --git a/node_modules/string.prototype.padend/auto.js b/node_modules/string.prototype.padend/auto.js new file mode 100644 index 0000000..8ebf606 --- /dev/null +++ b/node_modules/string.prototype.padend/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.padend/implementation.js b/node_modules/string.prototype.padend/implementation.js new file mode 100644 index 0000000..a5178a1 --- /dev/null +++ b/node_modules/string.prototype.padend/implementation.js @@ -0,0 +1,35 @@ +'use strict'; + +var ToLength = require('es-abstract/2024/ToLength'); +var ToString = require('es-abstract/2024/ToString'); +var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); +var callBound = require('call-bind/callBound'); + +var $slice = callBound('String.prototype.slice'); + +module.exports = function padEnd(maxLength) { + var O = RequireObjectCoercible(this); + var S = ToString(O); + var stringLength = ToLength(S.length); + var fillString; + if (arguments.length > 1) { + fillString = arguments[1]; + } + var filler = typeof fillString === 'undefined' ? '' : ToString(fillString); + if (filler === '') { + filler = ' '; + } + var intMaxLength = ToLength(maxLength); + if (intMaxLength <= stringLength) { + return S; + } + var fillLen = intMaxLength - stringLength; + while (filler.length < fillLen) { + var fLen = filler.length; + var remainingCodeUnits = fillLen - fLen; + filler += fLen > remainingCodeUnits ? $slice(filler, 0, remainingCodeUnits) : filler; + } + + var truncatedStringFiller = filler.length > fillLen ? $slice(filler, 0, fillLen) : filler; + return S + truncatedStringFiller; +}; diff --git a/node_modules/string.prototype.padend/index.js b/node_modules/string.prototype.padend/index.js new file mode 100644 index 0000000..9164d81 --- /dev/null +++ b/node_modules/string.prototype.padend/index.js @@ -0,0 +1,25 @@ +'use strict'; + +var define = require('define-properties'); +var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind.apply(getPolyfill()); + +var boundPadEnd = function padEnd(str, maxLength) { + RequireObjectCoercible(str); + var args = arguments.length > 2 ? [maxLength, arguments[2]] : [maxLength]; + return bound(str, args); +}; + +define(boundPadEnd, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundPadEnd; diff --git a/node_modules/string.prototype.padend/package.json b/node_modules/string.prototype.padend/package.json new file mode 100644 index 0000000..01449d6 --- /dev/null +++ b/node_modules/string.prototype.padend/package.json @@ -0,0 +1,98 @@ +{ + "name": "string.prototype.padend", + "version": "3.1.6", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES2017 spec-compliant String.prototype.padEnd shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.padEnd.git" + }, + "keywords": [ + "String.prototype.padRight", + "String.prototype.padEnd", + "string", + "ES2017", + "ES8", + "shim", + "trim", + "padLeft", + "padRight", + "padStart", + "padEnd", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "3.1.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/string.prototype.padend/polyfill.js b/node_modules/string.prototype.padend/polyfill.js new file mode 100644 index 0000000..c424523 --- /dev/null +++ b/node_modules/string.prototype.padend/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return typeof String.prototype.padEnd === 'function' ? String.prototype.padEnd : implementation; +}; diff --git a/node_modules/string.prototype.padend/shim.js b/node_modules/string.prototype.padend/shim.js new file mode 100644 index 0000000..3daaa81 --- /dev/null +++ b/node_modules/string.prototype.padend/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var getPolyfill = require('./polyfill'); +var define = require('define-properties'); + +module.exports = function shimPadEnd() { + var polyfill = getPolyfill(); + define(String.prototype, { padEnd: polyfill }, { + padEnd: function testPadEnd() { + return String.prototype.padEnd !== polyfill; + } + }); + return polyfill; +}; diff --git a/node_modules/string.prototype.padend/test/.eslintrc b/node_modules/string.prototype.padend/test/.eslintrc new file mode 100644 index 0000000..168cdf8 --- /dev/null +++ b/node_modules/string.prototype.padend/test/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "max-statements-per-line": [2, { "max": 2 }] + } +} diff --git a/node_modules/string.prototype.padend/test/implementation.js b/node_modules/string.prototype.padend/test/implementation.js new file mode 100644 index 0000000..8408e6c --- /dev/null +++ b/node_modules/string.prototype.padend/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var padEnd = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { padEnd.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { padEnd.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(padEnd), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.padend/test/index.js b/node_modules/string.prototype.padend/test/index.js new file mode 100644 index 0000000..d38ad4a --- /dev/null +++ b/node_modules/string.prototype.padend/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var padEnd = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { padEnd(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { padEnd(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(padEnd, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.padend/test/shimmed.js b/node_modules/string.prototype.padend/test/shimmed.js new file mode 100644 index 0000000..4f86b49 --- /dev/null +++ b/node_modules/string.prototype.padend/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(String.prototype.padEnd.length, 1, 'String#padEnd has a length of 1'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(String.prototype.padEnd.name, 'padEnd', 'String#padEnd has name "padEnd"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'padEnd'), 'String#padEnd is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.padEnd.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.padEnd.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(String.prototype.padEnd), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.padend/test/tests.js b/node_modules/string.prototype.padend/test/tests.js new file mode 100644 index 0000000..d62fa48 --- /dev/null +++ b/node_modules/string.prototype.padend/test/tests.js @@ -0,0 +1,26 @@ +'use strict'; + +module.exports = function (padEnd, t) { + t.test('normal cases', function (st) { + st.equal(padEnd('a', 3, 'b'), 'abb', 'string pads end with single character'); + st.equal(padEnd('abc', 3, 'd'), 'abc', 'string already of maximum length noops'); + st.equal(padEnd('abc', -3, 'd'), 'abc', 'string already larger than maximum length noops'); + st.equal(padEnd('cd', 3, 'ab'), 'cda', 'string with maximum length equal to length plus filler length, pads'); + st.equal(padEnd('abc'), 'abc', 'absent maximum length is noop'); + st.equal(padEnd('a', 3), 'a ', 'absent fillStr defaults to a space'); + st.equal(padEnd('ed', 6, null), 'ednull', 'non-string fillStr gets stringified'); + + st.end(); + }); + + t.test('truncated fill string', function (st) { + st.equal(padEnd('a', 2, 'bc'), 'ab', 'truncates at the provided max length'); + + st.end(); + }); + + t.test('exceptions', function (st) { + + st.end(); + }); +}; diff --git a/node_modules/string.prototype.trim/.editorconfig b/node_modules/string.prototype.trim/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/string.prototype.trim/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.trim/.eslintrc b/node_modules/string.prototype.trim/.eslintrc new file mode 100644 index 0000000..2bbc53b --- /dev/null +++ b/node_modules/string.prototype.trim/.eslintrc @@ -0,0 +1,25 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "RequireObjectCoercible", + "ToString", + ], + }], + "no-invalid-this": 1, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "id-length": 0, + }, + }, + ], +} diff --git a/node_modules/string.prototype.trim/.nycrc b/node_modules/string.prototype.trim/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/string.prototype.trim/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.trim/CHANGELOG.md b/node_modules/string.prototype.trim/CHANGELOG.md new file mode 100644 index 0000000..92a375f --- /dev/null +++ b/node_modules/string.prototype.trim/CHANGELOG.md @@ -0,0 +1,189 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.9](https://github.com/es-shims/String.prototype.trim/compare/v1.2.8...v1.2.9) - 2024-03-16 + +### Commits + +- [Refactor] use `es-object-atoms`; update `call-bind`, `define-properties`, `es-abstract` [`f6fe1af`](https://github.com/es-shims/String.prototype.trim/commit/f6fe1af4cb9381757971b294afc845e3b2e7c1e9) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`d4e2b81`](https://github.com/es-shims/String.prototype.trim/commit/d4e2b81878478d7090826b73d52bc42f117a2189) + +## [v1.2.8](https://github.com/es-shims/String.prototype.trim/compare/v1.2.7...v1.2.8) - 2023-09-07 + +### Commits + +- [Tests] add passing test cases [`2ab172c`](https://github.com/es-shims/String.prototype.trim/commit/2ab172c3ddeec62fb4f6ead3c7e10d24e340ecad) +- [Deps] update `es-abstract` [`8c16598`](https://github.com/es-shims/String.prototype.trim/commit/8c16598aba57e30c5e8446f91fb998a5790c1f81) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`2b99fad`](https://github.com/es-shims/String.prototype.trim/commit/2b99fad6f32386b5bf1b304acb0fdd2a73c77a95) +- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/eslint-config`, `aud`, `tape` [`97be2b5`](https://github.com/es-shims/String.prototype.trim/commit/97be2b55a3902753f50fadc2e9df6b7ff0f0f669) +- [Deps] update `define-properties`, `es-abstract` [`1fdc65f`](https://github.com/es-shims/String.prototype.trim/commit/1fdc65ff4b9c73cc9d132832943a89a57f1f93a5) + +## [v1.2.7](https://github.com/es-shims/String.prototype.trim/compare/v1.2.6...v1.2.7) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3e6de84`](https://github.com/es-shims/String.prototype.trim/commit/3e6de84f959c1ecc44e894aa1a64a8eb5007f3f5) +- [actions] update rebase action to use reusable workflow [`b725a04`](https://github.com/es-shims/String.prototype.trim/commit/b725a0499b832e69dfe5121bb643464a659ba8ff) +- [Deps] update `es-abstract` [`b707a17`](https://github.com/es-shims/String.prototype.trim/commit/b707a1747363f361665c50eda5eb952a86755e8c) +- [Dev Deps] update `aud`, `tape` [`5295419`](https://github.com/es-shims/String.prototype.trim/commit/5295419b0bbaf8035696ef3a24a8625ee743ec7f) + +## [v1.2.6](https://github.com/es-shims/String.prototype.trim/compare/v1.2.5...v1.2.6) - 2022-04-24 + +### Commits + +- [actions] reuse common workflows [`dbfc093`](https://github.com/es-shims/String.prototype.trim/commit/dbfc0932e7b2fad166245599310a1d84a1be0882) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`56bbb86`](https://github.com/es-shims/String.prototype.trim/commit/56bbb86b8e514a16fc47e095b8c1014e12a2e92a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`7fa437e`](https://github.com/es-shims/String.prototype.trim/commit/7fa437e4c3d25798d979294a121f93cb4346ba04) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`716a060`](https://github.com/es-shims/String.prototype.trim/commit/716a06080dbca68ec8e3b2e0e18c0a333ed28594) +- [actions] update codecov uploader [`9a39958`](https://github.com/es-shims/String.prototype.trim/commit/9a39958a13e20d6b9f01f9fce71dd37cc03da52e) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`24220c4`](https://github.com/es-shims/String.prototype.trim/commit/24220c49dcb7055b5b94eb52c4d610428e19d3e4) +- [Deps] update `define-properties`, `es-abstract` [`c6008ea`](https://github.com/es-shims/String.prototype.trim/commit/c6008ea9007741755710b70ae05003cb71a7d1bd) + +## [v1.2.5](https://github.com/es-shims/String.prototype.trim/compare/v1.2.4...v1.2.5) - 2021-10-03 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`37d5a61`](https://github.com/es-shims/String.prototype.trim/commit/37d5a61c95a26c079b30e2d9d2ffdb70f36ca9cf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`4c4a85e`](https://github.com/es-shims/String.prototype.trim/commit/4c4a85e5f521ae9811ac1205af933e3845b5a24e) +- [readme] add github actions/codecov badges [`9980eee`](https://github.com/es-shims/String.prototype.trim/commit/9980eee58866b08218ff3257a3af2aa9e29774fc) +- [Deps] update `es-abstract` [`6c1da80`](https://github.com/es-shims/String.prototype.trim/commit/6c1da806270fd909a76fc43e3dfe91be46058382) +- [readme] remove defunct testling badge [`8d282d1`](https://github.com/es-shims/String.prototype.trim/commit/8d282d1becd5f8d3ffe0e6e1dbfa2ddf29071670) +- [Dev Deps] update `eslint`, `tape` [`8856c26`](https://github.com/es-shims/String.prototype.trim/commit/8856c2663b5495cafb930e009f68e2d22958cac0) +- [actions] update workflows [`62cd341`](https://github.com/es-shims/String.prototype.trim/commit/62cd3412aaeee13c0d2cfe7f9bd33297e7279989) +- [meta] use `prepublishOnly` script for npm 7+ [`abd99c4`](https://github.com/es-shims/String.prototype.trim/commit/abd99c4a9838847efb3db7ddf579fb4bda8f6030) +- [Deps] update `es-abstract` [`802cb7b`](https://github.com/es-shims/String.prototype.trim/commit/802cb7b69b3a0c9a9b9642d641f0af490bd9dde7) + +## [v1.2.4](https://github.com/es-shims/String.prototype.trim/compare/v1.2.3...v1.2.4) - 2021-02-21 + +### Commits + +- [meta] do not publish github action workflow files [`936161b`](https://github.com/es-shims/String.prototype.trim/commit/936161bf43c83e09bc39c4d472d313c8f64e3fe3) +- [readme] remove travis badge [`9a28c39`](https://github.com/es-shims/String.prototype.trim/commit/9a28c3943b51a2cc87694c954205249122256d92) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape` [`7b4be8d`](https://github.com/es-shims/String.prototype.trim/commit/7b4be8d12365feb5b42658902cf18316508a0c62) +- [Tests] increase coverage [`31b8735`](https://github.com/es-shims/String.prototype.trim/commit/31b87354f55f24501ca8b2f02477cb692a70457c) +- [actions] update workflows [`eda6ab7`](https://github.com/es-shims/String.prototype.trim/commit/eda6ab73fea52b49b74653e96ac81d5372599dc8) +- [Deps] update `call-bind`, `es-abstract` [`083f88f`](https://github.com/es-shims/String.prototype.trim/commit/083f88f5342144f337f1f82874cb8cd6f27f2262) + +## [v1.2.3](https://github.com/es-shims/String.prototype.trim/compare/v1.2.2...v1.2.3) - 2020-11-21 + +### Commits + +- [Tests] migrate tests to Github Actions [`6768c8d`](https://github.com/es-shims/String.prototype.trim/commit/6768c8d5569a6fcc841436b98a19ddf6b63c7de4) +- [Tests] run `nyc` on all tests [`2fd5baa`](https://github.com/es-shims/String.prototype.trim/commit/2fd5baa7239a4d449338e0333e2dc4573597962e) +- [Deps] update `es-abstract`; use `call-bind` where applicable [`e4e8c6e`](https://github.com/es-shims/String.prototype.trim/commit/e4e8c6ede423ee8c384564092f624f980097bb28) +- [Dev Deps] update `eslint`, `aud`, `auto-changelog` [`a21c1d5`](https://github.com/es-shims/String.prototype.trim/commit/a21c1d5c87ec9b1b5107b0a1faf138993951081c) + +## [v1.2.2](https://github.com/es-shims/String.prototype.trim/compare/v1.2.1...v1.2.2) - 2020-09-15 + +### Commits + +- [Tests] use `nyc` for coverage` [`0884270`](https://github.com/es-shims/String.prototype.trim/commit/0884270b26f7e6f7602d9f355dc3b4d5cd12d97e) +- [Tests] add implementation tests [`475c480`](https://github.com/es-shims/String.prototype.trim/commit/475c4804224a11bb6fba6d1407b59f7aab2c5d4e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`d70d913`](https://github.com/es-shims/String.prototype.trim/commit/d70d9136bc76499ecee1997068b7f3d1ba0f94e8) +- [actions] add "Allow Edits" workflow [`6e6be23`](https://github.com/es-shims/String.prototype.trim/commit/6e6be23aa679e02836e1f3e65bd09dd30c3fd2ae) +- [Refactor] use `RequireObjectCoercible` instead of `CheckObjectCoercible` [`5bfaf17`](https://github.com/es-shims/String.prototype.trim/commit/5bfaf1731edd5fcd01ec07f75717eebdf4992e4c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `functions-have-names`; add `safe-publish-latest` [`65be600`](https://github.com/es-shims/String.prototype.trim/commit/65be600028222127c1faaeacea810bc042f35f70) +- [Deps] update `es-abstract`, remove `function-bind` [`5f4d1ec`](https://github.com/es-shims/String.prototype.trim/commit/5f4d1ec8f2c13a4b4fde171ca2029e1ec4057b2b) +- [Refactor] switch from 2019 to 2020 AOs [`4c2d5d2`](https://github.com/es-shims/String.prototype.trim/commit/4c2d5d23f63731958007d856767f5a2f9c779c15) +- [Dev Deps] update `auto-changelog`, `tape` [`c7fc9e2`](https://github.com/es-shims/String.prototype.trim/commit/c7fc9e22b09d24a9aa9e68358d4a5ba10e25ff04) +- [Dev Deps] update `auto-changelog`; add `aud` [`e1dec36`](https://github.com/es-shims/String.prototype.trim/commit/e1dec364391ea5d7dc8339d2da279fdc511cdbe9) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`35826c2`](https://github.com/es-shims/String.prototype.trim/commit/35826c21b140a3c1431bd20c3443da23888b92bc) +- [Deps] update `es-abstract` [`54095ef`](https://github.com/es-shims/String.prototype.trim/commit/54095ef76d193c8595516977e98343f8db754e2d) +- [Deps] update `es-abstract` [`486dd9c`](https://github.com/es-shims/String.prototype.trim/commit/486dd9c68c5843a9f50cde55749d34edb9702616) + +## [v1.2.1](https://github.com/es-shims/String.prototype.trim/compare/v1.2.0...v1.2.1) - 2019-12-16 + +### Commits + +- [Tests] use shared travis-ci configs [`52f7e64`](https://github.com/es-shims/String.prototype.trim/commit/52f7e643f128e04ed0139c1cb3da7b7907ea639f) +- [meta] add `auto-changelog` [`6284c06`](https://github.com/es-shims/String.prototype.trim/commit/6284c061c8f4de4314a43e8600ff879164ab162c) +- [meta] remove unused Makefile and associated utilities [`8c781cd`](https://github.com/es-shims/String.prototype.trim/commit/8c781cd4bad87f7bf31dae256ef0f1c19cec2113) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names` [`c54b481`](https://github.com/es-shims/String.prototype.trim/commit/c54b481743611e736315c10885cfc861d306e64a) +- [Refactor] use split-up `es-abstract` (57% bundle size decrease) [`b0378c9`](https://github.com/es-shims/String.prototype.trim/commit/b0378c99988846b0a8edf3fcfd08f30dd632f5a9) +- [actions] add automatic rebasing / merge commit blocking [`bffe893`](https://github.com/es-shims/String.prototype.trim/commit/bffe893990837250f8a3c4714bd52675251af5c7) +- [meta] add `funding` field [`0559449`](https://github.com/es-shims/String.prototype.trim/commit/05594490366fad2d8e4bd435937fbd81169d965a) +- [Deps] update `es-abstract` [`c44d307`](https://github.com/es-shims/String.prototype.trim/commit/c44d307a50bb1fc53811b49d9203cd794ed1bae4) + +## [v1.2.0](https://github.com/es-shims/String.prototype.trim/compare/v1.1.2...v1.2.0) - 2019-07-24 + +### Commits + +- [Tests] up to `node` `v12.6`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `4.9`; use `nvm install-latest-npm` [`b857148`](https://github.com/es-shims/String.prototype.trim/commit/b857148644d305f720b2dd9bf691b7dc2930f91d) +- [Tests] remove `jscs` [`ad1dea7`](https://github.com/es-shims/String.prototype.trim/commit/ad1dea7f6114de79d637e82cdfaf1aa5499bd358) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `replace`, `semver`, `tape` [`fcbc11d`](https://github.com/es-shims/String.prototype.trim/commit/fcbc11d4af9be65f4f7eb4aec20498c7a33a004f) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`06a4ffa`](https://github.com/es-shims/String.prototype.trim/commit/06a4ffa3078d4ab65418e878d3ef7b03277e8a1f) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`3554fb1`](https://github.com/es-shims/String.prototype.trim/commit/3554fb1fe722004080000b0767f7f89676a3d73a) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`804b2f2`](https://github.com/es-shims/String.prototype.trim/commit/804b2f244c257b32cb2473eb1a829ce97dc6a0a5) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`6a69408`](https://github.com/es-shims/String.prototype.trim/commit/6a694081cdd9aa9296ea181e4d2b4c6fe656bb16) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`e89adee`](https://github.com/es-shims/String.prototype.trim/commit/e89adeefcbd6fb59563e62d230b8036d65a8bf69) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`1280e56`](https://github.com/es-shims/String.prototype.trim/commit/1280e5629deb4554c7077d0e452399c03c06f7b1) +- [New] add `auto` entry point [`bb00b15`](https://github.com/es-shims/String.prototype.trim/commit/bb00b1551d2774e216b5d316b552d08a7f0619d4) +- [Tests] fix tests for the mongolian vowel separator [`a35f627`](https://github.com/es-shims/String.prototype.trim/commit/a35f6275ec7b4d6b47136a007fd07566e037cac8) +- [Tests] up to `node` `v5.9`, `v4.4` [`b541b9b`](https://github.com/es-shims/String.prototype.trim/commit/b541b9b46873be859aea6c5b1e7f6f54323ea139) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`b52022d`](https://github.com/es-shims/String.prototype.trim/commit/b52022d809922914827c34bcf2c1f81b68bde092) +- [Tests] use pretest/posttest for linting/security [`39f5684`](https://github.com/es-shims/String.prototype.trim/commit/39f56844f30f630ab5497f38153b8f0646ed1d96) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`8c358c2`](https://github.com/es-shims/String.prototype.trim/commit/8c358c22ee57bd5e7b437fb707230399ea7c42aa) +- [Tests] up to `node` `v6.2` [`2ac7e1f`](https://github.com/es-shims/String.prototype.trim/commit/2ac7e1f90088bb0c96986006539ffebb6b2a6eda) +- Only apps should have lockfiles [`cb15ed5`](https://github.com/es-shims/String.prototype.trim/commit/cb15ed57fbf3ba3f2d7f24af957e8ff41421dd81) +- [Deps] update `define-properties`, `es-abstract`, `function-bind` [`5e0371a`](https://github.com/es-shims/String.prototype.trim/commit/5e0371af5c7b8fee49a0e7d1bcc26fcf41743779) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api` [`37bae7f`](https://github.com/es-shims/String.prototype.trim/commit/37bae7f8f4952b376036d924673b9e885da022f8) +- [Tests] on `node` `v5.6`, `v4.3` [`33017cf`](https://github.com/es-shims/String.prototype.trim/commit/33017cf0d3aade480c357ee8aedaca7bc5a75092) +- [Tests] allow coverage to fail [`0d7b1e3`](https://github.com/es-shims/String.prototype.trim/commit/0d7b1e365484f8c33247b60e2a07748dc2183d40) +- [Tests] use `functions-have-names` [`3e68777`](https://github.com/es-shims/String.prototype.trim/commit/3e687776f6a45e3a6d129705aad3bb4863758114) +- [Tests] on `node` `v5.12` [`32ea49d`](https://github.com/es-shims/String.prototype.trim/commit/32ea49d7572b3f981d036ea060e3ed3559ad78ef) +- [Deps] update `es-abstract` [`15f7f24`](https://github.com/es-shims/String.prototype.trim/commit/15f7f249619b7aab941c6c8156cb81ed57c39b7e) +- [Tests] on `node` `v5.10` [`080c50f`](https://github.com/es-shims/String.prototype.trim/commit/080c50fc617de7ac024d443d4a9b76ba295bd744) +- [Deps] update `function-bind` [`532480e`](https://github.com/es-shims/String.prototype.trim/commit/532480e07ad7bf22da64d401ede35928d21ff558) + +## [v1.1.2](https://github.com/es-shims/String.prototype.trim/compare/v1.1.1...v1.1.2) - 2016-02-06 + +### Commits + +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`df94d07`](https://github.com/es-shims/String.prototype.trim/commit/df94d07e12ca1e52739353f534a3d89e0a860a70) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`ef78d89`](https://github.com/es-shims/String.prototype.trim/commit/ef78d89148efe8d371fb828923dd149163e2c5c6) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`b746516`](https://github.com/es-shims/String.prototype.trim/commit/b7465166a48828367bedaa2d42a30a5e148dcaae) +- package.json: use object form of "authors", add "contributors" [`a799df1`](https://github.com/es-shims/String.prototype.trim/commit/a799df17322ae526d5c8732c75bd5bcc3d1f649f) +- [Tests] up to `node` `v5.5`, don’t allow `0.8` to fail [`7fea308`](https://github.com/es-shims/String.prototype.trim/commit/7fea3082424fbeb25f2cb88884a999326ca428f2) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`d14c7c1`](https://github.com/es-shims/String.prototype.trim/commit/d14c7c1850fb8e3a9f1d153bd818ed3beacdbadc) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`2903359`](https://github.com/es-shims/String.prototype.trim/commit/29033591ca3e65977e2746537c94b7e2e8b65ecc) +- [Tests] fix npm upgrades for older nodes [`0a6cbfa`](https://github.com/es-shims/String.prototype.trim/commit/0a6cbfa0ac506703ed554f6dc8bbde7ac1977cd4) +- [Deps] update `define-properties`, `es-abstract` [`39ccb08`](https://github.com/es-shims/String.prototype.trim/commit/39ccb0881762d762934ef2cb3c0459c65b3abf72) +- [Deps] update `es-abstract` [`c40e4fb`](https://github.com/es-shims/String.prototype.trim/commit/c40e4fb229e1a6a3e3c6818fc680ca380f2d866c) +- Use the polyfill, not the implementation, as the default export. [`0fe847e`](https://github.com/es-shims/String.prototype.trim/commit/0fe847e901871f1a8f33a66be2cd518bf8dcd0e1) +- [Tests] on `node` `v4.2` [`589743c`](https://github.com/es-shims/String.prototype.trim/commit/589743c0f8b1432a79cfed4b29187e6a9760a87b) +- [Deps] update `es-abstract` [`85bad8e`](https://github.com/es-shims/String.prototype.trim/commit/85bad8e217969a6e1eb7679a1bb06d6f075bd557) +- added assert [`aa81ac5`](https://github.com/es-shims/String.prototype.trim/commit/aa81ac55540a9e53a58ce0d1f5266ff36d403b3a) + +## [v1.1.1](https://github.com/es-shims/String.prototype.trim/compare/v1.1.0...v1.1.1) - 2015-08-16 + +### Commits + +- [Docs] remove "if" around `.shim` call in example [`b9ce088`](https://github.com/es-shims/String.prototype.trim/commit/b9ce08875f7252a85928e426db9b533cc5ee007a) + +## [v1.1.0](https://github.com/es-shims/String.prototype.trim/compare/v1.0.0...v1.1.0) - 2015-08-16 + +### Commits + +- Implement the [es-shim API](es-shims/api). [`5812703`](https://github.com/es-shims/String.prototype.trim/commit/581270337926462f9babf83772bcab71bc48bf8f) +- Move implementation to `implementation.js` [`e455b2a`](https://github.com/es-shims/String.prototype.trim/commit/e455b2af0e360358f02e54b556e698a971fc31f4) +- Fix `make release` [`efd2071`](https://github.com/es-shims/String.prototype.trim/commit/efd20711e9a226ad25e2b1e5ad7bbe85ef832d69) +- [Dev Deps] update `jscs` [`6c2fa95`](https://github.com/es-shims/String.prototype.trim/commit/6c2fa957538f139767de540693910cf1f49c8d3a) +- [Deps] update `es-abstract` [`de4cd87`](https://github.com/es-shims/String.prototype.trim/commit/de4cd876239d550f3c35e1db55a973cbb03c9b77) +- [Dev Deps] update `tape` [`2d07fe1`](https://github.com/es-shims/String.prototype.trim/commit/2d07fe19ff136467e1edbca91cfea6caac1b06d8) +- [Dev Deps] update `tape` [`e697efe`](https://github.com/es-shims/String.prototype.trim/commit/e697efe943cab07639d62649424c72e4f44f2469) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`6065103`](https://github.com/es-shims/String.prototype.trim/commit/6065103baa10f56b904f44693d5ba6b23ee6ba57) + +## v1.0.0 - 2015-08-08 + +### Commits + +- Dotfiles / Makefile [`b7f0e52`](https://github.com/es-shims/String.prototype.trim/commit/b7f0e526ea73136e00595d768faaba83a41da7ee) +- Tests [`4d61441`](https://github.com/es-shims/String.prototype.trim/commit/4d61441de9dcf2278dcd118077d4541843a47534) +- package.json [`2a2e0f2`](https://github.com/es-shims/String.prototype.trim/commit/2a2e0f2949dd30095eda20e1796483ea21dd7b38) +- Initial commit [`51aa18f`](https://github.com/es-shims/String.prototype.trim/commit/51aa18f299f8d340034670af0311c5981c89f713) +- Read me [`5681192`](https://github.com/es-shims/String.prototype.trim/commit/56811925aed1dd06a2cfa654b3f246b6a897a33c) +- Implementation [`87f08c5`](https://github.com/es-shims/String.prototype.trim/commit/87f08c565f7be56c2826386aa4a4e683a00d8871) diff --git a/node_modules/string.prototype.trim/LICENSE b/node_modules/string.prototype.trim/LICENSE new file mode 100644 index 0000000..fcf5754 --- /dev/null +++ b/node_modules/string.prototype.trim/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/string.prototype.trim/README.md b/node_modules/string.prototype.trim/README.md new file mode 100644 index 0000000..60b333f --- /dev/null +++ b/node_modules/string.prototype.trim/README.md @@ -0,0 +1,48 @@ +# String.prototype.trim [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES5 spec-compliant `String.prototype.trim` shim. Invoke its "shim" method to shim `String.prototype.trim` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the spec (both [ES5](https://262.ecma-international.org/5.1/#sec-15.5.4.20) and [current](https://tc39.es/ecma262/#sec-string.prototype.trim)). + +Most common usage: + +```js +var assert = require('assert'); +var trim = require('string.prototype.trim'); + +assert(trim(' \t\na \t\n') === 'a'); + +trim.shim(); // will be a no-op if not needed + +assert(trim(' \t\na \t\n') === ' \t\na \t\n'.trim()); +``` + +## Engine Bugs +Some implementations of `String#trim` incorrectly trim zero-width spaces. This shim detects and corrects this behavior. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.trim +[npm-version-svg]: https://versionbadg.es/es-shims/String.prototype.trim.svg +[deps-svg]: https://david-dm.org/es-shims/String.prototype.trim.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.trim +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trim/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trim#info=devDependencies +[license-image]: https://img.shields.io/npm/l/string.prototype.trim.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trim.svg +[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trim +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trim/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trim/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trim +[actions-url]: https://github.com/es-shims/String.prototype.trim/actions diff --git a/node_modules/string.prototype.trim/auto.js b/node_modules/string.prototype.trim/auto.js new file mode 100644 index 0000000..8ebf606 --- /dev/null +++ b/node_modules/string.prototype.trim/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.trim/implementation.js b/node_modules/string.prototype.trim/implementation.js new file mode 100644 index 0000000..9f66fa8 --- /dev/null +++ b/node_modules/string.prototype.trim/implementation.js @@ -0,0 +1,21 @@ +'use strict'; + +var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); +var ToString = require('es-abstract/2024/ToString'); +var callBound = require('call-bind/callBound'); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var leftWhitespace = mvsIsWS + ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +var rightWhitespace = mvsIsWS + ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trim() { + var S = ToString(RequireObjectCoercible(this)); + return $replace($replace(S, leftWhitespace, ''), rightWhitespace, ''); +}; diff --git a/node_modules/string.prototype.trim/index.js b/node_modules/string.prototype.trim/index.js new file mode 100644 index 0000000..ce41c88 --- /dev/null +++ b/node_modules/string.prototype.trim/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var callBind = require('call-bind'); +var define = require('define-properties'); +var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trim/package.json b/node_modules/string.prototype.trim/package.json new file mode 100644 index 0000000..9dd7a7c --- /dev/null +++ b/node_modules/string.prototype.trim/package.json @@ -0,0 +1,102 @@ +{ + "name": "string.prototype.trim", + "version": "1.2.9", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "ES5 spec-compliant shim for String.prototype.trim", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.trim.git" + }, + "keywords": [ + "String.prototype.trim", + "string", + "ES5", + "shim", + "trim", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/string.prototype.trim/polyfill.js b/node_modules/string.prototype.trim/polyfill.js new file mode 100644 index 0000000..534db4c --- /dev/null +++ b/node_modules/string.prototype.trim/polyfill.js @@ -0,0 +1,19 @@ +'use strict'; + +var implementation = require('./implementation'); + +var zeroWidthSpace = '\u200b'; +var mongolianVowelSeparator = '\u180E'; + +module.exports = function getPolyfill() { + if ( + String.prototype.trim + && zeroWidthSpace.trim() === zeroWidthSpace + && mongolianVowelSeparator.trim() === mongolianVowelSeparator + && ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator) + && (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_') + ) { + return String.prototype.trim; + } + return implementation; +}; diff --git a/node_modules/string.prototype.trim/shim.js b/node_modules/string.prototype.trim/shim.js new file mode 100644 index 0000000..607c909 --- /dev/null +++ b/node_modules/string.prototype.trim/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimStringTrim() { + var polyfill = getPolyfill(); + define(String.prototype, { trim: polyfill }, { + trim: function testTrim() { + return String.prototype.trim !== polyfill; + } + }); + return polyfill; +}; diff --git a/node_modules/string.prototype.trim/test/implementation.js b/node_modules/string.prototype.trim/test/implementation.js new file mode 100644 index 0000000..ba3ae59 --- /dev/null +++ b/node_modules/string.prototype.trim/test/implementation.js @@ -0,0 +1,21 @@ +'use strict'; + +var trim = require('../implementation'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var callBind = require('call-bind'); + +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { trim.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trim.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(trim), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trim/test/index.js b/node_modules/string.prototype.trim/test/index.js new file mode 100644 index 0000000..cc90851 --- /dev/null +++ b/node_modules/string.prototype.trim/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var trim = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { trim(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trim(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(trim, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trim/test/shimmed.js b/node_modules/string.prototype.trim/test/shimmed.js new file mode 100644 index 0000000..57cf69c --- /dev/null +++ b/node_modules/string.prototype.trim/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(String.prototype.trim.length, 0, 'String#trim has a length of 0'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(String.prototype.trim.name, 'trim', 'String#trim has name "trim"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'trim'), 'String#trim is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.trim.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.trim.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(String.prototype.trim), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trim/test/tests.js b/node_modules/string.prototype.trim/test/tests.js new file mode 100644 index 0000000..fcc0651 --- /dev/null +++ b/node_modules/string.prototype.trim/test/tests.js @@ -0,0 +1,62 @@ +'use strict'; + +var forEach = require('for-each'); + +module.exports = function (trim, t) { + t.test('normal cases', function (st) { + st.equal(trim(' \t\na \t\n'), 'a', 'strips whitespace off left and right sides'); + st.equal(trim('a'), 'a', 'noop when no whitespace'); + + var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + st.equal(trim(allWhitespaceChars + 'a' + allWhitespaceChars), 'a', 'all expected whitespace chars are trimmed'); + + st.end(); + }); + + // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ + var mongolianVowelSeparator = '\u180E'; + var mvsIsWS = (/^\s$/).test('\u180E'); + t.test('unicode >= 4 && < 6.3', function (st) { + st.equal( + trim(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + mvsIsWS ? 'a' : mongolianVowelSeparator + 'a' + mongolianVowelSeparator, + 'mongolian vowel separator is' + (mvsIsWS ? '' : ' not') + ' whitespace' + ); + + st.equal( + trim(mongolianVowelSeparator), + mvsIsWS ? '' : mongolianVowelSeparator + ); + st.equal( + trim('_' + mongolianVowelSeparator), + '_' + (mvsIsWS ? '' : mongolianVowelSeparator) + ); + st.equal( + trim(mongolianVowelSeparator + '_'), + (mvsIsWS ? '' : mongolianVowelSeparator) + '_' + ); + + st.end(); + }); + + t.test('zero-width spaces', function (st) { + var zeroWidth = '\u200b'; + st.equal(trim(zeroWidth), zeroWidth, 'zero width space does not trim'); + st.end(); + }); + + t.test('non-whitespace characters', function (st) { + // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. + var nonWhitespaces = { + '\\u0085': '\u0085', + '\\u200b': '\u200b', + '\\ufffe': '\ufffe' + }; + + forEach(nonWhitespaces, function (nonWhitespace, name) { + st.equal(trim(nonWhitespace), nonWhitespace, name + ' does not trim'); + }); + + st.end(); + }); +}; diff --git a/node_modules/string.prototype.trimend/.editorconfig b/node_modules/string.prototype.trimend/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/string.prototype.trimend/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.trimend/.eslintrc b/node_modules/string.prototype.trimend/.eslintrc new file mode 100644 index 0000000..8056b20 --- /dev/null +++ b/node_modules/string.prototype.trimend/.eslintrc @@ -0,0 +1,24 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + ], + }], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "id-length": 0, + "no-invalid-this": 1, + }, + }, + ], +} diff --git a/node_modules/string.prototype.trimend/.nycrc b/node_modules/string.prototype.trimend/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/string.prototype.trimend/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.trimend/CHANGELOG.md b/node_modules/string.prototype.trimend/CHANGELOG.md new file mode 100644 index 0000000..56118c3 --- /dev/null +++ b/node_modules/string.prototype.trimend/CHANGELOG.md @@ -0,0 +1,115 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.8](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.7...v1.0.8) - 2024-03-16 + +### Commits + +- [Refactor] replace `es-abstract` with `es-object-atoms` [`0df2b01`](https://github.com/es-shims/String.prototype.trimEnd/commit/0df2b018d3ba214e2435b9841a7a03fc06c24fd0) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`190e9c5`](https://github.com/es-shims/String.prototype.trimEnd/commit/190e9c5d74f84d8f90f61c9e9ad4b05f657df830) + +## [v1.0.7](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.6...v1.0.7) - 2023-09-07 + +### Commits + +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`1a10293`](https://github.com/es-shims/String.prototype.trimEnd/commit/1a102935636b564cd346d83666f62a9398864081) +- [Deps] update `define-properties`, `es-abstract` [`6ba2e19`](https://github.com/es-shims/String.prototype.trimEnd/commit/6ba2e19a78f9c63bad2daf0627ce7f2e33f1aeb9) + +## [v1.0.6](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.5...v1.0.6) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`1d1e717`](https://github.com/es-shims/String.prototype.trimEnd/commit/1d1e71720ada81e484c9bffb386f65d7a6a1335e) +- [actions] update rebase action to use reusable workflow [`83f2683`](https://github.com/es-shims/String.prototype.trimEnd/commit/83f268325cc37ca72bea995281167a9d2821810b) +- [Dev Deps] update `aud`, `tape` [`a3a9129`](https://github.com/es-shims/String.prototype.trimEnd/commit/a3a9129dd995a949bdb93d278f403aa400e088ed) +- [Deps] update `es-abstract` [`a6e476d`](https://github.com/es-shims/String.prototype.trimEnd/commit/a6e476dc0120a41a22e66b5079bf3b407da387fa) + +## [v1.0.5](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.4...v1.0.5) - 2022-05-02 + +### Commits + +- [actions] reuse common workflows [`69a56ce`](https://github.com/es-shims/String.prototype.trimEnd/commit/69a56ce95343848d5e498f8e939a0697db8ac9f2) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`5d7db31`](https://github.com/es-shims/String.prototype.trimEnd/commit/5d7db314948faac975705db56305b6cc3dae7ba9) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`bb1983d`](https://github.com/es-shims/String.prototype.trimEnd/commit/bb1983dc27504733ab883a42f55b134f679a642d) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`10a1091`](https://github.com/es-shims/String.prototype.trimEnd/commit/10a10916e1ffc8cdab78515b2cc521cc74c08277) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`a08e14b`](https://github.com/es-shims/String.prototype.trimEnd/commit/a08e14bfea5e27d419ef742e83f467a169a69971) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`1c4c8da`](https://github.com/es-shims/String.prototype.trimEnd/commit/1c4c8dab4aefc1c5823a61b5a0286bb6fe1e036c) +- [actions] update codecov uploader [`70c4a7c`](https://github.com/es-shims/String.prototype.trimEnd/commit/70c4a7c566fd5bf72475df9318ec2cd218ceca26) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`4b08ed7`](https://github.com/es-shims/String.prototype.trimEnd/commit/4b08ed78a579585b593b3ca4ac7919d13906e840) +- [readme] add github actions/codecov badges [`9805501`](https://github.com/es-shims/String.prototype.trimEnd/commit/980550105b304385bcccb8ec05a247e02c24d04a) +- [Dev Deps] update `eslint`, `tape` [`50ec335`](https://github.com/es-shims/String.prototype.trimEnd/commit/50ec335ed42b59d1ab626dbe412f4ae23ab99b4b) +- [actions] update workflows [`bf9c32e`](https://github.com/es-shims/String.prototype.trimEnd/commit/bf9c32efe08e98b53302df67581dc971b7a758cd) +- [meta] use `prepublishOnly` script for npm 7+ [`9d921bd`](https://github.com/es-shims/String.prototype.trimEnd/commit/9d921bdbcaf8cebebbc302e6df518cbc3e4907bd) +- [Deps] update `define-properties` [`15617ce`](https://github.com/es-shims/String.prototype.trimEnd/commit/15617ced8ac2ea3ab8324a04d16fd294b12059b5) + +## [v1.0.4](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.3...v1.0.4) - 2021-02-23 + +### Commits + +- [meta] do not publish github action workflow files [`08e735c`](https://github.com/es-shims/String.prototype.trimEnd/commit/08e735cd55b00ae78a9dc16c6b4e786f7931085b) +- [readme] remove travis badge [`10e0e47`](https://github.com/es-shims/String.prototype.trimEnd/commit/10e0e47cb2ecfd171e68b40f8486c5d007dcf3ef) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `has-strict-mode`, `tape` [`0871432`](https://github.com/es-shims/String.prototype.trimEnd/commit/0871432c70c2f6a3929acd740a5d1f57c939f345) +- [Tests] increase coverage [`711e6a6`](https://github.com/es-shims/String.prototype.trimEnd/commit/711e6a66660f30f7a30fef536be435af1a13d05c) +- [actions] update workflows [`deb0d06`](https://github.com/es-shims/String.prototype.trimEnd/commit/deb0d06f41ac1c3e1e640ecd1cf0e69303ab5799) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`e250b4a`](https://github.com/es-shims/String.prototype.trimEnd/commit/e250b4a38401e7c02a067dab26cc68316da47ef7) +- [meta] gitignore coverage output [`55231df`](https://github.com/es-shims/String.prototype.trimEnd/commit/55231dfd9829277ba5c3f07be5434dc385703ca9) +- [Deps] update `call-bind` [`0580f5f`](https://github.com/es-shims/String.prototype.trimEnd/commit/0580f5f915ecb87677764d03fe3cf023e3bee7d8) + +## [v1.0.3](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.2...v1.0.3) - 2020-11-21 + +### Commits + +- [Tests] migrate tests to Github Actions [`23e7a09`](https://github.com/es-shims/String.prototype.trimEnd/commit/23e7a09a4ad37c21c3db3d7761212c7d84a371a2) +- [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner [`26e8623`](https://github.com/es-shims/String.prototype.trimEnd/commit/26e8623cf35c1859d0b482d4bb5b3450d101a810) +- [Tests] run `nyc` on all tests [`a72a546`](https://github.com/es-shims/String.prototype.trimEnd/commit/a72a546f671c5d3ac65dff68b4db1a1cc7089bfd) +- [Deps] replace `es-abstract` with `call-bind` [`f07b87d`](https://github.com/es-shims/String.prototype.trimEnd/commit/f07b87dd452090a2601d666edceb1daa90d45f24) +- [Dev Deps] update `eslint`, `aud`; add `safe-publish-latest` [`122ecb7`](https://github.com/es-shims/String.prototype.trimEnd/commit/122ecb726b1dc043b9ef27fa5a7b4172a4d5df37) + +## [v1.0.2](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.1...v1.0.2) - 2020-10-20 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`a003e71`](https://github.com/es-shims/String.prototype.trimEnd/commit/a003e7166d8de16c551a14b0ec855187357cce43) +- [actions] add "Allow Edits" workflow [`0b4b43c`](https://github.com/es-shims/String.prototype.trimEnd/commit/0b4b43cb605f7b3532e61c43dfc7f1795296c5a4) +- [Deps] update `es-abstract` [`75ca6b0`](https://github.com/es-shims/String.prototype.trimEnd/commit/75ca6b0e9757d64013ae863cfaac49ebcb36f1cf) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`552016c`](https://github.com/es-shims/String.prototype.trimEnd/commit/552016cb631ac13c12bbbc0d6dd65012e5e79583) + +## [v1.0.1](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.0...v1.0.1) - 2020-04-09 + +### Commits + +- [meta] add some missing repo metadata [`6abe248`](https://github.com/es-shims/String.prototype.trimEnd/commit/6abe248ba0b57a8b0e16bbe01de07a4d37c421bc) +- [Dev Deps] update `auto-changelog` [`e2eaab2`](https://github.com/es-shims/String.prototype.trimEnd/commit/e2eaab2fd1bc27a3d224b3d76db16190c1dd6d08) + +## [v1.0.0](https://github.com/es-shims/String.prototype.trimEnd/compare/v0.1.0...v1.0.0) - 2020-03-30 + +### Commits + +- [Breaking] convert to es-shim API [`2c6ef13`](https://github.com/es-shims/String.prototype.trimEnd/commit/2c6ef13d3f0b07a9bc55e367b311dbb731780405) +- [meta] add `auto-changelog` [`6f1fcc1`](https://github.com/es-shims/String.prototype.trimEnd/commit/6f1fcc1739de1e9541bd603b659807646a13dd7f) +- [meta] update readme [`ed4ce0d`](https://github.com/es-shims/String.prototype.trimEnd/commit/ed4ce0d84d53e626b48375c5959be20332464eaf) +- [Tests] add `npm run lint` [`eadaf2c`](https://github.com/es-shims/String.prototype.trimEnd/commit/eadaf2c83f2d791b54d80d7b30a9961ebc0f246f) +- Only apps should have lockfiles [`44d355f`](https://github.com/es-shims/String.prototype.trimEnd/commit/44d355f7dafcb0b51c5001824b07f7a2b9f1d06e) +- [actions] add automatic rebasing / merge commit blocking [`e78bf8e`](https://github.com/es-shims/String.prototype.trimEnd/commit/e78bf8e5fc04fcb3379dd1c98360d7df4f9ea7d6) +- [Tests] use shared travis-ci configs [`983c563`](https://github.com/es-shims/String.prototype.trimEnd/commit/983c5639efca2c9bb8b93ebbb917fbcb2561b94c) +- [meta] add `funding` field [`35139d6`](https://github.com/es-shims/String.prototype.trimEnd/commit/35139d6236ceacfc1501d08fb196d18a936ee583) +- [meta] fix non-updated version number [`a2d308b`](https://github.com/es-shims/String.prototype.trimEnd/commit/a2d308b99967ca427936c54747175794ca7336e1) + +## [v0.1.0](https://github.com/es-shims/String.prototype.trimEnd/compare/v0.0.1...v0.1.0) - 2017-12-19 + +### Commits + +- updated README [`f1c71a0`](https://github.com/es-shims/String.prototype.trimEnd/commit/f1c71a0a882e89e1c207ed2b316d91670be2b075) + +## v0.0.1 - 2017-12-19 + +### Commits + +- finished polyfill [`e58d550`](https://github.com/es-shims/String.prototype.trimEnd/commit/e58d550ab8695924ff4221ebe91f00f29801aa4b) +- created README file [`f78628a`](https://github.com/es-shims/String.prototype.trimEnd/commit/f78628ab123171f8b7759bba331d6a589702584f) +- Initial commit [`9199478`](https://github.com/es-shims/String.prototype.trimEnd/commit/9199478256da953e2f5bddfc4d82a161f4537e85) +- typo [`d1f4558`](https://github.com/es-shims/String.prototype.trimEnd/commit/d1f4558a51157833f14d8a424426d038d06576ce) diff --git a/node_modules/string.prototype.trimend/LICENSE b/node_modules/string.prototype.trimend/LICENSE new file mode 100644 index 0000000..e48a1b5 --- /dev/null +++ b/node_modules/string.prototype.trimend/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Khaled Al-Ansari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/string.prototype.trimend/README.md b/node_modules/string.prototype.trimend/README.md new file mode 100644 index 0000000..292bda9 --- /dev/null +++ b/node_modules/string.prototype.trimend/README.md @@ -0,0 +1,46 @@ +# String.prototype.trimEnd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES2019-spec-compliant `String.prototype.trimEnd` shim. Invoke its "shim" method to shim `String.prototype.trimEnd` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. + +Most common usage: +```js +var trimEnd = require('string.prototype.trimend'); + +assert(trimEnd(' \t\na \t\n') === 'a \t\n'); + +if (!String.prototype.trimEnd) { + trimEnd.shim(); +} + +assert(trimEnd(' \t\na \t\n ') === ' \t\na \t\n '.trimEnd()); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.trimend +[npm-version-svg]: https://vb.teelaun.ch/es-shims/String.prototype.trimEnd.svg +[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimEnd.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.trimEnd +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimEnd/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimEnd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/string.prototype.trimend.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/string.prototype.trimend.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimend.svg +[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimend +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimEnd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimEnd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimEnd +[actions-url]: https://github.com/es-shims/String.prototype.trimEnd/actions diff --git a/node_modules/string.prototype.trimend/auto.js b/node_modules/string.prototype.trimend/auto.js new file mode 100644 index 0000000..8ebf606 --- /dev/null +++ b/node_modules/string.prototype.trimend/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.trimend/implementation.js b/node_modules/string.prototype.trimend/implementation.js new file mode 100644 index 0000000..4628aba --- /dev/null +++ b/node_modules/string.prototype.trimend/implementation.js @@ -0,0 +1,15 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var endWhitespace = mvsIsWS + ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trimEnd() { + return $replace(this, endWhitespace, ''); +}; diff --git a/node_modules/string.prototype.trimend/index.js b/node_modules/string.prototype.trimend/index.js new file mode 100644 index 0000000..ce41c88 --- /dev/null +++ b/node_modules/string.prototype.trimend/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var callBind = require('call-bind'); +var define = require('define-properties'); +var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trimend/package.json b/node_modules/string.prototype.trimend/package.json new file mode 100644 index 0000000..b16d7f9 --- /dev/null +++ b/node_modules/string.prototype.trimend/package.json @@ -0,0 +1,79 @@ +{ + "name": "string.prototype.trimend", + "version": "1.0.8", + "author": "Jordan Harband ", + "contributors": [ + "Jordan Harband ", + "Khaled Al-Ansari " + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES2019 spec-compliant String.prototype.trimEnd shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.trimEnd.git" + }, + "keywords": [ + "es6", + "es7", + "es8", + "javascript", + "prototype", + "polyfill", + "utility", + "trim", + "trimLeft", + "trimRight", + "trimStart", + "trimEnd", + "tc39" + ], + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/string.prototype.trimend/polyfill.js b/node_modules/string.prototype.trimend/polyfill.js new file mode 100644 index 0000000..0fa4f70 --- /dev/null +++ b/node_modules/string.prototype.trimend/polyfill.js @@ -0,0 +1,15 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + if (!String.prototype.trimEnd && !String.prototype.trimRight) { + return implementation; + } + var zeroWidthSpace = '\u200b'; + var trimmed = zeroWidthSpace.trimEnd ? zeroWidthSpace.trimEnd() : zeroWidthSpace.trimRight(); + if (trimmed !== zeroWidthSpace) { + return implementation; + } + return String.prototype.trimEnd || String.prototype.trimRight; +}; diff --git a/node_modules/string.prototype.trimend/shim.js b/node_modules/string.prototype.trimend/shim.js new file mode 100644 index 0000000..5a8f477 --- /dev/null +++ b/node_modules/string.prototype.trimend/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimTrimEnd() { + var polyfill = getPolyfill(); + define( + String.prototype, + { trimEnd: polyfill }, + { trimEnd: function () { return String.prototype.trimEnd !== polyfill; } } + ); + return polyfill; +}; diff --git a/node_modules/string.prototype.trimend/test/implementation.js b/node_modules/string.prototype.trimend/test/implementation.js new file mode 100644 index 0000000..7fdf95b --- /dev/null +++ b/node_modules/string.prototype.trimend/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimend/test/index.js b/node_modules/string.prototype.trimend/test/index.js new file mode 100644 index 0000000..2ee8f67 --- /dev/null +++ b/node_modules/string.prototype.trimend/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var trimEnd = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { trimEnd(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trimEnd(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(trimEnd, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimend/test/shimmed.js b/node_modules/string.prototype.trimend/test/shimmed.js new file mode 100644 index 0000000..1a01ceb --- /dev/null +++ b/node_modules/string.prototype.trimend/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var runTests = require('./tests'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +test('shimmed', function (t) { + t.equal(String.prototype.trimEnd.length, 0, 'String#trimEnd has a length of 0'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal((/^(?:trimRight|trimEnd)$/).test(String.prototype.trimEnd.name), true, 'String#trimEnd has name "trimRight" or "trimEnd"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'trimEnd'), 'String#trimEnd is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.trimEnd.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.trimEnd.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(String.prototype.trimEnd), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimend/test/tests.js b/node_modules/string.prototype.trimend/test/tests.js new file mode 100644 index 0000000..03a8c5c --- /dev/null +++ b/node_modules/string.prototype.trimend/test/tests.js @@ -0,0 +1,31 @@ +'use strict'; + +module.exports = function (trimEnd, t) { + t.test('normal cases', function (st) { + st.equal(trimEnd(' \t\na \t\n'), ' \t\na', 'strips whitespace off the left side'); + st.equal(trimEnd('a'), 'a', 'noop when no whitespace'); + + var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + st.equal(trimEnd(allWhitespaceChars + 'a' + allWhitespaceChars), allWhitespaceChars + 'a', 'all expected whitespace chars are trimmed'); + + st.end(); + }); + + // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ + var mongolianVowelSeparator = '\u180E'; + var mvsIsWS = (/^\s$/).test(mongolianVowelSeparator); + t.test('mongolian vowel separator: unicode >= 4 && < 6.3', function (st) { + st.equal( + trimEnd(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + mongolianVowelSeparator + 'a' + (mvsIsWS ? '' : mongolianVowelSeparator), + 'mongolian vowel separator is ' + (mvsIsWS ? '' : 'not ') + 'whitespace' + ); + st.end(); + }); + + t.test('zero-width spaces', function (st) { + var zeroWidth = '\u200b'; + st.equal(trimEnd(zeroWidth), zeroWidth, 'zero width space does not trim'); + st.end(); + }); +}; diff --git a/node_modules/string.prototype.trimstart/.editorconfig b/node_modules/string.prototype.trimstart/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/string.prototype.trimstart/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/string.prototype.trimstart/.eslintrc b/node_modules/string.prototype.trimstart/.eslintrc new file mode 100644 index 0000000..8056b20 --- /dev/null +++ b/node_modules/string.prototype.trimstart/.eslintrc @@ -0,0 +1,24 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + ], + }], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "id-length": 0, + "no-invalid-this": 1, + }, + }, + ], +} diff --git a/node_modules/string.prototype.trimstart/.nycrc b/node_modules/string.prototype.trimstart/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/string.prototype.trimstart/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/string.prototype.trimstart/CHANGELOG.md b/node_modules/string.prototype.trimstart/CHANGELOG.md new file mode 100644 index 0000000..e7701e1 --- /dev/null +++ b/node_modules/string.prototype.trimstart/CHANGELOG.md @@ -0,0 +1,118 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.8](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.7...v1.0.8) - 2024-03-21 + +### Commits + +- [actions] use reusable workflows [`d139c11`](https://github.com/es-shims/String.prototype.trimStart/commit/d139c119ba5003936649741fae52b28080794dd3) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`16ff815`](https://github.com/es-shims/String.prototype.trimStart/commit/16ff81546c62ac3159fdf223cd1b035729fd55f0) +- [Deps] update `call-bind`, `define-properties` [`8dd308d`](https://github.com/es-shims/String.prototype.trimStart/commit/8dd308dd225ea3cb6a4d2c9662e435101367a5ef) +- [Refactor] use `es-object-atoms` instead of `es-abstract` [`4868f56`](https://github.com/es-shims/String.prototype.trimStart/commit/4868f566f8052ab7e28ce733ecc62b56f743f7fc) +- [meta] add missing `engines.node` [`8c1cce6`](https://github.com/es-shims/String.prototype.trimStart/commit/8c1cce612e4e1fdd1e5172c9e508a88abd3e6a5c) + +## [v1.0.7](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.6...v1.0.7) - 2023-09-04 + +### Commits + +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`58e7aa6`](https://github.com/es-shims/String.prototype.trimStart/commit/58e7aa63b702f4494b89b8723b585bab5899a304) +- [Deps] update `define-properties`, `es-abstract` [`8d9a7bf`](https://github.com/es-shims/String.prototype.trimStart/commit/8d9a7bf123f320799211dd57aa0c832aaafb8a19) + +## [v1.0.6](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.5...v1.0.6) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`0838ae4`](https://github.com/es-shims/String.prototype.trimStart/commit/0838ae4ed948df470185afbeea4296f5c5ecd759) +- [actions] update rebase action to use reusable workflow [`d6bb784`](https://github.com/es-shims/String.prototype.trimStart/commit/d6bb78400a00459e9ab0b28f433c45804a65184d) +- [Dev Deps] update `aud`, `tape` [`8734d9a`](https://github.com/es-shims/String.prototype.trimStart/commit/8734d9a616c6aca9ec7f0c8819e66c2496deb32e) +- [Deps] update `es-abstract` [`30f593f`](https://github.com/es-shims/String.prototype.trimStart/commit/30f593f3febf6d8d9b3d5605174b437fed9cbb3a) + +## [v1.0.5](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.4...v1.0.5) - 2022-05-02 + +### Commits + +- [actions] reuse common workflows [`61d4009`](https://github.com/es-shims/String.prototype.trimStart/commit/61d40098a96b3dcc6cf963c9d03dd1b23b6eb13d) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`bfe39c4`](https://github.com/es-shims/String.prototype.trimStart/commit/bfe39c498e26a4ad75c64cce27ff3df9bfef2cc1) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`36e3730`](https://github.com/es-shims/String.prototype.trimStart/commit/36e37307bb06fb5dc34d861a4bf6f7db931340d9) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`4f77eed`](https://github.com/es-shims/String.prototype.trimStart/commit/4f77eed5aa64e6f781310847d7831563fce90f5c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`59fcb99`](https://github.com/es-shims/String.prototype.trimStart/commit/59fcb995ef8d4723a83e28d46dbe41a14253b681) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`486ffcf`](https://github.com/es-shims/String.prototype.trimStart/commit/486ffcfa93c75516601169a3973b81fdfeb7de8b) +- [actions] update codecov uploader [`b33ac48`](https://github.com/es-shims/String.prototype.trimStart/commit/b33ac48ccc86f6b894d8fde5162bd1c806904972) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`3c89fa5`](https://github.com/es-shims/String.prototype.trimStart/commit/3c89fa571d1c4b8894230d93caaf3b3d9885534d) +- [readme] add github actions/codecov badges [`00be6b3`](https://github.com/es-shims/String.prototype.trimStart/commit/00be6b34fdd989950b934b4471087362b78d4b0c) +- [Dev Deps] update `eslint`, `tape` [`13a08f5`](https://github.com/es-shims/String.prototype.trimStart/commit/13a08f578c53cf5f129fb6ebe486e8bbcc40c14e) +- [actions] update workflows [`6ac576d`](https://github.com/es-shims/String.prototype.trimStart/commit/6ac576dde99f73d19492777efed29ec069e89bf1) +- [meta] use `prepublishOnly` script for npm 7+ [`fa382ca`](https://github.com/es-shims/String.prototype.trimStart/commit/fa382caa5c8e9a868572605ce215a3db1dc9ef21) +- [Deps] update `define-properties` [`d57bffe`](https://github.com/es-shims/String.prototype.trimStart/commit/d57bffef7d89384c8888627c5ee33b80e24d54e0) + +## [v1.0.4](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.3...v1.0.4) - 2021-02-23 + +### Commits + +- [meta] do not publish github action workflow files [`9c434ec`](https://github.com/es-shims/String.prototype.trimStart/commit/9c434eceb50141cf36e8e65f514226b0b547b568) +- [readme] remove travis badge [`7843160`](https://github.com/es-shims/String.prototype.trimStart/commit/7843160a3e8feaa2213feb0da9c5ad7d9bf21b59) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `has-strict-mode`, `tape` [`8b52646`](https://github.com/es-shims/String.prototype.trimStart/commit/8b52646510aea20473da5491fe0876117a2251b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`badeda2`](https://github.com/es-shims/String.prototype.trimStart/commit/badeda2b01d2e266e4d1c2e7dc0e4fca0f066f3e) +- [Tests] increase coverage [`bf8777d`](https://github.com/es-shims/String.prototype.trimStart/commit/bf8777d54c4b05c093559021cfaf0670306120f8) +- [actions] update workflows [`61be1c6`](https://github.com/es-shims/String.prototype.trimStart/commit/61be1c649ae859faa40286e57fa22cef65ae1229) +- [meta] gitignore coverage output [`c9c98d7`](https://github.com/es-shims/String.prototype.trimStart/commit/c9c98d75d7708e8906a39b55a0ad7a0ed6a9e4b0) +- [Deps] update `call-bind` [`c8645e8`](https://github.com/es-shims/String.prototype.trimStart/commit/c8645e89f9ace7681660ba66c724cf00c798f3d4) + +## [v1.0.3](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.2...v1.0.3) - 2020-11-21 + +### Commits + +- [Tests] migrate tests to Github Actions [`fbc7519`](https://github.com/es-shims/String.prototype.trimStart/commit/fbc7519cce2b5bfff9fe28dea96fb5f6f82e19fd) +- [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner [`3c9330b`](https://github.com/es-shims/String.prototype.trimStart/commit/3c9330be9ad02497f78ff0fd94b7c918c3a4bc21) +- [Tests] run `nyc` on all tests [`52229ca`](https://github.com/es-shims/String.prototype.trimStart/commit/52229ca28426be516c3826743e417be85144673e) +- [Deps] replace `es-abstract` with `call-bind` [`5e5068d`](https://github.com/es-shims/String.prototype.trimStart/commit/5e5068d2cc85d0a6f2a441ea984521ee70470537) +- [Dev Deps] update `eslint`, `aud`; add `safe-publish-latest` [`42a853e`](https://github.com/es-shims/String.prototype.trimStart/commit/42a853e2cb419378085098cb66e421ee94eed3ab) + +## [v1.0.2](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.1...v1.0.2) - 2020-10-20 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`d032b38`](https://github.com/es-shims/String.prototype.trimStart/commit/d032b38aac7e9ebae7bf5c4195492c508af2815a) +- [actions] add "Allow Edits" workflow [`83e30ba`](https://github.com/es-shims/String.prototype.trimStart/commit/83e30bac01572b6dba6358fec6e339c55dc431c9) +- [Deps] update `es-abstract` [`707d85d`](https://github.com/es-shims/String.prototype.trimStart/commit/707d85d827d9c537a144f199fdecc47edaade1cd) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`096c6d9`](https://github.com/es-shims/String.prototype.trimStart/commit/096c6d9dc142286c750da7024e7a88ed698a4953) + +## [v1.0.1](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.0...v1.0.1) - 2020-04-09 + +### Commits + +- [meta] add some missing repo metadata [`3385da3`](https://github.com/es-shims/String.prototype.trimStart/commit/3385da3bbb87819de11a869981ca954887a6a092) +- [Dev Deps] update `auto-changelog` [`879377d`](https://github.com/es-shims/String.prototype.trimStart/commit/879377df9c1ff97d8f0b3eac800683f1d68a304c) + +## [v1.0.0](https://github.com/es-shims/String.prototype.trimStart/compare/v0.1.0...v1.0.0) - 2020-03-30 + +### Commits + +- [Breaking] convert to es-shim API [`970922c`](https://github.com/es-shims/String.prototype.trimStart/commit/970922c494c78b033c351c77f61a8aefd49c30d9) +- [meta] add `auto-changelog` [`ff30c09`](https://github.com/es-shims/String.prototype.trimStart/commit/ff30c0996289113d2c3dbbfca7e280ff151bf36d) +- [meta] update readme [`816291d`](https://github.com/es-shims/String.prototype.trimStart/commit/816291d01e0eaf85da9b732c179cfb2454bd282e) +- [Tests] add `npm run lint` [`3341104`](https://github.com/es-shims/String.prototype.trimStart/commit/3341104450bc6ac84f3b70a6d6c0fbeb4df5131e) +- Only apps should have lockfiles [`f008df7`](https://github.com/es-shims/String.prototype.trimStart/commit/f008df73fbf3dcf8dfad6d5cad86de7050d0ae09) +- [actions] add automatic rebasing / merge commit blocking [`e5ba35c`](https://github.com/es-shims/String.prototype.trimStart/commit/e5ba35c1a14fcf652336cc9c4be49d232981161e) +- [Tests] use shared travis-ci configs [`46516b1`](https://github.com/es-shims/String.prototype.trimStart/commit/46516b137a8c07ed5807d751bd61199688ef9baa) +- [meta] add `funding` field [`34ae856`](https://github.com/es-shims/String.prototype.trimStart/commit/34ae8563f115bd4a5e5f5d2d786c0fa0a420fa2a) +- [meta] fix non-updated version number [`3b0e262`](https://github.com/es-shims/String.prototype.trimStart/commit/3b0e262e2f4eeee2e1b99fe890f8ca17bed8f2fd) + +## [v0.1.0](https://github.com/es-shims/String.prototype.trimStart/compare/v0.0.1...v0.1.0) - 2017-12-19 + +### Commits + +- updated README [`ab2f6ac`](https://github.com/es-shims/String.prototype.trimStart/commit/ab2f6ac8813ed336a0f2dc3aa8cdb52f4d52814b) + +## v0.0.1 - 2017-12-19 + +### Commits + +- finished polyfill [`1c7ca20`](https://github.com/es-shims/String.prototype.trimStart/commit/1c7ca2043e3383b6e743870bc622ad4a38477147) +- created README file: [`192ecad`](https://github.com/es-shims/String.prototype.trimStart/commit/192ecaded4e0d5baaa65cd41e590b8d837520d44) +- Initial commit [`14044f8`](https://github.com/es-shims/String.prototype.trimStart/commit/14044f8a0fe1d155fe7403a8327bdbaf135da2d6) +- updated README [`d4fb6be`](https://github.com/es-shims/String.prototype.trimStart/commit/d4fb6be15455dd68fc4b306bee1d30dd4afc96e7) diff --git a/node_modules/string.prototype.trimstart/LICENSE b/node_modules/string.prototype.trimstart/LICENSE new file mode 100644 index 0000000..e48a1b5 --- /dev/null +++ b/node_modules/string.prototype.trimstart/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Khaled Al-Ansari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/string.prototype.trimstart/README.md b/node_modules/string.prototype.trimstart/README.md new file mode 100644 index 0000000..5ec7613 --- /dev/null +++ b/node_modules/string.prototype.trimstart/README.md @@ -0,0 +1,46 @@ +# String.prototype.trimStart [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES2019-spec-compliant `String.prototype.trimStart` shim. Invoke its "shim" method to shim `String.prototype.trimStart` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. + +Most common usage: +```js +var trimStart = require('string.prototype.trimstart'); + +assert(trimStart(' \t\na \t\n') === 'a \t\n'); + +if (!String.prototype.trimStart) { + trimStart.shim(); +} + +assert(trimStart(' \t\na \t\n') === ' \t\na \t\n'.trimStart()); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/string.prototype.trimstart +[npm-version-svg]: https://vb.teelaun.ch/es-shims/String.prototype.trimStart.svg +[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart.svg +[deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart +[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/string.prototype.trimstart.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/string.prototype.trimstart.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimstart.svg +[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimstart +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimStart/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimStart/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimStart +[actions-url]: https://github.com/es-shims/String.prototype.trimStart/actions diff --git a/node_modules/string.prototype.trimstart/auto.js b/node_modules/string.prototype.trimstart/auto.js new file mode 100644 index 0000000..8ebf606 --- /dev/null +++ b/node_modules/string.prototype.trimstart/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/string.prototype.trimstart/implementation.js b/node_modules/string.prototype.trimstart/implementation.js new file mode 100644 index 0000000..882e711 --- /dev/null +++ b/node_modules/string.prototype.trimstart/implementation.js @@ -0,0 +1,15 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var startWhitespace = mvsIsWS + ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +/* eslint-enable no-control-regex */ + +module.exports = function trimStart() { + return $replace(this, startWhitespace, ''); +}; diff --git a/node_modules/string.prototype.trimstart/index.js b/node_modules/string.prototype.trimstart/index.js new file mode 100644 index 0000000..ce41c88 --- /dev/null +++ b/node_modules/string.prototype.trimstart/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var callBind = require('call-bind'); +var define = require('define-properties'); +var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trimstart/package.json b/node_modules/string.prototype.trimstart/package.json new file mode 100644 index 0000000..ceefb8b --- /dev/null +++ b/node_modules/string.prototype.trimstart/package.json @@ -0,0 +1,82 @@ +{ + "name": "string.prototype.trimstart", + "version": "1.0.8", + "author": "Jordan Harband ", + "contributors": [ + "Jordan Harband ", + "Khaled Al-Ansari " + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES2019 spec-compliant String.prototype.trimStart shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/String.prototype.trimStart.git" + }, + "keywords": [ + "es6", + "es7", + "es8", + "javascript", + "prototype", + "polyfill", + "utility", + "trim", + "trimLeft", + "trimRight", + "trimStart", + "trimEnd", + "tc39" + ], + "devDependencies": { + "@es-shims/api": "^2.4.2", + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/string.prototype.trimstart/polyfill.js b/node_modules/string.prototype.trimstart/polyfill.js new file mode 100644 index 0000000..9adaccd --- /dev/null +++ b/node_modules/string.prototype.trimstart/polyfill.js @@ -0,0 +1,15 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + if (!String.prototype.trimStart && !String.prototype.trimLeft) { + return implementation; + } + var zeroWidthSpace = '\u200b'; + var trimmed = zeroWidthSpace.trimStart ? zeroWidthSpace.trimStart() : zeroWidthSpace.trimLeft(); + if (trimmed !== zeroWidthSpace) { + return implementation; + } + return String.prototype.trimStart || String.prototype.trimLeft; +}; diff --git a/node_modules/string.prototype.trimstart/shim.js b/node_modules/string.prototype.trimstart/shim.js new file mode 100644 index 0000000..5ea6dfd --- /dev/null +++ b/node_modules/string.prototype.trimstart/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimTrimStart() { + var polyfill = getPolyfill(); + define( + String.prototype, + { trimStart: polyfill }, + { trimStart: function () { return String.prototype.trimStart !== polyfill; } } + ); + return polyfill; +}; diff --git a/node_modules/string.prototype.trimstart/test/implementation.js b/node_modules/string.prototype.trimstart/test/implementation.js new file mode 100644 index 0000000..7fdf95b --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimstart/test/index.js b/node_modules/string.prototype.trimstart/test/index.js new file mode 100644 index 0000000..baff6b5 --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var trimStart = require('../'); +var test = require('tape'); + +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { trimStart(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { trimStart(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(trimStart, t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimstart/test/shimmed.js b/node_modules/string.prototype.trimstart/test/shimmed.js new file mode 100644 index 0000000..bfdbe48 --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var runTests = require('./tests'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +test('shimmed', function (t) { + t.equal(String.prototype.trimStart.length, 0, 'String#trimStart has a length of 0'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal((/^(?:trimLeft|trimStart)$/).test(String.prototype.trimStart.name), true, 'String#trimStart has name "trimLeft" or "trimStart"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(String.prototype, 'trimStart'), 'String#trimStart is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return String.prototype.trimStart.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return String.prototype.trimStart.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(String.prototype.trimStart), t); + + t.end(); +}); diff --git a/node_modules/string.prototype.trimstart/test/tests.js b/node_modules/string.prototype.trimstart/test/tests.js new file mode 100644 index 0000000..526aac1 --- /dev/null +++ b/node_modules/string.prototype.trimstart/test/tests.js @@ -0,0 +1,31 @@ +'use strict'; + +module.exports = function (trimStart, t) { + t.test('normal cases', function (st) { + st.equal(trimStart(' \t\na \t\n'), 'a \t\n', 'strips whitespace off the left side'); + st.equal(trimStart('a'), 'a', 'noop when no whitespace'); + + var allWhitespaceChars = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + st.equal(trimStart(allWhitespaceChars + 'a' + allWhitespaceChars), 'a' + allWhitespaceChars, 'all expected whitespace chars are trimmed'); + + st.end(); + }); + + // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ + var mongolianVowelSeparator = '\u180E'; + var mvsIsWS = (/^\s$/).test(mongolianVowelSeparator); + t.test('mongolian vowel separator: unicode >= 4 && < 6.3', function (st) { + st.equal( + trimStart(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + (mvsIsWS ? '' : mongolianVowelSeparator) + 'a' + mongolianVowelSeparator, + 'mongolian vowel separator is ' + (mvsIsWS ? '' : 'not ') + 'whitespace' + ); + st.end(); + }); + + t.test('zero-width spaces', function (st) { + var zeroWidth = '\u200b'; + st.equal(trimStart(zeroWidth), zeroWidth, 'zero width space does not trim'); + st.end(); + }); +}; diff --git a/node_modules/string_decoder/.travis.yml b/node_modules/string_decoder/.travis.yml new file mode 100644 index 0000000..3347a72 --- /dev/null +++ b/node_modules/string_decoder/.travis.yml @@ -0,0 +1,50 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.10' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.11' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.12' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 1 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 2 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 3 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 8 + env: TASK=test + - node_js: 9 + env: TASK=test diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE new file mode 100644 index 0000000..778edb2 --- /dev/null +++ b/node_modules/string_decoder/LICENSE @@ -0,0 +1,48 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + diff --git a/node_modules/string_decoder/README.md b/node_modules/string_decoder/README.md new file mode 100644 index 0000000..5fd5831 --- /dev/null +++ b/node_modules/string_decoder/README.md @@ -0,0 +1,47 @@ +# string_decoder + +***Node-core v8.9.4 string_decoder for userland*** + + +[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) +[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) + + +```bash +npm install --save string_decoder +``` + +***Node-core string_decoder for userland*** + +This package is a mirror of the string_decoder implementation in Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). + +As of version 1.0.0 **string_decoder** uses semantic versioning. + +## Previous versions + +Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. + +## Update + +The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. + +## Streams Working Group + +`string_decoder` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + +See [readable-stream](https://github.com/nodejs/readable-stream) for +more details. diff --git a/node_modules/string_decoder/lib/string_decoder.js b/node_modules/string_decoder/lib/string_decoder.js new file mode 100644 index 0000000..2e89e63 --- /dev/null +++ b/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,296 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var Buffer = require('safe-buffer').Buffer; +/**/ + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} \ No newline at end of file diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json new file mode 100644 index 0000000..518c3eb --- /dev/null +++ b/node_modules/string_decoder/package.json @@ -0,0 +1,31 @@ +{ + "name": "string_decoder", + "version": "1.1.1", + "description": "The string_decoder module from Node core", + "main": "lib/string_decoder.js", + "dependencies": { + "safe-buffer": "~5.1.0" + }, + "devDependencies": { + "babel-polyfill": "^6.23.0", + "core-util-is": "^1.0.2", + "inherits": "^2.0.3", + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/parallel/*.js && node test/verify-dependencies", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/string_decoder.git" + }, + "homepage": "https://github.com/nodejs/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT" +} diff --git a/node_modules/strip-bom/index.js b/node_modules/strip-bom/index.js new file mode 100644 index 0000000..b00feb9 --- /dev/null +++ b/node_modules/strip-bom/index.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = x => { + if (typeof x !== 'string') { + throw new TypeError('Expected a string, got ' + typeof x); + } + + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM) + if (x.charCodeAt(0) === 0xFEFF) { + return x.slice(1); + } + + return x; +}; diff --git a/node_modules/strip-bom/license b/node_modules/strip-bom/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/strip-bom/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/strip-bom/package.json b/node_modules/strip-bom/package.json new file mode 100644 index 0000000..10f8fdd --- /dev/null +++ b/node_modules/strip-bom/package.json @@ -0,0 +1,40 @@ +{ + "name": "strip-bom", + "version": "3.0.0", + "description": "Strip UTF-8 byte order mark (BOM) from a string", + "license": "MIT", + "repository": "sindresorhus/strip-bom", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "strip", + "bom", + "byte", + "order", + "mark", + "unicode", + "utf8", + "utf-8", + "remove", + "delete", + "trim", + "text", + "string" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/strip-bom/readme.md b/node_modules/strip-bom/readme.md new file mode 100644 index 0000000..812a980 --- /dev/null +++ b/node_modules/strip-bom/readme.md @@ -0,0 +1,36 @@ +# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom) + +> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string + +From Wikipedia: + +> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8. + + +## Install + +``` +$ npm install --save strip-bom +``` + + +## Usage + +```js +const stripBom = require('strip-bom'); + +stripBom('\uFEFFunicorn'); +//=> 'unicorn' +``` + + +## Related + +- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module +- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module +- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js new file mode 100644 index 0000000..62afa3a --- /dev/null +++ b/node_modules/supports-color/browser.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = { + stdout: false, + stderr: false +}; diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js new file mode 100644 index 0000000..1704131 --- /dev/null +++ b/node_modules/supports-color/index.js @@ -0,0 +1,131 @@ +'use strict'; +const os = require('os'); +const hasFlag = require('has-flag'); + +const env = process.env; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + const min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/supports-color/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json new file mode 100644 index 0000000..ad199f5 --- /dev/null +++ b/node_modules/supports-color/package.json @@ -0,0 +1,53 @@ +{ + "name": "supports-color", + "version": "5.5.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js", + "browser.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "dependencies": { + "has-flag": "^3.0.0" + }, + "devDependencies": { + "ava": "^0.25.0", + "import-fresh": "^2.0.0", + "xo": "^0.20.0" + }, + "browser": "browser.js" +} diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md new file mode 100644 index 0000000..f6e4019 --- /dev/null +++ b/node_modules/supports-color/readme.md @@ -0,0 +1,66 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install supports-color +``` + + +## Usage + +```js +const supportsColor = require('supports-color'); + +if (supportsColor.stdout) { + console.log('Terminal stdout supports color'); +} + +if (supportsColor.stdout.has256) { + console.log('Terminal stdout supports 256 colors'); +} + +if (supportsColor.stderr.has16m) { + console.log('Terminal stderr supports 16 million colors (truecolor)'); +} +``` + + +## API + +Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. + +The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: + +- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) +- `.level = 2` and `.has256 = true`: 256 color support +- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) + + +## Info + +It obeys the `--color` and `--no-color` CLI flags. + +Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. + +Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/supports-preserve-symlinks-flag/.eslintrc b/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 0000000..346ffec --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml new file mode 100644 index 0000000..e8d64f3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/supports-preserve-symlink-flag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/supports-preserve-symlinks-flag/.nycrc b/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 0000000..61f607f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/node_modules/supports-preserve-symlinks-flag/LICENSE b/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 0000000..2e7b9a3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/supports-preserve-symlinks-flag/README.md b/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 0000000..eb05b12 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/node_modules/supports-preserve-symlinks-flag/browser.js b/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 0000000..087be1f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/node_modules/supports-preserve-symlinks-flag/index.js b/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 0000000..86fd5d3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/node_modules/supports-preserve-symlinks-flag/package.json b/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 0000000..56edadc --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/supports-preserve-symlinks-flag/test/index.js b/node_modules/supports-preserve-symlinks-flag/test/index.js new file mode 100644 index 0000000..9938d67 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var semver = require('semver'); + +var supportsPreserveSymlinks = require('../'); +var browser = require('../browser'); + +test('supportsPreserveSymlinks', function (t) { + t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); + + t.equal(browser, null, 'browser file is `null`'); + t.equal( + supportsPreserveSymlinks, + null, + 'in a browser, is null', + { skip: typeof window === 'undefined' } + ); + + var expected = semver.satisfies(process.version, '>= 6.2'); + t.equal( + supportsPreserveSymlinks, + expected, + 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', + { skip: typeof window !== 'undefined' } + ); + + t.end(); +}); diff --git a/node_modules/through/.travis.yml b/node_modules/through/.travis.yml new file mode 100644 index 0000000..c693a93 --- /dev/null +++ b/node_modules/through/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - "0.10" diff --git a/node_modules/through/LICENSE.APACHE2 b/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 0000000..6366c04 --- /dev/null +++ b/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/through/LICENSE.MIT b/node_modules/through/LICENSE.MIT new file mode 100644 index 0000000..6eafbd7 --- /dev/null +++ b/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/through/index.js b/node_modules/through/index.js new file mode 100644 index 0000000..ca5fc59 --- /dev/null +++ b/node_modules/through/index.js @@ -0,0 +1,108 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + diff --git a/node_modules/through/package.json b/node_modules/through/package.json new file mode 100644 index 0000000..9862189 --- /dev/null +++ b/node_modules/through/package.json @@ -0,0 +1,36 @@ +{ + "name": "through", + "version": "2.3.8", + "description": "simplified stream construction", + "main": "index.js", + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "devDependencies": { + "stream-spec": "~0.3.5", + "tape": "~2.3.2", + "from": "~0.1.3" + }, + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "author": "Dominic Tarr (dominictarr.com)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/through.git" + }, + "homepage": "https://github.com/dominictarr/through", + "testling": { + "browsers": [ + "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + } +} diff --git a/node_modules/through/readme.markdown b/node_modules/through/readme.markdown new file mode 100644 index 0000000..cb34c81 --- /dev/null +++ b/node_modules/through/readme.markdown @@ -0,0 +1,64 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) +[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. + +* Pass in optional `write` and `end` methods. +* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. +* Use `this.pause()` and `this.resume()` to manage flow. +* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). + +This function is the basis for most of the synchronous streams in +[event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) //data *must* not be null + }, + function end () { //optional + this.queue(null) + }) +``` + +Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, +and this.emit('end') + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) +``` + +## Extended Options + +You will probably not need these 99% of the time. + +### autoDestroy=false + +By default, `through` emits close when the writable +and readable side of the stream has ended. +If that is not desired, set `autoDestroy=false`. + +``` js +var through = require('through') + +//like this +var ts = through(write, end, {autoDestroy: false}) +//or like this +var ts = through(write, end) +ts.autoDestroy = false +``` + +## License + +MIT / Apache2 diff --git a/node_modules/through/test/async.js b/node_modules/through/test/async.js new file mode 100644 index 0000000..46bdbae --- /dev/null +++ b/node_modules/through/test/async.js @@ -0,0 +1,28 @@ +var from = require('from') +var through = require('../') + +var tape = require('tape') + +tape('simple async example', function (t) { + + var n = 0, expected = [1,2,3,4,5], actual = [] + from(expected) + .pipe(through(function(data) { + this.pause() + n ++ + setTimeout(function(){ + console.log('pushing data', data) + this.push(data) + this.resume() + }.bind(this), 300) + })).pipe(through(function(data) { + console.log('pushing data second time', data); + this.push(data) + })).on('data', function (d) { + actual.push(d) + }).on('end', function() { + t.deepEqual(actual, expected) + t.end() + }) + +}) diff --git a/node_modules/through/test/auto-destroy.js b/node_modules/through/test/auto-destroy.js new file mode 100644 index 0000000..9a8fd00 --- /dev/null +++ b/node_modules/through/test/auto-destroy.js @@ -0,0 +1,30 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + ts.autoDestroy = false + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.notOk(closed) + ts.destroy() + assert.ok(closed) + assert.end() +}) + diff --git a/node_modules/through/test/buffering.js b/node_modules/through/test/buffering.js new file mode 100644 index 0000000..b0084bf --- /dev/null +++ b/node_modules/through/test/buffering.js @@ -0,0 +1,71 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('buffering', function(assert) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + assert.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + assert.deepEqual(actual, [1, 2, 3]) + ts.resume() + assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + assert.ok(!ended) + ts.resume() + assert.ok(ended) + assert.end() +}) + +test('buffering has data in queue, when ends', function (assert) { + + /* + * If stream ends while paused with data in the queue, + * stream should still emit end after all data is written + * on resume. + */ + + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.pause() + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.deepEqual(actual, [], 'no data written yet, still paused') + assert.ok(!ended, 'end not emitted yet, still paused') + ts.resume() + assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') + assert.ok(ended, 'end should be emitted once all data was delivered') + assert.end(); +}) diff --git a/node_modules/through/test/end.js b/node_modules/through/test/end.js new file mode 100644 index 0000000..fa113f5 --- /dev/null +++ b/node_modules/through/test/end.js @@ -0,0 +1,45 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.ok(closed) + assert.end() +}) + +test('end only once', function (t) { + + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + t.equal(ended, false) + ended = true + }) + + ts.queue(null) + ts.queue(null) + ts.queue(null) + + ts.resume() + + t.end() +}) diff --git a/node_modules/through/test/index.js b/node_modules/through/test/index.js new file mode 100644 index 0000000..96da82f --- /dev/null +++ b/node_modules/through/test/index.js @@ -0,0 +1,133 @@ + +var test = require('tape') +var spec = require('stream-spec') +var through = require('../') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +test('simple defaults', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + var s = spec(t).through().pausable() + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}); + +test('simple functions', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + var s = spec(t).through().pausable() + + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}) + +test('pauses', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + + var s = spec(t) + .through() + .pausable() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + }) + + t.on('close', function () { + s.validate() + assert.end() + }) + + write(expected, t) +}) + +test('does not soft-end on `undefined`', function(assert) { + var stream = through() + , count = 0 + + stream.on('data', function (data) { + count++ + }) + + stream.write(undefined) + stream.write(undefined) + + assert.equal(count, 2) + + assert.end() +}) diff --git a/node_modules/to-object-path/LICENSE b/node_modules/to-object-path/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/to-object-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/to-object-path/README.md b/node_modules/to-object-path/README.md new file mode 100644 index 0000000..7f3cfb1 --- /dev/null +++ b/node_modules/to-object-path/README.md @@ -0,0 +1,71 @@ +# to-object-path [![NPM version](https://badge.fury.io/js/to-object-path.svg)](http://badge.fury.io/js/to-object-path) + +> Create an object path from a list or array of strings. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i to-object-path --save +``` + +## Usage + +```js +var toPath = require('to-object-path'); + +toPath('foo', 'bar', 'baz'); +toPath('foo', ['bar', 'baz']); +//=> 'foo.bar.baz' +``` + +Also supports passing an arguments object (without having to slice args): + +```js +function foo() + return toPath(arguments); +} + +foo('foo', 'bar', 'baz'); +foo('foo', ['bar', 'baz']); +//=> 'foo.bar.baz' +``` + +Visit the [example](./example.js) to see how this could be used in an application. + +## Related projects + +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (` a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value) +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value) +* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://www.npmjs.com/package/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value) +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value) +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/to-object-path/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 28, 2015._ \ No newline at end of file diff --git a/node_modules/to-object-path/index.js b/node_modules/to-object-path/index.js new file mode 100644 index 0000000..489f8f6 --- /dev/null +++ b/node_modules/to-object-path/index.js @@ -0,0 +1,33 @@ +/*! + * to-object-path + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function toPath(args) { + if (typeOf(args) !== 'arguments') { + args = arguments; + } + return filter(args).join('.'); +}; + +function filter(arr) { + var len = arr.length; + var idx = -1; + var res = []; + + while (++idx < len) { + var ele = arr[idx]; + if (typeOf(ele) === 'arguments' || Array.isArray(ele)) { + res.push.apply(res, filter(ele)); + } else if (typeof ele === 'string') { + res.push(ele); + } + } + return res; +} diff --git a/node_modules/to-object-path/package.json b/node_modules/to-object-path/package.json new file mode 100644 index 0000000..2fe341b --- /dev/null +++ b/node_modules/to-object-path/package.json @@ -0,0 +1,48 @@ +{ + "name": "to-object-path", + "description": "Create an object path from a list or array of strings.", + "version": "0.3.0", + "homepage": "https://github.com/jonschlinkert/to-object-path", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/to-object-path", + "bugs": { + "url": "https://github.com/jonschlinkert/to-object-path/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "devDependencies": { + "base": "^0.6.7", + "mocha": "*" + }, + "keywords": [ + "dot", + "nested", + "notation", + "object", + "path", + "stringify" + ], + "verb": { + "related": { + "list": [ + "get-value", + "set-value", + "has-value", + "omit-value", + "unset-value" + ] + } + } +} diff --git a/node_modules/to-regex-range/LICENSE b/node_modules/to-regex-range/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/node_modules/to-regex-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/to-regex-range/README.md b/node_modules/to-regex-range/README.md new file mode 100644 index 0000000..2763c5a --- /dev/null +++ b/node_modules/to-regex-range/README.md @@ -0,0 +1,281 @@ +# to-regex-range [![NPM version](https://img.shields.io/npm/v/to-regex-range.svg?style=flat)](https://www.npmjs.com/package/to-regex-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![Linux Build Status](https://img.shields.io/travis/micromatch/to-regex-range.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/to-regex-range) + +> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex-range +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add to-regex-range +``` + +
+What does this do? + +
+ +This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers. + +**Example** + +```js +var toRegexRange = require('to-regex-range'); +var regex = new RegExp(toRegexRange('15', '95')); +``` + +A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string). + +
+ +
+ +
+Why use this library? + +
+ +### Convenience + +Creating regular expressions for matching numbers gets deceptively complicated pretty fast. + +For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc: + +* regex for matching `1` => `/1/` (easy enough) +* regex for matching `1` through `5` => `/[1-5]/` (not bad...) +* regex for matching `1` or `5` => `/(1|5)/` (still easy...) +* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...) +* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...) +* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...) +* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!) + +The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation. + +**Learn more** + +If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful. + +### Heavily tested + +As of April 27, 2017, this library runs [2,783,483 test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are indeed correct. + +Tests run in ~870ms on my MacBook Pro, 2.5 GHz Intel Core i7. + +### Highly optimized + +Generated regular expressions are highly optimized: + +* duplicate sequences and character classes are reduced using quantifiers +* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative +* uses fragment caching to avoid processing the same exact string more than once + +
+ +
+ +## Usage + +Add this library to your javascript application with the following line of code + +```js +var toRegexRange = require('to-regex-range'); +``` + +The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers). + +```js +var source = toRegexRange('15', '95'); +//=> 1[5-9]|[2-8][0-9]|9[0-5] + +var re = new RegExp('^' + source + '$'); +console.log(re.test('14')); //=> false +console.log(re.test('50')); //=> true +console.log(re.test('94')); //=> true +console.log(re.test('96')); //=> false +``` + +## Options + +### options.capture + +**Type**: `boolean` + +**Deafault**: `undefined` + +Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges. + +```js +console.log(toRegexRange('-10', '10')); +//=> -[1-9]|-?10|[0-9] + +console.log(toRegexRange('-10', '10', {capture: true})); +//=> (-[1-9]|-?10|[0-9]) +``` + +### options.shorthand + +**Type**: `boolean` + +**Deafault**: `undefined` + +Use the regex shorthand for `[0-9]`: + +```js +console.log(toRegexRange('0', '999999')); +//=> [0-9]|[1-9][0-9]{1,5} + +console.log(toRegexRange('0', '999999', {shorthand: true})); +//=> \d|[1-9]\d{1,5} +``` + +### options.relaxZeros + +**Type**: `boolean` + +**Default**: `true` + +This option only applies to **negative zero-padded ranges**. By default, when a negative zero-padded range is defined, the number of leading zeros is relaxed using `-0*`. + +```js +console.log(toRegexRange('-001', '100')); +//=> -0*1|0{2}[0-9]|0[1-9][0-9]|100 + +console.log(toRegexRange('-001', '100', {relaxZeros: false})); +//=> -0{2}1|0{2}[0-9]|0[1-9][0-9]|100 +``` + +
+Why are zeros relaxed for negative zero-padded ranges by default? + +Consider the following. + +```js +var regex = toRegexRange('-001', '100'); +``` + +_Note that `-001` and `100` are both three digits long_. + +In most zero-padding implementations, only a single leading zero is enough to indicate that zero-padding should be applied. Thus, the leading zeros would be "corrected" on the negative range in the example to `-01`, instead of `-001`, to make total length of each string no greater than the length of the largest number in the range (in other words, `-001` is 4 digits, but `100` is only three digits). + +If zeros were not relaxed by default, you might expect the resulting regex of the above pattern to match `-001` - given that it's defined that way in the arguments - _but it wouldn't_. It would, however, match `-01`. This gets even more ambiguous with large ranges, like `-01` to `1000000`. + +Thus, we relax zeros by default to provide a more predictable experience for users. + +
+ +## Examples + +| **Range** | **Result** | **Compile time** | +| --- | --- | --- | +| `toRegexRange('5, 5')` | `5` | _33μs_ | +| `toRegexRange('5, 6')` | `5\|6` | _53μs_ | +| `toRegexRange('29, 51')` | `29\|[34][0-9]\|5[01]` | _699μs_ | +| `toRegexRange('31, 877')` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _711μs_ | +| `toRegexRange('111, 555')` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _62μs_ | +| `toRegexRange('-10, 10')` | `-[1-9]\|-?10\|[0-9]` | _74μs_ | +| `toRegexRange('-100, -10')` | `-1[0-9]\|-[2-9][0-9]\|-100` | _49μs_ | +| `toRegexRange('-100, 100')` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _45μs_ | +| `toRegexRange('001, 100')` | `0{2}[1-9]\|0[1-9][0-9]\|100` | _158μs_ | +| `toRegexRange('0010, 1000')` | `0{2}1[0-9]\|0{2}[2-9][0-9]\|0[1-9][0-9]{2}\|1000` | _61μs_ | +| `toRegexRange('1, 2')` | `1\|2` | _10μs_ | +| `toRegexRange('1, 5')` | `[1-5]` | _24μs_ | +| `toRegexRange('1, 10')` | `[1-9]\|10` | _23μs_ | +| `toRegexRange('1, 100')` | `[1-9]\|[1-9][0-9]\|100` | _30μs_ | +| `toRegexRange('1, 1000')` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _52μs_ | +| `toRegexRange('1, 10000')` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _47μs_ | +| `toRegexRange('1, 100000')` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _44μs_ | +| `toRegexRange('1, 1000000')` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _49μs_ | +| `toRegexRange('1, 10000000')` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _63μs_ | + +## Heads up! + +**Order of arguments** + +When the `min` is larger than the `max`, values will be flipped to create a valid range: + +```js +toRegexRange('51', '29'); +``` + +Is effectively flipped to: + +```js +toRegexRange('29', '51'); +//=> 29|[3-4][0-9]|5[0-1] +``` + +**Steps / increments** + +This library does not support steps (increments). A pr to add support would be welcome. + +## History + +### v2.0.0 - 2017-04-21 + +**New features** + +Adds support for zero-padding! + +### v1.0.0 + +**Optimizations** + +Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching. + +## Attribution + +Inspired by the python library [range-regex](https://github.com/dimka665/range-regex). + +## About + +### Related projects + +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 27, 2017._ \ No newline at end of file diff --git a/node_modules/to-regex-range/index.js b/node_modules/to-regex-range/index.js new file mode 100644 index 0000000..7bb5a74 --- /dev/null +++ b/node_modules/to-regex-range/index.js @@ -0,0 +1,294 @@ +/*! + * to-regex-range + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var repeat = require('repeat-string'); +var isNumber = require('is-number'); +var cache = {}; + +function toRegexRange(min, max, options) { + if (isNumber(min) === false) { + throw new RangeError('toRegexRange: first argument is invalid.'); + } + + if (typeof max === 'undefined' || min === max) { + return String(min); + } + + if (isNumber(max) === false) { + throw new RangeError('toRegexRange: second argument is invalid.'); + } + + options = options || {}; + var relax = String(options.relaxZeros); + var shorthand = String(options.shorthand); + var capture = String(options.capture); + var key = min + ':' + max + '=' + relax + shorthand + capture; + if (cache.hasOwnProperty(key)) { + return cache[key].result; + } + + var a = Math.min(min, max); + var b = Math.max(min, max); + + if (Math.abs(a - b) === 1) { + var result = min + '|' + max; + if (options.capture) { + return '(' + result + ')'; + } + return result; + } + + var isPadded = padding(min) || padding(max); + var positives = []; + var negatives = []; + + var tok = {min: min, max: max, a: a, b: b}; + if (isPadded) { + tok.isPadded = isPadded; + tok.maxLen = String(tok.max).length; + } + + if (a < 0) { + var newMin = b < 0 ? Math.abs(b) : 1; + var newMax = Math.abs(a); + negatives = splitToPatterns(newMin, newMax, tok, options); + a = tok.a = 0; + } + + if (b >= 0) { + positives = splitToPatterns(a, b, tok, options); + } + + tok.negatives = negatives; + tok.positives = positives; + tok.result = siftPatterns(negatives, positives, options); + + if (options.capture && (positives.length + negatives.length) > 1) { + tok.result = '(' + tok.result + ')'; + } + + cache[key] = tok; + return tok.result; +} + +function siftPatterns(neg, pos, options) { + var onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; + var onlyPositive = filterPatterns(pos, neg, '', false, options) || []; + var intersected = filterPatterns(neg, pos, '-?', true, options) || []; + var subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join('|'); +} + +function splitToRanges(min, max) { + min = Number(min); + max = Number(max); + + var nines = 1; + var stops = [max]; + var stop = +countNines(min, nines); + + while (min <= stop && stop <= max) { + stops = push(stops, stop); + nines += 1; + stop = +countNines(min, nines); + } + + var zeros = 1; + stop = countZeros(max + 1, zeros) - 1; + + while (min < stop && stop <= max) { + stops = push(stops, stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + + stops.sort(compare); + return stops; +} + +/** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + +function rangeToPattern(start, stop, options) { + if (start === stop) { + return {pattern: String(start), digits: []}; + } + + var zipped = zip(String(start), String(stop)); + var len = zipped.length, i = -1; + + var pattern = ''; + var digits = 0; + + while (++i < len) { + var numbers = zipped[i]; + var startDigit = numbers[0]; + var stopDigit = numbers[1]; + + if (startDigit === stopDigit) { + pattern += startDigit; + + } else if (startDigit !== '0' || stopDigit !== '9') { + pattern += toCharacterClass(startDigit, stopDigit); + + } else { + digits += 1; + } + } + + if (digits) { + pattern += options.shorthand ? '\\d' : '[0-9]'; + } + + return { pattern: pattern, digits: [digits] }; +} + +function splitToPatterns(min, max, tok, options) { + var ranges = splitToRanges(min, max); + var len = ranges.length; + var idx = -1; + + var tokens = []; + var start = min; + var prev; + + while (++idx < len) { + var range = ranges[idx]; + var obj = rangeToPattern(start, range, options); + var zeros = ''; + + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.digits.length > 1) { + prev.digits.pop(); + } + prev.digits.push(obj.digits[0]); + prev.string = prev.pattern + toQuantifier(prev.digits); + start = range + 1; + continue; + } + + if (tok.isPadded) { + zeros = padZeros(range, tok); + } + + obj.string = zeros + obj.pattern + toQuantifier(obj.digits); + tokens.push(obj); + start = range + 1; + prev = obj; + } + + return tokens; +} + +function filterPatterns(arr, comparison, prefix, intersection, options) { + var res = []; + + for (var i = 0; i < arr.length; i++) { + var tok = arr[i]; + var ele = tok.string; + + if (options.relaxZeros !== false) { + if (prefix === '-' && ele.charAt(0) === '0') { + if (ele.charAt(1) === '{') { + ele = '0*' + ele.replace(/^0\{\d+\}/, ''); + } else { + ele = '0*' + ele.slice(1); + } + } + } + + if (!intersection && !contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + + if (intersection && contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + } + return res; +} + +/** + * Zip strings (`for in` can be used on string characters) + */ + +function zip(a, b) { + var arr = []; + for (var ch in a) arr.push([a[ch], b[ch]]); + return arr; +} + +function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; +} + +function push(arr, ele) { + if (arr.indexOf(ele) === -1) arr.push(ele); + return arr; +} + +function contains(arr, key, val) { + for (var i = 0; i < arr.length; i++) { + if (arr[i][key] === val) { + return true; + } + } + return false; +} + +function countNines(min, len) { + return String(min).slice(0, -len) + repeat('9', len); +} + +function countZeros(integer, zeros) { + return integer - (integer % Math.pow(10, zeros)); +} + +function toQuantifier(digits) { + var start = digits[0]; + var stop = digits[1] ? (',' + digits[1]) : ''; + if (!stop && (!start || start === 1)) { + return ''; + } + return '{' + start + stop + '}'; +} + +function toCharacterClass(a, b) { + return '[' + a + ((b - a === 1) ? '' : '-') + b + ']'; +} + +function padding(str) { + return /^-?(0+)\d/.exec(str); +} + +function padZeros(val, tok) { + if (tok.isPadded) { + var diff = Math.abs(tok.maxLen - String(val).length); + switch (diff) { + case 0: + return ''; + case 1: + return '0'; + default: { + return '0{' + diff + '}'; + } + } + } + return val; +} + +/** + * Expose `toRegexRange` + */ + +module.exports = toRegexRange; diff --git a/node_modules/to-regex-range/package.json b/node_modules/to-regex-range/package.json new file mode 100644 index 0000000..6c8e6b1 --- /dev/null +++ b/node_modules/to-regex-range/package.json @@ -0,0 +1,86 @@ +{ + "name": "to-regex-range", + "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", + "version": "2.1.1", + "homepage": "https://github.com/micromatch/to-regex-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "micromatch/to-regex-range", + "bugs": { + "url": "https://github.com/micromatch/to-regex-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "devDependencies": { + "fill-range": "^3.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0", + "text-table": "^0.2.0", + "time-diff": "^0.3.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "date", + "expand", + "expansion", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sequence", + "sh", + "to", + "year" + ], + "verb": { + "related": { + "list": [ + "expand-range", + "fill-range", + "micromatch", + "repeat-element", + "repeat-string" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "helpers": [ + "./examples.js" + ], + "reflinks": [ + "0-5", + "0-9", + "1-5", + "1-9" + ] + } +} diff --git a/node_modules/to-regex/LICENSE b/node_modules/to-regex/LICENSE new file mode 100644 index 0000000..7c9987b --- /dev/null +++ b/node_modules/to-regex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/to-regex/README.md b/node_modules/to-regex/README.md new file mode 100644 index 0000000..5a28fc3 --- /dev/null +++ b/node_modules/to-regex/README.md @@ -0,0 +1,205 @@ +# to-regex [![NPM version](https://img.shields.io/npm/v/to-regex.svg?style=flat)](https://www.npmjs.com/package/to-regex) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex.svg?style=flat)](https://npmjs.org/package/to-regex) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex.svg?style=flat)](https://npmjs.org/package/to-regex) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/to-regex.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/to-regex) + +> Generate a regex from a string or array of strings. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +- [Install](#install) +- [Usage](#usage) +- [Options](#options) + * [options.contains](#optionscontains) + * [options.negate](#optionsnegate) + * [options.nocase](#optionsnocase) + * [options.flags](#optionsflags) + * [options.cache](#optionscache) + * [options.safe](#optionssafe) +- [About](#about) + * [Related projects](#related-projects) + * [Author](#author) + * [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex +``` + +## Usage + +```js +var toRegex = require('to-regex'); + +console.log(toRegex('foo')); +//=> /^(?:foo)$/ + +console.log(toRegex('foo', {negate: true})); +//=> /^(?:(?:(?!^(?:foo)$).)*)$/ + +console.log(toRegex('foo', {contains: true})); +//=> /(?:foo)/ + +console.log(toRegex(['foo', 'bar'], {negate: true})); +//=> /^(?:(?:(?!^(?:(?:foo)|(?:bar))$).)*)$/ + +console.log(toRegex(['foo', 'bar'], {negate: true, contains: true})); +//=> /^(?:(?:(?!(?:(?:foo)|(?:bar))).)*)$/ +``` + +## Options + +### options.contains + +**Type**: `Boolean` + +**Default**: `undefined` + +Generate a regex that will match any string that _contains_ the given pattern. By default, regex is strict will only return true for exact matches. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {contains: true})); +//=> /(?:foo)/ +``` + +### options.negate + +**Type**: `Boolean` + +**Default**: `undefined` + +Create a regex that will match everything except the given pattern. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {negate: true})); +//=> /^(?:(?:(?!^(?:foo)$).)*)$/ +``` + +### options.nocase + +**Type**: `Boolean` + +**Default**: `undefined` + +Adds the `i` flag, to enable case-insensitive matching. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {nocase: true})); +//=> /^(?:foo)$/i +``` + +Alternatively you can pass the flags you want directly on [options.flags](#options.flags). + +### options.flags + +**Type**: `String` + +**Default**: `undefined` + +Define the flags you want to use on the generated regex. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {flags: 'gm'})); +//=> /^(?:foo)$/gm +console.log(toRegex('foo', {flags: 'gmi', nocase: true})); //<= handles redundancy +//=> /^(?:foo)$/gmi +``` + +### options.cache + +**Type**: `Boolean` + +**Default**: `true` + +Generated regex is cached based on the provided string and options. As a result, runtime compilation only happens once per pattern (as long as options are also the same), which can result in dramatic speed improvements. + +This also helps with debugging, since adding options and pattern are added to the generated regex. + +**Disable caching** + +```js +toRegex('foo', {cache: false}); +``` + +### options.safe + +**Type**: `Boolean` + +**Default**: `undefined` + +Check the generated regular expression with [safe-regex](https://github.com/substack/safe-regex) and throw an error if the regex is potentially unsafe. + +**Examples** + +```js +console.log(toRegex('(x+x+)+y')); +//=> /^(?:(x+x+)+y)$/ + +// The following would throw an error +toRegex('(x+x+)+y', {safe: true}); +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [path-regex](https://www.npmjs.com/package/path-regex): Regular expression for matching the parts of a file path. | [homepage](https://github.com/regexps/path-regex "Regular expression for matching the parts of a file path.") +* [to-regex-range](https://www.npmjs.com/package/to-regex-range): Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than… [more](https://github.com/micromatch/to-regex-range) | [homepage](https://github.com/micromatch/to-regex-range "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.") + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 24, 2018._ \ No newline at end of file diff --git a/node_modules/to-regex/index.js b/node_modules/to-regex/index.js new file mode 100644 index 0000000..a87d015 --- /dev/null +++ b/node_modules/to-regex/index.js @@ -0,0 +1,155 @@ +'use strict'; + +var safe = require('safe-regex'); +var define = require('define-property'); +var extend = require('extend-shallow'); +var not = require('regex-not'); +var MAX_LENGTH = 1024 * 64; + +/** + * Session cache + */ + +var cache = {}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +module.exports = function(patterns, options) { + if (!Array.isArray(patterns)) { + return makeRe(patterns, options); + } + return makeRe(patterns.join('|'), options); +}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +function makeRe(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + var key = pattern; + // do this before shallow cloning options, it's a lot faster + if (!options || (options && options.cache !== false)) { + key = createKey(pattern, options); + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + } + + var opts = extend({}, options); + if (opts.contains === true) { + if (opts.negate === true) { + opts.strictNegate = false; + } else { + opts.strict = false; + } + } + + if (opts.strict === false) { + opts.strictOpen = false; + opts.strictClose = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var flags = opts.flags || ''; + var regex; + + if (opts.nocase === true && !/i/.test(flags)) { + flags += 'i'; + } + + try { + if (opts.negate || typeof opts.strictNegate === 'boolean') { + pattern = not.create(pattern, opts); + } + + var str = open + '(?:' + pattern + ')' + close; + regex = new RegExp(str, flags); + + if (opts.safe === true && safe(regex) === false) { + throw new Error('potentially unsafe regular expression: ' + regex.source); + } + + } catch (err) { + if (opts.strictErrors === true || opts.safe === true) { + err.key = key; + err.pattern = pattern; + err.originalOptions = options; + err.createdOptions = opts; + throw err; + } + + try { + regex = new RegExp('^' + pattern.replace(/(\W)/g, '\\$1') + '$'); + } catch (err) { + regex = /.^/; //<= match nothing + } + } + + if (opts.cache !== false) { + memoize(regex, key, pattern, opts); + } + return regex; +} + +/** + * Memoize generated regex. This can result in dramatic speed improvements + * and simplify debugging by adding options and pattern to the regex. It can be + * disabled by passing setting `options.cache` to false. + */ + +function memoize(regex, key, pattern, options) { + define(regex, 'cached', true); + define(regex, 'pattern', pattern); + define(regex, 'options', options); + define(regex, 'key', key); + cache[key] = regex; +} + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +function createKey(pattern, options) { + if (!options) return pattern; + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +} + +/** + * Expose `makeRe` + */ + +module.exports.makeRe = makeRe; diff --git a/node_modules/to-regex/node_modules/extend-shallow/LICENSE b/node_modules/to-regex/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/to-regex/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/to-regex/node_modules/extend-shallow/README.md b/node_modules/to-regex/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/to-regex/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/to-regex/node_modules/extend-shallow/index.js b/node_modules/to-regex/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/to-regex/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/to-regex/node_modules/extend-shallow/package.json b/node_modules/to-regex/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e5e9105 --- /dev/null +++ b/node_modules/to-regex/node_modules/extend-shallow/package.json @@ -0,0 +1,83 @@ +{ + "name": "extend-shallow", + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Peter deHaan (http://about.me/peterdehaan)" + ], + "repository": "jonschlinkert/extend-shallow", + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/to-regex/node_modules/is-extendable/LICENSE b/node_modules/to-regex/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/to-regex/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/to-regex/node_modules/is-extendable/README.md b/node_modules/to-regex/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/to-regex/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/to-regex/node_modules/is-extendable/index.d.ts b/node_modules/to-regex/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/to-regex/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/to-regex/node_modules/is-extendable/index.js b/node_modules/to-regex/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/to-regex/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/to-regex/node_modules/is-extendable/package.json b/node_modules/to-regex/node_modules/is-extendable/package.json new file mode 100644 index 0000000..2aaab65 --- /dev/null +++ b/node_modules/to-regex/node_modules/is-extendable/package.json @@ -0,0 +1,67 @@ +{ + "name": "is-extendable", + "description": "Returns true if a value is a plain object, array or function.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extendable", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "index.d.ts", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/to-regex/package.json b/node_modules/to-regex/package.json new file mode 100644 index 0000000..e4277d3 --- /dev/null +++ b/node_modules/to-regex/package.json @@ -0,0 +1,62 @@ +{ + "name": "to-regex", + "description": "Generate a regex from a string or array of strings.", + "version": "3.0.2", + "homepage": "https://github.com/jonschlinkert/to-regex", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/to-regex", + "bugs": { + "url": "https://github.com/jonschlinkert/to-regex/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "match", + "regex", + "regular expression", + "test", + "to" + ], + "verb": { + "toc": { + "method": "preWrite" + }, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "path-regex", + "to-regex-range" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/toidentifier/HISTORY.md b/node_modules/toidentifier/HISTORY.md new file mode 100644 index 0000000..cb7cc89 --- /dev/null +++ b/node_modules/toidentifier/HISTORY.md @@ -0,0 +1,9 @@ +1.0.1 / 2021-11-14 +================== + + * pref: enable strict mode + +1.0.0 / 2018-07-09 +================== + + * Initial release diff --git a/node_modules/toidentifier/LICENSE b/node_modules/toidentifier/LICENSE new file mode 100644 index 0000000..de22d15 --- /dev/null +++ b/node_modules/toidentifier/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/toidentifier/README.md b/node_modules/toidentifier/README.md new file mode 100644 index 0000000..57e8a78 --- /dev/null +++ b/node_modules/toidentifier/README.md @@ -0,0 +1,61 @@ +# toidentifier + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][codecov-image]][codecov-url] + +> Convert a string of words to a JavaScript identifier + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install toidentifier +``` + +## Example + +```js +var toIdentifier = require('toidentifier') + +console.log(toIdentifier('Bad Request')) +// => "BadRequest" +``` + +## API + +This CommonJS module exports a single default function: `toIdentifier`. + +### toIdentifier(string) + +Given a string as the argument, it will be transformed according to +the following rules and the new string will be returned: + +1. Split into words separated by space characters (`0x20`). +2. Upper case the first character of each word. +3. Join the words together with no separator. +4. Remove all non-word (`[0-9a-z_]`) characters. + +## License + +[MIT](LICENSE) + +[codecov-image]: https://img.shields.io/codecov/c/github/component/toidentifier.svg +[codecov-url]: https://codecov.io/gh/component/toidentifier +[downloads-image]: https://img.shields.io/npm/dm/toidentifier.svg +[downloads-url]: https://npmjs.org/package/toidentifier +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/component/toidentifier/ci/master?label=ci +[github-actions-ci-url]: https://github.com/component/toidentifier?query=workflow%3Aci +[npm-image]: https://img.shields.io/npm/v/toidentifier.svg +[npm-url]: https://npmjs.org/package/toidentifier + + +## + +[npm]: https://www.npmjs.com/ + +[yarn]: https://yarnpkg.com/ diff --git a/node_modules/toidentifier/index.js b/node_modules/toidentifier/index.js new file mode 100644 index 0000000..9295d02 --- /dev/null +++ b/node_modules/toidentifier/index.js @@ -0,0 +1,32 @@ +/*! + * toidentifier + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = toIdentifier + +/** + * Trasform the given string into a JavaScript identifier + * + * @param {string} str + * @returns {string} + * @public + */ + +function toIdentifier (str) { + return str + .split(' ') + .map(function (token) { + return token.slice(0, 1).toUpperCase() + token.slice(1) + }) + .join('') + .replace(/[^ _0-9a-z]/gi, '') +} diff --git a/node_modules/toidentifier/package.json b/node_modules/toidentifier/package.json new file mode 100644 index 0000000..42db1a6 --- /dev/null +++ b/node_modules/toidentifier/package.json @@ -0,0 +1,38 @@ +{ + "name": "toidentifier", + "description": "Convert a string of words to a JavaScript identifier", + "version": "1.0.1", + "author": "Douglas Christopher Wilson ", + "contributors": [ + "Douglas Christopher Wilson ", + "Nick Baugh (http://niftylettuce.com/)" + ], + "repository": "component/toidentifier", + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.3", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.3.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.1.3", + "nyc": "15.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "license": "MIT", + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/typed-array-buffer/.eslintrc b/node_modules/typed-array-buffer/.eslintrc new file mode 100644 index 0000000..46f3b12 --- /dev/null +++ b/node_modules/typed-array-buffer/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/typed-array-buffer/.github/FUNDING.yml b/node_modules/typed-array-buffer/.github/FUNDING.yml new file mode 100644 index 0000000..bf630d0 --- /dev/null +++ b/node_modules/typed-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/typed-array-buffer/.nycrc b/node_modules/typed-array-buffer/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/typed-array-buffer/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-buffer/CHANGELOG.md b/node_modules/typed-array-buffer/CHANGELOG.md new file mode 100644 index 0000000..5a71f71 --- /dev/null +++ b/node_modules/typed-array-buffer/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/ljharb/typed-array-buffer/compare/v1.0.1...v1.0.2) - 2024-02-19 + +### Commits + +- add types [`23c6fba`](https://github.com/ljharb/typed-array-buffer/commit/23c6fba167dbc8c1e9291eed3f68e64a5651075a) +- [Deps] update `available-typed-arrays` [`5f68ba1`](https://github.com/ljharb/typed-array-buffer/commit/5f68ba1fdcd004af46d529fbb08220de2254cf43) +- [Deps] update `call-bind` [`54a92ce`](https://github.com/ljharb/typed-array-buffer/commit/54a92ce4caf023c8680ffe64534ba881b78cdc17) +- [Dev Deps] update `tape` [`b0b3342`](https://github.com/ljharb/typed-array-buffer/commit/b0b3342bcbefae5f3dff01b0e3734b08ca927f58) + +## [v1.0.1](https://github.com/ljharb/typed-array-buffer/compare/v1.0.0...v1.0.1) - 2024-02-06 + +### Commits + +- [Dev Deps] update `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`5334477`](https://github.com/ljharb/typed-array-buffer/commit/53344773866f35820dc4deef1aa47ec7890f2b02) +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`e2511e0`](https://github.com/ljharb/typed-array-buffer/commit/e2511e011a2331bd4a36ad6003a98b1cf766bc26) +- [Deps] update `call-bind`, `get-intrinsic`, `is-typed-array` [`36c3b11`](https://github.com/ljharb/typed-array-buffer/commit/36c3b11efc9bce98de8bee5f81dcae4305876893) +- [meta] add `sideEffects` flag [`46cc1f4`](https://github.com/ljharb/typed-array-buffer/commit/46cc1f4a8b8875fc6e84b33182602ec37655bbbd) + +## v1.0.0 - 2023-06-05 + +### Commits + +- Initial implementation, tests, readme [`5bc2953`](https://github.com/ljharb/typed-array-buffer/commit/5bc295337b4310659832fc08699a4d10c2dbbded) +- Initial commit [`98b8ac9`](https://github.com/ljharb/typed-array-buffer/commit/98b8ac90f407c368effa25d395aeea1d72e1d4b6) +- npm init [`6a4a73c`](https://github.com/ljharb/typed-array-buffer/commit/6a4a73c66b1f13fd17699c6500a4979003676696) +- Only apps should have lockfiles [`7226abf`](https://github.com/ljharb/typed-array-buffer/commit/7226abfda329b99dc25526c48740b076d128a7be) diff --git a/node_modules/typed-array-buffer/LICENSE b/node_modules/typed-array-buffer/LICENSE new file mode 100644 index 0000000..b4213ac --- /dev/null +++ b/node_modules/typed-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/typed-array-buffer/README.md b/node_modules/typed-array-buffer/README.md new file mode 100644 index 0000000..eb7205d --- /dev/null +++ b/node_modules/typed-array-buffer/README.md @@ -0,0 +1,42 @@ +# typed-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get the ArrayBuffer out of a TypedArray, robustly. + +This will work in node <= 0.10 and < 0.11.4, where there's no prototype accessor, only a nonconfigurable own property. +It will also work in modern engines where `TypedArray.prototype.buffer` has been deleted after this module has loaded. + +## Example + +```js +const typedArrayBuffer = require('typed-array-buffer'); +const assert = require('assert'); + +const arr = new Uint8Array(0); +assert.equal(arr.buffer, typedArrayBuffer(arr)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/typed-array-buffer +[npm-version-svg]: https://versionbadg.es/ljharb/typed-array-buffer.svg +[deps-svg]: https://david-dm.org/ljharb/typed-array-buffer.svg +[deps-url]: https://david-dm.org/ljharb/typed-array-buffer +[dev-deps-svg]: https://david-dm.org/ljharb/typed-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/typed-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/typed-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/typed-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/typed-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-buffer +[codecov-image]: https://codecov.io/gh/ljharb/typed-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/typed-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/typed-array-buffer +[actions-url]: https://github.com/ljharb/typed-array-buffer/actions diff --git a/node_modules/typed-array-buffer/index.d.ts b/node_modules/typed-array-buffer/index.d.ts new file mode 100644 index 0000000..a116df5 --- /dev/null +++ b/node_modules/typed-array-buffer/index.d.ts @@ -0,0 +1,16 @@ +type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; + +declare function typedArrayBuffer(x: TypedArray): ArrayBuffer; + +export = typedArrayBuffer; diff --git a/node_modules/typed-array-buffer/index.js b/node_modules/typed-array-buffer/index.js new file mode 100644 index 0000000..20651d3 --- /dev/null +++ b/node_modules/typed-array-buffer/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var $TypeError = require('es-errors/type'); + +var callBound = require('call-bind/callBound'); + +var $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true); + +var isTypedArray = require('is-typed-array'); + +/** @type {import('.')} */ +// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter +module.exports = $typedArrayBuffer || function typedArrayBuffer(x) { + if (!isTypedArray(x)) { + throw new $TypeError('Not a Typed Array'); + } + return x.buffer; +}; diff --git a/node_modules/typed-array-buffer/package.json b/node_modules/typed-array-buffer/package.json new file mode 100644 index 0000000..f07ab9f --- /dev/null +++ b/node_modules/typed-array-buffer/package.json @@ -0,0 +1,80 @@ +{ + "name": "typed-array-buffer", + "version": "1.0.2", + "description": "Get the ArrayBuffer out of a TypedArray, robustly.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/typed-array-buffer.git" + }, + "keywords": [ + "typed array", + "arraybuffer", + "buffer" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/typed-array-buffer/issues" + }, + "homepage": "https://github.com/ljharb/typed-array-buffer#readme", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.7", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-buffer/test/index.js b/node_modules/typed-array-buffer/test/index.js new file mode 100644 index 0000000..9596317 --- /dev/null +++ b/node_modules/typed-array-buffer/test/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var test = require('tape'); +var availableTypedArrays = require('available-typed-arrays')(); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var inspect = require('object-inspect'); + +var typedArrayBuffer = require('../'); + +test('typedArrayBuffer', function (t) { + // @ts-expect-error TS sucks at concat + forEach([].concat(v.primitives, v.objects), function (nonTA) { + t['throws'](function () { typedArrayBuffer(nonTA); }, TypeError, inspect(nonTA) + ' is not a Typed Array'); + }); + + forEach(availableTypedArrays, function (TA) { + var ta = new global[TA](0); + t.equal(typedArrayBuffer(ta), ta.buffer, inspect(ta) + ' has the same buffer as its own buffer property'); + }); + + t.end(); +}); diff --git a/node_modules/typed-array-buffer/tsconfig.json b/node_modules/typed-array-buffer/tsconfig.json new file mode 100644 index 0000000..210a000 --- /dev/null +++ b/node_modules/typed-array-buffer/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/typed-array-byte-length/.eslintrc b/node_modules/typed-array-byte-length/.eslintrc new file mode 100644 index 0000000..7c87f56 --- /dev/null +++ b/node_modules/typed-array-byte-length/.eslintrc @@ -0,0 +1,12 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "Uint8Array": false, + }, + + "rules": { + }, +} diff --git a/node_modules/typed-array-byte-length/.github/FUNDING.yml b/node_modules/typed-array-byte-length/.github/FUNDING.yml new file mode 100644 index 0000000..7d6aac4 --- /dev/null +++ b/node_modules/typed-array-byte-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/typed-array-byte-length/.nycrc b/node_modules/typed-array-byte-length/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/typed-array-byte-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-byte-length/CHANGELOG.md b/node_modules/typed-array-byte-length/CHANGELOG.md new file mode 100644 index 0000000..1122f83 --- /dev/null +++ b/node_modules/typed-array-byte-length/CHANGELOG.md @@ -0,0 +1,25 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/inspect-js/typed-array-byte-length/compare/v1.0.0...v1.0.1) - 2024-02-20 + +### Commits + +- add types [`3144671`](https://github.com/inspect-js/typed-array-byte-length/commit/3144671ca4035136c558a107ce61af255ae3e858) +- [actions] skip ls check on node < 10; remove redundant finisher [`0f83947`](https://github.com/inspect-js/typed-array-byte-length/commit/0f83947bfe641fd87253330a6a83e8b7571e5c6a) +- [Refactor] use `gopd` [`507b948`](https://github.com/inspect-js/typed-array-byte-length/commit/507b948f9e754ad5b0888a15558448ec879c04c4) +- [Dev Deps] update `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`aba282d`](https://github.com/inspect-js/typed-array-byte-length/commit/aba282da3a3e16f648ceb4bc4f174cf4942a94e9) +- [Deps] update `call-bind`, `has-proto`, `is-typed-array` [`acfe4a9`](https://github.com/inspect-js/typed-array-byte-length/commit/acfe4a9081f35cea3b450b07a4736e1ab037a708) +- [meta] add `sideEffects` flag [`063a8a7`](https://github.com/inspect-js/typed-array-byte-length/commit/063a8a7ec8c134a012903531beccfc4418f701d0) + +## v1.0.0 - 2023-07-14 + +### Commits + +- Initial implementation, tests, readme [`b8800c8`](https://github.com/inspect-js/typed-array-byte-length/commit/b8800c8f7f0fddd8744fd13dfa6239a504b4dc8d) +- Initial commit [`72723d8`](https://github.com/inspect-js/typed-array-byte-length/commit/72723d8f8fbff27d74b19f5e096d2eb2087d90dc) +- Only apps should have lockfiles [`a7dfc57`](https://github.com/inspect-js/typed-array-byte-length/commit/a7dfc57098655049b9c43cf1c3a39f24205821be) diff --git a/node_modules/typed-array-byte-length/LICENSE b/node_modules/typed-array-byte-length/LICENSE new file mode 100644 index 0000000..707437b --- /dev/null +++ b/node_modules/typed-array-byte-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/typed-array-byte-length/README.md b/node_modules/typed-array-byte-length/README.md new file mode 100644 index 0000000..a617261 --- /dev/null +++ b/node_modules/typed-array-byte-length/README.md @@ -0,0 +1,70 @@ +# typed-array-byte-offset [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Robustly get the byte offset of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `byteOffset` property is overridden. + +## Example + +```js +var typedArrayByteOffset = require('typed-array-byte-offset'); +var assert = require('assert'); + +assert.equal(false, typedArrayByteOffset(undefined)); +assert.equal(false, typedArrayByteOffset(null)); +assert.equal(false, typedArrayByteOffset(false)); +assert.equal(false, typedArrayByteOffset(true)); +assert.equal(false, typedArrayByteOffset([])); +assert.equal(false, typedArrayByteOffset({})); +assert.equal(false, typedArrayByteOffset(/a/g)); +assert.equal(false, typedArrayByteOffset(new RegExp('a', 'g'))); +assert.equal(false, typedArrayByteOffset(new Date())); +assert.equal(false, typedArrayByteOffset(42)); +assert.equal(false, typedArrayByteOffset(NaN)); +assert.equal(false, typedArrayByteOffset(Infinity)); +assert.equal(false, typedArrayByteOffset(new Number(42))); +assert.equal(false, typedArrayByteOffset('foo')); +assert.equal(false, typedArrayByteOffset(Object('foo'))); +assert.equal(false, typedArrayByteOffset(function () {})); +assert.equal(false, typedArrayByteOffset(function* () {})); +assert.equal(false, typedArrayByteOffset(x => x * x)); +assert.equal(false, typedArrayByteOffset([])); + +const buffer = new ArrayBuffer(32); + +assert.equal(8, typedArrayByteOffset(new Int8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8ClampedArray(buffer, 8))); +assert.equal(4, typedArrayByteOffset(new Int16Array(buffer, 4))); +assert.equal(4, typedArrayByteOffset(new Uint16Array(buffer, 4))); +assert.equal(8, typedArrayByteOffset(new Int32Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint32Array(buffer, 8))); +assert.equal(16, typedArrayByteOffset(new Float32Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new Float64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigInt64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigUint64Array(buffer, 16))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/typed-array-byte-offset +[npm-version-svg]: https://versionbadg.es/inspect-js/typed-array-byte-offset.svg +[deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset.svg +[deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset +[dev-deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/typed-array-byte-offset.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/typed-array-byte-offset.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/typed-array-byte-offset.svg +[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-byte-offset +[codecov-image]: https://codecov.io/gh/inspect-js/typed-array-byte-offset/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/typed-array-byte-offset/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/typed-array-byte-offset +[actions-url]: https://github.com/inspect-js/typed-array-byte-offset/actions diff --git a/node_modules/typed-array-byte-length/index.d.ts b/node_modules/typed-array-byte-length/index.d.ts new file mode 100644 index 0000000..ed2524a --- /dev/null +++ b/node_modules/typed-array-byte-length/index.d.ts @@ -0,0 +1,17 @@ +type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; + +declare function typedArrayByteLength(value: TypedArray): number; +declare function typedArrayByteLength(value: unknown): false; + +export = typedArrayByteLength; \ No newline at end of file diff --git a/node_modules/typed-array-byte-length/index.js b/node_modules/typed-array-byte-length/index.js new file mode 100644 index 0000000..a1d4e52 --- /dev/null +++ b/node_modules/typed-array-byte-length/index.js @@ -0,0 +1,78 @@ +'use strict'; + +var callBind = require('call-bind'); +var forEach = require('for-each'); +var gOPD = require('gopd'); +var hasProto = require('has-proto')(); +var isTypedArray = require('is-typed-array'); + +var typedArrays = require('available-typed-arrays')(); + +/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */ +/** @typedef {import('possible-typed-array-names')[number]} TypedArrayNames */ +/** @typedef {(value: TypedArray) => number} Getter */ + +/** @type {Object.} */ +var getters = {}; + +var oDP = Object.defineProperty; +if (gOPD) { + /** @type {Getter} */ + var getByteLength = function (x) { + return x.byteLength; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof global[typedArray] === 'function' || typeof global[typedArray] === 'object') { + var Proto = global[typedArray].prototype; + // @ts-expect-error TS doesn't narrow properly inside callbacks + var descriptor = gOPD(Proto, 'byteLength'); + if (!descriptor && hasProto) { + // @ts-expect-error hush, TS, every object has a dunder proto + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS doesn't narrow properly inside callbacks + descriptor = gOPD(superProto, 'byteLength'); + } + // Opera 12.16 has a magic byteLength data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic byteLength data property + var arr = new global[typedArray](2); + // @ts-expect-error TS doesn't narrow properly inside callbacks + descriptor = gOPD(arr, 'byteLength'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteLength; + } + } + } + }); +} + +/** @type {Getter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundByteLength; + forEach(getters, /** @type {(getter: Getter) => void} */ function (getter) { + if (typeof foundByteLength !== 'number') { + try { + var byteLength = getter(value); + if (typeof byteLength === 'number') { + foundByteLength = byteLength; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the callback is invoked sync + return foundByteLength; +}; + +/** @type {import('.')} */ +module.exports = function typedArrayByteLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; diff --git a/node_modules/typed-array-byte-length/package.json b/node_modules/typed-array-byte-length/package.json new file mode 100644 index 0000000..5ab8a77 --- /dev/null +++ b/node_modules/typed-array-byte-length/package.json @@ -0,0 +1,111 @@ +{ + "name": "typed-array-byte-length", + "version": "1.0.1", + "description": "Robustly get the byte length of a Typed Array", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/typed-array-byte-length.git" + }, + "keywords": [ + "typed", + "array", + "byteLength", + "byte", + "length", + "robust", + "es", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "BigInt64Array", + "BigUint64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/typed-array-byte-length/issues" + }, + "homepage": "https://github.com/inspect-js/typed-array-byte-length#readme", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/for-each": "^0.3.3", + "@types/gopd": "^1.0.3", + "@types/is-callable": "^1.1.2", + "@types/make-arrow-function": "^1.2.2", + "@types/make-generator-function": "^2.0.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.7", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-byte-length/test/index.js b/node_modules/typed-array-byte-length/test/index.js new file mode 100644 index 0000000..5763075 --- /dev/null +++ b/node_modules/typed-array-byte-length/test/index.js @@ -0,0 +1,82 @@ +'use strict'; + +var test = require('tape'); +var typedArrayByteLength = require('../'); +var isCallable = require('is-callable'); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var availableTypedArrays = require('available-typed-arrays')(); + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + // @ts-expect-error + st.equal(false, typedArrayByteLength(), 'undefined is not typed array'); + st.equal(false, typedArrayByteLength(null), 'null is not typed array'); + st.equal(false, typedArrayByteLength(false), 'false is not typed array'); + st.equal(false, typedArrayByteLength(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, typedArrayByteLength({}), 'object is not typed array'); + t.equal(false, typedArrayByteLength(/a/g), 'regex literal is not typed array'); + t.equal(false, typedArrayByteLength(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, typedArrayByteLength(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, typedArrayByteLength(42), 'number is not typed array'); + st.equal(false, typedArrayByteLength(Object(42)), 'number object is not typed array'); + st.equal(false, typedArrayByteLength(NaN), 'NaN is not typed array'); + st.equal(false, typedArrayByteLength(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, typedArrayByteLength('foo'), 'string primitive is not typed array'); + st.equal(false, typedArrayByteLength(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, typedArrayByteLength(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, typedArrayByteLength(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.equal(false, typedArrayByteLength(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (t) { + var length = 64; + var byteLength = 32; + + forEach(availableTypedArrays, function (typedArray) { + var buffer = new ArrayBuffer(length); + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(buffer, byteLength); + t.equal(typedArrayByteLength(arr), byteLength, 'new ' + typedArray + '(new ArrayBuffer(' + length + '), ' + byteLength + ') is typed array of byte Length ' + byteLength); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + + var buffer = new ArrayBuffer(8); + var uint8 = new Uint8Array(buffer, 2); + + t.equal(typedArrayByteLength(uint8), 6, 'byteLength is as expected'); + + t.end(); +}); diff --git a/node_modules/typed-array-byte-length/tsconfig.json b/node_modules/typed-array-byte-length/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/typed-array-byte-length/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/typed-array-byte-offset/.eslintrc b/node_modules/typed-array-byte-offset/.eslintrc new file mode 100644 index 0000000..7376ac8 --- /dev/null +++ b/node_modules/typed-array-byte-offset/.eslintrc @@ -0,0 +1,8 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + }, +} diff --git a/node_modules/typed-array-byte-offset/.github/FUNDING.yml b/node_modules/typed-array-byte-offset/.github/FUNDING.yml new file mode 100644 index 0000000..7d6aac4 --- /dev/null +++ b/node_modules/typed-array-byte-offset/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/typed-array-byte-offset/.nycrc b/node_modules/typed-array-byte-offset/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/typed-array-byte-offset/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-byte-offset/CHANGELOG.md b/node_modules/typed-array-byte-offset/CHANGELOG.md new file mode 100644 index 0000000..0e01d0e --- /dev/null +++ b/node_modules/typed-array-byte-offset/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/typed-array-byte-offset/compare/v1.0.1...v1.0.2) - 2024-02-20 + +### Commits + +- add types [`9eecdd2`](https://github.com/inspect-js/typed-array-byte-offset/commit/9eecdd245b089610d6ad49ef63c9df2b58c3e8a6) +- [actions] skip ls check on node < 10; remove redundant finisher [`4fb4c91`](https://github.com/inspect-js/typed-array-byte-offset/commit/4fb4c912f5eb8034f4e3705b30f3f7dcc7080039) +- [Deps] update `available-typed-arrays`, `has-proto` [`805cee2`](https://github.com/inspect-js/typed-array-byte-offset/commit/805cee207d73e12d526ff23d2c161f38283a1ed9) + +## [v1.0.1](https://github.com/inspect-js/typed-array-byte-offset/compare/v1.0.0...v1.0.1) - 2024-02-17 + +### Commits + +- [Dev Deps] update `aud`, `npmignore`, `object-inspect`, `tape` [`ffe7494`](https://github.com/inspect-js/typed-array-byte-offset/commit/ffe7494826fbb6d6bd11c40e03619b12a4ec2266) +- [Deps] update `available-typed-arrays`, `call-bind`, `is-typed-array` [`3006bd7`](https://github.com/inspect-js/typed-array-byte-offset/commit/3006bd7e343d191093802473277801d12bfdc7b2) +- [Refactor] use `gopd` [`45827ea`](https://github.com/inspect-js/typed-array-byte-offset/commit/45827ea7d9709cb1b3a9f2313eed76b71052b9c5) +- [Dev Deps] update `tape` [`e33d080`](https://github.com/inspect-js/typed-array-byte-offset/commit/e33d080ef6488b5f15afe1078a9e5711d9656538) +- [meta] add `sideEffects` flag [`f1dc0db`](https://github.com/inspect-js/typed-array-byte-offset/commit/f1dc0db73c1c4b93c15076602a3e30353878312c) + +## v1.0.0 - 2023-06-06 + +### Commits + +- Initial implementation, tests, readme [`f227633`](https://github.com/inspect-js/typed-array-byte-offset/commit/f2276337a907bdfe9725af1b36c3109e76f2430d) +- Initial commit [`806bbaf`](https://github.com/inspect-js/typed-array-byte-offset/commit/806bbaf81e0267aebce5ae68cbf138718513642a) +- npm init [`1151981`](https://github.com/inspect-js/typed-array-byte-offset/commit/1151981427eb1fddab8599d36e6afea50a78293f) +- Only apps should have lockfiles [`5fa9933`](https://github.com/inspect-js/typed-array-byte-offset/commit/5fa9933275f10bdb9e8a175cc70a8228d4811642) diff --git a/node_modules/typed-array-byte-offset/LICENSE b/node_modules/typed-array-byte-offset/LICENSE new file mode 100644 index 0000000..707437b --- /dev/null +++ b/node_modules/typed-array-byte-offset/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/typed-array-byte-offset/README.md b/node_modules/typed-array-byte-offset/README.md new file mode 100644 index 0000000..a617261 --- /dev/null +++ b/node_modules/typed-array-byte-offset/README.md @@ -0,0 +1,70 @@ +# typed-array-byte-offset [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Robustly get the byte offset of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `byteOffset` property is overridden. + +## Example + +```js +var typedArrayByteOffset = require('typed-array-byte-offset'); +var assert = require('assert'); + +assert.equal(false, typedArrayByteOffset(undefined)); +assert.equal(false, typedArrayByteOffset(null)); +assert.equal(false, typedArrayByteOffset(false)); +assert.equal(false, typedArrayByteOffset(true)); +assert.equal(false, typedArrayByteOffset([])); +assert.equal(false, typedArrayByteOffset({})); +assert.equal(false, typedArrayByteOffset(/a/g)); +assert.equal(false, typedArrayByteOffset(new RegExp('a', 'g'))); +assert.equal(false, typedArrayByteOffset(new Date())); +assert.equal(false, typedArrayByteOffset(42)); +assert.equal(false, typedArrayByteOffset(NaN)); +assert.equal(false, typedArrayByteOffset(Infinity)); +assert.equal(false, typedArrayByteOffset(new Number(42))); +assert.equal(false, typedArrayByteOffset('foo')); +assert.equal(false, typedArrayByteOffset(Object('foo'))); +assert.equal(false, typedArrayByteOffset(function () {})); +assert.equal(false, typedArrayByteOffset(function* () {})); +assert.equal(false, typedArrayByteOffset(x => x * x)); +assert.equal(false, typedArrayByteOffset([])); + +const buffer = new ArrayBuffer(32); + +assert.equal(8, typedArrayByteOffset(new Int8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint8ClampedArray(buffer, 8))); +assert.equal(4, typedArrayByteOffset(new Int16Array(buffer, 4))); +assert.equal(4, typedArrayByteOffset(new Uint16Array(buffer, 4))); +assert.equal(8, typedArrayByteOffset(new Int32Array(buffer, 8))); +assert.equal(8, typedArrayByteOffset(new Uint32Array(buffer, 8))); +assert.equal(16, typedArrayByteOffset(new Float32Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new Float64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigInt64Array(buffer, 16))); +assert.equal(16, typedArrayByteOffset(new BigUint64Array(buffer, 16))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/typed-array-byte-offset +[npm-version-svg]: https://versionbadg.es/inspect-js/typed-array-byte-offset.svg +[deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset.svg +[deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset +[dev-deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/typed-array-byte-offset.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/typed-array-byte-offset.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/typed-array-byte-offset.svg +[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-byte-offset +[codecov-image]: https://codecov.io/gh/inspect-js/typed-array-byte-offset/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/typed-array-byte-offset/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/typed-array-byte-offset +[actions-url]: https://github.com/inspect-js/typed-array-byte-offset/actions diff --git a/node_modules/typed-array-byte-offset/index.d.ts b/node_modules/typed-array-byte-offset/index.d.ts new file mode 100644 index 0000000..87647ef --- /dev/null +++ b/node_modules/typed-array-byte-offset/index.d.ts @@ -0,0 +1,17 @@ +type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; + +declare function typedArrayByteOffset(value: TypedArray): number; +declare function typedArrayByteOffset(value: unknown): false; + +export = typedArrayByteOffset; diff --git a/node_modules/typed-array-byte-offset/index.js b/node_modules/typed-array-byte-offset/index.js new file mode 100644 index 0000000..cdf94c3 --- /dev/null +++ b/node_modules/typed-array-byte-offset/index.js @@ -0,0 +1,78 @@ +'use strict'; + +var forEach = require('for-each'); +var callBind = require('call-bind'); + +var typedArrays = require('available-typed-arrays')(); + +/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */ +/** @typedef {(x: TypedArray) => number} ByteOffsetGetter */ + +/** @type {Object.} */ +var getters = {}; +var hasProto = require('has-proto')(); + +var gOPD = require('gopd'); +var oDP = Object.defineProperty; +if (gOPD) { + /** @type {ByteOffsetGetter} */ + var getByteOffset = function (x) { + return x.byteOffset; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof global[typedArray] === 'function' || typeof global[typedArray] === 'object') { + var Proto = global[typedArray].prototype; + // @ts-expect-error TS can't guarantee the callback is invoked sync + var descriptor = gOPD(Proto, 'byteOffset'); + if (!descriptor && hasProto) { + // @ts-expect-error hush, TS, every object has a dunder proto + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(superProto, 'byteOffset'); + } + // Opera 12.16 has a magic byteOffset data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic byteOffset data property + var arr = new global[typedArray](2); + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(arr, 'byteOffset'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteOffset; + } + } + } + }); +} + +/** @type {ByteOffsetGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundOffset; + forEach(getters, /** @type {(getter: ByteOffsetGetter) => void} */ function (getter) { + if (typeof foundOffset !== 'number') { + try { + var offset = getter(value); + if (typeof offset === 'number') { + foundOffset = offset; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the callback is invoked sync + return foundOffset; +}; + +var isTypedArray = require('is-typed-array'); + +/** @type {import('.')} */ +module.exports = function typedArrayByteOffset(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; diff --git a/node_modules/typed-array-byte-offset/package.json b/node_modules/typed-array-byte-offset/package.json new file mode 100644 index 0000000..4c5105f --- /dev/null +++ b/node_modules/typed-array-byte-offset/package.json @@ -0,0 +1,111 @@ +{ + "name": "typed-array-byte-offset", + "version": "1.0.2", + "description": "Robustly get the byte offset of a Typed Array", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/typed-array-byte-offset.git" + }, + "keywords": [ + "typed", + "array", + "byteOffset", + "byte", + "offset", + "robust", + "es", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "BigInt64Array", + "BigUint64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/typed-array-byte-offset/issues" + }, + "homepage": "https://github.com/inspect-js/typed-array-byte-offset#readme", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/for-each": "^0.3.3", + "@types/gopd": "^1.0.3", + "@types/is-callable": "^1.1.2", + "@types/make-arrow-function": "^1.2.2", + "@types/make-generator-function": "^2.0.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "possible-typed-array-names": "^1.0.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "^5.4.0-dev.20240219" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-byte-offset/test/index.js b/node_modules/typed-array-byte-offset/test/index.js new file mode 100644 index 0000000..70c61a8 --- /dev/null +++ b/node_modules/typed-array-byte-offset/test/index.js @@ -0,0 +1,77 @@ +'use strict'; + +var test = require('tape'); +var typedArrayByteOffset = require('../'); +var isCallable = require('is-callable'); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var typedArrayNames = require('possible-typed-array-names'); + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + // @ts-expect-error + st.equal(false, typedArrayByteOffset(), 'undefined is not typed array'); + st.equal(false, typedArrayByteOffset(null), 'null is not typed array'); + st.equal(false, typedArrayByteOffset(false), 'false is not typed array'); + st.equal(false, typedArrayByteOffset(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, typedArrayByteOffset({}), 'object is not typed array'); + t.equal(false, typedArrayByteOffset(/a/g), 'regex literal is not typed array'); + t.equal(false, typedArrayByteOffset(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, typedArrayByteOffset(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, typedArrayByteOffset(42), 'number is not typed array'); + st.equal(false, typedArrayByteOffset(Object(42)), 'number object is not typed array'); + st.equal(false, typedArrayByteOffset(NaN), 'NaN is not typed array'); + st.equal(false, typedArrayByteOffset(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, typedArrayByteOffset('foo'), 'string primitive is not typed array'); + st.equal(false, typedArrayByteOffset(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, typedArrayByteOffset(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, typedArrayByteOffset(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.equal(false, typedArrayByteOffset(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('Typed Arrays', function (t) { + var length = 32; + var byteOffset = 16; + + forEach(typedArrayNames, function (typedArray) { + var buffer = new ArrayBuffer(length); + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(buffer, byteOffset); + t.equal(typedArrayByteOffset(arr), byteOffset, 'new ' + typedArray + '(new ArrayBuffer(' + length + '), ' + byteOffset + ') is typed array of byte offset ' + byteOffset); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/typed-array-byte-offset/tsconfig.json b/node_modules/typed-array-byte-offset/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/typed-array-byte-offset/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/typed-array-length/.eslintrc b/node_modules/typed-array-length/.eslintrc new file mode 100644 index 0000000..bc84181 --- /dev/null +++ b/node_modules/typed-array-length/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 11], + "max-statements": [2, 15], + "new-cap": [2, { "capIsNewExceptions": ["IsCallable"] }], + }, +} diff --git a/node_modules/typed-array-length/.github/FUNDING.yml b/node_modules/typed-array-length/.github/FUNDING.yml new file mode 100644 index 0000000..7d6aac4 --- /dev/null +++ b/node_modules/typed-array-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/typed-array-length/.nycrc b/node_modules/typed-array-length/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/typed-array-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-length/CHANGELOG.md b/node_modules/typed-array-length/CHANGELOG.md new file mode 100644 index 0000000..78cf55f --- /dev/null +++ b/node_modules/typed-array-length/CHANGELOG.md @@ -0,0 +1,93 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.6](https://github.com/inspect-js/typed-array-length/compare/v1.0.5...v1.0.6) - 2024-03-21 + +### Commits + +- [types] vastly improve types [`9f68d36`](https://github.com/inspect-js/typed-array-length/commit/9f68d36cdc1abeb412f47e91de289b5fb903a696) +- [types] use shared config [`b6b3cbc`](https://github.com/inspect-js/typed-array-length/commit/b6b3cbcaf8f4a46f5bcb77226d4cea2b3f62ffe2) +- [actions] remove redundant finisher [`c69896e`](https://github.com/inspect-js/typed-array-length/commit/c69896e0d71e9f6da562b9ae0eaba415e4cbff26) +- [Tests] actually check types in tests, and add attw [`e2c3f94`](https://github.com/inspect-js/typed-array-length/commit/e2c3f948bd0b898c38e1d9f63cd9702e728a7109) + +## [v1.0.5](https://github.com/inspect-js/typed-array-length/compare/v1.0.4...v1.0.5) - 2024-02-20 + +### Commits + +- add types [`df51e65`](https://github.com/inspect-js/typed-array-length/commit/df51e65a85fa6d1a98571ab30398b36ac2c981bb) +- [Refactor] use `possible-typed-array-names` for a single source of truth [`84503a3`](https://github.com/inspect-js/typed-array-length/commit/84503a3d406e8ae1cc84cf6e893cacc556be664a) +- [actions] update rebase action to use reusable workflow [`f163023`](https://github.com/inspect-js/typed-array-length/commit/f16302365bbb353b0504a41d997fa18196757c80) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `object-inspect`, `tape` [`57ca930`](https://github.com/inspect-js/typed-array-length/commit/57ca93013d607c0ac46b749d8258bb341b903567) +- [Dev Deps] update `aud`, `is-callable`, `object-inspect`, `tape` [`99343f4`](https://github.com/inspect-js/typed-array-length/commit/99343f477d68f2d53597bc0cadf93e532a498138) +- [Refactor] use `gopd` and `has-proto` [`b134a5c`](https://github.com/inspect-js/typed-array-length/commit/b134a5cc4bea1666f4195d6b6c6e97617305420f) +- [Deps] update `call-bind`, `is-typed-array` [`3b62f55`](https://github.com/inspect-js/typed-array-length/commit/3b62f55cc52da8b4c9548fb8839f0e4db222ac1b) +- [meta] add missing `engines.node` [`ff3e9f7`](https://github.com/inspect-js/typed-array-length/commit/ff3e9f7b8d72c0c2d1e9c2122a701ac454e6552c) +- [Deps] update `is-typed-array` [`877f507`](https://github.com/inspect-js/typed-array-length/commit/877f507048ece8b1db6402b56d512c7eb3337ce9) +- [meta] add `sideEffects` flag [`6e91309`](https://github.com/inspect-js/typed-array-length/commit/6e913098eaca5132a3595b0653d211ffec93f2c6) + +## [v1.0.4](https://github.com/inspect-js/typed-array-length/compare/v1.0.3...v1.0.4) - 2022-05-23 + +### Commits + +- [actions] reuse common workflows [`dfd4a37`](https://github.com/inspect-js/typed-array-length/commit/dfd4a37d851a28e3d74d892a69874e02f2e58c37) +- [meta] use `npmignore` to autogenerate an npmignore file [`a837e80`](https://github.com/inspect-js/typed-array-length/commit/a837e80d4029f26785ab9f3aa571ca782ac8e851) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `object-inspect`, `tape` [`7b05a87`](https://github.com/inspect-js/typed-array-length/commit/7b05a8772af399e52bb448618a246cd34d3e3273) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c495f6e`](https://github.com/inspect-js/typed-array-length/commit/c495f6e050a4a7463a82c9195f31f44cf2760945) +- [meta] simplify "exports" [`e42a6b6`](https://github.com/inspect-js/typed-array-length/commit/e42a6b6b0dc243fce32df20a75a7962782ef2a83) +- [Fix] ensure `for-each` dependency is properly listed [`8ec761c`](https://github.com/inspect-js/typed-array-length/commit/8ec761ca56c13927281d626958a2f55211e14f45) +- [Deps] update `call-bind`, `is-typed-array` [`2cc173a`](https://github.com/inspect-js/typed-array-length/commit/2cc173a4216e167db896bea7b8e03edf8b2d3833) +- [meta] add `safe-publish-latest` [`e8e3afa`](https://github.com/inspect-js/typed-array-length/commit/e8e3afa431ce98bbdbb68c9f8e3c029cc5128c6c) +- [Deps] update `is-typed-array` [`cd8084d`](https://github.com/inspect-js/typed-array-length/commit/cd8084db59b734ac4519b6d47f96233b6f73b1a6) + +## [v1.0.3](https://github.com/inspect-js/typed-array-length/compare/v1.0.2...v1.0.3) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`a578b83`](https://github.com/inspect-js/typed-array-length/commit/a578b83e68055c1e7c7120bc4583e1d6926fc268) +- [meta] avoid publishing github workflows [`f064a4b`](https://github.com/inspect-js/typed-array-length/commit/f064a4bf9090202154249d969be0799c34804ad4) +- [Tests] run `nyc` on all tests [`69b841e`](https://github.com/inspect-js/typed-array-length/commit/69b841e43042358c71c3290342514b6d107f08d1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`4594e83`](https://github.com/inspect-js/typed-array-length/commit/4594e83250579cdbff870aa951e7af56ca169489) +- [actions] add "Allow Edits" workflow [`81e953b`](https://github.com/inspect-js/typed-array-length/commit/81e953ba6b3f59c5657e0d17fa1e7619b94891f5) +- [Deps] update `is-typed-array`; use `call-bind` instead of `es-abstract` [`e7da56b`](https://github.com/inspect-js/typed-array-length/commit/e7da56b3c03b7f0db9bb110444ec1ccf19d7e9f9) +- [readme] remove travis badge [`6d610d8`](https://github.com/inspect-js/typed-array-length/commit/6d610d83cb78ac5286c5ca273f4b3c7289f7686e) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2d0ad64`](https://github.com/inspect-js/typed-array-length/commit/2d0ad644a11f754e61b49d327fdf891605abbe58) + +## [v1.0.2](https://github.com/inspect-js/typed-array-length/compare/v1.0.1...v1.0.2) - 2020-04-22 + +### Commits + +- [Dev Deps] update `make-arrow-function`, `make-generator-function` [`4facf69`](https://github.com/inspect-js/typed-array-length/commit/4facf697cafb36b9c1057dc4ca1a21d8550c564e) +- [Deps] update `is-typed-array`, `es-abstract` [`aaf3585`](https://github.com/inspect-js/typed-array-length/commit/aaf3585429896b9520dedd886c07aa4a96b50615) +- [Dev Deps] update `aud`, `auto-changelog` [`f10e298`](https://github.com/inspect-js/typed-array-length/commit/f10e298c7733b8de59231c1581c9b000c205edbd) +- [meta] allow `package.json` to be required/imported [`104f4c6`](https://github.com/inspect-js/typed-array-length/commit/104f4c6a6363e600d54aeb7abd90e37d99693aaf) +- [Tests] only audit prod deps [`c748ab5`](https://github.com/inspect-js/typed-array-length/commit/c748ab596de505483df14ca7eeda7f27aeb20383) +- [Deps] update `es-abstract` [`6cd213e`](https://github.com/inspect-js/typed-array-length/commit/6cd213ec654da3325abc8190f8c07c860474d944) +- [Dev Deps] update `tape` [`2b0b2ea`](https://github.com/inspect-js/typed-array-length/commit/2b0b2ea9be106e8a068597c3f499ef703cce1edb) +- [Dev Deps] update `@ljharb/eslint-config` [`cf462f3`](https://github.com/inspect-js/typed-array-length/commit/cf462f3352cf2fd592e624746371e3de800a265d) +- [Deps] update `is-typed-array` [`ff46995`](https://github.com/inspect-js/typed-array-length/commit/ff469955b5d92942ba066c77eac7467e0c4de1ec) + +## [v1.0.1](https://github.com/inspect-js/typed-array-length/compare/v1.0.0...v1.0.1) - 2020-01-19 + +### Commits + +- readme [`d3643fd`](https://github.com/inspect-js/typed-array-length/commit/d3643fd11919844b1f42041ef980a1f33215b515) +- [meta] fix "exports" field [`006e28b`](https://github.com/inspect-js/typed-array-length/commit/006e28b30b11f8948e607d13ef0e96c3d7d7f61f) + +## v1.0.0 - 2020-01-18 + +### Commits + +- Initial commit [`5f9e2ec`](https://github.com/inspect-js/typed-array-length/commit/5f9e2ec6650f80dc894e354e9e98181b09006346) +- Tests [`6b9cadb`](https://github.com/inspect-js/typed-array-length/commit/6b9cadb0c274933bc7ee5e3fc6a5a380163cbe76) +- Implementation [`6a3cb50`](https://github.com/inspect-js/typed-array-length/commit/6a3cb50429f40fc4ac9020bbf9539560c1b70213) +- npm init [`41d42cd`](https://github.com/inspect-js/typed-array-length/commit/41d42cddfd3d47df6c9d480cf77787eae1109432) +- [meta] add `auto-changelog` [`4fd159b`](https://github.com/inspect-js/typed-array-length/commit/4fd159bc6535e86c370a2186d60a68656f0d8917) +- [meta] add `funding` field; create FUNDING.yml [`6a9fca7`](https://github.com/inspect-js/typed-array-length/commit/6a9fca7e0fdf3ff3fd4b0f18596471ca3d050a39) +- [actions] add automatic rebasing / merge commit blocking [`8303296`](https://github.com/inspect-js/typed-array-length/commit/83032967b14afd37c382d4bf2c1fc5c95e3764bd) +- [Tests] add `npm run lint` [`47a9c21`](https://github.com/inspect-js/typed-array-length/commit/47a9c211f474dbe8528f6b28f50080eacd5bf7eb) +- [Tests] use shared travis-ci configs [`d0c8915`](https://github.com/inspect-js/typed-array-length/commit/d0c89153e1c50f1eadd0b42521bcdcf3366b8af5) +- Only apps should have lockfiles [`3eaef9c`](https://github.com/inspect-js/typed-array-length/commit/3eaef9cd192b1a25d1930739e7c0044e39ad3c0d) diff --git a/node_modules/typed-array-length/LICENSE b/node_modules/typed-array-length/LICENSE new file mode 100644 index 0000000..707437b --- /dev/null +++ b/node_modules/typed-array-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/typed-array-length/README.md b/node_modules/typed-array-length/README.md new file mode 100644 index 0000000..5e78c20 --- /dev/null +++ b/node_modules/typed-array-length/README.md @@ -0,0 +1,64 @@ +# typed-array-length [![Version Badge][2]][1] + +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Robustly get the length of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `length` property is overridden. + +## Example + +```js +var typedArrayLength = require('typed-array-length'); +var assert = require('assert'); + +assert.equal(false, typedArrayLength(undefined)); +assert.equal(false, typedArrayLength(null)); +assert.equal(false, typedArrayLength(false)); +assert.equal(false, typedArrayLength(true)); +assert.equal(false, typedArrayLength([])); +assert.equal(false, typedArrayLength({})); +assert.equal(false, typedArrayLength(/a/g)); +assert.equal(false, typedArrayLength(new RegExp('a', 'g'))); +assert.equal(false, typedArrayLength(new Date())); +assert.equal(false, typedArrayLength(42)); +assert.equal(false, typedArrayLength(NaN)); +assert.equal(false, typedArrayLength(Infinity)); +assert.equal(false, typedArrayLength(new Number(42))); +assert.equal(false, typedArrayLength('foo')); +assert.equal(false, typedArrayLength(Object('foo'))); +assert.equal(false, typedArrayLength(function () {})); +assert.equal(false, typedArrayLength(function* () {})); +assert.equal(false, typedArrayLength(x => x * x)); +assert.equal(false, typedArrayLength([])); + +assert.equal(1, typedArrayLength(new Int8Array(1))); +assert.equal(2, typedArrayLength(new Uint8Array(2))); +assert.equal(3, typedArrayLength(new Uint8ClampedArray(3))); +assert.equal(4, typedArrayLength(new Int16Array(4))); +assert.equal(5, typedArrayLength(new Uint16Array(5))); +assert.equal(6, typedArrayLength(new Int32Array(6))); +assert.equal(7, typedArrayLength(new Uint32Array(7))); +assert.equal(8, typedArrayLength(new Float32Array(8))); +assert.equal(9, typedArrayLength(new Float64Array(9))); +assert.equal(10, typedArrayLength(new BigInt64Array(10))); +assert.equal(11, typedArrayLength(new BigUint64Array(11))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/typed-array-length +[2]: https://versionbadg.es/inspect-js/typed-array-length.svg +[5]: https://david-dm.org/inspect-js/typed-array-length.svg +[6]: https://david-dm.org/inspect-js/typed-array-length +[7]: https://david-dm.org/inspect-js/typed-array-length/dev-status.svg +[8]: https://david-dm.org/inspect-js/typed-array-length#info=devDependencies +[11]: https://nodei.co/npm/typed-array-length.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/typed-array-length.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/typed-array-length.svg +[downloads-url]: http://npm-stat.com/charts.html?package=typed-array-length diff --git a/node_modules/typed-array-length/index.d.ts b/node_modules/typed-array-length/index.d.ts new file mode 100644 index 0000000..13cf2d2 --- /dev/null +++ b/node_modules/typed-array-length/index.d.ts @@ -0,0 +1,23 @@ +import type names from 'possible-typed-array-names'; + +declare function typedArrayLength(value: typedArrayLength.TypedArray): number; +declare function typedArrayLength(value: unknown): false; + +declare namespace typedArrayLength { + type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; + + type TypedArrayName = typeof names[number]; +} + +export = typedArrayLength; diff --git a/node_modules/typed-array-length/index.js b/node_modules/typed-array-length/index.js new file mode 100644 index 0000000..4351dc4 --- /dev/null +++ b/node_modules/typed-array-length/index.js @@ -0,0 +1,80 @@ +'use strict'; + +// / + +var callBind = require('call-bind'); +var forEach = require('for-each'); +var gOPD = require('gopd'); +var hasProto = require('has-proto')(); +var isTypedArray = require('is-typed-array'); +var typedArrays = require('possible-typed-array-names'); + +/** @typedef {(value: import('.').TypedArray) => number} TypedArrayLengthGetter */ +/** @typedef {{ [k in `$${import('.').TypedArrayName}` | '__proto__']: k extends '__proto__' ? null : TypedArrayLengthGetter }} Cache */ + +/** @type {Cache} */ +// @ts-expect-error TS doesn't seem to have a "will eventually satisfy" type +var getters = { __proto__: null }; +var oDP = Object.defineProperty; +if (gOPD) { + var getLength = /** @type {TypedArrayLengthGetter} */ function (x) { + return x.length; + }; + forEach(typedArrays, /** @type {(typedArray: import('.').TypedArrayName) => void} */ function (typedArray) { + var TA = global[typedArray]; + // In Safari 7, Typed Array constructors are typeof object + if (typeof TA === 'function' || typeof TA === 'object') { + var Proto = TA.prototype; + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + var descriptor = gOPD(Proto, 'length'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(superProto, 'length'); + } + // Opera 12.16 has a magic length data property on instances AND on Proto + if (descriptor && descriptor.get) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic length data property + var arr = new global[typedArray](2); + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(arr, 'length'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = getLength; + } + } + } + }); +} + +/** @type {TypedArrayLengthGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundLength; + // @ts-expect-error not sure why this won't work + forEach(getters, /** @type {(getter: TypedArrayLengthGetter) => void} */ function (getter) { + if (typeof foundLength !== 'number') { + try { + var length = getter(value); + if (typeof length === 'number') { + foundLength = length; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the above callback is invoked sync + return foundLength; +}; + +/** @type {import('.')} */ +module.exports = function typedArrayLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; diff --git a/node_modules/typed-array-length/package.json b/node_modules/typed-array-length/package.json new file mode 100644 index 0000000..ae6780e --- /dev/null +++ b/node_modules/typed-array-length/package.json @@ -0,0 +1,110 @@ +{ + "name": "typed-array-length", + "version": "1.0.6", + "description": "Robustly get the length of a Typed Array", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && attw -P", + "tests-only": "nyc tape 'test/**/*.js'", + "test:harmony": "nyc node --harmony --es-staging test", + "test": "npm run tests-only && npm run test:harmony", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/typed-array-length.git" + }, + "keywords": [ + "typed", + "array", + "length", + "robust", + "es", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/typed-array-length/issues" + }, + "homepage": "https://github.com/inspect-js/typed-array-length#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.2", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.2.0", + "@types/call-bind": "^1.0.5", + "@types/for-each": "^0.3.3", + "@types/gopd": "^1.0.3", + "@types/is-callable": "^1.1.2", + "@types/make-arrow-function": "^1.2.2", + "@types/make-generator-function": "^2.0.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/typed-array-length/test/index.js b/node_modules/typed-array-length/test/index.js new file mode 100644 index 0000000..da02957 --- /dev/null +++ b/node_modules/typed-array-length/test/index.js @@ -0,0 +1,74 @@ +'use strict'; + +var test = require('tape'); +var typedArrayLength = require('../'); +var isCallable = require('is-callable'); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var typedArrayNames = require('possible-typed-array-names'); + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + // @ts-expect-error + st.equal(false, typedArrayLength(), 'undefined is not typed array'); + st.equal(false, typedArrayLength(null), 'null is not typed array'); + st.equal(false, typedArrayLength(false), 'false is not typed array'); + st.equal(false, typedArrayLength(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, typedArrayLength({}), 'object is not typed array'); + t.equal(false, typedArrayLength(/a/g), 'regex literal is not typed array'); + t.equal(false, typedArrayLength(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, typedArrayLength(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, typedArrayLength(42), 'number is not typed array'); + st.equal(false, typedArrayLength(Object(42)), 'number object is not typed array'); + st.equal(false, typedArrayLength(NaN), 'NaN is not typed array'); + st.equal(false, typedArrayLength(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, typedArrayLength('foo'), 'string primitive is not typed array'); + st.equal(false, typedArrayLength(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, typedArrayLength(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, typedArrayLength(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.equal(false, typedArrayLength(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + /** @type {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor} */ + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var length = 10; + var arr = new TypedArray(length); + t.equal(typedArrayLength(arr), length, 'new ' + typedArray + '(10) is typed array of length ' + length); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/typed-array-length/tsconfig.json b/node_modules/typed-array-length/tsconfig.json new file mode 100644 index 0000000..b9fbbf1 --- /dev/null +++ b/node_modules/typed-array-length/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "ES2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/unbox-primitive/.editorconfig b/node_modules/unbox-primitive/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/unbox-primitive/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/unbox-primitive/.eslintrc b/node_modules/unbox-primitive/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/unbox-primitive/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/unbox-primitive/.github/FUNDING.yml b/node_modules/unbox-primitive/.github/FUNDING.yml new file mode 100644 index 0000000..30cbba9 --- /dev/null +++ b/node_modules/unbox-primitive/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/unbox-primitive +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/unbox-primitive/.nycrc b/node_modules/unbox-primitive/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/unbox-primitive/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/unbox-primitive/CHANGELOG.md b/node_modules/unbox-primitive/CHANGELOG.md new file mode 100644 index 0000000..7f930e8 --- /dev/null +++ b/node_modules/unbox-primitive/CHANGELOG.md @@ -0,0 +1,60 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/ljharb/unbox-primitive/compare/v1.0.1...v1.0.2) - 2022-04-24 + +### Commits + +- [actions] reuse common workflows [`e6420b9`](https://github.com/ljharb/unbox-primitive/commit/e6420b94eed3558ef3ecddbd3d85fe2f400d1db1) +- [actions] update codecov uploader [`b90aff2`](https://github.com/ljharb/unbox-primitive/commit/b90aff2b17b70c1a7200eb5faa3f9e64ebf055f9) +- [readme] add github actions/codecov badges; update URLs [`bcc39b9`](https://github.com/ljharb/unbox-primitive/commit/bcc39b9d6d101bad199c95604f94999f80d6da97) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`a704a32`](https://github.com/ljharb/unbox-primitive/commit/a704a32ec4af43cd0631317ae3a537012adc1610) +- [Refactor] use `call-bind` instead of `function-bind` [`0a609f1`](https://github.com/ljharb/unbox-primitive/commit/0a609f1be6269cbf501482aacd9a0a1bd8596108) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`6a45317`](https://github.com/ljharb/unbox-primitive/commit/6a4531757d74af97c9d0770b102f81ce6ff0a8dc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`795c76f`](https://github.com/ljharb/unbox-primitive/commit/795c76f14c4df3c7ae934f7b14a98c07951ea9c7) +- [Deps] update `has-bigints`, `has-symbols` [`257a065`](https://github.com/ljharb/unbox-primitive/commit/257a065496b4190c296d674bff342ea40cf8e176) + +## [v1.0.1](https://github.com/ljharb/unbox-primitive/compare/v1.0.0...v1.0.1) - 2021-03-25 + +### Commits + +- [Tests] use shared travis-ci configs [`f977e5f`](https://github.com/ljharb/unbox-primitive/commit/f977e5f8fa532dbc519bd78a48cf4b81c14720fe) +- [Tests] migrate tests to Github Actions [`b89def6`](https://github.com/ljharb/unbox-primitive/commit/b89def60908a236aa1b5c756426f7cc61cf458dd) +- [meta] do not publish github action workflow files [`325d1f1`](https://github.com/ljharb/unbox-primitive/commit/325d1f1836cecbe57ee148545de5aefcbe7a7dce) +- readme [`810cd70`](https://github.com/ljharb/unbox-primitive/commit/810cd70f7b3c670cd55eae64466c89595175ee2a) +- [Tests] run `nyc` on all tests; use `tape` runner [`2f5fb08`](https://github.com/ljharb/unbox-primitive/commit/2f5fb08930c8f8e5e069ac61891dc9bd76cb762b) +- [meta] add `auto-changelog` [`03ed375`](https://github.com/ljharb/unbox-primitive/commit/03ed3759284493f19323eb0500f726d0851fc085) +- [actions] add automatic rebasing / merge commit blocking [`6dec48d`](https://github.com/ljharb/unbox-primitive/commit/6dec48daa357fa79a5cac1add9ca33f7b56276cc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `object-is`, `tape` [`528ed88`](https://github.com/ljharb/unbox-primitive/commit/528ed8826664b67f7eaf1fe7e2031c063b2d315f) +- [actions] check out the entire repo [`5095b29`](https://github.com/ljharb/unbox-primitive/commit/5095b2981f44a78b3f9bfaa1a526f17a6823e383) +- [actions] add "Allow Edits" workflow [`5aa26d7`](https://github.com/ljharb/unbox-primitive/commit/5aa26d7f0c32e0e78ba4bf3e5f9abb5478fd97fa) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `object-is`, `safe-publish-latest`, `tape` [`afc18c6`](https://github.com/ljharb/unbox-primitive/commit/afc18c6cb59cbb6b514e0d8004c6fd264e2a27eb) +- [readme] remove travis badge [`a025899`](https://github.com/ljharb/unbox-primitive/commit/a0258997a21604e1266840e6d167f0a870966e9b) +- [Dev Deps] update `auto-changelog` [`9219a32`](https://github.com/ljharb/unbox-primitive/commit/9219a32844b2ce3ed0a7ea12a5910a3e92424e4e) +- [readme] Fix missing paren in example [`73f5a33`](https://github.com/ljharb/unbox-primitive/commit/73f5a3340ca1ab6c227ed4632117d816d5e35317) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`e450acc`](https://github.com/ljharb/unbox-primitive/commit/e450accb54ab452f240768a5f0a98e5887b0ba8c) +- [Deps] update `has-bigints`, `has-symbols`, `which-boxed-primitive` [`a4279b5`](https://github.com/ljharb/unbox-primitive/commit/a4279b504732002074e5dcb9c5509038d605f563) +- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`b351548`](https://github.com/ljharb/unbox-primitive/commit/b351548d31789c0d0af4c3bce55c2bdefe51b40f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f600382`](https://github.com/ljharb/unbox-primitive/commit/f600382db83025270969354ac52a72aadb0a7ffa) +- [readme] fix travis links [`4d02fa9`](https://github.com/ljharb/unbox-primitive/commit/4d02fa9a4990812b048f8aefe6e46be80b68beef) +- [Dev Deps] update `auto-changelog`; add `aud` [`07e74a3`](https://github.com/ljharb/unbox-primitive/commit/07e74a3ca90688122593095849757e3c05c46db0) +- [meta] add `funding` field [`7ca4bd7`](https://github.com/ljharb/unbox-primitive/commit/7ca4bd71196e90a2fc9c7cb0ef4e30f949d5a853) +- [Tests] only audit prod deps [`47d8d5f`](https://github.com/ljharb/unbox-primitive/commit/47d8d5fbd58bf472e7e83f79ccef7e8379d06b35) +- [Deps] update `has-symbols` [`c70c15e`](https://github.com/ljharb/unbox-primitive/commit/c70c15e924191d11a271cff25bde657b0c3c3016) + +## v1.0.0 - 2019-08-10 + +### Commits + +- [Tests] add `.travis.yml` [`8c9a5ef`](https://github.com/ljharb/unbox-primitive/commit/8c9a5efdb54be4866e2884bf32cbe830788b2c2a) +- Initial commit [`feaff15`](https://github.com/ljharb/unbox-primitive/commit/feaff159eb999adc8763ff3e51d2d3d56d6164f8) +- [Tests] add tests [`3dd18d6`](https://github.com/ljharb/unbox-primitive/commit/3dd18d65748efb4af9b8ca66f8d8c5521d8f2dec) +- implementation [`472fb41`](https://github.com/ljharb/unbox-primitive/commit/472fb41d049ddee80ebf3219a5837e639a6e9341) +- npm init [`e9e426f`](https://github.com/ljharb/unbox-primitive/commit/e9e426fc90b9a3f07ffc48db75f78c414f77bc2b) +- [Tests] add linting [`139e74b`](https://github.com/ljharb/unbox-primitive/commit/139e74b94cdfd187b43b24de76c6d84af21ee467) +- [meta] create FUNDING.yml [`a9509e1`](https://github.com/ljharb/unbox-primitive/commit/a9509e122163e2b9d98af421e5c0575df36e2310) +- Only apps should have lockfiles [`b3d0834`](https://github.com/ljharb/unbox-primitive/commit/b3d0834d69dcbf4cbc1e61ccfaef05acf96cf630) diff --git a/node_modules/unbox-primitive/LICENSE b/node_modules/unbox-primitive/LICENSE new file mode 100644 index 0000000..3900dd7 --- /dev/null +++ b/node_modules/unbox-primitive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/unbox-primitive/README.md b/node_modules/unbox-primitive/README.md new file mode 100644 index 0000000..1ce1cab --- /dev/null +++ b/node_modules/unbox-primitive/README.md @@ -0,0 +1,47 @@ +# unbox-primitive [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Unbox a boxed JS primitive value. This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and works despite ES6 Symbol.toStringTag. + +## Example + +```js +var unboxPrimitive = require('unbox-primitive'); +var assert = require('assert'); + +assert.equal(unboxPrimitive(new Boolean(false)), false); +assert.equal(unboxPrimitive(new String('f')), 'f'); +assert.equal(unboxPrimitive(new Number(42)), 42); +const s = Symbol(); +assert.equal(unboxPrimitive(Object(s)), s); +assert.equal(unboxPrimitive(new BigInt(42)), 42n); + +// any primitive, or non-boxed-primitive object, will throw +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/unbox-primitive +[npm-version-svg]: https://versionbadg.es/ljharb/unbox-primitive.svg +[deps-svg]: https://david-dm.org/ljharb/unbox-primitive.svg +[deps-url]: https://david-dm.org/ljharb/unbox-primitive +[dev-deps-svg]: https://david-dm.org/ljharb/unbox-primitive/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/unbox-primitive#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/unbox-primitive.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/unbox-primitive.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/unbox-primitive.svg +[downloads-url]: https://npm-stat.com/charts.html?package=unbox-primitive +[codecov-image]: https://codecov.io/gh/ljharb/unbox-primitive/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/unbox-primitive/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/unbox-primitive +[actions-url]: https://github.com/ljharb/unbox-primitive/actions diff --git a/node_modules/unbox-primitive/index.js b/node_modules/unbox-primitive/index.js new file mode 100644 index 0000000..5cde479 --- /dev/null +++ b/node_modules/unbox-primitive/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var whichBoxedPrimitive = require('which-boxed-primitive'); +var callBound = require('call-bind/callBound'); +var hasSymbols = require('has-symbols')(); +var hasBigInts = require('has-bigints')(); + +var stringToString = callBound('String.prototype.toString'); +var numberValueOf = callBound('Number.prototype.valueOf'); +var booleanValueOf = callBound('Boolean.prototype.valueOf'); +var symbolValueOf = hasSymbols && callBound('Symbol.prototype.valueOf'); +var bigIntValueOf = hasBigInts && callBound('BigInt.prototype.valueOf'); + +module.exports = function unboxPrimitive(value) { + var which = whichBoxedPrimitive(value); + if (typeof which !== 'string') { + throw new TypeError(which === null ? 'value is an unboxed primitive' : 'value is a non-boxed-primitive object'); + } + + if (which === 'String') { + return stringToString(value); + } + if (which === 'Number') { + return numberValueOf(value); + } + if (which === 'Boolean') { + return booleanValueOf(value); + } + if (which === 'Symbol') { + if (!hasSymbols) { + throw new EvalError('somehow this environment does not have Symbols, but you have a boxed Symbol value. Please report this!'); + } + return symbolValueOf(value); + } + if (which === 'BigInt') { + return bigIntValueOf(value); + } + throw new RangeError('unknown boxed primitive found: ' + which); +}; diff --git a/node_modules/unbox-primitive/package.json b/node_modules/unbox-primitive/package.json new file mode 100644 index 0000000..1f040f6 --- /dev/null +++ b/node_modules/unbox-primitive/package.json @@ -0,0 +1,65 @@ +{ + "name": "unbox-primitive", + "version": "1.0.2", + "description": "Unbox a boxed JS primitive value.", + "main": "index.js", + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/unbox-primitive.git" + }, + "keywords": [ + "unbox", + "boxed", + "primitive", + "object", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/unbox-primitive/issues" + }, + "homepage": "https://github.com/ljharb/unbox-primitive#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "nyc": "^10.3.2", + "object-inspect": "^1.12.0", + "object-is": "^1.1.5", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/unbox-primitive/test/index.js b/node_modules/unbox-primitive/test/index.js new file mode 100644 index 0000000..73688ac --- /dev/null +++ b/node_modules/unbox-primitive/test/index.js @@ -0,0 +1,59 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var is = require('object-is'); +var forEach = require('for-each'); +var hasSymbols = require('has-symbols')(); +var hasBigInts = require('has-bigints')(); + +var unboxPrimitive = require('..'); + +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +test('primitives', function (t) { + var primitives = [ + true, + false, + '', + 'foo', + 42, + NaN, + Infinity, + 0 + ]; + if (hasSymbols) { + primitives.push(Symbol(), Symbol.iterator, Symbol('f')); + } + if (hasBigInts) { + primitives.push(BigInt(42), BigInt(0)); + } + forEach(primitives, function (primitive) { + var obj = Object(primitive); + t.ok( + is(unboxPrimitive(obj), primitive), + debug(obj, 'unboxes to ' + inspect(primitive)) + ); + }); + + t.end(); +}); + +test('objects', function (t) { + var objects = [ + {}, + [], + function () {}, + /a/g, + new Date() + ]; + forEach(objects, function (object) { + t['throws']( + function () { unboxPrimitive(object); }, + TypeError, + debug(object, 'is not a primitive') + ); + }); + + t.end(); +}); diff --git a/node_modules/union-value/LICENSE b/node_modules/union-value/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/node_modules/union-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/union-value/README.md b/node_modules/union-value/README.md new file mode 100644 index 0000000..1a90ffb --- /dev/null +++ b/node_modules/union-value/README.md @@ -0,0 +1,73 @@ +# union-value [![NPM version](https://img.shields.io/npm/v/union-value.svg?style=flat)](https://www.npmjs.com/package/union-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/union-value.svg?style=flat)](https://npmjs.org/package/union-value) [![NPM total downloads](https://img.shields.io/npm/dt/union-value.svg?style=flat)](https://npmjs.org/package/union-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/union-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/union-value) + +> Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save union-value +``` + +## Usage + +```js +var union = require('union-value'); + +var obj = {}; + +union(obj, 'a.b.c', ['one', 'two']); +union(obj, 'a.b.c', ['three']); + +console.log(obj); +//=> {a: {b: {c: [ 'one', 'two', 'three' ] }}} +``` + +## About + +### Related projects + +* [assign-value](https://www.npmjs.com/package/assign-value): Assign a value or extend a deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/assign-value) | [homepage](https://github.com/jonschlinkert/assign-value "Assign a value or extend a deeply nested property of an object using object path notation.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._ \ No newline at end of file diff --git a/node_modules/union-value/index.js b/node_modules/union-value/index.js new file mode 100644 index 0000000..9c5d8db --- /dev/null +++ b/node_modules/union-value/index.js @@ -0,0 +1,30 @@ +'use strict'; + +var isObject = require('is-extendable'); +var union = require('arr-union'); +var get = require('get-value'); +var set = require('set-value'); + +module.exports = function unionValue(obj, prop, value) { + if (!isObject(obj)) { + throw new TypeError('union-value expects the first argument to be an object.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('union-value expects `prop` to be a string.'); + } + + var arr = arrayify(get(obj, prop)); + set(obj, prop, union(arr, arrayify(value))); + return obj; +}; + +function arrayify(val) { + if (val === null || typeof val === 'undefined') { + return []; + } + if (Array.isArray(val)) { + return val; + } + return [val]; +} diff --git a/node_modules/union-value/package.json b/node_modules/union-value/package.json new file mode 100644 index 0000000..65441f6 --- /dev/null +++ b/node_modules/union-value/package.json @@ -0,0 +1,70 @@ +{ + "name": "union-value", + "description": "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.", + "version": "1.0.1", + "homepage": "https://github.com/jonschlinkert/union-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/union-value", + "bugs": { + "url": "https://github.com/jonschlinkert/union-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0", + "should": "^11.2.0" + }, + "keywords": [ + "array", + "dot", + "get", + "has", + "nested", + "notation", + "object", + "path", + "prop", + "property", + "set", + "union", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assign-value", + "get-value", + "has-value", + "set-value", + "unset-value" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/unix-crypt-td-js/Makefile b/node_modules/unix-crypt-td-js/Makefile new file mode 100644 index 0000000..1dbf1c6 --- /dev/null +++ b/node_modules/unix-crypt-td-js/Makefile @@ -0,0 +1,4 @@ +all: unix-crypt-td.min.js + +unix-crypt-td.min.js: src/unix-crypt-td.js + google-closure-compiler --js src/unix-crypt-td.js --compilation_level ADVANCED_OPTIMIZATIONS > unix-crypt-td.min.js diff --git a/node_modules/unix-crypt-td-js/README.markdown b/node_modules/unix-crypt-td-js/README.markdown new file mode 100644 index 0000000..61b2f60 --- /dev/null +++ b/node_modules/unix-crypt-td-js/README.markdown @@ -0,0 +1,51 @@ +Unix crypt(3) Javascript Implementation +======================================= + +Straightforward implementaiton of the DES-based Unix crypt(3) hash, based largely on crypt.c in the Seventh Edition Unix distribution released by Caldera Systems under a BSD-style license. + +Building the minified version +----------------------------- + +Running the Makefile requires the [Google Closure Compiler](http://code.google.com/closure/compiler/) +installed on your path. Alternatively, you may use any JS Minifier you want. + +Usage +----- + +Simple examples: + + unixCryptTD('foob' /* pw */, 'ar' /* salt */) // === 'arlEKn0OzVJn.' + unixCryptTD([102, 111, 111, 98], 'ar') // === 'arlEKn0OzVJn.' + unixCryptTD([102, 111, 111, 98], [97, 114] // === 'arlEKn0OzVJn.' + unixCryptTD('foob', 'ar', true /* returnBytes */) // === [97, 114, 108, 69, + // 75, 110, 48, 79, 122, 86, 74, 110, 46] + +Testing +------- + +Just run `npm test` + +Author +------ + +Tim Joseph Dumol <[tim@timdumol.com](mailto:tim@timdumol.com)> + +Licensing +--------- + +BSD License: + +Copyright(C) Tim Joseph F. Dumol 2011. All rights reserved. +Derived from crypt.c in the Seventh Edition Unix distribution by Caldera International, which is Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code and documentation must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed or owned by Caldera International, Inc. + +* Neither the name of Caldera International, Inc. nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,e BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/unix-crypt-td-js/package.json b/node_modules/unix-crypt-td-js/package.json new file mode 100644 index 0000000..d498800 --- /dev/null +++ b/node_modules/unix-crypt-td-js/package.json @@ -0,0 +1,28 @@ +{ + "name": "unix-crypt-td-js", + "version": "1.1.4", + "description": "Javascript implementation of the Unix crypt(3) DES-based hash", + "main": "unix-crypt-td.min.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/TimDumol/unix-crypt-td-js.git" + }, + "keywords": [ + "crypt" + ], + "author": "Tim Dumol ", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/TimDumol/unix-crypt-td-js/issues" + }, + "homepage": "https://github.com/TimDumol/unix-crypt-td-js#readme", + "devDependencies": { + "mocha": "^6.2.2" + } +} diff --git a/node_modules/unix-crypt-td-js/src/unix-crypt-td.js b/node_modules/unix-crypt-td-js/src/unix-crypt-td.js new file mode 100644 index 0000000..51cf47f --- /dev/null +++ b/node_modules/unix-crypt-td-js/src/unix-crypt-td.js @@ -0,0 +1,464 @@ +'use strict'; +/** + * Unix crypt(3) Javascript Implementation + * + * Straightforward implementaiton of the DES-based Unix crypt(3) hash, based largely + * on crypt.c in the Seventh Edition Unix distribution released by Caldera Systems + * under a BSD-style license. + * + * @author Tim Joseph Dumol + */ + +/* +Legalese: + +Copyright(C) Tim Joseph F. Dumol 2011. All rights reserved. +Derived from crypt.c in the Seventh Edition Unix distribution by +Caldera International, which is Copyright(C) Caldera International +Inc. 2001-2002. All rights reserved. + +Redistribution and use in source and binary forms, +with or without modification, are permitted provided that the +following conditions are met: + +Redistributions of source code and documentation must retain the above +copyright notice, this list of conditions and the following +disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* All advertising materials mentioning features or use of this software + must display the following acknowledgement: This product includes + software developed or owned by Caldera International, Inc. + +* Neither the name of Caldera International, Inc. nor the names of + other contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE +FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/** + * Implements the Unix crypt(3) DES-based hash. + * + * @param {Array.|string} pw The string to hash + * @param {Array.|string} salt The salt to use (two character string from [a-zA-Z0-9./]). + * @param {boolean=} returnBytes (optional) If true, return an array of bytes; + * otherwise, return a string. + */ +var unixCryptTD = (function() { + /* + * Initial permutation, + */ + var IP = [ + 58,50,42,34,26,18,10, 2, + 60,52,44,36,28,20,12, 4, + 62,54,46,38,30,22,14, 6, + 64,56,48,40,32,24,16, 8, + 57,49,41,33,25,17, 9, 1, + 59,51,43,35,27,19,11, 3, + 61,53,45,37,29,21,13, 5, + 63,55,47,39,31,23,15, 7 + ]; + + /* + * Final permutation, FP = IP^(-1) + */ + var FP =[ + 40, 8,48,16,56,24,64,32, + 39, 7,47,15,55,23,63,31, + 38, 6,46,14,54,22,62,30, + 37, 5,45,13,53,21,61,29, + 36, 4,44,12,52,20,60,28, + 35, 3,43,11,51,19,59,27, + 34, 2,42,10,50,18,58,26, + 33, 1,41, 9,49,17,57,25 + ]; + + /* + * Permuted-choice 1 from the key bits + * to yield C and D. + * Note that bits 8,16... are left out: + * They are intended for a parity check. + */ + var PC1_C = [ + 57,49,41,33,25,17, 9, + 1,58,50,42,34,26,18, + 10, 2,59,51,43,35,27, + 19,11, 3,60,52,44,36 + ]; + + var PC1_D = [ + 63,55,47,39,31,23,15, + 7,62,54,46,38,30,22, + 14, 6,61,53,45,37,29, + 21,13, 5,28,20,12, 4 + ]; + + /* + * Sequence of shifts used for the key schedule. + */ + var shifts =[ + 1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1 + ]; + + /* + * Permuted-choice 2, to pick out the bits from + * the CD array that generate the key schedule. + */ + var PC2_C = [ + 14,17,11,24, 1, 5, + 3,28,15, 6,21,10, + 23,19,12, 4,26, 8, + 16, 7,27,20,13, 2 + ]; + + var PC2_D = [ + 41,52,31,37,47,55, + 30,40,51,45,33,48, + 44,49,39,56,34,53, + 46,42,50,36,29,32 + ]; + + /* + * The C and D arrays used to calculate the key schedule. + */ + + var C = []; + var D = []; + /* + * The key schedule. + * Generated from the key. + */ + var KS = []; + for (var i = 0; i < 16; ++i) { + KS[i] = []; + } + + /* + * Set up the key schedule from the key. + */ + + function setkey(key) { + var i, j, k, t; + + /* + * First, generate C and D by permuting + * the key. The low order bit of each + * 8-bit char is not used, so C and D are only 28 + * bits apiece. + */ + for (i=0; i<28; i++) { + C[i] = key[PC1_C[i]-1]; + D[i] = key[PC1_D[i]-1]; + } + /* + * To generate Ki, rotate C and D according + * to schedule and pick up a permutation + * using PC2. + */ + for (i=0; i<16; i++) { + /* + * rotate. + */ + for (k=0; k>3)&1; + f[t+1] = (k>>2)&1; + f[t+2] = (k>>1)&1; + f[t+3] = (k>>0)&1; + } + /* + * The new R is L ^ f(R, K). + * The f here has to be permuted first, though. + */ + for (j=0; j<32; j++) + R[j] = L[j] ^ f[P[j]-1]; + /* + * Finally, the new L (the original R) + * is copied back. + */ + for (j=0; j<32; j++) + L[j] = tempL[j]; + } + /* + * The output L and R are reversed. + */ + for (j=0; j<32; j++) { + t = L[j]; + L[j] = R[j]; + R[j] = t; + } + /* + * The final output + * gets the inverse permutation of the very original. + */ + for (j=0; j<32; ++j) { + perm[j] = L[j]; + perm[j+32] = R[j]; + } + for (j=0; j<64; j++) { + block[j] = perm[FP[j]-1]; + } + } + + /** + * Transform a string to an array of bytes + */ + var strToBytes = function(str) { + var i, x = []; + for (i = 0; i < str.length; ++i) { + x[i] = str.charCodeAt(i); + } + return x + }; + + var bytesToStr = function(bytes) { + return String.fromCharCode.apply(String, bytes); + } + + return function crypt(pw, salt, returnBytes) { + if (typeof(pw) === 'string') pw = strToBytes(pw); + if (typeof(salt) === 'string') salt = strToBytes(salt); + + var i, j, k, c, temp; + var block = [], iobuf = []; + for(i=0; i<66; i++) + block[i] = 0; + for(i=0, k=0; (c= pw[k]) && i<64; ++k){ + for(j=0; j<7; j++, i++) + block[i] = (c>>(6-j)) & 1; + i++; + } + + setkey(block); + + for(i=0; i<66; i++) + block[i] = 0; + + for(i=0;i<48;i++) + E[i] = e[i]; + + for(i=0, k=0;i<2;i++, ++k){ + c = salt[k]; + iobuf[i] = c; + if(c>'Z'.charCodeAt(0)) c -= 6; + if(c>'9'.charCodeAt(0)) c -= 7; + c -= '.'.charCodeAt(0); + for(j=0;j<6;j++){ + if((c>>j) & 1){ + temp = E[6*i+j]; + E[6*i+j] = E[6*i+j+24]; + E[6*i+j+24] = temp; + } + } + } + + for(i=0; i<25; i++) + encrypt(block,0); + + for(i=0; i<11; i++){ + c = 0; + for(j=0; j<6; j++){ + c <<= 1; + c |= block[6*i+j]; + } + c += '.'.charCodeAt(0); + if(c>'9'.charCodeAt(0)) c += 7; + if(c>'Z'.charCodeAt(0)) c += 6; + iobuf[i+2] = c; + } + if(iobuf[1]==0) + iobuf[1] = iobuf[0]; + + if (returnBytes) return(iobuf); + else return bytesToStr(iobuf); + } +})(); + +if (typeof(module) !== "undefined" && module != null) { + module["exports"] = unixCryptTD; +} +if (typeof(window) !== "undefined" && window != null) { + window["unixCryptTD"] = unixCryptTD; +} diff --git a/node_modules/unix-crypt-td-js/test/test.js b/node_modules/unix-crypt-td-js/test/test.js new file mode 100644 index 0000000..938927f --- /dev/null +++ b/node_modules/unix-crypt-td-js/test/test.js @@ -0,0 +1,13 @@ +/** Tests for Unix Crypt **/ +let assert = require('assert'); +let unixCryptTD = require('../src/unix-crypt-td.js'); + +describe('unixCryptTD', function() { + it('should equal output of crypt(3)', function() { + assert.equal(unixCryptTD('foo', 'ba'), 'ba4TuD1iozTxw'); + assert.equal(unixCryptTD('random long string', 'hi'), 'hib8W/d4WOlU.'); + assert.equal(unixCryptTD('foob', 'ar'), 'arlEKn0OzVJn.'); + assert.equal(unixCryptTD('Hello World! This is Unix crypt(3)!', 'ux'), + 'uxNS5oJDUz4Sc'); + }); +}); diff --git a/node_modules/unix-crypt-td-js/unix-crypt-td.min.js b/node_modules/unix-crypt-td-js/unix-crypt-td.min.js new file mode 100644 index 0000000..fb56b1d --- /dev/null +++ b/node_modules/unix-crypt-td-js/unix-crypt-td.min.js @@ -0,0 +1,8 @@ +var z=function(){function x(e){var a,t=[];for(a=0;aw;++w)u[w]=[];var p=[],H=[32,1,2,3,4,5,4,5,6,7,8,9,8,9,10,11,12,13,12,13,14,15,16,17,16,17,18,19,20,21,20,21,22,23,24,25,24,25,26,27,28,29,28,29,30,31,32,1], +I=[[14,4,13,1,2,15,11,8,3,10,6,12,5,9,0,7,0,15,7,4,14,2,13,1,10,6,12,11,9,5,3,8,4,1,14,8,13,6,2,11,15,12,9,7,3,10,5,0,15,12,8,2,4,9,1,7,5,11,3,14,10,0,6,13],[15,1,8,14,6,11,3,4,9,7,2,13,12,0,5,10,3,13,4,7,15,2,8,14,12,0,1,10,6,9,11,5,0,14,7,11,10,4,13,1,5,8,12,6,9,3,2,15,13,8,10,1,3,15,4,2,11,6,7,12,0,5,14,9],[10,0,9,14,6,3,15,5,1,13,12,7,11,4,2,8,13,7,0,9,3,4,6,10,2,8,5,14,12,11,15,1,13,6,4,9,8,15,3,0,11,1,2,12,5,10,14,7,1,10,13,0,6,9,8,7,4,15,14,3,11,5,2,12],[7,13,14,3,0,6,9,10,1,2,8,5,11,12,4, +15,13,8,11,5,6,15,0,3,4,7,2,12,1,10,14,9,10,6,9,0,12,11,7,13,15,1,3,14,5,2,8,4,3,15,0,6,10,1,13,8,9,4,5,11,12,7,2,14],[2,12,4,1,7,10,11,6,8,5,3,15,13,0,14,9,14,11,2,12,4,7,13,1,5,0,15,10,3,9,8,6,4,2,1,11,10,13,7,8,15,9,12,5,6,3,0,14,11,8,12,7,1,14,2,13,6,15,0,9,10,4,5,3],[12,1,10,15,9,2,6,8,0,13,3,4,14,7,5,11,10,15,4,2,7,12,9,5,6,1,13,14,0,11,3,8,9,14,15,5,2,8,12,3,7,0,4,10,1,13,11,6,4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13],[4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1,13,0,11,7,4,9,1,10,14,3,5,12,2,15,8, +6,1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2,6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12],[13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7,1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2,7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8,2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11]],J=[16,7,20,21,29,12,28,17,1,15,23,26,5,18,31,10,2,8,24,14,32,27,3,9,19,13,30,6,22,11,4,25],q=[],g=[],y=[[]],r=[],h=[];return function(e,a,t){"string"===typeof e&&(e=x(e));"string"===typeof a&&(a=x(a));var b,c,f,d,k=[],l=[];for(b=0;66>b;b++)k[b]=0;for(f=b=0;(d=e[f])&& +64>b;++f){for(c=0;7>c;c++,b++)k[b]=d>>6-c&1;b++}for(b=0;28>b;b++)m[b]=k[C[b]-1],n[b]=k[D[b]-1];for(b=0;16>b;b++){for(f=0;fc;c++)m[c]=m[c+1];m[27]=d;d=n[0];for(c=0;27>c;c++)n[c]=n[c+1];n[27]=d}for(c=0;24>c;c++)u[b][c]=m[F[c]-1],u[b][c+24]=n[G[c]-28-1]}for(b=0;66>b;b++)k[b]=0;for(b=0;48>b;b++)p[b]=H[b];for(f=b=0;2>b;b++,++f)for(d=a[f],l[b]=d,90c;c++)d>>c&1&&(e=p[6*b+c],p[6*b+c]=p[6*b+c+24],p[6*b+c+24]=e);for(b=0;25>b;b++){f=k;d=[];for(a= +0;64>a;a++)d[a]=f[A[a]-1];for(a=0;32>a;++a)q[a]=d[a],g[a]=d[a+32];for(c=0;16>c;c++){e=c;for(a=0;32>a;a++)y[a]=g[a];for(a=0;48>a;a++)h[a]=g[p[a]-1]^u[e][a];for(a=0;8>a;a++){e=6*a;var v=I[a][(h[e]<<5)+(h[e+1]<<3)+(h[e+2]<<2)+(h[e+3]<<1)+(h[e+4]<<0)+(h[e+5]<<4)];e=4*a;r[e]=v>>3&1;r[e+1]=v>>2&1;r[e+2]=v>>1&1;r[e+3]=v>>0&1}for(a=0;32>a;a++)g[a]=q[a]^r[J[a]-1];for(a=0;32>a;a++)q[a]=y[a]}for(a=0;32>a;a++)e=q[a],q[a]=g[a],g[a]=e;for(a=0;32>a;++a)d[a]=q[a],d[a+32]=g[a];for(a=0;64>a;a++)f[a]=d[B[a]-1]}for(b= +0;11>b;b++){for(c=d=0;6>c;c++)d<<=1,d|=k[6*b+c];d+=46;57 + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/unpipe/README.md b/node_modules/unpipe/README.md new file mode 100644 index 0000000..e536ad2 --- /dev/null +++ b/node_modules/unpipe/README.md @@ -0,0 +1,43 @@ +# unpipe + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Unpipe a stream from all destinations. + +## Installation + +```sh +$ npm install unpipe +``` + +## API + +```js +var unpipe = require('unpipe') +``` + +### unpipe(stream) + +Unpipes all destinations from a given stream. With stream 2+, this is +equivalent to `stream.unpipe()`. When used with streams 1 style streams +(typically Node.js 0.8 and below), this module attempts to undo the +actions done in `stream.pipe(dest)`. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/unpipe.svg +[npm-url]: https://npmjs.org/package/unpipe +[node-image]: https://img.shields.io/node/v/unpipe.svg +[node-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg +[travis-url]: https://travis-ci.org/stream-utils/unpipe +[coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg +[coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master +[downloads-image]: https://img.shields.io/npm/dm/unpipe.svg +[downloads-url]: https://npmjs.org/package/unpipe diff --git a/node_modules/unpipe/index.js b/node_modules/unpipe/index.js new file mode 100644 index 0000000..15c3d97 --- /dev/null +++ b/node_modules/unpipe/index.js @@ -0,0 +1,69 @@ +/*! + * unpipe + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = unpipe + +/** + * Determine if there are Node.js pipe-like data listeners. + * @private + */ + +function hasPipeDataListeners(stream) { + var listeners = stream.listeners('data') + + for (var i = 0; i < listeners.length; i++) { + if (listeners[i].name === 'ondata') { + return true + } + } + + return false +} + +/** + * Unpipe a stream from all destinations. + * + * @param {object} stream + * @public + */ + +function unpipe(stream) { + if (!stream) { + throw new TypeError('argument stream is required') + } + + if (typeof stream.unpipe === 'function') { + // new-style + stream.unpipe() + return + } + + // Node.js 0.8 hack + if (!hasPipeDataListeners(stream)) { + return + } + + var listener + var listeners = stream.listeners('close') + + for (var i = 0; i < listeners.length; i++) { + listener = listeners[i] + + if (listener.name !== 'cleanup' && listener.name !== 'onclose') { + continue + } + + // invoke the listener + listener.call(stream) + } +} diff --git a/node_modules/unpipe/package.json b/node_modules/unpipe/package.json new file mode 100644 index 0000000..a2b7358 --- /dev/null +++ b/node_modules/unpipe/package.json @@ -0,0 +1,27 @@ +{ + "name": "unpipe", + "description": "Unpipe a stream from all destinations", + "version": "1.0.0", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "repository": "stream-utils/unpipe", + "devDependencies": { + "istanbul": "0.3.15", + "mocha": "2.2.5", + "readable-stream": "1.1.13" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/unset-value/LICENSE b/node_modules/unset-value/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/unset-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/unset-value/README.md b/node_modules/unset-value/README.md new file mode 100644 index 0000000..f0fec3d --- /dev/null +++ b/node_modules/unset-value/README.md @@ -0,0 +1,131 @@ +# unset-value [![NPM version](https://img.shields.io/npm/v/unset-value.svg?style=flat)](https://www.npmjs.com/package/unset-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![NPM total downloads](https://img.shields.io/npm/dt/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unset-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/unset-value) + +> Delete nested properties from an object using dot notation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save unset-value +``` + +## Usage + +```js +var unset = require('unset-value'); + +var obj = {a: {b: {c: 'd', e: 'f'}}}; +unset(obj, 'a.b.c'); +console.log(obj); +//=> {a: {b: {e: 'f'}}}; +``` + +## Examples + +### Updates the object when a property is deleted + +```js +var obj = {a: 'b'}; +unset(obj, 'a'); +console.log(obj); +//=> {} +``` + +### Returns true when a property is deleted + +```js +unset({a: 'b'}, 'a') // true +``` + +### Returns `true` when a property does not exist + +This is consistent with `delete` behavior in that it does not +throw when a property does not exist. + +```js +unset({a: {b: {c: 'd'}}}, 'd') // true +``` + +### delete nested values + +```js +var one = {a: {b: {c: 'd'}}}; +unset(one, 'a.b'); +console.log(one); +//=> {a: {}} + +var two = {a: {b: {c: 'd'}}}; +unset(two, 'a.b.c'); +console.log(two); +//=> {a: {b: {}}} + +var three = {a: {b: {c: 'd', e: 'f'}}}; +unset(three, 'a.b.c'); +console.log(three); +//=> {a: {b: {e: 'f'}}} +``` + +### throws on invalid args + +```js +unset(); +// 'expected an object.' +``` + +## About + +### Related projects + +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [get-values](https://www.npmjs.com/package/get-values): Return an array of all values from the given object. | [homepage](https://github.com/jonschlinkert/get-values "Return an array of all values from the given object.") +* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.") +* [put-value](https://www.npmjs.com/package/put-value): Update only existing values from an object, works with dot notation paths like `a.b.c` and… [more](https://github.com/tunnckocore/put-value#readme) | [homepage](https://github.com/tunnckocore/put-value#readme "Update only existing values from an object, works with dot notation paths like `a.b.c` and support deep nesting.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.") +* [upsert-value](https://www.npmjs.com/package/upsert-value): Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/doowb/upsert-value "Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 6 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._ \ No newline at end of file diff --git a/node_modules/unset-value/index.js b/node_modules/unset-value/index.js new file mode 100644 index 0000000..a919010 --- /dev/null +++ b/node_modules/unset-value/index.js @@ -0,0 +1,32 @@ +/*! + * unset-value + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var has = require('has-value'); + +module.exports = function unset(obj, prop) { + if (!isObject(obj)) { + throw new TypeError('expected an object.'); + } + if (obj.hasOwnProperty(prop)) { + delete obj[prop]; + return true; + } + + if (has(obj, prop)) { + var segs = prop.split('.'); + var last = segs.pop(); + while (segs.length && segs[segs.length - 1].slice(-1) === '\\') { + last = segs.pop().slice(0, -1) + '.' + last; + } + while (segs.length) obj = obj[prop = segs.shift()]; + return (delete obj[last]); + } + return true; +}; diff --git a/node_modules/unset-value/node_modules/has-value/LICENSE b/node_modules/unset-value/node_modules/has-value/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/unset-value/node_modules/has-value/README.md b/node_modules/unset-value/node_modules/has-value/README.md new file mode 100644 index 0000000..a927633 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/README.md @@ -0,0 +1,130 @@ +# has-value [![NPM version](https://img.shields.io/npm/v/has-value.svg?style=flat)](https://www.npmjs.com/package/has-value) [![NPM downloads](https://img.shields.io/npm/dm/has-value.svg?style=flat)](https://npmjs.org/package/has-value) [![Build Status](https://img.shields.io/travis/jonschlinkert/has-value.svg?style=flat)](https://travis-ci.org/jonschlinkert/has-value) + +> Returns true if a value exists, false if empty. Works with deeply nested values using object paths. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install has-value --save +``` + +**Works for:** + +* booleans +* functions +* numbers (pass `true` as the last arg to treat zero as a value instead of falsey) +* strings +* nulls +* object +* arrays + +## Usage + +Works with nested object paths or a single value: + +```js +var hasValue = require('has-value'); + +hasValue({a: {b: {c: 'foo'}}} 'a.b.c'); +//=> true + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue(0, true); // pass `true` as the last arg to treat zero as a value +//=> true + +hasValue({a: 'a'}}); +//=> true + +hasValue({}}); +//=> false + +hasValue(['a']); +//=> true + +hasValue([]); +//=> false + +hasValue(function(foo) {}); // function length/arity +//=> true + +hasValue(function() {}); +//=> false + +hasValue(true); +hasValue(false); +//=> true +``` + +## isEmpty + +To do the opposite and test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue.apply(hasValue, arguments); +} +``` + +## Related projects + +You might also be interested in these projects: + +* [get-object](https://www.npmjs.com/package/get-object): Get a property from an object using dot (object path) notation. | [homepage](https://github.com/jonschlinkert/get-object) +* [get-property](https://www.npmjs.com/package/get-property): Get a nested property or its value from an object using simple `a.b.c` paths. | [homepage](https://github.com/jonschlinkert/get-property) +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value) +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/has-value/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/has-value/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._ \ No newline at end of file diff --git a/node_modules/unset-value/node_modules/has-value/index.js b/node_modules/unset-value/node_modules/has-value/index.js new file mode 100644 index 0000000..90687c8 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/index.js @@ -0,0 +1,19 @@ +/*! + * has-value + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var hasValues = require('has-values'); +var get = require('get-value'); + +module.exports = function(obj, prop, noZero) { + if (isObject(obj)) { + return hasValues(get(obj, prop), noZero); + } + return hasValues(obj, prop); +}; diff --git a/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md new file mode 100644 index 0000000..9dd897a --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md @@ -0,0 +1,112 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](https://travis-ci.org/jonschlinkert/isobject) + +Returns true if the value is an object and not an array or null. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject --save +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install isobject +``` + +## Usage + +```js +var isObject = require('isobject'); +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## Related projects + +You might also be interested in these projects: + +[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/isobject/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._ \ No newline at end of file diff --git a/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js new file mode 100644 index 0000000..aa0dce0 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js @@ -0,0 +1,14 @@ +/*! + * isobject + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isArray = require('isarray'); + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && isArray(val) === false; +}; diff --git a/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json new file mode 100644 index 0000000..954f411 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json @@ -0,0 +1,67 @@ +{ + "name": "isobject", + "description": "Returns true if the value is an object and not an array or null.", + "version": "2.1.0", + "homepage": "https://github.com/jonschlinkert/isobject", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/isobject", + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "isarray": "1.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "verb": { + "related": { + "list": [ + "merge-deep", + "extend-shallow", + "is-plain-object", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + } +} diff --git a/node_modules/unset-value/node_modules/has-value/package.json b/node_modules/unset-value/node_modules/has-value/package.json new file mode 100644 index 0000000..88ff6ed --- /dev/null +++ b/node_modules/unset-value/node_modules/has-value/package.json @@ -0,0 +1,81 @@ +{ + "name": "has-value", + "version": "0.3.1", + "description": "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.", + "homepage": "https://github.com/jonschlinkert/has-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-value", + "bugs": { + "url": "https://github.com/jonschlinkert/has-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "get-object", + "get-property", + "get-value", + "set-value" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/unset-value/node_modules/has-values/LICENSE b/node_modules/unset-value/node_modules/has-values/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/unset-value/node_modules/has-values/README.md b/node_modules/unset-value/node_modules/has-values/README.md new file mode 100644 index 0000000..13319c5 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/README.md @@ -0,0 +1,114 @@ +# has-values [![NPM version](https://img.shields.io/npm/v/has-values.svg?style=flat)](https://www.npmjs.com/package/has-values) [![NPM downloads](https://img.shields.io/npm/dm/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![Build Status](https://img.shields.io/travis/jonschlinkert/has-values.svg?style=flat)](https://travis-ci.org/jonschlinkert/has-values) + +> Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install has-values --save +``` + +## Usage + +```js +var hasValue = require('has-values'); + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue(0, true); // treat zero as a value +//=> true + +hasValue({a: 'a'}}); +//=> true + +hasValue({}}); +//=> false + +hasValue(['a']); +//=> true + +hasValue([]); +//=> false + +hasValue(function(foo) {}); // function length/arity +//=> true + +hasValue(function() {}); +//=> false + +hasValue(true); +hasValue(false); +//=> true +``` + +## isEmpty + +To test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue(o, isZero); +} +``` + +## Related projects + +You might also be interested in these projects: + +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value) +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/has-values/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/has-values/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._ \ No newline at end of file diff --git a/node_modules/unset-value/node_modules/has-values/index.js b/node_modules/unset-value/node_modules/has-values/index.js new file mode 100644 index 0000000..6d04ba1 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/index.js @@ -0,0 +1,36 @@ +/*! + * has-values + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function hasValue(o, noZero) { + if (o === null || o === undefined) { + return false; + } + + if (typeof o === 'boolean') { + return true; + } + + if (typeof o === 'number') { + if (o === 0 && noZero === true) { + return false; + } + return true; + } + + if (o.length !== undefined) { + return o.length !== 0; + } + + for (var key in o) { + if (o.hasOwnProperty(key)) { + return true; + } + } + return false; +}; diff --git a/node_modules/unset-value/node_modules/has-values/package.json b/node_modules/unset-value/node_modules/has-values/package.json new file mode 100644 index 0000000..519a2c8 --- /dev/null +++ b/node_modules/unset-value/node_modules/has-values/package.json @@ -0,0 +1,75 @@ +{ + "name": "has-values", + "version": "0.1.4", + "description": "Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. ", + "homepage": "https://github.com/jonschlinkert/has-values", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/has-values", + "bugs": { + "url": "https://github.com/jonschlinkert/has-values/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value" + ], + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-value", + "isobject", + "is-plain-object" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/unset-value/package.json b/node_modules/unset-value/package.json new file mode 100644 index 0000000..0753ba6 --- /dev/null +++ b/node_modules/unset-value/package.json @@ -0,0 +1,71 @@ +{ + "name": "unset-value", + "description": "Delete nested properties from an object using dot notation.", + "version": "1.0.0", + "homepage": "https://github.com/jonschlinkert/unset-value", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + " (https://github.com/wtgtybhertgeghgtwtg)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "jonschlinkert/unset-value", + "bugs": { + "url": "https://github.com/jonschlinkert/unset-value/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "*", + "should": "*" + }, + "keywords": [ + "del", + "delete", + "key", + "object", + "omit", + "prop", + "property", + "remove", + "unset", + "value" + ], + "verb": { + "related": { + "list": [ + "get-value", + "get-values", + "omit-value", + "put-value", + "set-value", + "union-value", + "upsert-value" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/upath/LICENSE b/node_modules/upath/LICENSE new file mode 100644 index 0000000..77fab24 --- /dev/null +++ b/node_modules/upath/LICENSE @@ -0,0 +1,22 @@ +Copyright(c) 2014-2019 Angelos Pikoulas (agelos.pikoulas@gmail.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/upath/build/code/upath.js b/node_modules/upath/build/code/upath.js new file mode 100644 index 0000000..f0949e1 --- /dev/null +++ b/node_modules/upath/build/code/upath.js @@ -0,0 +1,171 @@ +/** +* upath http://github.com/anodynos/upath/ +* +* A proxy to `path`, replacing `\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions. +* Version 1.2.0 - Compiled on 2019-09-02 23:33:57 +* Repository git://github.com/anodynos/upath +* Copyright(c) 2019 Angelos Pikoulas +* License MIT +*/ + +// Generated by uRequire v0.7.0-beta.33 target: 'lib' template: 'nodejs' + + +var VERSION = '1.2.0'; // injected by urequire-rc-inject-version + +var extraFn, extraFunctions, isFunction, isString, isValidExt, name, path, propName, propValue, toUnix, upath, slice = [].slice, indexOf = [].indexOf || function (item) { + for (var i = 0, l = this.length; i < l; i++) { + if (i in this && this[i] === item) + return i; + } + return -1; + }, hasProp = {}.hasOwnProperty; +path = require("path"); +isFunction = function (val) { + return val instanceof Function; +}; +isString = function (val) { + return typeof val === "string" || !!val && typeof val === "object" && Object.prototype.toString.call(val) === "[object String]"; +}; +upath = exports; +upath.VERSION = typeof VERSION !== "undefined" && VERSION !== null ? VERSION : "NO-VERSION"; +toUnix = function (p) { + var double; + p = p.replace(/\\/g, "/"); + double = /\/\//; + while (p.match(double)) { + p = p.replace(double, "/"); + } + return p; +}; +for (propName in path) { + propValue = path[propName]; + if (isFunction(propValue)) { + upath[propName] = function (propName) { + return function () { + var args, result; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + args = args.map(function (p) { + if (isString(p)) { + return toUnix(p); + } else { + return p; + } + }); + result = path[propName].apply(path, args); + if (isString(result)) { + return toUnix(result); + } else { + return result; + } + }; + }(propName); + } else { + upath[propName] = propValue; + } +} +upath.sep = "/"; +extraFunctions = { + toUnix: toUnix, + normalizeSafe: function (p) { + p = toUnix(p); + if (p.startsWith("./")) { + if (p.startsWith("./..") || p === "./") { + return upath.normalize(p); + } else { + return "./" + upath.normalize(p); + } + } else { + return upath.normalize(p); + } + }, + normalizeTrim: function (p) { + p = upath.normalizeSafe(p); + if (p.endsWith("/")) { + return p.slice(0, +(p.length - 2) + 1 || 9000000000); + } else { + return p; + } + }, + joinSafe: function () { + var p, result; + p = 1 <= arguments.length ? slice.call(arguments, 0) : []; + result = upath.join.apply(null, p); + if (p[0].startsWith("./") && !result.startsWith("./")) { + result = "./" + result; + } + return result; + }, + addExt: function (file, ext) { + if (!ext) { + return file; + } else { + if (ext[0] !== ".") { + ext = "." + ext; + } + return file + (file.endsWith(ext) ? "" : ext); + } + }, + trimExt: function (filename, ignoreExts, maxSize) { + var oldExt; + if (maxSize == null) { + maxSize = 7; + } + oldExt = upath.extname(filename); + if (isValidExt(oldExt, ignoreExts, maxSize)) { + return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9000000000); + } else { + return filename; + } + }, + removeExt: function (filename, ext) { + if (!ext) { + return filename; + } else { + ext = ext[0] === "." ? ext : "." + ext; + if (upath.extname(filename) === ext) { + return upath.trimExt(filename); + } else { + return filename; + } + } + }, + changeExt: function (filename, ext, ignoreExts, maxSize) { + if (maxSize == null) { + maxSize = 7; + } + return upath.trimExt(filename, ignoreExts, maxSize) + (!ext ? "" : ext[0] === "." ? ext : "." + ext); + }, + defaultExt: function (filename, ext, ignoreExts, maxSize) { + var oldExt; + if (maxSize == null) { + maxSize = 7; + } + oldExt = upath.extname(filename); + if (isValidExt(oldExt, ignoreExts, maxSize)) { + return filename; + } else { + return upath.addExt(filename, ext); + } + } +}; +isValidExt = function (ext, ignoreExts, maxSize) { + if (ignoreExts == null) { + ignoreExts = []; + } + return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map(function (e) { + return (e && e[0] !== "." ? "." : "") + e; + }), ext) < 0; +}; +for (name in extraFunctions) { + if (!hasProp.call(extraFunctions, name)) + continue; + extraFn = extraFunctions[name]; + if (upath[name] !== void 0) { + throw new Error("path." + name + " already exists."); + } else { + upath[name] = extraFn; + } +} + +; \ No newline at end of file diff --git a/node_modules/upath/package.json b/node_modules/upath/package.json new file mode 100644 index 0000000..38f605b --- /dev/null +++ b/node_modules/upath/package.json @@ -0,0 +1,60 @@ +{ + "name": "upath", + "description": "A proxy to `path`, replacing `\\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.", + "version": "1.2.0", + "homepage": "http://github.com/anodynos/upath/", + "author": { + "name": "Angelos Pikoulas", + "email": "agelos.pikoulas@gmail.com" + }, + "license": "MIT", + "keywords": [ + "path", + "unix", + "windows", + "extension", + "file extension", + "replace extension", + "change extension", + "trim extension", + "add extension", + "default extension" + ], + "repository": { + "type": "git", + "url": "git://github.com/anodynos/upath" + }, + "bugs": { + "url": "http://github.com/anodynos/upath/issues", + "email": "agelos.pikoulas@gmail.com" + }, + "main": "./build/code/upath.js", + "types": "./upath.d.ts", + "preferGlobal": false, + "scripts": { + "test": "grunt", + "build": "grunt lib" + }, + "directories": { + "doc": "./doc", + "dist": "./build" + }, + "engines": { + "node": ">=4", + "yarn": "*" + }, + "devDependencies": { + "chai": "~4.0.2", + "coffee-script": "1.12.6", + "grunt": "0.4.5", + "grunt-contrib-watch": "^1.1.0", + "grunt-urequire": "0.7.x", + "lodash": "^4.17.15", + "mocha": "~3.4.2", + "uberscore": "0.0.19", + "underscore.string": "^3.3.5", + "urequire": "0.7.0-beta.33", + "urequire-ab-specrunner": "^0.2.5", + "urequire-rc-inject-version": "^0.1.6" + } +} diff --git a/node_modules/upath/readme.md b/node_modules/upath/readme.md new file mode 100644 index 0000000..21bd958 --- /dev/null +++ b/node_modules/upath/readme.md @@ -0,0 +1,342 @@ +# upath v1.2.0 + +[![Build Status](https://travis-ci.org/anodynos/upath.svg?branch=master)](https://travis-ci.org/anodynos/upath) +[![Up to date Status](https://david-dm.org/anodynos/upath.png)](https://david-dm.org/anodynos/upath) + +A drop-in replacement / proxy to nodejs's `path` that: + + * Replaces the windows `\` with the unix `/` in all string params & results. This has significant positives - see below. + + * Adds **filename extensions** functions `addExt`, `trimExt`, `removeExt`, `changeExt`, and `defaultExt`. + + * Add a `normalizeSafe` function to preserve any meaningful leading `./` & a `normalizeTrim` which additionally trims any useless ending `/`. + + * Plus a helper `toUnix` that simply converts `\` to `/` and consolidates duplicates. + +**Useful note: these docs are actually auto generated from [specs](https://github.com/anodynos/upath/blob/master/source/spec/upath-spec.coffee), running on Linux.** + +Notes: + + * `upath.sep` is set to `'/'` for seamless replacement (as of 1.0.3). + + * upath has no runtime dependencies, except built-in `path` (as of 1.0.4) + + * travis-ci tested in node versions 4 to 12 + + +## Why ? + +Normal `path` doesn't convert paths to a unified format (ie `/`) before calculating paths (`normalize`, `join`), which can lead to numerous problems. +Also path joining, normalization etc on the two formats is not consistent, depending on where it runs. Running `path` on Windows yields different results than when it runs on Linux / Mac. + +In general, if you code your paths logic while developing on Unix/Mac and it runs on Windows, you may run into problems when using `path`. + +Note that using **Unix `/` on Windows** works perfectly inside nodejs (and other languages), so there's no reason to stick to the Windows legacy at all. + +##### Examples / specs + + +Check out the different (improved) behavior to vanilla `path`: + + `upath.normalize(path)` --returns--> + + ✓ `'c:/windows/nodejs/path'` ---> `'c:/windows/nodejs/path'` // equal to `path.normalize()` + ✓ `'c:/windows/../nodejs/path'` ---> `'c:/nodejs/path'` // equal to `path.normalize()` + ✓ `'c:\\windows\\nodejs\\path'` ---> `'c:/windows/nodejs/path'` // `path.normalize()` gives `'c:\windows\nodejs\path'` + ✓ `'c:\\windows\\..\\nodejs\\path'` ---> `'c:/nodejs/path'` // `path.normalize()` gives `'c:\windows\..\nodejs\path'` + ✓ `'//windows\\unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'/windows\unix/mixed'` + ✓ `'\\windows//unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'\windows/unix/mixed'` + ✓ `'////\\windows\\..\\unix/mixed/'` ---> `'/unix/mixed/'` // `path.normalize()` gives `'/\windows\..\unix/mixed/'` + + +Joining paths can also be a problem: + + `upath.join(paths...)` --returns--> + + ✓ `'some/nodejs/deep', '../path'` ---> `'some/nodejs/path'` // equal to `path.join()` + ✓ `'some/nodejs\\windows', '../path'` ---> `'some/nodejs/path'` // `path.join()` gives `'some/path'` + ✓ `'some\\windows\\only', '..\\path'` ---> `'some/windows/path'` // `path.join()` gives `'some\windows\only/..\path'` + + +Parsing with `path.parse()` should also be consistent across OSes: + + `upath.parse(path)` --returns--> + + ✓ `'c:\Windows\Directory\somefile.ext'` ---> `{ root: '', dir: 'c:/Windows/Directory', base: 'somefile.ext', ext: '.ext', name: 'somefile' }` + // `path.parse()` gives `'{ root: '', dir: '', base: 'c:\\Windows\\Directory\\somefile.ext', ext: '.ext', name: 'c:\\Windows\\Directory\\somefile' }'` + ✓ `'/root/of/unix/somefile.ext'` ---> `{ root: '/', dir: '/root/of/unix', base: 'somefile.ext', ext: '.ext', name: 'somefile' }` // equal to `path.parse()` + + +## Added functions + + +#### `upath.toUnix(path)` + +Just converts all `` to `/` and consolidates duplicates, without performing any normalization. + +##### Examples / specs + + `upath.toUnix(path)` --returns--> + + ✓ `'.//windows\//unix//mixed////'` ---> `'./windows/unix/mixed/'` + ✓ `'..///windows\..\\unix/mixed'` ---> `'../windows/../unix/mixed'` + + +#### `upath.normalizeSafe(path)` + +Exactly like `path.normalize(path)`, but it keeps the first meaningful `./`. + +Note that the unix `/` is returned everywhere, so windows `\` is always converted to unix `/`. + +##### Examples / specs & how it differs from vanilla `path` + + `upath.normalizeSafe(path)` --returns--> + + ✓ `''` ---> `'.'` // equal to `path.normalize()` + ✓ `'.'` ---> `'.'` // equal to `path.normalize()` + ✓ `'./'` ---> `'./'` // equal to `path.normalize()` + ✓ `'.//'` ---> `'./'` // equal to `path.normalize()` + ✓ `'.\\'` ---> `'./'` // `path.normalize()` gives `'.\'` + ✓ `'.\\//'` ---> `'./'` // `path.normalize()` gives `'.\/'` + ✓ `'./..'` ---> `'..'` // equal to `path.normalize()` + ✓ `'.//..'` ---> `'..'` // equal to `path.normalize()` + ✓ `'./../'` ---> `'../'` // equal to `path.normalize()` + ✓ `'.\\..\\'` ---> `'../'` // `path.normalize()` gives `'.\..\'` + ✓ `'./../dep'` ---> `'../dep'` // equal to `path.normalize()` + ✓ `'../dep'` ---> `'../dep'` // equal to `path.normalize()` + ✓ `'../path/dep'` ---> `'../path/dep'` // equal to `path.normalize()` + ✓ `'../path/../dep'` ---> `'../dep'` // equal to `path.normalize()` + ✓ `'dep'` ---> `'dep'` // equal to `path.normalize()` + ✓ `'path//dep'` ---> `'path/dep'` // equal to `path.normalize()` + ✓ `'./dep'` ---> `'./dep'` // `path.normalize()` gives `'dep'` + ✓ `'./path/dep'` ---> `'./path/dep'` // `path.normalize()` gives `'path/dep'` + ✓ `'./path/../dep'` ---> `'./dep'` // `path.normalize()` gives `'dep'` + ✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` + ✓ `'..//windows\\unix/mixed'` ---> `'../windows/unix/mixed'` // `path.normalize()` gives `'../windows\unix/mixed'` + ✓ `'windows\\unix/mixed/'` ---> `'windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` + ✓ `'..//windows\\..\\unix/mixed'` ---> `'../unix/mixed'` // `path.normalize()` gives `'../windows\..\unix/mixed'` + + +#### `upath.normalizeTrim(path)` + +Exactly like `path.normalizeSafe(path)`, but it trims any useless ending `/`. + +##### Examples / specs + + `upath.normalizeTrim(path)` --returns--> + + ✓ `'./'` ---> `'.'` // `upath.normalizeSafe()` gives `'./'` + ✓ `'./../'` ---> `'..'` // `upath.normalizeSafe()` gives `'../'` + ✓ `'./../dep/'` ---> `'../dep'` // `upath.normalizeSafe()` gives `'../dep/'` + ✓ `'path//dep\\'` ---> `'path/dep'` // `upath.normalizeSafe()` gives `'path/dep/'` + ✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed'` // `upath.normalizeSafe()` gives `'./windows/unix/mixed/'` + + +#### `upath.joinSafe([path1][, path2][, ...])` + +Exactly like `path.join()`, but it keeps the first meaningful `./`. + +Note that the unix `/` is returned everywhere, so windows `\` is always converted to unix `/`. + +##### Examples / specs & how it differs from vanilla `path` + + `upath.joinSafe(path)` --returns--> + + ✓ `'some/nodejs/deep', '../path'` ---> `'some/nodejs/path'` // equal to `path.join()` + ✓ `'./some/local/unix/', '../path'` ---> `'./some/local/path'` // `path.join()` gives `'some/local/path'` + ✓ `'./some\\current\\mixed', '..\\path'` ---> `'./some/current/path'` // `path.join()` gives `'some\current\mixed/..\path'` + ✓ `'../some/relative/destination', '..\\path'` ---> `'../some/relative/path'` // `path.join()` gives `'../some/relative/destination/..\path'` + + +## Added functions for *filename extension* manipulation. + +**Happy notes:** + + In all functions you can: + + * use both `.ext` & `ext` - the dot `.` on the extension is always adjusted correctly. + + * omit the `ext` param (pass null/undefined/empty string) and the common sense thing will happen. + + * ignore specific extensions from being considered as valid ones (eg `.min`, `.dev` `.aLongExtIsNotAnExt` etc), hence no trimming or replacement takes place on them. + + + +#### `upath.addExt(filename, [ext])` + +Adds `.ext` to `filename`, but only if it doesn't already have the exact extension. + +##### Examples / specs + + `upath.addExt(filename, 'js')` --returns--> + + ✓ `'myfile/addExt'` ---> `'myfile/addExt.js'` + ✓ `'myfile/addExt.txt'` ---> `'myfile/addExt.txt.js'` + ✓ `'myfile/addExt.js'` ---> `'myfile/addExt.js'` + ✓ `'myfile/addExt.min.'` ---> `'myfile/addExt.min..js'` + + +It adds nothing if no `ext` param is passed. + + `upath.addExt(filename)` --returns--> + + ✓ `'myfile/addExt'` ---> `'myfile/addExt'` + ✓ `'myfile/addExt.txt'` ---> `'myfile/addExt.txt'` + ✓ `'myfile/addExt.js'` ---> `'myfile/addExt.js'` + ✓ `'myfile/addExt.min.'` ---> `'myfile/addExt.min.'` + + +#### `upath.trimExt(filename, [ignoreExts], [maxSize=7])` + +Trims a filename's extension. + + * Extensions are considered to be up to `maxSize` chars long, counting the dot (defaults to 7). + + * An `Array` of `ignoreExts` (eg `['.min']`) prevents these from being considered as extension, thus are not trimmed. + +##### Examples / specs + + `upath.trimExt(filename)` --returns--> + + ✓ `'my/trimedExt.txt'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt.min'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt.min.js'` ---> `'my/trimedExt.min'` + ✓ `'../my/trimedExt.longExt'` ---> `'../my/trimedExt.longExt'` + + +It is ignoring `.min` & `.dev` as extensions, and considers exts with up to 8 chars. + + `upath.trimExt(filename, ['min', '.dev'], 8)` --returns--> + + ✓ `'my/trimedExt.txt'` ---> `'my/trimedExt'` + ✓ `'my/trimedExt.min'` ---> `'my/trimedExt.min'` + ✓ `'my/trimedExt.dev'` ---> `'my/trimedExt.dev'` + ✓ `'../my/trimedExt.longExt'` ---> `'../my/trimedExt'` + ✓ `'../my/trimedExt.longRExt'` ---> `'../my/trimedExt.longRExt'` + + +#### `upath.removeExt(filename, ext)` + +Removes the specific `ext` extension from filename, if it has it. Otherwise it leaves it as is. +As in all upath functions, it be `.ext` or `ext`. + +##### Examples / specs + + `upath.removeExt(filename, '.js')` --returns--> + + ✓ `'removedExt.js'` ---> `'removedExt'` + ✓ `'removedExt.txt.js'` ---> `'removedExt.txt'` + ✓ `'notRemoved.txt'` ---> `'notRemoved.txt'` + +It does not care about the length of exts. + + `upath.removeExt(filename, '.longExt')` --returns--> + + ✓ `'removedExt.longExt'` ---> `'removedExt'` + ✓ `'removedExt.txt.longExt'` ---> `'removedExt.txt'` + ✓ `'notRemoved.txt'` ---> `'notRemoved.txt'` + + +#### `upath.changeExt(filename, [ext], [ignoreExts], [maxSize=7])` + +Changes a filename's extension to `ext`. If it has no (valid) extension, it adds it. + + * Valid extensions are considered to be up to `maxSize` chars long, counting the dot (defaults to 7). + + * An `Array` of `ignoreExts` (eg `['.min']`) prevents these from being considered as extension, thus are not changed - the new extension is added instead. + +##### Examples / specs + + `upath.changeExt(filename, '.js')` --returns--> + + ✓ `'my/module.min'` ---> `'my/module.js'` + ✓ `'my/module.coffee'` ---> `'my/module.js'` + ✓ `'my/module'` ---> `'my/module.js'` + ✓ `'file/withDot.'` ---> `'file/withDot.js'` + ✓ `'file/change.longExt'` ---> `'file/change.longExt.js'` + + +If no `ext` param is given, it trims the current extension (if any). + + `upath.changeExt(filename)` --returns--> + + ✓ `'my/module.min'` ---> `'my/module'` + ✓ `'my/module.coffee'` ---> `'my/module'` + ✓ `'my/module'` ---> `'my/module'` + ✓ `'file/withDot.'` ---> `'file/withDot'` + ✓ `'file/change.longExt'` ---> `'file/change.longExt'` + + +It is ignoring `.min` & `.dev` as extensions, and considers exts with up to 8 chars. + + `upath.changeExt(filename, 'js', ['min', '.dev'], 8)` --returns--> + + ✓ `'my/module.coffee'` ---> `'my/module.js'` + ✓ `'file/notValidExt.min'` ---> `'file/notValidExt.min.js'` + ✓ `'file/notValidExt.dev'` ---> `'file/notValidExt.dev.js'` + ✓ `'file/change.longExt'` ---> `'file/change.js'` + ✓ `'file/change.longRExt'` ---> `'file/change.longRExt.js'` + + +#### `upath.defaultExt(filename, [ext], [ignoreExts], [maxSize=7])` + +Adds `.ext` to `filename`, only if it doesn't already have _any_ *old* extension. + + * (Old) extensions are considered to be up to `maxSize` chars long, counting the dot (defaults to 7). + + * An `Array` of `ignoreExts` (eg `['.min']`) will force adding default `.ext` even if one of these is present. + +##### Examples / specs + + `upath.defaultExt(filename, 'js')` --returns--> + + ✓ `'fileWith/defaultExt'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.js'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.min'` ---> `'fileWith/defaultExt.min'` + ✓ `'fileWith/defaultExt.longExt'` ---> `'fileWith/defaultExt.longExt.js'` + + +If no `ext` param is passed, it leaves filename intact. + + `upath.defaultExt(filename)` --returns--> + + ✓ `'fileWith/defaultExt'` ---> `'fileWith/defaultExt'` + ✓ `'fileWith/defaultExt.js'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.min'` ---> `'fileWith/defaultExt.min'` + ✓ `'fileWith/defaultExt.longExt'` ---> `'fileWith/defaultExt.longExt'` + + +It is ignoring `.min` & `.dev` as extensions, and considers exts with up to 8 chars. + + `upath.defaultExt(filename, 'js', ['min', '.dev'], 8)` --returns--> + + ✓ `'fileWith/defaultExt'` ---> `'fileWith/defaultExt.js'` + ✓ `'fileWith/defaultExt.min'` ---> `'fileWith/defaultExt.min.js'` + ✓ `'fileWith/defaultExt.dev'` ---> `'fileWith/defaultExt.dev.js'` + ✓ `'fileWith/defaultExt.longExt'` ---> `'fileWith/defaultExt.longExt'` + ✓ `'fileWith/defaultExt.longRext'` ---> `'fileWith/defaultExt.longRext.js'` + + +Copyright(c) 2014-2019 Angelos Pikoulas (agelos.pikoulas@gmail.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/upath/upath.d.ts b/node_modules/upath/upath.d.ts new file mode 100644 index 0000000..778d70a --- /dev/null +++ b/node_modules/upath/upath.d.ts @@ -0,0 +1,239 @@ +declare module "upath" { + + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + export interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + + /** + * Version of the library + */ + export var VERSION: string; + + /** + * Just converts all `to/` and consolidates duplicates, without performing any normalization. + * + * @param p string path to convert to unix. + */ + export function toUnix(p: string): string; + + /** + * Exactly like path.normalize(path), but it keeps the first meaningful ./. + * + * Note that the unix / is returned everywhere, so windows \ is always converted to unix /. + * + * @param p string path to normalize. + */ + export function normalizeSafe(p: string): string; + + /** + * Exactly like path.normalizeSafe(path), but it trims any useless ending /. + * + * @param p string path to normalize + */ + export function normalizeTrim(p: string): string; + + /** + * Exactly like path.join(), but it keeps the first meaningful ./. + * + * Note that the unix / is returned everywhere, so windows \ is always converted to unix /. + * + * @param paths string paths to join + */ + export function joinSafe(...p: any[]): string; + + /** + * Adds .ext to filename, but only if it doesn't already have the exact extension. + * + * @param file string filename to add extension to + * @param ext string extension to add + */ + export function addExt(file: string, ext: string): string; + + /** + * Trims a filename's extension. + * + * Extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7). + * + * An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not trimmed. + * + * @param filename string filename to trim it's extension + * @param ignoreExts array extensions to ignore + * @param maxSize number max length of the extension + */ + export function trimExt(filename: string, ignoreExts?: string[], maxSize?: number): string; + + /** + * Removes the specific ext extension from filename, if it has it. Otherwise it leaves it as is. As in all upath functions, it be .ext or ext. + * + * @param file string filename to remove extension to + * @param ext string extension to remove + */ + export function removeExt(filename: string, ext: string): string; + + /** + * Changes a filename's extension to ext. If it has no (valid) extension, it adds it. + * + * Valid extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7). + * + * An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not changed - the new extension is added instead. + * + * @param filename string filename to change it's extension + * @param ext string extension to change to + * @param ignoreExts array extensions to ignore + * @param maxSize number max length of the extension + */ + export function changeExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string; + + /** + * Adds .ext to filename, only if it doesn't already have any old extension. + * + * (Old) extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7). + * + * An Array of ignoreExts (eg ['.min']) will force adding default .ext even if one of these is present. + * + * @param filename string filename to default to it's extension + * @param ext string extension to default to + * @param ignoreExts array extensions to ignore + * @param maxSize number max length of the extension + */ + export function defaultExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string; + + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + export function normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths string paths to join. + */ + export function join(...paths: any[]): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths string paths to join. + */ + export function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + export function resolve(...pathSegments: any[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + export function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @param from + * @param to + */ + export function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + export function dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + export function basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + export function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + export var sep: string; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + export var delimiter: string; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + export function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + export function format(pathObject: ParsedPath): string; + + export module posix { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; + } + + export module win32 { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; + } +} diff --git a/node_modules/urix/.jshintrc b/node_modules/urix/.jshintrc new file mode 100644 index 0000000..e722e46 --- /dev/null +++ b/node_modules/urix/.jshintrc @@ -0,0 +1,42 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": false, + "eqeqeq": true, + "es3": false, + "forin": true, + "immed": false, + "indent": false, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "noempty": true, + "nonew": false, + "plusplus": false, + "quotmark": true, + "undef": true, + "unused": "vars", + "strict": false, + "trailing": true, + "maxparams": 5, + "maxdepth": false, + "maxstatements": false, + "maxcomplexity": false, + "maxlen": 100, + + "asi": true, + "expr": true, + "globalstrict": true, + "smarttabs": true, + "sub": true, + + "node": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false + } +} diff --git a/node_modules/urix/LICENSE b/node_modules/urix/LICENSE new file mode 100644 index 0000000..0595be3 --- /dev/null +++ b/node_modules/urix/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/urix/index.js b/node_modules/urix/index.js new file mode 100644 index 0000000..3fb7903 --- /dev/null +++ b/node_modules/urix/index.js @@ -0,0 +1,17 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var path = require("path") + +"use strict" + +function urix(aPath) { + if (path.sep === "\\") { + return aPath + .replace(/\\/g, "/") + .replace(/^[a-z]:\/?/i, "/") + } + return aPath +} + +module.exports = urix diff --git a/node_modules/urix/package.json b/node_modules/urix/package.json new file mode 100644 index 0000000..ce795d1 --- /dev/null +++ b/node_modules/urix/package.json @@ -0,0 +1,25 @@ +{ + "name": "urix", + "version": "0.1.0", + "author": "Simon Lydell", + "license": "MIT", + "description": "Makes Windows-style paths more unix and URI friendly.", + "main": "index.js", + "repository": "lydell/urix", + "keywords": [ + "path", + "url", + "uri", + "unix", + "windows", + "backslash", + "slash" + ], + "scripts": { + "test": "jshint index.js test/ && mocha" + }, + "devDependencies": { + "mocha": "^1.17.1", + "jshint": "^2.4.4" + } +} diff --git a/node_modules/urix/readme.md b/node_modules/urix/readme.md new file mode 100644 index 0000000..ac386f5 --- /dev/null +++ b/node_modules/urix/readme.md @@ -0,0 +1,46 @@ +[![Build Status](https://travis-ci.org/lydell/urix.png?branch=master)](https://travis-ci.org/lydell/urix) + +Overview +======== + +Makes Windows-style paths more unix and URI friendly. Useful if you work with +paths that eventually will be used in URLs. + +```js +var urix = require("urix") + +// On Windows: +urix("c:\\users\\you\\foo") +// /users/you/foo + +// On unix-like systems: +urix("c:\\users\\you\\foo") +// c:\users\you\foo +``` + + +Installation +============ + +`npm install urix` + +```js +var urix = require("urix") +``` + + +Usage +===== + +### `urix(path)` ### + +On Windows, replaces all backslashes with slashes and uses a slash instead of a +drive letter and a colon for absolute paths. + +On unix-like systems it is a no-op. + + +License +======= + +[The X11 (“MIT”) License](LICENSE). diff --git a/node_modules/urix/test/index.js b/node_modules/urix/test/index.js new file mode 100644 index 0000000..b84b8f3 --- /dev/null +++ b/node_modules/urix/test/index.js @@ -0,0 +1,43 @@ +// Copyright 2014 Simon Lydell +// X11 (“MIT”) Licensed. (See LICENSE.) + +var path = require("path") +var assert = require("assert") +var urix = require("../") + +"use stict" + +function test(testPath, expected) { + path.sep = "\\" + assert.equal(urix(testPath), expected) + path.sep = "/" + assert.equal(urix(testPath), testPath) +} + +describe("urix", function() { + + it("is a function", function() { + assert.equal(typeof urix, "function") + }) + + + it("converts backslashes to slashes", function() { + test("a\\b\\c", "a/b/c") + test("\\a\\b\\c", "/a/b/c") + test("a/b\\c", "a/b/c") + test("\\\\a\\\\\\b///c", "//a///b///c") + }) + + + it("changes the drive letter to a slash", function() { + test("c:\\a", "/a") + test("C:\\a", "/a") + test("z:\\a", "/a") + test("c:a", "/a") + test("c:/a", "/a") + test("c:\\\\a", "//a") + test("c://a", "//a") + test("c:\\//a", "///a") + }) + +}) diff --git a/node_modules/use/LICENSE b/node_modules/use/LICENSE new file mode 100644 index 0000000..7cccaf9 --- /dev/null +++ b/node_modules/use/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/use/README.md b/node_modules/use/README.md new file mode 100644 index 0000000..59b1dbd --- /dev/null +++ b/node_modules/use/README.md @@ -0,0 +1,90 @@ +# use [![NPM version](https://img.shields.io/npm/v/use.svg?style=flat)](https://www.npmjs.com/package/use) [![NPM monthly downloads](https://img.shields.io/npm/dm/use.svg?style=flat)](https://npmjs.org/package/use) [![NPM total downloads](https://img.shields.io/npm/dt/use.svg?style=flat)](https://npmjs.org/package/use) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/use.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/use) + +> Easily add plugin support to your node.js application. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save use +``` + +A different take on plugin handling! This is not a middleware system, if you need something that handles async middleware, [ware](https://github.com/segmentio/ware) is great for that. + +## Usage + +```js +const use = require('use'); +``` + +See the [examples folder](./examples) for usage examples. + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [ware](https://www.npmjs.com/package/ware): Easily create your own middleware layer. | [homepage](https://github.com/segmentio/ware "Easily create your own middleware layer.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 37 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [charlike-old](https://github.com/charlike-old) | +| 2 | [doowb](https://github.com/doowb) | +| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 12, 2018._ \ No newline at end of file diff --git a/node_modules/use/index.js b/node_modules/use/index.js new file mode 100644 index 0000000..9a1eb4e --- /dev/null +++ b/node_modules/use/index.js @@ -0,0 +1,155 @@ +/*! + * use + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function base(app, options) { + if (!isObject(app) && typeof app !== 'function') { + throw new TypeError('expected an object or function'); + } + + var opts = isObject(options) ? options : {}; + var prop = typeof opts.prop === 'string' ? opts.prop : 'fns'; + if (!Array.isArray(app[prop])) { + define(app, prop, []); + } + + /** + * Define a plugin function to be passed to use. The only + * parameter exposed to the plugin is `app`, the object or function. + * passed to `use(app)`. `app` is also exposed as `this` in plugins. + * + * Additionally, **if a plugin returns a function, the function will + * be pushed onto the `fns` array**, allowing the plugin to be + * called at a later point by the `run` method. + * + * ```js + * var use = require('use'); + * + * // define a plugin + * function foo(app) { + * // do stuff + * } + * + * var app = function(){}; + * use(app); + * + * // register plugins + * app.use(foo); + * app.use(bar); + * app.use(baz); + * ``` + * @name .use + * @param {Function} `fn` plugin function to call + * @api public + */ + + define(app, 'use', use); + + /** + * Run all plugins on `fns`. Any plugin that returns a function + * when called by `use` is pushed onto the `fns` array. + * + * ```js + * var config = {}; + * app.run(config); + * ``` + * @name .run + * @param {Object} `value` Object to be modified by plugins. + * @return {Object} Returns the object passed to `run` + * @api public + */ + + define(app, 'run', function(val) { + if (!isObject(val)) return; + + if (!val.use || !val.run) { + define(val, prop, val[prop] || []); + define(val, 'use', use); + } + + if (!val[prop] || val[prop].indexOf(base) === -1) { + val.use(base); + } + + var self = this || app; + var fns = self[prop]; + var len = fns.length; + var idx = -1; + + while (++idx < len) { + val.use(fns[idx]); + } + return val; + }); + + /** + * Call plugin `fn`. If a function is returned push it into the + * `fns` array to be called by the `run` method. + */ + + function use(type, fn, options) { + var offset = 1; + + if (typeof type === 'string' || Array.isArray(type)) { + fn = wrap(type, fn); + offset++; + } else { + options = fn; + fn = type; + } + + if (typeof fn !== 'function') { + throw new TypeError('expected a function'); + } + + var self = this || app; + var fns = self[prop]; + + var args = [].slice.call(arguments, offset); + args.unshift(self); + + if (typeof opts.hook === 'function') { + opts.hook.apply(self, args); + } + + var val = fn.apply(self, args); + if (typeof val === 'function' && fns.indexOf(val) === -1) { + fns.push(val); + } + return self; + } + + /** + * Wrap a named plugin function so that it's only called on objects of the + * given `type` + * + * @param {String} `type` + * @param {Function} `fn` Plugin function + * @return {Function} + */ + + function wrap(type, fn) { + return function plugin() { + return this.type === type ? fn.apply(this, arguments) : plugin; + }; + } + + return app; +}; + +function isObject(val) { + return val && typeof val === 'object' && !Array.isArray(val); +} + +function define(obj, key, val) { + Object.defineProperty(obj, key, { + configurable: true, + writable: true, + value: val + }); +} diff --git a/node_modules/use/package.json b/node_modules/use/package.json new file mode 100644 index 0000000..b7a3f9a --- /dev/null +++ b/node_modules/use/package.json @@ -0,0 +1,66 @@ +{ + "name": "use", + "description": "Easily add plugin support to your node.js application.", + "version": "3.1.1", + "homepage": "https://github.com/jonschlinkert/use", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Olsten Larck (https://i.am.charlike.online)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/use", + "bugs": { + "url": "https://github.com/jonschlinkert/use/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "base-plugins": "^1.0.0", + "define-property": "^2.0.0", + "extend-shallow": "^3.0.1", + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "mocha": "^4.0.1" + }, + "keywords": [ + "use" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "base", + "base-plugins", + "ware" + ] + }, + "reflinks": [ + "verb", + "ware" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md new file mode 100644 index 0000000..acc8675 --- /dev/null +++ b/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE new file mode 100644 index 0000000..6a60e8c --- /dev/null +++ b/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/README.md b/node_modules/util-deprecate/README.md new file mode 100644 index 0000000..75622fa --- /dev/null +++ b/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js new file mode 100644 index 0000000..549ae2f --- /dev/null +++ b/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js new file mode 100644 index 0000000..5e6fcff --- /dev/null +++ b/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json new file mode 100644 index 0000000..2e79f89 --- /dev/null +++ b/node_modules/util-deprecate/package.json @@ -0,0 +1,27 @@ +{ + "name": "util-deprecate", + "version": "1.0.2", + "description": "The Node.js `util.deprecate()` function with browser support", + "main": "node.js", + "browser": "browser.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "homepage": "https://github.com/TooTallNate/util-deprecate" +} diff --git a/node_modules/utils-merge/.npmignore b/node_modules/utils-merge/.npmignore new file mode 100644 index 0000000..3e53844 --- /dev/null +++ b/node_modules/utils-merge/.npmignore @@ -0,0 +1,9 @@ +CONTRIBUTING.md +Makefile +docs/ +examples/ +reports/ +test/ + +.jshintrc +.travis.yml diff --git a/node_modules/utils-merge/LICENSE b/node_modules/utils-merge/LICENSE new file mode 100644 index 0000000..76f6d08 --- /dev/null +++ b/node_modules/utils-merge/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013-2017 Jared Hanson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/utils-merge/README.md b/node_modules/utils-merge/README.md new file mode 100644 index 0000000..0cb7117 --- /dev/null +++ b/node_modules/utils-merge/README.md @@ -0,0 +1,34 @@ +# utils-merge + +[![Version](https://img.shields.io/npm/v/utils-merge.svg?label=version)](https://www.npmjs.com/package/utils-merge) +[![Build](https://img.shields.io/travis/jaredhanson/utils-merge.svg)](https://travis-ci.org/jaredhanson/utils-merge) +[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/utils-merge.svg?label=quality)](https://codeclimate.com/github/jaredhanson/utils-merge) +[![Coverage](https://img.shields.io/coveralls/jaredhanson/utils-merge.svg)](https://coveralls.io/r/jaredhanson/utils-merge) +[![Dependencies](https://img.shields.io/david/jaredhanson/utils-merge.svg)](https://david-dm.org/jaredhanson/utils-merge) + + +Merges the properties from a source object into a destination object. + +## Install + +```bash +$ npm install utils-merge +``` + +## Usage + +```javascript +var a = { foo: 'bar' } + , b = { bar: 'baz' }; + +merge(a, b); +// => { foo: 'bar', bar: 'baz' } +``` + +## License + +[The MIT License](http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2017 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> + + Sponsor diff --git a/node_modules/utils-merge/index.js b/node_modules/utils-merge/index.js new file mode 100644 index 0000000..4265c69 --- /dev/null +++ b/node_modules/utils-merge/index.js @@ -0,0 +1,23 @@ +/** + * Merge object b with object a. + * + * var a = { foo: 'bar' } + * , b = { bar: 'baz' }; + * + * merge(a, b); + * // => { foo: 'bar', bar: 'baz' } + * + * @param {Object} a + * @param {Object} b + * @return {Object} + * @api public + */ + +exports = module.exports = function(a, b){ + if (a && b) { + for (var key in b) { + a[key] = b[key]; + } + } + return a; +}; diff --git a/node_modules/utils-merge/package.json b/node_modules/utils-merge/package.json new file mode 100644 index 0000000..e36b078 --- /dev/null +++ b/node_modules/utils-merge/package.json @@ -0,0 +1,40 @@ +{ + "name": "utils-merge", + "version": "1.0.1", + "description": "merge() utility function", + "keywords": [ + "util" + ], + "author": { + "name": "Jared Hanson", + "email": "jaredhanson@gmail.com", + "url": "http://www.jaredhanson.net/" + }, + "repository": { + "type": "git", + "url": "git://github.com/jaredhanson/utils-merge.git" + }, + "bugs": { + "url": "http://github.com/jaredhanson/utils-merge/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://opensource.org/licenses/MIT" + } + ], + "main": "./index", + "dependencies": {}, + "devDependencies": { + "make-node": "0.3.x", + "mocha": "1.x.x", + "chai": "1.x.x" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js" + } +} diff --git a/node_modules/uuid/AUTHORS b/node_modules/uuid/AUTHORS new file mode 100644 index 0000000..5a10523 --- /dev/null +++ b/node_modules/uuid/AUTHORS @@ -0,0 +1,5 @@ +Robert Kieffer +Christoph Tavan +AJ ONeal +Vincent Voyer +Roman Shtylman diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md new file mode 100644 index 0000000..f811b8a --- /dev/null +++ b/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,119 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + + +### Features + +* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + + +### Bug Fixes + +* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + + + + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + + +### Bug Fixes + +* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + + + + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + + +### Bug Fixes + +* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + + + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + + +### Bug Fixes + +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + + + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + + +### Bug Fixes + +* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + +### Features + +* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +* Fix typo (#178) +* Simple typo fix (#165) + +### Features +* v5 support in CLI (#197) +* V5 support (#188) + + +# 3.0.1 (2016-11-28) + +* split uuid versions into separate files + + +# 3.0.0 (2016-11-17) + +* remove .parse and .unparse + + +# 2.0.0 + +* Removed uuid.BufferClass + + +# 1.4.0 + +* Improved module context detection +* Removed public RNG functions + + +# 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + + +# 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md new file mode 100644 index 0000000..8c84e39 --- /dev/null +++ b/node_modules/uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md new file mode 100644 index 0000000..1752e47 --- /dev/null +++ b/node_modules/uuid/README.md @@ -0,0 +1,276 @@ + + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript +const uuidv1 = require('uuid/v1'); +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' + +``` + +Version 3 (namespace): + +```javascript +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' + +``` + +Version 4 (random): + +```javascript +const uuidv4 = require('uuid/v4'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' + +``` + +Version 5 (namespace): + +```javascript +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Example: Generate string UUID with fully-specified options + +```javascript +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' + +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, + // 17, 233, 146, 52, 155, 29, + // 235, 77, 59, 125 + // ] +uuidv1(null, arr, 16); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125, + // 44, 94, 164, 193, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125 + // ] + +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' + +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' + +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(); +uuidv4(null, buffer, 0); // ⇨ + // [ + // 155, 29, 235, 77, 59, + // 125, 75, 173, 155, 221, + // 43, 13, 123, 61, 203, + // 109 + // ] +uuidv4(null, buffer, 16); // ⇨ + // [ + // 155, 29, 235, 77, 59, 125, 75, 173, + // 155, 221, 43, 13, 123, 61, 203, 109, + // 27, 157, 107, 205, 187, 253, 75, 45, + // 155, 93, 171, 141, 251, 189, 75, 237 + // ] + +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' + +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/uuid/bin/uuid b/node_modules/uuid/bin/uuid new file mode 100644 index 0000000..502626e --- /dev/null +++ b/node_modules/uuid/bin/uuid @@ -0,0 +1,65 @@ +#!/usr/bin/env node +var assert = require('assert'); + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +var args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} +var version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + var uuidV1 = require('../v1'); + console.log(uuidV1()); + break; + + case 'v3': + var uuidV3 = require('../v3'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v3 name not specified'); + assert(namespace != null, 'v3 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV3.URL; + if (namespace == 'DNS') namespace = uuidV3.DNS; + + console.log(uuidV3(name, namespace)); + break; + + case 'v4': + var uuidV4 = require('../v4'); + console.log(uuidV4()); + break; + + case 'v5': + var uuidV5 = require('../v5'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v5 name not specified'); + assert(namespace != null, 'v5 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV5.URL; + if (namespace == 'DNS') namespace = uuidV5.DNS; + + console.log(uuidV5(name, namespace)); + break; + + default: + usage(); + process.exit(1); +} diff --git a/node_modules/uuid/index.js b/node_modules/uuid/index.js new file mode 100644 index 0000000..e96791a --- /dev/null +++ b/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/node_modules/uuid/lib/bytesToUuid.js b/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 0000000..24b6041 --- /dev/null +++ b/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,26 @@ +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; diff --git a/node_modules/uuid/lib/md5-browser.js b/node_modules/uuid/lib/md5-browser.js new file mode 100644 index 0000000..9b3b6c7 --- /dev/null +++ b/node_modules/uuid/lib/md5-browser.js @@ -0,0 +1,216 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +'use strict'; + +function md5(bytes) { + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + return md5ToHexEncodedArray( + wordsToMd5( + bytesToWords(bytes) + , bytes.length * 8) + ); +} + + +/* +* Convert an array of little-endian words to an array of bytes +*/ +function md5ToHexEncodedArray(input) { + var i; + var x; + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + var hex; + + for (i = 0; i < length32; i += 8) { + x = (input[i >> 5] >>> (i % 32)) & 0xFF; + + hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); + + output.push(hex); + } + return output; +} + +/* +* Calculate the MD5 of an array of little-endian words, and a bit length. +*/ +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << (len % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + return [a, b, c, d]; +} + +/* +* Convert an array bytes to an array of little-endian words +* Characters >255 have their high-byte silently ignored. +*/ +function bytesToWords(input) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); + } + + return output; +} + +/* +* Add integers, wrapping at 2^32. This uses 16-bit operations internally +* to work around bugs in some JS interpreters. +*/ +function safeAdd(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* +* Bitwise rotate a 32-bit number to the left. +*/ +function bitRotateLeft(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* +* These functions implement the four basic operations the algorithm uses. +*/ +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} +function md5ff(a, b, c, d, x, s, t) { + return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5gg(a, b, c, d, x, s, t) { + return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +module.exports = md5; diff --git a/node_modules/uuid/lib/md5.js b/node_modules/uuid/lib/md5.js new file mode 100644 index 0000000..7044b87 --- /dev/null +++ b/node_modules/uuid/lib/md5.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function md5(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +module.exports = md5; diff --git a/node_modules/uuid/lib/rng-browser.js b/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 0000000..6361fb8 --- /dev/null +++ b/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,34 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection + +// getRandomValues needs to be invoked in a context where "this" is a Crypto +// implementation. Also, find the complete implementation of crypto on IE11. +var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} diff --git a/node_modules/uuid/lib/rng.js b/node_modules/uuid/lib/rng.js new file mode 100644 index 0000000..58f0dc9 --- /dev/null +++ b/node_modules/uuid/lib/rng.js @@ -0,0 +1,8 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = require('crypto'); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; diff --git a/node_modules/uuid/lib/sha1-browser.js b/node_modules/uuid/lib/sha1-browser.js new file mode 100644 index 0000000..5758ed7 --- /dev/null +++ b/node_modules/uuid/lib/sha1-browser.js @@ -0,0 +1,89 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +'use strict'; + +function f(s, x, y, z) { + switch (s) { + case 0: return (x & y) ^ (~x & z); + case 1: return x ^ y ^ z; + case 2: return (x & y) ^ (x & z) ^ (y & z); + case 3: return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return (x << n) | (x>>> (32 - n)); +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + bytes.push(0x80); + + var l = bytes.length/4 + 2; + var N = Math.ceil(l/16); + var M = new Array(N); + + for (var i=0; i>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = (H[0] + a) >>> 0; + H[1] = (H[1] + b) >>> 0; + H[2] = (H[2] + c) >>> 0; + H[3] = (H[3] + d) >>> 0; + H[4] = (H[4] + e) >>> 0; + } + + return [ + H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, + H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, + H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, + H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, + H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff + ]; +} + +module.exports = sha1; diff --git a/node_modules/uuid/lib/sha1.js b/node_modules/uuid/lib/sha1.js new file mode 100644 index 0000000..0b54b25 --- /dev/null +++ b/node_modules/uuid/lib/sha1.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function sha1(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +module.exports = sha1; diff --git a/node_modules/uuid/lib/v35.js b/node_modules/uuid/lib/v35.js new file mode 100644 index 0000000..8b066cc --- /dev/null +++ b/node_modules/uuid/lib/v35.js @@ -0,0 +1,57 @@ +var bytesToUuid = require('./bytesToUuid'); + +function uuidToBytes(uuid) { + // Note: We assume we're being passed a valid uuid string + var bytes = []; + uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { + bytes.push(parseInt(hex, 16)); + }); + + return bytes; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + var bytes = new Array(str.length); + for (var i = 0; i < str.length; i++) { + bytes[i] = str.charCodeAt(i); + } + return bytes; +} + +module.exports = function(name, version, hashfunc) { + var generateUUID = function(value, namespace, buf, offset) { + var off = buf && offset || 0; + + if (typeof(value) == 'string') value = stringToBytes(value); + if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); + + if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); + if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); + + // Per 4.3 + var bytes = hashfunc(namespace.concat(value)); + bytes[6] = (bytes[6] & 0x0f) | version; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + if (buf) { + for (var idx = 0; idx < 16; ++idx) { + buf[off+idx] = bytes[idx]; + } + } + + return buf || bytesToUuid(bytes); + }; + + // Function#name is not settable on some platforms (#270) + try { + generateUUID.name = name; + } catch (err) { + } + + // Pre-defined namespaces, per Appendix C + generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + return generateUUID; +}; diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json new file mode 100644 index 0000000..efc07b8 --- /dev/null +++ b/node_modules/uuid/package.json @@ -0,0 +1,49 @@ +{ + "name": "uuid", + "version": "3.4.0", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./bin/uuid" + }, + "devDependencies": { + "@commitlint/cli": "~8.2.0", + "@commitlint/config-conventional": "~8.2.0", + "eslint": "~6.4.0", + "husky": "~3.0.5", + "mocha": "6.2.0", + "runmd": "1.2.1", + "standard-version": "7.0.0" + }, + "scripts": { + "lint": "eslint .", + "test": "npm run lint && mocha test/test.js", + "md": "runmd --watch --output=README.md README_js.md", + "release": "standard-version", + "prepare": "runmd --output=README.md README_js.md" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/uuidjs/uuid.git" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + } +} diff --git a/node_modules/uuid/v1.js b/node_modules/uuid/v1.js new file mode 100644 index 0000000..8c245de --- /dev/null +++ b/node_modules/uuid/v1.js @@ -0,0 +1,109 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/uuidjs/uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/node_modules/uuid/v3.js b/node_modules/uuid/v3.js new file mode 100644 index 0000000..ee7e14c --- /dev/null +++ b/node_modules/uuid/v3.js @@ -0,0 +1,4 @@ +var v35 = require('./lib/v35.js'); +var md5 = require('./lib/md5'); + +module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/node_modules/uuid/v4.js b/node_modules/uuid/v4.js new file mode 100644 index 0000000..1f07be1 --- /dev/null +++ b/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/node_modules/uuid/v5.js b/node_modules/uuid/v5.js new file mode 100644 index 0000000..4945baf --- /dev/null +++ b/node_modules/uuid/v5.js @@ -0,0 +1,3 @@ +var v35 = require('./lib/v35.js'); +var sha1 = require('./lib/sha1'); +module.exports = v35('v5', 0x50, sha1); diff --git a/node_modules/validate-npm-package-license/LICENSE b/node_modules/validate-npm-package-license/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/validate-npm-package-license/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/validate-npm-package-license/README.md b/node_modules/validate-npm-package-license/README.md new file mode 100644 index 0000000..702bc7b --- /dev/null +++ b/node_modules/validate-npm-package-license/README.md @@ -0,0 +1,113 @@ +validate-npm-package-license +============================ + +Give me a string and I'll tell you if it's a valid npm package license string. + +```javascript +var valid = require('validate-npm-package-license'); +``` + +SPDX license identifiers are valid license strings: + +```javascript + +var assert = require('assert'); +var validSPDXExpression = { + validForNewPackages: true, + validForOldPackages: true, + spdx: true +}; + +assert.deepEqual(valid('MIT'), validSPDXExpression); +assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression); +assert.deepEqual(valid('Apache-2.0'), validSPDXExpression); +assert.deepEqual(valid('ISC'), validSPDXExpression); +``` +The function will return a warning and suggestion for nearly-correct license identifiers: + +```javascript +assert.deepEqual( + valid('Apache 2.0'), + { + validForOldPackages: false, + validForNewPackages: false, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + 'license is similar to the valid expression "Apache-2.0"' + ] + } +); +``` + +SPDX expressions are valid, too ... + +```javascript +// Simple SPDX license expression for dual licensing +assert.deepEqual( + valid('(GPL-3.0-only OR BSD-2-Clause)'), + validSPDXExpression +); +``` + +... except if they contain `LicenseRef`: + +```javascript +var warningAboutLicenseRef = { + validForOldPackages: false, + validForNewPackages: false, + spdx: true, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + ] +}; + +assert.deepEqual( + valid('LicenseRef-Made-Up'), + warningAboutLicenseRef +); + +assert.deepEqual( + valid('(MIT OR LicenseRef-Made-Up)'), + warningAboutLicenseRef +); +``` + +If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there: + +```javascript +assert.deepEqual( + valid('SEE LICENSE IN LICENSE.txt'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'LICENSE.txt' + } +); + +assert.deepEqual( + valid('SEE LICENSE IN license.md'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'license.md' + } +); +``` + +If there aren't any licensing terms, use `UNLICENSED`: + +```javascript +var unlicensed = { + validForNewPackages: true, + validForOldPackages: true, + unlicensed: true +}; +assert.deepEqual(valid('UNLICENSED'), unlicensed); +assert.deepEqual(valid('UNLICENCED'), unlicensed); +``` diff --git a/node_modules/validate-npm-package-license/index.js b/node_modules/validate-npm-package-license/index.js new file mode 100644 index 0000000..35eaa73 --- /dev/null +++ b/node_modules/validate-npm-package-license/index.js @@ -0,0 +1,86 @@ +var parse = require('spdx-expression-parse'); +var correct = require('spdx-correct'); + +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); + +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; +} + +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} + +module.exports = function(argument) { + var ast; + + try { + ast = parse(argument); + } catch (e) { + var match + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + if (argument.trim().length !== 0) { + var corrected = correct(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + } + return result; + } + } + + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; diff --git a/node_modules/validate-npm-package-license/package.json b/node_modules/validate-npm-package-license/package.json new file mode 100644 index 0000000..9e92af4 --- /dev/null +++ b/node_modules/validate-npm-package-license/package.json @@ -0,0 +1,28 @@ +{ + "name": "validate-npm-package-license", + "description": "Give me a string and I'll tell you if it's a valid npm package license string", + "version": "3.0.4", + "author": "Kyle E. Mitchell (https://kemitchell.com)", + "contributors": [ + "Mark Stacey " + ], + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + }, + "devDependencies": { + "defence-cli": "^2.0.1", + "replace-require-self": "^1.0.0" + }, + "keywords": [ + "license", + "npm", + "package", + "validation" + ], + "license": "Apache-2.0", + "repository": "kemitchell/validate-npm-package-license.js", + "scripts": { + "test": "defence README.md | replace-require-self | node" + } +} diff --git a/node_modules/vary/HISTORY.md b/node_modules/vary/HISTORY.md new file mode 100644 index 0000000..f6cbcf7 --- /dev/null +++ b/node_modules/vary/HISTORY.md @@ -0,0 +1,39 @@ +1.1.2 / 2017-09-23 +================== + + * perf: improve header token parsing speed + +1.1.1 / 2017-03-20 +================== + + * perf: hoist regular expression + +1.1.0 / 2015-09-29 +================== + + * Only accept valid field names in the `field` argument + - Ensures the resulting string is a valid HTTP header value + +1.0.1 / 2015-07-08 +================== + + * Fix setting empty header from empty `field` + * perf: enable strict mode + * perf: remove argument reassignments + +1.0.0 / 2014-08-10 +================== + + * Accept valid `Vary` header string as `field` + * Add `vary.append` for low-level string manipulation + * Move to `jshttp` orgainzation + +0.1.0 / 2014-06-05 +================== + + * Support array of fields to set + +0.0.0 / 2014-06-04 +================== + + * Initial release diff --git a/node_modules/vary/LICENSE b/node_modules/vary/LICENSE new file mode 100644 index 0000000..84441fb --- /dev/null +++ b/node_modules/vary/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/vary/README.md b/node_modules/vary/README.md new file mode 100644 index 0000000..cc000b3 --- /dev/null +++ b/node_modules/vary/README.md @@ -0,0 +1,101 @@ +# vary + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Manipulate the HTTP Vary header + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install vary +``` + +## API + + + +```js +var vary = require('vary') +``` + +### vary(res, field) + +Adds the given header `field` to the `Vary` response header of `res`. +This can be a string of a single field, a string of a valid `Vary` +header, or an array of multiple fields. + +This will append the header if not already listed, otherwise leaves +it listed in the current location. + + + +```js +// Append "Origin" to the Vary header of the response +vary(res, 'Origin') +``` + +### vary.append(header, field) + +Adds the given header `field` to the `Vary` response header string `header`. +This can be a string of a single field, a string of a valid `Vary` header, +or an array of multiple fields. + +This will append the header if not already listed, otherwise leaves +it listed in the current location. The new header string is returned. + + + +```js +// Get header string appending "Origin" to "Accept, User-Agent" +vary.append('Accept, User-Agent', 'Origin') +``` + +## Examples + +### Updating the Vary header when content is based on it + +```js +var http = require('http') +var vary = require('vary') + +http.createServer(function onRequest (req, res) { + // about to user-agent sniff + vary(res, 'User-Agent') + + var ua = req.headers['user-agent'] || '' + var isMobile = /mobi|android|touch|mini/i.test(ua) + + // serve site, depending on isMobile + res.setHeader('Content-Type', 'text/html') + res.end('You are (probably) ' + (isMobile ? '' : 'not ') + 'a mobile user') +}) +``` + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/vary.svg +[npm-url]: https://npmjs.org/package/vary +[node-version-image]: https://img.shields.io/node/v/vary.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg +[travis-url]: https://travis-ci.org/jshttp/vary +[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/vary +[downloads-image]: https://img.shields.io/npm/dm/vary.svg +[downloads-url]: https://npmjs.org/package/vary diff --git a/node_modules/vary/index.js b/node_modules/vary/index.js new file mode 100644 index 0000000..5b5e741 --- /dev/null +++ b/node_modules/vary/index.js @@ -0,0 +1,149 @@ +/*! + * vary + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = vary +module.exports.append = append + +/** + * RegExp to match field-name in RFC 7230 sec 3.2 + * + * field-name = token + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + */ + +var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/ + +/** + * Append a field to a vary header. + * + * @param {String} header + * @param {String|Array} field + * @return {String} + * @public + */ + +function append (header, field) { + if (typeof header !== 'string') { + throw new TypeError('header argument is required') + } + + if (!field) { + throw new TypeError('field argument is required') + } + + // get fields array + var fields = !Array.isArray(field) + ? parse(String(field)) + : field + + // assert on invalid field names + for (var j = 0; j < fields.length; j++) { + if (!FIELD_NAME_REGEXP.test(fields[j])) { + throw new TypeError('field argument contains an invalid header name') + } + } + + // existing, unspecified vary + if (header === '*') { + return header + } + + // enumerate current values + var val = header + var vals = parse(header.toLowerCase()) + + // unspecified vary + if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) { + return '*' + } + + for (var i = 0; i < fields.length; i++) { + var fld = fields[i].toLowerCase() + + // append value (case-preserving) + if (vals.indexOf(fld) === -1) { + vals.push(fld) + val = val + ? val + ', ' + fields[i] + : fields[i] + } + } + + return val +} + +/** + * Parse a vary header into an array. + * + * @param {String} header + * @return {Array} + * @private + */ + +function parse (header) { + var end = 0 + var list = [] + var start = 0 + + // gather tokens + for (var i = 0, len = header.length; i < len; i++) { + switch (header.charCodeAt(i)) { + case 0x20: /* */ + if (start === end) { + start = end = i + 1 + } + break + case 0x2c: /* , */ + list.push(header.substring(start, end)) + start = end = i + 1 + break + default: + end = i + 1 + break + } + } + + // final token + list.push(header.substring(start, end)) + + return list +} + +/** + * Mark that a request is varied on a header field. + * + * @param {Object} res + * @param {String|Array} field + * @public + */ + +function vary (res, field) { + if (!res || !res.getHeader || !res.setHeader) { + // quack quack + throw new TypeError('res argument is required') + } + + // get existing header + var val = res.getHeader('Vary') || '' + var header = Array.isArray(val) + ? val.join(', ') + : String(val) + + // set new header + if ((val = append(header, field))) { + res.setHeader('Vary', val) + } +} diff --git a/node_modules/vary/package.json b/node_modules/vary/package.json new file mode 100644 index 0000000..028f72a --- /dev/null +++ b/node_modules/vary/package.json @@ -0,0 +1,43 @@ +{ + "name": "vary", + "description": "Manipulate the HTTP Vary header", + "version": "1.1.2", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "http", + "res", + "vary" + ], + "repository": "jshttp/vary", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "supertest": "1.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/websocket-driver/CHANGELOG.md b/node_modules/websocket-driver/CHANGELOG.md new file mode 100644 index 0000000..cb3945f --- /dev/null +++ b/node_modules/websocket-driver/CHANGELOG.md @@ -0,0 +1,142 @@ +### 0.7.4 / 2020-05-22 + +- Avoid crashing if `process.version` does not contain any digits +- Emit `ping` and `pong` events from the `Server` driver +- Require http-parser-js >=0.5.1 which fixes the bug we addressed in 0.7.3 + +### 0.7.3 / 2019-06-13 + +- Cap version of http-parser-js below 0.4.11, which introduced a bug that + prevents us from handling messages that are part of the same input buffer as + the handshake response if chunked encoding is specified + +### 0.7.2 / 2019-06-13 + +(This version was pulled due to an error when publishing) + +### 0.7.1 / 2019-06-10 + +- Catch any exceptions produced while generating a handshake response and send a + `400 Bad Request` response to the client +- Pick the RFC-6455 protocol version if the request contains any of the headers + used by that version +- Use the `Buffer.alloc()` and `Buffer.from()` functions instead of the unsafe + `Buffer()` constructor +- Handle errors encountered while handling malformed draft-76 requests +- Change license from MIT to Apache 2.0 + +### 0.7.0 / 2017-09-11 + +- Add `ping` and `pong` to the set of events users can listen to +- Replace the bindings to Node's HTTP parser with `http-parser-js` + +### 0.6.5 / 2016-05-20 + +- Don't mutate buffers passed in by the application when masking + +### 0.6.4 / 2016-01-07 + +- If a number is given as input for a frame payload, send it as a string + +### 0.6.3 / 2015-11-06 + +- Reject draft-76 handshakes if their Sec-WebSocket-Key headers are invalid +- Throw a more helpful error if a client is created with an invalid URL + +### 0.6.2 / 2015-07-18 + +- When the peer sends a close frame with no error code, emit 1000 + +### 0.6.1 / 2015-07-13 + +- Use the `buffer.{read,write}UInt{16,32}BE` methods for reading/writing numbers + to buffers rather than including duplicate logic for this + +### 0.6.0 / 2015-07-08 + +- Allow the parser to recover cleanly if event listeners raise an error +- Add a `pong` method for sending unsolicited pong frames + +### 0.5.4 / 2015-03-29 + +- Don't emit extra close frames if we receive a close frame after we already + sent one +- Fail the connection when the driver receives an invalid + `Sec-WebSocket-Extensions` header + +### 0.5.3 / 2015-02-22 + +- Don't treat incoming data as WebSocket frames if a client driver is closed + before receiving the server handshake + +### 0.5.2 / 2015-02-19 + +- Fix compatibility with the HTTP parser on io.js +- Use `websocket-extensions` to make sure messages and close frames are kept in + order +- Don't emit multiple `error` events + +### 0.5.1 / 2014-12-18 + +- Don't allow drivers to be created with unrecognized options + +### 0.5.0 / 2014-12-13 + +- Support protocol extensions via the websocket-extensions module + +### 0.4.0 / 2014-11-08 + +- Support connection via HTTP proxies using `CONNECT` + +### 0.3.6 / 2014-10-04 + +- It is now possible to call `close()` before `start()` and close the driver + +### 0.3.5 / 2014-07-06 + +- Don't hold references to frame buffers after a message has been emitted +- Make sure that `protocol` and `version` are exposed properly by the TCP driver + +### 0.3.4 / 2014-05-08 + +- Don't hold memory-leaking references to I/O buffers after they have been + parsed + +### 0.3.3 / 2014-04-24 + +- Correct the draft-76 status line reason phrase + +### 0.3.2 / 2013-12-29 + +- Expand `maxLength` to cover sequences of continuation frames and + `draft-{75,76}` +- Decrease default maximum frame buffer size to 64MB +- Stop parsing when the protocol enters a failure mode, to save CPU cycles + +### 0.3.1 / 2013-12-03 + +- Add a `maxLength` option to limit allowed frame size +- Don't pre-allocate a message buffer until the whole frame has arrived +- Fix compatibility with Node v0.11 `HTTPParser` + +### 0.3.0 / 2013-09-09 + +- Support client URLs with Basic Auth credentials + +### 0.2.2 / 2013-07-05 + +- No functional changes, just updates to package.json + +### 0.2.1 / 2013-05-17 + +- Export the isSecureRequest() method since faye-websocket relies on it +- Queue sent messages in the client's initial state + +### 0.2.0 / 2013-05-12 + +- Add API for setting and reading headers +- Add Driver.server() method for getting a driver for TCP servers + +### 0.1.0 / 2013-05-04 + +- First stable release diff --git a/node_modules/websocket-driver/LICENSE.md b/node_modules/websocket-driver/LICENSE.md new file mode 100644 index 0000000..9475f06 --- /dev/null +++ b/node_modules/websocket-driver/LICENSE.md @@ -0,0 +1,12 @@ +Copyright 2010-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/node_modules/websocket-driver/README.md b/node_modules/websocket-driver/README.md new file mode 100644 index 0000000..95c33c4 --- /dev/null +++ b/node_modules/websocket-driver/README.md @@ -0,0 +1,370 @@ +# websocket-driver [![Build Status](https://travis-ci.org/faye/websocket-driver-node.svg)](https://travis-ci.org/faye/websocket-driver-node) + +This module provides a complete implementation of the WebSocket protocols that +can be hooked up to any I/O stream. It aims to simplify things by decoupling the +protocol details from the I/O layer, such that users only need to implement code +to stream data in and out of it without needing to know anything about how the +protocol actually works. Think of it as a complete WebSocket system with +pluggable I/O. + +Due to this design, you get a lot of things for free. In particular, if you hook +this module up to some I/O object, it will do all of this for you: + +- Select the correct server-side driver to talk to the client +- Generate and send both server- and client-side handshakes +- Recognize when the handshake phase completes and the WS protocol begins +- Negotiate subprotocol selection based on `Sec-WebSocket-Protocol` +- Negotiate and use extensions via the + [websocket-extensions](https://github.com/faye/websocket-extensions-node) + module +- Buffer sent messages until the handshake process is finished +- Deal with proxies that defer delivery of the draft-76 handshake body +- Notify you when the socket is open and closed and when messages arrive +- Recombine fragmented messages +- Dispatch text, binary, ping, pong and close frames +- Manage the socket-closing handshake process +- Automatically reply to ping frames with a matching pong +- Apply masking to messages sent by the client + +This library was originally extracted from the [Faye](http://faye.jcoglan.com) +project but now aims to provide simple WebSocket support for any Node-based +project. + + +## Installation + +``` +$ npm install websocket-driver +``` + + +## Usage + +This module provides protocol drivers that have the same interface on the server +and on the client. A WebSocket driver is an object with two duplex streams +attached; one for incoming/outgoing messages and one for managing the wire +protocol over an I/O stream. The full API is described below. + + +### Server-side with HTTP + +A Node webserver emits a special event for 'upgrade' requests, and this is where +you should handle WebSockets. You first check whether the request is a +WebSocket, and if so you can create a driver and attach the request's I/O stream +to it. + +```js +var http = require('http'), + websocket = require('websocket-driver'); + +var server = http.createServer(); + +server.on('upgrade', function(request, socket, body) { + if (!websocket.isWebSocket(request)) return; + + var driver = websocket.http(request); + + driver.io.write(body); + socket.pipe(driver.io).pipe(socket); + + driver.messages.on('data', function(message) { + console.log('Got a message', message); + }); + + driver.start(); +}); +``` + +Note the line `driver.io.write(body)` - you must pass the `body` buffer to the +socket driver in order to make certain versions of the protocol work. + + +### Server-side with TCP + +You can also handle WebSocket connections in a bare TCP server, if you're not +using an HTTP server and don't want to implement HTTP parsing yourself. + +The driver will emit a `connect` event when a request is received, and at this +point you can detect whether it's a WebSocket and handle it as such. Here's an +example using the Node `net` module: + +```js +var net = require('net'), + websocket = require('websocket-driver'); + +var server = net.createServer(function(connection) { + var driver = websocket.server(); + + driver.on('connect', function() { + if (websocket.isWebSocket(driver)) { + driver.start(); + } else { + // handle other HTTP requests + } + }); + + driver.on('close', function() { connection.end() }); + connection.on('error', function() {}); + + connection.pipe(driver.io).pipe(connection); + + driver.messages.pipe(driver.messages); +}); + +server.listen(4180); +``` + +In the `connect` event, the driver gains several properties to describe the +request, similar to a Node request object, such as `method`, `url` and +`headers`. However you should remember it's not a real request object; you +cannot write data to it, it only tells you what request data we parsed from the +input. + +If the request has a body, it will be in the `driver.body` buffer, but only as +much of the body as has been piped into the driver when the `connect` event +fires. + + +### Client-side + +Similarly, to implement a WebSocket client you just need to make a driver by +passing in a URL. After this you use the driver API as described below to +process incoming data and send outgoing data. + + +```js +var net = require('net'), + websocket = require('websocket-driver'); + +var driver = websocket.client('ws://www.example.com/socket'), + tcp = net.connect(80, 'www.example.com'); + +tcp.pipe(driver.io).pipe(tcp); + +tcp.on('connect', function() { + driver.start(); +}); + +driver.messages.on('data', function(message) { + console.log('Got a message', message); +}); +``` + +Client drivers have two additional properties for reading the HTTP data that was +sent back by the server: + +- `driver.statusCode` - the integer value of the HTTP status code +- `driver.headers` - an object containing the response headers + + +### HTTP Proxies + +The client driver supports connections via HTTP proxies using the `CONNECT` +method. Instead of sending the WebSocket handshake immediately, it will send a +`CONNECT` request, wait for a `200` response, and then proceed as normal. + +To use this feature, call `driver.proxy(url)` where `url` is the origin of the +proxy, including a username and password if required. This produces a duplex +stream that you should pipe in and out of your TCP connection to the proxy +server. When the proxy emits `connect`, you can then pipe `driver.io` to your +TCP stream and call `driver.start()`. + +```js +var net = require('net'), + websocket = require('websocket-driver'); + +var driver = websocket.client('ws://www.example.com/socket'), + proxy = driver.proxy('http://username:password@proxy.example.com'), + tcp = net.connect(80, 'proxy.example.com'); + +tcp.pipe(proxy).pipe(tcp, { end: false }); + +tcp.on('connect', function() { + proxy.start(); +}); + +proxy.on('connect', function() { + driver.io.pipe(tcp).pipe(driver.io); + driver.start(); +}); + +driver.messages.on('data', function(message) { + console.log('Got a message', message); +}); +``` + +The proxy's `connect` event is also where you should perform a TLS handshake on +your TCP stream, if you are connecting to a `wss:` endpoint. + +In the event that proxy connection fails, `proxy` will emit an `error`. You can +inspect the proxy's response via `proxy.statusCode` and `proxy.headers`. + +```js +proxy.on('error', function(error) { + console.error(error.message); + console.log(proxy.statusCode); + console.log(proxy.headers); +}); +``` + +Before calling `proxy.start()` you can set custom headers using +`proxy.setHeader()`: + +```js +proxy.setHeader('User-Agent', 'node'); +proxy.start(); +``` + + +### Driver API + +Drivers are created using one of the following methods: + +```js +driver = websocket.http(request, options) +driver = websocket.server(options) +driver = websocket.client(url, options) +``` + +The `http` method returns a driver chosen using the headers from a Node HTTP +request object. The `server` method returns a driver that will parse an HTTP +request and then decide which driver to use for it using the `http` method. The +`client` method always returns a driver for the RFC version of the protocol with +masking enabled on outgoing frames. + +The `options` argument is optional, and is an object. It may contain the +following fields: + +- `maxLength` - the maximum allowed size of incoming message frames, in bytes. + The default value is `2^26 - 1`, or 1 byte short of 64 MiB. +- `protocols` - an array of strings representing acceptable subprotocols for use + over the socket. The driver will negotiate one of these to use via the + `Sec-WebSocket-Protocol` header if supported by the other peer. + +A driver has two duplex streams attached to it: + +- **`driver.io`** - this stream should be attached to an I/O socket like a TCP + stream. Pipe incoming TCP chunks to this stream for them to be parsed, and + pipe this stream back into TCP to send outgoing frames. +- **`driver.messages`** - this stream emits messages received over the + WebSocket. Writing to it sends messages to the other peer by emitting frames + via the `driver.io` stream. + +All drivers respond to the following API methods, but some of them are no-ops +depending on whether the client supports the behaviour. + +Note that most of these methods are commands: if they produce data that should +be sent over the socket, they will give this to you by emitting `data` events on +the `driver.io` stream. + +#### `driver.on('open', function(event) {})` + +Adds a callback to execute when the socket becomes open. + +#### `driver.on('message', function(event) {})` + +Adds a callback to execute when a message is received. `event` will have a +`data` attribute containing either a string in the case of a text message or a +`Buffer` in the case of a binary message. + +You can also listen for messages using the `driver.messages.on('data')` event, +which emits strings for text messages and buffers for binary messages. + +#### `driver.on('error', function(event) {})` + +Adds a callback to execute when a protocol error occurs due to the other peer +sending an invalid byte sequence. `event` will have a `message` attribute +describing the error. + +#### `driver.on('close', function(event) {})` + +Adds a callback to execute when the socket becomes closed. The `event` object +has `code` and `reason` attributes. + +#### `driver.on('ping', function(event) {})` + +Adds a callback block to execute when a ping is received. You do not need to +handle this by sending a pong frame yourself; the driver handles this for you. + +#### `driver.on('pong', function(event) {})` + +Adds a callback block to execute when a pong is received. If this was in +response to a ping you sent, you can also handle this event via the +`driver.ping(message, function() { ... })` callback. + +#### `driver.addExtension(extension)` + +Registers a protocol extension whose operation will be negotiated via the +`Sec-WebSocket-Extensions` header. `extension` is any extension compatible with +the [websocket-extensions](https://github.com/faye/websocket-extensions-node) +framework. + +#### `driver.setHeader(name, value)` + +Sets a custom header to be sent as part of the handshake response, either from +the server or from the client. Must be called before `start()`, since this is +when the headers are serialized and sent. + +#### `driver.start()` + +Initiates the protocol by sending the handshake - either the response for a +server-side driver or the request for a client-side one. This should be the +first method you invoke. Returns `true` if and only if a handshake was sent. + +#### `driver.parse(string)` + +Takes a string and parses it, potentially resulting in message events being +emitted (see `on('message')` above) or in data being sent to `driver.io`. You +should send all data you receive via I/O to this method by piping a stream into +`driver.io`. + +#### `driver.text(string)` + +Sends a text message over the socket. If the socket handshake is not yet +complete, the message will be queued until it is. Returns `true` if the message +was sent or queued, and `false` if the socket can no longer send messages. + +This method is equivalent to `driver.messages.write(string)`. + +#### `driver.binary(buffer)` + +Takes a `Buffer` and sends it as a binary message. Will queue and return `true` +or `false` the same way as the `text` method. It will also return `false` if the +driver does not support binary messages. + +This method is equivalent to `driver.messages.write(buffer)`. + +#### `driver.ping(string = '', function() {})` + +Sends a ping frame over the socket, queueing it if necessary. `string` and the +callback are both optional. If a callback is given, it will be invoked when the +socket receives a pong frame whose content matches `string`. Returns `false` if +frames can no longer be sent, or if the driver does not support ping/pong. + +#### `driver.pong(string = '')` + +Sends a pong frame over the socket, queueing it if necessary. `string` is +optional. Returns `false` if frames can no longer be sent, or if the driver does +not support ping/pong. + +You don't need to call this when a ping frame is received; pings are replied to +automatically by the driver. This method is for sending unsolicited pongs. + +#### `driver.close()` + +Initiates the closing handshake if the socket is still open. For drivers with no +closing handshake, this will result in the immediate execution of the +`on('close')` driver. For drivers with a closing handshake, this sends a closing +frame and `emit('close')` will execute when a response is received or a protocol +error occurs. + +#### `driver.version` + +Returns the WebSocket version in use as a string. Will either be `hixie-75`, +`hixie-76` or `hybi-$version`. + +#### `driver.protocol` + +Returns a string containing the selected subprotocol, if any was agreed upon +using the `Sec-WebSocket-Protocol` mechanism. This value becomes available after +`emit('open')` has fired. diff --git a/node_modules/websocket-driver/lib/websocket/driver.js b/node_modules/websocket-driver/lib/websocket/driver.js new file mode 100644 index 0000000..3d701cc --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver.js @@ -0,0 +1,43 @@ +'use strict'; + +// Protocol references: +// +// * http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 +// * http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76 +// * http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 + +var Base = require('./driver/base'), + Client = require('./driver/client'), + Server = require('./driver/server'); + +var Driver = { + client: function(url, options) { + options = options || {}; + if (options.masking === undefined) options.masking = true; + return new Client(url, options); + }, + + server: function(options) { + options = options || {}; + if (options.requireMasking === undefined) options.requireMasking = true; + return new Server(options); + }, + + http: function() { + return Server.http.apply(Server, arguments); + }, + + isSecureRequest: function(request) { + return Server.isSecureRequest(request); + }, + + isWebSocket: function(request) { + return Base.isWebSocket(request); + }, + + validateOptions: function(options, validKeys) { + Base.validateOptions(options, validKeys); + } +}; + +module.exports = Driver; diff --git a/node_modules/websocket-driver/lib/websocket/driver/base.js b/node_modules/websocket-driver/lib/websocket/driver/base.js new file mode 100644 index 0000000..f05af5f --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/base.js @@ -0,0 +1,193 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Emitter = require('events').EventEmitter, + util = require('util'), + streams = require('../streams'), + Headers = require('./headers'), + Reader = require('./stream_reader'); + +var Base = function(request, url, options) { + Emitter.call(this); + Base.validateOptions(options || {}, ['maxLength', 'masking', 'requireMasking', 'protocols']); + + this._request = request; + this._reader = new Reader(); + this._options = options || {}; + this._maxLength = this._options.maxLength || this.MAX_LENGTH; + this._headers = new Headers(); + this.__queue = []; + this.readyState = 0; + this.url = url; + + this.io = new streams.IO(this); + this.messages = new streams.Messages(this); + this._bindEventListeners(); +}; +util.inherits(Base, Emitter); + +Base.isWebSocket = function(request) { + var connection = request.headers.connection || '', + upgrade = request.headers.upgrade || ''; + + return request.method === 'GET' && + connection.toLowerCase().split(/ *, */).indexOf('upgrade') >= 0 && + upgrade.toLowerCase() === 'websocket'; +}; + +Base.validateOptions = function(options, validKeys) { + for (var key in options) { + if (validKeys.indexOf(key) < 0) + throw new Error('Unrecognized option: ' + key); + } +}; + +var instance = { + // This is 64MB, small enough for an average VPS to handle without + // crashing from process out of memory + MAX_LENGTH: 0x3ffffff, + + STATES: ['connecting', 'open', 'closing', 'closed'], + + _bindEventListeners: function() { + var self = this; + + // Protocol errors are informational and do not have to be handled + this.messages.on('error', function() {}); + + this.on('message', function(event) { + var messages = self.messages; + if (messages.readable) messages.emit('data', event.data); + }); + + this.on('error', function(error) { + var messages = self.messages; + if (messages.readable) messages.emit('error', error); + }); + + this.on('close', function() { + var messages = self.messages; + if (!messages.readable) return; + messages.readable = messages.writable = false; + messages.emit('end'); + }); + }, + + getState: function() { + return this.STATES[this.readyState] || null; + }, + + addExtension: function(extension) { + return false; + }, + + setHeader: function(name, value) { + if (this.readyState > 0) return false; + this._headers.set(name, value); + return true; + }, + + start: function() { + if (this.readyState !== 0) return false; + + if (!Base.isWebSocket(this._request)) + return this._failHandshake(new Error('Not a WebSocket request')); + + var response; + + try { + response = this._handshakeResponse(); + } catch (error) { + return this._failHandshake(error); + } + + this._write(response); + if (this._stage !== -1) this._open(); + return true; + }, + + _failHandshake: function(error) { + var headers = new Headers(); + headers.set('Content-Type', 'text/plain'); + headers.set('Content-Length', Buffer.byteLength(error.message, 'utf8')); + + headers = ['HTTP/1.1 400 Bad Request', headers.toString(), error.message]; + this._write(Buffer.from(headers.join('\r\n'), 'utf8')); + this._fail('protocol_error', error.message); + + return false; + }, + + text: function(message) { + return this.frame(message); + }, + + binary: function(message) { + return false; + }, + + ping: function() { + return false; + }, + + pong: function() { + return false; + }, + + close: function(reason, code) { + if (this.readyState !== 1) return false; + this.readyState = 3; + this.emit('close', new Base.CloseEvent(null, null)); + return true; + }, + + _open: function() { + this.readyState = 1; + this.__queue.forEach(function(args) { this.frame.apply(this, args) }, this); + this.__queue = []; + this.emit('open', new Base.OpenEvent()); + }, + + _queue: function(message) { + this.__queue.push(message); + return true; + }, + + _write: function(chunk) { + var io = this.io; + if (io.readable) io.emit('data', chunk); + }, + + _fail: function(type, message) { + this.readyState = 2; + this.emit('error', new Error(message)); + this.close(); + } +}; + +for (var key in instance) + Base.prototype[key] = instance[key]; + + +Base.ConnectEvent = function() {}; + +Base.OpenEvent = function() {}; + +Base.CloseEvent = function(code, reason) { + this.code = code; + this.reason = reason; +}; + +Base.MessageEvent = function(data) { + this.data = data; +}; + +Base.PingEvent = function(data) { + this.data = data; +}; + +Base.PongEvent = function(data) { + this.data = data; +}; + +module.exports = Base; diff --git a/node_modules/websocket-driver/lib/websocket/driver/client.js b/node_modules/websocket-driver/lib/websocket/driver/client.js new file mode 100644 index 0000000..f24d645 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/client.js @@ -0,0 +1,142 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + crypto = require('crypto'), + url = require('url'), + util = require('util'), + HttpParser = require('../http_parser'), + Base = require('./base'), + Hybi = require('./hybi'), + Proxy = require('./proxy'); + +var Client = function(_url, options) { + this.version = 'hybi-' + Hybi.VERSION; + Hybi.call(this, null, _url, options); + + this.readyState = -1; + this._key = Client.generateKey(); + this._accept = Hybi.generateAccept(this._key); + this._http = new HttpParser('response'); + + var uri = url.parse(this.url), + auth = uri.auth && Buffer.from(uri.auth, 'utf8').toString('base64'); + + if (this.VALID_PROTOCOLS.indexOf(uri.protocol) < 0) + throw new Error(this.url + ' is not a valid WebSocket URL'); + + this._pathname = (uri.pathname || '/') + (uri.search || ''); + + this._headers.set('Host', uri.host); + this._headers.set('Upgrade', 'websocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('Sec-WebSocket-Key', this._key); + this._headers.set('Sec-WebSocket-Version', Hybi.VERSION); + + if (this._protocols.length > 0) + this._headers.set('Sec-WebSocket-Protocol', this._protocols.join(', ')); + + if (auth) + this._headers.set('Authorization', 'Basic ' + auth); +}; +util.inherits(Client, Hybi); + +Client.generateKey = function() { + return crypto.randomBytes(16).toString('base64'); +}; + +var instance = { + VALID_PROTOCOLS: ['ws:', 'wss:'], + + proxy: function(origin, options) { + return new Proxy(this, origin, options); + }, + + start: function() { + if (this.readyState !== -1) return false; + this._write(this._handshakeRequest()); + this.readyState = 0; + return true; + }, + + parse: function(chunk) { + if (this.readyState === 3) return; + if (this.readyState > 0) return Hybi.prototype.parse.call(this, chunk); + + this._http.parse(chunk); + if (!this._http.isComplete()) return; + + this._validateHandshake(); + if (this.readyState === 3) return; + + this._open(); + this.parse(this._http.body); + }, + + _handshakeRequest: function() { + var extensions = this._extensions.generateOffer(); + if (extensions) + this._headers.set('Sec-WebSocket-Extensions', extensions); + + var start = 'GET ' + this._pathname + ' HTTP/1.1', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'utf8'); + }, + + _failHandshake: function(message) { + message = 'Error during WebSocket handshake: ' + message; + this.readyState = 3; + this.emit('error', new Error(message)); + this.emit('close', new Base.CloseEvent(this.ERRORS.protocol_error, message)); + }, + + _validateHandshake: function() { + this.statusCode = this._http.statusCode; + this.headers = this._http.headers; + + if (this._http.error) + return this._failHandshake(this._http.error.message); + + if (this._http.statusCode !== 101) + return this._failHandshake('Unexpected response code: ' + this._http.statusCode); + + var headers = this._http.headers, + upgrade = headers['upgrade'] || '', + connection = headers['connection'] || '', + accept = headers['sec-websocket-accept'] || '', + protocol = headers['sec-websocket-protocol'] || ''; + + if (upgrade === '') + return this._failHandshake("'Upgrade' header is missing"); + if (upgrade.toLowerCase() !== 'websocket') + return this._failHandshake("'Upgrade' header value is not 'WebSocket'"); + + if (connection === '') + return this._failHandshake("'Connection' header is missing"); + if (connection.toLowerCase() !== 'upgrade') + return this._failHandshake("'Connection' header value is not 'Upgrade'"); + + if (accept !== this._accept) + return this._failHandshake('Sec-WebSocket-Accept mismatch'); + + this.protocol = null; + + if (protocol !== '') { + if (this._protocols.indexOf(protocol) < 0) + return this._failHandshake('Sec-WebSocket-Protocol mismatch'); + else + this.protocol = protocol; + } + + try { + this._extensions.activate(this.headers['sec-websocket-extensions']); + } catch (e) { + return this._failHandshake(e.message); + } + } +}; + +for (var key in instance) + Client.prototype[key] = instance[key]; + +module.exports = Client; diff --git a/node_modules/websocket-driver/lib/websocket/driver/draft75.js b/node_modules/websocket-driver/lib/websocket/driver/draft75.js new file mode 100644 index 0000000..583f985 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/draft75.js @@ -0,0 +1,123 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Base = require('./base'), + util = require('util'); + +var Draft75 = function(request, url, options) { + Base.apply(this, arguments); + this._stage = 0; + this.version = 'hixie-75'; + + this._headers.set('Upgrade', 'WebSocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('WebSocket-Origin', this._request.headers.origin); + this._headers.set('WebSocket-Location', this.url); +}; +util.inherits(Draft75, Base); + +var instance = { + close: function() { + if (this.readyState === 3) return false; + this.readyState = 3; + this.emit('close', new Base.CloseEvent(null, null)); + return true; + }, + + parse: function(chunk) { + if (this.readyState > 1) return; + + this._reader.put(chunk); + + this._reader.eachByte(function(octet) { + var message; + + switch (this._stage) { + case -1: + this._body.push(octet); + this._sendHandshakeBody(); + break; + + case 0: + this._parseLeadingByte(octet); + break; + + case 1: + this._length = (octet & 0x7F) + 128 * this._length; + + if (this._closing && this._length === 0) { + return this.close(); + } + else if ((octet & 0x80) !== 0x80) { + if (this._length === 0) { + this._stage = 0; + } + else { + this._skipped = 0; + this._stage = 2; + } + } + break; + + case 2: + if (octet === 0xFF) { + this._stage = 0; + message = Buffer.from(this._buffer).toString('utf8', 0, this._buffer.length); + this.emit('message', new Base.MessageEvent(message)); + } + else { + if (this._length) { + this._skipped += 1; + if (this._skipped === this._length) + this._stage = 0; + } else { + this._buffer.push(octet); + if (this._buffer.length > this._maxLength) return this.close(); + } + } + break; + } + }, this); + }, + + frame: function(buffer) { + if (this.readyState === 0) return this._queue([buffer]); + if (this.readyState > 1) return false; + + if (typeof buffer !== 'string') buffer = buffer.toString(); + + var length = Buffer.byteLength(buffer), + frame = Buffer.allocUnsafe(length + 2); + + frame[0] = 0x00; + frame.write(buffer, 1); + frame[frame.length - 1] = 0xFF; + + this._write(frame); + return true; + }, + + _handshakeResponse: function() { + var start = 'HTTP/1.1 101 Web Socket Protocol Handshake', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'utf8'); + }, + + _parseLeadingByte: function(octet) { + if ((octet & 0x80) === 0x80) { + this._length = 0; + this._stage = 1; + } else { + delete this._length; + delete this._skipped; + this._buffer = []; + this._stage = 2; + } + } +}; + +for (var key in instance) + Draft75.prototype[key] = instance[key]; + +module.exports = Draft75; diff --git a/node_modules/websocket-driver/lib/websocket/driver/draft76.js b/node_modules/websocket-driver/lib/websocket/driver/draft76.js new file mode 100644 index 0000000..bdaab31 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/draft76.js @@ -0,0 +1,117 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Base = require('./base'), + Draft75 = require('./draft75'), + crypto = require('crypto'), + util = require('util'); + + +var numberFromKey = function(key) { + return parseInt((key.match(/[0-9]/g) || []).join(''), 10); +}; + +var spacesInKey = function(key) { + return (key.match(/ /g) || []).length; +}; + + +var Draft76 = function(request, url, options) { + Draft75.apply(this, arguments); + this._stage = -1; + this._body = []; + this.version = 'hixie-76'; + + this._headers.clear(); + + this._headers.set('Upgrade', 'WebSocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('Sec-WebSocket-Origin', this._request.headers.origin); + this._headers.set('Sec-WebSocket-Location', this.url); +}; +util.inherits(Draft76, Draft75); + +var instance = { + BODY_SIZE: 8, + + start: function() { + if (!Draft75.prototype.start.call(this)) return false; + this._started = true; + this._sendHandshakeBody(); + return true; + }, + + close: function() { + if (this.readyState === 3) return false; + if (this.readyState === 1) this._write(Buffer.from([0xFF, 0x00])); + this.readyState = 3; + this.emit('close', new Base.CloseEvent(null, null)); + return true; + }, + + _handshakeResponse: function() { + var headers = this._request.headers, + key1 = headers['sec-websocket-key1'], + key2 = headers['sec-websocket-key2']; + + if (!key1) throw new Error('Missing required header: Sec-WebSocket-Key1'); + if (!key2) throw new Error('Missing required header: Sec-WebSocket-Key2'); + + var number1 = numberFromKey(key1), + spaces1 = spacesInKey(key1), + + number2 = numberFromKey(key2), + spaces2 = spacesInKey(key2); + + if (number1 % spaces1 !== 0 || number2 % spaces2 !== 0) + throw new Error('Client sent invalid Sec-WebSocket-Key headers'); + + this._keyValues = [number1 / spaces1, number2 / spaces2]; + + var start = 'HTTP/1.1 101 WebSocket Protocol Handshake', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'binary'); + }, + + _handshakeSignature: function() { + if (this._body.length < this.BODY_SIZE) return null; + + var md5 = crypto.createHash('md5'), + buffer = Buffer.allocUnsafe(8 + this.BODY_SIZE); + + buffer.writeUInt32BE(this._keyValues[0], 0); + buffer.writeUInt32BE(this._keyValues[1], 4); + Buffer.from(this._body).copy(buffer, 8, 0, this.BODY_SIZE); + + md5.update(buffer); + return Buffer.from(md5.digest('binary'), 'binary'); + }, + + _sendHandshakeBody: function() { + if (!this._started) return; + var signature = this._handshakeSignature(); + if (!signature) return; + + this._write(signature); + this._stage = 0; + this._open(); + + if (this._body.length > this.BODY_SIZE) + this.parse(this._body.slice(this.BODY_SIZE)); + }, + + _parseLeadingByte: function(octet) { + if (octet !== 0xFF) + return Draft75.prototype._parseLeadingByte.call(this, octet); + + this._closing = true; + this._length = 0; + this._stage = 1; + } +}; + +for (var key in instance) + Draft76.prototype[key] = instance[key]; + +module.exports = Draft76; diff --git a/node_modules/websocket-driver/lib/websocket/driver/headers.js b/node_modules/websocket-driver/lib/websocket/driver/headers.js new file mode 100644 index 0000000..bc96b7d --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/headers.js @@ -0,0 +1,35 @@ +'use strict'; + +var Headers = function() { + this.clear(); +}; + +Headers.prototype.ALLOWED_DUPLICATES = ['set-cookie', 'set-cookie2', 'warning', 'www-authenticate']; + +Headers.prototype.clear = function() { + this._sent = {}; + this._lines = []; +}; + +Headers.prototype.set = function(name, value) { + if (value === undefined) return; + + name = this._strip(name); + value = this._strip(value); + + var key = name.toLowerCase(); + if (!this._sent.hasOwnProperty(key) || this.ALLOWED_DUPLICATES.indexOf(key) >= 0) { + this._sent[key] = true; + this._lines.push(name + ': ' + value + '\r\n'); + } +}; + +Headers.prototype.toString = function() { + return this._lines.join(''); +}; + +Headers.prototype._strip = function(string) { + return string.toString().replace(/^ */, '').replace(/ *$/, ''); +}; + +module.exports = Headers; diff --git a/node_modules/websocket-driver/lib/websocket/driver/hybi.js b/node_modules/websocket-driver/lib/websocket/driver/hybi.js new file mode 100644 index 0000000..9027f90 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/hybi.js @@ -0,0 +1,483 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + crypto = require('crypto'), + util = require('util'), + Extensions = require('websocket-extensions'), + Base = require('./base'), + Frame = require('./hybi/frame'), + Message = require('./hybi/message'); + +var Hybi = function(request, url, options) { + Base.apply(this, arguments); + + this._extensions = new Extensions(); + this._stage = 0; + this._masking = this._options.masking; + this._protocols = this._options.protocols || []; + this._requireMasking = this._options.requireMasking; + this._pingCallbacks = {}; + + if (typeof this._protocols === 'string') + this._protocols = this._protocols.split(/ *, */); + + if (!this._request) return; + + var protos = this._request.headers['sec-websocket-protocol'], + supported = this._protocols; + + if (protos !== undefined) { + if (typeof protos === 'string') protos = protos.split(/ *, */); + this.protocol = protos.filter(function(p) { return supported.indexOf(p) >= 0 })[0]; + } + + this.version = 'hybi-' + Hybi.VERSION; +}; +util.inherits(Hybi, Base); + +Hybi.VERSION = '13'; + +Hybi.mask = function(payload, mask, offset) { + if (!mask || mask.length === 0) return payload; + offset = offset || 0; + + for (var i = 0, n = payload.length - offset; i < n; i++) { + payload[offset + i] = payload[offset + i] ^ mask[i % 4]; + } + return payload; +}; + +Hybi.generateAccept = function(key) { + var sha1 = crypto.createHash('sha1'); + sha1.update(key + Hybi.GUID); + return sha1.digest('base64'); +}; + +Hybi.GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; + +var instance = { + FIN: 0x80, + MASK: 0x80, + RSV1: 0x40, + RSV2: 0x20, + RSV3: 0x10, + OPCODE: 0x0F, + LENGTH: 0x7F, + + OPCODES: { + continuation: 0, + text: 1, + binary: 2, + close: 8, + ping: 9, + pong: 10 + }, + + OPCODE_CODES: [0, 1, 2, 8, 9, 10], + MESSAGE_OPCODES: [0, 1, 2], + OPENING_OPCODES: [1, 2], + + ERRORS: { + normal_closure: 1000, + going_away: 1001, + protocol_error: 1002, + unacceptable: 1003, + encoding_error: 1007, + policy_violation: 1008, + too_large: 1009, + extension_error: 1010, + unexpected_condition: 1011 + }, + + ERROR_CODES: [1000, 1001, 1002, 1003, 1007, 1008, 1009, 1010, 1011], + DEFAULT_ERROR_CODE: 1000, + MIN_RESERVED_ERROR: 3000, + MAX_RESERVED_ERROR: 4999, + + // http://www.w3.org/International/questions/qa-forms-utf-8.en.php + UTF8_MATCH: /^([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})*$/, + + addExtension: function(extension) { + this._extensions.add(extension); + return true; + }, + + parse: function(chunk) { + this._reader.put(chunk); + var buffer = true; + while (buffer) { + switch (this._stage) { + case 0: + buffer = this._reader.read(1); + if (buffer) this._parseOpcode(buffer[0]); + break; + + case 1: + buffer = this._reader.read(1); + if (buffer) this._parseLength(buffer[0]); + break; + + case 2: + buffer = this._reader.read(this._frame.lengthBytes); + if (buffer) this._parseExtendedLength(buffer); + break; + + case 3: + buffer = this._reader.read(4); + if (buffer) { + this._stage = 4; + this._frame.maskingKey = buffer; + } + break; + + case 4: + buffer = this._reader.read(this._frame.length); + if (buffer) { + this._stage = 0; + this._emitFrame(buffer); + } + break; + + default: + buffer = null; + } + } + }, + + text: function(message) { + if (this.readyState > 1) return false; + return this.frame(message, 'text'); + }, + + binary: function(message) { + if (this.readyState > 1) return false; + return this.frame(message, 'binary'); + }, + + ping: function(message, callback) { + if (this.readyState > 1) return false; + message = message || ''; + if (callback) this._pingCallbacks[message] = callback; + return this.frame(message, 'ping'); + }, + + pong: function(message) { + if (this.readyState > 1) return false; + message = message ||''; + return this.frame(message, 'pong'); + }, + + close: function(reason, code) { + reason = reason || ''; + code = code || this.ERRORS.normal_closure; + + if (this.readyState <= 0) { + this.readyState = 3; + this.emit('close', new Base.CloseEvent(code, reason)); + return true; + } else if (this.readyState === 1) { + this.readyState = 2; + this._extensions.close(function() { this.frame(reason, 'close', code) }, this); + return true; + } else { + return false; + } + }, + + frame: function(buffer, type, code) { + if (this.readyState <= 0) return this._queue([buffer, type, code]); + if (this.readyState > 2) return false; + + if (buffer instanceof Array) buffer = Buffer.from(buffer); + if (typeof buffer === 'number') buffer = buffer.toString(); + + var message = new Message(), + isText = (typeof buffer === 'string'), + payload, copy; + + message.rsv1 = message.rsv2 = message.rsv3 = false; + message.opcode = this.OPCODES[type || (isText ? 'text' : 'binary')]; + + payload = isText ? Buffer.from(buffer, 'utf8') : buffer; + + if (code) { + copy = payload; + payload = Buffer.allocUnsafe(2 + copy.length); + payload.writeUInt16BE(code, 0); + copy.copy(payload, 2); + } + message.data = payload; + + var onMessageReady = function(message) { + var frame = new Frame(); + + frame.final = true; + frame.rsv1 = message.rsv1; + frame.rsv2 = message.rsv2; + frame.rsv3 = message.rsv3; + frame.opcode = message.opcode; + frame.masked = !!this._masking; + frame.length = message.data.length; + frame.payload = message.data; + + if (frame.masked) frame.maskingKey = crypto.randomBytes(4); + + this._sendFrame(frame); + }; + + if (this.MESSAGE_OPCODES.indexOf(message.opcode) >= 0) + this._extensions.processOutgoingMessage(message, function(error, message) { + if (error) return this._fail('extension_error', error.message); + onMessageReady.call(this, message); + }, this); + else + onMessageReady.call(this, message); + + return true; + }, + + _sendFrame: function(frame) { + var length = frame.length, + header = (length <= 125) ? 2 : (length <= 65535 ? 4 : 10), + offset = header + (frame.masked ? 4 : 0), + buffer = Buffer.allocUnsafe(offset + length), + masked = frame.masked ? this.MASK : 0; + + buffer[0] = (frame.final ? this.FIN : 0) | + (frame.rsv1 ? this.RSV1 : 0) | + (frame.rsv2 ? this.RSV2 : 0) | + (frame.rsv3 ? this.RSV3 : 0) | + frame.opcode; + + if (length <= 125) { + buffer[1] = masked | length; + } else if (length <= 65535) { + buffer[1] = masked | 126; + buffer.writeUInt16BE(length, 2); + } else { + buffer[1] = masked | 127; + buffer.writeUInt32BE(Math.floor(length / 0x100000000), 2); + buffer.writeUInt32BE(length % 0x100000000, 6); + } + + frame.payload.copy(buffer, offset); + + if (frame.masked) { + frame.maskingKey.copy(buffer, header); + Hybi.mask(buffer, frame.maskingKey, offset); + } + + this._write(buffer); + }, + + _handshakeResponse: function() { + var secKey = this._request.headers['sec-websocket-key'], + version = this._request.headers['sec-websocket-version']; + + if (version !== Hybi.VERSION) + throw new Error('Unsupported WebSocket version: ' + version); + + if (typeof secKey !== 'string') + throw new Error('Missing handshake request header: Sec-WebSocket-Key'); + + this._headers.set('Upgrade', 'websocket'); + this._headers.set('Connection', 'Upgrade'); + this._headers.set('Sec-WebSocket-Accept', Hybi.generateAccept(secKey)); + + if (this.protocol) this._headers.set('Sec-WebSocket-Protocol', this.protocol); + + var extensions = this._extensions.generateResponse(this._request.headers['sec-websocket-extensions']); + if (extensions) this._headers.set('Sec-WebSocket-Extensions', extensions); + + var start = 'HTTP/1.1 101 Switching Protocols', + headers = [start, this._headers.toString(), '']; + + return Buffer.from(headers.join('\r\n'), 'utf8'); + }, + + _shutdown: function(code, reason, error) { + delete this._frame; + delete this._message; + this._stage = 5; + + var sendCloseFrame = (this.readyState === 1); + this.readyState = 2; + + this._extensions.close(function() { + if (sendCloseFrame) this.frame(reason, 'close', code); + this.readyState = 3; + if (error) this.emit('error', new Error(reason)); + this.emit('close', new Base.CloseEvent(code, reason)); + }, this); + }, + + _fail: function(type, message) { + if (this.readyState > 1) return; + this._shutdown(this.ERRORS[type], message, true); + }, + + _parseOpcode: function(octet) { + var rsvs = [this.RSV1, this.RSV2, this.RSV3].map(function(rsv) { + return (octet & rsv) === rsv; + }); + + var frame = this._frame = new Frame(); + + frame.final = (octet & this.FIN) === this.FIN; + frame.rsv1 = rsvs[0]; + frame.rsv2 = rsvs[1]; + frame.rsv3 = rsvs[2]; + frame.opcode = (octet & this.OPCODE); + + this._stage = 1; + + if (!this._extensions.validFrameRsv(frame)) + return this._fail('protocol_error', + 'One or more reserved bits are on: reserved1 = ' + (frame.rsv1 ? 1 : 0) + + ', reserved2 = ' + (frame.rsv2 ? 1 : 0) + + ', reserved3 = ' + (frame.rsv3 ? 1 : 0)); + + if (this.OPCODE_CODES.indexOf(frame.opcode) < 0) + return this._fail('protocol_error', 'Unrecognized frame opcode: ' + frame.opcode); + + if (this.MESSAGE_OPCODES.indexOf(frame.opcode) < 0 && !frame.final) + return this._fail('protocol_error', 'Received fragmented control frame: opcode = ' + frame.opcode); + + if (this._message && this.OPENING_OPCODES.indexOf(frame.opcode) >= 0) + return this._fail('protocol_error', 'Received new data frame but previous continuous frame is unfinished'); + }, + + _parseLength: function(octet) { + var frame = this._frame; + frame.masked = (octet & this.MASK) === this.MASK; + frame.length = (octet & this.LENGTH); + + if (frame.length >= 0 && frame.length <= 125) { + this._stage = frame.masked ? 3 : 4; + if (!this._checkFrameLength()) return; + } else { + this._stage = 2; + frame.lengthBytes = (frame.length === 126 ? 2 : 8); + } + + if (this._requireMasking && !frame.masked) + return this._fail('unacceptable', 'Received unmasked frame but masking is required'); + }, + + _parseExtendedLength: function(buffer) { + var frame = this._frame; + frame.length = this._readUInt(buffer); + + this._stage = frame.masked ? 3 : 4; + + if (this.MESSAGE_OPCODES.indexOf(frame.opcode) < 0 && frame.length > 125) + return this._fail('protocol_error', 'Received control frame having too long payload: ' + frame.length); + + if (!this._checkFrameLength()) return; + }, + + _checkFrameLength: function() { + var length = this._message ? this._message.length : 0; + + if (length + this._frame.length > this._maxLength) { + this._fail('too_large', 'WebSocket frame length too large'); + return false; + } else { + return true; + } + }, + + _emitFrame: function(buffer) { + var frame = this._frame, + payload = frame.payload = Hybi.mask(buffer, frame.maskingKey), + opcode = frame.opcode, + message, + code, reason, + callbacks, callback; + + delete this._frame; + + if (opcode === this.OPCODES.continuation) { + if (!this._message) return this._fail('protocol_error', 'Received unexpected continuation frame'); + this._message.pushFrame(frame); + } + + if (opcode === this.OPCODES.text || opcode === this.OPCODES.binary) { + this._message = new Message(); + this._message.pushFrame(frame); + } + + if (frame.final && this.MESSAGE_OPCODES.indexOf(opcode) >= 0) + return this._emitMessage(this._message); + + if (opcode === this.OPCODES.close) { + code = (payload.length >= 2) ? payload.readUInt16BE(0) : null; + reason = (payload.length > 2) ? this._encode(payload.slice(2)) : null; + + if (!(payload.length === 0) && + !(code !== null && code >= this.MIN_RESERVED_ERROR && code <= this.MAX_RESERVED_ERROR) && + this.ERROR_CODES.indexOf(code) < 0) + code = this.ERRORS.protocol_error; + + if (payload.length > 125 || (payload.length > 2 && !reason)) + code = this.ERRORS.protocol_error; + + this._shutdown(code || this.DEFAULT_ERROR_CODE, reason || ''); + } + + if (opcode === this.OPCODES.ping) { + this.frame(payload, 'pong'); + this.emit('ping', new Base.PingEvent(payload.toString())) + } + + if (opcode === this.OPCODES.pong) { + callbacks = this._pingCallbacks; + message = this._encode(payload); + callback = callbacks[message]; + + delete callbacks[message]; + if (callback) callback() + + this.emit('pong', new Base.PongEvent(payload.toString())) + } + }, + + _emitMessage: function(message) { + var message = this._message; + message.read(); + + delete this._message; + + this._extensions.processIncomingMessage(message, function(error, message) { + if (error) return this._fail('extension_error', error.message); + + var payload = message.data; + if (message.opcode === this.OPCODES.text) payload = this._encode(payload); + + if (payload === null) + return this._fail('encoding_error', 'Could not decode a text frame as UTF-8'); + else + this.emit('message', new Base.MessageEvent(payload)); + }, this); + }, + + _encode: function(buffer) { + try { + var string = buffer.toString('binary', 0, buffer.length); + if (!this.UTF8_MATCH.test(string)) return null; + } catch (e) {} + return buffer.toString('utf8', 0, buffer.length); + }, + + _readUInt: function(buffer) { + if (buffer.length === 2) return buffer.readUInt16BE(0); + + return buffer.readUInt32BE(0) * 0x100000000 + + buffer.readUInt32BE(4); + } +}; + +for (var key in instance) + Hybi.prototype[key] = instance[key]; + +module.exports = Hybi; diff --git a/node_modules/websocket-driver/lib/websocket/driver/hybi/frame.js b/node_modules/websocket-driver/lib/websocket/driver/hybi/frame.js new file mode 100644 index 0000000..0fb003f --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/hybi/frame.js @@ -0,0 +1,21 @@ +'use strict'; + +var Frame = function() {}; + +var instance = { + final: false, + rsv1: false, + rsv2: false, + rsv3: false, + opcode: null, + masked: false, + maskingKey: null, + lengthBytes: 1, + length: 0, + payload: null +}; + +for (var key in instance) + Frame.prototype[key] = instance[key]; + +module.exports = Frame; diff --git a/node_modules/websocket-driver/lib/websocket/driver/hybi/message.js b/node_modules/websocket-driver/lib/websocket/driver/hybi/message.js new file mode 100644 index 0000000..e881273 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/hybi/message.js @@ -0,0 +1,34 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; + +var Message = function() { + this.rsv1 = false; + this.rsv2 = false; + this.rsv3 = false; + this.opcode = null; + this.length = 0; + this._chunks = []; +}; + +var instance = { + read: function() { + return this.data = this.data || Buffer.concat(this._chunks, this.length); + }, + + pushFrame: function(frame) { + this.rsv1 = this.rsv1 || frame.rsv1; + this.rsv2 = this.rsv2 || frame.rsv2; + this.rsv3 = this.rsv3 || frame.rsv3; + + if (this.opcode === null) this.opcode = frame.opcode; + + this._chunks.push(frame.payload); + this.length += frame.length; + } +}; + +for (var key in instance) + Message.prototype[key] = instance[key]; + +module.exports = Message; diff --git a/node_modules/websocket-driver/lib/websocket/driver/proxy.js b/node_modules/websocket-driver/lib/websocket/driver/proxy.js new file mode 100644 index 0000000..2fdd32e --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/proxy.js @@ -0,0 +1,99 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer, + Stream = require('stream').Stream, + url = require('url'), + util = require('util'), + Base = require('./base'), + Headers = require('./headers'), + HttpParser = require('../http_parser'); + +var PORTS = { 'ws:': 80, 'wss:': 443 }; + +var Proxy = function(client, origin, options) { + this._client = client; + this._http = new HttpParser('response'); + this._origin = (typeof client.url === 'object') ? client.url : url.parse(client.url); + this._url = (typeof origin === 'object') ? origin : url.parse(origin); + this._options = options || {}; + this._state = 0; + + this.readable = this.writable = true; + this._paused = false; + + this._headers = new Headers(); + this._headers.set('Host', this._origin.host); + this._headers.set('Connection', 'keep-alive'); + this._headers.set('Proxy-Connection', 'keep-alive'); + + var auth = this._url.auth && Buffer.from(this._url.auth, 'utf8').toString('base64'); + if (auth) this._headers.set('Proxy-Authorization', 'Basic ' + auth); +}; +util.inherits(Proxy, Stream); + +var instance = { + setHeader: function(name, value) { + if (this._state !== 0) return false; + this._headers.set(name, value); + return true; + }, + + start: function() { + if (this._state !== 0) return false; + this._state = 1; + + var origin = this._origin, + port = origin.port || PORTS[origin.protocol], + start = 'CONNECT ' + origin.hostname + ':' + port + ' HTTP/1.1'; + + var headers = [start, this._headers.toString(), '']; + + this.emit('data', Buffer.from(headers.join('\r\n'), 'utf8')); + return true; + }, + + pause: function() { + this._paused = true; + }, + + resume: function() { + this._paused = false; + this.emit('drain'); + }, + + write: function(chunk) { + if (!this.writable) return false; + + this._http.parse(chunk); + if (!this._http.isComplete()) return !this._paused; + + this.statusCode = this._http.statusCode; + this.headers = this._http.headers; + + if (this.statusCode === 200) { + this.emit('connect', new Base.ConnectEvent()); + } else { + var message = "Can't establish a connection to the server at " + this._origin.href; + this.emit('error', new Error(message)); + } + this.end(); + return !this._paused; + }, + + end: function(chunk) { + if (!this.writable) return; + if (chunk !== undefined) this.write(chunk); + this.readable = this.writable = false; + this.emit('close'); + this.emit('end'); + }, + + destroy: function() { + this.end(); + } +}; + +for (var key in instance) + Proxy.prototype[key] = instance[key]; + +module.exports = Proxy; diff --git a/node_modules/websocket-driver/lib/websocket/driver/server.js b/node_modules/websocket-driver/lib/websocket/driver/server.js new file mode 100644 index 0000000..dc635b0 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/server.js @@ -0,0 +1,112 @@ +'use strict'; + +var util = require('util'), + HttpParser = require('../http_parser'), + Base = require('./base'), + Draft75 = require('./draft75'), + Draft76 = require('./draft76'), + Hybi = require('./hybi'); + +var Server = function(options) { + Base.call(this, null, null, options); + this._http = new HttpParser('request'); +}; +util.inherits(Server, Base); + +var instance = { + EVENTS: ['open', 'message', 'error', 'close', 'ping', 'pong'], + + _bindEventListeners: function() { + this.messages.on('error', function() {}); + this.on('error', function() {}); + }, + + parse: function(chunk) { + if (this._delegate) return this._delegate.parse(chunk); + + this._http.parse(chunk); + if (!this._http.isComplete()) return; + + this.method = this._http.method; + this.url = this._http.url; + this.headers = this._http.headers; + this.body = this._http.body; + + var self = this; + this._delegate = Server.http(this, this._options); + this._delegate.messages = this.messages; + this._delegate.io = this.io; + this._open(); + + this.EVENTS.forEach(function(event) { + this._delegate.on(event, function(e) { self.emit(event, e) }); + }, this); + + this.protocol = this._delegate.protocol; + this.version = this._delegate.version; + + this.parse(this._http.body); + this.emit('connect', new Base.ConnectEvent()); + }, + + _open: function() { + this.__queue.forEach(function(msg) { + this._delegate[msg[0]].apply(this._delegate, msg[1]); + }, this); + this.__queue = []; + } +}; + +['addExtension', 'setHeader', 'start', 'frame', 'text', 'binary', 'ping', 'close'].forEach(function(method) { + instance[method] = function() { + if (this._delegate) { + return this._delegate[method].apply(this._delegate, arguments); + } else { + this.__queue.push([method, arguments]); + return true; + } + }; +}); + +for (var key in instance) + Server.prototype[key] = instance[key]; + +Server.isSecureRequest = function(request) { + if (request.connection && request.connection.authorized !== undefined) return true; + if (request.socket && request.socket.secure) return true; + + var headers = request.headers; + if (!headers) return false; + if (headers['https'] === 'on') return true; + if (headers['x-forwarded-ssl'] === 'on') return true; + if (headers['x-forwarded-scheme'] === 'https') return true; + if (headers['x-forwarded-proto'] === 'https') return true; + + return false; +}; + +Server.determineUrl = function(request) { + var scheme = this.isSecureRequest(request) ? 'wss:' : 'ws:'; + return scheme + '//' + request.headers.host + request.url; +}; + +Server.http = function(request, options) { + options = options || {}; + if (options.requireMasking === undefined) options.requireMasking = true; + + var headers = request.headers, + version = headers['sec-websocket-version'], + key = headers['sec-websocket-key'], + key1 = headers['sec-websocket-key1'], + key2 = headers['sec-websocket-key2'], + url = this.determineUrl(request); + + if (version || key) + return new Hybi(request, url, options); + else if (key1 || key2) + return new Draft76(request, url, options); + else + return new Draft75(request, url, options); +}; + +module.exports = Server; diff --git a/node_modules/websocket-driver/lib/websocket/driver/stream_reader.js b/node_modules/websocket-driver/lib/websocket/driver/stream_reader.js new file mode 100644 index 0000000..3564da8 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/driver/stream_reader.js @@ -0,0 +1,69 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; + +var StreamReader = function() { + this._queue = []; + this._queueSize = 0; + this._offset = 0; +}; + +StreamReader.prototype.put = function(buffer) { + if (!buffer || buffer.length === 0) return; + if (!Buffer.isBuffer(buffer)) buffer = Buffer.from(buffer); + this._queue.push(buffer); + this._queueSize += buffer.length; +}; + +StreamReader.prototype.read = function(length) { + if (length > this._queueSize) return null; + if (length === 0) return Buffer.alloc(0); + + this._queueSize -= length; + + var queue = this._queue, + remain = length, + first = queue[0], + buffers, buffer; + + if (first.length >= length) { + if (first.length === length) { + return queue.shift(); + } else { + buffer = first.slice(0, length); + queue[0] = first.slice(length); + return buffer; + } + } + + for (var i = 0, n = queue.length; i < n; i++) { + if (remain < queue[i].length) break; + remain -= queue[i].length; + } + buffers = queue.splice(0, i); + + if (remain > 0 && queue.length > 0) { + buffers.push(queue[0].slice(0, remain)); + queue[0] = queue[0].slice(remain); + } + return Buffer.concat(buffers, length); +}; + +StreamReader.prototype.eachByte = function(callback, context) { + var buffer, n, index; + + while (this._queue.length > 0) { + buffer = this._queue[0]; + n = buffer.length; + + while (this._offset < n) { + index = this._offset; + this._offset += 1; + callback.call(context, buffer[index]); + } + this._offset = 0; + this._queue.shift(); + } +}; + +module.exports = StreamReader; diff --git a/node_modules/websocket-driver/lib/websocket/http_parser.js b/node_modules/websocket-driver/lib/websocket/http_parser.js new file mode 100644 index 0000000..1396656 --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/http_parser.js @@ -0,0 +1,135 @@ +'use strict'; + +var NodeHTTPParser = require('http-parser-js').HTTPParser, + Buffer = require('safe-buffer').Buffer; + +var TYPES = { + request: NodeHTTPParser.REQUEST || 'request', + response: NodeHTTPParser.RESPONSE || 'response' +}; + +var HttpParser = function(type) { + this._type = type; + this._parser = new NodeHTTPParser(TYPES[type]); + this._complete = false; + this.headers = {}; + + var current = null, + self = this; + + this._parser.onHeaderField = function(b, start, length) { + current = b.toString('utf8', start, start + length).toLowerCase(); + }; + + this._parser.onHeaderValue = function(b, start, length) { + var value = b.toString('utf8', start, start + length); + + if (self.headers.hasOwnProperty(current)) + self.headers[current] += ', ' + value; + else + self.headers[current] = value; + }; + + this._parser.onHeadersComplete = this._parser[NodeHTTPParser.kOnHeadersComplete] = + function(majorVersion, minorVersion, headers, method, pathname, statusCode) { + var info = arguments[0]; + + if (typeof info === 'object') { + method = info.method; + pathname = info.url; + statusCode = info.statusCode; + headers = info.headers; + } + + self.method = (typeof method === 'number') ? HttpParser.METHODS[method] : method; + self.statusCode = statusCode; + self.url = pathname; + + if (!headers) return; + + for (var i = 0, n = headers.length, key, value; i < n; i += 2) { + key = headers[i].toLowerCase(); + value = headers[i+1]; + if (self.headers.hasOwnProperty(key)) + self.headers[key] += ', ' + value; + else + self.headers[key] = value; + } + + self._complete = true; + }; +}; + +HttpParser.METHODS = { + 0: 'DELETE', + 1: 'GET', + 2: 'HEAD', + 3: 'POST', + 4: 'PUT', + 5: 'CONNECT', + 6: 'OPTIONS', + 7: 'TRACE', + 8: 'COPY', + 9: 'LOCK', + 10: 'MKCOL', + 11: 'MOVE', + 12: 'PROPFIND', + 13: 'PROPPATCH', + 14: 'SEARCH', + 15: 'UNLOCK', + 16: 'BIND', + 17: 'REBIND', + 18: 'UNBIND', + 19: 'ACL', + 20: 'REPORT', + 21: 'MKACTIVITY', + 22: 'CHECKOUT', + 23: 'MERGE', + 24: 'M-SEARCH', + 25: 'NOTIFY', + 26: 'SUBSCRIBE', + 27: 'UNSUBSCRIBE', + 28: 'PATCH', + 29: 'PURGE', + 30: 'MKCALENDAR', + 31: 'LINK', + 32: 'UNLINK' +}; + +var VERSION = process.version + ? process.version.match(/[0-9]+/g).map(function(n) { return parseInt(n, 10) }) + : []; + +if (VERSION[0] === 0 && VERSION[1] === 12) { + HttpParser.METHODS[16] = 'REPORT'; + HttpParser.METHODS[17] = 'MKACTIVITY'; + HttpParser.METHODS[18] = 'CHECKOUT'; + HttpParser.METHODS[19] = 'MERGE'; + HttpParser.METHODS[20] = 'M-SEARCH'; + HttpParser.METHODS[21] = 'NOTIFY'; + HttpParser.METHODS[22] = 'SUBSCRIBE'; + HttpParser.METHODS[23] = 'UNSUBSCRIBE'; + HttpParser.METHODS[24] = 'PATCH'; + HttpParser.METHODS[25] = 'PURGE'; +} + +HttpParser.prototype.isComplete = function() { + return this._complete; +}; + +HttpParser.prototype.parse = function(chunk) { + var consumed = this._parser.execute(chunk, 0, chunk.length); + + if (typeof consumed !== 'number') { + this.error = consumed; + this._complete = true; + return; + } + + if (this._complete) + this.body = (consumed < chunk.length) + ? chunk.slice(consumed) + : Buffer.alloc(0); +}; + +module.exports = HttpParser; diff --git a/node_modules/websocket-driver/lib/websocket/streams.js b/node_modules/websocket-driver/lib/websocket/streams.js new file mode 100644 index 0000000..96ab31f --- /dev/null +++ b/node_modules/websocket-driver/lib/websocket/streams.js @@ -0,0 +1,146 @@ +'use strict'; + +/** + +Streams in a WebSocket connection +--------------------------------- + +We model a WebSocket as two duplex streams: one stream is for the wire protocol +over an I/O socket, and the other is for incoming/outgoing messages. + + + +----------+ +---------+ +----------+ + [1] write(chunk) -->| ~~~~~~~~ +----->| parse() +----->| ~~~~~~~~ +--> emit('data') [2] + | | +----+----+ | | + | | | | | + | IO | | [5] | Messages | + | | V | | + | | +---------+ | | + [4] emit('data') <--+ ~~~~~~~~ |<-----+ frame() |<-----+ ~~~~~~~~ |<-- write(chunk) [3] + +----------+ +---------+ +----------+ + + +Message transfer in each direction is simple: IO receives a byte stream [1] and +sends this stream for parsing. The parser will periodically emit a complete +message text on the Messages stream [2]. Similarly, when messages are written +to the Messages stream [3], they are framed using the WebSocket wire format and +emitted via IO [4]. + +There is a feedback loop via [5] since some input from [1] will be things like +ping, pong and close frames. In these cases the protocol responds by emitting +responses directly back to [4] rather than emitting messages via [2]. + +For the purposes of flow control, we consider the sources of each Readable +stream to be as follows: + +* [2] receives input from [1] +* [4] receives input from [1] and [3] + +The classes below express the relationships described above without prescribing +anything about how parse() and frame() work, other than assuming they emit +'data' events to the IO and Messages streams. They will work with any protocol +driver having these two methods. +**/ + + +var Stream = require('stream').Stream, + util = require('util'); + + +var IO = function(driver) { + this.readable = this.writable = true; + this._paused = false; + this._driver = driver; +}; +util.inherits(IO, Stream); + +// The IO pause() and resume() methods will be called when the socket we are +// piping to gets backed up and drains. Since IO output [4] comes from IO input +// [1] and Messages input [3], we need to tell both of those to return false +// from write() when this stream is paused. + +IO.prototype.pause = function() { + this._paused = true; + this._driver.messages._paused = true; +}; + +IO.prototype.resume = function() { + this._paused = false; + this.emit('drain'); + + var messages = this._driver.messages; + messages._paused = false; + messages.emit('drain'); +}; + +// When we receive input from a socket, send it to the parser and tell the +// source whether to back off. +IO.prototype.write = function(chunk) { + if (!this.writable) return false; + this._driver.parse(chunk); + return !this._paused; +}; + +// The IO end() method will be called when the socket piping into it emits +// 'close' or 'end', i.e. the socket is closed. In this situation the Messages +// stream will not emit any more data so we emit 'end'. +IO.prototype.end = function(chunk) { + if (!this.writable) return; + if (chunk !== undefined) this.write(chunk); + this.writable = false; + + var messages = this._driver.messages; + if (messages.readable) { + messages.readable = messages.writable = false; + messages.emit('end'); + } +}; + +IO.prototype.destroy = function() { + this.end(); +}; + + +var Messages = function(driver) { + this.readable = this.writable = true; + this._paused = false; + this._driver = driver; +}; +util.inherits(Messages, Stream); + +// The Messages pause() and resume() methods will be called when the app that's +// processing the messages gets backed up and drains. If we're emitting +// messages too fast we should tell the source to slow down. Message output [2] +// comes from IO input [1]. + +Messages.prototype.pause = function() { + this._driver.io._paused = true; +}; + +Messages.prototype.resume = function() { + this._driver.io._paused = false; + this._driver.io.emit('drain'); +}; + +// When we receive messages from the user, send them to the formatter and tell +// the source whether to back off. +Messages.prototype.write = function(message) { + if (!this.writable) return false; + if (typeof message === 'string') this._driver.text(message); + else this._driver.binary(message); + return !this._paused; +}; + +// The Messages end() method will be called when a stream piping into it emits +// 'end'. Many streams may be piped into the WebSocket and one of them ending +// does not mean the whole socket is done, so just process the input and move +// on leaving the socket open. +Messages.prototype.end = function(message) { + if (message !== undefined) this.write(message); +}; + +Messages.prototype.destroy = function() {}; + + +exports.IO = IO; +exports.Messages = Messages; diff --git a/node_modules/websocket-driver/package.json b/node_modules/websocket-driver/package.json new file mode 100644 index 0000000..fab2506 --- /dev/null +++ b/node_modules/websocket-driver/package.json @@ -0,0 +1,35 @@ +{ + "name": "websocket-driver", + "description": "WebSocket protocol handler with pluggable I/O", + "homepage": "https://github.com/faye/websocket-driver-node", + "author": "James Coglan (http://jcoglan.com/)", + "keywords": [ + "websocket" + ], + "license": "Apache-2.0", + "version": "0.7.4", + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "lib" + ], + "main": "./lib/websocket/driver", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "devDependencies": { + "jstest": "*", + "permessage-deflate": "*" + }, + "scripts": { + "test": "jstest spec/runner.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/faye/websocket-driver-node.git" + }, + "bugs": "https://github.com/faye/websocket-driver-node/issues" +} diff --git a/node_modules/websocket-extensions/CHANGELOG.md b/node_modules/websocket-extensions/CHANGELOG.md new file mode 100644 index 0000000..bb84f5a --- /dev/null +++ b/node_modules/websocket-extensions/CHANGELOG.md @@ -0,0 +1,28 @@ +### 0.1.4 / 2020-06-02 + +- Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by + Robert McLaughlin) +- Change license from MIT to Apache 2.0 + +### 0.1.3 / 2017-11-11 + +- Accept extension names and parameters including uppercase letters +- Handle extension names that clash with `Object.prototype` properties + +### 0.1.2 / 2017-09-10 + +- Catch synchronous exceptions thrown when calling an extension +- Fix race condition caused when a message is pushed after a cell has stopped + due to an error +- Fix failure of `close()` to return if a message that's queued after one that + produces an error never finishes being processed + +### 0.1.1 / 2015-02-19 + +- Prevent sessions being closed before they have finished processing messages +- Add a callback to `Extensions.close()` so the caller can tell when it's safe + to close the socket + +### 0.1.0 / 2014-12-12 + +- Initial release diff --git a/node_modules/websocket-extensions/LICENSE.md b/node_modules/websocket-extensions/LICENSE.md new file mode 100644 index 0000000..3a88e51 --- /dev/null +++ b/node_modules/websocket-extensions/LICENSE.md @@ -0,0 +1,12 @@ +Copyright 2014-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/node_modules/websocket-extensions/README.md b/node_modules/websocket-extensions/README.md new file mode 100644 index 0000000..68694ea --- /dev/null +++ b/node_modules/websocket-extensions/README.md @@ -0,0 +1,331 @@ +# websocket-extensions [![Build status](https://secure.travis-ci.org/faye/websocket-extensions-node.svg)](http://travis-ci.org/faye/websocket-extensions-node) + +A minimal framework that supports the implementation of WebSocket extensions in +a way that's decoupled from the main protocol. This library aims to allow a +WebSocket extension to be written and used with any protocol library, by +defining abstract representations of frames and messages that allow modules to +co-operate. + +`websocket-extensions` provides a container for registering extension plugins, +and provides all the functions required to negotiate which extensions to use +during a session via the `Sec-WebSocket-Extensions` header. By implementing the +APIs defined in this document, an extension may be used by any WebSocket library +based on this framework. + +## Installation + +``` +$ npm install websocket-extensions +``` + +## Usage + +There are two main audiences for this library: authors implementing the +WebSocket protocol, and authors implementing extensions. End users of a +WebSocket library or an extension should be able to use any extension by passing +it as an argument to their chosen protocol library, without needing to know how +either of them work, or how the `websocket-extensions` framework operates. + +The library is designed with the aim that any protocol implementation and any +extension can be used together, so long as they support the same abstract +representation of frames and messages. + +### Data types + +The APIs provided by the framework rely on two data types; extensions will +expect to be given data and to be able to return data in these formats: + +#### *Frame* + +*Frame* is a structure representing a single WebSocket frame of any type. Frames +are simple objects that must have at least the following properties, which +represent the data encoded in the frame: + +| property | description | +| ------------ | ------------------------------------------------------------------ | +| `final` | `true` if the `FIN` bit is set, `false` otherwise | +| `rsv1` | `true` if the `RSV1` bit is set, `false` otherwise | +| `rsv2` | `true` if the `RSV2` bit is set, `false` otherwise | +| `rsv3` | `true` if the `RSV3` bit is set, `false` otherwise | +| `opcode` | the numeric opcode (`0`, `1`, `2`, `8`, `9`, or `10`) of the frame | +| `masked` | `true` if the `MASK` bit is set, `false` otherwise | +| `maskingKey` | a 4-byte `Buffer` if `masked` is `true`, otherwise `null` | +| `payload` | a `Buffer` containing the (unmasked) application data | + +#### *Message* + +A *Message* represents a complete application message, which can be formed from +text, binary and continuation frames. It has the following properties: + +| property | description | +| -------- | ----------------------------------------------------------------- | +| `rsv1` | `true` if the first frame of the message has the `RSV1` bit set | +| `rsv2` | `true` if the first frame of the message has the `RSV2` bit set | +| `rsv3` | `true` if the first frame of the message has the `RSV3` bit set | +| `opcode` | the numeric opcode (`1` or `2`) of the first frame of the message | +| `data` | the concatenation of all the frame payloads in the message | + +### For driver authors + +A driver author is someone implementing the WebSocket protocol proper, and who +wishes end users to be able to use WebSocket extensions with their library. + +At the start of a WebSocket session, on both the client and the server side, +they should begin by creating an extension container and adding whichever +extensions they want to use. + +```js +var Extensions = require('websocket-extensions'), + deflate = require('permessage-deflate'); + +var exts = new Extensions(); +exts.add(deflate); +``` + +In the following examples, `exts` refers to this `Extensions` instance. + +#### Client sessions + +Clients will use the methods `generateOffer()` and `activate(header)`. + +As part of the handshake process, the client must send a +`Sec-WebSocket-Extensions` header to advertise that it supports the registered +extensions. This header should be generated using: + +```js +request.headers['sec-websocket-extensions'] = exts.generateOffer(); +``` + +This returns a string, for example `"permessage-deflate; +client_max_window_bits"`, that represents all the extensions the client is +offering to use, and their parameters. This string may contain multiple offers +for the same extension. + +When the client receives the handshake response from the server, it should pass +the incoming `Sec-WebSocket-Extensions` header in to `exts` to activate the +extensions the server has accepted: + +```js +exts.activate(response.headers['sec-websocket-extensions']); +``` + +If the server has sent any extension responses that the client does not +recognize, or are in conflict with one another for use of RSV bits, or that use +invalid parameters for the named extensions, then `exts.activate()` will +`throw`. In this event, the client driver should fail the connection with +closing code `1010`. + +#### Server sessions + +Servers will use the method `generateResponse(header)`. + +A server session needs to generate a `Sec-WebSocket-Extensions` header to send +in its handshake response: + +```js +var clientOffer = request.headers['sec-websocket-extensions'], + extResponse = exts.generateResponse(clientOffer); + +response.headers['sec-websocket-extensions'] = extResponse; +``` + +Calling `exts.generateResponse(header)` activates those extensions the client +has asked to use, if they are registered, asks each extension for a set of +response parameters, and returns a string containing the response parameters for +all accepted extensions. + +#### In both directions + +Both clients and servers will use the methods `validFrameRsv(frame)`, +`processIncomingMessage(message)` and `processOutgoingMessage(message)`. + +The WebSocket protocol requires that frames do not have any of the `RSV` bits +set unless there is an extension in use that allows otherwise. When processing +an incoming frame, sessions should pass a *Frame* object to: + +```js +exts.validFrameRsv(frame) +``` + +If this method returns `false`, the session should fail the WebSocket connection +with closing code `1002`. + +To pass incoming messages through the extension stack, a session should +construct a *Message* object according to the above datatype definitions, and +call: + +```js +exts.processIncomingMessage(message, function(error, msg) { + // hand the message off to the application +}); +``` + +If any extensions fail to process the message, then the callback will yield an +error and the session should fail the WebSocket connection with closing code +`1010`. If `error` is `null`, then `msg` should be passed on to the application. + +To pass outgoing messages through the extension stack, a session should +construct a *Message* as before, and call: + +```js +exts.processOutgoingMessage(message, function(error, msg) { + // write message to the transport +}); +``` + +If any extensions fail to process the message, then the callback will yield an +error and the session should fail the WebSocket connection with closing code +`1010`. If `error` is `null`, then `message` should be converted into frames +(with the message's `rsv1`, `rsv2`, `rsv3` and `opcode` set on the first frame) +and written to the transport. + +At the end of the WebSocket session (either when the protocol is explicitly +ended or the transport connection disconnects), the driver should call: + +```js +exts.close(function() {}) +``` + +The callback is invoked when all extensions have finished processing any +messages in the pipeline and it's safe to close the socket. + +### For extension authors + +An extension author is someone implementing an extension that transforms +WebSocket messages passing between the client and server. They would like to +implement their extension once and have it work with any protocol library. + +Extension authors will not install `websocket-extensions` or call it directly. +Instead, they should implement the following API to allow their extension to +plug into the `websocket-extensions` framework. + +An `Extension` is any object that has the following properties: + +| property | description | +| -------- | ---------------------------------------------------------------------------- | +| `name` | a string containing the name of the extension as used in negotiation headers | +| `type` | a string, must be `"permessage"` | +| `rsv1` | either `true` if the extension uses the RSV1 bit, `false` otherwise | +| `rsv2` | either `true` if the extension uses the RSV2 bit, `false` otherwise | +| `rsv3` | either `true` if the extension uses the RSV3 bit, `false` otherwise | + +It must also implement the following methods: + +```js +ext.createClientSession() +``` + +This returns a *ClientSession*, whose interface is defined below. + +```js +ext.createServerSession(offers) +``` + +This takes an array of offer params and returns a *ServerSession*, whose +interface is defined below. For example, if the client handshake contains the +offer header: + +``` +Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; server_max_window_bits=8, \ + permessage-deflate; server_max_window_bits=15 +``` + +then the `permessage-deflate` extension will receive the call: + +```js +ext.createServerSession([ + { server_no_context_takeover: true, server_max_window_bits: 8 }, + { server_max_window_bits: 15 } +]); +``` + +The extension must decide which set of parameters it wants to accept, if any, +and return a *ServerSession* if it wants to accept the parameters and `null` +otherwise. + +#### *ClientSession* + +A *ClientSession* is the type returned by `ext.createClientSession()`. It must +implement the following methods, as well as the *Session* API listed below. + +```js +clientSession.generateOffer() +// e.g. -> [ +// { server_no_context_takeover: true, server_max_window_bits: 8 }, +// { server_max_window_bits: 15 } +// ] +``` + +This must return a set of parameters to include in the client's +`Sec-WebSocket-Extensions` offer header. If the session wants to offer multiple +configurations, it can return an array of sets of parameters as shown above. + +```js +clientSession.activate(params) // -> true +``` + +This must take a single set of parameters from the server's handshake response +and use them to configure the client session. If the client accepts the given +parameters, then this method must return `true`. If it returns any other value, +the framework will interpret this as the client rejecting the response, and will +`throw`. + +#### *ServerSession* + +A *ServerSession* is the type returned by `ext.createServerSession(offers)`. It +must implement the following methods, as well as the *Session* API listed below. + +```js +serverSession.generateResponse() +// e.g. -> { server_max_window_bits: 8 } +``` + +This returns the set of parameters the server session wants to send in its +`Sec-WebSocket-Extensions` response header. Only one set of parameters is +returned to the client per extension. Server sessions that would confict on +their use of RSV bits are not activated. + +#### *Session* + +The *Session* API must be implemented by both client and server sessions. It +contains two methods, `processIncomingMessage(message)` and +`processOutgoingMessage(message)`. + +```js +session.processIncomingMessage(message, function(error, msg) { ... }) +``` + +The session must implement this method to take an incoming *Message* as defined +above, transform it in any way it needs, then return it via the callback. If +there is an error processing the message, this method should yield an error as +the first argument. + +```js +session.processOutgoingMessage(message, function(error, msg) { ... }) +``` + +The session must implement this method to take an outgoing *Message* as defined +above, transform it in any way it needs, then return it via the callback. If +there is an error processing the message, this method should yield an error as +the first argument. + +Note that both `processIncomingMessage()` and `processOutgoingMessage()` can +perform their logic asynchronously, are allowed to process multiple messages +concurrently, and are not required to complete working on messages in the same +order the messages arrive. `websocket-extensions` will reorder messages as your +extension emits them and will make sure every extension is given messages in the +order they arrive from the driver. This allows extensions to maintain state that +depends on the messages' wire order, for example keeping a DEFLATE compression +context between messages. + +```js +session.close() +``` + +The framework will call this method when the WebSocket session ends, allowing +the session to release any resources it's using. + +## Examples + +- Consumer: [websocket-driver](https://github.com/faye/websocket-driver-node) +- Provider: [permessage-deflate](https://github.com/faye/permessage-deflate-node) diff --git a/node_modules/websocket-extensions/lib/parser.js b/node_modules/websocket-extensions/lib/parser.js new file mode 100644 index 0000000..533767e --- /dev/null +++ b/node_modules/websocket-extensions/lib/parser.js @@ -0,0 +1,103 @@ +'use strict'; + +var TOKEN = /([!#\$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+)/, + NOTOKEN = /([^!#\$%&'\*\+\-\.\^_`\|~0-9A-Za-z])/g, + QUOTED = /"((?:\\[\x00-\x7f]|[^\x00-\x08\x0a-\x1f\x7f"\\])*)"/, + PARAM = new RegExp(TOKEN.source + '(?:=(?:' + TOKEN.source + '|' + QUOTED.source + '))?'), + EXT = new RegExp(TOKEN.source + '(?: *; *' + PARAM.source + ')*', 'g'), + EXT_LIST = new RegExp('^' + EXT.source + '(?: *, *' + EXT.source + ')*$'), + NUMBER = /^-?(0|[1-9][0-9]*)(\.[0-9]+)?$/; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var Parser = { + parseHeader: function(header) { + var offers = new Offers(); + if (header === '' || header === undefined) return offers; + + if (!EXT_LIST.test(header)) + throw new SyntaxError('Invalid Sec-WebSocket-Extensions header: ' + header); + + var values = header.match(EXT); + + values.forEach(function(value) { + var params = value.match(new RegExp(PARAM.source, 'g')), + name = params.shift(), + offer = {}; + + params.forEach(function(param) { + var args = param.match(PARAM), key = args[1], data; + + if (args[2] !== undefined) { + data = args[2]; + } else if (args[3] !== undefined) { + data = args[3].replace(/\\/g, ''); + } else { + data = true; + } + if (NUMBER.test(data)) data = parseFloat(data); + + if (hasOwnProperty.call(offer, key)) { + offer[key] = [].concat(offer[key]); + offer[key].push(data); + } else { + offer[key] = data; + } + }, this); + offers.push(name, offer); + }, this); + + return offers; + }, + + serializeParams: function(name, params) { + var values = []; + + var print = function(key, value) { + if (value instanceof Array) { + value.forEach(function(v) { print(key, v) }); + } else if (value === true) { + values.push(key); + } else if (typeof value === 'number') { + values.push(key + '=' + value); + } else if (NOTOKEN.test(value)) { + values.push(key + '="' + value.replace(/"/g, '\\"') + '"'); + } else { + values.push(key + '=' + value); + } + }; + + for (var key in params) print(key, params[key]); + + return [name].concat(values).join('; '); + } +}; + +var Offers = function() { + this._byName = {}; + this._inOrder = []; +}; + +Offers.prototype.push = function(name, params) { + if (!hasOwnProperty.call(this._byName, name)) + this._byName[name] = []; + + this._byName[name].push(params); + this._inOrder.push({ name: name, params: params }); +}; + +Offers.prototype.eachOffer = function(callback, context) { + var list = this._inOrder; + for (var i = 0, n = list.length; i < n; i++) + callback.call(context, list[i].name, list[i].params); +}; + +Offers.prototype.byName = function(name) { + return this._byName[name] || []; +}; + +Offers.prototype.toArray = function() { + return this._inOrder.slice(); +}; + +module.exports = Parser; diff --git a/node_modules/websocket-extensions/lib/pipeline/README.md b/node_modules/websocket-extensions/lib/pipeline/README.md new file mode 100644 index 0000000..322a9c5 --- /dev/null +++ b/node_modules/websocket-extensions/lib/pipeline/README.md @@ -0,0 +1,607 @@ +# Extension pipelining + +`websocket-extensions` models the extension negotiation and processing pipeline +of the WebSocket protocol. Between the driver parsing messages from the TCP +stream and handing those messages off to the application, there may exist a +stack of extensions that transform the message somehow. + +In the parlance of this framework, a *session* refers to a single instance of an +extension, acting on a particular socket on either the server or the client +side. A session may transform messages both incoming to the application and +outgoing from the application, for example the `permessage-deflate` extension +compresses outgoing messages and decompresses incoming messages. Message streams +in either direction are independent; that is, incoming and outgoing messages +cannot be assumed to 'pair up' as in a request-response protocol. + +Asynchronous processing of messages poses a number of problems that this +pipeline construction is intended to solve. + + +## Overview + +Logically, we have the following: + + + +-------------+ out +---+ +---+ +---+ +--------+ + | |------>| |---->| |---->| |------>| | + | Application | | A | | B | | C | | Driver | + | |<------| |<----| |<----| |<------| | + +-------------+ in +---+ +---+ +---+ +--------+ + + \ / + +----------o----------+ + | + sessions + + +For outgoing messages, the driver receives the result of + + C.outgoing(B.outgoing(A.outgoing(message))) + + or, [A, B, C].reduce(((m, ext) => ext.outgoing(m)), message) + +For incoming messages, the application receives the result of + + A.incoming(B.incoming(C.incoming(message))) + + or, [C, B, A].reduce(((m, ext) => ext.incoming(m)), message) + +A session is of the following type, to borrow notation from pseudo-Haskell: + + type Session = { + incoming :: Message -> Message + outgoing :: Message -> Message + close :: () -> () + } + +(That `() -> ()` syntax is intended to mean that `close()` is a nullary void +method; I apologise to any Haskell readers for not using the right monad.) + +The `incoming()` and `outgoing()` methods perform message transformation in the +respective directions; `close()` is called when a socket closes so the session +can release any resources it's holding, for example a DEFLATE de/compression +context. + +However because this is JavaScript, the `incoming()` and `outgoing()` methods +may be asynchronous (indeed, `permessage-deflate` is based on `zlib`, whose API +is stream-based). So their interface is strictly: + + type Session = { + incoming :: Message -> Callback -> () + outgoing :: Message -> Callback -> () + close :: () -> () + } + + type Callback = Either Error Message -> () + +This means a message *m2* can be pushed into a session while it's still +processing the preceding message *m1*. The messages can be processed +concurrently but they *must* be given to the next session in line (or to the +application) in the same order they came in. Applications will expect to receive +messages in the order they arrived over the wire, and sessions require this too. +So ordering of messages must be preserved throughout the pipeline. + +Consider the following highly simplified extension that deflates messages on the +wire. `message` is a value conforming the type: + + type Message = { + rsv1 :: Boolean + rsv2 :: Boolean + rsv3 :: Boolean + opcode :: Number + data :: Buffer + } + +Here's the extension: + +```js +var zlib = require('zlib'); + +var deflate = { + outgoing: function(message, callback) { + zlib.deflateRaw(message.data, function(error, result) { + message.rsv1 = true; + message.data = result; + callback(error, message); + }); + }, + + incoming: function(message, callback) { + // decompress inbound messages (elided) + }, + + close: function() { + // no state to clean up + } +}; +``` + +We can call it with a large message followed by a small one, and the small one +will be returned first: + +```js +var crypto = require('crypto'), + large = crypto.randomBytes(1 << 14), + small = new Buffer('hi'); + +deflate.outgoing({ data: large }, function() { + console.log(1, 'large'); +}); + +deflate.outgoing({ data: small }, function() { + console.log(2, 'small'); +}); + +/* prints: 2 'small' + 1 'large' */ +``` + +So a session that processes messages asynchronously may fail to preserve message +ordering. + +Now, this extension is stateless, so it can process messages in any order and +still produce the same output. But some extensions are stateful and require +message order to be preserved. + +For example, when using `permessage-deflate` without `no_context_takeover` set, +the session retains a DEFLATE de/compression context between messages, which +accumulates state as it consumes data (later messages can refer to sections of +previous ones to improve compression). Reordering parts of the DEFLATE stream +will result in a failed decompression. Messages must be decompressed in the same +order they were compressed by the peer in order for the DEFLATE protocol to +work. + +Finally, there is the problem of closing a socket. When a WebSocket is closed by +the application, or receives a closing request from the other peer, there may be +messages outgoing from the application and incoming from the peer in the +pipeline. If we close the socket and pipeline immediately, two problems arise: + +* We may send our own closing frame to the peer before all prior messages we + sent have been written to the socket, and before we have finished processing + all prior messages from the peer +* The session may be instructed to close its resources (e.g. its de/compression + context) while it's in the middle of processing a message, or before it has + received messages that are upstream of it in the pipeline + +Essentially, we must defer closing the sessions and sending a closing frame +until after all prior messages have exited the pipeline. + + +## Design goals + +* Message order must be preserved between the protocol driver, the extension + sessions, and the application +* Messages should be handed off to sessions and endpoints as soon as possible, + to maximise throughput of stateless sessions +* The closing procedure should block any further messages from entering the + pipeline, and should allow all existing messages to drain +* Sessions should be closed as soon as possible to prevent them holding memory + and other resources when they have no more messages to handle +* The closing API should allow the caller to detect when the pipeline is empty + and it is safe to continue the WebSocket closing procedure +* Individual extensions should remain as simple as possible to facilitate + modularity and independent authorship + +The final point about modularity is an important one: this framework is designed +to facilitate extensions existing as plugins, by decoupling the protocol driver, +extensions, and application. In an ideal world, plugins should only need to +contain code for their specific functionality, and not solve these problems that +apply to all sessions. Also, solving some of these problems requires +consideration of all active sessions collectively, which an individual session +is incapable of doing. + +For example, it is entirely possible to take the simple `deflate` extension +above and wrap its `incoming()` and `outgoing()` methods in two `Transform` +streams, producing this type: + + type Session = { + incoming :: TransformStream + outtoing :: TransformStream + close :: () -> () + } + +The `Transform` class makes it easy to wrap an async function such that message +order is preserved: + +```js +var stream = require('stream'), + session = new stream.Transform({ objectMode: true }); + +session._transform = function(message, _, callback) { + var self = this; + deflate.outgoing(message, function(error, result) { + self.push(result); + callback(); + }); +}; +``` + +However, this has a negative impact on throughput: it works by deferring +`callback()` until the async function has 'returned', which blocks `Transform` +from passing further input into the `_transform()` method until the current +message is dealt with completely. This would prevent sessions from processing +messages concurrently, and would unnecessarily reduce the throughput of +stateless extensions. + +So, input should be handed off to sessions as soon as possible, and all we need +is a mechanism to reorder the output so that message order is preserved for the +next session in line. + + +## Solution + +We now describe the model implemented here and how it meets the above design +goals. The above diagram where a stack of extensions sit between the driver and +application describes the data flow, but not the object graph. That looks like +this: + + + +--------+ + | Driver | + +---o----+ + | + V + +------------+ +----------+ + | Extensions o----->| Pipeline | + +------------+ +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + + +A driver using this framework holds an instance of the `Extensions` class, which +it uses to register extension plugins, negotiate headers and transform messages. +The `Extensions` instance itself holds a `Pipeline`, which contains an array of +`Cell` objects, each of which wraps one of the sessions. + + +### Message processing + +Both the `Pipeline` and `Cell` classes have `incoming()` and `outgoing()` +methods; the `Pipeline` interface pushes messages into the pipe, delegates the +message to each `Cell` in turn, then returns it back to the driver. Outgoing +messages pass through `A` then `B` then `C`, and incoming messages in the +reverse order. + +Internally, a `Cell` contains two `Functor` objects. A `Functor` wraps an async +function and makes sure its output messages maintain the order of its input +messages. This name is due to [@fronx](https://github.com/fronx), on the basis +that, by preserving message order, the abstraction preserves the *mapping* +between input and output messages. To use our simple `deflate` extension from +above: + +```js +var functor = new Functor(deflate, 'outgoing'); + +functor.call({ data: large }, function() { + console.log(1, 'large'); +}); + +functor.call({ data: small }, function() { + console.log(2, 'small'); +}); + +/* -> 1 'large' + 2 'small' */ +``` + +A `Cell` contains two of these, one for each direction: + + + +-----------------------+ + +---->| Functor [A, incoming] | + +----------+ | +-----------------------+ + | Cell [A] o------+ + +----------+ | +-----------------------+ + +---->| Functor [A, outgoing] | + +-----------------------+ + + +This satisfies the message transformation requirements: the `Pipeline` simply +loops over the cells in the appropriate direction to transform each message. +Because each `Cell` will preserve message order, we can pass a message to the +next `Cell` in line as soon as the current `Cell` returns it. This gives each +`Cell` all the messages in order while maximising throughput. + + +### Session closing + +We want to close each session as soon as possible, after all existing messages +have drained. To do this, each `Cell` begins with a pending message counter in +each direction, labelled `in` and `out` below. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 0 + + +When a message *m1* enters the pipeline, say in the `outgoing` direction, we +increment the `pending.out` counter on all cells immediately. + + + +----------+ + m1 => | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 1 out: 1 out: 1 + + +*m1* is handed off to `A`, meanwhile a second message `m2` arrives in the same +direction. All `pending.out` counters are again incremented. + + + +----------+ + m2 => | Pipeline | + +-----o----+ + | + +---------------+---------------+ + m1 | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 2 out: 2 out: 2 + + +When the first cell's `A.outgoing` functor finishes processing *m1*, the first +`pending.out` counter is decremented and *m1* is handed off to cell `B`. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + m2 | m1 | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 1 out: 2 out: 2 + + + +As `B` finishes with *m1*, and as `A` finishes with *m2*, the `pending.out` +counters continue to decrement. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | m2 | m1 | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 1 out: 2 + + + +Say `C` is a little slow, and begins processing *m2* while still processing +*m1*. That's fine, the `Functor` mechanism will keep *m1* ahead of *m2* in the +output. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | m2 | m1 + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 2 + + +Once all messages are dealt with, the counters return to `0`. + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 0 + + +The same process applies in the `incoming` direction, the only difference being +that messages are passed to `C` first. + +This makes closing the sessions quite simple. When the driver wants to close the +socket, it calls `Pipeline.close()`. This *immediately* calls `close()` on all +the cells. If a cell has `in == out == 0`, then it immediately calls +`session.close()`. Otherwise, it stores the closing call and defers it until +`in` and `out` have both ticked down to zero. The pipeline will not accept new +messages after `close()` has been called, so we know the pending counts will not +increase after this point. + +This means each session is closed as soon as possible: `A` can close while the +slow `C` session is still working, because it knows there are no more messages +on the way. Similarly, `C` will defer closing if `close()` is called while *m1* +is still in `B`, and *m2* in `A`, because its pending count means it knows it +has work yet to do, even if it's not received those messages yet. This concern +cannot be addressed by extensions acting only on their own local state, unless +we pollute individual extensions by making them all implement this same +mechanism. + +The actual closing API at each level is slightly different: + + type Session = { + close :: () -> () + } + + type Cell = { + close :: () -> Promise () + } + + type Pipeline = { + close :: Callback -> () + } + +This might appear inconsistent so it's worth explaining. Remember that a +`Pipeline` holds a list of `Cell` objects, each wrapping a `Session`. The driver +talks (via the `Extensions` API) to the `Pipeline` interface, and it wants +`Pipeline.close()` to do two things: close all the sessions, and tell me when +it's safe to start the closing procedure (i.e. when all messages have drained +from the pipe and been handed off to the application or socket). A callback API +works well for that. + +At the other end of the stack, `Session.close()` is a nullary void method with +no callback or promise API because we don't care what it does, and whatever it +does do will not block the WebSocket protocol; we're not going to hold off +processing messages while a session closes its de/compression context. We just +tell it to close itself, and don't want to wait while it does that. + +In the middle, `Cell.close()` returns a promise rather than using a callback. +This is for two reasons. First, `Cell.close()` might not do anything +immediately, it might have to defer its effect while messages drain. So, if +given a callback, it would have to store it in a queue for later execution. +Callbacks work fine if your method does something and can then invoke the +callback itself, but if you need to store callbacks somewhere so another method +can execute them, a promise is a better fit. Second, it better serves the +purposes of `Pipeline.close()`: it wants to call `close()` on each of a list of +cells, and wait for all of them to finish. This is simple and idiomatic using +promises: + +```js +var closed = cells.map((cell) => cell.close()); +Promise.all(closed).then(callback); +``` + +(We don't actually use a full *Promises/A+* compatible promise here, we use a +much simplified construction that acts as a callback aggregater and resolves +synchronously and does not support chaining, but the principle is the same.) + + +### Error handling + +We've not mentioned error handling so far but it bears some explanation. The +above counter system still applies, but behaves slightly differently in the +presence of errors. + +Say we push three messages into the pipe in the outgoing direction: + + + +----------+ + m3, m2, m1 => | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 3 out: 3 out: 3 + + +They pass through the cells successfully up to this point: + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + m3 | m2 | m1 | + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 1 out: 2 out: 3 + + +At this point, session `B` produces an error while processing *m2*, that is *m2* +becomes *e2*. *m1* is still in the pipeline, and *m3* is queued behind *m2*. +What ought to happen is that *m1* is handed off to the socket, then *m2* is +released to the driver, which will detect the error and begin closing the +socket. No further processing should be done on *m3* and it should not be +released to the driver after the error is emitted. + +To handle this, we allow errors to pass down the pipeline just like messages do, +to maintain ordering. But, once a cell sees its session produce an error, or it +receives an error from upstream, it should refuse to accept any further +messages. Session `B` might have begun processing *m3* by the time it produces +the error *e2*, but `C` will have been given *e2* before it receives *m3*, and +can simply drop *m3*. + +Now, say *e2* reaches the slow session `C` while *m1* is still present, +meanwhile *m3* has been dropped. `C` will never receive *m3* since it will have +been dropped upstream. Under the present model, its `out` counter will be `3` +but it is only going to emit two more values: *m1* and *e2*. In order for +closing to work, we need to decrement `out` to reflect this. The situation +should look like this: + + + +----------+ + | Pipeline | + +-----o----+ + | + +---------------+---------------+ + | | e2 | m1 + +-----o----+ +-----o----+ +-----o----+ + | Cell [A] | | Cell [B] | | Cell [C] | + +----------+ +----------+ +----------+ + in: 0 in: 0 in: 0 + out: 0 out: 0 out: 2 + + +When a cell sees its session emit an error, or when it receives an error from +upstream, it sets its pending count in the appropriate direction to equal the +number of messages it is *currently* processing. It will not accept any messages +after it sees the error, so this will allow the counter to reach zero. + +Note that while *e2* is in the pipeline, `Pipeline` should drop any further +messages in the outgoing direction, but should continue to accept incoming +messages. Until *e2* makes it out of the pipe to the driver, behind previous +successful messages, the driver does not know an error has happened, and a +message may arrive over the socket and make it all the way through the incoming +pipe in the meantime. We only halt processing in the affected direction to avoid +doing unnecessary work since messages arriving after an error should not be +processed. + +Some unnecessary work may happen, for example any messages already in the +pipeline following *m2* will be processed by `A`, since it's upstream of the +error. Those messages will be dropped by `B`. + + +## Alternative ideas + +I am considering implementing `Functor` as an object-mode transform stream +rather than what is essentially an async function. Being object-mode, a stream +would preserve message boundaries and would also possibly help address +back-pressure. I'm not sure whether this would require external API changes so +that such streams could be connected to the downstream driver's streams. + + +## Acknowledgements + +Credit is due to [@mnowster](https://github.com/mnowster) for helping with the +design and to [@fronx](https://github.com/fronx) for helping name things. diff --git a/node_modules/websocket-extensions/lib/pipeline/cell.js b/node_modules/websocket-extensions/lib/pipeline/cell.js new file mode 100644 index 0000000..b2901ba --- /dev/null +++ b/node_modules/websocket-extensions/lib/pipeline/cell.js @@ -0,0 +1,53 @@ +'use strict'; + +var Functor = require('./functor'), + Pledge = require('./pledge'); + +var Cell = function(tuple) { + this._ext = tuple[0]; + this._session = tuple[1]; + + this._functors = { + incoming: new Functor(this._session, 'processIncomingMessage'), + outgoing: new Functor(this._session, 'processOutgoingMessage') + }; +}; + +Cell.prototype.pending = function(direction) { + var functor = this._functors[direction]; + if (!functor._stopped) functor.pending += 1; +}; + +Cell.prototype.incoming = function(error, message, callback, context) { + this._exec('incoming', error, message, callback, context); +}; + +Cell.prototype.outgoing = function(error, message, callback, context) { + this._exec('outgoing', error, message, callback, context); +}; + +Cell.prototype.close = function() { + this._closed = this._closed || new Pledge(); + this._doClose(); + return this._closed; +}; + +Cell.prototype._exec = function(direction, error, message, callback, context) { + this._functors[direction].call(error, message, function(err, msg) { + if (err) err.message = this._ext.name + ': ' + err.message; + callback.call(context, err, msg); + this._doClose(); + }, this); +}; + +Cell.prototype._doClose = function() { + var fin = this._functors.incoming, + fout = this._functors.outgoing; + + if (!this._closed || fin.pending + fout.pending !== 0) return; + if (this._session) this._session.close(); + this._session = null; + this._closed.done(); +}; + +module.exports = Cell; diff --git a/node_modules/websocket-extensions/lib/pipeline/functor.js b/node_modules/websocket-extensions/lib/pipeline/functor.js new file mode 100644 index 0000000..fadb49a --- /dev/null +++ b/node_modules/websocket-extensions/lib/pipeline/functor.js @@ -0,0 +1,72 @@ +'use strict'; + +var RingBuffer = require('./ring_buffer'); + +var Functor = function(session, method) { + this._session = session; + this._method = method; + this._queue = new RingBuffer(Functor.QUEUE_SIZE); + this._stopped = false; + this.pending = 0; +}; + +Functor.QUEUE_SIZE = 8; + +Functor.prototype.call = function(error, message, callback, context) { + if (this._stopped) return; + + var record = { error: error, message: message, callback: callback, context: context, done: false }, + called = false, + self = this; + + this._queue.push(record); + + if (record.error) { + record.done = true; + this._stop(); + return this._flushQueue(); + } + + var handler = function(err, msg) { + if (!(called ^ (called = true))) return; + + if (err) { + self._stop(); + record.error = err; + record.message = null; + } else { + record.message = msg; + } + + record.done = true; + self._flushQueue(); + }; + + try { + this._session[this._method](message, handler); + } catch (err) { + handler(err); + } +}; + +Functor.prototype._stop = function() { + this.pending = this._queue.length; + this._stopped = true; +}; + +Functor.prototype._flushQueue = function() { + var queue = this._queue, record; + + while (queue.length > 0 && queue.peek().done) { + record = queue.shift(); + if (record.error) { + this.pending = 0; + queue.clear(); + } else { + this.pending -= 1; + } + record.callback.call(record.context, record.error, record.message); + } +}; + +module.exports = Functor; diff --git a/node_modules/websocket-extensions/lib/pipeline/index.js b/node_modules/websocket-extensions/lib/pipeline/index.js new file mode 100644 index 0000000..930bbc8 --- /dev/null +++ b/node_modules/websocket-extensions/lib/pipeline/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var Cell = require('./cell'), + Pledge = require('./pledge'); + +var Pipeline = function(sessions) { + this._cells = sessions.map(function(session) { return new Cell(session) }); + this._stopped = { incoming: false, outgoing: false }; +}; + +Pipeline.prototype.processIncomingMessage = function(message, callback, context) { + if (this._stopped.incoming) return; + this._loop('incoming', this._cells.length - 1, -1, -1, message, callback, context); +}; + +Pipeline.prototype.processOutgoingMessage = function(message, callback, context) { + if (this._stopped.outgoing) return; + this._loop('outgoing', 0, this._cells.length, 1, message, callback, context); +}; + +Pipeline.prototype.close = function(callback, context) { + this._stopped = { incoming: true, outgoing: true }; + + var closed = this._cells.map(function(a) { return a.close() }); + if (callback) + Pledge.all(closed).then(function() { callback.call(context) }); +}; + +Pipeline.prototype._loop = function(direction, start, end, step, message, callback, context) { + var cells = this._cells, + n = cells.length, + self = this; + + while (n--) cells[n].pending(direction); + + var pipe = function(index, error, msg) { + if (index === end) return callback.call(context, error, msg); + + cells[index][direction](error, msg, function(err, m) { + if (err) self._stopped[direction] = true; + pipe(index + step, err, m); + }); + }; + pipe(start, null, message); +}; + +module.exports = Pipeline; diff --git a/node_modules/websocket-extensions/lib/pipeline/pledge.js b/node_modules/websocket-extensions/lib/pipeline/pledge.js new file mode 100644 index 0000000..8a1f45d --- /dev/null +++ b/node_modules/websocket-extensions/lib/pipeline/pledge.js @@ -0,0 +1,37 @@ +'use strict'; + +var RingBuffer = require('./ring_buffer'); + +var Pledge = function() { + this._complete = false; + this._callbacks = new RingBuffer(Pledge.QUEUE_SIZE); +}; + +Pledge.QUEUE_SIZE = 4; + +Pledge.all = function(list) { + var pledge = new Pledge(), + pending = list.length, + n = pending; + + if (pending === 0) pledge.done(); + + while (n--) list[n].then(function() { + pending -= 1; + if (pending === 0) pledge.done(); + }); + return pledge; +}; + +Pledge.prototype.then = function(callback) { + if (this._complete) callback(); + else this._callbacks.push(callback); +}; + +Pledge.prototype.done = function() { + this._complete = true; + var callbacks = this._callbacks, callback; + while (callback = callbacks.shift()) callback(); +}; + +module.exports = Pledge; diff --git a/node_modules/websocket-extensions/lib/pipeline/ring_buffer.js b/node_modules/websocket-extensions/lib/pipeline/ring_buffer.js new file mode 100644 index 0000000..676ff94 --- /dev/null +++ b/node_modules/websocket-extensions/lib/pipeline/ring_buffer.js @@ -0,0 +1,66 @@ +'use strict'; + +var RingBuffer = function(bufferSize) { + this._bufferSize = bufferSize; + this.clear(); +}; + +RingBuffer.prototype.clear = function() { + this._buffer = new Array(this._bufferSize); + this._ringOffset = 0; + this._ringSize = this._bufferSize; + this._head = 0; + this._tail = 0; + this.length = 0; +}; + +RingBuffer.prototype.push = function(value) { + var expandBuffer = false, + expandRing = false; + + if (this._ringSize < this._bufferSize) { + expandBuffer = (this._tail === 0); + } else if (this._ringOffset === this._ringSize) { + expandBuffer = true; + expandRing = (this._tail === 0); + } + + if (expandBuffer) { + this._tail = this._bufferSize; + this._buffer = this._buffer.concat(new Array(this._bufferSize)); + this._bufferSize = this._buffer.length; + + if (expandRing) + this._ringSize = this._bufferSize; + } + + this._buffer[this._tail] = value; + this.length += 1; + if (this._tail < this._ringSize) this._ringOffset += 1; + this._tail = (this._tail + 1) % this._bufferSize; +}; + +RingBuffer.prototype.peek = function() { + if (this.length === 0) return void 0; + return this._buffer[this._head]; +}; + +RingBuffer.prototype.shift = function() { + if (this.length === 0) return void 0; + + var value = this._buffer[this._head]; + this._buffer[this._head] = void 0; + this.length -= 1; + this._ringOffset -= 1; + + if (this._ringOffset === 0 && this.length > 0) { + this._head = this._ringSize; + this._ringOffset = this.length; + this._ringSize = this._bufferSize; + } else { + this._head = (this._head + 1) % this._ringSize; + } + return value; +}; + +module.exports = RingBuffer; diff --git a/node_modules/websocket-extensions/lib/websocket_extensions.js b/node_modules/websocket-extensions/lib/websocket_extensions.js new file mode 100644 index 0000000..48adad8 --- /dev/null +++ b/node_modules/websocket-extensions/lib/websocket_extensions.js @@ -0,0 +1,162 @@ +'use strict'; + +var Parser = require('./parser'), + Pipeline = require('./pipeline'); + +var Extensions = function() { + this._rsv1 = this._rsv2 = this._rsv3 = null; + + this._byName = {}; + this._inOrder = []; + this._sessions = []; + this._index = {}; +}; + +Extensions.MESSAGE_OPCODES = [1, 2]; + +var instance = { + add: function(ext) { + if (typeof ext.name !== 'string') throw new TypeError('extension.name must be a string'); + if (ext.type !== 'permessage') throw new TypeError('extension.type must be "permessage"'); + + if (typeof ext.rsv1 !== 'boolean') throw new TypeError('extension.rsv1 must be true or false'); + if (typeof ext.rsv2 !== 'boolean') throw new TypeError('extension.rsv2 must be true or false'); + if (typeof ext.rsv3 !== 'boolean') throw new TypeError('extension.rsv3 must be true or false'); + + if (this._byName.hasOwnProperty(ext.name)) + throw new TypeError('An extension with name "' + ext.name + '" is already registered'); + + this._byName[ext.name] = ext; + this._inOrder.push(ext); + }, + + generateOffer: function() { + var sessions = [], + offer = [], + index = {}; + + this._inOrder.forEach(function(ext) { + var session = ext.createClientSession(); + if (!session) return; + + var record = [ext, session]; + sessions.push(record); + index[ext.name] = record; + + var offers = session.generateOffer(); + offers = offers ? [].concat(offers) : []; + + offers.forEach(function(off) { + offer.push(Parser.serializeParams(ext.name, off)); + }, this); + }, this); + + this._sessions = sessions; + this._index = index; + + return offer.length > 0 ? offer.join(', ') : null; + }, + + activate: function(header) { + var responses = Parser.parseHeader(header), + sessions = []; + + responses.eachOffer(function(name, params) { + var record = this._index[name]; + + if (!record) + throw new Error('Server sent an extension response for unknown extension "' + name + '"'); + + var ext = record[0], + session = record[1], + reserved = this._reserved(ext); + + if (reserved) + throw new Error('Server sent two extension responses that use the RSV' + + reserved[0] + ' bit: "' + + reserved[1] + '" and "' + ext.name + '"'); + + if (session.activate(params) !== true) + throw new Error('Server sent unacceptable extension parameters: ' + + Parser.serializeParams(name, params)); + + this._reserve(ext); + sessions.push(record); + }, this); + + this._sessions = sessions; + this._pipeline = new Pipeline(sessions); + }, + + generateResponse: function(header) { + var sessions = [], + response = [], + offers = Parser.parseHeader(header); + + this._inOrder.forEach(function(ext) { + var offer = offers.byName(ext.name); + if (offer.length === 0 || this._reserved(ext)) return; + + var session = ext.createServerSession(offer); + if (!session) return; + + this._reserve(ext); + sessions.push([ext, session]); + response.push(Parser.serializeParams(ext.name, session.generateResponse())); + }, this); + + this._sessions = sessions; + this._pipeline = new Pipeline(sessions); + + return response.length > 0 ? response.join(', ') : null; + }, + + validFrameRsv: function(frame) { + var allowed = { rsv1: false, rsv2: false, rsv3: false }, + ext; + + if (Extensions.MESSAGE_OPCODES.indexOf(frame.opcode) >= 0) { + for (var i = 0, n = this._sessions.length; i < n; i++) { + ext = this._sessions[i][0]; + allowed.rsv1 = allowed.rsv1 || ext.rsv1; + allowed.rsv2 = allowed.rsv2 || ext.rsv2; + allowed.rsv3 = allowed.rsv3 || ext.rsv3; + } + } + + return (allowed.rsv1 || !frame.rsv1) && + (allowed.rsv2 || !frame.rsv2) && + (allowed.rsv3 || !frame.rsv3); + }, + + processIncomingMessage: function(message, callback, context) { + this._pipeline.processIncomingMessage(message, callback, context); + }, + + processOutgoingMessage: function(message, callback, context) { + this._pipeline.processOutgoingMessage(message, callback, context); + }, + + close: function(callback, context) { + if (!this._pipeline) return callback.call(context); + this._pipeline.close(callback, context); + }, + + _reserve: function(ext) { + this._rsv1 = this._rsv1 || (ext.rsv1 && ext.name); + this._rsv2 = this._rsv2 || (ext.rsv2 && ext.name); + this._rsv3 = this._rsv3 || (ext.rsv3 && ext.name); + }, + + _reserved: function(ext) { + if (this._rsv1 && ext.rsv1) return [1, this._rsv1]; + if (this._rsv2 && ext.rsv2) return [2, this._rsv2]; + if (this._rsv3 && ext.rsv3) return [3, this._rsv3]; + return false; + } +}; + +for (var key in instance) + Extensions.prototype[key] = instance[key]; + +module.exports = Extensions; diff --git a/node_modules/websocket-extensions/package.json b/node_modules/websocket-extensions/package.json new file mode 100644 index 0000000..e4f2f91 --- /dev/null +++ b/node_modules/websocket-extensions/package.json @@ -0,0 +1,29 @@ +{ + "name": "websocket-extensions", + "description": "Generic extension manager for WebSocket connections", + "homepage": "http://github.com/faye/websocket-extensions-node", + "author": "James Coglan (http://jcoglan.com/)", + "keywords": [ + "websocket" + ], + "license": "Apache-2.0", + "version": "0.1.4", + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "lib" + ], + "main": "./lib/websocket_extensions", + "devDependencies": { + "jstest": "*" + }, + "scripts": { + "test": "jstest spec/runner.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/faye/websocket-extensions-node.git" + }, + "bugs": "http://github.com/faye/websocket-extensions-node/issues" +} diff --git a/node_modules/which-boxed-primitive/.editorconfig b/node_modules/which-boxed-primitive/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/which-boxed-primitive/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/which-boxed-primitive/.eslintignore b/node_modules/which-boxed-primitive/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/which-boxed-primitive/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/which-boxed-primitive/.eslintrc b/node_modules/which-boxed-primitive/.eslintrc new file mode 100644 index 0000000..bfa96d1 --- /dev/null +++ b/node_modules/which-boxed-primitive/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 12], + }, +} diff --git a/node_modules/which-boxed-primitive/.github/FUNDING.yml b/node_modules/which-boxed-primitive/.github/FUNDING.yml new file mode 100644 index 0000000..0cdbbd8 --- /dev/null +++ b/node_modules/which-boxed-primitive/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/which-boxed-primitive +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/which-boxed-primitive/.nycrc b/node_modules/which-boxed-primitive/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/which-boxed-primitive/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/which-boxed-primitive/CHANGELOG.md b/node_modules/which-boxed-primitive/CHANGELOG.md new file mode 100644 index 0000000..23e5422 --- /dev/null +++ b/node_modules/which-boxed-primitive/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/which-boxed-primitive/compare/v1.0.1...v1.0.2) - 2020-12-14 + +### Commits + +- [Tests] use shared travis-ci configs [`8674582`](https://github.com/inspect-js/which-boxed-primitive/commit/86745829b6a92cff2cfb0d3c0414ec9afdc2a087) +- [Tests] migrate tests to Github Actions [`dff6643`](https://github.com/inspect-js/which-boxed-primitive/commit/dff6643405ba4d6dc6694a25904c8f72f273ece8) +- [meta] do not publish github action workflow files [`b26112a`](https://github.com/inspect-js/which-boxed-primitive/commit/b26112a4e4ac6beec8f54c734135dbf9e9ba16f9) +- [meta] make `auto-changelog` config consistent [`8d10175`](https://github.com/inspect-js/which-boxed-primitive/commit/8d10175171154cd6c8f8a016aa7fb71b5044acf6) +- [readme] fix repo URLs, remove defunct badges [`ab8db24`](https://github.com/inspect-js/which-boxed-primitive/commit/ab8db247573723dbcda68469118d08c7c2692c67) +- [Tests] run `nyc` on all tests; use `tape` runner [`7d084df`](https://github.com/inspect-js/which-boxed-primitive/commit/7d084dfc5251230e9399a81782c0b9d7ae5d1901) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`576f6f3`](https://github.com/inspect-js/which-boxed-primitive/commit/576f6f308aed35ef1d3392bb9472def59482ed13) +- [actions] add automatic rebasing / merge commit blocking [`97efa53`](https://github.com/inspect-js/which-boxed-primitive/commit/97efa53a307678323e63f576c07db9ff84846fd3) +- [actions] add "Allow Edits" workflow [`fb1b4f7`](https://github.com/inspect-js/which-boxed-primitive/commit/fb1b4f7cd753fcced74ac054b20c8b2bfafe7953) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`, `object-inspect`, `safe-publish-latest` [`1e03c61`](https://github.com/inspect-js/which-boxed-primitive/commit/1e03c6153693d385833acc15178f675e6ce5ddd0) +- [Deps] update `is-boolean-object`, `is-number-object`, `is-string`, `is-symbol` [`13673df`](https://github.com/inspect-js/which-boxed-primitive/commit/13673dff6e43f0a915377c3e5740ec24e86d6bb7) +- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`65a0e15`](https://github.com/inspect-js/which-boxed-primitive/commit/65a0e155fc46a9237692233a51ec9573621135d2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`f8a0afe`](https://github.com/inspect-js/which-boxed-primitive/commit/f8a0afea82938d64f3d2d240268afbd346d0c4da) +- [Deps] update `is-bigint`, `is-boolean-object` [`e7a1ce2`](https://github.com/inspect-js/which-boxed-primitive/commit/e7a1ce25371c00ee726f1c0cc5b6acf10d51ec50) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`e46f193`](https://github.com/inspect-js/which-boxed-primitive/commit/e46f193298b158db5c8aba889803513e4ee38957) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`df3da14`](https://github.com/inspect-js/which-boxed-primitive/commit/df3da1424552a5d22e203a0abf1710106bfd4ae2) +- [Dev Deps] update `auto-changelog`; add `aud` [`e2e8a12`](https://github.com/inspect-js/which-boxed-primitive/commit/e2e8a12c6fbf8c48e760ea1d1ccd5e8d2d6fbf24) +- [meta] add `funding` field [`7df404b`](https://github.com/inspect-js/which-boxed-primitive/commit/7df404b20cd50b2b87e6645b130fefa8ee98810e) +- [Dev Deps] update `auto-changelog` [`0d6b76d`](https://github.com/inspect-js/which-boxed-primitive/commit/0d6b76dbbe760581fa86a0c3f254988fe5d27770) +- [Tests] only audit prod deps [`246151c`](https://github.com/inspect-js/which-boxed-primitive/commit/246151cc1407b3b1ef42014db993f62670bd82ff) +- [meta] fix changelog [`c2d1685`](https://github.com/inspect-js/which-boxed-primitive/commit/c2d16856deffbf86e0b5029e69b65d8aa758ec3d) +- [readme] Fix spelling error [`25fb2b5`](https://github.com/inspect-js/which-boxed-primitive/commit/25fb2b56e1f708c6364923e4bae384f818ecf57f) + +## [v1.0.1](https://github.com/inspect-js/which-boxed-primitive/compare/v1.0.0...v1.0.1) - 2019-08-10 + +### Commits + +- [meta] avoid running `safe-publish-latest` when not publishing [`df44b27`](https://github.com/inspect-js/which-boxed-primitive/commit/df44b27875a8f5c3c596663ecb4a063f9fc7bde3) + +## v1.0.0 - 2019-08-10 + +### Commits + +- [Tests] add `.travis.yml` [`764b0cf`](https://github.com/inspect-js/which-boxed-primitive/commit/764b0cf75f8d2b3a0ad2056de5f4ad85d5d1b765) +- Initial commit [`da7d068`](https://github.com/inspect-js/which-boxed-primitive/commit/da7d068913d591294bf155db5d438f7804d71b9a) +- readme [`1395bb2`](https://github.com/inspect-js/which-boxed-primitive/commit/1395bb27b72137ac01e48ee398a0f54e93fd87f5) +- [Tests] add tests [`0ff580f`](https://github.com/inspect-js/which-boxed-primitive/commit/0ff580f99579cd4424af7b814bd76fcb69a2b04e) +- implementation [`8811c32`](https://github.com/inspect-js/which-boxed-primitive/commit/8811c3262a57963634cdc83ceb5bb2c5e9ae4e7e) +- npm init [`cffdea9`](https://github.com/inspect-js/which-boxed-primitive/commit/cffdea9755eabfa2f9ec62a6fcbce0c28f04495b) +- [Tests] add `npm run lint` [`a8be993`](https://github.com/inspect-js/which-boxed-primitive/commit/a8be9933fec1b21267acd847df77f6438e07e3b9) +- [meta] add FUNDING.yml [`941258c`](https://github.com/inspect-js/which-boxed-primitive/commit/941258c70c9a397466e05b614126cb8c7be77b99) +- Only apps should have lockfiles [`6857316`](https://github.com/inspect-js/which-boxed-primitive/commit/68573165d8ce842cdf15d94af82f8cccb961b8cf) +- [Tests] use `npx aud` in `posttest` [`ee48a91`](https://github.com/inspect-js/which-boxed-primitive/commit/ee48a9144bea23bde5cc47788a54d5aa7969d489) diff --git a/node_modules/which-boxed-primitive/LICENSE b/node_modules/which-boxed-primitive/LICENSE new file mode 100644 index 0000000..3900dd7 --- /dev/null +++ b/node_modules/which-boxed-primitive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/which-boxed-primitive/README.md b/node_modules/which-boxed-primitive/README.md new file mode 100644 index 0000000..e08f26a --- /dev/null +++ b/node_modules/which-boxed-primitive/README.md @@ -0,0 +1,73 @@ +# which-boxed-primitive [![Version Badge][2]][1] + +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Which kind of boxed JS primitive is this? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and works despite ES6 Symbol.toStringTag. + +## Example + +```js +var whichBoxedPrimitive = require('which-boxed-primitive'); +var assert = require('assert'); + +// unboxed primitives return `null` +// boxed primitives return the builtin constructor name + +assert.equal(whichBoxedPrimitive(undefined), null); +assert.equal(whichBoxedPrimitive(null), null); + +assert.equal(whichBoxedPrimitive(false), null); +assert.equal(whichBoxedPrimitive(true), null); +assert.equal(whichBoxedPrimitive(new Boolean(false)), 'Boolean'); +assert.equal(whichBoxedPrimitive(new Boolean(true)), 'Boolean'); + +assert.equal(whichBoxedPrimitive(42), null); +assert.equal(whichBoxedPrimitive(NaN), null); +assert.equal(whichBoxedPrimitive(Infinity), null); +assert.equal(whichBoxedPrimitive(new Number(42)), 'Number'); +assert.equal(whichBoxedPrimitive(new Number(NaN)), 'Number'); +assert.equal(whichBoxedPrimitive(new Number(Infinity)), 'Number'); + +assert.equal(whichBoxedPrimitive(''), null); +assert.equal(whichBoxedPrimitive('foo'), null); +assert.equal(whichBoxedPrimitive(new String('')), 'String'); +assert.equal(whichBoxedPrimitive(new String('foo')), 'String'); + +assert.equal(whichBoxedPrimitive(Symbol()), null); +assert.equal(whichBoxedPrimitive(Object(Symbol()), 'Symbol'); + +assert.equal(whichBoxedPrimitive(42n), null); +assert.equal(whichBoxedPrimitive(Object(42n), 'BigInt'); + +// non-boxed-primitive objects return `undefined` +assert.equal(whichBoxedPrimitive([]), undefined); +assert.equal(whichBoxedPrimitive({}), undefined); +assert.equal(whichBoxedPrimitive(/a/g), undefined); +assert.equal(whichBoxedPrimitive(new RegExp('a', 'g')), undefined); +assert.equal(whichBoxedPrimitive(new Date()), undefined); +assert.equal(whichBoxedPrimitive(function () {}), undefined); +assert.equal(whichBoxedPrimitive(function* () {}), undefined); +assert.equal(whichBoxedPrimitive(x => x * x), undefined); +assert.equal(whichBoxedPrimitive([]), undefined); + +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/which-boxed-primitive +[2]: https://versionbadg.es/inspect-js/which-boxed-primitive.svg +[5]: https://david-dm.org/inspect-js/which-boxed-primitive.svg +[6]: https://david-dm.org/inspect-js/which-boxed-primitive +[7]: https://david-dm.org/inspect-js/which-boxed-primitive/dev-status.svg +[8]: https://david-dm.org/inspect-js/which-boxed-primitive#info=devDependencies +[11]: https://nodei.co/npm/which-boxed-primitive.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/which-boxed-primitive.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/which-boxed-primitive.svg +[downloads-url]: https://npm-stat.com/charts.html?package=which-boxed-primitive diff --git a/node_modules/which-boxed-primitive/index.js b/node_modules/which-boxed-primitive/index.js new file mode 100644 index 0000000..f8ea564 --- /dev/null +++ b/node_modules/which-boxed-primitive/index.js @@ -0,0 +1,30 @@ +'use strict'; + +var isString = require('is-string'); +var isNumber = require('is-number-object'); +var isBoolean = require('is-boolean-object'); +var isSymbol = require('is-symbol'); +var isBigInt = require('is-bigint'); + +// eslint-disable-next-line consistent-return +module.exports = function whichBoxedPrimitive(value) { + // eslint-disable-next-line eqeqeq + if (value == null || (typeof value !== 'object' && typeof value !== 'function')) { + return null; + } + if (isString(value)) { + return 'String'; + } + if (isNumber(value)) { + return 'Number'; + } + if (isBoolean(value)) { + return 'Boolean'; + } + if (isSymbol(value)) { + return 'Symbol'; + } + if (isBigInt(value)) { + return 'BigInt'; + } +}; diff --git a/node_modules/which-boxed-primitive/package.json b/node_modules/which-boxed-primitive/package.json new file mode 100644 index 0000000..0ef53eb --- /dev/null +++ b/node_modules/which-boxed-primitive/package.json @@ -0,0 +1,65 @@ +{ + "name": "which-boxed-primitive", + "version": "1.0.2", + "description": "Which kind of boxed JS primitive is this?", + "main": "index.js", + "scripts": { + "preversion": "auto-changelog", + "prepublish": "not-in-publish || safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/which-boxed-primitive.git" + }, + "keywords": [ + "boxed", + "primitive", + "object", + "ecmascript", + "javascript", + "which" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/which-boxed-primitive/issues" + }, + "homepage": "https://github.com/inspect-js/which-boxed-primitive#readme", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.15.0", + "has-symbols": "^1.0.1", + "in-publish": "^2.0.1", + "nyc": "^10.3.2", + "object-inspect": "^1.9.0", + "safe-publish-latest": "^1.1.4", + "tape": "^5.0.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/which-boxed-primitive/test/index.js b/node_modules/which-boxed-primitive/test/index.js new file mode 100644 index 0000000..f9ea998 --- /dev/null +++ b/node_modules/which-boxed-primitive/test/index.js @@ -0,0 +1,66 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var whichBoxedPrimitive = require('..'); + +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +var hasSymbols = require('has-symbols')(); +var hasBigInts = typeof BigInt === 'function'; + +var primitives = [ + true, + false, + 42, + NaN, + Infinity, + '', + 'foo' +].concat( + hasSymbols ? [Symbol(), Symbol.iterator] : [], + hasBigInts ? BigInt(42) : [] +); + +var objects = [ + /a/g, + new Date(), + function () {}, + [], + {} +]; + +test('isBoxedPrimitive', function (t) { + t.test('unboxed primitives', function (st) { + forEach([null, undefined].concat(primitives), function (primitive) { + st.equal(null, whichBoxedPrimitive(primitive), debug(primitive, 'is a primitive, but not a boxed primitive')); + }); + st.end(); + }); + + t.test('boxed primitives', function (st) { + forEach(primitives, function (primitive) { + var boxed = Object(primitive); + var expected = boxed.constructor.name; + st.equal(typeof expected, 'string', 'expected is string'); + st.equal(whichBoxedPrimitive(boxed), expected, debug(boxed, 'is a boxed primitive: ' + expected)); + }); + st.end(); + }); + + t.test('non-primitive objects', function (st) { + forEach(objects, function (object) { + st.equal(undefined, whichBoxedPrimitive(object), debug(object, 'is not a primitive, boxed or otherwise')); + }); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/which-typed-array/.editorconfig b/node_modules/which-typed-array/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/which-typed-array/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/which-typed-array/.eslintrc b/node_modules/which-typed-array/.eslintrc new file mode 100644 index 0000000..8b2ada0 --- /dev/null +++ b/node_modules/which-typed-array/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + }, +} diff --git a/node_modules/which-typed-array/.github/FUNDING.yml b/node_modules/which-typed-array/.github/FUNDING.yml new file mode 100644 index 0000000..d6aa180 --- /dev/null +++ b/node_modules/which-typed-array/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/which-typed-array +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/which-typed-array/.nycrc b/node_modules/which-typed-array/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/which-typed-array/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/which-typed-array/CHANGELOG.md b/node_modules/which-typed-array/CHANGELOG.md new file mode 100644 index 0000000..e030db6 --- /dev/null +++ b/node_modules/which-typed-array/CHANGELOG.md @@ -0,0 +1,224 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.15](https://github.com/inspect-js/which-typed-array/compare/v1.1.14...v1.1.15) - 2024-03-10 + +### Commits + +- [types] use a namespace; improve type [`f42bec3`](https://github.com/inspect-js/which-typed-array/commit/f42bec34d5c47bd9e4ab1b48dcde60c09c666712) +- [types] use shared config [`464a9e3`](https://github.com/inspect-js/which-typed-array/commit/464a9e358c2597253c747970b12032406a19b8d2) +- [actions] remove redundant finisher; use reusable workflow [`d114ee8`](https://github.com/inspect-js/which-typed-array/commit/d114ee83ceb6c7898386f4b5935a3ed9e2ec61e4) +- [Dev Deps] update `@types/node`, `tape`, `typescript`; add `@arethetypeswrong/cli` [`9cc63d8`](https://github.com/inspect-js/which-typed-array/commit/9cc63d8635e80ce6dabcb352d23050111040d747) +- [types] add a helpful hover description [`29ccf8d`](https://github.com/inspect-js/which-typed-array/commit/29ccf8dab0f805cdac6ec56d7b9cc27476708273) +- [Deps] update `available-typed-arrays`, `call-bind`, `has-tostringtag` [`7ecfd8e`](https://github.com/inspect-js/which-typed-array/commit/7ecfd8e29d09f8708f7cab7cc41fea9ae5a20867) + +## [v1.1.14](https://github.com/inspect-js/which-typed-array/compare/v1.1.13...v1.1.14) - 2024-02-01 + +### Commits + +- [patch] add types [`49c4d4c`](https://github.com/inspect-js/which-typed-array/commit/49c4d4c5db9bebb8d6f8c18a01047e44eea15e17) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`e5fab7b`](https://github.com/inspect-js/which-typed-array/commit/e5fab7b3dc9df2bceb88f15c3d0a2c0176cf2567) +- [Deps] update `available-typed-arrays`, `call-bind` [`97e2b44`](https://github.com/inspect-js/which-typed-array/commit/97e2b44bad85c9183f1219e28211b3abd167677c) +- [Deps] update `has-tostringtag` [`1efa8bf`](https://github.com/inspect-js/which-typed-array/commit/1efa8bf910c080c14f011aa7c645ac88bc7a7078) + +## [v1.1.13](https://github.com/inspect-js/which-typed-array/compare/v1.1.12...v1.1.13) - 2023-10-19 + +### Commits + +- [Refactor] avoid call-binding entirely when there is no method to bind [`9ff452b`](https://github.com/inspect-js/which-typed-array/commit/9ff452b88fbd8e4419bd768d86d0ea9a87d7e310) + +## [v1.1.12](https://github.com/inspect-js/which-typed-array/compare/v1.1.11...v1.1.12) - 2023-10-19 + +### Commits + +- [Fix] somehow node 0.12 - 3 can hit here, and they lack slice but have set [`c28e9b8`](https://github.com/inspect-js/which-typed-array/commit/c28e9b84d6d68ad5f52236ba59c26b06cde6300b) +- [Deps] update `call-bind` [`a648554`](https://github.com/inspect-js/which-typed-array/commit/a64855495106235352ebb3550a860d3bfd4a1ce1) +- [Dev Deps] update `tape` [`7a094d6`](https://github.com/inspect-js/which-typed-array/commit/7a094d6f9219b903c9a9e13c559e68f0e9672b59) + +## [v1.1.11](https://github.com/inspect-js/which-typed-array/compare/v1.1.10...v1.1.11) - 2023-07-17 + +### Commits + +- [Fix] `node < v0.6` lacks proper Object toString behavior [`b8fd654`](https://github.com/inspect-js/which-typed-array/commit/b8fd65479c0bd18385378cfae79750ebf7cb6ee7) +- [Dev Deps] update `tape` [`e1734c9`](https://github.com/inspect-js/which-typed-array/commit/e1734c99d79880ab11efa55220498a7a1e887834) + +## [v1.1.10](https://github.com/inspect-js/which-typed-array/compare/v1.1.9...v1.1.10) - 2023-07-10 + +### Commits + +- [actions] update rebase action to use reusable workflow [`2c10582`](https://github.com/inspect-js/which-typed-array/commit/2c105820d77274c079cb6d040cb348396e516ef5) +- [Robustness] use `call-bind` [`b2335fd`](https://github.com/inspect-js/which-typed-array/commit/b2335fdfca80840995eea5e6fcfffc6d712279a1) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`ad5e41b`](https://github.com/inspect-js/which-typed-array/commit/ad5e41ba18e7d23af1f9b211215c43a64bf75d70) + +## [v1.1.9](https://github.com/inspect-js/which-typed-array/compare/v1.1.8...v1.1.9) - 2022-11-02 + +### Commits + +- [Dev Deps] update `aud`, `is-callable`, `tape` [`9a20b3c`](https://github.com/inspect-js/which-typed-array/commit/9a20b3cb8f5d087789a8160395517bffe27b4339) +- [Refactor] use `gopd` instead of `es-abstract` helper [`00157af`](https://github.com/inspect-js/which-typed-array/commit/00157af909842b8b5affa5485d3574ec92d94065) +- [Deps] update `is-typed-array` [`6714240`](https://github.com/inspect-js/which-typed-array/commit/6714240e748cbbb634cb1e405ad762bc52acde66) +- [meta] add `sideEffects` flag [`89b96cc`](https://github.com/inspect-js/which-typed-array/commit/89b96cc3decc78d9621598e94fa1c2bb87eabf2e) + +## [v1.1.8](https://github.com/inspect-js/which-typed-array/compare/v1.1.7...v1.1.8) - 2022-05-14 + +### Commits + +- [actions] reuse common workflows [`95ea6c0`](https://github.com/inspect-js/which-typed-array/commit/95ea6c02dc5ec4ed0ee1b9c4692bb060108c8637) +- [meta] use `npmignore` to autogenerate an npmignore file [`d08436a`](https://github.com/inspect-js/which-typed-array/commit/d08436a19cdd76219732f5040a01cdb92ef2820e) +- [readme] add github actions/codecov badges [`35ae3af`](https://github.com/inspect-js/which-typed-array/commit/35ae3af6a0bb328c9d9b9bbb53e47122f269d81a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`86e6e3a`](https://github.com/inspect-js/which-typed-array/commit/86e6e3af60b2436f0ff34968d9d6240a23f40528) +- [actions] update codecov uploader [`0aa6e30`](https://github.com/inspect-js/which-typed-array/commit/0aa6e3026ab4198c4364737ed4f0315a2ecc432a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`a881a78`](https://github.com/inspect-js/which-typed-array/commit/a881a785f094e823e1cefe2ae9e4ebe31a8e996e) +- [Refactor] use `for-each` instead of `foreach` [`9dafa03`](https://github.com/inspect-js/which-typed-array/commit/9dafa0377fc5c690059a9d454f1dd4d365c5c902) +- [Deps] update `es-abstract`, `is-typed-array` [`0684022`](https://github.com/inspect-js/which-typed-array/commit/068402297608f321a4ec99ebce741b3eb38fcfdd) +- [Deps] update `es-abstract`, `is-typed-array` [`633a529`](https://github.com/inspect-js/which-typed-array/commit/633a529081b5c48d9675abb8aea425e6e33d528e) + +## [v1.1.7](https://github.com/inspect-js/which-typed-array/compare/v1.1.6...v1.1.7) - 2021-08-30 + +### Commits + +- [Refactor] use `globalThis` if available [`2a16d1f`](https://github.com/inspect-js/which-typed-array/commit/2a16d1fd520871ce6b23c60f0bd2113cf33b2533) +- [meta] changelog cleanup [`ba99f56`](https://github.com/inspect-js/which-typed-array/commit/ba99f56b45e6acde7aef4a1f34bb00e44088ccee) +- [Dev Deps] update `@ljharb/eslint-config` [`19a6e04`](https://github.com/inspect-js/which-typed-array/commit/19a6e04ce0094fb3fd6d0d2cbc58d320556ddf50) +- [Deps] update `available-typed-arrays` [`50dbc58`](https://github.com/inspect-js/which-typed-array/commit/50dbc5810a24c468b49409e1f0a79d03501e3dd6) +- [Deps] update `is-typed-array` [`c1b83ea`](https://github.com/inspect-js/which-typed-array/commit/c1b83eae65f042e46b6ae941ac4e814b7965a0f7) + +## [v1.1.6](https://github.com/inspect-js/which-typed-array/compare/v1.1.5...v1.1.6) - 2021-08-06 + +### Fixed + +- [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString [`#51`](https://github.com/inspect-js/which-typed-array/issues/51) [`#49`](https://github.com/inspect-js/which-typed-array/issues/49) + +### Commits + +- [Dev Deps] update `is-callable`, `tape` [`63eb1e3`](https://github.com/inspect-js/which-typed-array/commit/63eb1e3faede3f328bbbb4a5fcffc2e4769cf4ec) +- [Deps] update `is-typed-array` [`c5056f0`](https://github.com/inspect-js/which-typed-array/commit/c5056f0007d4c9434f1fa69eff183109468b4769) + +## [v1.1.5](https://github.com/inspect-js/which-typed-array/compare/v1.1.4...v1.1.5) - 2021-08-05 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`63fa8dd`](https://github.com/inspect-js/which-typed-array/commit/63fa8dd1dc9c0f0dbbaa16d1de0eb89797324c5d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`1107c74`](https://github.com/inspect-js/which-typed-array/commit/1107c74c52ed6eb4a719faec88e16c4343976d73) +- [Deps] update `available-typed-arrays`, `call-bind`, `es-abstract`, `is-typed-array` [`f953454`](https://github.com/inspect-js/which-typed-array/commit/f953454b2c6f589f09573ddc961431f970c2e1b6) +- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`8aee720`](https://github.com/inspect-js/which-typed-array/commit/8aee7207abcd72c799ac324b214fbb6ca7ae4a28) +- [meta] use `prepublishOnly` script for npm 7+ [`6c5167b`](https://github.com/inspect-js/which-typed-array/commit/6c5167b4cd06cb62a5487a2e797d8e41cc2970b1) + +## [v1.1.4](https://github.com/inspect-js/which-typed-array/compare/v1.1.3...v1.1.4) - 2020-12-05 + +### Commits + +- [meta] npmignore github action workflows [`aa427e7`](https://github.com/inspect-js/which-typed-array/commit/aa427e79a230a985953695a8129ceb6bb7d42527) + +## [v1.1.3](https://github.com/inspect-js/which-typed-array/compare/v1.1.2...v1.1.3) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`803d4dd`](https://github.com/inspect-js/which-typed-array/commit/803d4ddb601ff03e587be792bd452de0e2783d03) +- [Tests] run `nyc` on all tests [`205a13f`](https://github.com/inspect-js/which-typed-array/commit/205a13f7aa172e014ddc2079c84af6ba575581c8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`97ceb07`](https://github.com/inspect-js/which-typed-array/commit/97ceb070d5aea1c3a696c6f695800ae468bafc0b) +- [actions] add "Allow Edits" workflow [`b140492`](https://github.com/inspect-js/which-typed-array/commit/b14049211eff32bd4149767def4f939483810051) +- [Deps] update `es-abstract`; use `call-bind` where applicable [`2abdb87`](https://github.com/inspect-js/which-typed-array/commit/2abdb871961b4e1b58925115a7d56a9cc5966a02) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`256d34b`](https://github.com/inspect-js/which-typed-array/commit/256d34b8bdb67b8af0e9f83c9a318e54f3340e3b) +- [Dev Deps] update `auto-changelog`; add `aud` [`ddea96f`](https://github.com/inspect-js/which-typed-array/commit/ddea96fe320dbdd0c7d7569812399a7f64d43e04) +- [meta] gitignore nyc output [`8a812bd`](https://github.com/inspect-js/which-typed-array/commit/8a812bd1ce7c5609988fb4fe2e9af2089eccd07d) + +## [v1.1.2](https://github.com/inspect-js/which-typed-array/compare/v1.1.1...v1.1.2) - 2020-04-07 + +### Commits + +- [Dev Deps] update `make-arrow-function`, `make-generator-function` [`28c61ef`](https://github.com/inspect-js/which-typed-array/commit/28c61eff4903ff6509f65c2f500858b9cb4636f1) +- [Dev Deps] update `@ljharb/eslint-config` [`a233879`](https://github.com/inspect-js/which-typed-array/commit/a2338798d3a4a3169cda54e322b2f2eb0e976ad0) +- [Dev Deps] update `auto-changelog` [`df0134c`](https://github.com/inspect-js/which-typed-array/commit/df0134c0e20ec6d94993988ad670e1b3cf350bea) +- [Fix] move `foreach` to dependencies [`6ef29c0`](https://github.com/inspect-js/which-typed-array/commit/6ef29c0dbb91a7ec21df7ce8736f99f41efea39e) +- [Tests] only audit prod deps [`eb21044`](https://github.com/inspect-js/which-typed-array/commit/eb210446bd7a433657204d2314ef56fe264c21ad) +- [Deps] update `es-abstract` [`5ef0236`](https://github.com/inspect-js/which-typed-array/commit/5ef02368d9876a1074123aa7725d6759b4f3e358) +- [Dev Deps] update `tape` [`7456037`](https://github.com/inspect-js/which-typed-array/commit/745603728c6c3da8bdddee321e8a9196f4827aa3) +- [Deps] update `available-typed-arrays` [`8a856c9`](https://github.com/inspect-js/which-typed-array/commit/8a856c9aa707c1e6f7a52e834485356b31395ea6) + +## [v1.1.1](https://github.com/inspect-js/which-typed-array/compare/v1.1.0...v1.1.1) - 2020-01-24 + +### Commits + +- [Tests] use shared travis-ci configs [`0a627d9`](https://github.com/inspect-js/which-typed-array/commit/0a627d9694d0eabdaee63b19e605584166995a79) +- [meta] add `auto-changelog` [`2a14c58`](https://github.com/inspect-js/which-typed-array/commit/2a14c58b79f72e32ef2078efb40d31a4bf8c197a) +- [meta] remove unused Makefile and associated utilities [`75f7f22`](https://github.com/inspect-js/which-typed-array/commit/75f7f222199f42618c290de363c542b11f5a5632) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`4162327`](https://github.com/inspect-js/which-typed-array/commit/416232725e7d127cbd886af0f8988dae612a342f) +- [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols` [`9b04a2a`](https://github.com/inspect-js/which-typed-array/commit/9b04a2a14c758600cffcf59485b7b3c85839c266) +- [readme] fix repo URLs, remove testling [`03ed52f`](https://github.com/inspect-js/which-typed-array/commit/03ed52f3ae4fcd35614bcda7e947b14e62009c71) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape` [`bfbcf3e`](https://github.com/inspect-js/which-typed-array/commit/bfbcf3ec9c449bd0089ed805c01a32ba4e7e5938) +- [actions] add automatic rebasing / merge commit blocking [`cc88ac5`](https://github.com/inspect-js/which-typed-array/commit/cc88ac56bcfb71cb26c656ebde4c560a22fadd85) +- [meta] create FUNDING.yml [`acbc723`](https://github.com/inspect-js/which-typed-array/commit/acbc7230929b1256c83df28be4a456eed3e147e9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `tape` [`f1ab63e`](https://github.com/inspect-js/which-typed-array/commit/f1ab63e9366027eae2e29398c035181dac164132) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` [`ac9f50b`](https://github.com/inspect-js/which-typed-array/commit/ac9f50b59558933292dff993df2e68eaa44b07e2) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`aaaa15d`](https://github.com/inspect-js/which-typed-array/commit/aaaa15dfb5bd8228c0cfb8f2aba267efb405b0a1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`602fc9a`](https://github.com/inspect-js/which-typed-array/commit/602fc9a0a7d708236f90c76f592e6a980ecde940) +- [Deps] update `available-typed-arrays`, `is-typed-array` [`b2d69b6`](https://github.com/inspect-js/which-typed-array/commit/b2d69b639bf14344d09f8512dbc060cd4f533161) +- [meta] add `funding` field [`156f613`](https://github.com/inspect-js/which-typed-array/commit/156f613d0ce547c4b15e1ae279198b66e3cef55e) + +## [v1.1.0](https://github.com/inspect-js/which-typed-array/compare/v1.0.1...v1.1.0) - 2019-02-16 + +### Commits + +- [Tests] remove `jscs` [`381c9b4`](https://github.com/inspect-js/which-typed-array/commit/381c9b4bd858da1adedf23d8555af3a3ed901a83) +- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v5.8`; improve matrix; newer npm breaks on older node [`7015c19`](https://github.com/inspect-js/which-typed-array/commit/7015c196ba86540b04d18d9b1d2c368909492023) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`ad67885`](https://github.com/inspect-js/which-typed-array/commit/ad678853e245986720d7650be1c974a9ff3ac814) +- [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` [`dd94bfb`](https://github.com/inspect-js/which-typed-array/commit/dd94bfb6309a92d1537352f2d1100f9e913ebc01) +- [Refactor] use an array instead of an object for storing Typed Array names [`de98bc1`](https://github.com/inspect-js/which-typed-array/commit/de98bc1d44af92909a34212e276deb5d79ac428a) +- [meta] ignore `test.html` [`06cfb1b`](https://github.com/inspect-js/which-typed-array/commit/06cfb1bc0ca7881d1bd1621fa946a16366cd6afc) +- [Tests] up to `node` `v7.0`, `v6.9`, `v4.6`; improve test matrix [`df76eaa`](https://github.com/inspect-js/which-typed-array/commit/df76eaa39b94b28147e81a89bb587e8aa3e3dba3) +- [New] add `BigInt64Array` and `BigUint64Array` [`d6bca3a`](https://github.com/inspect-js/which-typed-array/commit/d6bca3a68ccfe33f6659a24b770068e89dab1592) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`f23b45b`](https://github.com/inspect-js/which-typed-array/commit/f23b45b2796bd1f63ddddf28b4b80b9709478cb3) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `semver`, `tape` [`ddb4484`](https://github.com/inspect-js/which-typed-array/commit/ddb4484adc3b45c4396632611556055f3b2f5990) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is-callable`, `replace`, `semver`, `tape` [`4524e59`](https://github.com/inspect-js/which-typed-array/commit/4524e593e9387c185d5632696c62c1600c0b380f) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`1ec7056`](https://github.com/inspect-js/which-typed-array/commit/1ec70568565c479a6168b03e0a5aec6ec9ac5a21) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`799487d`](https://github.com/inspect-js/which-typed-array/commit/799487d666b32d1ae0d27cfededf2f5480c5faea) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`8092598`](https://github.com/inspect-js/which-typed-array/commit/8092598998a1f9f8005b4e3d299eb09c96fa2e21) +- [Tests] up to `node` `v11.10` [`a5aabb1`](https://github.com/inspect-js/which-typed-array/commit/a5aabb1910e8408f857a791253487824c7c758d3) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `nsp`, `semver`, `tape` [`277be33`](https://github.com/inspect-js/which-typed-array/commit/277be331d9f05ff95644d6bcd896547ca620cd8e) +- [Tests] use `npm audit` instead of `nsp` [`ee97dc7`](https://github.com/inspect-js/which-typed-array/commit/ee97dc7c5d384d68f60ce6cb5a85d9509e75f72b) +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` [`262ffb0`](https://github.com/inspect-js/which-typed-array/commit/262ffb025facb0795b33fbd5131183bdbc0a40f6) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`d6bbcfc`](https://github.com/inspect-js/which-typed-array/commit/d6bbcfc3eea427f0156fbdcf9ae11dbf3745a755) +- [Tests] up to `node` `v6.2` [`2ff89eb`](https://github.com/inspect-js/which-typed-array/commit/2ff89eb91754146c0bc1ae689f37458d84f6e690) +- Only apps should have lockfiles [`e2bc271`](https://github.com/inspect-js/which-typed-array/commit/e2bc271e1e9a6481a2836f892177825a808c331c) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`b79e93b`](https://github.com/inspect-js/which-typed-array/commit/b79e93bf15c871ce0ff24fa3ad61001707eea463) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`016dbff`](https://github.com/inspect-js/which-typed-array/commit/016dbff8c49c32cda7ec80d86006c8a7c43bc40c) +- [Dev Deps] update `eslint`, `tape` [`6ce4bbc`](https://github.com/inspect-js/which-typed-array/commit/6ce4bbc5f6caf632cbcf9ababbfe36e1bf4093d7) +- [Tests] on `node` `v10.1` [`f0683a0`](https://github.com/inspect-js/which-typed-array/commit/f0683a0c17e039e926ecaad4c4c341cd8e5878f1) +- [Tests] up to `node` `v7.2` [`2f29cef`](https://github.com/inspect-js/which-typed-array/commit/2f29cef42d30f87259cd6687c25a79ae4651d0c9) +- [Dev Deps] update `replace` [`73b5ba6`](https://github.com/inspect-js/which-typed-array/commit/73b5ba6e87638d13553985977cab9d1bad33e242) +- [Deps] update `function-bind` [`c8a18c2`](https://github.com/inspect-js/which-typed-array/commit/c8a18c2982e6b126ecc1d4655ec2e53b05535b20) +- [Tests] on `node` `v5.12` [`812102b`](https://github.com/inspect-js/which-typed-array/commit/812102bf223422da8f7a89e5a1308214dd158571) +- [Tests] on `node` `v5.10` [`271584f`](https://github.com/inspect-js/which-typed-array/commit/271584f3a8b10ef68a7d419ac0062b444e63d07c) + +## [v1.0.1](https://github.com/inspect-js/which-typed-array/compare/v1.0.0...v1.0.1) - 2016-03-19 + +### Commits + +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable` [`4a628c5`](https://github.com/inspect-js/which-typed-array/commit/4a628c520d8e080a9fa7e8218947d3b2ceedca72) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is-callable` [`8e09372`](https://github.com/inspect-js/which-typed-array/commit/8e09372ded877a191cbf777060483227d5071e84) +- [Tests] up to `node` `v5.6`, `v4.3` [`3a35bf9`](https://github.com/inspect-js/which-typed-array/commit/3a35bf9fb9c7f8e6ac1b579ed2754087351ad1a5) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`9410d5e`](https://github.com/inspect-js/which-typed-array/commit/9410d5e35db4b834827b31ea1723bbeebbcde5ba) +- [Fix] `Symbol.toStringTag` is on the super-[[Prototype]] of Float32Array, not the [[Prototype]]. [`7c40a3a`](https://github.com/inspect-js/which-typed-array/commit/7c40a3a05046bbbd188340fb19471ad913e4af05) +- [Tests] up to `node` `v5.9`, `v4.4` [`07878e7`](https://github.com/inspect-js/which-typed-array/commit/07878e7cd23d586ddb9e85a03f675e0a574db246) +- Use the object form of "author" in package.json [`65caa56`](https://github.com/inspect-js/which-typed-array/commit/65caa560d1c0c15c1080b25a9df55c7373c73f08) +- [Tests] use pretest/posttest for linting/security [`c170f7e`](https://github.com/inspect-js/which-typed-array/commit/c170f7ebcf07475d6420f2d2d2d08b1646280cd4) +- [Deps] update `is-typed-array` [`9ab324e`](https://github.com/inspect-js/which-typed-array/commit/9ab324e746a7552b2d9363777fc5c9f5c2e31ce7) +- [Deps] update `function-bind` [`a723142`](https://github.com/inspect-js/which-typed-array/commit/a723142c70a5b6a4f8f5feecc9705619590f4eeb) +- [Deps] update `is-typed-array` [`ed82ce4`](https://github.com/inspect-js/which-typed-array/commit/ed82ce4e8ecc657fc6e839d23ef6347497bc93be) +- [Tests] on `node` `v4.2` [`f581c20`](https://github.com/inspect-js/which-typed-array/commit/f581c2031990668894a8e5a08eaf01a2548e822c) + +## v1.0.0 - 2015-10-05 + +### Commits + +- Dotfiles / Makefile [`667f89a`](https://github.com/inspect-js/which-typed-array/commit/667f89a9046502594e2559dbf5568e062af3b770) +- Tests. [`a14d05e`](https://github.com/inspect-js/which-typed-array/commit/a14d05ef443d2ac678cb0567befc0abf8cf21709) +- package.json [`560b1aa`](https://github.com/inspect-js/which-typed-array/commit/560b1aa4f8bbc5d41d9cee96c93faf08c25be0e5) +- Read me [`a22096e`](https://github.com/inspect-js/which-typed-array/commit/a22096e05773f93b34e672d3f743ec6f1963bc24) +- Implementation [`0b1ae28`](https://github.com/inspect-js/which-typed-array/commit/0b1ae2848372f6256cf075d687e3722878e67aca) +- Initial commit [`4b32f0a`](https://github.com/inspect-js/which-typed-array/commit/4b32f0a9d32165d6ab91797d6971ea83cf4ce9da) diff --git a/node_modules/which-typed-array/LICENSE b/node_modules/which-typed-array/LICENSE new file mode 100644 index 0000000..b43df44 --- /dev/null +++ b/node_modules/which-typed-array/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/which-typed-array/README.md b/node_modules/which-typed-array/README.md new file mode 100644 index 0000000..1b922cd --- /dev/null +++ b/node_modules/which-typed-array/README.md @@ -0,0 +1,70 @@ +# which-typed-array [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag. + +## Example + +```js +var whichTypedArray = require('which-typed-array'); +var assert = require('assert'); + +assert.equal(false, whichTypedArray(undefined)); +assert.equal(false, whichTypedArray(null)); +assert.equal(false, whichTypedArray(false)); +assert.equal(false, whichTypedArray(true)); +assert.equal(false, whichTypedArray([])); +assert.equal(false, whichTypedArray({})); +assert.equal(false, whichTypedArray(/a/g)); +assert.equal(false, whichTypedArray(new RegExp('a', 'g'))); +assert.equal(false, whichTypedArray(new Date())); +assert.equal(false, whichTypedArray(42)); +assert.equal(false, whichTypedArray(NaN)); +assert.equal(false, whichTypedArray(Infinity)); +assert.equal(false, whichTypedArray(new Number(42))); +assert.equal(false, whichTypedArray('foo')); +assert.equal(false, whichTypedArray(Object('foo'))); +assert.equal(false, whichTypedArray(function () {})); +assert.equal(false, whichTypedArray(function* () {})); +assert.equal(false, whichTypedArray(x => x * x)); +assert.equal(false, whichTypedArray([])); + +assert.equal('Int8Array', whichTypedArray(new Int8Array())); +assert.equal('Uint8Array', whichTypedArray(new Uint8Array())); +assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray())); +assert.equal('Int16Array', whichTypedArray(new Int16Array())); +assert.equal('Uint16Array', whichTypedArray(new Uint16Array())); +assert.equal('Int32Array', whichTypedArray(new Int32Array())); +assert.equal('Uint32Array', whichTypedArray(new Uint32Array())); +assert.equal('Float32Array', whichTypedArray(new Float32Array())); +assert.equal('Float64Array', whichTypedArray(new Float64Array())); +assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array())); +assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/which-typed-array +[npm-version-svg]: https://versionbadg.es/inspect-js/which-typed-array.svg +[deps-svg]: https://david-dm.org/inspect-js/which-typed-array.svg +[deps-url]: https://david-dm.org/inspect-js/which-typed-array +[dev-deps-svg]: https://david-dm.org/inspect-js/which-typed-array/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/which-typed-array#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/which-typed-array.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/which-typed-array.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/which-typed-array.svg +[downloads-url]: https://npm-stat.com/charts.html?package=which-typed-array +[codecov-image]: https://codecov.io/gh/inspect-js/which-typed-array/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/which-typed-array/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/which-typed-array +[actions-url]: https://github.com/inspect-js/which-typed-array/actions diff --git a/node_modules/which-typed-array/index.d.ts b/node_modules/which-typed-array/index.d.ts new file mode 100644 index 0000000..052bf41 --- /dev/null +++ b/node_modules/which-typed-array/index.d.ts @@ -0,0 +1,61 @@ +/** + * Determines the type of the given collection, or returns false. + * + * @param {unknown} value The potential collection + * @returns {TypedArrayName | false | null} 'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array' | false | null + */ +declare function whichTypedArray(value: Int8Array): 'Int8Array'; +declare function whichTypedArray(value: Uint8Array): 'Uint8Array'; +declare function whichTypedArray(value: Uint8ClampedArray): 'Uint8ClampedArray'; +declare function whichTypedArray(value: Int16Array): 'Int16Array'; +declare function whichTypedArray(value: Uint16Array): 'Uint16Array'; +declare function whichTypedArray(value: Int32Array): 'Int32Array'; +declare function whichTypedArray(value: Uint32Array): 'Uint32Array'; +declare function whichTypedArray(value: Float32Array): 'Float32Array'; +declare function whichTypedArray(value: Float64Array): 'Float64Array'; +declare function whichTypedArray(value: BigInt64Array): 'BigInt64Array'; +declare function whichTypedArray(value: BigUint64Array): 'BigUint64Array'; +declare function whichTypedArray(value: unknown): false | null; + +declare namespace whichTypedArray { + type TypedArrayName = + | 'Int8Array' + | 'Uint8Array' + | 'Uint8ClampedArray' + | 'Int16Array' + | 'Uint16Array' + | 'Int32Array' + | 'Uint32Array' + | 'Float32Array' + | 'Float64Array' + | 'BigInt64Array' + | 'BigUint64Array'; + + type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; + + type TypedArrayConstructor = + | Int8ArrayConstructor + | Uint8ArrayConstructor + | Uint8ClampedArrayConstructor + | Int16ArrayConstructor + | Uint16ArrayConstructor + | Int32ArrayConstructor + | Uint32ArrayConstructor + | Float32ArrayConstructor + | Float64ArrayConstructor + | BigInt64ArrayConstructor + | BigUint64ArrayConstructor; +} + +export = whichTypedArray; diff --git a/node_modules/which-typed-array/index.js b/node_modules/which-typed-array/index.js new file mode 100644 index 0000000..1a6edc5 --- /dev/null +++ b/node_modules/which-typed-array/index.js @@ -0,0 +1,116 @@ +'use strict'; + +var forEach = require('for-each'); +var availableTypedArrays = require('available-typed-arrays'); +var callBind = require('call-bind'); +var callBound = require('call-bind/callBound'); +var gOPD = require('gopd'); + +/** @type {(O: object) => string} */ +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = require('has-tostringtag/shams')(); + +var g = typeof globalThis === 'undefined' ? global : globalThis; +var typedArrays = availableTypedArrays(); + +var $slice = callBound('String.prototype.slice'); +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); + +/** @type {(array: readonly T[], value: unknown) => number} */ +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; + +/** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */ +/** @type {{ [k in `\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */ +var cache = { __proto__: null }; +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + // @ts-expect-error TS won't narrow inside a closure + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + // @ts-expect-error TS won't narrow inside a closure + descriptor = gOPD(superProto, Symbol.toStringTag); + } + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(descriptor.get); + } + }); +} else { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(fn); + } + }); +} + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */ + function (getter, typedArray) { + if (!found) { + try { + // @ts-expect-error TODO: fix + if ('$' + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var trySlices = function tryAllSlices(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */ function (getter, name) { + if (!found) { + try { + // @ts-expect-error TODO: fix + getter(value); + found = $slice(name, 1); + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {import('.')} */ +module.exports = function whichTypedArray(value) { + if (!value || typeof value !== 'object') { return false; } + if (!hasToStringTag) { + /** @type {string} */ + var tag = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag) > -1) { + return tag; + } + if (tag !== 'Object') { + return false; + } + // node < 0.6 hits here on real Typed Arrays + return trySlices(value); + } + if (!gOPD) { return null; } // unknown engine + return tryTypedArrays(value); +}; diff --git a/node_modules/which-typed-array/package.json b/node_modules/which-typed-array/package.json new file mode 100644 index 0000000..5bcab5f --- /dev/null +++ b/node_modules/which-typed-array/package.json @@ -0,0 +1,128 @@ +{ + "name": "which-typed-array", + "version": "1.1.15", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.", + "license": "MIT", + "main": "index.js", + "types": "./index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc tape test", + "test:harmony": "nyc node --harmony --es-staging test", + "posttest": "aud --production", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && attw -P", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/which-typed-array.git" + }, + "keywords": [ + "array", + "TypedArray", + "typed array", + "which", + "typed", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "ES6", + "toStringTag", + "Symbol.toStringTag", + "@@toStringTag" + ], + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.2.0", + "@types/call-bind": "^1.0.5", + "@types/for-each": "^0.3.3", + "@types/gopd": "^1.0.3", + "@types/is-callable": "^1.1.2", + "@types/make-arrow-function": "^1.2.2", + "@types/make-generator-function": "^2.0.3", + "@types/node": "^20.11.25", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/which-typed-array/test/index.js b/node_modules/which-typed-array/test/index.js new file mode 100644 index 0000000..d79453a --- /dev/null +++ b/node_modules/which-typed-array/test/index.js @@ -0,0 +1,105 @@ +'use strict'; + +var test = require('tape'); +var whichTypedArray = require('../'); +var isCallable = require('is-callable'); +var hasToStringTag = require('has-tostringtag/shams')(); +var generators = require('make-generator-function')(); +var arrows = require('make-arrow-function').list(); +var forEach = require('for-each'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + // @ts-expect-error + st.equal(false, whichTypedArray(), 'undefined is not typed array'); + st.equal(false, whichTypedArray(null), 'null is not typed array'); + st.equal(false, whichTypedArray(false), 'false is not typed array'); + st.equal(false, whichTypedArray(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, whichTypedArray({}), 'object is not typed array'); + t.equal(false, whichTypedArray(/a/g), 'regex literal is not typed array'); + t.equal(false, whichTypedArray(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, whichTypedArray(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, whichTypedArray(42), 'number is not typed array'); + st.equal(false, whichTypedArray(Object(42)), 'number object is not typed array'); + st.equal(false, whichTypedArray(NaN), 'NaN is not typed array'); + st.equal(false, whichTypedArray(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, whichTypedArray('foo'), 'string primitive is not typed array'); + st.equal(false, whichTypedArray(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, whichTypedArray(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, whichTypedArray(genFn), 'generator function ' + genFn + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: arrows.length === 0 }, function (t) { + forEach(arrows, function (arrowFn) { + t.equal(false, whichTypedArray(arrowFn), 'arrow function ' + arrowFn + ' is not typed array'); + }); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + forEach(typedArrayNames, function (typedArray) { + // @ts-expect-error TODO: fix + if (typeof global[typedArray] === 'function') { + // @ts-expect-error TODO: fix + var fakeTypedArray = []; + // @ts-expect-error TODO: fix + fakeTypedArray[Symbol.toStringTag] = typedArray; + // @ts-expect-error TODO: fix + t.equal(false, whichTypedArray(fakeTypedArray), 'faked ' + typedArray + ' is not typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + // @ts-expect-error TODO: fix + /** @type {import('../').TypedArrayConstructor} */ var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(10); + t.equal(whichTypedArray(arr), typedArray, 'new ' + typedArray + '(10) is typed array of type ' + typedArray); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/which-typed-array/tsconfig.json b/node_modules/which-typed-array/tsconfig.json new file mode 100644 index 0000000..6716d81 --- /dev/null +++ b/node_modules/which-typed-array/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "ES2021", + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 0000000..3d83d26 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,152 @@ +# Changes + + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md new file mode 100644 index 0000000..8c0b0cb --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,51 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which new file mode 100644 index 0000000..7cee372 --- /dev/null +++ b/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 0000000..51be376 --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,30 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "which", + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "version": "1.3.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "main": "which.js", + "bin": "./bin/which", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^12.0.1" + }, + "scripts": { + "test": "tap test/*.js --cov", + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}" + }, + "files": [ + "which.js", + "bin/which" + ] +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 0000000..4347f91 --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,135 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..8f1bb8f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4001 @@ +{ + "name": "bootstrap", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bootstrap", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "bootstrap": "^5.2.0" + }, + "devDependencies": { + "live-server": "^1.2.2", + "npm-run-all": "^4.1.5", + "sass": "^1.79.3" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "license": "ISC", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/apache-crypt": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.6.tgz", + "integrity": "sha512-072WetlM4blL8PREJVeY+WHiUh1R5VNt2HfceGS8aKqttPHcmqE5pkKuXPz/ULmJOFkc8Hw3kfKl6vy7Qka6DA==", + "dev": true, + "license": "MIT", + "dependencies": { + "unix-crypt-td-js": "^1.1.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/apache-md5": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.8.tgz", + "integrity": "sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bootstrap": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0.tgz", + "integrity": "sha512-qlnS9GL6YZE6Wnef46GxGv1UpGGzAwO0aPL1yOjzDIJpeApeMvqV24iL+pjr2kU4dduoBA9fINKWKgMToobx9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.5" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.0.tgz", + "integrity": "sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "dev": true, + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "Upgrade to fsevents v2 to mitigate potential security issues", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/http-auth": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz", + "integrity": "sha512-Jbx0+ejo2IOx+cRUYAGS1z6RGc6JfYUNkysZM4u4Sfk1uLlGv814F7/PIjQQAuThLdAWxb74JMGd5J8zex1VQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "apache-crypt": "^1.1.2", + "apache-md5": "^1.0.6", + "bcryptjs": "^2.3.0", + "uuid": "^3.0.0" + }, + "engines": { + "node": ">=4.6.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/live-server": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/live-server/-/live-server-1.2.2.tgz", + "integrity": "sha512-t28HXLjITRGoMSrCOv4eZ88viHaBVIjKjdI5PO92Vxlu+twbk6aE0t7dVIaz6ZWkjPilYFV6OSdMYl9ybN2B4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^2.0.4", + "colors": "1.4.0", + "connect": "^3.6.6", + "cors": "latest", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "latest", + "opn": "latest", + "proxy-middleware": "latest", + "send": "latest", + "serve-index": "^1.9.1" + }, + "bin": { + "live-server": "live-server.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/live-server/node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/live-server/node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", + "dev": true + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/nan": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", + "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/opn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz", + "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==", + "deprecated": "The package has been renamed to `open`", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^1.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "dev": true, + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "license": "MIT", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-middleware": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha512-EGCG8SeoIRVMhsqHQUdDigB2i7qU7fCsWASwn54+nPutYO8n4q6EiwMzyfWlC+dzRFExP+kvcnDFdBDHoZBU7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.1.tgz", + "integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true, + "license": "ISC" + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sass": { + "version": "1.79.3", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.79.3.tgz", + "integrity": "sha512-m7dZxh0W9EZ3cw50Me5GOuYm/tVAJAn91SUnohLRo9cXBixGUOdvmryN+dXpwR831bhoY3Zv7rEFt85PUwTmzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "license": "MIT", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unix-crypt-td-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz", + "integrity": "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true, + "license": "MIT" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..88256ba --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "bootstrap", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "sass src/scss:dist/css", + "watch": "sass --watch src/scss:dist/css", + "start": "live-server", + "dev": "npm-run-all --parallel watch start" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "dependencies": { + "bootstrap": "^5.2.0" + }, + "devDependencies": { + "live-server": "^1.2.2", + "npm-run-all": "^4.1.5", + "sass": "^1.79.3" + } +} diff --git a/profile/index.html b/profile/index.html new file mode 100644 index 0000000..f76d226 --- /dev/null +++ b/profile/index.html @@ -0,0 +1,159 @@ + + + + + + Profile - Noroff Social + + + + + + + +
+
+ +
+
+ +
+
+
+ Loading... +
+
+
+
+ + + + + + + + + + + diff --git a/register.html b/register.html new file mode 100644 index 0000000..3152df1 --- /dev/null +++ b/register.html @@ -0,0 +1,76 @@ + + + + + + Register - Noroff Social + + + + + +
+
+
+
+

Register

+ + +
Username must be at least 5 characters
+ + + + +
You must enter a valid Noroff email
+ + + + + + +
Passwords do not match
+ +
+ +
+
+
+ + + diff --git a/src/scss/_index.scss b/src/scss/_index.scss new file mode 100644 index 0000000..239d466 --- /dev/null +++ b/src/scss/_index.scss @@ -0,0 +1,15 @@ +.background-container { + background-image: url("../../images/loginbackground.jpg"); + height: 100vh; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + } + + .post-img { + width: 60%; + height: auto; + } + .mt-6 { + margin-top: ($spacer * 6) !important; + } \ No newline at end of file diff --git a/src/scss/_navbar.scss b/src/scss/_navbar.scss new file mode 100644 index 0000000..50e47a7 --- /dev/null +++ b/src/scss/_navbar.scss @@ -0,0 +1,23 @@ +.bg-customcolor { + background-color: rgb(21, 21, 21); +} + +.profile-icon { + height: 35px; + width: 35px; +} + +.mt-6 { + margin-top: 6rem !important; + } + + .border-bottom-red { + border-bottom: 2px solid red; + } + + #nav-container a { + color: white; + } + + /*# sourceMappingURL=styles.css.map */ + \ No newline at end of file diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss new file mode 100644 index 0000000..154dec3 --- /dev/null +++ b/src/scss/_variables.scss @@ -0,0 +1,5 @@ + +@import '../../node_modules/bootstrap/scss/functions'; +@import '../../node_modules/bootstrap/scss/variables'; + + diff --git a/src/scss/styles.scss b/src/scss/styles.scss new file mode 100644 index 0000000..dd98622 --- /dev/null +++ b/src/scss/styles.scss @@ -0,0 +1,5 @@ + +@import 'variables'; +@import '../../node_modules/bootstrap/scss/bootstrap.scss'; +@import 'navbar'; +@import 'index'; diff --git a/userprofile/index.html b/userprofile/index.html new file mode 100644 index 0000000..23e9fe7 --- /dev/null +++ b/userprofile/index.html @@ -0,0 +1,45 @@ + + + + + + Profiles - Noroff Social + + + + + + + +
+
+ +
+
+ +
+
+
+ Loading... +
+
+
+
+ + + + + + + +